PCFPaymentObject

public struct PCFPaymentObject: PaymentObject, Decodable

Represents means to pay for an order.

  • The card type of the payment card.

    Declaration

    Swift

    public let cardType: String
  • The address type used in a PaymentObject.

    Declaration

    Swift

    public typealias AddressType = PCFAddress
  • The last four digits of the card number if coming from order history. The full card number if coming from an user input field.

    Declaration

    Swift

    public let cardNumber: CardNumber
  • The billing address for the payment object.

    Declaration

    Swift

    public let billingAddress: AddressType
  • Initializes a payment object.

    • Parameters:
      • cardType: The card type to use.
      • cardNumber: The card number to use.
      • billingAddress: The billing address to use.

    Declaration

    Swift

    public init(cardType: String, cardNumber: CardNumber, billingAddress: AddressType)

    Parameters

    cardType

    The card type to use.

    cardNumber

    The card number to use.

    billingAddress

    The billing address to use.

  • Initializes a payment object.

    • Parameters:
      • cardType: The card type to use.
      • cardNumber: The card number to use.
      • billingAddress: The billing address to use.

    Declaration

    Swift

    public init?(json: JSON)

    Parameters

    json

    JSON representation of object.

    Return Value

    New instance when JSON parsing successful, false otherwise.