BTPayPalLineItem
@objcMembers
public class BTPayPalLineItem : NSObject, Encodable
A PayPal line item to be displayed in the PayPal checkout flow.
-
init(quantity:unitAmount: name: kind: unitTaxAmount: itemDescription: url: productCode: imageURL: upcCode: upcType: ) Initialize a PayPayLineItem
Declaration
Swift
public init( quantity: String, unitAmount: String, name: String, kind: BTPayPalLineItemKind, unitTaxAmount: String? = nil, itemDescription: String? = nil, url: URL? = nil, productCode: String? = nil, imageURL: URL? = nil, upcCode: String? = nil, upcType: BTPayPalLineItemUPCType = .none )Parameters
quantityRequired. Number of units of the item purchased. Can include up to 4 decimal places. This value can’t be negative or zero.
unitAmountRequired. Per-unit price of the item. Can include up to 4 decimal places. This value can’t be negative or zero.
nameRequired. Item name. Maximum 127 characters.
kindRequired. Indicates whether the line item is a debit (sale) or credit (refund) to the customer.
unitTaxAmountOptional. Per-unit tax price of the item. Can include up to 2 decimal places. This value can’t be negative or zero.
itemDescriptionOptional. Item description. Maximum 127 characters.
urlOptional. The URL to product information.
productCodeOptional. Product or UPC code for the item. Maximum 127 characters.
imageURLOptional. The URL to product image information.
upcCodeOptional. UPC code for the item.
upcTypeOptional. UPC type for the item. Defaults to
.none.
View on GitHub