Method
public struct Method
extension PaymentOptions.Method: ApiMethod
extension PaymentOptions.Method: Encodable, Decodable
API method for PaymentOptions
.
-
Client application key.
Declaration
Swift
public let oauthToken: String
-
Authorization token.
Declaration
Swift
public let authorization: String?
-
Gateway ID. The cashier at the division of payment flows within a single account.
Declaration
Swift
public let gatewayId: String?
-
Payment amount, decimal number with a fixed point in the string view.
Declaration
Swift
public let amount: String?
-
ISO-4217 3-alpha character code of payment currency.
Declaration
Swift
public let currency: String?
-
The intention of the merchant to keep payment details, for re-payments.
Declaration
Swift
public let savePaymentMethod: Bool?
-
Creates instance of API method for
PaymentOptions
.Declaration
Swift
public init(oauthToken: String, authorization: String?, gatewayId: String?, amount: String?, currency: String?, savePaymentMethod: Bool?)
Parameters
oauthToken
Client application key.
authorization
Authorization token.
gatewayId
Gateway ID. The cashier at the division of payment flows within a single account.
amount
Payment amount, decimal number with a fixed point in the string view.
currency
ISO-4217 3-alpha character code of payment currency.
savePaymentMethod
The intention of the merchant to keep payment details, for re-payments.
Return Value
Instance of API method for
PaymentOptions
.
-
Declaration
Swift
public typealias Response = PaymentOptions
-
Declaration
Swift
public var hostProviderKey: String { get }
-
Declaration
Swift
public var httpMethod: HTTPMethod { get }
-
Declaration
Swift
public var parametersEncoding: ParametersEncoding { get }
-
Declaration
Swift
public var headers: Headers { get }
-
Declaration
Swift
public func urlInfo(from hostProvider: HostProvider) throws -> URLInfo
-
Encodes this value into the given encoder. If the value fails to encode anything, encoder will encode an empty keyed container in its place. This function throws an error if any values are invalid for the given encoder’s format.
Declaration
Swift
public func encode(to encoder: Encoder) throws
Parameters
encoder
The encoder to write data to.
-
Creates a new instance by decoding from the given decoder. This initializer throws an error if reading from the decoder fails, or if the data read is corrupted or otherwise invalid.
Declaration
Swift
public init(from decoder: Decoder) throws
Parameters
decoder
The decoder to read data from.