Documentation
¶
Index ¶
- Variables
- func CacheExpires(r *http.Response) time.Time
- type APIClient
- type APIKey
- type APIResponse
- type AccountStatus
- type AdminApiService
- type BasicAuth
- type Configuration
- type CreateUserDisclaimer
- type CustomersApiService
- func (a *CustomersApiService) CreateCustomerDisclaimer(ctx _context.Context, customerID string, ...) (*_nethttp.Response, error)
- func (a *CustomersApiService) UpdateAccountStatus(ctx _context.Context, customerID string, accountID string, ...) (*_nethttp.Response, error)
- func (a *CustomersApiService) UpdateCustomerAddress(ctx _context.Context, customerID string, addressID string, ...) (*_nethttp.Response, error)
- func (a *CustomersApiService) UpdateCustomerStatus(ctx _context.Context, customerID string, ...) (*_nethttp.Response, error)
- type Error
- type GenericOpenAPIError
- type LivenessProbes
- type ServerConfiguration
- type ServerVariable
- type UpdateAccountStatus
- type UpdateCustomerAddress
- type UpdateCustomerStatus
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 { AdminApi *AdminApiService CustomersApi *CustomersApiService // contains filtered or unexported fields }
APIClient manages communication with the Customers Admin 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 AccountStatus ¶
type AccountStatus string
AccountStatus Enumeration if this account has been validated through micro-deposits or another available strategy.
const ( NONE AccountStatus = "none" VALIDATED AccountStatus = "validated" )
List of AccountStatus
type AdminApiService ¶
type AdminApiService service
AdminApiService AdminApi service
func (*AdminApiService) GetLivenessProbes ¶
func (a *AdminApiService) GetLivenessProbes(ctx _context.Context) (LivenessProbes, *_nethttp.Response, error)
GetLivenessProbes Get Liveness Probes Get the status of each depdendency
- @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@return LivenessProbes
func (*AdminApiService) GetVersion ¶
GetVersion Get Version Show the current version of Customers
- @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@return string
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 CreateUserDisclaimer ¶
type CreateUserDisclaimer struct { // Optional ID for document to display alongside DocumentId string `json:"documentId,omitempty"` // Free form text agreement or policy to display Text string `json:"text"` }
CreateUserDisclaimer struct for CreateUserDisclaimer
type CustomersApiService ¶
type CustomersApiService service
CustomersApiService CustomersApi service
func (*CustomersApiService) CreateCustomerDisclaimer ¶
func (a *CustomersApiService) CreateCustomerDisclaimer(ctx _context.Context, customerID string, createUserDisclaimer CreateUserDisclaimer) (*_nethttp.Response, error)
CreateCustomerDisclaimer Create disclaimer Create a disclaimer for the specified customerID to approve
- @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param customerID Customer ID
- @param createUserDisclaimer
func (*CustomersApiService) UpdateAccountStatus ¶
func (a *CustomersApiService) UpdateAccountStatus(ctx _context.Context, customerID string, accountID string, updateAccountStatus UpdateAccountStatus) (*_nethttp.Response, error)
UpdateAccountStatus Update Account Status Update the status for the specified accountID
- @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param customerID Customer ID
- @param accountID accountID of the Account to validate
- @param updateAccountStatus
func (*CustomersApiService) UpdateCustomerAddress ¶
func (a *CustomersApiService) UpdateCustomerAddress(ctx _context.Context, customerID string, addressID string, updateCustomerAddress UpdateCustomerAddress) (*_nethttp.Response, error)
UpdateCustomerAddress Update customers address Updates the specified customer address
- @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param customerID Customer ID
- @param addressID Address ID
- @param updateCustomerAddress
func (*CustomersApiService) UpdateCustomerStatus ¶
func (a *CustomersApiService) UpdateCustomerStatus(ctx _context.Context, customerID string, updateCustomerStatus UpdateCustomerStatus) (*_nethttp.Response, error)
UpdateCustomerStatus Update Customer status Updates a customer status and initiates the required checks for that new status
- @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param customerID Customer ID
- @param updateCustomerStatus
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 LivenessProbes ¶
type LivenessProbes struct { // Either an error from checking Customers or good as a string. Watchman string `json:"watchman,omitempty"` }
LivenessProbes struct for LivenessProbes
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 UpdateAccountStatus ¶
type UpdateAccountStatus struct {
Status AccountStatus `json:"status"`
}
UpdateAccountStatus struct for UpdateAccountStatus
type UpdateCustomerAddress ¶
type UpdateCustomerAddress struct { // Attribute of address Type string `json:"type,omitempty"` // If this address has been confirmed with the Customer Validated bool `json:"validated,omitempty"` }
UpdateCustomerAddress struct for UpdateCustomerAddress
type UpdateCustomerStatus ¶
type UpdateCustomerStatus struct { // Free form text for admin users Comment string `json:"comment,omitempty"` // Status to attempt transition towards Status string `json:"status,omitempty"` }
UpdateCustomerStatus struct for UpdateCustomerStatus