Method

public struct Method : Codable

API method for Tokens.

  • Client application key.

    Declaration

    Swift

    public let oauthToken: String
  • Data for payment.

    Declaration

    Swift

    public let paymentMethodData: PaymentMethodData
  • ThreatMetrix session ID.

    Declaration

    Swift

    public let tmxSessionId: String
  • Payment amount, the nominal value of the order for the buyer.

    Declaration

    Swift

    public let amount: MonetaryAmount?
  • Creates instance of API method for Tokens.

    Declaration

    Swift

    public init(oauthToken: String,
                paymentMethodData: PaymentMethodData,
                tmxSessionId: String,
                amount: MonetaryAmount?)

    Parameters

    oauthToken

    Client application key.

    paymentMethodData

    Data for payment.

    tmxSessionId

    ThreatMetrix session ID.

    amount

    Payment amount, the nominal value of the order for the buyer.

    Return Value

    Instance of API method for Tokens.

  • 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.

  • 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.

  • Decoding errors.

    See more

    Declaration

    Swift

    public enum DecodingErrors : Error
  • 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