Response

public enum Response : APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible

Undocumented

  • This request will return a list of supported payment methods for the current user that they can, in theory, use. That is, ones that are valid and can immediately be used.

    This is as opposed to the regular /payment-methods, which does not categorize payment methods as valid for use.

    You should trigger this when the user is approaching on a gas station with fueling support to get a list of available payment methods.

    If the list is empty, you can ask the user to add a payment method to use PACE fueling.

    See more

    Declaration

    Swift

    public class Status200 : APIModel
  • Undocumented

    Declaration

    Swift

    public typealias SuccessType = Status200
  • All the payment methods that could be used.

    Declaration

    Swift

    case status200(Status200)
  • OAuth token missing or invalid

    Declaration

    Swift

    case status401(PCPayErrors)
  • Resource not found

    Declaration

    Swift

    case status404(PCPayErrors)
  • The specified accept header is invalid

    Declaration

    Swift

    case status406(PCPayErrors)
  • The request was well-formed but was unable to be followed due to semantic errors.

    Declaration

    Swift

    case status422(PCPayErrors)
  • Internal server error

    Declaration

    Swift

    case status500(PCPayErrors)
  • Undocumented

    Declaration

    Swift

    public var success: Status200? { 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<Status200, 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 }