Openapi

package
v0.0.0-...-8ebdc79 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 22, 2021 License: MIT Imports: 16 Imported by: 0

Documentation

Overview

Package Openapi provides primitives to interact with the openapi HTTP API.

Code generated by github.com/deepmap/oapi-codegen DO NOT EDIT.

Index

Constants

View Source
const (
	BearerAuthScopes = "BearerAuth.Scopes"
)

Variables

This section is empty.

Functions

func GetSwagger

func GetSwagger() (swagger *openapi3.Swagger, err error)

GetSwagger returns the Swagger specification corresponding to the generated code in this file. The external references of Swagger specification are resolved. The logic of resolving external references is tightly connected to "import-mapping" feature. Externally referenced files must be embedded in the corresponding golang packages. Urls can be supported but this task was out of the scope.

func NewAddBuyerRequest

func NewAddBuyerRequest(server string, body AddBuyerJSONRequestBody) (*http.Request, error)

NewAddBuyerRequest calls the generic AddBuyer builder with application/json body

func NewAddBuyerRequestWithBody

func NewAddBuyerRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)

NewAddBuyerRequestWithBody generates requests for AddBuyer with any type of body

func NewAddCardRuleRequest

func NewAddCardRuleRequest(server string, body AddCardRuleJSONRequestBody) (*http.Request, error)

NewAddCardRuleRequest calls the generic AddCardRule builder with application/json body

func NewAddCardRuleRequestWithBody

func NewAddCardRuleRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)

NewAddCardRuleRequestWithBody generates requests for AddCardRule with any type of body

func NewAddPaymentServiceRequest

func NewAddPaymentServiceRequest(server string, body AddPaymentServiceJSONRequestBody) (*http.Request, error)

NewAddPaymentServiceRequest calls the generic AddPaymentService builder with application/json body

func NewAddPaymentServiceRequestWithBody

func NewAddPaymentServiceRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)

NewAddPaymentServiceRequestWithBody generates requests for AddPaymentService with any type of body

func NewApproveTransactionRequest

func NewApproveTransactionRequest(server string, transactionId string) (*http.Request, error)

NewApproveTransactionRequest generates requests for ApproveTransaction

func NewAsyncAuthorizeTransactionRequest

func NewAsyncAuthorizeTransactionRequest(server string, transactionId string) (*http.Request, error)

NewAsyncAuthorizeTransactionRequest generates requests for AsyncAuthorizeTransaction

func NewAsyncBatchCaptureTransactionsRequest

func NewAsyncBatchCaptureTransactionsRequest(server string, body AsyncBatchCaptureTransactionsJSONRequestBody) (*http.Request, error)

NewAsyncBatchCaptureTransactionsRequest calls the generic AsyncBatchCaptureTransactions builder with application/json body

func NewAsyncBatchCaptureTransactionsRequestWithBody

func NewAsyncBatchCaptureTransactionsRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)

NewAsyncBatchCaptureTransactionsRequestWithBody generates requests for AsyncBatchCaptureTransactions with any type of body

func NewAsyncCaptureTransactionRequest

func NewAsyncCaptureTransactionRequest(server string, transactionId string, body AsyncCaptureTransactionJSONRequestBody) (*http.Request, error)

NewAsyncCaptureTransactionRequest calls the generic AsyncCaptureTransaction builder with application/json body

func NewAsyncCaptureTransactionRequestWithBody

func NewAsyncCaptureTransactionRequestWithBody(server string, transactionId string, contentType string, body io.Reader) (*http.Request, error)

NewAsyncCaptureTransactionRequestWithBody generates requests for AsyncCaptureTransaction with any type of body

func NewAsyncCreateTransactionRequest

func NewAsyncCreateTransactionRequest(server string, body AsyncCreateTransactionJSONRequestBody) (*http.Request, error)

NewAsyncCreateTransactionRequest calls the generic AsyncCreateTransaction builder with application/json body

func NewAsyncCreateTransactionRequestWithBody

func NewAsyncCreateTransactionRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)

NewAsyncCreateTransactionRequestWithBody generates requests for AsyncCreateTransaction with any type of body

func NewAsyncStorePaymentMethodRequest

func NewAsyncStorePaymentMethodRequest(server string, body AsyncStorePaymentMethodJSONRequestBody) (*http.Request, error)

NewAsyncStorePaymentMethodRequest calls the generic AsyncStorePaymentMethod builder with application/json body

func NewAsyncStorePaymentMethodRequestWithBody

func NewAsyncStorePaymentMethodRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)

NewAsyncStorePaymentMethodRequestWithBody generates requests for AsyncStorePaymentMethod with any type of body

func NewAuthorizeNewTransactionRequest

func NewAuthorizeNewTransactionRequest(server string, body AuthorizeNewTransactionJSONRequestBody) (*http.Request, error)

NewAuthorizeNewTransactionRequest calls the generic AuthorizeNewTransaction builder with application/json body

func NewAuthorizeNewTransactionRequestWithBody

func NewAuthorizeNewTransactionRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)

NewAuthorizeNewTransactionRequestWithBody generates requests for AuthorizeNewTransaction with any type of body

func NewAuthorizeTransactionRequest

func NewAuthorizeTransactionRequest(server string, transactionId string) (*http.Request, error)

NewAuthorizeTransactionRequest generates requests for AuthorizeTransaction

func NewCaptureTransactionRequest

func NewCaptureTransactionRequest(server string, transactionId string, body CaptureTransactionJSONRequestBody) (*http.Request, error)

NewCaptureTransactionRequest calls the generic CaptureTransaction builder with application/json body

func NewCaptureTransactionRequestWithBody

func NewCaptureTransactionRequestWithBody(server string, transactionId string, contentType string, body io.Reader) (*http.Request, error)

NewCaptureTransactionRequestWithBody generates requests for CaptureTransaction with any type of body

func NewCreateApiKeyPairRequest

func NewCreateApiKeyPairRequest(server string) (*http.Request, error)

NewCreateApiKeyPairRequest generates requests for CreateApiKeyPair

func NewDeleteApiKeyPairRequest

func NewDeleteApiKeyPairRequest(server string, apiKeyPairId string) (*http.Request, error)

NewDeleteApiKeyPairRequest generates requests for DeleteApiKeyPair

func NewDeleteBuyerRequest

func NewDeleteBuyerRequest(server string, buyerId string) (*http.Request, error)

NewDeleteBuyerRequest generates requests for DeleteBuyer

func NewDeleteCardRuleRequest

func NewDeleteCardRuleRequest(server string, cardRuleId string) (*http.Request, error)

NewDeleteCardRuleRequest generates requests for DeleteCardRule

func NewDeletePaymentMethodRequest

func NewDeletePaymentMethodRequest(server string, paymentMethodId string) (*http.Request, error)

NewDeletePaymentMethodRequest generates requests for DeletePaymentMethod

func NewDeletePaymentServiceRequest

func NewDeletePaymentServiceRequest(server string, paymentServiceId string) (*http.Request, error)

NewDeletePaymentServiceRequest generates requests for DeletePaymentService

func NewGetBuyerRequest

func NewGetBuyerRequest(server string, buyerId string) (*http.Request, error)

NewGetBuyerRequest generates requests for GetBuyer

func NewGetCardRuleRequest

func NewGetCardRuleRequest(server string, cardRuleId string) (*http.Request, error)

NewGetCardRuleRequest generates requests for GetCardRule

func NewGetCurrentMerchantRequest

func NewGetCurrentMerchantRequest(server string) (*http.Request, error)

NewGetCurrentMerchantRequest generates requests for GetCurrentMerchant

func NewGetCurrentUserRequest

func NewGetCurrentUserRequest(server string) (*http.Request, error)

NewGetCurrentUserRequest generates requests for GetCurrentUser

func NewGetPaymentMethodRequest

func NewGetPaymentMethodRequest(server string, paymentMethodId string) (*http.Request, error)

NewGetPaymentMethodRequest generates requests for GetPaymentMethod

func NewGetPaymentServiceDefinitionRequest

func NewGetPaymentServiceDefinitionRequest(server string, paymentServiceDefinitionId string) (*http.Request, error)

NewGetPaymentServiceDefinitionRequest generates requests for GetPaymentServiceDefinition

func NewGetPaymentServiceRequest

func NewGetPaymentServiceRequest(server string, paymentServiceId string) (*http.Request, error)

NewGetPaymentServiceRequest generates requests for GetPaymentService

func NewGetTransactionRequest

func NewGetTransactionRequest(server string, transactionId string) (*http.Request, error)

NewGetTransactionRequest generates requests for GetTransaction

func NewListApiKeyPairsRequest

func NewListApiKeyPairsRequest(server string, params *ListApiKeyPairsParams) (*http.Request, error)

NewListApiKeyPairsRequest generates requests for ListApiKeyPairs

func NewListBuyerPaymentMethodsRequest

func NewListBuyerPaymentMethodsRequest(server string, params *ListBuyerPaymentMethodsParams) (*http.Request, error)

NewListBuyerPaymentMethodsRequest generates requests for ListBuyerPaymentMethods

func NewListBuyersRequest

func NewListBuyersRequest(server string, params *ListBuyersParams) (*http.Request, error)

NewListBuyersRequest generates requests for ListBuyers

func NewListCardsRulesRequest

func NewListCardsRulesRequest(server string, params *ListCardsRulesParams) (*http.Request, error)

NewListCardsRulesRequest generates requests for ListCardsRules

func NewListPaymentMethodsRequest

func NewListPaymentMethodsRequest(server string, params *ListPaymentMethodsParams) (*http.Request, error)

NewListPaymentMethodsRequest generates requests for ListPaymentMethods

func NewListPaymentOptionsRequest

func NewListPaymentOptionsRequest(server string, params *ListPaymentOptionsParams) (*http.Request, error)

NewListPaymentOptionsRequest generates requests for ListPaymentOptions

func NewListPaymentServiceDefinitionsRequest

func NewListPaymentServiceDefinitionsRequest(server string, params *ListPaymentServiceDefinitionsParams) (*http.Request, error)

NewListPaymentServiceDefinitionsRequest generates requests for ListPaymentServiceDefinitions

func NewListPaymentServicesRequest

func NewListPaymentServicesRequest(server string, params *ListPaymentServicesParams) (*http.Request, error)

NewListPaymentServicesRequest generates requests for ListPaymentServices

func NewListTransactionsRequest

func NewListTransactionsRequest(server string, params *ListTransactionsParams) (*http.Request, error)

NewListTransactionsRequest generates requests for ListTransactions

func NewLoginRequest

func NewLoginRequest(server string, body LoginJSONRequestBody) (*http.Request, error)

NewLoginRequest calls the generic Login builder with application/json body

func NewLoginRequestWithBody

func NewLoginRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)

NewLoginRequestWithBody generates requests for Login with any type of body

func NewLogoutRequest

func NewLogoutRequest(server string) (*http.Request, error)

NewLogoutRequest generates requests for Logout

func NewRedirectTransactionApprovalRequest

func NewRedirectTransactionApprovalRequest(server string, transactionApprovalToken string) (*http.Request, error)

NewRedirectTransactionApprovalRequest generates requests for RedirectTransactionApproval

func NewRefreshSessionRequest

func NewRefreshSessionRequest(server string) (*http.Request, error)

NewRefreshSessionRequest generates requests for RefreshSession

func NewRefundTransactionRequest

func NewRefundTransactionRequest(server string, transactionId string) (*http.Request, error)

NewRefundTransactionRequest generates requests for RefundTransaction

func NewStorePaymentMethodRequest

func NewStorePaymentMethodRequest(server string, body StorePaymentMethodJSONRequestBody) (*http.Request, error)

NewStorePaymentMethodRequest calls the generic StorePaymentMethod builder with application/json body

func NewStorePaymentMethodRequestWithBody

func NewStorePaymentMethodRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)

NewStorePaymentMethodRequestWithBody generates requests for StorePaymentMethod with any type of body

func NewUpdateBuyerRequest

func NewUpdateBuyerRequest(server string, buyerId string, body UpdateBuyerJSONRequestBody) (*http.Request, error)

NewUpdateBuyerRequest calls the generic UpdateBuyer builder with application/json body

func NewUpdateBuyerRequestWithBody

func NewUpdateBuyerRequestWithBody(server string, buyerId string, contentType string, body io.Reader) (*http.Request, error)

NewUpdateBuyerRequestWithBody generates requests for UpdateBuyer with any type of body

func NewUpdateCardRuleRequest

func NewUpdateCardRuleRequest(server string, cardRuleId string, body UpdateCardRuleJSONRequestBody) (*http.Request, error)

NewUpdateCardRuleRequest calls the generic UpdateCardRule builder with application/json body

func NewUpdateCardRuleRequestWithBody

func NewUpdateCardRuleRequestWithBody(server string, cardRuleId string, contentType string, body io.Reader) (*http.Request, error)

NewUpdateCardRuleRequestWithBody generates requests for UpdateCardRule with any type of body

func NewUpdatePaymentServiceRequest

func NewUpdatePaymentServiceRequest(server string, paymentServiceId string, body UpdatePaymentServiceJSONRequestBody) (*http.Request, error)

NewUpdatePaymentServiceRequest calls the generic UpdatePaymentService builder with application/json body

func NewUpdatePaymentServiceRequestWithBody

func NewUpdatePaymentServiceRequestWithBody(server string, paymentServiceId string, contentType string, body io.Reader) (*http.Request, error)

NewUpdatePaymentServiceRequestWithBody generates requests for UpdatePaymentService with any type of body

func PathToRawSpec

func PathToRawSpec(pathToFile string) map[string]func() ([]byte, error)

Constructs a synthetic filesystem for resolving external references when loading openapi specifications.

func RegisterHandlers

func RegisterHandlers(router EchoRouter, si ServerInterface)

RegisterHandlers adds each server route to the EchoRouter.

func RegisterHandlersWithBaseURL

func RegisterHandlersWithBaseURL(router EchoRouter, si ServerInterface, baseURL string)

Registers handlers, and prepends BaseURL to the paths, so that the paths can be served under a prefix.

Types

type APIKeyPair

type APIKeyPair struct {

	// The date and time when this key pair was created.
	CreatedAt *time.Time `json:"created_at,omitempty"`

	// A unique ID for this key-pair. This ID is the thumbprint of the key.
	Id *string `json:"id,omitempty"`

	// The private key for the key-pair. This is only returned after
	// the key is initially requested. For subsequent API calls this value is
	// `null`.
	PrivateKey *string `json:"private_key"`

	// `api-key-pair`.
	Type *APIKeyPairType `json:"type,omitempty"`

	// The date and time when this key pair was last updated.
	UpdatedAt *time.Time `json:"updated_at,omitempty"`
}

Details about an API key pair.

type APIKeyPairType

type APIKeyPairType string

`api-key-pair`.

const (
	APIKeyPairTypeApiKeyPair APIKeyPairType = "api-key-pair"
)

Defines values for APIKeyPairType.

type APIKeyPairs

type APIKeyPairs struct {
	Items *[]APIKeyPair `json:"items,omitempty"`

	// The limit applied to request. This represents the number of items that are at
	// maximum returned by this request.
	Limit *int32 `json:"limit,omitempty"`

	// The cursor that represents the next page of results. Use the `cursor` query
	// parameter to fetch this page of items.
	NextCursor *string `json:"next_cursor"`

	// The cursor that represents the next page of results. Use the `cursor` query
	// parameter to fetch this page of items.
	PreviousCursor *string `json:"previous_cursor"`
}

A list of the currently active API key pairs.

type AddBuyerJSONBody

type AddBuyerJSONBody BuyerRequest

AddBuyerJSONBody defines parameters for AddBuyer.

type AddBuyerJSONRequestBody

type AddBuyerJSONRequestBody AddBuyerJSONBody

AddBuyerJSONRequestBody defines body for AddBuyer for application/json ContentType.

type AddBuyerResponse

type AddBuyerResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON201      *Buyer
	JSON400      *interface{}
	JSON401      *Error401Unauthorized
	JSON409      *Error409DuplicateRecord
}

func ParseAddBuyerResponse

func ParseAddBuyerResponse(rsp *http.Response) (*AddBuyerResponse, error)

ParseAddBuyerResponse parses an HTTP response from a AddBuyerWithResponse call

func (AddBuyerResponse) Status

func (r AddBuyerResponse) Status() string

Status returns HTTPResponse.Status

func (AddBuyerResponse) StatusCode

func (r AddBuyerResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type AddCardRuleJSONBody

type AddCardRuleJSONBody CardRuleRequest

AddCardRuleJSONBody defines parameters for AddCardRule.

type AddCardRuleJSONRequestBody

type AddCardRuleJSONRequestBody AddCardRuleJSONBody

AddCardRuleJSONRequestBody defines body for AddCardRule for application/json ContentType.

type AddCardRuleResponse

type AddCardRuleResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON201      *CardRule
	JSON400      *interface{}
	JSON401      *Error401Unauthorized
}

func ParseAddCardRuleResponse

func ParseAddCardRuleResponse(rsp *http.Response) (*AddCardRuleResponse, error)

ParseAddCardRuleResponse parses an HTTP response from a AddCardRuleWithResponse call

func (AddCardRuleResponse) Status

func (r AddCardRuleResponse) Status() string

Status returns HTTPResponse.Status

func (AddCardRuleResponse) StatusCode

func (r AddCardRuleResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type AddPaymentServiceJSONBody

type AddPaymentServiceJSONBody PaymentServiceRequest

AddPaymentServiceJSONBody defines parameters for AddPaymentService.

type AddPaymentServiceJSONRequestBody

type AddPaymentServiceJSONRequestBody AddPaymentServiceJSONBody

AddPaymentServiceJSONRequestBody defines body for AddPaymentService for application/json ContentType.

type AddPaymentServiceResponse

type AddPaymentServiceResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON201      *PaymentService
	JSON400      *interface{}
	JSON401      *Error401Unauthorized
}

func ParseAddPaymentServiceResponse

func ParseAddPaymentServiceResponse(rsp *http.Response) (*AddPaymentServiceResponse, error)

ParseAddPaymentServiceResponse parses an HTTP response from a AddPaymentServiceWithResponse call

func (AddPaymentServiceResponse) Status

func (r AddPaymentServiceResponse) Status() string

Status returns HTTPResponse.Status

func (AddPaymentServiceResponse) StatusCode

func (r AddPaymentServiceResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type ApproveTransactionResponse

type ApproveTransactionResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON404      *Error404NotFound
}

func ParseApproveTransactionResponse

func ParseApproveTransactionResponse(rsp *http.Response) (*ApproveTransactionResponse, error)

ParseApproveTransactionResponse parses an HTTP response from a ApproveTransactionWithResponse call

func (ApproveTransactionResponse) Status

Status returns HTTPResponse.Status

func (ApproveTransactionResponse) StatusCode

func (r ApproveTransactionResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type AsyncAuthorizeTransactionResponse

type AsyncAuthorizeTransactionResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON202      *Status
	JSON400      *Error400IncorrectJson
	JSON401      *Error401Unauthorized
}

func ParseAsyncAuthorizeTransactionResponse

func ParseAsyncAuthorizeTransactionResponse(rsp *http.Response) (*AsyncAuthorizeTransactionResponse, error)

ParseAsyncAuthorizeTransactionResponse parses an HTTP response from a AsyncAuthorizeTransactionWithResponse call

func (AsyncAuthorizeTransactionResponse) Status

Status returns HTTPResponse.Status

func (AsyncAuthorizeTransactionResponse) StatusCode

func (r AsyncAuthorizeTransactionResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type AsyncBatchCaptureTransactionsJSONBody

type AsyncBatchCaptureTransactionsJSONBody struct {
	Items *[]TransactionsBatchCaptureRequest `json:"items,omitempty"`
}

AsyncBatchCaptureTransactionsJSONBody defines parameters for AsyncBatchCaptureTransactions.

type AsyncBatchCaptureTransactionsJSONRequestBody

type AsyncBatchCaptureTransactionsJSONRequestBody AsyncBatchCaptureTransactionsJSONBody

AsyncBatchCaptureTransactionsJSONRequestBody defines body for AsyncBatchCaptureTransactions for application/json ContentType.

type AsyncBatchCaptureTransactionsResponse

type AsyncBatchCaptureTransactionsResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON202      *Statuses
	JSON400      *Error400IncorrectJson
	JSON401      *Error401Unauthorized
}

func ParseAsyncBatchCaptureTransactionsResponse

func ParseAsyncBatchCaptureTransactionsResponse(rsp *http.Response) (*AsyncBatchCaptureTransactionsResponse, error)

ParseAsyncBatchCaptureTransactionsResponse parses an HTTP response from a AsyncBatchCaptureTransactionsWithResponse call

func (AsyncBatchCaptureTransactionsResponse) Status

Status returns HTTPResponse.Status

func (AsyncBatchCaptureTransactionsResponse) StatusCode

StatusCode returns HTTPResponse.StatusCode

type AsyncCaptureTransactionJSONBody

type AsyncCaptureTransactionJSONBody TransactionCaptureRequest

AsyncCaptureTransactionJSONBody defines parameters for AsyncCaptureTransaction.

type AsyncCaptureTransactionJSONRequestBody

type AsyncCaptureTransactionJSONRequestBody AsyncCaptureTransactionJSONBody

AsyncCaptureTransactionJSONRequestBody defines body for AsyncCaptureTransaction for application/json ContentType.

type AsyncCaptureTransactionResponse

type AsyncCaptureTransactionResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON202      *Status
	JSON400      *Error400IncorrectJson
	JSON401      *Error401Unauthorized
}

func ParseAsyncCaptureTransactionResponse

func ParseAsyncCaptureTransactionResponse(rsp *http.Response) (*AsyncCaptureTransactionResponse, error)

ParseAsyncCaptureTransactionResponse parses an HTTP response from a AsyncCaptureTransactionWithResponse call

func (AsyncCaptureTransactionResponse) Status

Status returns HTTPResponse.Status

func (AsyncCaptureTransactionResponse) StatusCode

func (r AsyncCaptureTransactionResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type AsyncCreateTransactionJSONBody

type AsyncCreateTransactionJSONBody TransactionRequest

AsyncCreateTransactionJSONBody defines parameters for AsyncCreateTransaction.

type AsyncCreateTransactionJSONRequestBody

type AsyncCreateTransactionJSONRequestBody AsyncCreateTransactionJSONBody

AsyncCreateTransactionJSONRequestBody defines body for AsyncCreateTransaction for application/json ContentType.

type AsyncCreateTransactionResponse

type AsyncCreateTransactionResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON202      *Status
	JSON400      *Error400IncorrectJson
	JSON401      *Error401Unauthorized
}

func ParseAsyncCreateTransactionResponse

func ParseAsyncCreateTransactionResponse(rsp *http.Response) (*AsyncCreateTransactionResponse, error)

ParseAsyncCreateTransactionResponse parses an HTTP response from a AsyncCreateTransactionWithResponse call

func (AsyncCreateTransactionResponse) Status

Status returns HTTPResponse.Status

func (AsyncCreateTransactionResponse) StatusCode

func (r AsyncCreateTransactionResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type AsyncStorePaymentMethodJSONBody

type AsyncStorePaymentMethodJSONBody CardRequest

AsyncStorePaymentMethodJSONBody defines parameters for AsyncStorePaymentMethod.

type AsyncStorePaymentMethodJSONRequestBody

type AsyncStorePaymentMethodJSONRequestBody AsyncStorePaymentMethodJSONBody

AsyncStorePaymentMethodJSONRequestBody defines body for AsyncStorePaymentMethod for application/json ContentType.

type AsyncStorePaymentMethodResponse

type AsyncStorePaymentMethodResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON202      *Status
	JSON400      *interface{}
	JSON401      *Error401Unauthorized
}

func ParseAsyncStorePaymentMethodResponse

func ParseAsyncStorePaymentMethodResponse(rsp *http.Response) (*AsyncStorePaymentMethodResponse, error)

ParseAsyncStorePaymentMethodResponse parses an HTTP response from a AsyncStorePaymentMethodWithResponse call

func (AsyncStorePaymentMethodResponse) Status

Status returns HTTPResponse.Status

func (AsyncStorePaymentMethodResponse) StatusCode

func (r AsyncStorePaymentMethodResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type AuthorizeNewTransactionJSONBody

type AuthorizeNewTransactionJSONBody TransactionRequest

AuthorizeNewTransactionJSONBody defines parameters for AuthorizeNewTransaction.

type AuthorizeNewTransactionJSONRequestBody

type AuthorizeNewTransactionJSONRequestBody AuthorizeNewTransactionJSONBody

AuthorizeNewTransactionJSONRequestBody defines body for AuthorizeNewTransaction for application/json ContentType.

type AuthorizeNewTransactionResponse

type AuthorizeNewTransactionResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON201      *Transaction
	JSON400      *interface{}
	JSON401      *Error401Unauthorized
}

func ParseAuthorizeNewTransactionResponse

func ParseAuthorizeNewTransactionResponse(rsp *http.Response) (*AuthorizeNewTransactionResponse, error)

ParseAuthorizeNewTransactionResponse parses an HTTP response from a AuthorizeNewTransactionWithResponse call

func (AuthorizeNewTransactionResponse) Status

Status returns HTTPResponse.Status

func (AuthorizeNewTransactionResponse) StatusCode

func (r AuthorizeNewTransactionResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type AuthorizeTransactionResponse

type AuthorizeTransactionResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *Transaction
	JSON400      *interface{}
	JSON401      *Error401Unauthorized
	JSON404      *interface{}
}

func ParseAuthorizeTransactionResponse

func ParseAuthorizeTransactionResponse(rsp *http.Response) (*AuthorizeTransactionResponse, error)

ParseAuthorizeTransactionResponse parses an HTTP response from a AuthorizeTransactionWithResponse call

func (AuthorizeTransactionResponse) Status

Status returns HTTPResponse.Status

func (AuthorizeTransactionResponse) StatusCode

func (r AuthorizeTransactionResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type Buyer

type Buyer struct {

	// The date and time
	// when this buyer was created in our system.
	CreatedAt *time.Time `json:"created_at,omitempty"`

	// A unique name for this buyer which is used in the Gr4vy admin panel to give a buyer a human readable name.
	DisplayName *string `json:"display_name"`

	// An external identifier that can be used to match the buyer against your own records.
	ExternalIdentifier *string `json:"external_identifier"`

	// The unique Gr4vy ID for this buyer.
	Id *string `json:"id,omitempty"`

	// The type of this resource. Is always `buyer`.
	Type *BuyerType `json:"type,omitempty"`

	// The date and time
	// when this buyer was last updated in our system.
	UpdatedAt *time.Time `json:"updated_at,omitempty"`
}

Buyer defines model for Buyer.

type BuyerRequest

type BuyerRequest struct {

	// A unique name for this buyer which is used in the Gr4vy admin panel to give a buyer a human readable name.
	DisplayName *string `json:"display_name"`

	// An external identifier that can be used to match the buyer against your own records. This value needs to be unique for all buyers.
	ExternalIdentifier *string `json:"external_identifier"`
}

A request to create a buyer.

type BuyerType

type BuyerType string

The type of this resource. Is always `buyer`.

const (
	BuyerTypeBuyer BuyerType = "buyer"
)

Defines values for BuyerType.

type BuyerUpdate

type BuyerUpdate struct {
	// Embedded struct due to allOf(#/components/schemas/BuyerRequest)
	BuyerRequest `yaml:",inline"`
}

BuyerUpdate defines model for BuyerUpdate.

type Buyers

type Buyers struct {

	// A list of buyers.
	Items *[]Buyer `json:"items,omitempty"`

	// The limit applied to request. This represents the number of items that are at
	// maximum returned by this request.
	Limit *int32 `json:"limit,omitempty"`

	// The cursor that represents the next page of results. Use the `cursor` query
	// parameter to fetch this page of items.
	NextCursor *string `json:"next_cursor"`

	// The cursor that represents the next page of results. Use the `cursor` query
	// parameter to fetch this page of items.
	PreviousCursor *string `json:"previous_cursor"`
}

A list of buyers.

type CaptureTransactionJSONBody

type CaptureTransactionJSONBody TransactionCaptureRequest

CaptureTransactionJSONBody defines parameters for CaptureTransaction.

type CaptureTransactionJSONRequestBody

type CaptureTransactionJSONRequestBody CaptureTransactionJSONBody

CaptureTransactionJSONRequestBody defines body for CaptureTransaction for application/json ContentType.

type CaptureTransactionResponse

type CaptureTransactionResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *Transaction
	JSON400      *interface{}
	JSON401      *Error401Unauthorized
	JSON404      *interface{}
}

func ParseCaptureTransactionResponse

func ParseCaptureTransactionResponse(rsp *http.Response) (*CaptureTransactionResponse, error)

ParseCaptureTransactionResponse parses an HTTP response from a CaptureTransactionWithResponse call

func (CaptureTransactionResponse) Status

Status returns HTTPResponse.Status

func (CaptureTransactionResponse) StatusCode

func (r CaptureTransactionResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type Card

type Card struct {

	// The optional buyer for which this payment method has been stored.
	Buyer *struct {
		// Embedded struct due to allOf(#/components/schemas/Buyer)
		Buyer `yaml:",inline"`
	} `json:"buyer"`

	// The date and time when this payment method was first created in our
	// system.
	CreatedAt *time.Time `json:"created_at,omitempty"`

	// Additional details about a stored card.
	Details *CardDetails `json:"details,omitempty"`

	// The environment this payment method has been stored for. This will be null
	// of the payment method was not stored.
	Environment *CardEnvironment `json:"environment"`

	// An external identifier that can be used to match the payment method
	// against your own records.
	ExternalIdentifier *string `json:"external_identifier"`

	// The unique ID of the payment method.
	Id *string `json:"id,omitempty"`

	// `card`.
	Method *CardMethod `json:"method,omitempty"`

	// The state of the card tokenization.
	Status *CardStatus `json:"status,omitempty"`

	// `payment-method`.
	Type *CardType `json:"type,omitempty"`

	// The date and time when this payment method was last updated in our system.
	UpdatedAt *time.Time `json:"updated_at,omitempty"`
}

A stored card.

type CardDetails

type CardDetails struct {

	// The expiration date for a card.
	ExpirationDate *string `json:"expiration_date,omitempty"`

	// The type of the card.
	Scheme *CardDetailsScheme `json:"scheme,omitempty"`

	// The last 4 digits of the card number.
	Suffix *string `json:"suffix,omitempty"`
}

Additional details about a stored card.

type CardDetailsScheme

type CardDetailsScheme string

The type of the card.

const (
	CardDetailsSchemeAmericanExpress CardDetailsScheme = "american-express"

	CardDetailsSchemeDinersClub CardDetailsScheme = "diners-club"

	CardDetailsSchemeDiscover CardDetailsScheme = "discover"

	CardDetailsSchemeElo CardDetailsScheme = "elo"

	CardDetailsSchemeHiper CardDetailsScheme = "hiper"

	CardDetailsSchemeHipercard CardDetailsScheme = "hipercard"

	CardDetailsSchemeJcb CardDetailsScheme = "jcb"

	CardDetailsSchemeMaestro CardDetailsScheme = "maestro"

	CardDetailsSchemeMastercard CardDetailsScheme = "mastercard"

	CardDetailsSchemeMir CardDetailsScheme = "mir"

	CardDetailsSchemeUnionpay CardDetailsScheme = "unionpay"

	CardDetailsSchemeVisa CardDetailsScheme = "visa"
)

Defines values for CardDetailsScheme.

type CardEnvironment

type CardEnvironment string

The environment this payment method has been stored for. This will be null of the payment method was not stored.

const (
	CardEnvironmentDevelopment CardEnvironment = "development"

	CardEnvironmentProduction CardEnvironment = "production"

	CardEnvironmentStaging CardEnvironment = "staging"
)

Defines values for CardEnvironment.

type CardMethod

type CardMethod string

`card`.

const (
	CardMethodCard CardMethod = "card"
)

Defines values for CardMethod.

type CardRequest

type CardRequest struct {

	// The `external_identifier` of the buyer to associate this payment method
	// to. If this field is provided then the `buyer_id` field
	// needs to be unset.
	BuyerExternalIdentifier *string `json:"buyer_external_identifier,omitempty"`

	// The ID of the buyer to associate this payment method to. If this field is
	// provided then the `buyer_external_identifier` field needs to be unset.
	BuyerId *string `json:"buyer_id,omitempty"`

	// Defines the environment to store this card for. Setting this to
	// anything other than `production` will force Gr4vy to use the payment
	// services configured for that environment.
	Environment *CardRequestEnvironment `json:"environment,omitempty"`

	// The expiration date of the card, formatted `MM/YY`.
	ExpirationDate string `json:"expiration_date"`

	// An external identifier that can be used to match the card against your own records.
	ExternalIdentifier *string `json:"external_identifier"`

	// `card`.
	Method CardRequestMethod `json:"method"`

	// The 15-16 digit number for this card as it can be found on the
	// front of the card.
	Number string `json:"number"`

	// The 3 or 4 digit security code often found on the card. This often
	// referred to as the CVV or CVD.
	SecurityCode string `json:"security_code"`
}

Card details to use in a transaction or to register a new payment method.

type CardRequestEnvironment

type CardRequestEnvironment string

Defines the environment to store this card for. Setting this to anything other than `production` will force Gr4vy to use the payment services configured for that environment.

const (
	CardRequestEnvironmentDevelopment CardRequestEnvironment = "development"

	CardRequestEnvironmentProduction CardRequestEnvironment = "production"

	CardRequestEnvironmentStaging CardRequestEnvironment = "staging"
)

Defines values for CardRequestEnvironment.

type CardRequestMethod

type CardRequestMethod string

`card`.

const (
	CardRequestMethodCard CardRequestMethod = "card"
)

Defines values for CardRequestMethod.

type CardRule

type CardRule struct {

	// Whether this rule is currently in use. Rules can be deactivated to allow
	// for them to be kept around and re-activated at a later date.
	Active *bool `json:"active,omitempty"`

	// One or more conditions that apply for this rule. Each condition
	// needs to match for this rule to go into effect.
	Conditions *[]interface{} `json:"conditions,omitempty"`

	// The date and time when this rule was created.
	CreatedAt *time.Time `json:"created_at,omitempty"`

	// The environment to use this rule in. This rule will only be used
	// for transactions created in that environment.
	Environment *CardRuleEnvironment `json:"environment,omitempty"`

	// The ID of the rule.
	Id *string `json:"id,omitempty"`

	// Defines what strategy to use when this rule is not valid. This can happen
	// when the rule has triggered for a certain transaction but none of the
	// listed payment services are eligible to process that transaction currency.
	//
	// * `use_all_providers` - Try all payment services enabled for this currency in
	// order of priority, even if they are not listed in this rule. This is the
	// default behaviour for a rule.
	// * `skip` - Skip this rule and instead move on to the next highest priority
	// rule.
	// * `decline` - Decline the transaction.
	InvalidRuleFallbackStrategy *CardRuleInvalidRuleFallbackStrategy `json:"invalid_rule_fallback_strategy,omitempty"`

	// A list of IDs for the payment services to use, in order of priority.
	// The payment services all need to process cards.
	PaymentServiceIds *[]string `json:"payment_service_ids,omitempty"`

	// The numeric rank of a rule. Rules with a lower position value
	// are processed first.
	Position *float32 `json:"position,omitempty"`

	// `card-rule`.
	Type *CardRuleType `json:"type,omitempty"`

	// Defines what strategy to use when all of the payment services defined in
	// this rule declined or otherwise were not able to process the card.
	//
	// * `use_all_providers` - Try all payment services enabled for this currency in
	// order of priority, even if they are not listed in this rule. This is the
	// default behaviour for a rule.
	// * `decline` - Decline the transaction.
	UnprocessableFallbackStrategy *CardRuleUnprocessableFallbackStrategy `json:"unprocessable_fallback_strategy,omitempty"`

	// The date and time when this rule was last updated.
	UpdatedAt *time.Time `json:"updated_at,omitempty"`
}

A card rule that defines a custom payment provider to use for a card transaction. Multiple rules can exists at any time and they are processed by priority.

type CardRuleEnvironment

type CardRuleEnvironment string

The environment to use this rule in. This rule will only be used for transactions created in that environment.

const (
	CardRuleEnvironmentDevelopment CardRuleEnvironment = "development"

	CardRuleEnvironmentProduction CardRuleEnvironment = "production"

	CardRuleEnvironmentStaging CardRuleEnvironment = "staging"
)

Defines values for CardRuleEnvironment.

type CardRuleInvalidRuleFallbackStrategy

type CardRuleInvalidRuleFallbackStrategy string

Defines what strategy to use when this rule is not valid. This can happen when the rule has triggered for a certain transaction but none of the listed payment services are eligible to process that transaction currency.

* `use_all_providers` - Try all payment services enabled for this currency in order of priority, even if they are not listed in this rule. This is the default behaviour for a rule. * `skip` - Skip this rule and instead move on to the next highest priority rule. * `decline` - Decline the transaction.

const (
	CardRuleInvalidRuleFallbackStrategyDecline CardRuleInvalidRuleFallbackStrategy = "decline"

	CardRuleInvalidRuleFallbackStrategySkip CardRuleInvalidRuleFallbackStrategy = "skip"

	CardRuleInvalidRuleFallbackStrategyUseAllProviders CardRuleInvalidRuleFallbackStrategy = "use_all_providers"
)

Defines values for CardRuleInvalidRuleFallbackStrategy.

type CardRuleNumberCondition

type CardRuleNumberCondition struct {

	// The transaction field to filter by.
	Key CardRuleNumberConditionKey `json:"key"`

	// `number`.
	Match CardRuleNumberConditionMatch `json:"match"`

	// The comparison to make to `value` property.
	Operator string `json:"operator"`

	// The values to compare the `key` to.
	Value float32 `json:"value"`
}

Part of a rule that matches numeric fields. It defines the condition under which this rule applies.

type CardRuleNumberConditionKey

type CardRuleNumberConditionKey string

The transaction field to filter by.

const (
	CardRuleNumberConditionKeyAmount CardRuleNumberConditionKey = "amount"
)

Defines values for CardRuleNumberConditionKey.

type CardRuleNumberConditionMatch

type CardRuleNumberConditionMatch string

`number`.

const (
	CardRuleNumberConditionMatchNumber CardRuleNumberConditionMatch = "number"
)

Defines values for CardRuleNumberConditionMatch.

type CardRuleRequest

type CardRuleRequest struct {

	// Whether this rule is currently in use. Rules can be deactivated to allow
	// for them to be kept around and re-activated at a later date.
	Active *bool `json:"active,omitempty"`

	// One or more conditions that apply for this rule. Each condition
	// needs to match for this rule to go into effect.
	Conditions []interface{} `json:"conditions"`

	// The environment to use this rule in. This rule will only be used
	// for transactions created in that environment.
	Environment *CardRuleRequestEnvironment `json:"environment,omitempty"`

	// Defines what strategy to use when this rule is not valid. This can happen
	// when the rule has triggered for a certain transaction but none of the
	// listed payment services are eligible to process that transaction currency.
	//
	// * `use_all_providers` - Try all payment services enabled for this currency in
	// order of priority, even if they are not listed in this rule. This is the
	// default behaviour for a rule.
	// * `skip` - Skip this rule and instead move on to the next highest priority
	// rule.
	// * `decline` - Decline the transaction.
	InvalidRuleFallbackStrategy *CardRuleRequestInvalidRuleFallbackStrategy `json:"invalid_rule_fallback_strategy,omitempty"`

	// A list of IDs for the payment services to use, in order of priority.
	// The payment services all need to process cards.
	PaymentServiceIds []string `json:"payment_service_ids"`

	// The numeric rank of a rule. Rules with a lower position value
	// are processed first. When a rule is inserted at a position, any rules with
	// the the same value or higher are down a position accordingly. When left
	// out, the rule is inserted at the end of the list.
	Position *float32 `json:"position,omitempty"`

	// Defines what strategy to use when all of the payment services defined in
	// this rule declined or otherwise were not able to process the card.
	//
	// * `use_all_providers` - Try all payment services enabled for this currency in
	// order of priority, even if they are not listed in this rule. This is the
	// default behaviour for a rule.
	// * `decline` - Decline the transaction.
	UnprocessableFallbackStrategy *CardRuleRequestUnprocessableFallbackStrategy `json:"unprocessable_fallback_strategy,omitempty"`
}

Creates a new rule for a card transactions.

type CardRuleRequestEnvironment

type CardRuleRequestEnvironment string

The environment to use this rule in. This rule will only be used for transactions created in that environment.

const (
	CardRuleRequestEnvironmentDevelopment CardRuleRequestEnvironment = "development"

	CardRuleRequestEnvironmentProduction CardRuleRequestEnvironment = "production"

	CardRuleRequestEnvironmentStaging CardRuleRequestEnvironment = "staging"
)

Defines values for CardRuleRequestEnvironment.

type CardRuleRequestInvalidRuleFallbackStrategy

type CardRuleRequestInvalidRuleFallbackStrategy string

Defines what strategy to use when this rule is not valid. This can happen when the rule has triggered for a certain transaction but none of the listed payment services are eligible to process that transaction currency.

* `use_all_providers` - Try all payment services enabled for this currency in order of priority, even if they are not listed in this rule. This is the default behaviour for a rule. * `skip` - Skip this rule and instead move on to the next highest priority rule. * `decline` - Decline the transaction.

const (
	CardRuleRequestInvalidRuleFallbackStrategyDecline CardRuleRequestInvalidRuleFallbackStrategy = "decline"

	CardRuleRequestInvalidRuleFallbackStrategySkip CardRuleRequestInvalidRuleFallbackStrategy = "skip"

	CardRuleRequestInvalidRuleFallbackStrategyUseAllProviders CardRuleRequestInvalidRuleFallbackStrategy = "use_all_providers"
)

Defines values for CardRuleRequestInvalidRuleFallbackStrategy.

type CardRuleRequestUnprocessableFallbackStrategy

type CardRuleRequestUnprocessableFallbackStrategy string

Defines what strategy to use when all of the payment services defined in this rule declined or otherwise were not able to process the card.

* `use_all_providers` - Try all payment services enabled for this currency in order of priority, even if they are not listed in this rule. This is the default behaviour for a rule. * `decline` - Decline the transaction.

const (
	CardRuleRequestUnprocessableFallbackStrategyDecline CardRuleRequestUnprocessableFallbackStrategy = "decline"

	CardRuleRequestUnprocessableFallbackStrategyUseAllProviders CardRuleRequestUnprocessableFallbackStrategy = "use_all_providers"
)

Defines values for CardRuleRequestUnprocessableFallbackStrategy.

type CardRuleTextCondition

type CardRuleTextCondition struct {

	// The transaction field to filter by.
	Key CardRuleTextConditionKey `json:"key"`

	// `text`.
	Match CardRuleTextConditionMatch `json:"match"`

	// The comparison to make to `value` property.
	Operator CardRuleTextConditionOperator `json:"operator"`

	// The values to compare the `key` to.
	Values []string `json:"values"`
}

Part of a rule that matches text fields. It defines the condition under which this rule applies.

type CardRuleTextConditionKey

type CardRuleTextConditionKey string

The transaction field to filter by.

const (
	CardRuleTextConditionKeyCurrency CardRuleTextConditionKey = "currency"

	CardRuleTextConditionKeyScheme CardRuleTextConditionKey = "scheme"
)

Defines values for CardRuleTextConditionKey.

type CardRuleTextConditionMatch

type CardRuleTextConditionMatch string

`text`.

const (
	CardRuleTextConditionMatchText CardRuleTextConditionMatch = "text"
)

Defines values for CardRuleTextConditionMatch.

type CardRuleTextConditionOperator

type CardRuleTextConditionOperator string

The comparison to make to `value` property.

const (
	CardRuleTextConditionOperatorIN CardRuleTextConditionOperator = "IN"

	CardRuleTextConditionOperatorNOTIN CardRuleTextConditionOperator = "NOT IN"
)

Defines values for CardRuleTextConditionOperator.

type CardRuleType

type CardRuleType string

`card-rule`.

const (
	CardRuleTypeCardRule CardRuleType = "card-rule"
)

Defines values for CardRuleType.

type CardRuleUnprocessableFallbackStrategy

type CardRuleUnprocessableFallbackStrategy string

Defines what strategy to use when all of the payment services defined in this rule declined or otherwise were not able to process the card.

* `use_all_providers` - Try all payment services enabled for this currency in order of priority, even if they are not listed in this rule. This is the default behaviour for a rule. * `decline` - Decline the transaction.

const (
	CardRuleUnprocessableFallbackStrategyDecline CardRuleUnprocessableFallbackStrategy = "decline"

	CardRuleUnprocessableFallbackStrategyUseAllProviders CardRuleUnprocessableFallbackStrategy = "use_all_providers"
)

Defines values for CardRuleUnprocessableFallbackStrategy.

type CardRuleUpdate

type CardRuleUpdate struct {

	// Whether this rule is currently in use. Rules can be deactivated to allow
	// for them to be kept around and re-activated at a later date.
	Active *bool `json:"active,omitempty"`

	// One or more conditions that apply for this rule. Each condition
	// needs to match for this rule to go into effect.
	Conditions *[]interface{} `json:"conditions,omitempty"`

	// The environment to use this rule in. This rule will only be used
	// for transactions created in that environment.
	Environment *CardRuleUpdateEnvironment `json:"environment,omitempty"`

	// Defines what strategy to use when this rule is not valid. This can happen
	// when the rule has triggered for a certain transaction but none of the
	// listed payment services are eligible to process that transaction currency.
	//
	// * `use_all_providers` - Try all payment services enabled for this currency in
	// order of priority, even if they are not listed in this rule. This is the
	// default behaviour for a rule.
	// * `skip` - Skip this rule and instead move on to the next highest priority
	// rule.
	// * `decline` - Decline the transaction.
	InvalidRuleFallbackStrategy *CardRuleUpdateInvalidRuleFallbackStrategy `json:"invalid_rule_fallback_strategy,omitempty"`

	// A list of IDs for the payment services to use, in order of priority.
	// The payment services all need to process cards.
	PaymentServiceIds *[]string `json:"payment_service_ids,omitempty"`

	// The numeric rank of a rule. Rules with a lower position value
	// are processed first. When a rule is inserted at a position, any rules with
	// the the same value or higher are down a position accordingly.
	Position *float32 `json:"position,omitempty"`

	// Defines what strategy to use when all of the payment services defined in
	// this rule declined or otherwise were not able to process the card.
	//
	// * `use_all_providers` - Try all payment services enabled for this currency in
	// order of priority, even if they are not listed in this rule. This is the
	// default behaviour for a rule.
	// * `decline` - Decline the transaction.
	UnprocessableFallbackStrategy *CardRuleUpdateUnprocessableFallbackStrategy `json:"unprocessable_fallback_strategy,omitempty"`
}

Updates a rule for a card transactions.

type CardRuleUpdateEnvironment

type CardRuleUpdateEnvironment string

The environment to use this rule in. This rule will only be used for transactions created in that environment.

const (
	CardRuleUpdateEnvironmentDevelopment CardRuleUpdateEnvironment = "development"

	CardRuleUpdateEnvironmentProduction CardRuleUpdateEnvironment = "production"

	CardRuleUpdateEnvironmentStaging CardRuleUpdateEnvironment = "staging"
)

Defines values for CardRuleUpdateEnvironment.

type CardRuleUpdateInvalidRuleFallbackStrategy

type CardRuleUpdateInvalidRuleFallbackStrategy string

Defines what strategy to use when this rule is not valid. This can happen when the rule has triggered for a certain transaction but none of the listed payment services are eligible to process that transaction currency.

* `use_all_providers` - Try all payment services enabled for this currency in order of priority, even if they are not listed in this rule. This is the default behaviour for a rule. * `skip` - Skip this rule and instead move on to the next highest priority rule. * `decline` - Decline the transaction.

const (
	CardRuleUpdateInvalidRuleFallbackStrategyDecline CardRuleUpdateInvalidRuleFallbackStrategy = "decline"

	CardRuleUpdateInvalidRuleFallbackStrategySkip CardRuleUpdateInvalidRuleFallbackStrategy = "skip"

	CardRuleUpdateInvalidRuleFallbackStrategyUseAllProviders CardRuleUpdateInvalidRuleFallbackStrategy = "use_all_providers"
)

Defines values for CardRuleUpdateInvalidRuleFallbackStrategy.

type CardRuleUpdateUnprocessableFallbackStrategy

type CardRuleUpdateUnprocessableFallbackStrategy string

Defines what strategy to use when all of the payment services defined in this rule declined or otherwise were not able to process the card.

* `use_all_providers` - Try all payment services enabled for this currency in order of priority, even if they are not listed in this rule. This is the default behaviour for a rule. * `decline` - Decline the transaction.

const (
	CardRuleUpdateUnprocessableFallbackStrategyDecline CardRuleUpdateUnprocessableFallbackStrategy = "decline"

	CardRuleUpdateUnprocessableFallbackStrategyUseAllProviders CardRuleUpdateUnprocessableFallbackStrategy = "use_all_providers"
)

Defines values for CardRuleUpdateUnprocessableFallbackStrategy.

type CardRules

type CardRules struct {

	// A list of card rules.
	Items *[]CardRule `json:"items,omitempty"`

	// The limit applied to request. This represents the number of items that are at
	// maximum returned by this request.
	Limit *int32 `json:"limit,omitempty"`

	// The cursor that represents the next page of results. Use the `cursor` query
	// parameter to fetch this page of items.
	NextCursor *string `json:"next_cursor"`

	// The cursor that represents the next page of results. Use the `cursor` query
	// parameter to fetch this page of items.
	PreviousCursor *string `json:"previous_cursor"`
}

A list of card rules.

type CardStatus

type CardStatus string

The state of the card tokenization.

const (
	CardStatusProcessing CardStatus = "processing"

	CardStatusProcessingFailed CardStatus = "processing_failed"

	CardStatusStored CardStatus = "stored"

	CardStatusUsed CardStatus = "used"
)

Defines values for CardStatus.

type CardTokenized

type CardTokenized struct {

	// Additional details about a stored card.
	Details *CardDetails `json:"details,omitempty"`

	// The unique ID of the payment method.
	Id *string `json:"id,omitempty"`

	// `card`.
	Method *CardTokenizedMethod `json:"method,omitempty"`

	// `payment-method`.
	Type *CardTokenizedType `json:"type,omitempty"`
}

A mini format version of the card.

type CardTokenizedMethod

type CardTokenizedMethod string

`card`.

const (
	CardTokenizedMethodCard CardTokenizedMethod = "card"
)

Defines values for CardTokenizedMethod.

type CardTokenizedType

type CardTokenizedType string

`payment-method`.

const (
	CardTokenizedTypePaymentMethod CardTokenizedType = "payment-method"
)

Defines values for CardTokenizedType.

type CardType

type CardType string

`payment-method`.

const (
	CardTypePaymentMethod CardType = "payment-method"
)

Defines values for CardType.

type Client

type Client struct {
	// The endpoint of the server conforming to this interface, with scheme,
	// https://api.deepmap.com for example. This can contain a path relative
	// to the server, such as https://api.deepmap.com/dev-test, and all the
	// paths in the swagger spec will be appended to the server.
	Server string

	// Doer for performing requests, typically a *http.Client with any
	// customized settings, such as certificate chains.
	Client HttpRequestDoer

	// A list of callbacks for modifying requests which are generated before sending over
	// the network.
	RequestEditors []RequestEditorFn
}

Client which conforms to the OpenAPI3 specification for this service.

func NewClient

func NewClient(server string, opts ...ClientOption) (*Client, error)

Creates a new Client, with reasonable defaults

func (*Client) AddBuyer

func (c *Client) AddBuyer(ctx context.Context, body AddBuyerJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) AddBuyerWithBody

func (c *Client) AddBuyerWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) AddCardRule

func (c *Client) AddCardRule(ctx context.Context, body AddCardRuleJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) AddCardRuleWithBody

func (c *Client) AddCardRuleWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) AddPaymentService

func (c *Client) AddPaymentService(ctx context.Context, body AddPaymentServiceJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) AddPaymentServiceWithBody

func (c *Client) AddPaymentServiceWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) ApproveTransaction

func (c *Client) ApproveTransaction(ctx context.Context, transactionId string, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) AsyncAuthorizeTransaction

func (c *Client) AsyncAuthorizeTransaction(ctx context.Context, transactionId string, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) AsyncBatchCaptureTransactions

func (c *Client) AsyncBatchCaptureTransactions(ctx context.Context, body AsyncBatchCaptureTransactionsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) AsyncBatchCaptureTransactionsWithBody

func (c *Client) AsyncBatchCaptureTransactionsWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) AsyncCaptureTransaction

func (c *Client) AsyncCaptureTransaction(ctx context.Context, transactionId string, body AsyncCaptureTransactionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) AsyncCaptureTransactionWithBody

func (c *Client) AsyncCaptureTransactionWithBody(ctx context.Context, transactionId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) AsyncCreateTransaction

func (c *Client) AsyncCreateTransaction(ctx context.Context, body AsyncCreateTransactionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) AsyncCreateTransactionWithBody

func (c *Client) AsyncCreateTransactionWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) AsyncStorePaymentMethod

func (c *Client) AsyncStorePaymentMethod(ctx context.Context, body AsyncStorePaymentMethodJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) AsyncStorePaymentMethodWithBody

func (c *Client) AsyncStorePaymentMethodWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) AuthorizeNewTransaction

func (c *Client) AuthorizeNewTransaction(ctx context.Context, body AuthorizeNewTransactionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) AuthorizeNewTransactionWithBody

func (c *Client) AuthorizeNewTransactionWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) AuthorizeTransaction

func (c *Client) AuthorizeTransaction(ctx context.Context, transactionId string, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) CaptureTransaction

func (c *Client) CaptureTransaction(ctx context.Context, transactionId string, body CaptureTransactionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) CaptureTransactionWithBody

func (c *Client) CaptureTransactionWithBody(ctx context.Context, transactionId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) CreateApiKeyPair

func (c *Client) CreateApiKeyPair(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) DeleteApiKeyPair

func (c *Client) DeleteApiKeyPair(ctx context.Context, apiKeyPairId string, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) DeleteBuyer

func (c *Client) DeleteBuyer(ctx context.Context, buyerId string, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) DeleteCardRule

func (c *Client) DeleteCardRule(ctx context.Context, cardRuleId string, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) DeletePaymentMethod

func (c *Client) DeletePaymentMethod(ctx context.Context, paymentMethodId string, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) DeletePaymentService

func (c *Client) DeletePaymentService(ctx context.Context, paymentServiceId string, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) GetBuyer

func (c *Client) GetBuyer(ctx context.Context, buyerId string, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) GetCardRule

func (c *Client) GetCardRule(ctx context.Context, cardRuleId string, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) GetCurrentMerchant

func (c *Client) GetCurrentMerchant(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) GetCurrentUser

func (c *Client) GetCurrentUser(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) GetPaymentMethod

func (c *Client) GetPaymentMethod(ctx context.Context, paymentMethodId string, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) GetPaymentService

func (c *Client) GetPaymentService(ctx context.Context, paymentServiceId string, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) GetPaymentServiceDefinition

func (c *Client) GetPaymentServiceDefinition(ctx context.Context, paymentServiceDefinitionId string, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) GetTransaction

func (c *Client) GetTransaction(ctx context.Context, transactionId string, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) ListApiKeyPairs

func (c *Client) ListApiKeyPairs(ctx context.Context, params *ListApiKeyPairsParams, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) ListBuyerPaymentMethods

func (c *Client) ListBuyerPaymentMethods(ctx context.Context, params *ListBuyerPaymentMethodsParams, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) ListBuyers

func (c *Client) ListBuyers(ctx context.Context, params *ListBuyersParams, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) ListCardsRules

func (c *Client) ListCardsRules(ctx context.Context, params *ListCardsRulesParams, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) ListPaymentMethods

func (c *Client) ListPaymentMethods(ctx context.Context, params *ListPaymentMethodsParams, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) ListPaymentOptions

func (c *Client) ListPaymentOptions(ctx context.Context, params *ListPaymentOptionsParams, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) ListPaymentServiceDefinitions

func (c *Client) ListPaymentServiceDefinitions(ctx context.Context, params *ListPaymentServiceDefinitionsParams, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) ListPaymentServices

func (c *Client) ListPaymentServices(ctx context.Context, params *ListPaymentServicesParams, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) ListTransactions

func (c *Client) ListTransactions(ctx context.Context, params *ListTransactionsParams, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) Login

func (c *Client) Login(ctx context.Context, body LoginJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) LoginWithBody

func (c *Client) LoginWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) Logout

func (c *Client) Logout(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) RedirectTransactionApproval

func (c *Client) RedirectTransactionApproval(ctx context.Context, transactionApprovalToken string, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) RefreshSession

func (c *Client) RefreshSession(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) RefundTransaction

func (c *Client) RefundTransaction(ctx context.Context, transactionId string, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) StorePaymentMethod

func (c *Client) StorePaymentMethod(ctx context.Context, body StorePaymentMethodJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) StorePaymentMethodWithBody

func (c *Client) StorePaymentMethodWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) UpdateBuyer

func (c *Client) UpdateBuyer(ctx context.Context, buyerId string, body UpdateBuyerJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) UpdateBuyerWithBody

func (c *Client) UpdateBuyerWithBody(ctx context.Context, buyerId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) UpdateCardRule

func (c *Client) UpdateCardRule(ctx context.Context, cardRuleId string, body UpdateCardRuleJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) UpdateCardRuleWithBody

func (c *Client) UpdateCardRuleWithBody(ctx context.Context, cardRuleId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) UpdatePaymentService

func (c *Client) UpdatePaymentService(ctx context.Context, paymentServiceId string, body UpdatePaymentServiceJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) UpdatePaymentServiceWithBody

func (c *Client) UpdatePaymentServiceWithBody(ctx context.Context, paymentServiceId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

type ClientInterface

type ClientInterface interface {
	// ListApiKeyPairs request
	ListApiKeyPairs(ctx context.Context, params *ListApiKeyPairsParams, reqEditors ...RequestEditorFn) (*http.Response, error)

	// CreateApiKeyPair request
	CreateApiKeyPair(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)

	// DeleteApiKeyPair request
	DeleteApiKeyPair(ctx context.Context, apiKeyPairId string, reqEditors ...RequestEditorFn) (*http.Response, error)

	// AsyncStorePaymentMethod request  with any body
	AsyncStorePaymentMethodWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	AsyncStorePaymentMethod(ctx context.Context, body AsyncStorePaymentMethodJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// AsyncCreateTransaction request  with any body
	AsyncCreateTransactionWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	AsyncCreateTransaction(ctx context.Context, body AsyncCreateTransactionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// AsyncBatchCaptureTransactions request  with any body
	AsyncBatchCaptureTransactionsWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	AsyncBatchCaptureTransactions(ctx context.Context, body AsyncBatchCaptureTransactionsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// AsyncAuthorizeTransaction request
	AsyncAuthorizeTransaction(ctx context.Context, transactionId string, reqEditors ...RequestEditorFn) (*http.Response, error)

	// AsyncCaptureTransaction request  with any body
	AsyncCaptureTransactionWithBody(ctx context.Context, transactionId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	AsyncCaptureTransaction(ctx context.Context, transactionId string, body AsyncCaptureTransactionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// Logout request
	Logout(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)

	// Login request  with any body
	LoginWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	Login(ctx context.Context, body LoginJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// RefreshSession request
	RefreshSession(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)

	// ListBuyers request
	ListBuyers(ctx context.Context, params *ListBuyersParams, reqEditors ...RequestEditorFn) (*http.Response, error)

	// AddBuyer request  with any body
	AddBuyerWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	AddBuyer(ctx context.Context, body AddBuyerJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// ListBuyerPaymentMethods request
	ListBuyerPaymentMethods(ctx context.Context, params *ListBuyerPaymentMethodsParams, reqEditors ...RequestEditorFn) (*http.Response, error)

	// DeleteBuyer request
	DeleteBuyer(ctx context.Context, buyerId string, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetBuyer request
	GetBuyer(ctx context.Context, buyerId string, reqEditors ...RequestEditorFn) (*http.Response, error)

	// UpdateBuyer request  with any body
	UpdateBuyerWithBody(ctx context.Context, buyerId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	UpdateBuyer(ctx context.Context, buyerId string, body UpdateBuyerJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// ListCardsRules request
	ListCardsRules(ctx context.Context, params *ListCardsRulesParams, reqEditors ...RequestEditorFn) (*http.Response, error)

	// AddCardRule request  with any body
	AddCardRuleWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	AddCardRule(ctx context.Context, body AddCardRuleJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// DeleteCardRule request
	DeleteCardRule(ctx context.Context, cardRuleId string, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetCardRule request
	GetCardRule(ctx context.Context, cardRuleId string, reqEditors ...RequestEditorFn) (*http.Response, error)

	// UpdateCardRule request  with any body
	UpdateCardRuleWithBody(ctx context.Context, cardRuleId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	UpdateCardRule(ctx context.Context, cardRuleId string, body UpdateCardRuleJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetCurrentMerchant request
	GetCurrentMerchant(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)

	// ListPaymentMethods request
	ListPaymentMethods(ctx context.Context, params *ListPaymentMethodsParams, reqEditors ...RequestEditorFn) (*http.Response, error)

	// StorePaymentMethod request  with any body
	StorePaymentMethodWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	StorePaymentMethod(ctx context.Context, body StorePaymentMethodJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// DeletePaymentMethod request
	DeletePaymentMethod(ctx context.Context, paymentMethodId string, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetPaymentMethod request
	GetPaymentMethod(ctx context.Context, paymentMethodId string, reqEditors ...RequestEditorFn) (*http.Response, error)

	// ListPaymentOptions request
	ListPaymentOptions(ctx context.Context, params *ListPaymentOptionsParams, reqEditors ...RequestEditorFn) (*http.Response, error)

	// ListPaymentServiceDefinitions request
	ListPaymentServiceDefinitions(ctx context.Context, params *ListPaymentServiceDefinitionsParams, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetPaymentServiceDefinition request
	GetPaymentServiceDefinition(ctx context.Context, paymentServiceDefinitionId string, reqEditors ...RequestEditorFn) (*http.Response, error)

	// ListPaymentServices request
	ListPaymentServices(ctx context.Context, params *ListPaymentServicesParams, reqEditors ...RequestEditorFn) (*http.Response, error)

	// AddPaymentService request  with any body
	AddPaymentServiceWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	AddPaymentService(ctx context.Context, body AddPaymentServiceJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// DeletePaymentService request
	DeletePaymentService(ctx context.Context, paymentServiceId string, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetPaymentService request
	GetPaymentService(ctx context.Context, paymentServiceId string, reqEditors ...RequestEditorFn) (*http.Response, error)

	// UpdatePaymentService request  with any body
	UpdatePaymentServiceWithBody(ctx context.Context, paymentServiceId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	UpdatePaymentService(ctx context.Context, paymentServiceId string, body UpdatePaymentServiceJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// ListTransactions request
	ListTransactions(ctx context.Context, params *ListTransactionsParams, reqEditors ...RequestEditorFn) (*http.Response, error)

	// AuthorizeNewTransaction request  with any body
	AuthorizeNewTransactionWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	AuthorizeNewTransaction(ctx context.Context, body AuthorizeNewTransactionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// RedirectTransactionApproval request
	RedirectTransactionApproval(ctx context.Context, transactionApprovalToken string, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetTransaction request
	GetTransaction(ctx context.Context, transactionId string, reqEditors ...RequestEditorFn) (*http.Response, error)

	// ApproveTransaction request
	ApproveTransaction(ctx context.Context, transactionId string, reqEditors ...RequestEditorFn) (*http.Response, error)

	// AuthorizeTransaction request
	AuthorizeTransaction(ctx context.Context, transactionId string, reqEditors ...RequestEditorFn) (*http.Response, error)

	// CaptureTransaction request  with any body
	CaptureTransactionWithBody(ctx context.Context, transactionId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	CaptureTransaction(ctx context.Context, transactionId string, body CaptureTransactionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// RefundTransaction request
	RefundTransaction(ctx context.Context, transactionId string, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetCurrentUser request
	GetCurrentUser(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
}

The interface specification for the client above.

type ClientOption

type ClientOption func(*Client) error

ClientOption allows setting custom parameters during construction

func WithBaseURL

func WithBaseURL(baseURL string) ClientOption

WithBaseURL overrides the baseURL.

func WithHTTPClient

func WithHTTPClient(doer HttpRequestDoer) ClientOption

WithHTTPClient allows overriding the default Doer, which is automatically created using http.Client. This is useful for tests.

func WithRequestEditorFn

func WithRequestEditorFn(fn RequestEditorFn) ClientOption

WithRequestEditorFn allows setting up a callback function, which will be called right before sending the request. This can be used to mutate the request.

type ClientWithResponses

type ClientWithResponses struct {
	ClientInterface
}

ClientWithResponses builds on ClientInterface to offer response payloads

func NewClientWithResponses

func NewClientWithResponses(server string, opts ...ClientOption) (*ClientWithResponses, error)

NewClientWithResponses creates a new ClientWithResponses, which wraps Client with return type handling

func (*ClientWithResponses) AddBuyerWithBodyWithResponse

func (c *ClientWithResponses) AddBuyerWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*AddBuyerResponse, error)

AddBuyerWithBodyWithResponse request with arbitrary body returning *AddBuyerResponse

func (*ClientWithResponses) AddBuyerWithResponse

func (c *ClientWithResponses) AddBuyerWithResponse(ctx context.Context, body AddBuyerJSONRequestBody, reqEditors ...RequestEditorFn) (*AddBuyerResponse, error)

func (*ClientWithResponses) AddCardRuleWithBodyWithResponse

func (c *ClientWithResponses) AddCardRuleWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*AddCardRuleResponse, error)

AddCardRuleWithBodyWithResponse request with arbitrary body returning *AddCardRuleResponse

func (*ClientWithResponses) AddCardRuleWithResponse

func (c *ClientWithResponses) AddCardRuleWithResponse(ctx context.Context, body AddCardRuleJSONRequestBody, reqEditors ...RequestEditorFn) (*AddCardRuleResponse, error)

func (*ClientWithResponses) AddPaymentServiceWithBodyWithResponse

func (c *ClientWithResponses) AddPaymentServiceWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*AddPaymentServiceResponse, error)

AddPaymentServiceWithBodyWithResponse request with arbitrary body returning *AddPaymentServiceResponse

func (*ClientWithResponses) AddPaymentServiceWithResponse

func (c *ClientWithResponses) AddPaymentServiceWithResponse(ctx context.Context, body AddPaymentServiceJSONRequestBody, reqEditors ...RequestEditorFn) (*AddPaymentServiceResponse, error)

func (*ClientWithResponses) ApproveTransactionWithResponse

func (c *ClientWithResponses) ApproveTransactionWithResponse(ctx context.Context, transactionId string, reqEditors ...RequestEditorFn) (*ApproveTransactionResponse, error)

ApproveTransactionWithResponse request returning *ApproveTransactionResponse

func (*ClientWithResponses) AsyncAuthorizeTransactionWithResponse

func (c *ClientWithResponses) AsyncAuthorizeTransactionWithResponse(ctx context.Context, transactionId string, reqEditors ...RequestEditorFn) (*AsyncAuthorizeTransactionResponse, error)

AsyncAuthorizeTransactionWithResponse request returning *AsyncAuthorizeTransactionResponse

func (*ClientWithResponses) AsyncBatchCaptureTransactionsWithBodyWithResponse

func (c *ClientWithResponses) AsyncBatchCaptureTransactionsWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*AsyncBatchCaptureTransactionsResponse, error)

AsyncBatchCaptureTransactionsWithBodyWithResponse request with arbitrary body returning *AsyncBatchCaptureTransactionsResponse

func (*ClientWithResponses) AsyncBatchCaptureTransactionsWithResponse

func (c *ClientWithResponses) AsyncBatchCaptureTransactionsWithResponse(ctx context.Context, body AsyncBatchCaptureTransactionsJSONRequestBody, reqEditors ...RequestEditorFn) (*AsyncBatchCaptureTransactionsResponse, error)

func (*ClientWithResponses) AsyncCaptureTransactionWithBodyWithResponse

func (c *ClientWithResponses) AsyncCaptureTransactionWithBodyWithResponse(ctx context.Context, transactionId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*AsyncCaptureTransactionResponse, error)

AsyncCaptureTransactionWithBodyWithResponse request with arbitrary body returning *AsyncCaptureTransactionResponse

func (*ClientWithResponses) AsyncCaptureTransactionWithResponse

func (c *ClientWithResponses) AsyncCaptureTransactionWithResponse(ctx context.Context, transactionId string, body AsyncCaptureTransactionJSONRequestBody, reqEditors ...RequestEditorFn) (*AsyncCaptureTransactionResponse, error)

func (*ClientWithResponses) AsyncCreateTransactionWithBodyWithResponse

func (c *ClientWithResponses) AsyncCreateTransactionWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*AsyncCreateTransactionResponse, error)

AsyncCreateTransactionWithBodyWithResponse request with arbitrary body returning *AsyncCreateTransactionResponse

func (*ClientWithResponses) AsyncCreateTransactionWithResponse

func (c *ClientWithResponses) AsyncCreateTransactionWithResponse(ctx context.Context, body AsyncCreateTransactionJSONRequestBody, reqEditors ...RequestEditorFn) (*AsyncCreateTransactionResponse, error)

func (*ClientWithResponses) AsyncStorePaymentMethodWithBodyWithResponse

func (c *ClientWithResponses) AsyncStorePaymentMethodWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*AsyncStorePaymentMethodResponse, error)

AsyncStorePaymentMethodWithBodyWithResponse request with arbitrary body returning *AsyncStorePaymentMethodResponse

func (*ClientWithResponses) AsyncStorePaymentMethodWithResponse

func (c *ClientWithResponses) AsyncStorePaymentMethodWithResponse(ctx context.Context, body AsyncStorePaymentMethodJSONRequestBody, reqEditors ...RequestEditorFn) (*AsyncStorePaymentMethodResponse, error)

func (*ClientWithResponses) AuthorizeNewTransactionWithBodyWithResponse

func (c *ClientWithResponses) AuthorizeNewTransactionWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*AuthorizeNewTransactionResponse, error)

AuthorizeNewTransactionWithBodyWithResponse request with arbitrary body returning *AuthorizeNewTransactionResponse

func (*ClientWithResponses) AuthorizeNewTransactionWithResponse

func (c *ClientWithResponses) AuthorizeNewTransactionWithResponse(ctx context.Context, body AuthorizeNewTransactionJSONRequestBody, reqEditors ...RequestEditorFn) (*AuthorizeNewTransactionResponse, error)

func (*ClientWithResponses) AuthorizeTransactionWithResponse

func (c *ClientWithResponses) AuthorizeTransactionWithResponse(ctx context.Context, transactionId string, reqEditors ...RequestEditorFn) (*AuthorizeTransactionResponse, error)

AuthorizeTransactionWithResponse request returning *AuthorizeTransactionResponse

func (*ClientWithResponses) CaptureTransactionWithBodyWithResponse

func (c *ClientWithResponses) CaptureTransactionWithBodyWithResponse(ctx context.Context, transactionId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CaptureTransactionResponse, error)

CaptureTransactionWithBodyWithResponse request with arbitrary body returning *CaptureTransactionResponse

func (*ClientWithResponses) CaptureTransactionWithResponse

func (c *ClientWithResponses) CaptureTransactionWithResponse(ctx context.Context, transactionId string, body CaptureTransactionJSONRequestBody, reqEditors ...RequestEditorFn) (*CaptureTransactionResponse, error)

func (*ClientWithResponses) CreateApiKeyPairWithResponse

func (c *ClientWithResponses) CreateApiKeyPairWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*CreateApiKeyPairResponse, error)

CreateApiKeyPairWithResponse request returning *CreateApiKeyPairResponse

func (*ClientWithResponses) DeleteApiKeyPairWithResponse

func (c *ClientWithResponses) DeleteApiKeyPairWithResponse(ctx context.Context, apiKeyPairId string, reqEditors ...RequestEditorFn) (*DeleteApiKeyPairResponse, error)

DeleteApiKeyPairWithResponse request returning *DeleteApiKeyPairResponse

func (*ClientWithResponses) DeleteBuyerWithResponse

func (c *ClientWithResponses) DeleteBuyerWithResponse(ctx context.Context, buyerId string, reqEditors ...RequestEditorFn) (*DeleteBuyerResponse, error)

DeleteBuyerWithResponse request returning *DeleteBuyerResponse

func (*ClientWithResponses) DeleteCardRuleWithResponse

func (c *ClientWithResponses) DeleteCardRuleWithResponse(ctx context.Context, cardRuleId string, reqEditors ...RequestEditorFn) (*DeleteCardRuleResponse, error)

DeleteCardRuleWithResponse request returning *DeleteCardRuleResponse

func (*ClientWithResponses) DeletePaymentMethodWithResponse

func (c *ClientWithResponses) DeletePaymentMethodWithResponse(ctx context.Context, paymentMethodId string, reqEditors ...RequestEditorFn) (*DeletePaymentMethodResponse, error)

DeletePaymentMethodWithResponse request returning *DeletePaymentMethodResponse

func (*ClientWithResponses) DeletePaymentServiceWithResponse

func (c *ClientWithResponses) DeletePaymentServiceWithResponse(ctx context.Context, paymentServiceId string, reqEditors ...RequestEditorFn) (*DeletePaymentServiceResponse, error)

DeletePaymentServiceWithResponse request returning *DeletePaymentServiceResponse

func (*ClientWithResponses) GetBuyerWithResponse

func (c *ClientWithResponses) GetBuyerWithResponse(ctx context.Context, buyerId string, reqEditors ...RequestEditorFn) (*GetBuyerResponse, error)

GetBuyerWithResponse request returning *GetBuyerResponse

func (*ClientWithResponses) GetCardRuleWithResponse

func (c *ClientWithResponses) GetCardRuleWithResponse(ctx context.Context, cardRuleId string, reqEditors ...RequestEditorFn) (*GetCardRuleResponse, error)

GetCardRuleWithResponse request returning *GetCardRuleResponse

func (*ClientWithResponses) GetCurrentMerchantWithResponse

func (c *ClientWithResponses) GetCurrentMerchantWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetCurrentMerchantResponse, error)

GetCurrentMerchantWithResponse request returning *GetCurrentMerchantResponse

func (*ClientWithResponses) GetCurrentUserWithResponse

func (c *ClientWithResponses) GetCurrentUserWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetCurrentUserResponse, error)

GetCurrentUserWithResponse request returning *GetCurrentUserResponse

func (*ClientWithResponses) GetPaymentMethodWithResponse

func (c *ClientWithResponses) GetPaymentMethodWithResponse(ctx context.Context, paymentMethodId string, reqEditors ...RequestEditorFn) (*GetPaymentMethodResponse, error)

GetPaymentMethodWithResponse request returning *GetPaymentMethodResponse

func (*ClientWithResponses) GetPaymentServiceDefinitionWithResponse

func (c *ClientWithResponses) GetPaymentServiceDefinitionWithResponse(ctx context.Context, paymentServiceDefinitionId string, reqEditors ...RequestEditorFn) (*GetPaymentServiceDefinitionResponse, error)

GetPaymentServiceDefinitionWithResponse request returning *GetPaymentServiceDefinitionResponse

func (*ClientWithResponses) GetPaymentServiceWithResponse

func (c *ClientWithResponses) GetPaymentServiceWithResponse(ctx context.Context, paymentServiceId string, reqEditors ...RequestEditorFn) (*GetPaymentServiceResponse, error)

GetPaymentServiceWithResponse request returning *GetPaymentServiceResponse

func (*ClientWithResponses) GetTransactionWithResponse

func (c *ClientWithResponses) GetTransactionWithResponse(ctx context.Context, transactionId string, reqEditors ...RequestEditorFn) (*GetTransactionResponse, error)

GetTransactionWithResponse request returning *GetTransactionResponse

func (*ClientWithResponses) ListApiKeyPairsWithResponse

func (c *ClientWithResponses) ListApiKeyPairsWithResponse(ctx context.Context, params *ListApiKeyPairsParams, reqEditors ...RequestEditorFn) (*ListApiKeyPairsResponse, error)

ListApiKeyPairsWithResponse request returning *ListApiKeyPairsResponse

func (*ClientWithResponses) ListBuyerPaymentMethodsWithResponse

func (c *ClientWithResponses) ListBuyerPaymentMethodsWithResponse(ctx context.Context, params *ListBuyerPaymentMethodsParams, reqEditors ...RequestEditorFn) (*ListBuyerPaymentMethodsResponse, error)

ListBuyerPaymentMethodsWithResponse request returning *ListBuyerPaymentMethodsResponse

func (*ClientWithResponses) ListBuyersWithResponse

func (c *ClientWithResponses) ListBuyersWithResponse(ctx context.Context, params *ListBuyersParams, reqEditors ...RequestEditorFn) (*ListBuyersResponse, error)

ListBuyersWithResponse request returning *ListBuyersResponse

func (*ClientWithResponses) ListCardsRulesWithResponse

func (c *ClientWithResponses) ListCardsRulesWithResponse(ctx context.Context, params *ListCardsRulesParams, reqEditors ...RequestEditorFn) (*ListCardsRulesResponse, error)

ListCardsRulesWithResponse request returning *ListCardsRulesResponse

func (*ClientWithResponses) ListPaymentMethodsWithResponse

func (c *ClientWithResponses) ListPaymentMethodsWithResponse(ctx context.Context, params *ListPaymentMethodsParams, reqEditors ...RequestEditorFn) (*ListPaymentMethodsResponse, error)

ListPaymentMethodsWithResponse request returning *ListPaymentMethodsResponse

func (*ClientWithResponses) ListPaymentOptionsWithResponse

func (c *ClientWithResponses) ListPaymentOptionsWithResponse(ctx context.Context, params *ListPaymentOptionsParams, reqEditors ...RequestEditorFn) (*ListPaymentOptionsResponse, error)

ListPaymentOptionsWithResponse request returning *ListPaymentOptionsResponse

func (*ClientWithResponses) ListPaymentServiceDefinitionsWithResponse

func (c *ClientWithResponses) ListPaymentServiceDefinitionsWithResponse(ctx context.Context, params *ListPaymentServiceDefinitionsParams, reqEditors ...RequestEditorFn) (*ListPaymentServiceDefinitionsResponse, error)

ListPaymentServiceDefinitionsWithResponse request returning *ListPaymentServiceDefinitionsResponse

func (*ClientWithResponses) ListPaymentServicesWithResponse

func (c *ClientWithResponses) ListPaymentServicesWithResponse(ctx context.Context, params *ListPaymentServicesParams, reqEditors ...RequestEditorFn) (*ListPaymentServicesResponse, error)

ListPaymentServicesWithResponse request returning *ListPaymentServicesResponse

func (*ClientWithResponses) ListTransactionsWithResponse

func (c *ClientWithResponses) ListTransactionsWithResponse(ctx context.Context, params *ListTransactionsParams, reqEditors ...RequestEditorFn) (*ListTransactionsResponse, error)

ListTransactionsWithResponse request returning *ListTransactionsResponse

func (*ClientWithResponses) LoginWithBodyWithResponse

func (c *ClientWithResponses) LoginWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*LoginResponse, error)

LoginWithBodyWithResponse request with arbitrary body returning *LoginResponse

func (*ClientWithResponses) LoginWithResponse

func (c *ClientWithResponses) LoginWithResponse(ctx context.Context, body LoginJSONRequestBody, reqEditors ...RequestEditorFn) (*LoginResponse, error)

func (*ClientWithResponses) LogoutWithResponse

func (c *ClientWithResponses) LogoutWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*LogoutResponse, error)

LogoutWithResponse request returning *LogoutResponse

func (*ClientWithResponses) RedirectTransactionApprovalWithResponse

func (c *ClientWithResponses) RedirectTransactionApprovalWithResponse(ctx context.Context, transactionApprovalToken string, reqEditors ...RequestEditorFn) (*RedirectTransactionApprovalResponse, error)

RedirectTransactionApprovalWithResponse request returning *RedirectTransactionApprovalResponse

func (*ClientWithResponses) RefreshSessionWithResponse

func (c *ClientWithResponses) RefreshSessionWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*RefreshSessionResponse, error)

RefreshSessionWithResponse request returning *RefreshSessionResponse

func (*ClientWithResponses) RefundTransactionWithResponse

func (c *ClientWithResponses) RefundTransactionWithResponse(ctx context.Context, transactionId string, reqEditors ...RequestEditorFn) (*RefundTransactionResponse, error)

RefundTransactionWithResponse request returning *RefundTransactionResponse

func (*ClientWithResponses) StorePaymentMethodWithBodyWithResponse

func (c *ClientWithResponses) StorePaymentMethodWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*StorePaymentMethodResponse, error)

StorePaymentMethodWithBodyWithResponse request with arbitrary body returning *StorePaymentMethodResponse

func (*ClientWithResponses) StorePaymentMethodWithResponse

func (c *ClientWithResponses) StorePaymentMethodWithResponse(ctx context.Context, body StorePaymentMethodJSONRequestBody, reqEditors ...RequestEditorFn) (*StorePaymentMethodResponse, error)

func (*ClientWithResponses) UpdateBuyerWithBodyWithResponse

func (c *ClientWithResponses) UpdateBuyerWithBodyWithResponse(ctx context.Context, buyerId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateBuyerResponse, error)

UpdateBuyerWithBodyWithResponse request with arbitrary body returning *UpdateBuyerResponse

func (*ClientWithResponses) UpdateBuyerWithResponse

func (c *ClientWithResponses) UpdateBuyerWithResponse(ctx context.Context, buyerId string, body UpdateBuyerJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateBuyerResponse, error)

func (*ClientWithResponses) UpdateCardRuleWithBodyWithResponse

func (c *ClientWithResponses) UpdateCardRuleWithBodyWithResponse(ctx context.Context, cardRuleId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateCardRuleResponse, error)

UpdateCardRuleWithBodyWithResponse request with arbitrary body returning *UpdateCardRuleResponse

func (*ClientWithResponses) UpdateCardRuleWithResponse

func (c *ClientWithResponses) UpdateCardRuleWithResponse(ctx context.Context, cardRuleId string, body UpdateCardRuleJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateCardRuleResponse, error)

func (*ClientWithResponses) UpdatePaymentServiceWithBodyWithResponse

func (c *ClientWithResponses) UpdatePaymentServiceWithBodyWithResponse(ctx context.Context, paymentServiceId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdatePaymentServiceResponse, error)

UpdatePaymentServiceWithBodyWithResponse request with arbitrary body returning *UpdatePaymentServiceResponse

func (*ClientWithResponses) UpdatePaymentServiceWithResponse

func (c *ClientWithResponses) UpdatePaymentServiceWithResponse(ctx context.Context, paymentServiceId string, body UpdatePaymentServiceJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdatePaymentServiceResponse, error)

type ClientWithResponsesInterface

type ClientWithResponsesInterface interface {
	// ListApiKeyPairs request
	ListApiKeyPairsWithResponse(ctx context.Context, params *ListApiKeyPairsParams, reqEditors ...RequestEditorFn) (*ListApiKeyPairsResponse, error)

	// CreateApiKeyPair request
	CreateApiKeyPairWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*CreateApiKeyPairResponse, error)

	// DeleteApiKeyPair request
	DeleteApiKeyPairWithResponse(ctx context.Context, apiKeyPairId string, reqEditors ...RequestEditorFn) (*DeleteApiKeyPairResponse, error)

	// AsyncStorePaymentMethod request  with any body
	AsyncStorePaymentMethodWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*AsyncStorePaymentMethodResponse, error)

	AsyncStorePaymentMethodWithResponse(ctx context.Context, body AsyncStorePaymentMethodJSONRequestBody, reqEditors ...RequestEditorFn) (*AsyncStorePaymentMethodResponse, error)

	// AsyncCreateTransaction request  with any body
	AsyncCreateTransactionWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*AsyncCreateTransactionResponse, error)

	AsyncCreateTransactionWithResponse(ctx context.Context, body AsyncCreateTransactionJSONRequestBody, reqEditors ...RequestEditorFn) (*AsyncCreateTransactionResponse, error)

	// AsyncBatchCaptureTransactions request  with any body
	AsyncBatchCaptureTransactionsWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*AsyncBatchCaptureTransactionsResponse, error)

	AsyncBatchCaptureTransactionsWithResponse(ctx context.Context, body AsyncBatchCaptureTransactionsJSONRequestBody, reqEditors ...RequestEditorFn) (*AsyncBatchCaptureTransactionsResponse, error)

	// AsyncAuthorizeTransaction request
	AsyncAuthorizeTransactionWithResponse(ctx context.Context, transactionId string, reqEditors ...RequestEditorFn) (*AsyncAuthorizeTransactionResponse, error)

	// AsyncCaptureTransaction request  with any body
	AsyncCaptureTransactionWithBodyWithResponse(ctx context.Context, transactionId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*AsyncCaptureTransactionResponse, error)

	AsyncCaptureTransactionWithResponse(ctx context.Context, transactionId string, body AsyncCaptureTransactionJSONRequestBody, reqEditors ...RequestEditorFn) (*AsyncCaptureTransactionResponse, error)

	// Logout request
	LogoutWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*LogoutResponse, error)

	// Login request  with any body
	LoginWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*LoginResponse, error)

	LoginWithResponse(ctx context.Context, body LoginJSONRequestBody, reqEditors ...RequestEditorFn) (*LoginResponse, error)

	// RefreshSession request
	RefreshSessionWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*RefreshSessionResponse, error)

	// ListBuyers request
	ListBuyersWithResponse(ctx context.Context, params *ListBuyersParams, reqEditors ...RequestEditorFn) (*ListBuyersResponse, error)

	// AddBuyer request  with any body
	AddBuyerWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*AddBuyerResponse, error)

	AddBuyerWithResponse(ctx context.Context, body AddBuyerJSONRequestBody, reqEditors ...RequestEditorFn) (*AddBuyerResponse, error)

	// ListBuyerPaymentMethods request
	ListBuyerPaymentMethodsWithResponse(ctx context.Context, params *ListBuyerPaymentMethodsParams, reqEditors ...RequestEditorFn) (*ListBuyerPaymentMethodsResponse, error)

	// DeleteBuyer request
	DeleteBuyerWithResponse(ctx context.Context, buyerId string, reqEditors ...RequestEditorFn) (*DeleteBuyerResponse, error)

	// GetBuyer request
	GetBuyerWithResponse(ctx context.Context, buyerId string, reqEditors ...RequestEditorFn) (*GetBuyerResponse, error)

	// UpdateBuyer request  with any body
	UpdateBuyerWithBodyWithResponse(ctx context.Context, buyerId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateBuyerResponse, error)

	UpdateBuyerWithResponse(ctx context.Context, buyerId string, body UpdateBuyerJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateBuyerResponse, error)

	// ListCardsRules request
	ListCardsRulesWithResponse(ctx context.Context, params *ListCardsRulesParams, reqEditors ...RequestEditorFn) (*ListCardsRulesResponse, error)

	// AddCardRule request  with any body
	AddCardRuleWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*AddCardRuleResponse, error)

	AddCardRuleWithResponse(ctx context.Context, body AddCardRuleJSONRequestBody, reqEditors ...RequestEditorFn) (*AddCardRuleResponse, error)

	// DeleteCardRule request
	DeleteCardRuleWithResponse(ctx context.Context, cardRuleId string, reqEditors ...RequestEditorFn) (*DeleteCardRuleResponse, error)

	// GetCardRule request
	GetCardRuleWithResponse(ctx context.Context, cardRuleId string, reqEditors ...RequestEditorFn) (*GetCardRuleResponse, error)

	// UpdateCardRule request  with any body
	UpdateCardRuleWithBodyWithResponse(ctx context.Context, cardRuleId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateCardRuleResponse, error)

	UpdateCardRuleWithResponse(ctx context.Context, cardRuleId string, body UpdateCardRuleJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateCardRuleResponse, error)

	// GetCurrentMerchant request
	GetCurrentMerchantWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetCurrentMerchantResponse, error)

	// ListPaymentMethods request
	ListPaymentMethodsWithResponse(ctx context.Context, params *ListPaymentMethodsParams, reqEditors ...RequestEditorFn) (*ListPaymentMethodsResponse, error)

	// StorePaymentMethod request  with any body
	StorePaymentMethodWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*StorePaymentMethodResponse, error)

	StorePaymentMethodWithResponse(ctx context.Context, body StorePaymentMethodJSONRequestBody, reqEditors ...RequestEditorFn) (*StorePaymentMethodResponse, error)

	// DeletePaymentMethod request
	DeletePaymentMethodWithResponse(ctx context.Context, paymentMethodId string, reqEditors ...RequestEditorFn) (*DeletePaymentMethodResponse, error)

	// GetPaymentMethod request
	GetPaymentMethodWithResponse(ctx context.Context, paymentMethodId string, reqEditors ...RequestEditorFn) (*GetPaymentMethodResponse, error)

	// ListPaymentOptions request
	ListPaymentOptionsWithResponse(ctx context.Context, params *ListPaymentOptionsParams, reqEditors ...RequestEditorFn) (*ListPaymentOptionsResponse, error)

	// ListPaymentServiceDefinitions request
	ListPaymentServiceDefinitionsWithResponse(ctx context.Context, params *ListPaymentServiceDefinitionsParams, reqEditors ...RequestEditorFn) (*ListPaymentServiceDefinitionsResponse, error)

	// GetPaymentServiceDefinition request
	GetPaymentServiceDefinitionWithResponse(ctx context.Context, paymentServiceDefinitionId string, reqEditors ...RequestEditorFn) (*GetPaymentServiceDefinitionResponse, error)

	// ListPaymentServices request
	ListPaymentServicesWithResponse(ctx context.Context, params *ListPaymentServicesParams, reqEditors ...RequestEditorFn) (*ListPaymentServicesResponse, error)

	// AddPaymentService request  with any body
	AddPaymentServiceWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*AddPaymentServiceResponse, error)

	AddPaymentServiceWithResponse(ctx context.Context, body AddPaymentServiceJSONRequestBody, reqEditors ...RequestEditorFn) (*AddPaymentServiceResponse, error)

	// DeletePaymentService request
	DeletePaymentServiceWithResponse(ctx context.Context, paymentServiceId string, reqEditors ...RequestEditorFn) (*DeletePaymentServiceResponse, error)

	// GetPaymentService request
	GetPaymentServiceWithResponse(ctx context.Context, paymentServiceId string, reqEditors ...RequestEditorFn) (*GetPaymentServiceResponse, error)

	// UpdatePaymentService request  with any body
	UpdatePaymentServiceWithBodyWithResponse(ctx context.Context, paymentServiceId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdatePaymentServiceResponse, error)

	UpdatePaymentServiceWithResponse(ctx context.Context, paymentServiceId string, body UpdatePaymentServiceJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdatePaymentServiceResponse, error)

	// ListTransactions request
	ListTransactionsWithResponse(ctx context.Context, params *ListTransactionsParams, reqEditors ...RequestEditorFn) (*ListTransactionsResponse, error)

	// AuthorizeNewTransaction request  with any body
	AuthorizeNewTransactionWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*AuthorizeNewTransactionResponse, error)

	AuthorizeNewTransactionWithResponse(ctx context.Context, body AuthorizeNewTransactionJSONRequestBody, reqEditors ...RequestEditorFn) (*AuthorizeNewTransactionResponse, error)

	// RedirectTransactionApproval request
	RedirectTransactionApprovalWithResponse(ctx context.Context, transactionApprovalToken string, reqEditors ...RequestEditorFn) (*RedirectTransactionApprovalResponse, error)

	// GetTransaction request
	GetTransactionWithResponse(ctx context.Context, transactionId string, reqEditors ...RequestEditorFn) (*GetTransactionResponse, error)

	// ApproveTransaction request
	ApproveTransactionWithResponse(ctx context.Context, transactionId string, reqEditors ...RequestEditorFn) (*ApproveTransactionResponse, error)

	// AuthorizeTransaction request
	AuthorizeTransactionWithResponse(ctx context.Context, transactionId string, reqEditors ...RequestEditorFn) (*AuthorizeTransactionResponse, error)

	// CaptureTransaction request  with any body
	CaptureTransactionWithBodyWithResponse(ctx context.Context, transactionId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CaptureTransactionResponse, error)

	CaptureTransactionWithResponse(ctx context.Context, transactionId string, body CaptureTransactionJSONRequestBody, reqEditors ...RequestEditorFn) (*CaptureTransactionResponse, error)

	// RefundTransaction request
	RefundTransactionWithResponse(ctx context.Context, transactionId string, reqEditors ...RequestEditorFn) (*RefundTransactionResponse, error)

	// GetCurrentUser request
	GetCurrentUserWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetCurrentUserResponse, error)
}

ClientWithResponsesInterface is the interface specification for the client with responses above.

type CreateApiKeyPairResponse

type CreateApiKeyPairResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON201      *APIKeyPair
	JSON401      *Error401Unauthorized
}

func ParseCreateApiKeyPairResponse

func ParseCreateApiKeyPairResponse(rsp *http.Response) (*CreateApiKeyPairResponse, error)

ParseCreateApiKeyPairResponse parses an HTTP response from a CreateApiKeyPairWithResponse call

func (CreateApiKeyPairResponse) Status

func (r CreateApiKeyPairResponse) Status() string

Status returns HTTPResponse.Status

func (CreateApiKeyPairResponse) StatusCode

func (r CreateApiKeyPairResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type DeleteApiKeyPairResponse

type DeleteApiKeyPairResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON401      *Error401Unauthorized
	JSON404      *Error404NotFound
}

func ParseDeleteApiKeyPairResponse

func ParseDeleteApiKeyPairResponse(rsp *http.Response) (*DeleteApiKeyPairResponse, error)

ParseDeleteApiKeyPairResponse parses an HTTP response from a DeleteApiKeyPairWithResponse call

func (DeleteApiKeyPairResponse) Status

func (r DeleteApiKeyPairResponse) Status() string

Status returns HTTPResponse.Status

func (DeleteApiKeyPairResponse) StatusCode

func (r DeleteApiKeyPairResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type DeleteBuyerResponse

type DeleteBuyerResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON401      *Error401Unauthorized
	JSON404      *Error404NotFound
}

func ParseDeleteBuyerResponse

func ParseDeleteBuyerResponse(rsp *http.Response) (*DeleteBuyerResponse, error)

ParseDeleteBuyerResponse parses an HTTP response from a DeleteBuyerWithResponse call

func (DeleteBuyerResponse) Status

func (r DeleteBuyerResponse) Status() string

Status returns HTTPResponse.Status

func (DeleteBuyerResponse) StatusCode

func (r DeleteBuyerResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type DeleteCardRuleResponse

type DeleteCardRuleResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON401      *Error401Unauthorized
	JSON403      *ErrorGeneric
	JSON404      *Error404NotFound
}

func ParseDeleteCardRuleResponse

func ParseDeleteCardRuleResponse(rsp *http.Response) (*DeleteCardRuleResponse, error)

ParseDeleteCardRuleResponse parses an HTTP response from a DeleteCardRuleWithResponse call

func (DeleteCardRuleResponse) Status

func (r DeleteCardRuleResponse) Status() string

Status returns HTTPResponse.Status

func (DeleteCardRuleResponse) StatusCode

func (r DeleteCardRuleResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type DeletePaymentMethodResponse

type DeletePaymentMethodResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON401      *Error401Unauthorized
	JSON404      *Error404NotFound
}

func ParseDeletePaymentMethodResponse

func ParseDeletePaymentMethodResponse(rsp *http.Response) (*DeletePaymentMethodResponse, error)

ParseDeletePaymentMethodResponse parses an HTTP response from a DeletePaymentMethodWithResponse call

func (DeletePaymentMethodResponse) Status

Status returns HTTPResponse.Status

func (DeletePaymentMethodResponse) StatusCode

func (r DeletePaymentMethodResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type DeletePaymentServiceResponse

type DeletePaymentServiceResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON401      *Error401Unauthorized
	JSON404      *Error404NotFound
}

func ParseDeletePaymentServiceResponse

func ParseDeletePaymentServiceResponse(rsp *http.Response) (*DeletePaymentServiceResponse, error)

ParseDeletePaymentServiceResponse parses an HTTP response from a DeletePaymentServiceWithResponse call

func (DeletePaymentServiceResponse) Status

Status returns HTTPResponse.Status

func (DeletePaymentServiceResponse) StatusCode

func (r DeletePaymentServiceResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type EchoRouter

type EchoRouter interface {
	CONNECT(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
	DELETE(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
	GET(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
	HEAD(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
	OPTIONS(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
	PATCH(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
	POST(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
	PUT(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
	TRACE(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
}

This is a simple interface which specifies echo.Route addition functions which are present on both echo.Echo and echo.Group, since we want to allow using either of them for path registration

type Error400BadRequest

type Error400BadRequest struct {

	// `bad_request`.
	Code *Error400BadRequestCode `json:"code,omitempty"`

	// A list of detail objects that further clarify the reason for the error.
	Details *[]ErrorDetail `json:"details,omitempty"`

	// Describes the fields that are missing or incorrectly formatted in the API
	// request.
	Message *string `json:"message,omitempty"`

	// `400`.
	Status *Error400BadRequestStatus `json:"status,omitempty"`

	// `error`.
	Type *Error400BadRequestType `json:"type,omitempty"`
}

Bad Request (HTTP 400).

type Error400BadRequestCode

type Error400BadRequestCode string

`bad_request`.

const (
	Error400BadRequestCodeBadRequest Error400BadRequestCode = "bad_request"
)

Defines values for Error400BadRequestCode.

type Error400BadRequestStatus

type Error400BadRequestStatus int

`400`.

const (
	Error400BadRequestStatusN00 Error400BadRequestStatus = 400
)

Defines values for Error400BadRequestStatus.

type Error400BadRequestType

type Error400BadRequestType string

`error`.

const (
	Error400BadRequestTypeError Error400BadRequestType = "error"
)

Defines values for Error400BadRequestType.

type Error400IncorrectJson

type Error400IncorrectJson struct {

	// `incorrect_json`.
	Code *Error400IncorrectJsonCode `json:"code,omitempty"`

	// A list of detail objects that further clarify the reason for the error.
	// Not every error supports more detail.
	Details *[]ErrorDetail `json:"details,omitempty"`

	// Incorrect JSON. The request body could not be parsed as valid JSON.
	Message *string `json:"message,omitempty"`

	// `400`.
	Status *Error400IncorrectJsonStatus `json:"status,omitempty"`

	// `error`.
	Type *Error400IncorrectJsonType `json:"type,omitempty"`
}

Incorrect JSON (HTTP 400).

type Error400IncorrectJsonCode

type Error400IncorrectJsonCode string

`incorrect_json`.

const (
	Error400IncorrectJsonCodeIncorrectJson Error400IncorrectJsonCode = "incorrect_json"
)

Defines values for Error400IncorrectJsonCode.

type Error400IncorrectJsonStatus

type Error400IncorrectJsonStatus int

`400`.

const (
	Error400IncorrectJsonStatusN00 Error400IncorrectJsonStatus = 400
)

Defines values for Error400IncorrectJsonStatus.

type Error400IncorrectJsonType

type Error400IncorrectJsonType string

`error`.

const (
	Error400IncorrectJsonTypeError Error400IncorrectJsonType = "error"
)

Defines values for Error400IncorrectJsonType.

type Error401Unauthorized

type Error401Unauthorized struct {

	// `unauthorized`.
	Code *Error401UnauthorizedCode `json:"code,omitempty"`

	// A list of detail objects that further clarify the reason for the error.
	// Not every error supports more detail.
	Details *[]ErrorDetail `json:"details,omitempty"`

	// No valid API authentication found.
	Message *Error401UnauthorizedMessage `json:"message,omitempty"`

	// `401`.
	Status *Error401UnauthorizedStatus `json:"status,omitempty"`

	// `error`.
	Type *Error401UnauthorizedType `json:"type,omitempty"`
}

Unauthorized Error (HTTP 401).

type Error401UnauthorizedCode

type Error401UnauthorizedCode string

`unauthorized`.

const (
	Error401UnauthorizedCodeUnauthorized Error401UnauthorizedCode = "unauthorized"
)

Defines values for Error401UnauthorizedCode.

type Error401UnauthorizedMessage

type Error401UnauthorizedMessage string

No valid API authentication found.

const (
	Error401UnauthorizedMessageNoValidAPIAuthenticationFound Error401UnauthorizedMessage = "No valid API authentication found"
)

Defines values for Error401UnauthorizedMessage.

type Error401UnauthorizedStatus

type Error401UnauthorizedStatus int

`401`.

const (
	Error401UnauthorizedStatusN01 Error401UnauthorizedStatus = 401
)

Defines values for Error401UnauthorizedStatus.

type Error401UnauthorizedType

type Error401UnauthorizedType string

`error`.

const (
	Error401UnauthorizedTypeError Error401UnauthorizedType = "error"
)

Defines values for Error401UnauthorizedType.

type Error404NotFound

type Error404NotFound struct {

	// `not_found`.
	Code *Error404NotFoundCode `json:"code,omitempty"`

	// A list of detail objects that further clarify the reason for the error.
	// Not every error supports more detail.
	Details *[]ErrorDetail `json:"details,omitempty"`

	// The resource could not be found.
	Message *Error404NotFoundMessage `json:"message,omitempty"`

	// `404`.
	Status *Error404NotFoundStatus `json:"status,omitempty"`

	// `error`.
	Type *Error404NotFoundType `json:"type,omitempty"`
}

Not Found Error (HTTP 404).

type Error404NotFoundCode

type Error404NotFoundCode string

`not_found`.

const (
	Error404NotFoundCodeNotFound Error404NotFoundCode = "not_found"
)

Defines values for Error404NotFoundCode.

type Error404NotFoundMessage

type Error404NotFoundMessage string

The resource could not be found.

const (
	Error404NotFoundMessageTheResourceCouldNotBeFound Error404NotFoundMessage = "The resource could not be found"
)

Defines values for Error404NotFoundMessage.

type Error404NotFoundStatus

type Error404NotFoundStatus int

`404`.

const (
	Error404NotFoundStatusN04 Error404NotFoundStatus = 404
)

Defines values for Error404NotFoundStatus.

type Error404NotFoundType

type Error404NotFoundType string

`error`.

const (
	Error404NotFoundTypeError Error404NotFoundType = "error"
)

Defines values for Error404NotFoundType.

type Error404PendingCreation

type Error404PendingCreation struct {

	// `pending_creation`.
	Code *Error404PendingCreationCode `json:"code,omitempty"`

	// A list of detail objects that further clarify the reason for the error.
	// Not every error supports more detail.
	Details *[]ErrorDetail `json:"details,omitempty"`

	// The resource is still pending.
	Message *Error404PendingCreationMessage `json:"message,omitempty"`

	// `404`.
	Status *Error404PendingCreationStatus `json:"status,omitempty"`

	// `error`.
	Type *Error404PendingCreationType `json:"type,omitempty"`
}

Pending Creation Error (HTTP 404).

type Error404PendingCreationCode

type Error404PendingCreationCode string

`pending_creation`.

const (
	Error404PendingCreationCodePendingCreation Error404PendingCreationCode = "pending_creation"
)

Defines values for Error404PendingCreationCode.

type Error404PendingCreationMessage

type Error404PendingCreationMessage string

The resource is still pending.

const (
	Error404PendingCreationMessageTheResourceIsStillPending Error404PendingCreationMessage = "The resource is still pending"
)

Defines values for Error404PendingCreationMessage.

type Error404PendingCreationStatus

type Error404PendingCreationStatus int

`404`.

const (
	Error404PendingCreationStatusN04 Error404PendingCreationStatus = 404
)

Defines values for Error404PendingCreationStatus.

type Error404PendingCreationType

type Error404PendingCreationType string

`error`.

const (
	Error404PendingCreationTypeError Error404PendingCreationType = "error"
)

Defines values for Error404PendingCreationType.

type Error409DuplicateRecord

type Error409DuplicateRecord struct {

	// `duplicate_record`.
	Code *Error409DuplicateRecordCode `json:"code,omitempty"`

	// A list of detail objects that further clarify the reason for the error.
	// Not every error supports more detail.
	Details *[]ErrorDetail `json:"details,omitempty"`

	// Further details on the field that triggered the error.
	Message *string `json:"message,omitempty"`

	// `409`.
	Status *Error409DuplicateRecordStatus `json:"status,omitempty"`

	// `error`.
	Type *Error409DuplicateRecordType `json:"type,omitempty"`
}

Duplicate Record Error (HTTP 409).

type Error409DuplicateRecordCode

type Error409DuplicateRecordCode string

`duplicate_record`.

const (
	Error409DuplicateRecordCodeDuplicateRecord Error409DuplicateRecordCode = "duplicate_record"
)

Defines values for Error409DuplicateRecordCode.

type Error409DuplicateRecordStatus

type Error409DuplicateRecordStatus int

`409`.

const (
	Error409DuplicateRecordStatusN09 Error409DuplicateRecordStatus = 409
)

Defines values for Error409DuplicateRecordStatus.

type Error409DuplicateRecordType

type Error409DuplicateRecordType string

`error`.

const (
	Error409DuplicateRecordTypeError Error409DuplicateRecordType = "error"
)

Defines values for Error409DuplicateRecordType.

type ErrorDetail

type ErrorDetail struct {

	// The location where the error caused an issue.
	Location *ErrorDetailLocation `json:"location,omitempty"`

	// A human readable message for this error detail.
	Message *string `json:"message,omitempty"`

	// The exact item for which the validation did not succeed. This is a JSON
	// pointer for request bodies, while for query, path, and header parameters
	// it is the name of the parameter.
	Pointer *string `json:"pointer,omitempty"`

	// A unique identifier for the type of error that occurred.
	Type *string `json:"type,omitempty"`
}

Additional detail about the part of a request body that caused an issue.

type ErrorDetailLocation

type ErrorDetailLocation string

The location where the error caused an issue.

const (
	ErrorDetailLocationBody ErrorDetailLocation = "body"

	ErrorDetailLocationHeader ErrorDetailLocation = "header"

	ErrorDetailLocationPath ErrorDetailLocation = "path"

	ErrorDetailLocationQuery ErrorDetailLocation = "query"
)

Defines values for ErrorDetailLocation.

type ErrorGeneric

type ErrorGeneric struct {

	// A custom code to further describe the type of error being returned. This code provides further specification within the HTTP `status` code and can be used by a program to define logic based on the error.
	Code *string `json:"code,omitempty"`

	// A list of detail objects that further clarify the reason for the error.
	// Not every error supports more detail.
	Details *[]ErrorDetail `json:"details,omitempty"`

	// A human readable message that describes the error. The content of this field should not be used to determine any business logic.
	Message *string `json:"message,omitempty"`

	// The HTTP status code of this error.
	Status *int32 `json:"status,omitempty"`

	// The type of this object. This is always `error`.
	Type *ErrorGenericType `json:"type,omitempty"`
}

A generic client error.

type ErrorGenericType

type ErrorGenericType string

The type of this object. This is always `error`.

const (
	ErrorGenericTypeError ErrorGenericType = "error"
)

Defines values for ErrorGenericType.

type GetBuyerResponse

type GetBuyerResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *Buyer
	JSON401      *Error401Unauthorized
	JSON404      *Error404NotFound
	JSONDefault  *ErrorGeneric
}

func ParseGetBuyerResponse

func ParseGetBuyerResponse(rsp *http.Response) (*GetBuyerResponse, error)

ParseGetBuyerResponse parses an HTTP response from a GetBuyerWithResponse call

func (GetBuyerResponse) Status

func (r GetBuyerResponse) Status() string

Status returns HTTPResponse.Status

func (GetBuyerResponse) StatusCode

func (r GetBuyerResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetCardRuleResponse

type GetCardRuleResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *CardRule
	JSON401      *Error401Unauthorized
	JSON404      *Error404NotFound
}

func ParseGetCardRuleResponse

func ParseGetCardRuleResponse(rsp *http.Response) (*GetCardRuleResponse, error)

ParseGetCardRuleResponse parses an HTTP response from a GetCardRuleWithResponse call

func (GetCardRuleResponse) Status

func (r GetCardRuleResponse) Status() string

Status returns HTTPResponse.Status

func (GetCardRuleResponse) StatusCode

func (r GetCardRuleResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetCurrentMerchantResponse

type GetCurrentMerchantResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *Merchant
	JSON401      *Error401Unauthorized
	JSON404      *Error404NotFound
}

func ParseGetCurrentMerchantResponse

func ParseGetCurrentMerchantResponse(rsp *http.Response) (*GetCurrentMerchantResponse, error)

ParseGetCurrentMerchantResponse parses an HTTP response from a GetCurrentMerchantWithResponse call

func (GetCurrentMerchantResponse) Status

Status returns HTTPResponse.Status

func (GetCurrentMerchantResponse) StatusCode

func (r GetCurrentMerchantResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetCurrentUserResponse

type GetCurrentUserResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *User
	JSON401      *Error401Unauthorized
}

func ParseGetCurrentUserResponse

func ParseGetCurrentUserResponse(rsp *http.Response) (*GetCurrentUserResponse, error)

ParseGetCurrentUserResponse parses an HTTP response from a GetCurrentUserWithResponse call

func (GetCurrentUserResponse) Status

func (r GetCurrentUserResponse) Status() string

Status returns HTTPResponse.Status

func (GetCurrentUserResponse) StatusCode

func (r GetCurrentUserResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetPaymentMethodResponse

type GetPaymentMethodResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *interface{}
	JSON401      *Error401Unauthorized
	JSON404      *Error404NotFound
}

func ParseGetPaymentMethodResponse

func ParseGetPaymentMethodResponse(rsp *http.Response) (*GetPaymentMethodResponse, error)

ParseGetPaymentMethodResponse parses an HTTP response from a GetPaymentMethodWithResponse call

func (GetPaymentMethodResponse) Status

func (r GetPaymentMethodResponse) Status() string

Status returns HTTPResponse.Status

func (GetPaymentMethodResponse) StatusCode

func (r GetPaymentMethodResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetPaymentServiceDefinitionResponse

type GetPaymentServiceDefinitionResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *PaymentServiceDefinition
	JSON401      *Error401Unauthorized
	JSON404      *Error404NotFound
}

func ParseGetPaymentServiceDefinitionResponse

func ParseGetPaymentServiceDefinitionResponse(rsp *http.Response) (*GetPaymentServiceDefinitionResponse, error)

ParseGetPaymentServiceDefinitionResponse parses an HTTP response from a GetPaymentServiceDefinitionWithResponse call

func (GetPaymentServiceDefinitionResponse) Status

Status returns HTTPResponse.Status

func (GetPaymentServiceDefinitionResponse) StatusCode

StatusCode returns HTTPResponse.StatusCode

type GetPaymentServiceResponse

type GetPaymentServiceResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *PaymentService
	JSON401      *Error401Unauthorized
	JSON404      *Error404NotFound
}

func ParseGetPaymentServiceResponse

func ParseGetPaymentServiceResponse(rsp *http.Response) (*GetPaymentServiceResponse, error)

ParseGetPaymentServiceResponse parses an HTTP response from a GetPaymentServiceWithResponse call

func (GetPaymentServiceResponse) Status

func (r GetPaymentServiceResponse) Status() string

Status returns HTTPResponse.Status

func (GetPaymentServiceResponse) StatusCode

func (r GetPaymentServiceResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetTransactionResponse

type GetTransactionResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *Transaction
	JSON401      *Error401Unauthorized
	JSON404      *interface{}
}

func ParseGetTransactionResponse

func ParseGetTransactionResponse(rsp *http.Response) (*GetTransactionResponse, error)

ParseGetTransactionResponse parses an HTTP response from a GetTransactionWithResponse call

func (GetTransactionResponse) Status

func (r GetTransactionResponse) Status() string

Status returns HTTPResponse.Status

func (GetTransactionResponse) StatusCode

func (r GetTransactionResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type HttpRequestDoer

type HttpRequestDoer interface {
	Do(req *http.Request) (*http.Response, error)
}

Doer performs HTTP requests.

The standard http.Client implements this interface.

type ListApiKeyPairsParams

type ListApiKeyPairsParams struct {

	// Defines the maximum number of items to return for this request.
	Limit *int32 `json:"limit,omitempty"`

	// A cursor that identifies the page of results to return. This is used to
	// paginate the results of this API.
	//
	// For the first page of results, this parameter can be left out.
	// For additional pages, use the value returned by the API in
	// the `next_cursor` field. Similarly the `previous_cursor` can be used to
	// reverse backwards in the list.
	Cursor *string `json:"cursor,omitempty"`
}

ListApiKeyPairsParams defines parameters for ListApiKeyPairs.

type ListApiKeyPairsResponse

type ListApiKeyPairsResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *APIKeyPairs
	JSON401      *Error401Unauthorized
}

func ParseListApiKeyPairsResponse

func ParseListApiKeyPairsResponse(rsp *http.Response) (*ListApiKeyPairsResponse, error)

ParseListApiKeyPairsResponse parses an HTTP response from a ListApiKeyPairsWithResponse call

func (ListApiKeyPairsResponse) Status

func (r ListApiKeyPairsResponse) Status() string

Status returns HTTPResponse.Status

func (ListApiKeyPairsResponse) StatusCode

func (r ListApiKeyPairsResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type ListBuyerPaymentMethodsParams

type ListBuyerPaymentMethodsParams struct {

	// Filters the results to only the items for which the `buyer` has an
	// `id` that matches this value.
	BuyerId *string `json:"buyer_id,omitempty"`

	// Filters the results to only the items for which the `buyer` has an
	// `external_identifier` that matches this value.
	BuyerExternalIdentifier *string `json:"buyer_external_identifier,omitempty"`

	// Filters the results to only the items which support this country code. A
	// country is formatted as 2-letter ISO country code.
	Country *string `json:"country,omitempty"`

	// Filters the results to only the items which support this currency code. A
	// currency is formatted as 3-letter ISO currency code.
	Currency *string `json:"currency,omitempty"`

	// Filters the results to only the items available in this environment.
	Environment *ListBuyerPaymentMethodsParamsEnvironment `json:"environment,omitempty"`
}

ListBuyerPaymentMethodsParams defines parameters for ListBuyerPaymentMethods.

type ListBuyerPaymentMethodsParamsEnvironment

type ListBuyerPaymentMethodsParamsEnvironment string

ListBuyerPaymentMethodsParamsEnvironment defines parameters for ListBuyerPaymentMethods.

type ListBuyerPaymentMethodsResponse

type ListBuyerPaymentMethodsResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *PaymentMethodsTokenized
	JSON401      *Error401Unauthorized
	JSON404      *Error404NotFound
}

func ParseListBuyerPaymentMethodsResponse

func ParseListBuyerPaymentMethodsResponse(rsp *http.Response) (*ListBuyerPaymentMethodsResponse, error)

ParseListBuyerPaymentMethodsResponse parses an HTTP response from a ListBuyerPaymentMethodsWithResponse call

func (ListBuyerPaymentMethodsResponse) Status

Status returns HTTPResponse.Status

func (ListBuyerPaymentMethodsResponse) StatusCode

func (r ListBuyerPaymentMethodsResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type ListBuyersParams

type ListBuyersParams struct {

	// Filters the results to only the buyers for which the `display_name` or
	// `external_identifier` matches this value. This field allows for a partial
	// match, matching any buyer for which either of the fields partially or
	// completely matches.
	Search *string `json:"search,omitempty"`

	// Defines the maximum number of items to return for this request.
	Limit *int32 `json:"limit,omitempty"`

	// A cursor that identifies the page of results to return. This is used to
	// paginate the results of this API.
	//
	// For the first page of results, this parameter can be left out.
	// For additional pages, use the value returned by the API in
	// the `next_cursor` field. Similarly the `previous_cursor` can be used to
	// reverse backwards in the list.
	Cursor *string `json:"cursor,omitempty"`
}

ListBuyersParams defines parameters for ListBuyers.

type ListBuyersResponse

type ListBuyersResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *Buyers
	JSON401      *Error401Unauthorized
}

func ParseListBuyersResponse

func ParseListBuyersResponse(rsp *http.Response) (*ListBuyersResponse, error)

ParseListBuyersResponse parses an HTTP response from a ListBuyersWithResponse call

func (ListBuyersResponse) Status

func (r ListBuyersResponse) Status() string

Status returns HTTPResponse.Status

func (ListBuyersResponse) StatusCode

func (r ListBuyersResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type ListCardsRulesParams

type ListCardsRulesParams struct {

	// Defines the maximum number of items to return for this request.
	Limit *int32 `json:"limit,omitempty"`

	// A cursor that identifies the page of results to return. This is used to
	// paginate the results of this API.
	//
	// For the first page of results, this parameter can be left out.
	// For additional pages, use the value returned by the API in
	// the `next_cursor` field. Similarly the `previous_cursor` can be used to
	// reverse backwards in the list.
	Cursor *string `json:"cursor,omitempty"`

	// Filters the results to only the items available in this environment.
	Environment *ListCardsRulesParamsEnvironment `json:"environment,omitempty"`
}

ListCardsRulesParams defines parameters for ListCardsRules.

type ListCardsRulesParamsEnvironment

type ListCardsRulesParamsEnvironment string

ListCardsRulesParamsEnvironment defines parameters for ListCardsRules.

type ListCardsRulesResponse

type ListCardsRulesResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *CardRules
	JSON401      *Error401Unauthorized
}

func ParseListCardsRulesResponse

func ParseListCardsRulesResponse(rsp *http.Response) (*ListCardsRulesResponse, error)

ParseListCardsRulesResponse parses an HTTP response from a ListCardsRulesWithResponse call

func (ListCardsRulesResponse) Status

func (r ListCardsRulesResponse) Status() string

Status returns HTTPResponse.Status

func (ListCardsRulesResponse) StatusCode

func (r ListCardsRulesResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type ListPaymentMethodsParams

type ListPaymentMethodsParams struct {

	// Filters the results to only the items available in this environment.
	Environment *ListPaymentMethodsParamsEnvironment `json:"environment,omitempty"`

	// Filters the results to only the items for which the `buyer` has an
	// `id` that matches this value.
	BuyerId *string `json:"buyer_id,omitempty"`

	// Filters the results to only the items for which the `buyer` has an
	// `external_identifier` that matches this value.
	BuyerExternalIdentifier *string `json:"buyer_external_identifier,omitempty"`

	// Defines the maximum number of items to return for this request.
	Limit *int32 `json:"limit,omitempty"`

	// A cursor that identifies the page of results to return. This is used to
	// paginate the results of this API.
	//
	// For the first page of results, this parameter can be left out.
	// For additional pages, use the value returned by the API in
	// the `next_cursor` field. Similarly the `previous_cursor` can be used to
	// reverse backwards in the list.
	Cursor *string `json:"cursor,omitempty"`
}

ListPaymentMethodsParams defines parameters for ListPaymentMethods.

type ListPaymentMethodsParamsEnvironment

type ListPaymentMethodsParamsEnvironment string

ListPaymentMethodsParamsEnvironment defines parameters for ListPaymentMethods.

type ListPaymentMethodsResponse

type ListPaymentMethodsResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *PaymentMethods
	JSON401      *Error401Unauthorized
}

func ParseListPaymentMethodsResponse

func ParseListPaymentMethodsResponse(rsp *http.Response) (*ListPaymentMethodsResponse, error)

ParseListPaymentMethodsResponse parses an HTTP response from a ListPaymentMethodsWithResponse call

func (ListPaymentMethodsResponse) Status

Status returns HTTPResponse.Status

func (ListPaymentMethodsResponse) StatusCode

func (r ListPaymentMethodsResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type ListPaymentOptionsParams

type ListPaymentOptionsParams struct {

	// Filters the results to only the items which support this country code. A
	// country is formatted as 2-letter ISO country code.
	Country *string `json:"country,omitempty"`

	// Filters the results to only the items which support this currency code. A
	// currency is formatted as 3-letter ISO currency code.
	Currency *string `json:"currency,omitempty"`

	// Filters the results to only the items available in this environment.
	Environment *ListPaymentOptionsParamsEnvironment `json:"environment,omitempty"`
}

ListPaymentOptionsParams defines parameters for ListPaymentOptions.

type ListPaymentOptionsParamsEnvironment

type ListPaymentOptionsParamsEnvironment string

ListPaymentOptionsParamsEnvironment defines parameters for ListPaymentOptions.

type ListPaymentOptionsResponse

type ListPaymentOptionsResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *PaymentOptions
	JSON400      *Error400BadRequest
	JSON401      *Error401Unauthorized
}

func ParseListPaymentOptionsResponse

func ParseListPaymentOptionsResponse(rsp *http.Response) (*ListPaymentOptionsResponse, error)

ParseListPaymentOptionsResponse parses an HTTP response from a ListPaymentOptionsWithResponse call

func (ListPaymentOptionsResponse) Status

Status returns HTTPResponse.Status

func (ListPaymentOptionsResponse) StatusCode

func (r ListPaymentOptionsResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type ListPaymentServiceDefinitionsParams

type ListPaymentServiceDefinitionsParams struct {

	// Defines the maximum number of items to return for this request.
	Limit *int32 `json:"limit,omitempty"`

	// A cursor that identifies the page of results to return. This is used to
	// paginate the results of this API.
	//
	// For the first page of results, this parameter can be left out.
	// For additional pages, use the value returned by the API in
	// the `next_cursor` field. Similarly the `previous_cursor` can be used to
	// reverse backwards in the list.
	Cursor *string `json:"cursor,omitempty"`
}

ListPaymentServiceDefinitionsParams defines parameters for ListPaymentServiceDefinitions.

type ListPaymentServiceDefinitionsResponse

type ListPaymentServiceDefinitionsResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *PaymentServiceDefinitions
	JSON401      *Error401Unauthorized
}

func ParseListPaymentServiceDefinitionsResponse

func ParseListPaymentServiceDefinitionsResponse(rsp *http.Response) (*ListPaymentServiceDefinitionsResponse, error)

ParseListPaymentServiceDefinitionsResponse parses an HTTP response from a ListPaymentServiceDefinitionsWithResponse call

func (ListPaymentServiceDefinitionsResponse) Status

Status returns HTTPResponse.Status

func (ListPaymentServiceDefinitionsResponse) StatusCode

StatusCode returns HTTPResponse.StatusCode

type ListPaymentServicesParams

type ListPaymentServicesParams struct {

	// Defines the maximum number of items to return for this request.
	Limit *int32 `json:"limit,omitempty"`

	// A cursor that identifies the page of results to return. This is used to
	// paginate the results of this API.
	//
	// For the first page of results, this parameter can be left out.
	// For additional pages, use the value returned by the API in
	// the `next_cursor` field. Similarly the `previous_cursor` can be used to
	// reverse backwards in the list.
	Cursor *string `json:"cursor,omitempty"`

	// Filters the results to only the items for which the `method` has been set to
	// this value.
	Method *ListPaymentServicesParamsMethod `json:"method,omitempty"`

	// Filters the results to only the items available in this environment.
	Environment *ListPaymentServicesParamsEnvironment `json:"environment,omitempty"`
}

ListPaymentServicesParams defines parameters for ListPaymentServices.

type ListPaymentServicesParamsEnvironment

type ListPaymentServicesParamsEnvironment string

ListPaymentServicesParamsEnvironment defines parameters for ListPaymentServices.

type ListPaymentServicesParamsMethod

type ListPaymentServicesParamsMethod string

ListPaymentServicesParamsMethod defines parameters for ListPaymentServices.

type ListPaymentServicesResponse

type ListPaymentServicesResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *PaymentServices
	JSON401      *Error401Unauthorized
}

func ParseListPaymentServicesResponse

func ParseListPaymentServicesResponse(rsp *http.Response) (*ListPaymentServicesResponse, error)

ParseListPaymentServicesResponse parses an HTTP response from a ListPaymentServicesWithResponse call

func (ListPaymentServicesResponse) Status

Status returns HTTPResponse.Status

func (ListPaymentServicesResponse) StatusCode

func (r ListPaymentServicesResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type ListTransactionsParams

type ListTransactionsParams struct {

	// Filters the transactions to only the items for which the `id` or
	// `external_identifier` matches this value. This field allows for a partial
	// match, matching any transaction for which either of the fields partially or
	// completely matches.
	Search *string `json:"search,omitempty"`

	// Filters the results to only the transactions for which the `status`
	// matches this value.
	TransactionStatus *ListTransactionsParamsTransactionStatus `json:"transaction_status,omitempty"`

	// Filters the results to only transactions created before this ISO date-time string.
	BeforeCreatedAt *string `json:"before_created_at,omitempty"`

	// Filters the results to only transactions created after this ISO date-time string.
	AfterCreatedAt *string `json:"after_created_at,omitempty"`

	// Filters the results to only transactions last updated before this ISO
	// date-time string.
	BeforeUpdatedAt *string `json:"before_updated_at,omitempty"`

	// Filters the results to only transactions last updated after this ISO
	// date-time string.
	AfterUpdatedAt *string `json:"after_updated_at,omitempty"`

	// Defines the maximum number of items to return for this request.
	Limit *int32 `json:"limit,omitempty"`

	// A cursor that identifies the page of results to return. This is used to
	// paginate the results of this API.
	//
	// For the first page of results, this parameter can be left out.
	// For additional pages, use the value returned by the API in
	// the `next_cursor` field. Similarly the `previous_cursor` can be used to
	// reverse backwards in the list.
	Cursor *string `json:"cursor,omitempty"`
}

ListTransactionsParams defines parameters for ListTransactions.

type ListTransactionsParamsTransactionStatus

type ListTransactionsParamsTransactionStatus string

ListTransactionsParamsTransactionStatus defines parameters for ListTransactions.

type ListTransactionsResponse

type ListTransactionsResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *Transactions
	JSON401      *Error401Unauthorized
}

func ParseListTransactionsResponse

func ParseListTransactionsResponse(rsp *http.Response) (*ListTransactionsResponse, error)

ParseListTransactionsResponse parses an HTTP response from a ListTransactionsWithResponse call

func (ListTransactionsResponse) Status

func (r ListTransactionsResponse) Status() string

Status returns HTTPResponse.Status

func (ListTransactionsResponse) StatusCode

func (r ListTransactionsResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type LoginJSONBody

type LoginJSONBody SessionRequest

LoginJSONBody defines parameters for Login.

type LoginJSONRequestBody

type LoginJSONRequestBody LoginJSONBody

LoginJSONRequestBody defines body for Login for application/json ContentType.

type LoginResponse

type LoginResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *Session
	JSON400      *interface{}
	JSON401      *Error401Unauthorized
}

func ParseLoginResponse

func ParseLoginResponse(rsp *http.Response) (*LoginResponse, error)

ParseLoginResponse parses an HTTP response from a LoginWithResponse call

func (LoginResponse) Status

func (r LoginResponse) Status() string

Status returns HTTPResponse.Status

func (LoginResponse) StatusCode

func (r LoginResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type LogoutResponse

type LogoutResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON401      *Error401Unauthorized
}

func ParseLogoutResponse

func ParseLogoutResponse(rsp *http.Response) (*LogoutResponse, error)

ParseLogoutResponse parses an HTTP response from a LogoutWithResponse call

func (LogoutResponse) Status

func (r LogoutResponse) Status() string

Status returns HTTPResponse.Status

func (LogoutResponse) StatusCode

func (r LogoutResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type Merchant

type Merchant struct {

	// The name of this merchant as it will be displayed in the admin UI.
	DisplayName *string `json:"display_name,omitempty"`

	// The unique short-name of the merchant.
	Id *string `json:"id,omitempty"`

	// `merchant`.
	Type *MerchantType `json:"type,omitempty"`
}

A merchant.

type MerchantType

type MerchantType string

`merchant`.

const (
	MerchantTypeMerchant MerchantType = "merchant"
)

Defines values for MerchantType.

type PayPal

type PayPal struct {

	// The optional buyer for which this payment method has been stored.
	Buyer *struct {
		// Embedded struct due to allOf(#/components/schemas/Buyer)
		Buyer `yaml:",inline"`
	} `json:"buyer"`

	// The date and time when this payment method was first created in our
	// system.
	CreatedAt *time.Time `json:"created_at,omitempty"`

	// Additional details about a stored PayPal account.
	Details *PayPalDetails `json:"details,omitempty"`

	// The environment this payment method has been stored for. This will be null
	// of the payment method was not stored.
	Environment *PayPalEnvironment `json:"environment"`

	// An external identifier that can be used to match the payment method
	// against your own records.
	ExternalIdentifier *string `json:"external_identifier"`

	// The unique ID of the payment method.
	Id *string `json:"id,omitempty"`

	// `paypal`.
	Method *PayPalMethod `json:"method,omitempty"`

	// The state of the account tokenization. After the first call this will
	// be set to `buyer_approval_pending` and the response will include
	// an `approval_url`. The buyer needs to be redirected to this URL
	// to authorize the future payments.
	Status *PayPalStatus `json:"status,omitempty"`

	// `payment-method`.
	Type *PayPalType `json:"type,omitempty"`

	// The date and time when this payment method was last updated in our system.
	UpdatedAt *time.Time `json:"updated_at,omitempty"`
}

A stored PayPal account.

type PayPalDetails

type PayPalDetails struct {

	// The optional URL that the buyer needs to be redirected to to further authorize their PayPal payments.
	ApprovalUrl *string `json:"approval_url"`

	// The email address associated to the PayPal account.
	EmailAddress *string `json:"email_address"`
}

Additional details about a stored PayPal account.

type PayPalEnvironment

type PayPalEnvironment string

The environment this payment method has been stored for. This will be null of the payment method was not stored.

const (
	PayPalEnvironmentDevelopment PayPalEnvironment = "development"

	PayPalEnvironmentProduction PayPalEnvironment = "production"

	PayPalEnvironmentStaging PayPalEnvironment = "staging"
)

Defines values for PayPalEnvironment.

type PayPalMethod

type PayPalMethod string

`paypal`.

const (
	PayPalMethodPaypal PayPalMethod = "paypal"
)

Defines values for PayPalMethod.

type PayPalRequest

type PayPalRequest struct {

	// The `external_identifier` of the buyer to associate this payment method
	// to. If this field is provided then the `buyer_id` field
	// needs to be unset.
	BuyerExternalIdentifier *string `json:"buyer_external_identifier,omitempty"`

	// The ID of the buyer to associate this payment method to. If this field is
	// provided then the `buyer_external_identifier` field needs to be unset.
	BuyerId *string `json:"buyer_id,omitempty"`

	// An external identifier that can be used to match the account against your own records.
	ExternalIdentifier *string `json:"external_identifier"`

	// `paypal`.
	Method PayPalRequestMethod `json:"method"`

	// The redirect URL to redirect a buyer to after they have authorized their
	// PayPal transaction.
	RedirectUrl string `json:"redirect_url"`
}

PayPal request to use in a transaction or to register a new payment method.

type PayPalRequestMethod

type PayPalRequestMethod string

`paypal`.

const (
	PayPalRequestMethodPaypal PayPalRequestMethod = "paypal"
)

Defines values for PayPalRequestMethod.

type PayPalStatus

type PayPalStatus string

The state of the account tokenization. After the first call this will be set to `buyer_approval_pending` and the response will include an `approval_url`. The buyer needs to be redirected to this URL to authorize the future payments.

const (
	PayPalStatusBuyerApprovalDeclined PayPalStatus = "buyer_approval_declined"

	PayPalStatusBuyerApprovalPending PayPalStatus = "buyer_approval_pending"

	PayPalStatusBuyerApprovalTimedout PayPalStatus = "buyer_approval_timedout"

	PayPalStatusBuyerApproved PayPalStatus = "buyer_approved"

	PayPalStatusProcessing PayPalStatus = "processing"

	PayPalStatusProcessingFailed PayPalStatus = "processing_failed"

	PayPalStatusStored PayPalStatus = "stored"

	PayPalStatusUsed PayPalStatus = "used"
)

Defines values for PayPalStatus.

type PayPalType

type PayPalType string

`payment-method`.

const (
	PayPalTypePaymentMethod PayPalType = "payment-method"
)

Defines values for PayPalType.

type PaymentMethods

type PaymentMethods struct {

	// A list of stored payment methods.
	Items *[]Card `json:"items,omitempty"`

	// The limit applied to request. This represents the number of items that are at
	// maximum returned by this request.
	Limit *int32 `json:"limit,omitempty"`

	// The cursor that represents the next page of results. Use the `cursor` query
	// parameter to fetch this page of items.
	NextCursor *string `json:"next_cursor"`

	// The cursor that represents the next page of results. Use the `cursor` query
	// parameter to fetch this page of items.
	PreviousCursor *string `json:"previous_cursor"`
}

A list of stored payment methods.

type PaymentMethodsTokenized

type PaymentMethodsTokenized struct {

	// A list of stored payment methods in token format.
	Items *[]CardTokenized `json:"items,omitempty"`

	// The limit applied to request. This represents the number of items that are at
	// maximum returned by this request.
	Limit *int32 `json:"limit,omitempty"`

	// The cursor that represents the next page of results. Use the `cursor` query
	// parameter to fetch this page of items.
	NextCursor *string `json:"next_cursor"`

	// The cursor that represents the next page of results. Use the `cursor` query
	// parameter to fetch this page of items.
	PreviousCursor *string `json:"previous_cursor"`
}

A list of stored payment methods in token format.

type PaymentOption

type PaymentOption struct {

	// The type of payment method that is available.
	Method *PaymentOptionMethod `json:"method,omitempty"`

	// `payment-option`.
	Type *PaymentOptionType `json:"type,omitempty"`
}

An available payment option for a locale.

type PaymentOptionMethod

type PaymentOptionMethod string

The type of payment method that is available.

const (
	PaymentOptionMethodCard PaymentOptionMethod = "card"

	PaymentOptionMethodPaypal PaymentOptionMethod = "paypal"
)

Defines values for PaymentOptionMethod.

type PaymentOptionType

type PaymentOptionType string

`payment-option`.

const (
	PaymentOptionTypePaymentOption PaymentOptionType = "payment-option"
)

Defines values for PaymentOptionType.

type PaymentOptions

type PaymentOptions struct {
	Items *[]PaymentOption `json:"items,omitempty"`
}

A list of payment options.

type PaymentService

type PaymentService struct {

	// A list of countries for which this service is enabled, in ISO two-letter
	// code format.
	AcceptedCountries *[]string `json:"accepted_countries,omitempty"`

	// A list of currencies for which this service is enabled, in ISO 4217
	// three-letter code format.
	AcceptedCurrencies *[]string `json:"accepted_currencies,omitempty"`

	// Defines if this service is currently active or not.
	Active *bool `json:"active,omitempty"`

	// The date and time when this service was created.
	CreatedAt *time.Time `json:"created_at,omitempty"`

	// Defines if the credentials are intended for the service's live API or
	// sandbox/test API.
	CredentialsMode *PaymentServiceCredentialsMode `json:"credentials_mode,omitempty"`

	// The custom name set for this service.
	DisplayName *string `json:"display_name,omitempty"`

	// Determines the Gr4vy environments in which this service should be
	// available. This can be used in combination with the `environment`
	// parameters in the payment method and transaction APIs to route
	// transactions through this service.
	Environments *[]PaymentServiceEnvironments `json:"environments,omitempty"`

	// The ID of this payment service.
	Id *string `json:"id,omitempty"`

	// Defines the ID of the payment method that this service handles.
	Method *PaymentServiceMethod `json:"method,omitempty"`

	// The ID of the payment service definition used to create this service.
	PaymentServiceDefinitionId *string `json:"payment_service_definition_id,omitempty"`

	// The numeric rank of a payment service. Payment services with a lower
	// position value are processed first.
	Position *float32 `json:"position,omitempty"`

	// The current status of this service. This will start off as pending, move
	// to created, and might eventually move to an error status if and when the
	// credentials are no longer valid.
	Status *PaymentServiceStatus `json:"status,omitempty"`

	// The type of this resource.
	Type *PaymentServiceType `json:"type,omitempty"`

	// The date and time when this service was last updated.
	UpdatedAt *time.Time `json:"updated_at,omitempty"`
}

An active, configured payment service.

type PaymentServiceCredentialsMode

type PaymentServiceCredentialsMode string

Defines if the credentials are intended for the service's live API or sandbox/test API.

const (
	PaymentServiceCredentialsModeLive PaymentServiceCredentialsMode = "live"

	PaymentServiceCredentialsModeSandbox PaymentServiceCredentialsMode = "sandbox"
)

Defines values for PaymentServiceCredentialsMode.

type PaymentServiceDefinition

type PaymentServiceDefinition struct {

	// The display name of this service.
	DisplayName *string `json:"display_name,omitempty"`

	// A list of fields that need to be submitted when activating the payment. service.
	Fields *[]struct {

		// The name to display for a field in the dashboard.
		DisplayName *string `json:"display_name,omitempty"`

		// Defines the type of input that needs to be rendered for this field.
		Format *string `json:"format,omitempty"`

		// The key of a field that needs to be submitted.
		Key *string `json:"key,omitempty"`

		// Defines if this field is required when the service is created.
		Required *bool `json:"required,omitempty"`
	} `json:"fields,omitempty"`

	// The ID of the payment service. This is the underlying provider followed by a dash followed by the payment method ID.
	Id *string `json:"id,omitempty"`

	// The ID of the payment method that this services handles.
	Method *PaymentServiceDefinitionMethod `json:"method,omitempty"`

	// A list of two-letter ISO country codes that this service supports.
	SupportedCountries *[]string `json:"supported_countries,omitempty"`

	// A list of three-letter ISO currency codes that this service supports.
	SupportedCurrencies *[]string `json:"supported_currencies,omitempty"`

	// `payment-service-definition`.
	Type *string `json:"type,omitempty"`
}

An available payment service that can be configured.

type PaymentServiceDefinitionMethod

type PaymentServiceDefinitionMethod string

The ID of the payment method that this services handles.

const (
	PaymentServiceDefinitionMethodCard PaymentServiceDefinitionMethod = "card"

	PaymentServiceDefinitionMethodPaypal PaymentServiceDefinitionMethod = "paypal"
)

Defines values for PaymentServiceDefinitionMethod.

type PaymentServiceDefinitions

type PaymentServiceDefinitions struct {
	Items *[]PaymentServiceDefinition `json:"items,omitempty"`

	// The limit applied to request. This represents the number of items that are at
	// maximum returned by this request.
	Limit *int32 `json:"limit,omitempty"`

	// The cursor that represents the next page of results. Use the `cursor` query
	// parameter to fetch this page of items.
	NextCursor *string `json:"next_cursor"`

	// The cursor that represents the next page of results. Use the `cursor` query
	// parameter to fetch this page of items.
	PreviousCursor *string `json:"previous_cursor"`
}

A list of available payment services definitions.

type PaymentServiceEnvironments

type PaymentServiceEnvironments string

PaymentServiceEnvironments defines model for PaymentService.Environments.

const (
	PaymentServiceEnvironmentsDevelopment PaymentServiceEnvironments = "development"

	PaymentServiceEnvironmentsProduction PaymentServiceEnvironments = "production"

	PaymentServiceEnvironmentsStaging PaymentServiceEnvironments = "staging"
)

Defines values for PaymentServiceEnvironments.

type PaymentServiceMethod

type PaymentServiceMethod string

Defines the ID of the payment method that this service handles.

const (
	PaymentServiceMethodCard PaymentServiceMethod = "card"

	PaymentServiceMethodPaypal PaymentServiceMethod = "paypal"
)

Defines values for PaymentServiceMethod.

type PaymentServiceRequest

type PaymentServiceRequest struct {
	// Embedded struct due to allOf(#/components/schemas/PaymentServiceUpdate)
	PaymentServiceUpdate `yaml:",inline"`

	// The ID of the payment service to use.
	PaymentServiceDefinitionId *string `json:"payment_service_definition_id,omitempty"`
}

PaymentServiceRequest defines model for PaymentServiceRequest.

type PaymentServiceStatus

type PaymentServiceStatus string

The current status of this service. This will start off as pending, move to created, and might eventually move to an error status if and when the credentials are no longer valid.

const (
	PaymentServiceStatusCreated PaymentServiceStatus = "created"

	PaymentServiceStatusFailed PaymentServiceStatus = "failed"

	PaymentServiceStatusPending PaymentServiceStatus = "pending"
)

Defines values for PaymentServiceStatus.

type PaymentServiceType

type PaymentServiceType string

The type of this resource.

const (
	PaymentServiceTypePaymentService PaymentServiceType = "payment-service"
)

Defines values for PaymentServiceType.

type PaymentServiceUpdate

type PaymentServiceUpdate struct {

	// A list of countries that this payment service needs to support in ISO two-letter code format.
	AcceptedCountries *[]string `json:"accepted_countries,omitempty"`

	// A list of currencies that this payment service needs to support in ISO 4217 three-letter code format.
	AcceptedCurrencies *[]string `json:"accepted_currencies,omitempty"`

	// Defines if this service is currently active or not.
	Active *bool `json:"active,omitempty"`

	// Defines if the credentials are intended for the service's live API or
	// sandbox/test API.
	CredentialsMode *PaymentServiceUpdateCredentialsMode `json:"credentials_mode,omitempty"`

	// A custom name for the payment service. This will be shown in the Admin UI.
	DisplayName *string `json:"display_name,omitempty"`

	// Determines the Gr4vy environments in which this service should be
	// available. This can be used in combination with the `environment`
	// parameters in the payment method and transaction APIs to route
	// transactions through this service.
	Environments *[]PaymentServiceUpdateEnvironments `json:"environments,omitempty"`

	// A list of fields, each containing a key-value pair for each field defined by the definition for this payment service.
	Fields *[]struct {

		// The key of the field to set a value for.
		Key string `json:"key"`

		// The value of a field to set.
		Value string `json:"value"`
	} `json:"fields,omitempty"`

	// The numeric rank of a payment service. Payment services with a lower
	// position value are processed first. When a payment services is inserted at
	// a position, any payment services with the the same value or higher are
	// shifted down a position accordingly. When left out, the payment service is
	// inserted at the end of the list.
	Position *float32 `json:"position,omitempty"`
}

Request body for updating an active payment service.

type PaymentServiceUpdateCredentialsMode

type PaymentServiceUpdateCredentialsMode string

Defines if the credentials are intended for the service's live API or sandbox/test API.

const (
	PaymentServiceUpdateCredentialsModeLive PaymentServiceUpdateCredentialsMode = "live"

	PaymentServiceUpdateCredentialsModeSandbox PaymentServiceUpdateCredentialsMode = "sandbox"
)

Defines values for PaymentServiceUpdateCredentialsMode.

type PaymentServiceUpdateEnvironments

type PaymentServiceUpdateEnvironments string

PaymentServiceUpdateEnvironments defines model for PaymentServiceUpdate.Environments.

const (
	PaymentServiceUpdateEnvironmentsDevelopment PaymentServiceUpdateEnvironments = "development"

	PaymentServiceUpdateEnvironmentsProduction PaymentServiceUpdateEnvironments = "production"

	PaymentServiceUpdateEnvironmentsStaging PaymentServiceUpdateEnvironments = "staging"
)

Defines values for PaymentServiceUpdateEnvironments.

type PaymentServices

type PaymentServices struct {
	Items *[]PaymentService `json:"items,omitempty"`

	// The limit applied to request. This represents the number of items that are at
	// maximum returned by this request.
	Limit *int32 `json:"limit,omitempty"`

	// The cursor that represents the next page of results. Use the `cursor` query
	// parameter to fetch this page of items.
	NextCursor *string `json:"next_cursor"`

	// The cursor that represents the next page of results. Use the `cursor` query
	// parameter to fetch this page of items.
	PreviousCursor *string `json:"previous_cursor"`
}

A list of active, configured payment services.

type RedirectTransactionApprovalResponse

type RedirectTransactionApprovalResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON404      *Error404NotFound
}

func ParseRedirectTransactionApprovalResponse

func ParseRedirectTransactionApprovalResponse(rsp *http.Response) (*RedirectTransactionApprovalResponse, error)

ParseRedirectTransactionApprovalResponse parses an HTTP response from a RedirectTransactionApprovalWithResponse call

func (RedirectTransactionApprovalResponse) Status

Status returns HTTPResponse.Status

func (RedirectTransactionApprovalResponse) StatusCode

StatusCode returns HTTPResponse.StatusCode

type RefreshSessionResponse

type RefreshSessionResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *Session
	JSON400      *interface{}
	JSON401      *Error401Unauthorized
}

func ParseRefreshSessionResponse

func ParseRefreshSessionResponse(rsp *http.Response) (*RefreshSessionResponse, error)

ParseRefreshSessionResponse parses an HTTP response from a RefreshSessionWithResponse call

func (RefreshSessionResponse) Status

func (r RefreshSessionResponse) Status() string

Status returns HTTPResponse.Status

func (RefreshSessionResponse) StatusCode

func (r RefreshSessionResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type RefundTransactionResponse

type RefundTransactionResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *Transaction
	JSON401      *Error401Unauthorized
	JSON404      *interface{}
}

func ParseRefundTransactionResponse

func ParseRefundTransactionResponse(rsp *http.Response) (*RefundTransactionResponse, error)

ParseRefundTransactionResponse parses an HTTP response from a RefundTransactionWithResponse call

func (RefundTransactionResponse) Status

func (r RefundTransactionResponse) Status() string

Status returns HTTPResponse.Status

func (RefundTransactionResponse) StatusCode

func (r RefundTransactionResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type RequestEditorFn

type RequestEditorFn func(ctx context.Context, req *http.Request) error

RequestEditorFn is the function signature for the RequestEditor callback function

type ServerInterface

type ServerInterface interface {
	// List API key-pairs
	// (GET /api-key-pairs)
	ListApiKeyPairs(ctx echo.Context, params ListApiKeyPairsParams) error
	// Create an API key-pair
	// (POST /api-key-pairs)
	CreateApiKeyPair(ctx echo.Context) error
	// Delete an API key-pair
	// (DELETE /api-key-pairs/{api_key_pair_id})
	DeleteApiKeyPair(ctx echo.Context, apiKeyPairId string) error
	// Store a new payment method
	// (POST /async/payment-methods)
	AsyncStorePaymentMethod(ctx echo.Context) error
	// Create transaction
	// (POST /async/transactions)
	AsyncCreateTransaction(ctx echo.Context) error
	// Batch capture transactions
	// (POST /async/transactions/batch-capture)
	AsyncBatchCaptureTransactions(ctx echo.Context) error
	// Authorize approved transaction
	// (POST /async/transactions/{transaction_id}/authorize)
	AsyncAuthorizeTransaction(ctx echo.Context, transactionId string) error
	// Capture transaction
	// (POST /async/transactions/{transaction_id}/capture)
	AsyncCaptureTransaction(ctx echo.Context, transactionId string) error
	// Ends a user session (Logout)
	// (DELETE /auth/sessions)
	Logout(ctx echo.Context) error
	// Create a user session (Login)
	// (POST /auth/sessions)
	Login(ctx echo.Context) error
	// Renew a user session
	// (PUT /auth/sessions)
	RefreshSession(ctx echo.Context) error
	// List buyers
	// (GET /buyers)
	ListBuyers(ctx echo.Context, params ListBuyersParams) error
	// New buyer
	// (POST /buyers)
	AddBuyer(ctx echo.Context) error
	// List stored payment methods for a buyer
	// (GET /buyers/payment-methods)
	ListBuyerPaymentMethods(ctx echo.Context, params ListBuyerPaymentMethodsParams) error
	// Delete buyer
	// (DELETE /buyers/{buyer_id})
	DeleteBuyer(ctx echo.Context, buyerId string) error
	// Get buyer
	// (GET /buyers/{buyer_id})
	GetBuyer(ctx echo.Context, buyerId string) error
	// Update buyer
	// (PUT /buyers/{buyer_id})
	UpdateBuyer(ctx echo.Context, buyerId string) error
	// List card rules
	// (GET /card-rules)
	ListCardsRules(ctx echo.Context, params ListCardsRulesParams) error
	// Create card rule
	// (POST /card-rules)
	AddCardRule(ctx echo.Context) error
	// Delete card rule
	// (DELETE /card-rules/{card_rule_id})
	DeleteCardRule(ctx echo.Context, cardRuleId string) error
	// Get card rule
	// (GET /card-rules/{card_rule_id})
	GetCardRule(ctx echo.Context, cardRuleId string) error
	// Update card rule
	// (PUT /card-rules/{card_rule_id})
	UpdateCardRule(ctx echo.Context, cardRuleId string) error
	// Get current merchant details
	// (GET /merchants/main)
	GetCurrentMerchant(ctx echo.Context) error
	// List payment methods
	// (GET /payment-methods)
	ListPaymentMethods(ctx echo.Context, params ListPaymentMethodsParams) error
	// New payment method
	// (POST /payment-methods)
	StorePaymentMethod(ctx echo.Context) error
	// Delete payment method
	// (DELETE /payment-methods/{payment_method_id})
	DeletePaymentMethod(ctx echo.Context, paymentMethodId string) error
	// Get stored payment method
	// (GET /payment-methods/{payment_method_id})
	GetPaymentMethod(ctx echo.Context, paymentMethodId string) error
	// List payment options
	// (GET /payment-options)
	ListPaymentOptions(ctx echo.Context, params ListPaymentOptionsParams) error
	// List payment service definitions
	// (GET /payment-service-definitions)
	ListPaymentServiceDefinitions(ctx echo.Context, params ListPaymentServiceDefinitionsParams) error
	// Get payment service definition
	// (GET /payment-service-definitions/{payment_service_definition_id})
	GetPaymentServiceDefinition(ctx echo.Context, paymentServiceDefinitionId string) error
	// List payment services
	// (GET /payment-services)
	ListPaymentServices(ctx echo.Context, params ListPaymentServicesParams) error
	// New payment service
	// (POST /payment-services)
	AddPaymentService(ctx echo.Context) error
	// Delete payment service
	// (DELETE /payment-services/{payment_service_id})
	DeletePaymentService(ctx echo.Context, paymentServiceId string) error
	// Get payment service
	// (GET /payment-services/{payment_service_id})
	GetPaymentService(ctx echo.Context, paymentServiceId string) error
	// Update payment service
	// (PUT /payment-services/{payment_service_id})
	UpdatePaymentService(ctx echo.Context, paymentServiceId string) error
	// List transactions
	// (GET /transactions)
	ListTransactions(ctx echo.Context, params ListTransactionsParams) error
	// New transaction
	// (POST /transactions)
	AuthorizeNewTransaction(ctx echo.Context) error
	// Approve payment method
	// (GET /transactions/approvals/{transaction_approval_token})
	RedirectTransactionApproval(ctx echo.Context, transactionApprovalToken string) error
	// Get transaction
	// (GET /transactions/{transaction_id})
	GetTransaction(ctx echo.Context, transactionId string) error
	// Buyer approval callback
	// (GET /transactions/{transaction_id}/approve)
	ApproveTransaction(ctx echo.Context, transactionId string) error
	// Authorize approved transaction
	// (POST /transactions/{transaction_id}/authorize)
	AuthorizeTransaction(ctx echo.Context, transactionId string) error
	// Capture transaction
	// (POST /transactions/{transaction_id}/capture)
	CaptureTransaction(ctx echo.Context, transactionId string) error
	// Refund or void transaction
	// (POST /transactions/{transaction_id}/refund)
	RefundTransaction(ctx echo.Context, transactionId string) error
	// Get current
	// (GET /users/me)
	GetCurrentUser(ctx echo.Context) error
}

ServerInterface represents all server handlers.

type ServerInterfaceWrapper

type ServerInterfaceWrapper struct {
	Handler ServerInterface
}

ServerInterfaceWrapper converts echo contexts to parameters.

func (*ServerInterfaceWrapper) AddBuyer

func (w *ServerInterfaceWrapper) AddBuyer(ctx echo.Context) error

AddBuyer converts echo context to params.

func (*ServerInterfaceWrapper) AddCardRule

func (w *ServerInterfaceWrapper) AddCardRule(ctx echo.Context) error

AddCardRule converts echo context to params.

func (*ServerInterfaceWrapper) AddPaymentService

func (w *ServerInterfaceWrapper) AddPaymentService(ctx echo.Context) error

AddPaymentService converts echo context to params.

func (*ServerInterfaceWrapper) ApproveTransaction

func (w *ServerInterfaceWrapper) ApproveTransaction(ctx echo.Context) error

ApproveTransaction converts echo context to params.

func (*ServerInterfaceWrapper) AsyncAuthorizeTransaction

func (w *ServerInterfaceWrapper) AsyncAuthorizeTransaction(ctx echo.Context) error

AsyncAuthorizeTransaction converts echo context to params.

func (*ServerInterfaceWrapper) AsyncBatchCaptureTransactions

func (w *ServerInterfaceWrapper) AsyncBatchCaptureTransactions(ctx echo.Context) error

AsyncBatchCaptureTransactions converts echo context to params.

func (*ServerInterfaceWrapper) AsyncCaptureTransaction

func (w *ServerInterfaceWrapper) AsyncCaptureTransaction(ctx echo.Context) error

AsyncCaptureTransaction converts echo context to params.

func (*ServerInterfaceWrapper) AsyncCreateTransaction

func (w *ServerInterfaceWrapper) AsyncCreateTransaction(ctx echo.Context) error

AsyncCreateTransaction converts echo context to params.

func (*ServerInterfaceWrapper) AsyncStorePaymentMethod

func (w *ServerInterfaceWrapper) AsyncStorePaymentMethod(ctx echo.Context) error

AsyncStorePaymentMethod converts echo context to params.

func (*ServerInterfaceWrapper) AuthorizeNewTransaction

func (w *ServerInterfaceWrapper) AuthorizeNewTransaction(ctx echo.Context) error

AuthorizeNewTransaction converts echo context to params.

func (*ServerInterfaceWrapper) AuthorizeTransaction

func (w *ServerInterfaceWrapper) AuthorizeTransaction(ctx echo.Context) error

AuthorizeTransaction converts echo context to params.

func (*ServerInterfaceWrapper) CaptureTransaction

func (w *ServerInterfaceWrapper) CaptureTransaction(ctx echo.Context) error

CaptureTransaction converts echo context to params.

func (*ServerInterfaceWrapper) CreateApiKeyPair

func (w *ServerInterfaceWrapper) CreateApiKeyPair(ctx echo.Context) error

CreateApiKeyPair converts echo context to params.

func (*ServerInterfaceWrapper) DeleteApiKeyPair

func (w *ServerInterfaceWrapper) DeleteApiKeyPair(ctx echo.Context) error

DeleteApiKeyPair converts echo context to params.

func (*ServerInterfaceWrapper) DeleteBuyer

func (w *ServerInterfaceWrapper) DeleteBuyer(ctx echo.Context) error

DeleteBuyer converts echo context to params.

func (*ServerInterfaceWrapper) DeleteCardRule

func (w *ServerInterfaceWrapper) DeleteCardRule(ctx echo.Context) error

DeleteCardRule converts echo context to params.

func (*ServerInterfaceWrapper) DeletePaymentMethod

func (w *ServerInterfaceWrapper) DeletePaymentMethod(ctx echo.Context) error

DeletePaymentMethod converts echo context to params.

func (*ServerInterfaceWrapper) DeletePaymentService

func (w *ServerInterfaceWrapper) DeletePaymentService(ctx echo.Context) error

DeletePaymentService converts echo context to params.

func (*ServerInterfaceWrapper) GetBuyer

func (w *ServerInterfaceWrapper) GetBuyer(ctx echo.Context) error

GetBuyer converts echo context to params.

func (*ServerInterfaceWrapper) GetCardRule

func (w *ServerInterfaceWrapper) GetCardRule(ctx echo.Context) error

GetCardRule converts echo context to params.

func (*ServerInterfaceWrapper) GetCurrentMerchant

func (w *ServerInterfaceWrapper) GetCurrentMerchant(ctx echo.Context) error

GetCurrentMerchant converts echo context to params.

func (*ServerInterfaceWrapper) GetCurrentUser

func (w *ServerInterfaceWrapper) GetCurrentUser(ctx echo.Context) error

GetCurrentUser converts echo context to params.

func (*ServerInterfaceWrapper) GetPaymentMethod

func (w *ServerInterfaceWrapper) GetPaymentMethod(ctx echo.Context) error

GetPaymentMethod converts echo context to params.

func (*ServerInterfaceWrapper) GetPaymentService

func (w *ServerInterfaceWrapper) GetPaymentService(ctx echo.Context) error

GetPaymentService converts echo context to params.

func (*ServerInterfaceWrapper) GetPaymentServiceDefinition

func (w *ServerInterfaceWrapper) GetPaymentServiceDefinition(ctx echo.Context) error

GetPaymentServiceDefinition converts echo context to params.

func (*ServerInterfaceWrapper) GetTransaction

func (w *ServerInterfaceWrapper) GetTransaction(ctx echo.Context) error

GetTransaction converts echo context to params.

func (*ServerInterfaceWrapper) ListApiKeyPairs

func (w *ServerInterfaceWrapper) ListApiKeyPairs(ctx echo.Context) error

ListApiKeyPairs converts echo context to params.

func (*ServerInterfaceWrapper) ListBuyerPaymentMethods

func (w *ServerInterfaceWrapper) ListBuyerPaymentMethods(ctx echo.Context) error

ListBuyerPaymentMethods converts echo context to params.

func (*ServerInterfaceWrapper) ListBuyers

func (w *ServerInterfaceWrapper) ListBuyers(ctx echo.Context) error

ListBuyers converts echo context to params.

func (*ServerInterfaceWrapper) ListCardsRules

func (w *ServerInterfaceWrapper) ListCardsRules(ctx echo.Context) error

ListCardsRules converts echo context to params.

func (*ServerInterfaceWrapper) ListPaymentMethods

func (w *ServerInterfaceWrapper) ListPaymentMethods(ctx echo.Context) error

ListPaymentMethods converts echo context to params.

func (*ServerInterfaceWrapper) ListPaymentOptions

func (w *ServerInterfaceWrapper) ListPaymentOptions(ctx echo.Context) error

ListPaymentOptions converts echo context to params.

func (*ServerInterfaceWrapper) ListPaymentServiceDefinitions

func (w *ServerInterfaceWrapper) ListPaymentServiceDefinitions(ctx echo.Context) error

ListPaymentServiceDefinitions converts echo context to params.

func (*ServerInterfaceWrapper) ListPaymentServices

func (w *ServerInterfaceWrapper) ListPaymentServices(ctx echo.Context) error

ListPaymentServices converts echo context to params.

func (*ServerInterfaceWrapper) ListTransactions

func (w *ServerInterfaceWrapper) ListTransactions(ctx echo.Context) error

ListTransactions converts echo context to params.

func (*ServerInterfaceWrapper) Login

func (w *ServerInterfaceWrapper) Login(ctx echo.Context) error

Login converts echo context to params.

func (*ServerInterfaceWrapper) Logout

func (w *ServerInterfaceWrapper) Logout(ctx echo.Context) error

Logout converts echo context to params.

func (*ServerInterfaceWrapper) RedirectTransactionApproval

func (w *ServerInterfaceWrapper) RedirectTransactionApproval(ctx echo.Context) error

RedirectTransactionApproval converts echo context to params.

func (*ServerInterfaceWrapper) RefreshSession

func (w *ServerInterfaceWrapper) RefreshSession(ctx echo.Context) error

RefreshSession converts echo context to params.

func (*ServerInterfaceWrapper) RefundTransaction

func (w *ServerInterfaceWrapper) RefundTransaction(ctx echo.Context) error

RefundTransaction converts echo context to params.

func (*ServerInterfaceWrapper) StorePaymentMethod

func (w *ServerInterfaceWrapper) StorePaymentMethod(ctx echo.Context) error

StorePaymentMethod converts echo context to params.

func (*ServerInterfaceWrapper) UpdateBuyer

func (w *ServerInterfaceWrapper) UpdateBuyer(ctx echo.Context) error

UpdateBuyer converts echo context to params.

func (*ServerInterfaceWrapper) UpdateCardRule

func (w *ServerInterfaceWrapper) UpdateCardRule(ctx echo.Context) error

UpdateCardRule converts echo context to params.

func (*ServerInterfaceWrapper) UpdatePaymentService

func (w *ServerInterfaceWrapper) UpdatePaymentService(ctx echo.Context) error

UpdatePaymentService converts echo context to params.

type Session

type Session struct {

	// A server-signed JWT that can be used as the bearer token in any
	// API calls.
	AccessToken *string `json:"access_token,omitempty"`

	// The time in seconds in seconds by which the `access_token` token will
	// expire.
	ExpiresIn *int64 `json:"expires_in,omitempty"`

	// A server-signed JWT that can be used as the bearer token to refresh the
	// access token.
	RefreshToken *string `json:"refresh_token,omitempty"`

	// `bearer`.
	TokenType *SessionTokenType `json:"token_type,omitempty"`

	// `auth.session`.
	Type *SessionType `json:"type,omitempty"`
}

A user session.

type SessionRequest

type SessionRequest struct {

	// The email address of the user to log in as.
	EmailAddress string `json:"email_address"`

	// The password the user to log in as.
	Password string `json:"password"`
}

A request to create a session using an email address and password.

type SessionTokenType

type SessionTokenType string

`bearer`.

const (
	SessionTokenTypeBearer SessionTokenType = "bearer"
)

Defines values for SessionTokenType.

type SessionType

type SessionType string

`auth.session`.

const (
	SessionTypeAuthSession SessionType = "auth.session"
)

Defines values for SessionType.

type Status

type Status struct {

	// An external identifier that can be used to match the record against your own records.
	ExternalIdentifier *string `json:"external_identifier"`

	// The ID of the object for which this status has been created.
	ResourceId *string `json:"resource_id,omitempty"`

	// The type of the object that is pending.
	ResourceType *StatusResourceType `json:"resource_type,omitempty"`

	// The status of this resource being created. This is always `pending`.
	Status *StatusStatus `json:"status,omitempty"`

	// The type of this object. This is always `status`.
	Type *StatusType `json:"type,omitempty"`
}

In many cases the Gr4vy API returns asynchronously, kicking off a job to create an authorization or a transaction, and returning a `Status` object with the ID of the pending object. The ID of this resource can be used to query an objects status, or additionally the client can use Pub/Sub to subscribe to the creation of the pending object.

type StatusResourceType

type StatusResourceType string

The type of the object that is pending.

const (
	StatusResourceTypePaymentMethod StatusResourceType = "payment-method"

	StatusResourceTypeTransaction StatusResourceType = "transaction"
)

Defines values for StatusResourceType.

type StatusStatus

type StatusStatus string

The status of this resource being created. This is always `pending`.

const (
	StatusStatusPending StatusStatus = "pending"
)

Defines values for StatusStatus.

type StatusType

type StatusType string

The type of this object. This is always `status`.

const (
	StatusTypeStatus StatusType = "status"
)

Defines values for StatusType.

type Statuses

type Statuses struct {

	// A list of authorizations.
	Items *[]Status `json:"items,omitempty"`
}

A list of status resources.

type StorePaymentMethodJSONBody

type StorePaymentMethodJSONBody CardRequest

StorePaymentMethodJSONBody defines parameters for StorePaymentMethod.

type StorePaymentMethodJSONRequestBody

type StorePaymentMethodJSONRequestBody StorePaymentMethodJSONBody

StorePaymentMethodJSONRequestBody defines body for StorePaymentMethod for application/json ContentType.

type StorePaymentMethodResponse

type StorePaymentMethodResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON201      *Card
	JSON400      *interface{}
	JSON401      *Error401Unauthorized
}

func ParseStorePaymentMethodResponse

func ParseStorePaymentMethodResponse(rsp *http.Response) (*StorePaymentMethodResponse, error)

ParseStorePaymentMethodResponse parses an HTTP response from a StorePaymentMethodWithResponse call

func (StorePaymentMethodResponse) Status

Status returns HTTPResponse.Status

func (StorePaymentMethodResponse) StatusCode

func (r StorePaymentMethodResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type TokenizedRequest

type TokenizedRequest struct {

	// A ID that represents a previously tokenized payment method.
	// This token can represent any type of payment method.
	Id string `json:"id"`

	// `id`.
	Method TokenizedRequestMethod `json:"method"`
}

Details for a previously tokenized payment method.

type TokenizedRequestMethod

type TokenizedRequestMethod string

`id`.

const (
	TokenizedRequestMethodId TokenizedRequestMethod = "id"
)

Defines values for TokenizedRequestMethod.

type Transaction

type Transaction struct {

	// The currency amount captured by this transaction.
	Amount *float32 `json:"amount,omitempty"`

	// The date and time when this transaction was created in our system.
	CreatedAt *time.Time `json:"created_at,omitempty"`

	// The currency code for this transaction.
	Currency *string `json:"currency,omitempty"`

	// The environment this transaction has been created in.
	Environment *TransactionEnvironment `json:"environment,omitempty"`

	// An external identifier that can be used to match the transaction against your own records.
	ExternalIdentifier *string `json:"external_identifier"`

	// The unique identifier for this transaction.
	Id            *string      `json:"id,omitempty"`
	PaymentMethod *interface{} `json:"payment_method,omitempty"`

	// An active, configured payment service.
	PaymentService *PaymentService `json:"payment_service,omitempty"`

	// The status of the transaction being processed. This is different from the
	// `status` field in that it represents the status of the transaction at the
	// payment processor, not the status of the transaction created in Gr4vy.
	Status *TransactionStatus `json:"status,omitempty"`

	// The type of this resource. Is always `transaction`.
	Type *TransactionType `json:"type,omitempty"`

	// Defines when the transaction was last updated.
	UpdatedAt *time.Time `json:"updated_at,omitempty"`
}

A transaction record.

type TransactionCaptureRequest

type TransactionCaptureRequest struct {

	// The (partial) amount to capture.
	//
	// When left blank, this will capture the entire amount.
	Amount float32 `json:"amount"`

	// A supported ISO-4217 currency code.
	Currency string `json:"currency"`

	// An external identifier that can be used to match the transaction against your own records.
	ExternalIdentifier *string `json:"external_identifier,omitempty"`
}

A request to capture a transaction.

type TransactionEnvironment

type TransactionEnvironment string

The environment this transaction has been created in.

const (
	TransactionEnvironmentDevelopment TransactionEnvironment = "development"

	TransactionEnvironmentProduction TransactionEnvironment = "production"

	TransactionEnvironmentStaging TransactionEnvironment = "staging"
)

Defines values for TransactionEnvironment.

type TransactionRequest

type TransactionRequest struct {

	// The monetary amount to create an authorization for, in the smallest
	// currency unit for the given currency, for example `1299` cents to create
	// an authorization for `$12.99`.
	//
	// For BitCoin, this value will be a decimal point number, for example
	// `0.0039`.
	Amount float32 `json:"amount"`

	// A supported ISO-4217 currency code.
	Currency string `json:"currency"`

	// Defines the environment to create this transaction in. Setting this to
	// anything other than `production` will force Gr4vy to use the payment
	// a service configured for that environment.
	Environment *TransactionRequestEnvironment `json:"environment,omitempty"`

	// An external identifier that can be used to match the transaction against your own records.
	ExternalIdentifier *string `json:"external_identifier"`

	// Defines the intent of this API call. This determines the desired initial
	// state of the transaction.
	//
	// * `approve` - Captures approval for the transaction from the user but does
	// not authorize it. This is only available to payment methods that require
	// explicit approval, like PayPal.
	// * `authorize` - (Default) Optionally approves and then authorizes a
	// transaction but does not capture the funds.
	// * `capture` - Optionally approves and then authorizes and captures the
	// funds of the transaction.
	Intent *TransactionRequestIntent `json:"intent,omitempty"`

	// The optional payment method details to create an authorization for. This field is required for processing a card.
	PaymentMethod interface{} `json:"payment_method"`

	// Whether or not to also try and store the payment method with us so that
	// it can be used again for future use. This is only supported for payment
	// methods that support this feature.
	Store *bool `json:"store,omitempty"`
}

A request to create a transaction.

type TransactionRequestEnvironment

type TransactionRequestEnvironment string

Defines the environment to create this transaction in. Setting this to anything other than `production` will force Gr4vy to use the payment a service configured for that environment.

const (
	TransactionRequestEnvironmentDevelopment TransactionRequestEnvironment = "development"

	TransactionRequestEnvironmentProduction TransactionRequestEnvironment = "production"

	TransactionRequestEnvironmentStaging TransactionRequestEnvironment = "staging"
)

Defines values for TransactionRequestEnvironment.

type TransactionRequestIntent

type TransactionRequestIntent string

Defines the intent of this API call. This determines the desired initial state of the transaction.

* `approve` - Captures approval for the transaction from the user but does not authorize it. This is only available to payment methods that require explicit approval, like PayPal. * `authorize` - (Default) Optionally approves and then authorizes a transaction but does not capture the funds. * `capture` - Optionally approves and then authorizes and captures the funds of the transaction.

const (
	TransactionRequestIntentApprove TransactionRequestIntent = "approve"

	TransactionRequestIntentAuthorize TransactionRequestIntent = "authorize"

	TransactionRequestIntentCapture TransactionRequestIntent = "capture"
)

Defines values for TransactionRequestIntent.

type TransactionStatus

type TransactionStatus string

The status of the transaction being processed. This is different from the `status` field in that it represents the status of the transaction at the payment processor, not the status of the transaction created in Gr4vy.

const (
	TransactionStatusAuthorizationDeclined TransactionStatus = "authorization_declined"

	TransactionStatusAuthorizationExpired TransactionStatus = "authorization_expired"

	TransactionStatusAuthorizationPending TransactionStatus = "authorization_pending"

	TransactionStatusAuthorizationVoided TransactionStatus = "authorization_voided"

	TransactionStatusAuthorized TransactionStatus = "authorized"

	TransactionStatusBuyerApprovalDeclined TransactionStatus = "buyer_approval_declined"

	TransactionStatusBuyerApprovalPending TransactionStatus = "buyer_approval_pending"

	TransactionStatusBuyerApprovalTimedout TransactionStatus = "buyer_approval_timedout"

	TransactionStatusBuyerApproved TransactionStatus = "buyer_approved"

	TransactionStatusCaptureDeclined TransactionStatus = "capture_declined"

	TransactionStatusCapturePending TransactionStatus = "capture_pending"

	TransactionStatusCaptured TransactionStatus = "captured"

	TransactionStatusProcessing TransactionStatus = "processing"

	TransactionStatusProcessingFailed TransactionStatus = "processing_failed"

	TransactionStatusRefunded TransactionStatus = "refunded"
)

Defines values for TransactionStatus.

type TransactionType

type TransactionType string

The type of this resource. Is always `transaction`.

const (
	TransactionTypeTransaction TransactionType = "transaction"
)

Defines values for TransactionType.

type Transactions

type Transactions struct {

	// A list of transactions.
	Items *[]Transaction `json:"items,omitempty"`

	// The limit applied to request. This represents the number of items that are at
	// maximum returned by this request.
	Limit *int32 `json:"limit,omitempty"`

	// The cursor that represents the next page of results. Use the `cursor` query
	// parameter to fetch this page of items.
	NextCursor *string `json:"next_cursor"`

	// The cursor that represents the next page of results. Use the `cursor` query
	// parameter to fetch this page of items.
	PreviousCursor *string `json:"previous_cursor"`
}

A list of transactions.

type TransactionsBatchCaptureRequest

type TransactionsBatchCaptureRequest struct {

	// The (partial) amount to capture.
	//
	// When left blank, this will capture the entire amount.
	Amount float32 `json:"amount"`

	// A supported ISO-4217 currency code.
	Currency string `json:"currency"`

	// An external identifier that can be used to match the transaction against your own records.
	ExternalIdentifier *string `json:"external_identifier,omitempty"`

	// The ID of the transaction to capture.
	TransactionId string `json:"transaction_id"`
}

A request to capture multiple previously authorized transactions.

type UpdateBuyerJSONBody

type UpdateBuyerJSONBody BuyerUpdate

UpdateBuyerJSONBody defines parameters for UpdateBuyer.

type UpdateBuyerJSONRequestBody

type UpdateBuyerJSONRequestBody UpdateBuyerJSONBody

UpdateBuyerJSONRequestBody defines body for UpdateBuyer for application/json ContentType.

type UpdateBuyerResponse

type UpdateBuyerResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *Buyer
	JSON400      *interface{}
	JSON401      *Error401Unauthorized
	JSON404      *Error404NotFound
}

func ParseUpdateBuyerResponse

func ParseUpdateBuyerResponse(rsp *http.Response) (*UpdateBuyerResponse, error)

ParseUpdateBuyerResponse parses an HTTP response from a UpdateBuyerWithResponse call

func (UpdateBuyerResponse) Status

func (r UpdateBuyerResponse) Status() string

Status returns HTTPResponse.Status

func (UpdateBuyerResponse) StatusCode

func (r UpdateBuyerResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type UpdateCardRuleJSONBody

type UpdateCardRuleJSONBody CardRuleUpdate

UpdateCardRuleJSONBody defines parameters for UpdateCardRule.

type UpdateCardRuleJSONRequestBody

type UpdateCardRuleJSONRequestBody UpdateCardRuleJSONBody

UpdateCardRuleJSONRequestBody defines body for UpdateCardRule for application/json ContentType.

type UpdateCardRuleResponse

type UpdateCardRuleResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *CardRule
	JSON400      *interface{}
	JSON401      *Error401Unauthorized
	JSON404      *Error404NotFound
}

func ParseUpdateCardRuleResponse

func ParseUpdateCardRuleResponse(rsp *http.Response) (*UpdateCardRuleResponse, error)

ParseUpdateCardRuleResponse parses an HTTP response from a UpdateCardRuleWithResponse call

func (UpdateCardRuleResponse) Status

func (r UpdateCardRuleResponse) Status() string

Status returns HTTPResponse.Status

func (UpdateCardRuleResponse) StatusCode

func (r UpdateCardRuleResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type UpdatePaymentServiceJSONBody

type UpdatePaymentServiceJSONBody PaymentServiceUpdate

UpdatePaymentServiceJSONBody defines parameters for UpdatePaymentService.

type UpdatePaymentServiceJSONRequestBody

type UpdatePaymentServiceJSONRequestBody UpdatePaymentServiceJSONBody

UpdatePaymentServiceJSONRequestBody defines body for UpdatePaymentService for application/json ContentType.

type UpdatePaymentServiceResponse

type UpdatePaymentServiceResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON201      *PaymentService
	JSON400      *interface{}
	JSON401      *Error401Unauthorized
	JSON404      *Error404NotFound
}

func ParseUpdatePaymentServiceResponse

func ParseUpdatePaymentServiceResponse(rsp *http.Response) (*UpdatePaymentServiceResponse, error)

ParseUpdatePaymentServiceResponse parses an HTTP response from a UpdatePaymentServiceWithResponse call

func (UpdatePaymentServiceResponse) Status

Status returns HTTPResponse.Status

func (UpdatePaymentServiceResponse) StatusCode

func (r UpdatePaymentServiceResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type User

type User struct {

	// The email address for this user.
	EmailAdress *string `json:"email_adress,omitempty"`

	// The unique Gr4vy ID for this user.
	Id *string `json:"id,omitempty"`

	// The full name of this user.
	Name *string `json:"name,omitempty"`

	// `user`.
	Type *UserType `json:"type,omitempty"`
}

User defines model for User.

type UserType

type UserType string

`user`.

const (
	UserTypeUser UserType = "user"
)

Defines values for UserType.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL