Breakdown
@objc(PPCPurchaseUnitBreakdown)
@objcMembers
class Breakdown
extension PurchaseUnit.Breakdown : CVarArg, CustomDebugStringConvertible, CustomStringConvertible, Decodable, Encodable, Equatable, Hashable, NSObjectProtocol
The breakdown of the amount. Breakdown provides details such as total item amount, total tax amount, shipping, handling, insurance, and discounts, if any.
-
The discount for all items within a given
PurchaseUnit
. Can not be a negative number.Declaration
Swift
let discount: UnitAmount?
-
The handling fee for all items within a given
PurchaseUnit
. Can not be a negative number.Declaration
Swift
let handling: UnitAmount?
-
Creates a new instance by decoding from the given decoder.
This initializer throws an error if reading from the decoder fails, or if the data read is corrupted or otherwise invalid.
Declaration
Swift
init(from decoder: Decoder) throws
-
Undocumented
Declaration
Swift
init(itemTotal: UnitAmount? = nil, shipping: UnitAmount? = nil, handling: UnitAmount? = nil, taxTotal: UnitAmount? = nil, insurance: UnitAmount? = nil, shippingDiscount: UnitAmount? = nil, discount: UnitAmount? = nil)
-
The insurance fee for all items within a given
PurchaseUnit
. Can not be a negative number.Declaration
Swift
let insurance: UnitAmount?
-
The subtotal for all items. Required if the request includes
purchase_units[].items[].unit_amount
. Must equal the sum of (items[].unit_amount * items[].quantity
) for all items. Can not be a negative number.Declaration
Swift
let itemTotal: UnitAmount?
-
The shipping fee for all items within a given
PurchaseUnit
. Can not be a negative number.Declaration
Swift
let shipping: UnitAmount?
-
The shipping discount for all items within a given
PurchaseUnit
. Can not be a negative number.Declaration
Swift
let shippingDiscount: UnitAmount?
-
The total tax for all items. Required if the request includes
purchase_units.items.tax
. Must equal the sum of (items[].tax * items[].quantity
) for all items. Can not be a negative number.Declaration
Swift
let taxTotal: UnitAmount?