Documentation
¶
Index ¶
- Variables
- func CacheExpires(r *http.Response) time.Time
- type APIClient
- type APIKey
- type APIResponse
- type AddTransferOpts
- type Amount
- type BasicAuth
- type Configuration
- type ConfigurationApiService
- func (a *ConfigurationApiService) GetTransferConfiguration(ctx _context.Context, localVarOptionals *GetTransferConfigurationOpts) (OrganizationConfiguration, *_nethttp.Response, error)
- func (a *ConfigurationApiService) UpdateTransferConfiguration(ctx _context.Context, organizationConfiguration OrganizationConfiguration, ...) (OrganizationConfiguration, *_nethttp.Response, error)
- type CreateMicroDeposits
- type CreateTransfer
- type DeleteTransferByIDOpts
- type Destination
- type Error
- type GenericOpenAPIError
- type GetTransferByIDOpts
- type GetTransferConfigurationOpts
- type GetTransfersOpts
- type MicroDeposits
- type MonitorApiService
- type OrganizationConfiguration
- type ReturnCode
- type ServerConfiguration
- type ServerVariable
- type Source
- type Transfer
- type TransferStatus
- type TransfersApiService
- func (a *TransfersApiService) AddTransfer(ctx _context.Context, xOrganization string, createTransfer CreateTransfer, ...) (Transfer, *_nethttp.Response, error)
- func (a *TransfersApiService) DeleteTransferByID(ctx _context.Context, transferID string, xOrganization string, ...) (*_nethttp.Response, error)
- func (a *TransfersApiService) GetTransferByID(ctx _context.Context, transferID string, xOrganization string, ...) (Transfer, *_nethttp.Response, error)
- func (a *TransfersApiService) GetTransfers(ctx _context.Context, xOrganization string, ...) ([]Transfer, *_nethttp.Response, error)
- type UpdateTransferConfigurationOpts
- type ValidationApiService
- func (a *ValidationApiService) GetAccountMicroDeposits(ctx _context.Context, accountID string, xOrganization string) (MicroDeposits, *_nethttp.Response, error)
- func (a *ValidationApiService) GetMicroDeposits(ctx _context.Context, microDepositID string, xOrganization string) (MicroDeposits, *_nethttp.Response, error)
- func (a *ValidationApiService) InitiateMicroDeposits(ctx _context.Context, xOrganization string, ...) (MicroDeposits, *_nethttp.Response, error)
Constants ¶
This section is empty.
Variables ¶
var ( // ContextOAuth2 takes an oauth2.TokenSource as authentication for the request. ContextOAuth2 = contextKey("token") // ContextBasicAuth takes BasicAuth as authentication for the request. ContextBasicAuth = contextKey("basic") // ContextAccessToken takes a string oauth2 access token as authentication for the request. ContextAccessToken = contextKey("accesstoken") // ContextAPIKey takes an APIKey as authentication for the request ContextAPIKey = contextKey("apikey") )
Functions ¶
Types ¶
type APIClient ¶
type APIClient struct {
ConfigurationApi *ConfigurationApiService
MonitorApi *MonitorApiService
TransfersApi *TransfersApiService
ValidationApi *ValidationApiService
// contains filtered or unexported fields
}
APIClient manages communication with the Paygate API API vv1 In most cases there should be only one, shared, APIClient.
func NewAPIClient ¶
func NewAPIClient(cfg *Configuration) *APIClient
NewAPIClient creates a new API client. Requires a userAgent string describing your application. optionally a custom http.Client to allow for advanced features such as caching.
func (*APIClient) ChangeBasePath ¶
ChangeBasePath changes base path to allow switching to mocks
func (*APIClient) GetConfig ¶
func (c *APIClient) GetConfig() *Configuration
Allow modification of underlying config for alternate implementations and testing Caution: modifying the configuration while live can cause data races and potentially unwanted behavior
type APIKey ¶
APIKey provides API key based authentication to a request passed via context using ContextAPIKey
type APIResponse ¶
type APIResponse struct {
*http.Response `json:"-"`
Message string `json:"message,omitempty"`
// Operation is the name of the OpenAPI operation.
Operation string `json:"operation,omitempty"`
// RequestURL is the request URL. This value is always available, even if the
// embedded *http.Response is nil.
RequestURL string `json:"url,omitempty"`
// Method is the HTTP method used for the request. This value is always
// available, even if the embedded *http.Response is nil.
Method string `json:"method,omitempty"`
// Payload holds the contents of the response body (which may be nil or empty).
// This is provided here as the raw response.Body() reader will have already
// been drained.
Payload []byte `json:"-"`
}
APIResponse stores the API response returned by the server.
func NewAPIResponse ¶
func NewAPIResponse(r *http.Response) *APIResponse
NewAPIResponse returns a new APIResonse object.
func NewAPIResponseWithError ¶
func NewAPIResponseWithError(errorMessage string) *APIResponse
NewAPIResponseWithError returns a new APIResponse object with the provided error message.
type AddTransferOpts ¶
AddTransferOpts Optional parameters for the method 'AddTransfer'
type Amount ¶ added in v0.9.0
type Amount struct {
// A 3-letter ISO 4217 currency code
Currency string `json:"currency"`
// Quantity in the smallest unit of the specified currency. In USD this is cents, so $12.04 is 1204 and $0.99 would be 99.
Value int32 `json:"value"`
}
Amount struct for Amount
type BasicAuth ¶
type BasicAuth struct {
UserName string `json:"userName,omitempty"`
Password string `json:"password,omitempty"`
}
BasicAuth provides basic http authentication to a request passed via context using ContextBasicAuth
type Configuration ¶
type Configuration struct {
BasePath string `json:"basePath,omitempty"`
Host string `json:"host,omitempty"`
Scheme string `json:"scheme,omitempty"`
DefaultHeader map[string]string `json:"defaultHeader,omitempty"`
UserAgent string `json:"userAgent,omitempty"`
Debug bool `json:"debug,omitempty"`
Servers []ServerConfiguration
HTTPClient *http.Client
}
Configuration stores the configuration of the API client
func NewConfiguration ¶
func NewConfiguration() *Configuration
NewConfiguration returns a new Configuration object
func (*Configuration) AddDefaultHeader ¶
func (c *Configuration) AddDefaultHeader(key string, value string)
AddDefaultHeader adds a new HTTP header to the default header in the request
type ConfigurationApiService ¶ added in v0.9.0
type ConfigurationApiService service
ConfigurationApiService ConfigurationApi service
func (*ConfigurationApiService) GetTransferConfiguration ¶ added in v0.9.0
func (a *ConfigurationApiService) GetTransferConfiguration(ctx _context.Context, localVarOptionals *GetTransferConfigurationOpts) (OrganizationConfiguration, *_nethttp.Response, error)
GetTransferConfiguration Get Configuration Retrieve current config for the provided organization.
- @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param optional nil or *GetTransferConfigurationOpts - Optional Parameters:
- @param "XOrganization" (optional.String) - Value used to separate and identify models
@return OrganizationConfiguration
func (*ConfigurationApiService) UpdateTransferConfiguration ¶ added in v0.9.0
func (a *ConfigurationApiService) UpdateTransferConfiguration(ctx _context.Context, organizationConfiguration OrganizationConfiguration, localVarOptionals *UpdateTransferConfigurationOpts) (OrganizationConfiguration, *_nethttp.Response, error)
UpdateTransferConfiguration Update Configuration Update the config for the provided organization.
- @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param organizationConfiguration
- @param optional nil or *UpdateTransferConfigurationOpts - Optional Parameters:
- @param "XOrganization" (optional.String) - Value used to separate and identify models
@return OrganizationConfiguration
type CreateMicroDeposits ¶
type CreateMicroDeposits struct {
Destination Destination `json:"destination"`
}
CreateMicroDeposits struct for CreateMicroDeposits
type CreateTransfer ¶
type CreateTransfer struct {
Amount Amount `json:"amount"`
Source Source `json:"source"`
Destination Destination `json:"destination"`
// Brief description of the transaction, this will appear on the receiving entity’s financial statement.
Description string `json:"description"`
// When set to true this indicates the transfer should be processed the same day if possible.
SameDay bool `json:"sameDay,omitempty"`
}
CreateTransfer These fields are used to initiate a Transfer between two Customer objects and their Accounts.
type DeleteTransferByIDOpts ¶
DeleteTransferByIDOpts Optional parameters for the method 'DeleteTransferByID'
type Destination ¶
type Destination struct {
// A customerID from the Customers service used as source for this Transfer
CustomerID string `json:"customerID"`
// A accountID from the Customers service under the specified Customer used for this Transfer. If the Customer only has one account this value can be left empty.
AccountID string `json:"accountID"`
}
Destination Customer that is receiving a Transfer
type Error ¶
type Error struct {
// An error message describing the problem intended for humans.
Error string `json:"error"`
}
Error struct for Error
type GenericOpenAPIError ¶
type GenericOpenAPIError struct {
// contains filtered or unexported fields
}
GenericOpenAPIError Provides access to the body, error and model on returned errors.
func (GenericOpenAPIError) Body ¶
func (e GenericOpenAPIError) Body() []byte
Body returns the raw bytes of the response
func (GenericOpenAPIError) Error ¶
func (e GenericOpenAPIError) Error() string
Error returns non-empty string if there was an error.
func (GenericOpenAPIError) Model ¶
func (e GenericOpenAPIError) Model() interface{}
Model returns the unpacked model of the error
type GetTransferByIDOpts ¶
GetTransferByIDOpts Optional parameters for the method 'GetTransferByID'
type GetTransferConfigurationOpts ¶ added in v0.9.0
GetTransferConfigurationOpts Optional parameters for the method 'GetTransferConfiguration'
type GetTransfersOpts ¶
type GetTransfersOpts struct {
Skip optional.Int32
Count optional.Int32
Status optional.Interface
StartDate optional.Time
EndDate optional.Time
OrganizationIDs optional.String
CustomerIDs optional.String
XRequestID optional.String
}
GetTransfersOpts Optional parameters for the method 'GetTransfers'
type MicroDeposits ¶
type MicroDeposits struct {
// A microDepositID to identify this set of credits to an external account
MicroDepositID string `json:"microDepositID"`
// An array of transferID values created from this micro-deposit
TransferIDs []string `json:"transferIDs"`
Destination Destination `json:"destination"`
Amounts []Amount `json:"amounts"`
Status TransferStatus `json:"status"`
ProcessedAt *time.Time `json:"processedAt,omitempty"`
Created time.Time `json:"created"`
}
MicroDeposits struct for MicroDeposits
type MonitorApiService ¶
type MonitorApiService service
MonitorApiService MonitorApi service
type OrganizationConfiguration ¶ added in v0.9.0
type OrganizationConfiguration struct {
// This field corresponds to the CompanyIdentification value in an ACH BatchHeader record.
CompanyIdentification string `json:"companyIdentification"`
}
OrganizationConfiguration struct for OrganizationConfiguration
type ReturnCode ¶
type ReturnCode struct {
// Optional NACHA return code for this Transfer
Code string `json:"code"`
// Short NACHA description of return code
Reason string `json:"reason"`
// Long form explanation of return code
Description string `json:"description"`
}
ReturnCode struct for ReturnCode
type ServerConfiguration ¶
type ServerConfiguration struct {
Url string
Description string
Variables map[string]ServerVariable
}
ServerConfiguration stores the information about a server
type ServerVariable ¶
ServerVariable stores the information about a server variable
type Source ¶
type Source struct {
// A customerID from the Customers service used as the source for this Transfer
CustomerID string `json:"customerID"`
// A accountID from the Customers service under the specified Customer used for this Transfer. If the Customer only has one account this value can be left empty.
AccountID string `json:"accountID"`
}
Source Customer that initiates a Transfer
type Transfer ¶
type Transfer struct {
// transferID to uniquely identify this Transfer
TransferID string `json:"transferID"`
Amount Amount `json:"amount"`
Source Source `json:"source"`
Destination Destination `json:"destination"`
// Brief description of the transaction, this will appear on the receiving entity’s financial statement.
Description string `json:"description"`
Status TransferStatus `json:"status"`
// When set to true this indicates the transfer should be processed the same day if possible.
SameDay bool `json:"sameDay"`
ReturnCode *ReturnCode `json:"returnCode,omitempty"`
ProcessedAt *time.Time `json:"processedAt,omitempty"`
Created time.Time `json:"created"`
TraceNumbers []string `json:"traceNumbers"`
}
Transfer struct for Transfer
type TransferStatus ¶
type TransferStatus string
TransferStatus Defines the state of the Transfer
const ( CANCELED TransferStatus = "canceled" FAILED TransferStatus = "failed" REVIEWABLE TransferStatus = "reviewable" PENDING TransferStatus = "pending" PROCESSED TransferStatus = "processed" )
List of TransferStatus
type TransfersApiService ¶
type TransfersApiService service
TransfersApiService TransfersApi service
func (*TransfersApiService) AddTransfer ¶
func (a *TransfersApiService) AddTransfer(ctx _context.Context, xOrganization string, createTransfer CreateTransfer, localVarOptionals *AddTransferOpts) (Transfer, *_nethttp.Response, error)
AddTransfer Create Transfer Create a new transfer between a Source and a Destination. Transfers can only be modified in the pending status.
- @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param xOrganization Value used to separate and identify models
- @param createTransfer
- @param optional nil or *AddTransferOpts - Optional Parameters:
- @param "XIdempotencyKey" (optional.String) - Idempotent key in the header which expires after 24 hours. These strings should contain enough entropy for to not collide with each other in your requests.
- @param "XRequestID" (optional.String) - Optional requestID allows application developer to trace requests through the systems logs
@return Transfer
func (*TransfersApiService) DeleteTransferByID ¶
func (a *TransfersApiService) DeleteTransferByID(ctx _context.Context, transferID string, xOrganization string, localVarOptionals *DeleteTransferByIDOpts) (*_nethttp.Response, error)
DeleteTransferByID Delete Transfer Remove a transfer for the specified organization. Its status will be updated as transfer is processed. It is only possible to delete (recall) a Transfer before it has been released from the financial institution.
- @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param transferID transferID to delete
- @param xOrganization Value used to separate and identify models
- @param optional nil or *DeleteTransferByIDOpts - Optional Parameters:
- @param "XRequestID" (optional.String) - Optional requestID allows application developer to trace requests through the systems logs
func (*TransfersApiService) GetTransferByID ¶
func (a *TransfersApiService) GetTransferByID(ctx _context.Context, transferID string, xOrganization string, localVarOptionals *GetTransferByIDOpts) (Transfer, *_nethttp.Response, error)
GetTransferByID Get Transfer Get a Transfer object for the supplied organization
- @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param transferID transferID to retrieve
- @param xOrganization Value used to separate and identify models
- @param optional nil or *GetTransferByIDOpts - Optional Parameters:
- @param "XRequestID" (optional.String) - Optional requestID allows application developer to trace requests through the systems logs
@return Transfer
func (*TransfersApiService) GetTransfers ¶
func (a *TransfersApiService) GetTransfers(ctx _context.Context, xOrganization string, localVarOptionals *GetTransfersOpts) ([]Transfer, *_nethttp.Response, error)
GetTransfers List Transfers List all Transfers created for the given organization.
- @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param xOrganization Value used to separate and identify models
- @param optional nil or *GetTransfersOpts - Optional Parameters:
- @param "Skip" (optional.Int32) - The number of items to skip before starting to collect the result set
- @param "Count" (optional.Int32) - The number of items to return
- @param "Status" (optional.Interface of TransferStatus) - Return only Transfers in this TransferStatus
- @param "StartDate" (optional.Time) - Return Transfers that are scheduled for this date or later in ISO-8601 format YYYY-MM-DD. Can optionally be used with endDate to specify a date range.
- @param "EndDate" (optional.Time) - Return Transfers that are scheduled for this date or earlier in ISO-8601 format YYYY-MM-DD. Can optionally be used with startDate to specify a date range.
- @param "OrganizationIDs" (optional.String) - Comma separated list of organizationID values to return Transfer objects for.
- @param "CustomerIDs" (optional.String) - Comma separated list of customerID values to return Transfer objects for. A maximum of 25 IDs is allowed.
- @param "XRequestID" (optional.String) - Optional requestID allows application developer to trace requests through the systems logs
@return []Transfer
type UpdateTransferConfigurationOpts ¶ added in v0.9.0
UpdateTransferConfigurationOpts Optional parameters for the method 'UpdateTransferConfiguration'
type ValidationApiService ¶
type ValidationApiService service
ValidationApiService ValidationApi service
func (*ValidationApiService) GetAccountMicroDeposits ¶
func (a *ValidationApiService) GetAccountMicroDeposits(ctx _context.Context, accountID string, xOrganization string) (MicroDeposits, *_nethttp.Response, error)
GetAccountMicroDeposits Get micro-deposits for a specified accountID Retrieve the micro-deposits information for a specific accountID
- @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param accountID accountID identifier from Customers service
- @param xOrganization Value used to separate and identify models
@return MicroDeposits
func (*ValidationApiService) GetMicroDeposits ¶
func (a *ValidationApiService) GetMicroDeposits(ctx _context.Context, microDepositID string, xOrganization string) (MicroDeposits, *_nethttp.Response, error)
GetMicroDeposits Get micro-deposit information Retrieve the micro-deposits information for a specific microDepositID
- @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param microDepositID Identifier for micro-deposits
- @param xOrganization Value used to separate and identify models
@return MicroDeposits
func (*ValidationApiService) InitiateMicroDeposits ¶
func (a *ValidationApiService) InitiateMicroDeposits(ctx _context.Context, xOrganization string, createMicroDeposits CreateMicroDeposits) (MicroDeposits, *_nethttp.Response, error)
InitiateMicroDeposits Initiate micro-deposits Start micro-deposits for a Destination to validate.
- @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param xOrganization Value used to separate and identify models
- @param createMicroDeposits
@return MicroDeposits
Source Files
¶
- api_configuration.go
- api_monitor.go
- api_transfers.go
- api_validation.go
- client.go
- configuration.go
- model_amount.go
- model_create_micro_deposits.go
- model_create_transfer.go
- model_destination.go
- model_error.go
- model_micro_deposits.go
- model_organization_configuration.go
- model_return_code.go
- model_source.go
- model_transfer.go
- model_transfer_status.go
- response.go