PurchaseUnit class
A purchase unit item
- Annotations
-
- @JsonSerializable(fieldRename: FieldRename.snake)
Constructors
-
PurchaseUnit({String? referenceId, required AmountWithBreakdown amount, Payee? payee, PaymentInstruction? paymentInstruction, String? description, String? customId, String? invoiceId, String? softDescriptor, String? id, List<
Item> ? items, ShippingDetail? shipping, PaymentCollection? payments}) -
PurchaseUnit.fromJson(Map<
String, dynamic> json) -
factory
Properties
- amount → AmountWithBreakdown
-
The total order amount with an optional breakdown that provides details,
such as the total item amount, total tax amount, shipping, handling,
insurance, and discounts, if any. If you specify amount.breakdown, the
amount equals item_total plus tax_total plus shipping plus handling plus
insurance minus shipping_discount minus discount. The amount must be a
positive number. For listed of supported currencies and decimal precision,
see the PayPal REST APIs Currency Codes.
final
- customId → String?
-
The API caller-provided external ID. Used to reconcile client transactions
with PayPal transactions. Appears in transaction and settlement reports
but is not visible to the payer.
final
- description → String?
-
The purchase description.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- id → String?
-
The PayPal-generated ID for the purchase unit. This ID appears in both the
payer's transaction history and the emails that the payer receives. In
addition, this ID is available in transaction and settlement reports that
merchants and API callers can use to reconcile transactions. This ID is
only available when an order is saved by calling v2/checkout/orders/id/save.
final
- invoiceId → String?
-
The API caller-provided external invoice number for this order. Appears in
both the payer's transaction history and the emails that the payer receives.
final
-
items
→ List<
Item> ? -
An array of items that the customer purchases from the merchant.
final
- payee → Payee?
-
The merchant who receives payment for this transaction.
final
- paymentInstruction → PaymentInstruction?
-
Any additional payment instructions to be consider during payment processing.
This processing instruction is applicable for Capturing an order or
Authorizing an Order.
final
- payments → PaymentCollection?
-
The comprehensive history of payments for the purchase unit.
final
- referenceId → String?
-
The API caller-provided external ID for the purchase unit. Required for
multiple purchase units when you must update the order through PATCH. If
you omit this value and the order contains only one purchase unit, PayPal
sets this value to default.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- shipping → ShippingDetail?
-
The shipping address and method.
final
- softDescriptor → String?
-
The soft descriptor is the dynamic text used to construct the statement
descriptor that appears on a payer's card statement.
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> -
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited