BTPayPalLineItem

@objcMembers
public class BTPayPalLineItem : NSObject, Encodable

A PayPal line item to be displayed in the PayPal checkout flow.

Public Initializer

  • 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

    quantity

    Required. Number of units of the item purchased. Can include up to 4 decimal places. This value can’t be negative or zero.

    unitAmount

    Required. Per-unit price of the item. Can include up to 4 decimal places. This value can’t be negative or zero.

    name

    Required. Item name. Maximum 127 characters.

    kind

    Required. Indicates whether the line item is a debit (sale) or credit (refund) to the customer.

    unitTaxAmount

    Optional. Per-unit tax price of the item. Can include up to 2 decimal places. This value can’t be negative or zero.

    itemDescription

    Optional. Item description. Maximum 127 characters.

    url

    Optional. The URL to product information.

    productCode

    Optional. Product or UPC code for the item. Maximum 127 characters.

    imageURL

    Optional. The URL to product image information.

    upcCode

    Optional. UPC code for the item.

    upcType

    Optional. UPC type for the item. Defaults to .none.