Tax
@objc(PPCPurchaseUnitTax)
@objcMembers
class Tax
extension PurchaseUnit.Tax : CVarArg, CustomDebugStringConvertible, CustomStringConvertible, Decodable, Encodable, Equatable, Hashable, NSObjectProtocol
The item tax for each unit. If tax is specified, purchase_units[].amount.breakdown.tax_total
is required.
Must equal tax * quantity
for all items. tax.value
can not be a negative number.
-
The currency code that identifies the currency.
Declaration
Swift
let currencyCode: CurrencyCode
-
Undocumented
Declaration
Swift
init(currencyCode: CurrencyCode, value: String)
-
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
required init(from decoder: Decoder) throws
-
The value, which might be: An integer for currencies like JPY that are not typically fractional. A decimal fraction for currencies like TND that are subdivided into thousandths.
- Maximum length: 32.
- Pattern: ^((-?[0-9]+)|(-?([0-9]+)?[.][0-9]+))$
Declaration
Swift
let value: String