Documentation ¶
Index ¶
- Variables
- func CheckResponse(r *http.Response) error
- type APIError
- type AccessTokenPathParams
- type Client
- func (c Client) BaseURL() url.URL
- func (c Client) Charset() string
- func (c Client) ClientID() string
- func (c Client) ClientSecret() string
- func (c Client) Debug() bool
- func (c *Client) DefaultClient() *http.Client
- func (c *Client) Do(req *http.Request, responseBody interface{}) (*http.Response, error)
- func (c *Client) GetEndpointURL(base url.URL, path string, pathParams PathParams) url.URL
- func (c Client) MediaType() string
- func (c *Client) NewFormRequest(ctx context.Context, method string, URL url.URL, form Form) (*http.Request, error)
- func (c *Client) NewGetInvoicesRequest() GetInvoicesRequest
- func (c *Client) NewGetStatusAuthenticatedRequest() GetStatusAuthenticatedRequest
- func (c *Client) NewPostInvoiceRequest() PostInvoiceRequest
- func (c *Client) NewRequest(ctx context.Context, method string, URL url.URL, body interface{}) (*http.Request, error)
- func (c *Client) NewValidateRequest() ValidateRequest
- func (c *Client) Scopes() []string
- func (c *Client) SetBaseURL(baseURL url.URL)
- func (c *Client) SetCharset(charset string)
- func (c *Client) SetClientID(clientID string)
- func (c *Client) SetClientSecret(clientSecret string)
- func (c *Client) SetDebug(debug bool)
- func (c *Client) SetDisallowUnknownFields(disallowUnknownFields bool)
- func (c *Client) SetHTTPClient(client *http.Client)
- func (c *Client) SetMediaType(mediaType string)
- func (c *Client) SetUserAgent(userAgent string)
- func (c *Client) SetValidatorURL(validatorURL url.URL)
- func (c *Client) SetVendorAPIKey(vendorAPIKey string)
- func (c *Client) Unmarshal(r io.Reader, vv ...interface{}) error
- func (c Client) UserAgent() string
- func (c Client) ValidatorURL() url.URL
- func (c Client) VendorAPIKey() string
- type Date
- type DateTime
- type ErrorResponse
- type File
- type Form
- type GetInvoicesPathParams
- type GetInvoicesQueryParams
- type GetInvoicesRequest
- func (r *GetInvoicesRequest) Do() (GetInvoicesResponseBody, error)
- func (r *GetInvoicesRequest) Method() string
- func (r GetInvoicesRequest) NewGetInvoicesPathParams() *GetInvoicesPathParams
- func (r GetInvoicesRequest) NewGetInvoicesQueryParams() *GetInvoicesQueryParams
- func (r GetInvoicesRequest) NewGetInvoicesRequestBody() GetInvoicesRequestBody
- func (r *GetInvoicesRequest) NewResponseBody() *GetInvoicesResponseBody
- func (r *GetInvoicesRequest) PathParams() *GetInvoicesPathParams
- func (r *GetInvoicesRequest) QueryParams() *GetInvoicesQueryParams
- func (r *GetInvoicesRequest) RequestBody() *GetInvoicesRequestBody
- func (r *GetInvoicesRequest) SetMethod(method string)
- func (r *GetInvoicesRequest) SetRequestBody(body GetInvoicesRequestBody)
- func (r *GetInvoicesRequest) URL() url.URL
- type GetInvoicesRequestBody
- type GetInvoicesResponseBody
- type GetStatusAuthenticatedPathParams
- type GetStatusAuthenticatedQueryParams
- type GetStatusAuthenticatedRequest
- func (r *GetStatusAuthenticatedRequest) Do() (GetStatusAuthenticatedResponseBody, error)
- func (r *GetStatusAuthenticatedRequest) Method() string
- func (r GetStatusAuthenticatedRequest) NewGetStatusAuthenticatedPathParams() *GetStatusAuthenticatedPathParams
- func (r GetStatusAuthenticatedRequest) NewGetStatusAuthenticatedQueryParams() *GetStatusAuthenticatedQueryParams
- func (r GetStatusAuthenticatedRequest) NewGetStatusAuthenticatedRequestBody() GetStatusAuthenticatedRequestBody
- func (r *GetStatusAuthenticatedRequest) NewResponseBody() *GetStatusAuthenticatedResponseBody
- func (r *GetStatusAuthenticatedRequest) PathParams() *GetStatusAuthenticatedPathParams
- func (r *GetStatusAuthenticatedRequest) QueryParams() *GetStatusAuthenticatedQueryParams
- func (r *GetStatusAuthenticatedRequest) RequestBody() *GetStatusAuthenticatedRequestBody
- func (r *GetStatusAuthenticatedRequest) SetMethod(method string)
- func (r *GetStatusAuthenticatedRequest) SetRequestBody(body GetStatusAuthenticatedRequestBody)
- func (r *GetStatusAuthenticatedRequest) URL() url.URL
- type GetStatusAuthenticatedRequestBody
- type GetStatusAuthenticatedResponseBody
- type Number
- type PathParams
- type PostInvoiceFormParams
- type PostInvoicePathParams
- type PostInvoiceQueryParams
- type PostInvoiceRequest
- func (r *PostInvoiceRequest) Do() (PostInvoiceResponseBody, error)
- func (r *PostInvoiceRequest) FormParams() *PostInvoiceFormParams
- func (r *PostInvoiceRequest) Method() string
- func (r PostInvoiceRequest) NewPostInvoiceFormParams() *PostInvoiceFormParams
- func (r PostInvoiceRequest) NewPostInvoicePathParams() *PostInvoicePathParams
- func (r PostInvoiceRequest) NewPostInvoiceQueryParams() *PostInvoiceQueryParams
- func (r PostInvoiceRequest) NewPostInvoiceRequestBody() PostInvoiceRequestBody
- func (r *PostInvoiceRequest) NewResponseBody() *PostInvoiceResponseBody
- func (r *PostInvoiceRequest) PathParams() *PostInvoicePathParams
- func (r *PostInvoiceRequest) QueryParams() *PostInvoiceQueryParams
- func (r *PostInvoiceRequest) RequestBody() *PostInvoiceRequestBody
- func (r *PostInvoiceRequest) SetMethod(method string)
- func (r *PostInvoiceRequest) SetRequestBody(body PostInvoiceRequestBody)
- func (r *PostInvoiceRequest) URL() url.URL
- type PostInvoiceRequestBody
- type PostInvoiceResponseBody
- type RequestCompletionCallback
- type ValidateFormParams
- type ValidatePathParams
- type ValidateQueryParams
- type ValidateRequest
- func (r *ValidateRequest) Do() (ValidateResponseBody, error)
- func (r *ValidateRequest) FormParams() *ValidateFormParams
- func (r *ValidateRequest) Method() string
- func (r *ValidateRequest) NewResponseBody() *ValidateResponseBody
- func (r ValidateRequest) NewValidateFormParams() *ValidateFormParams
- func (r ValidateRequest) NewValidatePathParams() *ValidatePathParams
- func (r ValidateRequest) NewValidateQueryParams() *ValidateQueryParams
- func (r ValidateRequest) NewValidateRequestBody() ValidateRequestBody
- func (r *ValidateRequest) PathParams() *ValidatePathParams
- func (r *ValidateRequest) QueryParams() *ValidateQueryParams
- func (r *ValidateRequest) RequestBody() *ValidateRequestBody
- func (r *ValidateRequest) SetMethod(method string)
- func (r *ValidateRequest) SetRequestBody(body ValidateRequestBody)
- func (r *ValidateRequest) URL() url.URL
- type ValidateRequestBody
- type ValidateResponseBody
Constants ¶
This section is empty.
Variables ¶
var ( BaseURL = url.URL{ Scheme: "https", Host: "ax.maventa.com", Path: "", } ValidatorURL = url.URL{ Scheme: "https", Host: "validator.maventa.com", Path: "", } )
Functions ¶
func CheckResponse ¶
CheckResponse checks the Client response for errors, and returns them if present. A response is considered an error if it has a status code outside the 200 range. Client error responses are expected to have either no response body, or a json response body that maps to ErrorResponse. Any other response body will be silently ignored.
Types ¶
type APIError ¶
type APIError struct { Response *http.Response `json:"-"` Code string `json:"code"` Message string `json:"message"` Details []string `json:"details"` }
{"code":"invoice_create_api_error","message":"Error while creating invoice","details":["ERROR: INVOICE DATE NOT FOUND"]}
type AccessTokenPathParams ¶
type AccessTokenPathParams struct{}
func (AccessTokenPathParams) Params ¶
func (pp AccessTokenPathParams) Params() map[string]string
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client manages communication with Exact Globe Client
func (Client) ClientSecret ¶
func (*Client) DefaultClient ¶
func (*Client) Do ¶
Do sends an Client request and returns the Client response. The Client response is json decoded and stored in the value pointed to by v, or returned as an error if an Client error has occurred. If v implements the io.Writer interface, the raw response will be written to v, without attempting to decode it.
func (*Client) GetEndpointURL ¶
func (*Client) NewFormRequest ¶
func (*Client) NewGetInvoicesRequest ¶
func (c *Client) NewGetInvoicesRequest() GetInvoicesRequest
func (*Client) NewGetStatusAuthenticatedRequest ¶
func (c *Client) NewGetStatusAuthenticatedRequest() GetStatusAuthenticatedRequest
func (*Client) NewPostInvoiceRequest ¶
func (c *Client) NewPostInvoiceRequest() PostInvoiceRequest
func (*Client) NewRequest ¶
func (*Client) NewValidateRequest ¶
func (c *Client) NewValidateRequest() ValidateRequest
func (*Client) SetBaseURL ¶
func (*Client) SetCharset ¶
func (*Client) SetClientID ¶
func (*Client) SetClientSecret ¶
func (*Client) SetDisallowUnknownFields ¶
func (*Client) SetHTTPClient ¶
func (*Client) SetMediaType ¶
func (*Client) SetUserAgent ¶
func (*Client) SetValidatorURL ¶
func (*Client) SetVendorAPIKey ¶
func (Client) ValidatorURL ¶
func (Client) VendorAPIKey ¶
type ErrorResponse ¶
type ErrorResponse struct { // HTTP response that caused this error Response *http.Response `json:"-"` // contains filtered or unexported fields }
func (ErrorResponse) Error ¶
func (r ErrorResponse) Error() string
type GetInvoicesPathParams ¶
type GetInvoicesPathParams struct { }
func (*GetInvoicesPathParams) Params ¶
func (p *GetInvoicesPathParams) Params() map[string]string
type GetInvoicesQueryParams ¶
type GetInvoicesQueryParams struct {
Direction string `schema:"direction"`
}
func (GetInvoicesQueryParams) ToURLValues ¶
func (p GetInvoicesQueryParams) ToURLValues() (url.Values, error)
type GetInvoicesRequest ¶
type GetInvoicesRequest struct {
// contains filtered or unexported fields
}
func (*GetInvoicesRequest) Do ¶
func (r *GetInvoicesRequest) Do() (GetInvoicesResponseBody, error)
func (*GetInvoicesRequest) Method ¶
func (r *GetInvoicesRequest) Method() string
func (GetInvoicesRequest) NewGetInvoicesPathParams ¶
func (r GetInvoicesRequest) NewGetInvoicesPathParams() *GetInvoicesPathParams
func (GetInvoicesRequest) NewGetInvoicesQueryParams ¶
func (r GetInvoicesRequest) NewGetInvoicesQueryParams() *GetInvoicesQueryParams
func (GetInvoicesRequest) NewGetInvoicesRequestBody ¶
func (r GetInvoicesRequest) NewGetInvoicesRequestBody() GetInvoicesRequestBody
func (*GetInvoicesRequest) NewResponseBody ¶
func (r *GetInvoicesRequest) NewResponseBody() *GetInvoicesResponseBody
func (*GetInvoicesRequest) PathParams ¶
func (r *GetInvoicesRequest) PathParams() *GetInvoicesPathParams
func (*GetInvoicesRequest) QueryParams ¶
func (r *GetInvoicesRequest) QueryParams() *GetInvoicesQueryParams
func (*GetInvoicesRequest) RequestBody ¶
func (r *GetInvoicesRequest) RequestBody() *GetInvoicesRequestBody
func (*GetInvoicesRequest) SetMethod ¶
func (r *GetInvoicesRequest) SetMethod(method string)
func (*GetInvoicesRequest) SetRequestBody ¶
func (r *GetInvoicesRequest) SetRequestBody(body GetInvoicesRequestBody)
func (*GetInvoicesRequest) URL ¶
func (r *GetInvoicesRequest) URL() url.URL
type GetInvoicesRequestBody ¶
type GetInvoicesRequestBody struct{}
type GetInvoicesResponseBody ¶
type GetInvoicesResponseBody []struct { ID string `json:"id"` Status string `json:"status"` Reference string `json:"reference"` Number string `json:"number"` Sender struct { Eia string `json:"eia"` Bid string `json:"bid"` Name string `json:"name"` Country string `json:"country"` } `json:"sender"` Recipient struct { EIA string `json:"eia"` BID string `json:"bid"` Name string `json:"name"` Country string `json:"country"` Operator string `json:"operator"` } `json:"recipient"` CreatedAt time.Time `json:"created_at"` Date string `json:"date"` DateDue string `json:"date_due"` SourceFormat string `json:"source_format"` Sum float64 `json:"sum"` SumTax float64 `json:"sum_tax"` Currency string `json:"currency"` Destination string `json:"destination"` Comment string `json:"comment"` Files []interface{} `json:"files"` }
type GetStatusAuthenticatedPathParams ¶
type GetStatusAuthenticatedPathParams struct { }
func (*GetStatusAuthenticatedPathParams) Params ¶
func (p *GetStatusAuthenticatedPathParams) Params() map[string]string
type GetStatusAuthenticatedQueryParams ¶
type GetStatusAuthenticatedQueryParams struct { }
func (GetStatusAuthenticatedQueryParams) ToURLValues ¶
func (p GetStatusAuthenticatedQueryParams) ToURLValues() (url.Values, error)
type GetStatusAuthenticatedRequest ¶
type GetStatusAuthenticatedRequest struct {
// contains filtered or unexported fields
}
func (*GetStatusAuthenticatedRequest) Do ¶
func (r *GetStatusAuthenticatedRequest) Do() (GetStatusAuthenticatedResponseBody, error)
func (*GetStatusAuthenticatedRequest) Method ¶
func (r *GetStatusAuthenticatedRequest) Method() string
func (GetStatusAuthenticatedRequest) NewGetStatusAuthenticatedPathParams ¶
func (r GetStatusAuthenticatedRequest) NewGetStatusAuthenticatedPathParams() *GetStatusAuthenticatedPathParams
func (GetStatusAuthenticatedRequest) NewGetStatusAuthenticatedQueryParams ¶
func (r GetStatusAuthenticatedRequest) NewGetStatusAuthenticatedQueryParams() *GetStatusAuthenticatedQueryParams
func (GetStatusAuthenticatedRequest) NewGetStatusAuthenticatedRequestBody ¶
func (r GetStatusAuthenticatedRequest) NewGetStatusAuthenticatedRequestBody() GetStatusAuthenticatedRequestBody
func (*GetStatusAuthenticatedRequest) NewResponseBody ¶
func (r *GetStatusAuthenticatedRequest) NewResponseBody() *GetStatusAuthenticatedResponseBody
func (*GetStatusAuthenticatedRequest) PathParams ¶
func (r *GetStatusAuthenticatedRequest) PathParams() *GetStatusAuthenticatedPathParams
func (*GetStatusAuthenticatedRequest) QueryParams ¶
func (r *GetStatusAuthenticatedRequest) QueryParams() *GetStatusAuthenticatedQueryParams
func (*GetStatusAuthenticatedRequest) RequestBody ¶
func (r *GetStatusAuthenticatedRequest) RequestBody() *GetStatusAuthenticatedRequestBody
func (*GetStatusAuthenticatedRequest) SetMethod ¶
func (r *GetStatusAuthenticatedRequest) SetMethod(method string)
func (*GetStatusAuthenticatedRequest) SetRequestBody ¶
func (r *GetStatusAuthenticatedRequest) SetRequestBody(body GetStatusAuthenticatedRequestBody)
func (*GetStatusAuthenticatedRequest) URL ¶
func (r *GetStatusAuthenticatedRequest) URL() url.URL
type GetStatusAuthenticatedRequestBody ¶
type GetStatusAuthenticatedRequestBody struct{}
type GetStatusAuthenticatedResponseBody ¶
type GetStatusAuthenticatedResponseBody struct{}
type PathParams ¶
type PostInvoiceFormParams ¶
type PostInvoiceFormParams struct { File File Format string RecipientType string RecipientEIA string RecipientEmail string RecipientOperator string DisabledRoutes []string SenderComment string RouteOrder []string }
func (PostInvoiceFormParams) Files ¶
func (p PostInvoiceFormParams) Files() map[string]File
func (PostInvoiceFormParams) Values ¶
func (p PostInvoiceFormParams) Values() url.Values
type PostInvoicePathParams ¶
type PostInvoicePathParams struct { }
func (*PostInvoicePathParams) Params ¶
func (p *PostInvoicePathParams) Params() map[string]string
type PostInvoiceQueryParams ¶
type PostInvoiceQueryParams struct { }
func (PostInvoiceQueryParams) ToURLValues ¶
func (p PostInvoiceQueryParams) ToURLValues() (url.Values, error)
type PostInvoiceRequest ¶
type PostInvoiceRequest struct {
// contains filtered or unexported fields
}
func (*PostInvoiceRequest) Do ¶
func (r *PostInvoiceRequest) Do() (PostInvoiceResponseBody, error)
func (*PostInvoiceRequest) FormParams ¶
func (r *PostInvoiceRequest) FormParams() *PostInvoiceFormParams
func (*PostInvoiceRequest) Method ¶
func (r *PostInvoiceRequest) Method() string
func (PostInvoiceRequest) NewPostInvoiceFormParams ¶
func (r PostInvoiceRequest) NewPostInvoiceFormParams() *PostInvoiceFormParams
func (PostInvoiceRequest) NewPostInvoicePathParams ¶
func (r PostInvoiceRequest) NewPostInvoicePathParams() *PostInvoicePathParams
func (PostInvoiceRequest) NewPostInvoiceQueryParams ¶
func (r PostInvoiceRequest) NewPostInvoiceQueryParams() *PostInvoiceQueryParams
func (PostInvoiceRequest) NewPostInvoiceRequestBody ¶
func (r PostInvoiceRequest) NewPostInvoiceRequestBody() PostInvoiceRequestBody
func (*PostInvoiceRequest) NewResponseBody ¶
func (r *PostInvoiceRequest) NewResponseBody() *PostInvoiceResponseBody
func (*PostInvoiceRequest) PathParams ¶
func (r *PostInvoiceRequest) PathParams() *PostInvoicePathParams
func (*PostInvoiceRequest) QueryParams ¶
func (r *PostInvoiceRequest) QueryParams() *PostInvoiceQueryParams
func (*PostInvoiceRequest) RequestBody ¶
func (r *PostInvoiceRequest) RequestBody() *PostInvoiceRequestBody
func (*PostInvoiceRequest) SetMethod ¶
func (r *PostInvoiceRequest) SetMethod(method string)
func (*PostInvoiceRequest) SetRequestBody ¶
func (r *PostInvoiceRequest) SetRequestBody(body PostInvoiceRequestBody)
func (*PostInvoiceRequest) URL ¶
func (r *PostInvoiceRequest) URL() url.URL
type PostInvoiceRequestBody ¶
type PostInvoiceRequestBody struct{}
type PostInvoiceResponseBody ¶
type PostInvoiceResponseBody struct { }
type RequestCompletionCallback ¶
RequestCompletionCallback defines the type of the request callback function
type ValidateFormParams ¶
type ValidateFormParams struct {
File File
}
func (ValidateFormParams) Files ¶
func (p ValidateFormParams) Files() map[string]File
func (ValidateFormParams) Values ¶
func (p ValidateFormParams) Values() url.Values
type ValidatePathParams ¶
type ValidatePathParams struct { }
func (*ValidatePathParams) Params ¶
func (p *ValidatePathParams) Params() map[string]string
type ValidateQueryParams ¶
type ValidateQueryParams struct { }
func (ValidateQueryParams) ToURLValues ¶
func (p ValidateQueryParams) ToURLValues() (url.Values, error)
type ValidateRequest ¶
type ValidateRequest struct {
// contains filtered or unexported fields
}
func (*ValidateRequest) Do ¶
func (r *ValidateRequest) Do() (ValidateResponseBody, error)
func (*ValidateRequest) FormParams ¶
func (r *ValidateRequest) FormParams() *ValidateFormParams
func (*ValidateRequest) Method ¶
func (r *ValidateRequest) Method() string
func (*ValidateRequest) NewResponseBody ¶
func (r *ValidateRequest) NewResponseBody() *ValidateResponseBody
func (ValidateRequest) NewValidateFormParams ¶
func (r ValidateRequest) NewValidateFormParams() *ValidateFormParams
func (ValidateRequest) NewValidatePathParams ¶
func (r ValidateRequest) NewValidatePathParams() *ValidatePathParams
func (ValidateRequest) NewValidateQueryParams ¶
func (r ValidateRequest) NewValidateQueryParams() *ValidateQueryParams
func (ValidateRequest) NewValidateRequestBody ¶
func (r ValidateRequest) NewValidateRequestBody() ValidateRequestBody
func (*ValidateRequest) PathParams ¶
func (r *ValidateRequest) PathParams() *ValidatePathParams
func (*ValidateRequest) QueryParams ¶
func (r *ValidateRequest) QueryParams() *ValidateQueryParams
func (*ValidateRequest) RequestBody ¶
func (r *ValidateRequest) RequestBody() *ValidateRequestBody
func (*ValidateRequest) SetMethod ¶
func (r *ValidateRequest) SetMethod(method string)
func (*ValidateRequest) SetRequestBody ¶
func (r *ValidateRequest) SetRequestBody(body ValidateRequestBody)
func (*ValidateRequest) URL ¶
func (r *ValidateRequest) URL() url.URL
type ValidateRequestBody ¶
type ValidateRequestBody struct{}
type ValidateResponseBody ¶
type ValidateResponseBody struct { }