Response
public enum Response : APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible
Undocumented
-
Undocumented
Declaration
Swift
public typealias SuccessType = Status201
-
Created
Declaration
Swift
case status201(Status201)
-
Already exists
Declaration
Swift
case status303
-
Bad request
Declaration
Swift
case status400(PCPayErrors)
-
OAuth token missing or invalid
Declaration
Swift
case status401(PCPayErrors)
-
The specified accept header is invalid
Declaration
Swift
case status406(PCPayErrors)
-
Resource conflicts
Declaration
Swift
case status409(PCPayErrors)
-
The specified content type header is invalid
Declaration
Swift
case status415(PCPayErrors)
-
The request was well-formed but was unable to be followed due to semantic errors. The following codes may be seen:
provider:card-not-usable
: The card is rejected by the payment provider, e.g., credit card expiredprovider:invalid-content
: One or more fields of the payment method is not accepted by the payment provider, e.g., wrong checksum (CVC)invalid-charset
: The fields charset is not latintoo-long
: The fields content is too long Errors also contain codes besides title and message which can be used for checks even if the detailed messages might change.- code
1000
: generic error - code
1001
: payment processing temporarily unavailable - code
1002
: requested amount exceeds the authorized amount of the provided token - code
1003
: implicit payment methods cannot be modified - code
1004
: payment method rejected by provider
Declaration
Swift
case status422(PCPayErrors)
-
Internal server error
Declaration
Swift
case status500(PCPayErrors)
-
Undocumented
Declaration
Swift
public var success: Status201? { get }
-
Undocumented
Declaration
Swift
public var failure: PCPayErrors? { get }
-
either success or failure value. Success is anything in the 200..<300 status code range
Declaration
Swift
public var responseResult: APIResponseResult<Status201, PCPayErrors> { get }
-
Undocumented
Declaration
Swift
public var response: Any { get }
-
Undocumented
Declaration
Swift
public var statusCode: Int { get }
-
Undocumented
Declaration
Swift
public var successful: Bool { get }
-
Undocumented
Declaration
Swift
public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws
-
Declaration
Swift
public var description: String { get }
-
Declaration
Swift
public var debugDescription: String { get }