Documentation
¶
Index ¶
- Variables
- func CacheExpires(r *http.Response) time.Time
- type APIClient
- type APIKey
- type APIResponse
- type AchDictionary
- type AchLocation
- type AchParticipant
- type BasicAuth
- type Configuration
- type Error
- type FEDApiService
- func (a *FEDApiService) Ping(ctx _context.Context) (*_nethttp.Response, error)
- func (a *FEDApiService) SearchFEDACH(ctx _context.Context, localVarOptionals *SearchFEDACHOpts) (AchDictionary, *_nethttp.Response, error)
- func (a *FEDApiService) SearchFEDWIRE(ctx _context.Context, localVarOptionals *SearchFEDWIREOpts) (WireDictionary, *_nethttp.Response, error)
- type GenericOpenAPIError
- type Logo
- type SearchFEDACHOpts
- type SearchFEDWIREOpts
- type ServerConfiguration
- type ServerVariable
- type WireDictionary
- type WireLocation
- type WireParticipant
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 {
FEDApi *FEDApiService
// contains filtered or unexported fields
}
APIClient manages communication with the FED 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 ¶ added in v0.4.1
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 AchDictionary ¶
type AchDictionary struct {
ACHParticipants []AchParticipant `json:"ACHParticipants,omitempty"`
}
AchDictionary Search results containing ACHDictionary of Participants
type AchLocation ¶
type AchLocation struct {
// Street Address
Address string `json:"address,omitempty"`
// City
City string `json:"city,omitempty"`
// State
State string `json:"state,omitempty"`
// Postal Code
PostalCode string `json:"postalCode,omitempty"`
// Postal Code Extension
PostalExtension string `json:"postalExtension,omitempty"`
}
AchLocation ACHLocation is the FEDACH delivery address
type AchParticipant ¶
type AchParticipant struct {
// The institution's routing number
RoutingNumber string `json:"routingNumber,omitempty"`
// Main/Head Office or Branch * `O` - Main * `B` - Branch
OfficeCode string `json:"officeCode,omitempty"`
// Servicing Fed's main office routing number
ServicingFRBNumber string `json:"servicingFRBNumber,omitempty"`
// The code indicating the ABA number to be used to route or send ACH items to the RDFI * `0` - Institution is a Federal Reserve Bank * `1` - Send items to customer routing number * `2` - Send items to customer using new routing number field
RecordTypeCode string `json:"recordTypeCode,omitempty"`
// Date of last revision * YYYYMMDD * Blank
Revised string `json:"revised,omitempty"`
// Financial Institution's new routing number resulting from a merger or renumber
NewRoutingNumber string `json:"newRoutingNumber,omitempty"`
// Financial Institution Name
CustomerName string `json:"customerName,omitempty"`
AchLocation AchLocation `json:"achLocation,omitempty"`
// The Financial Institution's phone number
PhoneNumber string `json:"phoneNumber,omitempty"`
// Code is based on the customers receiver code * `1` - Receives Gov/Comm
StatusCode string `json:"statusCode,omitempty"`
// Code is current view * `1` - Current view
ViewCode string `json:"viewCode,omitempty"`
// Normalized name of ACH participant
CleanName string `json:"cleanName,omitempty"`
Logo Logo `json:"logo,omitempty"`
}
AchParticipant ACHParticipant holds a FedACH dir routing record as defined by Fed ACH Format. https://www.frbservices.org/EPaymentsDirectory/achFormat.html
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 Error ¶
type Error struct {
// An error message describing the problem intended for humans.
Error string `json:"error"`
}
Error struct for Error
type FEDApiService ¶
type FEDApiService service
FEDApiService FEDApi service
func (*FEDApiService) Ping ¶
Ping Ping the FED service to check if running
- @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
func (*FEDApiService) SearchFEDACH ¶
func (a *FEDApiService) SearchFEDACH(ctx _context.Context, localVarOptionals *SearchFEDACHOpts) (AchDictionary, *_nethttp.Response, error)
SearchFEDACH Search FEDACH names and metadata
- @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param optional nil or *SearchFEDACHOpts - Optional Parameters:
- @param "XRequestID" (optional.String) - Optional Request ID allows application developer to trace requests through the systems logs
- @param "XUserID" (optional.String) - Optional User ID used to perform this search
- @param "Name" (optional.String) - FEDACH Financial Institution Name
- @param "RoutingNumber" (optional.String) - FEDACH Routing Number for a Financial Institution
- @param "State" (optional.String) - FEDACH Financial Institution State
- @param "City" (optional.String) - FEDACH Financial Institution City
- @param "PostalCode" (optional.String) - FEDACH Financial Institution Postal Code
- @param "Limit" (optional.Int32) - Maximum results returned by a search
@return AchDictionary
func (*FEDApiService) SearchFEDWIRE ¶
func (a *FEDApiService) SearchFEDWIRE(ctx _context.Context, localVarOptionals *SearchFEDWIREOpts) (WireDictionary, *_nethttp.Response, error)
SearchFEDWIRE Search FEDWIRE names and metadata
- @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param optional nil or *SearchFEDWIREOpts - Optional Parameters:
- @param "XRequestID" (optional.String) - Optional Request ID allows application developer to trace requests through the systems logs
- @param "XUserID" (optional.String) - Optional User ID used to perform this search
- @param "Name" (optional.String) - FEDWIRE Financial Institution Name
- @param "RoutingNumber" (optional.String) - FEDWIRE Routing Number for a Financial Institution
- @param "State" (optional.String) - FEDWIRE Financial Institution State
- @param "City" (optional.String) - FEDWIRE Financial Institution City
- @param "Limit" (optional.Int32) - Maximum results returned by a search
@return WireDictionary
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 Logo ¶ added in v0.8.0
type Logo struct {
// Company name
Name string `json:"name,omitempty"`
// URL to the company logo
Url string `json:"url,omitempty"`
}
Logo Company logo of the Fed ACH or Wire participant
type SearchFEDACHOpts ¶
type SearchFEDACHOpts struct {
XRequestID optional.String
XUserID optional.String
Name optional.String
RoutingNumber optional.String
State optional.String
City optional.String
PostalCode optional.String
Limit optional.Int32
}
SearchFEDACHOpts Optional parameters for the method 'SearchFEDACH'
type SearchFEDWIREOpts ¶
type SearchFEDWIREOpts struct {
XRequestID optional.String
XUserID optional.String
Name optional.String
RoutingNumber optional.String
State optional.String
City optional.String
Limit optional.Int32
}
SearchFEDWIREOpts Optional parameters for the method 'SearchFEDWIRE'
type ServerConfiguration ¶ added in v0.10.0
type ServerConfiguration struct {
Url string
Description string
Variables map[string]ServerVariable
}
ServerConfiguration stores the information about a server
type ServerVariable ¶ added in v0.10.0
ServerVariable stores the information about a server variable
type WireDictionary ¶
type WireDictionary struct {
WIREParticipants []WireParticipant `json:"WIREParticipants,omitempty"`
}
WireDictionary Search results containing WIREDictionary of Participants
type WireLocation ¶
type WireLocation struct {
// City
City string `json:"city,omitempty"`
// State
State string `json:"state,omitempty"`
}
WireLocation WIRELocation is the FEDWIRE delivery address
type WireParticipant ¶
type WireParticipant struct {
// The institution's routing number
RoutingNumber string `json:"routingNumber,omitempty"`
// Short name of financial institution
TelegraphicName string `json:"telegraphicName,omitempty"`
// Financial Institution Name
CustomerName string `json:"customerName,omitempty"`
WireLocation WireLocation `json:"wireLocation,omitempty"`
// Designates funds transfer status * `Y` - Eligible * `N` - Ineligible
FundsTransferStatus string `json:"fundsTransferStatus,omitempty"`
// Designates funds settlement only status * `S` - Settlement-Only
FundsSettlementOnlyStatus string `json:"fundsSettlementOnlyStatus,omitempty"`
// Designates book entry securities transfer status * `Y` - Eligible * `N` - Ineligible
BookEntrySecuritiesTransferStatus string `json:"bookEntrySecuritiesTransferStatus,omitempty"`
// Date of last revision * YYYYMMDD * Blank
Date string `json:"date,omitempty"`
// Normalized name of Wire participant
CleanName string `json:"cleanName,omitempty"`
Logo Logo `json:"logo,omitempty"`
}
WireParticipant WIREParticipant holds a FedWIRE dir routing record as defined by Fed WIRE Format. https://frbservices.org/EPaymentsDirectory/fedwireFormat.html