BTPayPalLineItem

@objcMembers
public class BTPayPalLineItem : NSObject

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

Public Properties

  • Number of units of the item purchased. This value must be a whole number and can’t be negative or zero.

    Declaration

    Swift

    public let quantity: String
  • Per-unit price of the item. Can include up to 2 decimal places. This value can’t be negative or zero.

    Declaration

    Swift

    public let unitAmount: String
  • Item name. Maximum 127 characters.

    Declaration

    Swift

    public let name: String
  • Indicates whether the line item is a debit (sale) or credit (refund) to the customer.

    Declaration

    Swift

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

    Declaration

    Swift

    public let unitTaxAmount: String?
  • Optional: Item description. Maximum 127 characters.

    Declaration

    Swift

    public let itemDescription: String?
  • url

    Optional: The URL to product information.

    Declaration

    Swift

    public let url: URL?
  • Optional: Product or UPC code for the item. Maximum 127 characters.

    Declaration

    Swift

    public let productCode: String?
  • Optional: The URL to product image information.

    Declaration

    Swift

    public var imageURL: URL?
  • Optional: UPC code for the item.

    Declaration

    Swift

    public var upcCode: String?
  • Optional: UPC type for the item.

    Declaration

    Swift

    public var upcType: BTPayPalLineItemUPCType

Public Initializer

  • Initialize a PayPayLineItem

    Declaration

    Swift

    @objc(initWithQuantity:unitAmount:name:kind:)
    public init(quantity: String, unitAmount: String, name: String, kind: BTPayPalLineItemKind)

    Parameters

    quantity

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

    unitAmount

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

    name

    Item name. Maximum 127 characters.

    kind

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