aktiva

package module
v0.0.0-...-755988a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 9, 2022 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	BaseURL = url.URL{
		Scheme: "https",
		Host:   "aktiva.merit.ee",
		Path:   "/api/v1/",
	}
)

Functions

func CheckResponse

func CheckResponse(r *http.Response) error

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 Account

type Account struct {
	AccountID        string `json:"AccountID"`
	NonActive        string `json:"NonActive"`
	Code             string `json:"Code"`
	Name             string `json:"Name"`
	TaxName          string `json:"TaxName"`
	LinkedVendorName string `json:"LinkedVendorName"`
	IsParent         string `json:"IsParent"`
}

type Accounts

type Accounts []Account

type Article

type Article struct {
	// Required
	Code string
	// Required
	Description string
	// 1 = stock item
	// 2 = service
	// 3 = item
	// Required.
	Type int
	// Name for the unit
	UOMName string `json:"UOMName,omitempty"`
	// If company has more than one (default) stock, stock code in this field is
	// required for all stock items.
	DefLocationCode string `json:"DefLocationCode,omitempty"`
}

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client manages communication with Exact Globe Client

func NewClient

func NewClient(httpClient *http.Client, apiID, apiKey string) *Client

NewClient returns a new Exact Globe Client client

func (Client) APIID

func (c Client) APIID() string

func (Client) APIKey

func (c Client) APIKey() string

func (Client) BaseURL

func (c Client) BaseURL() url.URL

func (Client) Charset

func (c Client) Charset() string

func (Client) Debug

func (c Client) Debug() bool

func (*Client) Do

func (c *Client) Do(req *http.Request, responseBody interface{}) (*http.Response, error)

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) GenerateSignature

func (c *Client) GenerateSignature(timestamp DateTime, body *bytes.Buffer) string

func (Client) GenerateTimestamp

func (c Client) GenerateTimestamp() DateTime

func (*Client) GetEndpointURL

func (c *Client) GetEndpointURL(path string, pathParams PathParams) url.URL

func (Client) MediaType

func (c Client) MediaType() string

func (*Client) NewGetAccountsRequest

func (c *Client) NewGetAccountsRequest() GetAccountsRequest

func (*Client) NewGetCustomersRequest

func (c *Client) NewGetCustomersRequest() GetCustomersRequest

func (*Client) NewGetGLBatchRequest

func (c *Client) NewGetGLBatchRequest() GetGLBatchRequest

func (*Client) NewGetGLBatchesRequest

func (c *Client) NewGetGLBatchesRequest() GetGLBatchesRequest

func (*Client) NewGetTaxesRequest

func (c *Client) NewGetTaxesRequest() GetTaxesRequest

func (*Client) NewRequest

func (c *Client) NewRequest(ctx context.Context, method string, URL url.URL, body interface{}) (*http.Request, error)

func (*Client) NewSendGLBatchRequest

func (c *Client) NewSendGLBatchRequest() SendGLBatchRequest

func (*Client) NewSendInvoiceRequest

func (c *Client) NewSendInvoiceRequest() SendInvoiceRequest

func (*Client) SetAPIID

func (c *Client) SetAPIID(apiID string)

func (*Client) SetAPIKey

func (c *Client) SetAPIKey(apiKey string)

func (*Client) SetBaseURL

func (c *Client) SetBaseURL(baseURL url.URL)

func (*Client) SetCharset

func (c *Client) SetCharset(charset string)

func (*Client) SetDebug

func (c *Client) SetDebug(debug bool)

func (*Client) SetDisallowUnknownFields

func (c *Client) SetDisallowUnknownFields(disallowUnknownFields bool)

func (*Client) SetHTTPClient

func (c *Client) SetHTTPClient(client *http.Client)

func (*Client) SetMediaType

func (c *Client) SetMediaType(mediaType string)

func (*Client) SetUserAgent

func (c *Client) SetUserAgent(userAgent string)

func (Client) UserAgent

func (c Client) UserAgent() string

type Customer

type Customer struct {
	CustomerID        string      `json:"CustomerId"`
	Name              string      `json:"Name"`
	RegNo             string      `json:"RegNo"`
	Contact           interface{} `json:"Contact"`
	PhoneNo           string      `json:"PhoneNo"`
	PhoneNo2          string      `json:"PhoneNo2"`
	Address           string      `json:"Address"`
	City              string      `json:"City"`
	County            string      `json:"County"`
	PostalCode        string      `json:"PostalCode"`
	CountryCode       string      `json:"CountryCode"`
	CountryName       string      `json:"CountryName"`
	FaxNo             string      `json:"FaxNo"`
	Email             string      `json:"Email"`
	HomePage          string      `json:"HomePage"`
	PaymentDeadLine   int         `json:"PaymentDeadLine"`
	OverdueCharge     float64     `json:"OverdueCharge"`
	CurrencyCode      string      `json:"CurrencyCode"`
	CustomerGroupName string      `json:"CustomerGroupName"`
	VatRegNo          string      `json:"VatRegNo"`
	BankName          string      `json:"BankName"`
	NotTDCustomer     bool        `json:"NotTDCustomer"`
	SalesInvLang      string      `json:"SalesInvLang"`
	RefNoase          string      `json:"RefNoase"`
}

type Customers

type Customers []Customer

type Date

type Date struct {
	time.Time
}

func (Date) IsEmpty

func (d Date) IsEmpty() bool

func (*Date) MarshalJSON

func (d *Date) MarshalJSON() ([]byte, error)

func (Date) String

func (d Date) String() string

func (*Date) UnmarshalJSON

func (d *Date) UnmarshalJSON(text []byte) (err error)

type DateTime

type DateTime struct {
	time.Time
}

func (DateTime) IsEmpty

func (d DateTime) IsEmpty() bool

func (*DateTime) MarshalJSON

func (d *DateTime) MarshalJSON() ([]byte, error)

func (DateTime) String

func (d DateTime) String() string

func (*DateTime) UnmarshalJSON

func (d *DateTime) UnmarshalJSON(text []byte) (err error)

type EntryRow

type EntryRow struct {
	AccountCode    string
	DepartmentCode string `json:"DepartmentCode,omitempty"`
	Debit          float64
	Credit         float64
	ProjectCode    string `json:"ProjectCode,omitempty"`
	CostCenterCode string `json:"CostCenterCode,omitempty"`
}

type Error

type Error struct {
	Message       string `json:"message"`
	MessageDetail string `json:"MessageDetail"`
}

func (Error) Error

func (e Error) Error() string

type ErrorResponse

type ErrorResponse struct {
	// HTTP response that caused this error
	Response *http.Response `json:"-"`

	Errors []error
}

func (ErrorResponse) Error

func (r ErrorResponse) Error() string

func (*ErrorResponse) UnmarshalJSON

func (r *ErrorResponse) UnmarshalJSON(data []byte) error

type GetAccountsPathParams

type GetAccountsPathParams struct {
}

func (*GetAccountsPathParams) Params

func (p *GetAccountsPathParams) Params() map[string]string

type GetAccountsQueryParams

type GetAccountsQueryParams struct{}

func (GetAccountsQueryParams) ToURLValues

func (p GetAccountsQueryParams) ToURLValues() (url.Values, error)

type GetAccountsRequest

type GetAccountsRequest struct {
	// contains filtered or unexported fields
}

func (*GetAccountsRequest) Do

func (*GetAccountsRequest) Method

func (r *GetAccountsRequest) Method() string

func (GetAccountsRequest) NewGetAccountsPathParams

func (r GetAccountsRequest) NewGetAccountsPathParams() *GetAccountsPathParams

func (GetAccountsRequest) NewGetAccountsQueryParams

func (r GetAccountsRequest) NewGetAccountsQueryParams() *GetAccountsQueryParams

func (GetAccountsRequest) NewGetAccountsRequestBody

func (r GetAccountsRequest) NewGetAccountsRequestBody() GetAccountsRequestBody

func (*GetAccountsRequest) NewResponseBody

func (r *GetAccountsRequest) NewResponseBody() *GetAccountsResponseBody

func (*GetAccountsRequest) PathParams

func (r *GetAccountsRequest) PathParams() *GetAccountsPathParams

func (*GetAccountsRequest) QueryParams

func (r *GetAccountsRequest) QueryParams() *GetAccountsQueryParams

func (*GetAccountsRequest) RequestBody

func (r *GetAccountsRequest) RequestBody() *GetAccountsRequestBody

func (*GetAccountsRequest) SetMethod

func (r *GetAccountsRequest) SetMethod(method string)

func (*GetAccountsRequest) SetRequestBody

func (r *GetAccountsRequest) SetRequestBody(body GetAccountsRequestBody)

func (*GetAccountsRequest) URL

func (r *GetAccountsRequest) URL() url.URL

type GetAccountsRequestBody

type GetAccountsRequestBody struct {
}

type GetAccountsResponseBody

type GetAccountsResponseBody Accounts

type GetCustomersPathParams

type GetCustomersPathParams struct {
}

func (*GetCustomersPathParams) Params

func (p *GetCustomersPathParams) Params() map[string]string

type GetCustomersQueryParams

type GetCustomersQueryParams struct{}

func (GetCustomersQueryParams) ToURLValues

func (p GetCustomersQueryParams) ToURLValues() (url.Values, error)

type GetCustomersRequest

type GetCustomersRequest struct {
	// contains filtered or unexported fields
}

func (*GetCustomersRequest) Do

func (*GetCustomersRequest) Method

func (r *GetCustomersRequest) Method() string

func (GetCustomersRequest) NewGetCustomersPathParams

func (r GetCustomersRequest) NewGetCustomersPathParams() *GetCustomersPathParams

func (GetCustomersRequest) NewGetCustomersQueryParams

func (r GetCustomersRequest) NewGetCustomersQueryParams() *GetCustomersQueryParams

func (GetCustomersRequest) NewGetCustomersRequestBody

func (r GetCustomersRequest) NewGetCustomersRequestBody() GetCustomersRequestBody

func (*GetCustomersRequest) NewResponseBody

func (r *GetCustomersRequest) NewResponseBody() *GetCustomersResponseBody

func (*GetCustomersRequest) PathParams

func (*GetCustomersRequest) QueryParams

func (r *GetCustomersRequest) QueryParams() *GetCustomersQueryParams

func (*GetCustomersRequest) RequestBody

func (r *GetCustomersRequest) RequestBody() *GetCustomersRequestBody

func (*GetCustomersRequest) SetMethod

func (r *GetCustomersRequest) SetMethod(method string)

func (*GetCustomersRequest) SetRequestBody

func (r *GetCustomersRequest) SetRequestBody(body GetCustomersRequestBody)

func (*GetCustomersRequest) URL

func (r *GetCustomersRequest) URL() url.URL

type GetCustomersRequestBody

type GetCustomersRequestBody struct {
}

type GetCustomersResponseBody

type GetCustomersResponseBody Customers

type GetGLBatchPathParams

type GetGLBatchPathParams struct {
}

func (*GetGLBatchPathParams) Params

func (p *GetGLBatchPathParams) Params() map[string]string

type GetGLBatchQueryParams

type GetGLBatchQueryParams struct {
}

func (GetGLBatchQueryParams) ToURLValues

func (p GetGLBatchQueryParams) ToURLValues() (url.Values, error)

type GetGLBatchRequest

type GetGLBatchRequest struct {
	// contains filtered or unexported fields
}

func (*GetGLBatchRequest) Do

func (*GetGLBatchRequest) Method

func (r *GetGLBatchRequest) Method() string

func (GetGLBatchRequest) NewGetGLBatchPathParams

func (r GetGLBatchRequest) NewGetGLBatchPathParams() *GetGLBatchPathParams

func (GetGLBatchRequest) NewGetGLBatchQueryParams

func (r GetGLBatchRequest) NewGetGLBatchQueryParams() *GetGLBatchQueryParams

func (GetGLBatchRequest) NewGetGLBatchRequestBody

func (r GetGLBatchRequest) NewGetGLBatchRequestBody() GetGLBatchRequestBody

func (*GetGLBatchRequest) NewResponseBody

func (r *GetGLBatchRequest) NewResponseBody() *GetGLBatchResponseBody

func (*GetGLBatchRequest) PathParams

func (r *GetGLBatchRequest) PathParams() *GetGLBatchPathParams

func (*GetGLBatchRequest) QueryParams

func (r *GetGLBatchRequest) QueryParams() *GetGLBatchQueryParams

func (*GetGLBatchRequest) RequestBody

func (r *GetGLBatchRequest) RequestBody() *GetGLBatchRequestBody

func (*GetGLBatchRequest) SetMethod

func (r *GetGLBatchRequest) SetMethod(method string)

func (*GetGLBatchRequest) SetRequestBody

func (r *GetGLBatchRequest) SetRequestBody(body GetGLBatchRequestBody)

func (*GetGLBatchRequest) URL

func (r *GetGLBatchRequest) URL() url.URL

type GetGLBatchRequestBody

type GetGLBatchRequestBody struct {
	ID uuid.UUID
}

type GetGLBatchResponseBody

type GetGLBatchResponseBody struct {
	Header struct {
		GLBID        string      `json:"GLBId"`
		BatchCode    string      `json:"BatchCode"`
		No           int         `json:"No"`
		Document     interface{} `json:"Document"`
		BatchDate    string      `json:"BatchDate"`
		CurrencyCode string      `json:"CurrencyCode"`
		CurrencyRate float64     `json:"CurrencyRate"`
		TotalAmount  float64     `json:"TotalAmount"`
		PriceInclVat int         `json:"PriceInclVat"`
	} `json:"Header"`
	Lines []struct {
		AccountCode    string      `json:"AccountCode"`
		Memo           string      `json:"Memo"`
		DepartmentCode interface{} `json:"DepartmentCode"`
		TaxName        string      `json:"TaxName"`
		DebitAmount    float64     `json:"DebitAmount"`
		DebitCurrency  float64     `json:"DebitCurrency"`
		CreditAmount   float64     `json:"CreditAmount"`
		CreditCurrency float64     `json:"CreditCurrency"`
		TypeID         int         `json:"TypeId"`
	} `json:"Lines"`
}

type GetGLBatchesPathParams

type GetGLBatchesPathParams struct {
}

func (*GetGLBatchesPathParams) Params

func (p *GetGLBatchesPathParams) Params() map[string]string

type GetGLBatchesQueryParams

type GetGLBatchesQueryParams struct {
}

func (GetGLBatchesQueryParams) ToURLValues

func (p GetGLBatchesQueryParams) ToURLValues() (url.Values, error)

type GetGLBatchesRequest

type GetGLBatchesRequest struct {
	// contains filtered or unexported fields
}

func (*GetGLBatchesRequest) Do

func (*GetGLBatchesRequest) Method

func (r *GetGLBatchesRequest) Method() string

func (GetGLBatchesRequest) NewGetGLBatchesPathParams

func (r GetGLBatchesRequest) NewGetGLBatchesPathParams() *GetGLBatchesPathParams

func (GetGLBatchesRequest) NewGetGLBatchesQueryParams

func (r GetGLBatchesRequest) NewGetGLBatchesQueryParams() *GetGLBatchesQueryParams

func (GetGLBatchesRequest) NewGetGLBatchesRequestBody

func (r GetGLBatchesRequest) NewGetGLBatchesRequestBody() GetGLBatchesRequestBody

func (*GetGLBatchesRequest) NewResponseBody

func (r *GetGLBatchesRequest) NewResponseBody() *GetGLBatchesResponseBody

func (*GetGLBatchesRequest) PathParams

func (*GetGLBatchesRequest) QueryParams

func (r *GetGLBatchesRequest) QueryParams() *GetGLBatchesQueryParams

func (*GetGLBatchesRequest) RequestBody

func (r *GetGLBatchesRequest) RequestBody() *GetGLBatchesRequestBody

func (*GetGLBatchesRequest) SetMethod

func (r *GetGLBatchesRequest) SetMethod(method string)

func (*GetGLBatchesRequest) SetRequestBody

func (r *GetGLBatchesRequest) SetRequestBody(body GetGLBatchesRequestBody)

func (*GetGLBatchesRequest) URL

func (r *GetGLBatchesRequest) URL() url.URL

type GetGLBatchesRequestBody

type GetGLBatchesRequestBody struct {
	PeriodStart Date
	PeriodEnd   Date
}

type GetGLBatchesResponseBody

type GetGLBatchesResponseBody []struct {
	GLBID        string      `json:"GLBId"`
	BatchCode    string      `json:"BatchCode"`
	No           int         `json:"No"`
	Document     interface{} `json:"Document"`
	BatchDate    string      `json:"BatchDate"`
	CurrencyCode string      `json:"CurrencyCode"`
	CurrencyRate float64     `json:"CurrencyRate"`
	TotalAmount  float64     `json:"TotalAmount"`
	PriceInclVat int         `json:"PriceInclVat"`
}

type GetTaxesPathParams

type GetTaxesPathParams struct {
}

func (*GetTaxesPathParams) Params

func (p *GetTaxesPathParams) Params() map[string]string

type GetTaxesQueryParams

type GetTaxesQueryParams struct{}

func (GetTaxesQueryParams) ToURLValues

func (p GetTaxesQueryParams) ToURLValues() (url.Values, error)

type GetTaxesRequest

type GetTaxesRequest struct {
	// contains filtered or unexported fields
}

func (*GetTaxesRequest) Do

func (*GetTaxesRequest) Method

func (r *GetTaxesRequest) Method() string

func (GetTaxesRequest) NewGetTaxesPathParams

func (r GetTaxesRequest) NewGetTaxesPathParams() *GetTaxesPathParams

func (GetTaxesRequest) NewGetTaxesQueryParams

func (r GetTaxesRequest) NewGetTaxesQueryParams() *GetTaxesQueryParams

func (GetTaxesRequest) NewGetTaxesRequestBody

func (r GetTaxesRequest) NewGetTaxesRequestBody() GetTaxesRequestBody

func (*GetTaxesRequest) NewResponseBody

func (r *GetTaxesRequest) NewResponseBody() *GetTaxesResponseBody

func (*GetTaxesRequest) PathParams

func (r *GetTaxesRequest) PathParams() *GetTaxesPathParams

func (*GetTaxesRequest) QueryParams

func (r *GetTaxesRequest) QueryParams() *GetTaxesQueryParams

func (*GetTaxesRequest) RequestBody

func (r *GetTaxesRequest) RequestBody() *GetTaxesRequestBody

func (*GetTaxesRequest) SetMethod

func (r *GetTaxesRequest) SetMethod(method string)

func (*GetTaxesRequest) SetRequestBody

func (r *GetTaxesRequest) SetRequestBody(body GetTaxesRequestBody)

func (*GetTaxesRequest) URL

func (r *GetTaxesRequest) URL() url.URL

type GetTaxesRequestBody

type GetTaxesRequestBody struct {
}

type GetTaxesResponseBody

type GetTaxesResponseBody Taxes

type InvoiceRow

type InvoiceRow struct {
	Item           Article
	Quantity       float64
	Price          float64
	DiscountPct    float64
	DiscountAmount float64
	TaxID          uuid.UUID `json:"TaxId"`
	LocationCode   string
	DepartmentCode string
	ItemCostAmount float64
	GLAccountCode  string
	ProjectCode    string
	CostCenterCode string
}

type InvoiceRows

type InvoiceRows []InvoiceRow

type NewGLBatch

type NewGLBatch struct {
	DocNo     string
	BatchDate Date
	EntryRow  []EntryRow
}

type NewInvoice

type NewInvoice struct {
	Customer       NewInvoiceCustomer
	DocDate        Date
	DueDate        Date
	InvoiceNo      string
	RefNo          string
	CurrencyCode   string
	DepartmentCode string
	ProjectCode    string
	InvoiceRow     InvoiceRows
	TaxAmount      TaxAmounts
	RoundingAmount float64
	TotalAmount    float64
	Payment        *Payment
	Hcomment       string
	Fcomment       string
}

type NewInvoiceCustomer

type NewInvoiceCustomer struct {
	// If filled and customer is found in the database then following fields are
	// not important. If not found, the customer is added using the following
	// fields.
	ID *uuid.UUID `json:"Id,omitempty"`
	// Required when customer is added
	Name  string `json:"Name,omitempty"`
	RegNo string `json:"RegNo,omitempty"`
	// Required when customer is added. True for physical persons and foreign
	// companies. Allowed “true” or “false” (lowercase).
	NotTDCustomer bool   `json:"NotTDCustomer,omitempty"`
	VatRegNo      string `json:"VatRegNo,omitempty"`
	CurrencyCode  string `json:"CurrencyCode,omitempty"`
	// If missing then taken from default settings.
	PaymentDeadLine int `json:"PaymentDeadLine,omitempty"`
	// If missing then taken from default settings.
	OverDueCharge float64 `json:"OverDueCharge,omitempty"`
	Address       string  `json:"Address,omitempty"`
	City          string  `json:"City,omitempty"`
	Country       string  `json:"Country,omitempty"`
	PostalCode    string  `json:"PostalCode,omitempty"`
	// Required when adding
	CountryCode string
	PhoneNo     string `json:"PhoneNo,omitempty"`
	PhoneNo2    string `json:"PhoneNo2,omitempty"`
	HomePage    string `json:"HomePage,omitempty"`
	Email       string `json:"Email,omitempty"`
	// Invoice language for this specific customer.
	SalesInvLang string `json:"SalesInvLang,omitempty"`
}

type PathParams

type PathParams interface {
	Params() map[string]string
}

type Payment

type Payment struct {
	// Name of the payment method. Must be found in the company database.
	PaymentMethod string
	PaidAmount    float64
	PaymDate      Date
}

type RequestCompletionCallback

type RequestCompletionCallback func(*http.Request, *http.Response)

RequestCompletionCallback defines the type of the request callback function

type SendGLBatchPathParams

type SendGLBatchPathParams struct {
}

func (*SendGLBatchPathParams) Params

func (p *SendGLBatchPathParams) Params() map[string]string

type SendGLBatchQueryParams

type SendGLBatchQueryParams struct{}

func (SendGLBatchQueryParams) ToURLValues

func (p SendGLBatchQueryParams) ToURLValues() (url.Values, error)

type SendGLBatchRequest

type SendGLBatchRequest struct {
	// contains filtered or unexported fields
}

func (*SendGLBatchRequest) Do

func (*SendGLBatchRequest) Method

func (r *SendGLBatchRequest) Method() string

func (*SendGLBatchRequest) NewResponseBody

func (r *SendGLBatchRequest) NewResponseBody() *SendGLBatchResponseBody

func (SendGLBatchRequest) NewSendGLBatchPathParams

func (r SendGLBatchRequest) NewSendGLBatchPathParams() *SendGLBatchPathParams

func (SendGLBatchRequest) NewSendGLBatchQueryParams

func (r SendGLBatchRequest) NewSendGLBatchQueryParams() *SendGLBatchQueryParams

func (SendGLBatchRequest) NewSendGLBatchRequestBody

func (r SendGLBatchRequest) NewSendGLBatchRequestBody() SendGLBatchRequestBody

func (*SendGLBatchRequest) PathParams

func (r *SendGLBatchRequest) PathParams() *SendGLBatchPathParams

func (*SendGLBatchRequest) QueryParams

func (r *SendGLBatchRequest) QueryParams() *SendGLBatchQueryParams

func (*SendGLBatchRequest) RequestBody

func (r *SendGLBatchRequest) RequestBody() *SendGLBatchRequestBody

func (*SendGLBatchRequest) SetMethod

func (r *SendGLBatchRequest) SetMethod(method string)

func (*SendGLBatchRequest) SetRequestBody

func (r *SendGLBatchRequest) SetRequestBody(body SendGLBatchRequestBody)

func (*SendGLBatchRequest) URL

func (r *SendGLBatchRequest) URL() url.URL

type SendGLBatchRequestBody

type SendGLBatchRequestBody NewGLBatch

type SendGLBatchResponseBody

type SendGLBatchResponseBody struct {
	BatchID   uuid.UUID `json:"BatchId"`
	BatchInfo string    `json:"BatchInfo"`
}

type SendInvoicePathParams

type SendInvoicePathParams struct {
}

func (*SendInvoicePathParams) Params

func (p *SendInvoicePathParams) Params() map[string]string

type SendInvoiceQueryParams

type SendInvoiceQueryParams struct{}

func (SendInvoiceQueryParams) ToURLValues

func (p SendInvoiceQueryParams) ToURLValues() (url.Values, error)

type SendInvoiceRequest

type SendInvoiceRequest struct {
	// contains filtered or unexported fields
}

func (*SendInvoiceRequest) Do

func (*SendInvoiceRequest) Method

func (r *SendInvoiceRequest) Method() string

func (*SendInvoiceRequest) NewResponseBody

func (r *SendInvoiceRequest) NewResponseBody() *SendInvoiceResponseBody

func (SendInvoiceRequest) NewSendInvoicePathParams

func (r SendInvoiceRequest) NewSendInvoicePathParams() *SendInvoicePathParams

func (SendInvoiceRequest) NewSendInvoiceQueryParams

func (r SendInvoiceRequest) NewSendInvoiceQueryParams() *SendInvoiceQueryParams

func (SendInvoiceRequest) NewSendInvoiceRequestBody

func (r SendInvoiceRequest) NewSendInvoiceRequestBody() SendInvoiceRequestBody

func (*SendInvoiceRequest) PathParams

func (r *SendInvoiceRequest) PathParams() *SendInvoicePathParams

func (*SendInvoiceRequest) QueryParams

func (r *SendInvoiceRequest) QueryParams() *SendInvoiceQueryParams

func (*SendInvoiceRequest) RequestBody

func (r *SendInvoiceRequest) RequestBody() *SendInvoiceRequestBody

func (*SendInvoiceRequest) SetMethod

func (r *SendInvoiceRequest) SetMethod(method string)

func (*SendInvoiceRequest) SetRequestBody

func (r *SendInvoiceRequest) SetRequestBody(body SendInvoiceRequestBody)

func (*SendInvoiceRequest) URL

func (r *SendInvoiceRequest) URL() url.URL

type SendInvoiceRequestBody

type SendInvoiceRequestBody NewInvoice

type SendInvoiceResponseBody

type SendInvoiceResponseBody struct {
	CustomerID  string      `json:"CustomerId"`
	InvoiceID   string      `json:"InvoiceId"`
	InvoiceNo   string      `json:"InvoiceNo"`
	RefNo       string      `json:"RefNo"`
	NewCustomer interface{} `json:"NewCustomer"`
}

type Tax

type Tax struct {
	ID     string  `json:"Id"`
	Code   string  `json:"Code"`
	Name   string  `json:"Name"`
	TaxPct float64 `json:"TaxPct"`
}

type TaxAmount

type TaxAmount struct {
	// Required. Use gettaxes endpoint to detect the guid needed
	TaxID  uuid.UUID `json:"TaxId"`
	Amount float64
}

type TaxAmounts

type TaxAmounts []TaxAmount

type Taxes

type Taxes []Tax

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL