Documentation
¶
Index ¶
- Variables
- func CacheExpires(r *http.Response) time.Time
- type APIClient
- type APIKey
- type APIResponse
- type AddTransferOpts
- type BasicAuth
- type Configuration
- type CreateOrganization
- type CreateOrganizationOpts
- type CreateTransfer
- type DeleteTransferByIDOpts
- type Destination
- type Error
- type GenericOpenAPIError
- type GetOrganizationsOpts
- type GetTenantsOpts
- type GetTransferByIDOpts
- type GetTransfersOpts
- type Organization
- type OrganizationsApiService
- func (a *OrganizationsApiService) CreateOrganization(ctx _context.Context, xUserID string, createOrganization CreateOrganization, ...) (Organization, *_nethttp.Response, error)
- func (a *OrganizationsApiService) GetOrganizations(ctx _context.Context, xUserID string, tenantID string, ...) ([]Organization, *_nethttp.Response, error)
- func (a *OrganizationsApiService) UpdateOrganization(ctx _context.Context, organizationID string, xUserID string, ...) (Organization, *_nethttp.Response, error)
- type ReturnCode
- type ServerConfiguration
- type ServerVariable
- type Source
- type Tenant
- type TenantsApiService
- type Transfer
- type TransferStatus
- type TransfersApiService
- func (a *TransfersApiService) AddTransfer(ctx _context.Context, xUserID string, createTransfer CreateTransfer, ...) (Transfer, *_nethttp.Response, error)
- func (a *TransfersApiService) DeleteTransferByID(ctx _context.Context, transferID string, xUserID string, ...) (*_nethttp.Response, error)
- func (a *TransfersApiService) GetTransferByID(ctx _context.Context, transferID string, xUserID string, ...) (Transfer, *_nethttp.Response, error)
- func (a *TransfersApiService) GetTransfers(ctx _context.Context, xUserID string, localVarOptionals *GetTransfersOpts) ([]Transfer, *_nethttp.Response, error)
- type UpdateOrganizationOpts
- type UpdateTenant
- type UpdateTenantOpts
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 { OrganizationsApi *OrganizationsApiService TenantsApi *TenantsApiService TransfersApi *TransfersApiService // 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 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 CreateOrganization ¶
type CreateOrganization struct { // Legal name for this Organization Name string `json:"name"` // tenantID to create this Organization under TenantID string `json:"tenantID"` // A customerID from the Customers service to use in Transfers with this Organization. When transferring to or from the Organization this Customer and Account(s) are used. The Customer assigned here should represent the legal entity that manages the Organization. PrimaryCustomer string `json:"primaryCustomer"` }
CreateOrganization struct for CreateOrganization
type CreateOrganizationOpts ¶
CreateOrganizationOpts Optional parameters for the method 'CreateOrganization'
type CreateTransfer ¶
type CreateTransfer struct { // Amount of money. USD - United States. Amount string `json:"amount"` Source Source `json:"source"` Destination Destination `json:"destination"` // Brief description of the transaction, that may 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 from an Originator to a Receiver using the two Depository objects. CCDDetail, IATDetail, etc are only required according to the Standard Entry Class (SEC) code used.
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 GetOrganizationsOpts ¶
GetOrganizationsOpts Optional parameters for the method 'GetOrganizations'
type GetTenantsOpts ¶
GetTenantsOpts Optional parameters for the method 'GetTenants'
type GetTransferByIDOpts ¶
type GetTransferByIDOpts struct { Offset optional.Int32 Limit optional.Int32 XRequestID optional.String }
GetTransferByIDOpts Optional parameters for the method 'GetTransferByID'
type GetTransfersOpts ¶
type GetTransfersOpts struct { Offset optional.Int32 Limit 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 Organization ¶
type Organization struct { // Unique identifier for this Organization OrganizationID string `json:"organizationID"` // Legal name for this Organization Name string `json:"name"` // tenantID this Organization is created under TenantID string `json:"tenantID"` // A customerID from the Customers service to use in Transfers with this Organization. When transferring to or from the Organization this Customer and Account(s) are used. The Customer assigned here should represent the legal entity that manages the Organization. PrimaryCustomer string `json:"primaryCustomer"` }
Organization struct for Organization
type OrganizationsApiService ¶
type OrganizationsApiService service
OrganizationsApiService OrganizationsApi service
func (*OrganizationsApiService) CreateOrganization ¶
func (a *OrganizationsApiService) CreateOrganization(ctx _context.Context, xUserID string, createOrganization CreateOrganization, localVarOptionals *CreateOrganizationOpts) (Organization, *_nethttp.Response, error)
CreateOrganization Create Organization Create a new Organization under PayGate
- @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param xUserID Unique userID set by an auth proxy or client to identify and isolate objects.
- @param createOrganization
- @param optional nil or *CreateOrganizationOpts - Optional Parameters:
- @param "XRequestID" (optional.String) - Optional requestID allows application developer to trace requests through the systems logs
@return Organization
func (*OrganizationsApiService) GetOrganizations ¶
func (a *OrganizationsApiService) GetOrganizations(ctx _context.Context, xUserID string, tenantID string, localVarOptionals *GetOrganizationsOpts) ([]Organization, *_nethttp.Response, error)
GetOrganizations Get Organizations Retrieve all Organizations for the given userID
- @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param xUserID Unique userID set by an auth proxy or client to identify and isolate objects.
- @param tenantID tenantID to create this Organization under
- @param optional nil or *GetOrganizationsOpts - Optional Parameters:
- @param "XRequestID" (optional.String) - Optional requestID allows application developer to trace requests through the systems logs
@return []Organization
func (*OrganizationsApiService) UpdateOrganization ¶
func (a *OrganizationsApiService) UpdateOrganization(ctx _context.Context, organizationID string, xUserID string, createOrganization CreateOrganization, localVarOptionals *UpdateOrganizationOpts) (Organization, *_nethttp.Response, error)
UpdateOrganization Update Organization Update metadata for an Organization
- @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param organizationID organizationID for the Organization to update
- @param xUserID Unique userID set by an auth proxy or client to identify and isolate objects.
- @param createOrganization
- @param optional nil or *UpdateOrganizationOpts - Optional Parameters:
- @param "XRequestID" (optional.String) - Optional requestID allows application developer to trace requests through the systems logs
@return Organization
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 Tenant ¶
type Tenant struct { // tenantID that uniquely identifies this Tenant TenantID string `json:"tenantID"` // Legal name for this Tenant Name string `json:"name"` // A customerID from the Customers service to use in Transfers with this Tenant. When transferring to or from the Tenant this Customer and Account(s) are used. The Customer assigned here should represent the legal entity that manages the Tenant. PrimaryCustomer string `json:"primaryCustomer"` }
Tenant struct for Tenant
type TenantsApiService ¶
type TenantsApiService service
TenantsApiService TenantsApi service
func (*TenantsApiService) GetTenants ¶
func (a *TenantsApiService) GetTenants(ctx _context.Context, xUserID string, localVarOptionals *GetTenantsOpts) ([]Tenant, *_nethttp.Response, error)
GetTenants Get Tenants Retrieve all Tenants for the given userID
- @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param xUserID Unique userID set by an auth proxy or client to identify and isolate objects.
- @param optional nil or *GetTenantsOpts - Optional Parameters:
- @param "XRequestID" (optional.String) - Optional requestID allows application developer to trace requests through the systems logs
@return []Tenant
func (*TenantsApiService) UpdateTenant ¶
func (a *TenantsApiService) UpdateTenant(ctx _context.Context, tenantID string, xUserID string, updateTenant UpdateTenant, localVarOptionals *UpdateTenantOpts) (*_nethttp.Response, error)
UpdateTenant Update Tenant Update information for a Tenant
- @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param tenantID tenantID to identify which Tenant to update
- @param xUserID Unique userID set by an auth proxy or client to identify and isolate objects.
- @param updateTenant
- @param optional nil or *UpdateTenantOpts - Optional Parameters:
- @param "XRequestID" (optional.String) - Optional requestID allows application developer to trace requests through the systems logs
type Transfer ¶
type Transfer struct { // transferID to uniquely identify this Transfer TransferID string `json:"transferID"` // Amount of money. USD - United States. Amount string `json:"amount"` Source Source `json:"source"` Destination Destination `json:"destination"` // Brief description of the transaction, that may appear on the receiving entity’s financial statement. This field is put into the Entry Detail's DiscretionaryData. 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"` Created time.Time `json:"created"` }
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, xUserID 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 xUserID Unique userID set by an auth proxy or client to identify and isolate objects.
- @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, xUserID string, localVarOptionals *DeleteTransferByIDOpts) (*_nethttp.Response, error)
DeleteTransferByID Delete Transfer Remove a transfer for the specified userID. 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 xUserID Unique userID set by an auth proxy or client to identify and isolate objects.
- @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, xUserID string, localVarOptionals *GetTransferByIDOpts) (Transfer, *_nethttp.Response, error)
GetTransferByID Get Transfer Get a Transfer object for the supplied userID
- @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param transferID transferID to retrieve
- @param xUserID Unique userID set by an auth proxy or client to identify and isolate objects.
- @param optional nil or *GetTransferByIDOpts - Optional Parameters:
- @param "Offset" (optional.Int32) - The number of items to skip before starting to collect the result set
- @param "Limit" (optional.Int32) - The number of items to return
- @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, xUserID string, localVarOptionals *GetTransfersOpts) ([]Transfer, *_nethttp.Response, error)
GetTransfers List Transfers List all Transfers created for the given userID.
- @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param xUserID Unique userID set by an auth proxy or client to identify and isolate objects.
- @param optional nil or *GetTransfersOpts - Optional Parameters:
- @param "Offset" (optional.Int32) - The number of items to skip before starting to collect the result set
- @param "Limit" (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.
- @param "XRequestID" (optional.String) - Optional requestID allows application developer to trace requests through the systems logs
@return []Transfer
type UpdateOrganizationOpts ¶
UpdateOrganizationOpts Optional parameters for the method 'UpdateOrganization'
type UpdateTenant ¶
type UpdateTenant struct { // Legal name for this Tenant Name string `json:"name"` }
UpdateTenant struct for UpdateTenant
type UpdateTenantOpts ¶
UpdateTenantOpts Optional parameters for the method 'UpdateTenant'
Source Files
¶
- api_organizations.go
- api_tenants.go
- api_transfers.go
- client.go
- configuration.go
- model_create_organization.go
- model_create_transfer.go
- model_destination.go
- model_error.go
- model_organization.go
- model_return_code.go
- model_source.go
- model_tenant.go
- model_transfer.go
- model_transfer_status.go
- model_update_tenant.go
- response.go