Invoice class

Annotations
  • @JsonSerializable()

Constructors

Invoice({String? id, int? version, String? locationId, String? orderId, InvoiceRecipient? primaryRecipient, List<InvoicePaymentRequest>? paymentRequests, InvoiceDeliveryMethod? deliveryMethod, String? invoiceNumber, String? title, String? description, String? scheduledAt, String? publicUrl, Money? nextPaymentAmountMoney, InvoiceStatus? status, String? timezone, String? createdAt, String? updatedAt, InvoiceAcceptedPaymentMethods? acceptedPaymentMethods, List<InvoiceCustomField>? customFields, String? subscriptionId, String? saleOrServiceDate, String? paymentConditions, bool? storePaymentMethodEnabled})
const
Invoice.fromJson(Map<String, dynamic> json)
Converts a Map<String, dynamic> to a Invoice
factory

Properties

acceptedPaymentMethods InvoiceAcceptedPaymentMethods?
The payment methods that customers can use to pay the invoice on the Square-hosted invoice page. This setting is independent of any automatic payment requests for the invoice.
final
createdAt String?
Read only The timestamp when the invoice was created, in RFC 3339 format.
final
customFields List<InvoiceCustomField>?
Additional seller-defined fields that are displayed on the invoice. For more information, see Custom fields.
final
deliveryMethod InvoiceDeliveryMethod?
The delivery method that Square uses to send the invoice, reminders, and receipts to the customer. After the invoice is published, Square processes the invoice based on the delivery method and payment request settings, either immediately or on the scheduled_at date, if specified. For example, Square might send the invoice or receipt for an automatic payment. For invoices with automatic payments, this field must be set to EMAIL.
final
description String?
The description of the invoice, which is displayed on the invoice.
final
hashCode int
The hash code for this object.
no setterinherited
id String?
Read only The Square-assigned ID of the invoice.
final
invoiceNumber String?
A user-friendly invoice number that is displayed on the invoice. The value is unique within a location. If not provided when creating an invoice, Square assigns a value. It increments from 1 and is padded with zeros making it 7 characters long (for example, 0000001 and 0000002).
final
locationId String?
The ID of the location that this invoice is associated with.
final
nextPaymentAmountMoney Money?
Read only The current amount due for the invoice. In addition to the amount due on the next payment request, this includes any overdue payment amounts.
final
orderId String?
The ID of the order for which the invoice is created. This field is required when creating an invoice, and the order must be in the OPEN state.
final
paymentConditions String?
France only. The payment terms and conditions that are displayed on the invoice.
final
paymentRequests List<InvoicePaymentRequest>?
The payment schedule for the invoice, represented by one or more payment requests that define payment settings, such as amount due and due date. An invoice supports the following payment request combinations:
final
primaryRecipient InvoiceRecipient?
The customer who receives the invoice. This customer data is displayed on the invoice and used by Square to deliver the invoice.
final
props List<Object?>
The list of properties that will be used to determine whether two instances are equal.
no setter
publicUrl String?
Read only The URL of the Square-hosted invoice page. After you publish the invoice using the PublishInvoice endpoint, Square hosts the invoice page and returns the page URL in the response.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
saleOrServiceDate String?
The date of the sale or the date that the service is rendered, in YYYY-MM-DD format. This field can be used to specify a past or future date which is displayed on the invoice.
final
scheduledAt String?
The timestamp when the invoice is scheduled for processing, in RFC 3339 format. After the invoice is published, Square processes the invoice on the specified date, according to the delivery method and payment request settings.
final
status InvoiceStatus?
Read only The status of the invoice.
final
storePaymentMethodEnabled bool?
Indicates whether to allow a customer to save a credit or debit card as a card on file or a bank transfer as a bank account on file. If true, Square displays a Save my card on file or Save my bank on file checkbox on the invoice payment page. Stored payment information can be used for future automatic payments. The default value is false.
final
stringify bool?
If set to true, the toString method will be overridden to output this instance's props.
no setterinherited
subscriptionId String?
Read only The ID of the subscription associated with the invoice. This field is present only on subscription billing invoices.
final
timezone String?
Read only The time zone used to interpret calendar dates on the invoice, such as due_date. When an invoice is created, this field is set to the timezone specified for the seller location. The value cannot be changed.
final
title String?
The title of the invoice, which is displayed on the invoice.
final
updatedAt String?
Read only The timestamp when the invoice was last updated, in RFC 3339 format.
final
version int?
The Square-assigned version number, which is incremented each time an update is committed to the invoice.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
Converts a Invoice to a Map<String, dynamic>
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited