Documentation ¶
Index ¶
- type Client
- func (c *Client) Approve(payoutID string, body payout.ApproveRequest, context communication.CallContext) (payout.Response, error)
- func (c *Client) Cancel(payoutID string, context communication.CallContext) error
- func (c *Client) Cancelapproval(payoutID string, context communication.CallContext) error
- func (c *Client) Create(body payout.CreateRequest, context communication.CallContext) (payout.Response, error)
- func (c *Client) Find(query FindParams, context communication.CallContext) (payout.FindResponse, error)
- func (c *Client) Get(payoutID string, context communication.CallContext) (payout.Response, error)
- type FindParams
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client represents a payouts client. Thread-safe.
func NewClient ¶
func NewClient(parent *apiresource.APIResource, pathContext map[string]string) *Client
NewClient constructs a Payouts Client
parent is the *apiresource.APIResource on top of which we want to build the new Payouts Client
func (*Client) Approve ¶
func (c *Client) Approve(payoutID string, body payout.ApproveRequest, context communication.CallContext) (payout.Response, error)
Approve represents the resource /{merchantId}/payouts/{payoutId}/approve - Approve payout Documentation can be found at https://epayments-api.developer-ingenico.com/s2sapi/v1/en_US/go/payouts/approve.html
Can return any of the following errors: * ValidationError if the request was not correct and couldn't be processed (HTTP status code 400) * AuthorizationError if the request was not allowed (HTTP status code 403) * IdempotenceError if an idempotent request caused a conflict (HTTP status code 409) * ReferenceError if an object was attempted to be referenced that doesn't exist or has been removed, or there was a conflict (HTTP status code 404, 409 or 410) * GlobalCollectError if something went wrong at the Ingenico ePayments platform, the Ingenico ePayments platform was unable to process a message from a downstream partner/acquirer, or the service that you're trying to reach is temporary unavailable (HTTP status code 500, 502 or 503) * APIError if the Ingenico ePayments platform returned any other error
func (*Client) Cancel ¶
func (c *Client) Cancel(payoutID string, context communication.CallContext) error
Cancel represents the resource /{merchantId}/payouts/{payoutId}/cancel - Cancel payout Documentation can be found at https://epayments-api.developer-ingenico.com/s2sapi/v1/en_US/go/payouts/cancel.html
Can return any of the following errors: * ValidationError if the request was not correct and couldn't be processed (HTTP status code 400) * AuthorizationError if the request was not allowed (HTTP status code 403) * IdempotenceError if an idempotent request caused a conflict (HTTP status code 409) * ReferenceError if an object was attempted to be referenced that doesn't exist or has been removed, or there was a conflict (HTTP status code 404, 409 or 410) * GlobalCollectError if something went wrong at the Ingenico ePayments platform, the Ingenico ePayments platform was unable to process a message from a downstream partner/acquirer, or the service that you're trying to reach is temporary unavailable (HTTP status code 500, 502 or 503) * APIError if the Ingenico ePayments platform returned any other error
func (*Client) Cancelapproval ¶
func (c *Client) Cancelapproval(payoutID string, context communication.CallContext) error
Cancelapproval represents the resource /{merchantId}/payouts/{payoutId}/cancelapproval - Undo approve payout Documentation can be found at https://epayments-api.developer-ingenico.com/s2sapi/v1/en_US/go/payouts/cancelapproval.html
Can return any of the following errors: * ValidationError if the request was not correct and couldn't be processed (HTTP status code 400) * AuthorizationError if the request was not allowed (HTTP status code 403) * IdempotenceError if an idempotent request caused a conflict (HTTP status code 409) * ReferenceError if an object was attempted to be referenced that doesn't exist or has been removed, or there was a conflict (HTTP status code 404, 409 or 410) * GlobalCollectError if something went wrong at the Ingenico ePayments platform, the Ingenico ePayments platform was unable to process a message from a downstream partner/acquirer, or the service that you're trying to reach is temporary unavailable (HTTP status code 500, 502 or 503) * APIError if the Ingenico ePayments platform returned any other error
func (*Client) Create ¶
func (c *Client) Create(body payout.CreateRequest, context communication.CallContext) (payout.Response, error)
Create represents the resource /{merchantId}/payouts - Create payout Documentation can be found at https://epayments-api.developer-ingenico.com/s2sapi/v1/en_US/go/payouts/create.html
Can return any of the following errors: * DeclinedPayoutError if the Ingenico ePayments platform declined / rejected the payout. The payout result will be available from the exception. * ValidationError if the request was not correct and couldn't be processed (HTTP status code 400) * AuthorizationError if the request was not allowed (HTTP status code 403) * IdempotenceError if an idempotent request caused a conflict (HTTP status code 409) * ReferenceError if an object was attempted to be referenced that doesn't exist or has been removed, or there was a conflict (HTTP status code 404, 409 or 410) * GlobalCollectError if something went wrong at the Ingenico ePayments platform, the Ingenico ePayments platform was unable to process a message from a downstream partner/acquirer, or the service that you're trying to reach is temporary unavailable (HTTP status code 500, 502 or 503) * APIError if the Ingenico ePayments platform returned any other error
func (*Client) Find ¶
func (c *Client) Find(query FindParams, context communication.CallContext) (payout.FindResponse, error)
Find represents the resource /{merchantId}/payouts - Find payouts Documentation can be found at https://epayments-api.developer-ingenico.com/s2sapi/v1/en_US/go/payouts/find.html
Can return any of the following errors: * ValidationError if the request was not correct and couldn't be processed (HTTP status code 400) * AuthorizationError if the request was not allowed (HTTP status code 403) * IdempotenceError if an idempotent request caused a conflict (HTTP status code 409) * ReferenceError if an object was attempted to be referenced that doesn't exist or has been removed, or there was a conflict (HTTP status code 404, 409 or 410) * GlobalCollectError if something went wrong at the Ingenico ePayments platform, the Ingenico ePayments platform was unable to process a message from a downstream partner/acquirer, or the service that you're trying to reach is temporary unavailable (HTTP status code 500, 502 or 503) * APIError if the Ingenico ePayments platform returned any other error
func (*Client) Get ¶
func (c *Client) Get(payoutID string, context communication.CallContext) (payout.Response, error)
Get represents the resource /{merchantId}/payouts/{payoutId} - Get payout Documentation can be found at https://epayments-api.developer-ingenico.com/s2sapi/v1/en_US/go/payouts/get.html
Can return any of the following errors: * ValidationError if the request was not correct and couldn't be processed (HTTP status code 400) * AuthorizationError if the request was not allowed (HTTP status code 403) * IdempotenceError if an idempotent request caused a conflict (HTTP status code 409) * ReferenceError if an object was attempted to be referenced that doesn't exist or has been removed, or there was a conflict (HTTP status code 404, 409 or 410) * GlobalCollectError if something went wrong at the Ingenico ePayments platform, the Ingenico ePayments platform was unable to process a message from a downstream partner/acquirer, or the service that you're trying to reach is temporary unavailable (HTTP status code 500, 502 or 503) * APIError if the Ingenico ePayments platform returned any other error
type FindParams ¶
type FindParams struct { MerchantReference *string MerchantOrderID *int64 Offset *int32 Limit *int32 }
FindParams represents query parameters for Find payouts Documentation can be found at https://epayments-api.developer-ingenico.com/s2sapi/v1/en_US/go/payouts/find.html
func NewFindParams ¶
func NewFindParams() *FindParams
NewFindParams constructs an instance of FindParams
func (*FindParams) ToRequestParameters ¶
func (params *FindParams) ToRequestParameters() communicator.RequestParams
ToRequestParameters converts the query to communicator.RequestParams