Documentation
¶
Index ¶
- Constants
- Variables
- func ServerMock(uri, response string, statusCode int, debug bool) *httptest.Server
- type Account
- type AccountAttributes
- type AccountData
- type Data
- type HTTPClient
- func (h *HTTPClient) BuildData(parameters map[string]string) string
- func (h *HTTPClient) Delete(ctx context.Context, endpoint string, parameters, headers map[string]string) (*http.Response, error)
- func (h *HTTPClient) Get(ctx context.Context, endpoint string, parameters, headers map[string]string) (*http.Response, error)
- func (h *HTTPClient) GetHeaderValue(response *http.Response, key string) string
- func (h *HTTPClient) GetStatusCode(response *http.Response) int
- func (h *HTTPClient) Patch(ctx context.Context, endpoint string, data string, ...) (*http.Response, error)
- func (h *HTTPClient) Post(ctx context.Context, endpoint string, data string, ...) (*http.Response, error)
- func (h *HTTPClient) Put(ctx context.Context, endpoint string, data string, ...) (*http.Response, error)
- func (h *HTTPClient) ToString(response *http.Response) (string, error)
- type Output
Constants ¶
View Source
const (
// BaseURL Form3 API Base
BaseURL = "https://api.form3.tech"
)
Variables ¶
View Source
var ( ErrResourceNotFound = errors.New("Specified resource does not exist") ErrVersionConflict = errors.New("Specified version incorrect") )
error modes
Functions ¶
Types ¶
type Account ¶
type Account struct {
// contains filtered or unexported fields
}
Account struct
func NewAccountClient ¶
NewAccountClient creates an account client
func (*Account) CreateAccount ¶
CreateAccount creates a new account
func (*Account) DeleteAccountByID ¶
DeleteAccountByID deletes an account by ID
type AccountAttributes ¶
type AccountAttributes struct {
AccountClassification *string `json:"account_classification,omitempty"`
AccountMatchingOptOut *bool `json:"account_matching_opt_out,omitempty"`
AccountNumber string `json:"account_number,omitempty"`
AlternativeNames []string `json:"alternative_names,omitempty"`
BankID string `json:"bank_id,omitempty"`
BankIDCode string `json:"bank_id_code,omitempty"`
BaseCurrency string `json:"base_currency,omitempty"`
Bic string `json:"bic,omitempty"`
Country string `json:"country,omitempty"`
Iban string `json:"iban,omitempty"`
JointAccount *bool `json:"joint_account,omitempty"`
Name []string `json:"name,omitempty"`
SecondaryIdentification string `json:"secondary_identification,omitempty"`
Status *string `json:"status,omitempty"`
Switched *bool `json:"switched,omitempty"`
}
AccountAttributes type
type AccountData ¶
type AccountData struct {
Attributes *AccountAttributes `json:"attributes,omitempty"`
ID string `json:"id,omitempty"`
OrganisationID string `json:"organisation_id,omitempty"`
Type string `json:"type,omitempty"`
Version *int64 `json:"version,omitempty"`
}
AccountData type
type Data ¶
type Data struct {
Data *AccountData `json:"data,omitempty"`
}
Data type
func (*Data) ConvertToJSON ¶
ConvertToJSON convert object to json
func (*Data) LoadFromJSON ¶
LoadFromJSON update object from json
type HTTPClient ¶
HTTPClient struct
func NewHTTPClient ¶
func NewHTTPClient(timeout int) *HTTPClient
NewHTTPClient creates an instance of http client
func (*HTTPClient) BuildData ¶
func (h *HTTPClient) BuildData(parameters map[string]string) string
BuildData build body data
func (*HTTPClient) Delete ¶
func (h *HTTPClient) Delete(ctx context.Context, endpoint string, parameters, headers map[string]string) (*http.Response, error)
Delete http call
func (*HTTPClient) Get ¶
func (h *HTTPClient) Get(ctx context.Context, endpoint string, parameters, headers map[string]string) (*http.Response, error)
Get http call
func (*HTTPClient) GetHeaderValue ¶
func (h *HTTPClient) GetHeaderValue(response *http.Response, key string) string
GetHeaderValue get response header value
func (*HTTPClient) GetStatusCode ¶
func (h *HTTPClient) GetStatusCode(response *http.Response) int
GetStatusCode response status code
func (*HTTPClient) Patch ¶
func (h *HTTPClient) Patch(ctx context.Context, endpoint string, data string, parameters, headers map[string]string) (*http.Response, error)
Patch http call
func (*HTTPClient) Post ¶
func (h *HTTPClient) Post(ctx context.Context, endpoint string, data string, parameters, headers map[string]string) (*http.Response, error)
Post http call
type Output ¶
type Output struct {
Response string `json:"response,omitempty"`
StatusCode int `json:"statusCode,omitempty"`
Headers map[string][]string `json:"headers,omitempty"`
Method string `json:"method,omitempty"`
RawQuery string `json:"rawQuery,omitempty"`
}
Output type
func (*Output) ConvertToJSON ¶
ConvertToJSON convert object to json
Click to show internal directories.
Click to hide internal directories.