PaymentMethods
public struct PaymentMethods : Decodable
A collection of available payment methods.
See also
API Reference-
The already paid payment methods, in case of partial payments.
Declaration
Swift
public var paid: [PaymentMethod]
-
The regular payment methods.
Declaration
Swift
public let regular: [PaymentMethod]
-
The stored payment methods.
Declaration
Swift
public var stored: [StoredPaymentMethod]
-
Initializes the PaymentMethods.
Declaration
Swift
public init(regular: [PaymentMethod], stored: [StoredPaymentMethod])
Parameters
regular
An array of the regular payment methods.
stored
An array of the stored payment methods.
-
Returns the first available payment method of the given type.
Declaration
Swift
public func paymentMethod<T>(ofType type: T.Type) -> T? where T : PaymentMethod
Parameters
type
The type of payment method to retrieve.
Return Value
The first available payment method of the given type, or
nil
if none could be found.