Documentation ¶
Index ¶
- Variables
- func CheckResponse(r *http.Response) error
- type Address
- type BankAccount
- type BankAccounts
- type BankAccountsGetRequest
- func (r *BankAccountsGetRequest) Do() (BankAccountsGetResponseBody, error)
- func (r *BankAccountsGetRequest) Method() string
- func (r BankAccountsGetRequest) NewPathParams() *BankAccountsGetRequestPathParams
- func (r BankAccountsGetRequest) NewQueryParams() *BankAccountsGetRequestQueryParams
- func (r BankAccountsGetRequest) NewRequestBody() BankAccountsGetRequestBody
- func (r *BankAccountsGetRequest) NewResponseBody() *BankAccountsGetResponseBody
- func (r *BankAccountsGetRequest) PathParams() *BankAccountsGetRequestPathParams
- func (r *BankAccountsGetRequest) PathParamsInterface() PathParams
- func (r *BankAccountsGetRequest) QueryParams() *BankAccountsGetRequestQueryParams
- func (r *BankAccountsGetRequest) RequestBody() *BankAccountsGetRequestBody
- func (r *BankAccountsGetRequest) RequestBodyInterface() interface{}
- func (r *BankAccountsGetRequest) SetMethod(method string)
- func (r *BankAccountsGetRequest) SetRequestBody(body BankAccountsGetRequestBody)
- func (r *BankAccountsGetRequest) URL() *url.URL
- type BankAccountsGetRequestBody
- type BankAccountsGetRequestPathParams
- type BankAccountsGetRequestQueryParams
- type BankAccountsGetResponseBody
- type BeforeRequestDoCallback
- type ChartOfAccountsGetRequest
- func (r *ChartOfAccountsGetRequest) Do() (ChartOfAccountsGetResponseBody, error)
- func (r *ChartOfAccountsGetRequest) Method() string
- func (r ChartOfAccountsGetRequest) NewPathParams() *ChartOfAccountsGetRequestPathParams
- func (r ChartOfAccountsGetRequest) NewQueryParams() *ChartOfAccountsGetRequestQueryParams
- func (r ChartOfAccountsGetRequest) NewRequestBody() ChartOfAccountsGetRequestBody
- func (r *ChartOfAccountsGetRequest) NewResponseBody() *ChartOfAccountsGetResponseBody
- func (r *ChartOfAccountsGetRequest) PathParams() *ChartOfAccountsGetRequestPathParams
- func (r *ChartOfAccountsGetRequest) PathParamsInterface() PathParams
- func (r *ChartOfAccountsGetRequest) QueryParams() *ChartOfAccountsGetRequestQueryParams
- func (r *ChartOfAccountsGetRequest) RequestBody() *ChartOfAccountsGetRequestBody
- func (r *ChartOfAccountsGetRequest) RequestBodyInterface() interface{}
- func (r *ChartOfAccountsGetRequest) SetMethod(method string)
- func (r *ChartOfAccountsGetRequest) SetRequestBody(body ChartOfAccountsGetRequestBody)
- func (r *ChartOfAccountsGetRequest) URL() *url.URL
- type ChartOfAccountsGetRequestBody
- type ChartOfAccountsGetRequestPathParams
- type ChartOfAccountsGetRequestQueryParams
- type ChartOfAccountsGetResponseBody
- type Client
- func (c Client) BaseURL() url.URL
- func (c Client) Charset() string
- func (c Client) Debug() bool
- func (c *Client) Do(req *http.Request, body interface{}) (*http.Response, error)
- func (c *Client) GetEndpointURL(p string, pathParams PathParams) url.URL
- func (c Client) MediaType() string
- func (c *Client) NewBankAccountsGetRequest() BankAccountsGetRequest
- func (c *Client) NewChartOfAccountsGetRequest() ChartOfAccountsGetRequest
- func (c *Client) NewCompanyGetRequest() CompanyGetRequest
- func (c *Client) NewDimensionsGetRequest() DimensionsGetRequest
- func (c *Client) NewInvoicesGetRequest() InvoicesGetRequest
- func (c *Client) NewInvoicesPostRequest() InvoicesPostRequest
- func (c *Client) NewLedgerReceiptsPostRequest() LedgerReceiptsPostRequest
- func (c *Client) NewRequest(ctx context.Context, req Request) (*http.Request, error)
- func (c *Client) NewVatsDefaultGetRequest() VatsDefaultGetRequest
- func (c *Client) SetBaseURL(baseURL url.URL)
- func (c *Client) SetBeforeRequestDo(fun BeforeRequestDoCallback)
- func (c *Client) SetCharset(charset 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) Unmarshal(r io.Reader, vv ...interface{}) error
- func (c Client) UserAgent() string
- type Company
- type CompanyGetRequest
- func (r *CompanyGetRequest) Do() (CompanyGetResponseBody, error)
- func (r *CompanyGetRequest) Method() string
- func (r CompanyGetRequest) NewPathParams() *CompanyGetRequestPathParams
- func (r CompanyGetRequest) NewQueryParams() *CompanyGetRequestQueryParams
- func (r CompanyGetRequest) NewRequestBody() CompanyGetRequestBody
- func (r *CompanyGetRequest) NewResponseBody() *CompanyGetResponseBody
- func (r *CompanyGetRequest) PathParams() *CompanyGetRequestPathParams
- func (r *CompanyGetRequest) PathParamsInterface() PathParams
- func (r *CompanyGetRequest) QueryParams() *CompanyGetRequestQueryParams
- func (r *CompanyGetRequest) RequestBody() *CompanyGetRequestBody
- func (r *CompanyGetRequest) RequestBodyInterface() interface{}
- func (r *CompanyGetRequest) SetMethod(method string)
- func (r *CompanyGetRequest) SetRequestBody(body CompanyGetRequestBody)
- func (r *CompanyGetRequest) URL() *url.URL
- type CompanyGetRequestBody
- type CompanyGetRequestPathParams
- type CompanyGetRequestQueryParams
- type CompanyGetResponseBody
- type CounterParty
- type Date
- type DateTime
- type DeliveryTermsInfo
- type Dimension
- type Dimensions
- type DimensionsGetRequest
- func (r *DimensionsGetRequest) Do() (DimensionsGetResponseBody, error)
- func (r *DimensionsGetRequest) Method() string
- func (r DimensionsGetRequest) NewPathParams() *DimensionsGetRequestPathParams
- func (r DimensionsGetRequest) NewQueryParams() *DimensionsGetRequestQueryParams
- func (r DimensionsGetRequest) NewRequestBody() DimensionsGetRequestBody
- func (r *DimensionsGetRequest) NewResponseBody() *DimensionsGetResponseBody
- func (r *DimensionsGetRequest) PathParams() *DimensionsGetRequestPathParams
- func (r *DimensionsGetRequest) PathParamsInterface() PathParams
- func (r *DimensionsGetRequest) QueryParams() *DimensionsGetRequestQueryParams
- func (r *DimensionsGetRequest) RequestBody() *DimensionsGetRequestBody
- func (r *DimensionsGetRequest) RequestBodyInterface() interface{}
- func (r *DimensionsGetRequest) SetMethod(method string)
- func (r *DimensionsGetRequest) SetRequestBody(body DimensionsGetRequestBody)
- func (r *DimensionsGetRequest) URL() *url.URL
- type DimensionsGetRequestBody
- type DimensionsGetRequestPathParams
- type DimensionsGetRequestQueryParams
- type DimensionsGetResponseBody
- type Error
- type ErrorResponse
- type Errors
- type ExtraInfo
- type Invoice
- type InvoiceOperatorInfo
- type InvoiceRow
- type InvoiceRows
- type Invoices
- type InvoicesGetRequest
- func (r *InvoicesGetRequest) All() (InvoicesGetResponseBody, error)
- func (r *InvoicesGetRequest) Do() (InvoicesGetResponseBody, error)
- func (r *InvoicesGetRequest) Method() string
- func (r InvoicesGetRequest) NewPathParams() *InvoicesGetRequestPathParams
- func (r InvoicesGetRequest) NewQueryParams() *InvoicesGetRequestQueryParams
- func (r InvoicesGetRequest) NewRequestBody() InvoicesGetRequestBody
- func (r *InvoicesGetRequest) NewResponseBody() *InvoicesGetResponseBody
- func (r *InvoicesGetRequest) PathParams() *InvoicesGetRequestPathParams
- func (r *InvoicesGetRequest) PathParamsInterface() PathParams
- func (r *InvoicesGetRequest) QueryParams() *InvoicesGetRequestQueryParams
- func (r *InvoicesGetRequest) RequestBody() *InvoicesGetRequestBody
- func (r *InvoicesGetRequest) RequestBodyInterface() interface{}
- func (r *InvoicesGetRequest) SetMethod(method string)
- func (r *InvoicesGetRequest) SetRequestBody(body InvoicesGetRequestBody)
- func (r *InvoicesGetRequest) URL() *url.URL
- type InvoicesGetRequestBody
- type InvoicesGetRequestPathParams
- type InvoicesGetRequestQueryParams
- type InvoicesGetResponseBody
- type InvoicesPostRequest
- func (r *InvoicesPostRequest) Do() (InvoicesPostResponseBody, error)
- func (r *InvoicesPostRequest) Method() string
- func (r InvoicesPostRequest) NewPathParams() *InvoicesPostRequestPathParams
- func (r InvoicesPostRequest) NewQueryParams() *InvoicesPostRequestQueryParams
- func (r InvoicesPostRequest) NewRequestBody() InvoicesPostRequestBody
- func (r *InvoicesPostRequest) NewResponseBody() *InvoicesPostResponseBody
- func (r *InvoicesPostRequest) PathParams() *InvoicesPostRequestPathParams
- func (r *InvoicesPostRequest) PathParamsInterface() PathParams
- func (r *InvoicesPostRequest) QueryParams() *InvoicesPostRequestQueryParams
- func (r *InvoicesPostRequest) RequestBody() *InvoicesPostRequestBody
- func (r *InvoicesPostRequest) RequestBodyInterface() interface{}
- func (r *InvoicesPostRequest) SetMethod(method string)
- func (r *InvoicesPostRequest) SetRequestBody(body InvoicesPostRequestBody)
- func (r *InvoicesPostRequest) URL() *url.URL
- type InvoicesPostRequestBody
- type InvoicesPostRequestPathParams
- type InvoicesPostRequestQueryParams
- type InvoicesPostResponseBody
- type LedgerAccount
- type LedgerAccounts
- type LedgerReceiptsPostRequest
- func (r *LedgerReceiptsPostRequest) Do() (LedgerReceiptsPostResponseBody, error)
- func (r *LedgerReceiptsPostRequest) Method() string
- func (r LedgerReceiptsPostRequest) NewPathParams() *LedgerReceiptsPostRequestPathParams
- func (r LedgerReceiptsPostRequest) NewQueryParams() *LedgerReceiptsPostRequestQueryParams
- func (r LedgerReceiptsPostRequest) NewRequestBody() LedgerReceiptsPostRequestBody
- func (r *LedgerReceiptsPostRequest) NewResponseBody() *LedgerReceiptsPostResponseBody
- func (r *LedgerReceiptsPostRequest) PathParams() *LedgerReceiptsPostRequestPathParams
- func (r *LedgerReceiptsPostRequest) PathParamsInterface() PathParams
- func (r *LedgerReceiptsPostRequest) QueryParams() *LedgerReceiptsPostRequestQueryParams
- func (r *LedgerReceiptsPostRequest) RequestBody() *LedgerReceiptsPostRequestBody
- func (r *LedgerReceiptsPostRequest) RequestBodyInterface() interface{}
- func (r *LedgerReceiptsPostRequest) SetMethod(method string)
- func (r *LedgerReceiptsPostRequest) SetRequestBody(body LedgerReceiptsPostRequestBody)
- func (r *LedgerReceiptsPostRequest) URL() *url.URL
- type LedgerReceiptsPostRequestBody
- type LedgerReceiptsPostRequestPathParams
- type LedgerReceiptsPostRequestQueryParams
- type LedgerReceiptsPostResponseBody
- type Meta
- type Number
- type Oauth2Config
- type PathParams
- type PaymentInfo
- type QueryParams
- type Request
- type RequestCompletionCallback
- type TravelInformationItem
- type TravelInformationItems
- type VatInformation
- type VatInformations
- type VatStatus
- type VatStatuses
- type VatsDefaultGetRequest
- func (r *VatsDefaultGetRequest) Do() (VatsDefaultGetResponseBody, error)
- func (r *VatsDefaultGetRequest) Method() string
- func (r VatsDefaultGetRequest) NewPathParams() *VatsDefaultGetRequestPathParams
- func (r VatsDefaultGetRequest) NewQueryParams() *VatsDefaultGetRequestQueryParams
- func (r VatsDefaultGetRequest) NewRequestBody() VatsDefaultGetRequestBody
- func (r *VatsDefaultGetRequest) NewResponseBody() *VatsDefaultGetResponseBody
- func (r *VatsDefaultGetRequest) PathParams() *VatsDefaultGetRequestPathParams
- func (r *VatsDefaultGetRequest) PathParamsInterface() PathParams
- func (r *VatsDefaultGetRequest) QueryParams() *VatsDefaultGetRequestQueryParams
- func (r *VatsDefaultGetRequest) RequestBody() *VatsDefaultGetRequestBody
- func (r *VatsDefaultGetRequest) RequestBodyInterface() interface{}
- func (r *VatsDefaultGetRequest) SetMethod(method string)
- func (r *VatsDefaultGetRequest) SetRequestBody(body VatsDefaultGetRequestBody)
- func (r *VatsDefaultGetRequest) URL() *url.URL
- type VatsDefaultGetRequestBody
- type VatsDefaultGetRequestPathParams
- type VatsDefaultGetRequestQueryParams
- type VatsDefaultGetResponseBody
Constants ¶
This section is empty.
Variables ¶
var (
BaseURL = url.URL{
Scheme: "https",
Host: "api.procountor.com",
Path: "/api",
}
)
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 Address ¶
type Address struct { Name string `json:"name"` Specifier string `json:"specifier"` Street string `json:"street"` Zip string `json:"zip"` City string `json:"city"` Country string `json:"country"` Subdivision string `json:"subdivision"` }
func (Address) MarshalJSON ¶
type BankAccount ¶
type BankAccount struct { ID int `json:"id,omitempty"` AccountNumber string `json:"accountNumber,omitempty"` IBAN string `json:"iban,omitempty"` BIC string `json:"bic,omitempty"` BankName string `json:"bankName,omitempty"` Currency string `json:"currency,omitempty"` DefaultForInvoice bool `json:"defaultForInvoice,omitempty"` DefaultForPayment bool `json:"defaultForPayment,omitempty"` Status string `json:"status,omitempty"` OrderNo int `json:"orderNo,omitempty"` Version string `json:"version,omitempty"` }
func (BankAccount) IsEmpty ¶
func (a BankAccount) IsEmpty() bool
func (BankAccount) MarshalJSON ¶
func (a BankAccount) MarshalJSON() ([]byte, error)
type BankAccounts ¶
type BankAccounts []BankAccount
type BankAccountsGetRequest ¶
type BankAccountsGetRequest struct {
// contains filtered or unexported fields
}
func (*BankAccountsGetRequest) Do ¶
func (r *BankAccountsGetRequest) Do() (BankAccountsGetResponseBody, error)
func (*BankAccountsGetRequest) Method ¶
func (r *BankAccountsGetRequest) Method() string
func (BankAccountsGetRequest) NewPathParams ¶
func (r BankAccountsGetRequest) NewPathParams() *BankAccountsGetRequestPathParams
func (BankAccountsGetRequest) NewQueryParams ¶
func (r BankAccountsGetRequest) NewQueryParams() *BankAccountsGetRequestQueryParams
func (BankAccountsGetRequest) NewRequestBody ¶
func (r BankAccountsGetRequest) NewRequestBody() BankAccountsGetRequestBody
func (*BankAccountsGetRequest) NewResponseBody ¶
func (r *BankAccountsGetRequest) NewResponseBody() *BankAccountsGetResponseBody
func (*BankAccountsGetRequest) PathParams ¶
func (r *BankAccountsGetRequest) PathParams() *BankAccountsGetRequestPathParams
func (*BankAccountsGetRequest) PathParamsInterface ¶
func (r *BankAccountsGetRequest) PathParamsInterface() PathParams
func (*BankAccountsGetRequest) QueryParams ¶
func (r *BankAccountsGetRequest) QueryParams() *BankAccountsGetRequestQueryParams
func (*BankAccountsGetRequest) RequestBody ¶
func (r *BankAccountsGetRequest) RequestBody() *BankAccountsGetRequestBody
func (*BankAccountsGetRequest) RequestBodyInterface ¶
func (r *BankAccountsGetRequest) RequestBodyInterface() interface{}
func (*BankAccountsGetRequest) SetMethod ¶
func (r *BankAccountsGetRequest) SetMethod(method string)
func (*BankAccountsGetRequest) SetRequestBody ¶
func (r *BankAccountsGetRequest) SetRequestBody(body BankAccountsGetRequestBody)
func (*BankAccountsGetRequest) URL ¶
func (r *BankAccountsGetRequest) URL() *url.URL
type BankAccountsGetRequestBody ¶
type BankAccountsGetRequestBody struct { }
type BankAccountsGetRequestPathParams ¶
type BankAccountsGetRequestPathParams struct { }
func (*BankAccountsGetRequestPathParams) Params ¶
func (p *BankAccountsGetRequestPathParams) Params() map[string]string
type BankAccountsGetRequestQueryParams ¶
type BankAccountsGetRequestQueryParams struct{}
func (BankAccountsGetRequestQueryParams) ToURLValues ¶
func (p BankAccountsGetRequestQueryParams) ToURLValues() (url.Values, error)
type BankAccountsGetResponseBody ¶
type BankAccountsGetResponseBody struct { Results BankAccounts `json:"results"` Meta Meta `json:"meta"` }
type BeforeRequestDoCallback ¶
type ChartOfAccountsGetRequest ¶
type ChartOfAccountsGetRequest struct {
// contains filtered or unexported fields
}
func (*ChartOfAccountsGetRequest) Do ¶
func (r *ChartOfAccountsGetRequest) Do() (ChartOfAccountsGetResponseBody, error)
func (*ChartOfAccountsGetRequest) Method ¶
func (r *ChartOfAccountsGetRequest) Method() string
func (ChartOfAccountsGetRequest) NewPathParams ¶
func (r ChartOfAccountsGetRequest) NewPathParams() *ChartOfAccountsGetRequestPathParams
func (ChartOfAccountsGetRequest) NewQueryParams ¶
func (r ChartOfAccountsGetRequest) NewQueryParams() *ChartOfAccountsGetRequestQueryParams
func (ChartOfAccountsGetRequest) NewRequestBody ¶
func (r ChartOfAccountsGetRequest) NewRequestBody() ChartOfAccountsGetRequestBody
func (*ChartOfAccountsGetRequest) NewResponseBody ¶
func (r *ChartOfAccountsGetRequest) NewResponseBody() *ChartOfAccountsGetResponseBody
func (*ChartOfAccountsGetRequest) PathParams ¶
func (r *ChartOfAccountsGetRequest) PathParams() *ChartOfAccountsGetRequestPathParams
func (*ChartOfAccountsGetRequest) PathParamsInterface ¶
func (r *ChartOfAccountsGetRequest) PathParamsInterface() PathParams
func (*ChartOfAccountsGetRequest) QueryParams ¶
func (r *ChartOfAccountsGetRequest) QueryParams() *ChartOfAccountsGetRequestQueryParams
func (*ChartOfAccountsGetRequest) RequestBody ¶
func (r *ChartOfAccountsGetRequest) RequestBody() *ChartOfAccountsGetRequestBody
func (*ChartOfAccountsGetRequest) RequestBodyInterface ¶
func (r *ChartOfAccountsGetRequest) RequestBodyInterface() interface{}
func (*ChartOfAccountsGetRequest) SetMethod ¶
func (r *ChartOfAccountsGetRequest) SetMethod(method string)
func (*ChartOfAccountsGetRequest) SetRequestBody ¶
func (r *ChartOfAccountsGetRequest) SetRequestBody(body ChartOfAccountsGetRequestBody)
func (*ChartOfAccountsGetRequest) URL ¶
func (r *ChartOfAccountsGetRequest) URL() *url.URL
type ChartOfAccountsGetRequestBody ¶
type ChartOfAccountsGetRequestBody struct { }
type ChartOfAccountsGetRequestPathParams ¶
type ChartOfAccountsGetRequestPathParams struct { }
func (*ChartOfAccountsGetRequestPathParams) Params ¶
func (p *ChartOfAccountsGetRequestPathParams) Params() map[string]string
type ChartOfAccountsGetRequestQueryParams ¶
type ChartOfAccountsGetRequestQueryParams struct{}
func (ChartOfAccountsGetRequestQueryParams) ToURLValues ¶
func (p ChartOfAccountsGetRequestQueryParams) ToURLValues() (url.Values, error)
type ChartOfAccountsGetResponseBody ¶
type ChartOfAccountsGetResponseBody struct {
LedgerAccounts LedgerAccounts `json:"ledgerAccounts"`
}
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client manages communication with Exact Globe Client
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 (c *Client) GetEndpointURL(p string, pathParams PathParams) url.URL
func (*Client) NewBankAccountsGetRequest ¶
func (c *Client) NewBankAccountsGetRequest() BankAccountsGetRequest
func (*Client) NewChartOfAccountsGetRequest ¶
func (c *Client) NewChartOfAccountsGetRequest() ChartOfAccountsGetRequest
func (*Client) NewCompanyGetRequest ¶
func (c *Client) NewCompanyGetRequest() CompanyGetRequest
func (*Client) NewDimensionsGetRequest ¶
func (c *Client) NewDimensionsGetRequest() DimensionsGetRequest
func (*Client) NewInvoicesGetRequest ¶
func (c *Client) NewInvoicesGetRequest() InvoicesGetRequest
func (*Client) NewInvoicesPostRequest ¶
func (c *Client) NewInvoicesPostRequest() InvoicesPostRequest
func (*Client) NewLedgerReceiptsPostRequest ¶
func (c *Client) NewLedgerReceiptsPostRequest() LedgerReceiptsPostRequest
func (*Client) NewRequest ¶
func (*Client) NewVatsDefaultGetRequest ¶
func (c *Client) NewVatsDefaultGetRequest() VatsDefaultGetRequest
func (*Client) SetBaseURL ¶
func (*Client) SetBeforeRequestDo ¶
func (c *Client) SetBeforeRequestDo(fun BeforeRequestDoCallback)
func (*Client) SetCharset ¶
func (*Client) SetDisallowUnknownFields ¶
func (*Client) SetHTTPClient ¶
func (*Client) SetMediaType ¶
func (*Client) SetUserAgent ¶
type Company ¶
type Company struct { ID int `json:"id"` Name string `json:"name"` Country string `json:"country"` ProductVersion string `json:"productVersion"` OperationType string `json:"operationType"` AccountingOfficeName string `json:"accountingOfficeName"` AccountingOfficeID int `json:"accountingOfficeId"` CompanyAddress struct { Street string `json:"street"` Zip string `json:"zip"` City string `json:"city"` Country string `json:"country"` } `json:"companyAddress"` BillingAddress struct { Street string `json:"street"` Zip string `json:"zip"` City string `json:"city"` } `json:"billingAddress"` Mva bool `json:"mva"` InTradeRegister bool `json:"inTradeRegister"` BusinessIdentifier struct { BrnType string `json:"brnType"` Code string `json:"code"` } `json:"businessIdentifier"` }
type CompanyGetRequest ¶
type CompanyGetRequest struct {
// contains filtered or unexported fields
}
func (*CompanyGetRequest) Do ¶
func (r *CompanyGetRequest) Do() (CompanyGetResponseBody, error)
func (*CompanyGetRequest) Method ¶
func (r *CompanyGetRequest) Method() string
func (CompanyGetRequest) NewPathParams ¶
func (r CompanyGetRequest) NewPathParams() *CompanyGetRequestPathParams
func (CompanyGetRequest) NewQueryParams ¶
func (r CompanyGetRequest) NewQueryParams() *CompanyGetRequestQueryParams
func (CompanyGetRequest) NewRequestBody ¶
func (r CompanyGetRequest) NewRequestBody() CompanyGetRequestBody
func (*CompanyGetRequest) NewResponseBody ¶
func (r *CompanyGetRequest) NewResponseBody() *CompanyGetResponseBody
func (*CompanyGetRequest) PathParams ¶
func (r *CompanyGetRequest) PathParams() *CompanyGetRequestPathParams
func (*CompanyGetRequest) PathParamsInterface ¶
func (r *CompanyGetRequest) PathParamsInterface() PathParams
func (*CompanyGetRequest) QueryParams ¶
func (r *CompanyGetRequest) QueryParams() *CompanyGetRequestQueryParams
func (*CompanyGetRequest) RequestBody ¶
func (r *CompanyGetRequest) RequestBody() *CompanyGetRequestBody
func (*CompanyGetRequest) RequestBodyInterface ¶
func (r *CompanyGetRequest) RequestBodyInterface() interface{}
func (*CompanyGetRequest) SetMethod ¶
func (r *CompanyGetRequest) SetMethod(method string)
func (*CompanyGetRequest) SetRequestBody ¶
func (r *CompanyGetRequest) SetRequestBody(body CompanyGetRequestBody)
func (*CompanyGetRequest) URL ¶
func (r *CompanyGetRequest) URL() *url.URL
type CompanyGetRequestBody ¶
type CompanyGetRequestBody struct { }
type CompanyGetRequestPathParams ¶
type CompanyGetRequestPathParams struct { }
func (*CompanyGetRequestPathParams) Params ¶
func (p *CompanyGetRequestPathParams) Params() map[string]string
type CompanyGetRequestQueryParams ¶
type CompanyGetRequestQueryParams struct{}
func (CompanyGetRequestQueryParams) ToURLValues ¶
func (p CompanyGetRequestQueryParams) ToURLValues() (url.Values, error)
type CompanyGetResponseBody ¶
type CompanyGetResponseBody Company
type CounterParty ¶
type CounterParty struct { ContactPersonName string `json:"contactPersonName"` Identifier string `json:"identifier"` TaxCode string `json:"taxCode"` CustomerNumber string `json:"customerNumber"` Email string `json:"email"` CounterPartyAddress Address `json:"counterPartyAddress"` BankAccount BankAccount `json:"bankAccount,omitempty"` EinvoiceAddress struct { Operator string `json:"operator"` Address string `json:"address"` EdiID string `json:"ediId"` } `json:"einvoiceAddress"` }
func (CounterParty) IsEmpty ¶
func (cp CounterParty) IsEmpty() bool
func (CounterParty) MarshalJSON ¶
func (cp CounterParty) MarshalJSON() ([]byte, error)
type DateTime ¶
func (*DateTime) MarshalJSON ¶
func (DateTime) MarshalSchema ¶
func (*DateTime) UnmarshalJSON ¶
type DeliveryTermsInfo ¶
type DeliveryTermsInfo struct { Name string `json:"name"` Municipality string `json:"municipality"` }
func (DeliveryTermsInfo) IsEmpty ¶
func (i DeliveryTermsInfo) IsEmpty() bool
func (DeliveryTermsInfo) MarshalJSON ¶
func (i DeliveryTermsInfo) MarshalJSON() ([]byte, error)
type Dimensions ¶
type Dimensions []Dimension
type DimensionsGetRequest ¶
type DimensionsGetRequest struct {
// contains filtered or unexported fields
}
func (*DimensionsGetRequest) Do ¶
func (r *DimensionsGetRequest) Do() (DimensionsGetResponseBody, error)
func (*DimensionsGetRequest) Method ¶
func (r *DimensionsGetRequest) Method() string
func (DimensionsGetRequest) NewPathParams ¶
func (r DimensionsGetRequest) NewPathParams() *DimensionsGetRequestPathParams
func (DimensionsGetRequest) NewQueryParams ¶
func (r DimensionsGetRequest) NewQueryParams() *DimensionsGetRequestQueryParams
func (DimensionsGetRequest) NewRequestBody ¶
func (r DimensionsGetRequest) NewRequestBody() DimensionsGetRequestBody
func (*DimensionsGetRequest) NewResponseBody ¶
func (r *DimensionsGetRequest) NewResponseBody() *DimensionsGetResponseBody
func (*DimensionsGetRequest) PathParams ¶
func (r *DimensionsGetRequest) PathParams() *DimensionsGetRequestPathParams
func (*DimensionsGetRequest) PathParamsInterface ¶
func (r *DimensionsGetRequest) PathParamsInterface() PathParams
func (*DimensionsGetRequest) QueryParams ¶
func (r *DimensionsGetRequest) QueryParams() *DimensionsGetRequestQueryParams
func (*DimensionsGetRequest) RequestBody ¶
func (r *DimensionsGetRequest) RequestBody() *DimensionsGetRequestBody
func (*DimensionsGetRequest) RequestBodyInterface ¶
func (r *DimensionsGetRequest) RequestBodyInterface() interface{}
func (*DimensionsGetRequest) SetMethod ¶
func (r *DimensionsGetRequest) SetMethod(method string)
func (*DimensionsGetRequest) SetRequestBody ¶
func (r *DimensionsGetRequest) SetRequestBody(body DimensionsGetRequestBody)
func (*DimensionsGetRequest) URL ¶
func (r *DimensionsGetRequest) URL() *url.URL
type DimensionsGetRequestBody ¶
type DimensionsGetRequestBody struct { }
type DimensionsGetRequestPathParams ¶
type DimensionsGetRequestPathParams struct { }
func (*DimensionsGetRequestPathParams) Params ¶
func (p *DimensionsGetRequestPathParams) Params() map[string]string
type DimensionsGetRequestQueryParams ¶
type DimensionsGetRequestQueryParams struct{}
func (DimensionsGetRequestQueryParams) ToURLValues ¶
func (p DimensionsGetRequestQueryParams) ToURLValues() (url.Values, error)
type DimensionsGetResponseBody ¶
type DimensionsGetResponseBody Dimensions
type Error ¶
type ErrorResponse ¶
type ErrorResponse struct { // HTTP response that caused this error Response *http.Response Errors Errors }
{ "errors": [ { "status": 400, "message": "Value of the 'depreciation' field is invalid: " } ] }
func (*ErrorResponse) Error ¶
func (r *ErrorResponse) Error() string
type ExtraInfo ¶
type ExtraInfo struct { AccountingByRow bool `json:"accountingByRow"` UnitPricesIncludeVat bool `json:"unitPricesIncludeVat"` }
func (ExtraInfo) MarshalJSON ¶
type Invoice ¶
type Invoice struct { ID int `json:"id,omitempty"` PartnerID int `json:"partnerId,omitempty"` Type string `json:"type"` Status string `json:"status"` Date string `json:"date"` DueDate string `json:"dueDate,omitempty"` CounterParty CounterParty `json:"counterParty"` BillingAddress Address `json:"billingAddress,omitempty"` DeliveryAddress Address `json:"deliveryAddress,omitempty"` PaymentInfo PaymentInfo `json:"paymentInfo"` DeliveryTermsInfo DeliveryTermsInfo `json:"deliveryTermsInfo,omitempty"` ExtraInfo ExtraInfo `json:"extraInfo"` DiscountPercent int `json:"discountPercent"` OrderReference string `json:"orderReference"` InvoiceRows InvoiceRows `json:"invoiceRows"` VatStatus int `json:"vatStatus"` InvoiceNumber int `json:"invoiceNumber"` OriginalInvoiceNumber string `json:"originalInvoiceNumber"` DeliveryStartDate string `json:"deliveryStartDate,omitempty"` DeliveryEndDate string `json:"deliveryEndDate,omitempty"` DeliveryMethod string `json:"deliveryMethod,omitempty"` DeliveryInstructions string `json:"deliveryInstructions,omitempty"` InvoiceChannel string `json:"invoiceChannel,omitempty"` InvoiceOperatorInfo InvoiceOperatorInfo `json:"invoiceOperatorInfo,omitempty"` PenaltyPercent int `json:"penaltyPercent,omitempty"` Language string `json:"language,omitempty"` InvoiceTemplateID int `json:"invoiceTemplateId,omitempty"` AdditionalInformation string `json:"additionalInformation,omitempty"` VatCountry string `json:"vatCountry,omitempty"` Notes string `json:"notes,omitempty"` FactoringContractID int `json:"factoringContractId,omitempty"` FactoringText string `json:"factoringText,omitempty"` TravelInformationItems TravelInformationItems `json:"travelInformationItems,omitempty"` // InvoiceApprovalInformation struct { // Acceptors []struct { // UserID int `json:"userId"` // } `json:"acceptors"` // Verifiers []struct { // UserID int `json:"userId"` // } `json:"verifiers"` // } `json:"invoiceApprovalInformation,omitempty"` OrderNumber string `json:"orderNumber,omitempty"` AgreementNumber string `json:"agreementNumber,omitempty"` AccountingCode string `json:"accountingCode,omitempty"` DeliverySite string `json:"deliverySite,omitempty"` TenderReference string `json:"tenderReference,omitempty"` IsOffer bool `json:"isOffer,omitempty"` Created string `json:"created,omitempty"` Version string `json:"version,omitempty"` }
func (Invoice) MarshalJSON ¶
type InvoiceOperatorInfo ¶
type InvoiceOperatorInfo struct { Operator string `json:"operator"` ReceivingAddress string `json:"receivingAddress"` }
func (InvoiceOperatorInfo) IsEmpty ¶
func (i InvoiceOperatorInfo) IsEmpty() bool
func (InvoiceOperatorInfo) MarshalJSON ¶
func (i InvoiceOperatorInfo) MarshalJSON() ([]byte, error)
type InvoiceRow ¶
type InvoiceRow struct { ProductID int `json:"productId,omitempty"` Product string `json:"product"` ProductCode string `json:"productCode,omitempty"` Quantity int `json:"quantity"` Unit string `json:"unit"` UnitPrice float64 `json:"unitPrice"` DiscountPercent float64 `json:"discountPercent"` VatPercent float64 `json:"vatPercent"` VatStatus int `json:"vatStatus,omitempty"` Comment string `json:"comment"` StartDate string `json:"startDate,omitempty"` EndDate string `json:"endDate,omitempty"` }
type InvoiceRows ¶
type InvoiceRows []InvoiceRow
type InvoicesGetRequest ¶
type InvoicesGetRequest struct {
// contains filtered or unexported fields
}
func (*InvoicesGetRequest) All ¶
func (r *InvoicesGetRequest) All() (InvoicesGetResponseBody, error)
func (*InvoicesGetRequest) Do ¶
func (r *InvoicesGetRequest) Do() (InvoicesGetResponseBody, error)
func (*InvoicesGetRequest) Method ¶
func (r *InvoicesGetRequest) Method() string
func (InvoicesGetRequest) NewPathParams ¶
func (r InvoicesGetRequest) NewPathParams() *InvoicesGetRequestPathParams
func (InvoicesGetRequest) NewQueryParams ¶
func (r InvoicesGetRequest) NewQueryParams() *InvoicesGetRequestQueryParams
func (InvoicesGetRequest) NewRequestBody ¶
func (r InvoicesGetRequest) NewRequestBody() InvoicesGetRequestBody
func (*InvoicesGetRequest) NewResponseBody ¶
func (r *InvoicesGetRequest) NewResponseBody() *InvoicesGetResponseBody
func (*InvoicesGetRequest) PathParams ¶
func (r *InvoicesGetRequest) PathParams() *InvoicesGetRequestPathParams
func (*InvoicesGetRequest) PathParamsInterface ¶
func (r *InvoicesGetRequest) PathParamsInterface() PathParams
func (*InvoicesGetRequest) QueryParams ¶
func (r *InvoicesGetRequest) QueryParams() *InvoicesGetRequestQueryParams
func (*InvoicesGetRequest) RequestBody ¶
func (r *InvoicesGetRequest) RequestBody() *InvoicesGetRequestBody
func (*InvoicesGetRequest) RequestBodyInterface ¶
func (r *InvoicesGetRequest) RequestBodyInterface() interface{}
func (*InvoicesGetRequest) SetMethod ¶
func (r *InvoicesGetRequest) SetMethod(method string)
func (*InvoicesGetRequest) SetRequestBody ¶
func (r *InvoicesGetRequest) SetRequestBody(body InvoicesGetRequestBody)
func (*InvoicesGetRequest) URL ¶
func (r *InvoicesGetRequest) URL() *url.URL
type InvoicesGetRequestBody ¶
type InvoicesGetRequestBody struct { }
type InvoicesGetRequestPathParams ¶
type InvoicesGetRequestPathParams struct { }
func (*InvoicesGetRequestPathParams) Params ¶
func (p *InvoicesGetRequestPathParams) Params() map[string]string
type InvoicesGetRequestQueryParams ¶
type InvoicesGetRequestQueryParams struct { Status []string `schema:"status,omitempty"` StartDate string `schema:"startDate,omitempty"` EndDate string `schema:"endDate,omitempty"` CreatedStartDate string `schema:"createdStartDate,omitempty"` CreatedEndDate string `schema:"createdEndDate,omitempty"` VersionStartDate string `schema:"versionStartDate,omitempty"` VersionEndDate string `schema:"versionEndDate,omitempty"` Types []string `schema:"types,omitempty"` BusinessPartnerId int `schema:"businessPartnerId,omitempty"` FactoringContractID int `schema:"factoringContractId,omitempty"` OriginalInvoiceNumber string `schema:"originalInvoiceNumber,omitempty"` InvoiceNumber string `schema:"invoiceNumber,omitempty"` PreviousId int `schema:"previousId,omitempty"` OrderById string `schema:"orderById,omitempty"` OrderByDate string `schema:"orderByDate,omitempty"` OrderByCreated string `schema:"orderByCreated,omitempty"` OrderByVersion string `schema:"orderByVersion,omitempty"` Size int `schema:"size,omitempty"` Page int `schema:"page,omitempty"` InvoiceChannelID []string `schema:"invoiceChannelId,omitempty"` }
func (InvoicesGetRequestQueryParams) ToURLValues ¶
func (p InvoicesGetRequestQueryParams) ToURLValues() (url.Values, error)
type InvoicesGetResponseBody ¶
type InvoicesPostRequest ¶
type InvoicesPostRequest struct {
// contains filtered or unexported fields
}
func (*InvoicesPostRequest) Do ¶
func (r *InvoicesPostRequest) Do() (InvoicesPostResponseBody, error)
func (*InvoicesPostRequest) Method ¶
func (r *InvoicesPostRequest) Method() string
func (InvoicesPostRequest) NewPathParams ¶
func (r InvoicesPostRequest) NewPathParams() *InvoicesPostRequestPathParams
func (InvoicesPostRequest) NewQueryParams ¶
func (r InvoicesPostRequest) NewQueryParams() *InvoicesPostRequestQueryParams
func (InvoicesPostRequest) NewRequestBody ¶
func (r InvoicesPostRequest) NewRequestBody() InvoicesPostRequestBody
func (*InvoicesPostRequest) NewResponseBody ¶
func (r *InvoicesPostRequest) NewResponseBody() *InvoicesPostResponseBody
func (*InvoicesPostRequest) PathParams ¶
func (r *InvoicesPostRequest) PathParams() *InvoicesPostRequestPathParams
func (*InvoicesPostRequest) PathParamsInterface ¶
func (r *InvoicesPostRequest) PathParamsInterface() PathParams
func (*InvoicesPostRequest) QueryParams ¶
func (r *InvoicesPostRequest) QueryParams() *InvoicesPostRequestQueryParams
func (*InvoicesPostRequest) RequestBody ¶
func (r *InvoicesPostRequest) RequestBody() *InvoicesPostRequestBody
func (*InvoicesPostRequest) RequestBodyInterface ¶
func (r *InvoicesPostRequest) RequestBodyInterface() interface{}
func (*InvoicesPostRequest) SetMethod ¶
func (r *InvoicesPostRequest) SetMethod(method string)
func (*InvoicesPostRequest) SetRequestBody ¶
func (r *InvoicesPostRequest) SetRequestBody(body InvoicesPostRequestBody)
func (*InvoicesPostRequest) URL ¶
func (r *InvoicesPostRequest) URL() *url.URL
type InvoicesPostRequestBody ¶
type InvoicesPostRequestBody Invoice
func (InvoicesPostRequestBody) IsEmpty ¶
func (rb InvoicesPostRequestBody) IsEmpty() bool
func (InvoicesPostRequestBody) MarshalJSON ¶
func (rb InvoicesPostRequestBody) MarshalJSON() ([]byte, error)
type InvoicesPostRequestPathParams ¶
type InvoicesPostRequestPathParams struct { }
func (*InvoicesPostRequestPathParams) Params ¶
func (p *InvoicesPostRequestPathParams) Params() map[string]string
type InvoicesPostRequestQueryParams ¶
type InvoicesPostRequestQueryParams struct{}
func (InvoicesPostRequestQueryParams) ToURLValues ¶
func (p InvoicesPostRequestQueryParams) ToURLValues() (url.Values, error)
type InvoicesPostResponseBody ¶
type InvoicesPostResponseBody Invoice
type LedgerAccount ¶
type LedgerAccounts ¶
type LedgerAccounts []LedgerAccount
type LedgerReceiptsPostRequest ¶
type LedgerReceiptsPostRequest struct {
// contains filtered or unexported fields
}
func (*LedgerReceiptsPostRequest) Do ¶
func (r *LedgerReceiptsPostRequest) Do() (LedgerReceiptsPostResponseBody, error)
func (*LedgerReceiptsPostRequest) Method ¶
func (r *LedgerReceiptsPostRequest) Method() string
func (LedgerReceiptsPostRequest) NewPathParams ¶
func (r LedgerReceiptsPostRequest) NewPathParams() *LedgerReceiptsPostRequestPathParams
func (LedgerReceiptsPostRequest) NewQueryParams ¶
func (r LedgerReceiptsPostRequest) NewQueryParams() *LedgerReceiptsPostRequestQueryParams
func (LedgerReceiptsPostRequest) NewRequestBody ¶
func (r LedgerReceiptsPostRequest) NewRequestBody() LedgerReceiptsPostRequestBody
func (*LedgerReceiptsPostRequest) NewResponseBody ¶
func (r *LedgerReceiptsPostRequest) NewResponseBody() *LedgerReceiptsPostResponseBody
func (*LedgerReceiptsPostRequest) PathParams ¶
func (r *LedgerReceiptsPostRequest) PathParams() *LedgerReceiptsPostRequestPathParams
func (*LedgerReceiptsPostRequest) PathParamsInterface ¶
func (r *LedgerReceiptsPostRequest) PathParamsInterface() PathParams
func (*LedgerReceiptsPostRequest) QueryParams ¶
func (r *LedgerReceiptsPostRequest) QueryParams() *LedgerReceiptsPostRequestQueryParams
func (*LedgerReceiptsPostRequest) RequestBody ¶
func (r *LedgerReceiptsPostRequest) RequestBody() *LedgerReceiptsPostRequestBody
func (*LedgerReceiptsPostRequest) RequestBodyInterface ¶
func (r *LedgerReceiptsPostRequest) RequestBodyInterface() interface{}
func (*LedgerReceiptsPostRequest) SetMethod ¶
func (r *LedgerReceiptsPostRequest) SetMethod(method string)
func (*LedgerReceiptsPostRequest) SetRequestBody ¶
func (r *LedgerReceiptsPostRequest) SetRequestBody(body LedgerReceiptsPostRequestBody)
func (*LedgerReceiptsPostRequest) URL ¶
func (r *LedgerReceiptsPostRequest) URL() *url.URL
type LedgerReceiptsPostRequestBody ¶
type LedgerReceiptsPostRequestBody struct { // readOnly: true // Unique identifier of the ledger receipt. Generated by Procountor and // present in the object returned. ID int `json:"id,omitempty"` // Ledger receipt type. Use JOURNAL for creating ledger receipts (vouchers) // containing ledger transactions without linkage to pre-existing resources. // Other types are automatically generated by Procountor for holding // accounting information for e.g. invoices. Types allowed for POST = // JOURNAL. Types allowed for PUT = JOURNAL, SALES_INVOICE, // PURCHASE_INVOICE, TRAVEL_INVOICE, BILL_OF_CHARGES Types allowed for GET // listed below: // [ JOURNAL, PURCHASE_INVOICE, SALES_INVOICE, PERIODIC_TAX_RETURN, // TRAVEL_INVOICE, BILL_OF_CHARGES, VAT_FORM, SALARY, EMPLOYER_CONTRIBUTION, // PURCHASE_ORDER, SALES_ORDER, BANK_STATEMENT_AS_RECEIPT, // RECEIPT_FOR_OPENING_ACCOUNTS, REFERENCE_PAYMENT, // TRACKING_PERIOD_OPENING_RECEIPT, VAT_SUMMARY ] Type string `json:"type"` // readOnly: true // Ledger receipt status. Status of a ledger receipt equals the status of // the linked invoice. All ledger receipts are initially created with status // UNFINISHED. For journals, possible statuses are UNFINISHED, APPROVED and // INVALIDATED. Ledger receipt statuses cannot be directly modified through // the API. Status string `json:"status,omitempty"` // Ledger receipt name. Name string `json:"name"` // Ledger receipt date. Must not be in a closed fiscal period. See GET // /fiscalyears for a list of fiscal years. ReceiptDate string `json:"receiptDate"` // Ledger receipt VAT type. // [ SALES, PURCHASE ] // Ledger receipt VAT status. This can be overridden on transaction level. // Use here the numeric parts of VAT status codes listed in "VAT defaults" // in Procountor. For example, for VAT status code "vat_12", use value 12. // The VAT status used must be enabled for the current receipt type // (sales/purchase). VatType string `json:"vatType"` VatStatus int `json:"vatStatus"` // Ledger receipt VAT country. Only for JOURNAL types of ledger receipts. // Requires a special right for foreign VATs. See Address.country in POST // /invoices for a list of allowable values. VatProcessing string `json:"vatProcessing,omitempty"` // readOnly: true // ID of the linked invoice. For sales and purchase invoice ledger receipts, // this refers to the invoice the receipt holds accounting data for. For // journal receipts, an invoice is automatically generated to store certain // data fields. Use this ID in POST /attachments endpoint. InvoiceID int `json:"invoiceId,omitempty"` // readOnly: true // Receipt number of bank statement as receipt. ReceiptNumber int `json:"receiptNumber,omitempty"` // Invoice notes. Linked to Invoice.notes. Not visible on ledger receipt // printouts. Use \n as line break. Max length 10000. InvoiceNotes string `json:"invoiceNotes"` // readOnly: true // Number of the linked invoice. Automatically generated by Procountor. InvoiceNumber int `json:"invoiceNumber,omitempty"` // Notes made by the accountant. Visible on ledger receipt printouts. AccountantsNotes string `json:"accountantsNotes"` // Transaction description. This is a summary description for any // transactions belonging to the ledger receipt. TransactionDescription string `json:"transactionDescription"` // Receipt validity time. // [ EMPTY, IMMEDIATELY, SERVICE_PERIOD, OVER_3_YEARS ] ReceiptValidity string `json:"receiptValidity,omitempty"` // Start date of the receipt period. If set, must precede the end date of // the period. PeriodStartDate string `json:"periodStartDate"` // End date of the receipt period. If this and the start date are set, this // must be after the start date. PeriodEndDate string `json:"periodEndDate"` // Partner code. Identifier for the related company or person. May represent // a business ID, national identification number (HETU in Finland) or an // account number, depending on the receipt type. PartnerCode string `json:"partnerCode,omitempty"` // Ledger receipt version timestamp. Automatically generated by Procountor // and updated every time the receipt is modified. When using PUT // /ledgerreceipts, it is required to include the latest version timestamp // of the receipt to the request. This prevents conflicts if the receipt is // being modified from several sources. Version time.Time `json:"version,omitempty"` // Accounting depreciation method for the receipt. Depreciation string `json:"depreciation,omitempty"` // VAT date to be used if payment based VAT is enabled VatDate string `json:"vatDate,omitempty"` Transactions []struct { // readOnly: true // Unique identifier for the ledger transaction. Automatically generated // by Procountor and present in the object returned. ID int `json:"id,omitempty"` // Transaction type. Depends on the transaction and the ledger account // in question. Type REVERSING_ENTRY is used to indicate the first row // of a ledger receipt for a specific logic on the UI. Typically, it // represents a transaction for a balance sheet account. Note that // ledger receipts with no transactions marked as reversing entries are // possible. Type ENTRY is the general type for transactions. It can be // used even on the first rows of ledger receipts. Type // RECONCILIATION_ENTRY is used for getting the sum of transactions on a // receipt to reconcile (to equal zero). Generally, all ledger receipts // should reconcile. Procountor can create reconciliation entries // automatically for ledger receipts when "createReconciliation=true" // query parameter is specified. If VAT is used, a reconciliation row // might be necessary due to remainders and rounding. For both // REVERSING_ENTRY and RECONCILIATION_ENTRY transactions, vatStatus // cannot be defined and vatPercent must be 0. Additionally, a ledger // can have maximum of one REVERSING_ENTRY and maximum of one // RECONCILIATION_ENTRY transaction. Transactions of these types cannot // be removed from a ledger receipt using UI once created. // [ RECONCILIATION_ENTRY, REVERSING_ENTRY, ENTRY ] TransactionType string `json:"transactionType"` // Ledger account number for the transaction. Must be valid for the // current Procountor environment. Use GET /coa to obtain the chart of // accounts. Account string `json:"account"` // Transaction accounting value. This value is net. Scale: 2. AccountingValue float64 `json:"accountingValue"` // Transaction VAT percentage. Must be a percentage currently in use for // the company. VatPercent float64 `json:"vatPercent"` // Transaction VAT type. // [ SALES, PURCHASE ] VatType string `json:"vatType"` // Transaction VAT status. This overrides the VAT status set for the // parent ledger receipt. Use here the numeric parts of VAT status codes // listed in "VAT defaults" in Procountor. For example, for VAT status // code "vat_12", use value 12. The VAT status used must be enabled for // the current receipt type (sales/purchase). VatStatus int `json:"vatStatus"` // Transaction description. Visible on ledger receipt printouts. Description string `json:"description"` // Transaction balance code. Only available if the use balance sheet // setting is enabled. BalanceCode string `json:"balanceCode,omitempty"` // Technical ID for the partner. Can be provided in Norwegian // environments only. The given partner id must match a partner of type // different than PERSON, existing in the current Procountor // environment. PartnerID int `json:"partnerId,omitempty"` // Values of dimension items associated with this transaction. The // number of provided dimension items must be within the dimension max // count defined by the purchased Procountor license. Provided dimension // pairs (dimension id - item id) must be unique within the list // provided. DimensionItemValues []struct { // Dimension ID. Must exist in the current environment. For a list // of available dimensions, see the GET /dimensions endpoint. DimensionID int `json:"dimensionId"` // Dimension item ID. Must exist in the current environment. For a // list of available dimensions, see the GET /dimensions endpoint. ItemID int `json:"itemId"` // Dimension item value with maximum two decimal places. Use // absolute values instead of percentages. The sum of dimension item // values on a dimension must equal the accounting value of the // parent transaction. Value float64 `json:"value"` } `json:"dimensionItemValues"` // VAT deduction percentage for the transaction. VatDeductionPercent int `json:"vatDeductionPercent,omitempty"` // Start date of accrual/delivery periods of transaction. StartDate string `json:"startDate,omitempty"` // End date of accrual/delivery periods of transaction. EndDate string `json:"endDate,omitempty"` } `json:"transactions"` }
type LedgerReceiptsPostRequestPathParams ¶
type LedgerReceiptsPostRequestPathParams struct { }
func (*LedgerReceiptsPostRequestPathParams) Params ¶
func (p *LedgerReceiptsPostRequestPathParams) Params() map[string]string
type LedgerReceiptsPostRequestQueryParams ¶
type LedgerReceiptsPostRequestQueryParams struct{}
func (LedgerReceiptsPostRequestQueryParams) ToURLValues ¶
func (p LedgerReceiptsPostRequestQueryParams) ToURLValues() (url.Values, error)
type LedgerReceiptsPostResponseBody ¶
type LedgerReceiptsPostResponseBody Dimensions
type Oauth2Config ¶
func NewOauth2Config ¶
func NewOauth2Config() *Oauth2Config
type PathParams ¶
type PaymentInfo ¶
type PaymentInfo struct { PaymentMethod string `json:"paymentMethod"` Currency string `json:"currency"` BankAccount BankAccount `json:"bankAccount,omitempty"` DueDate string `json:"dueDate"` CurrencyRate int `json:"currencyRate"` PaymentTermPercentage int `json:"paymentTermPercentage,omitempty"` CashDiscount struct { DiscountPercentage int `json:"discountPercentage,omitempty"` } `json:"cashDiscount,omitempty"` BankReferenceCode string `json:"bankReferenceCode"` BankReferenceCodeType string `json:"bankReferenceCodeType,omitempty"` ClearingCode string `json:"clearingCode,omitempty"` }
func (PaymentInfo) IsEmpty ¶
func (i PaymentInfo) IsEmpty() bool
func (PaymentInfo) MarshalJSON ¶
func (i PaymentInfo) MarshalJSON() ([]byte, error)
type QueryParams ¶
type Request ¶
type Request interface { Method() string // QueryParams() QueryParams PathParamsInterface() PathParams RequestBodyInterface() interface{} URL() *url.URL }
type RequestCompletionCallback ¶
RequestCompletionCallback defines the type of the request callback function
type TravelInformationItem ¶
type TravelInformationItem struct { Departure string `json:"departure"` Arrival string `json:"arrival"` Places string `json:"places"` Purpose string `json:"purpose"` }
func (TravelInformationItem) IsEmpty ¶
func (i TravelInformationItem) IsEmpty() bool
func (TravelInformationItem) MarshalJSON ¶
func (i TravelInformationItem) MarshalJSON() ([]byte, error)
type TravelInformationItems ¶
type TravelInformationItems []TravelInformationItem
type VatInformation ¶
type VatInformations ¶
type VatInformations []VatInformation
type VatStatuses ¶
type VatStatuses []VatStatus
type VatsDefaultGetRequest ¶
type VatsDefaultGetRequest struct {
// contains filtered or unexported fields
}
func (*VatsDefaultGetRequest) Do ¶
func (r *VatsDefaultGetRequest) Do() (VatsDefaultGetResponseBody, error)
func (*VatsDefaultGetRequest) Method ¶
func (r *VatsDefaultGetRequest) Method() string
func (VatsDefaultGetRequest) NewPathParams ¶
func (r VatsDefaultGetRequest) NewPathParams() *VatsDefaultGetRequestPathParams
func (VatsDefaultGetRequest) NewQueryParams ¶
func (r VatsDefaultGetRequest) NewQueryParams() *VatsDefaultGetRequestQueryParams
func (VatsDefaultGetRequest) NewRequestBody ¶
func (r VatsDefaultGetRequest) NewRequestBody() VatsDefaultGetRequestBody
func (*VatsDefaultGetRequest) NewResponseBody ¶
func (r *VatsDefaultGetRequest) NewResponseBody() *VatsDefaultGetResponseBody
func (*VatsDefaultGetRequest) PathParams ¶
func (r *VatsDefaultGetRequest) PathParams() *VatsDefaultGetRequestPathParams
func (*VatsDefaultGetRequest) PathParamsInterface ¶
func (r *VatsDefaultGetRequest) PathParamsInterface() PathParams
func (*VatsDefaultGetRequest) QueryParams ¶
func (r *VatsDefaultGetRequest) QueryParams() *VatsDefaultGetRequestQueryParams
func (*VatsDefaultGetRequest) RequestBody ¶
func (r *VatsDefaultGetRequest) RequestBody() *VatsDefaultGetRequestBody
func (*VatsDefaultGetRequest) RequestBodyInterface ¶
func (r *VatsDefaultGetRequest) RequestBodyInterface() interface{}
func (*VatsDefaultGetRequest) SetMethod ¶
func (r *VatsDefaultGetRequest) SetMethod(method string)
func (*VatsDefaultGetRequest) SetRequestBody ¶
func (r *VatsDefaultGetRequest) SetRequestBody(body VatsDefaultGetRequestBody)
func (*VatsDefaultGetRequest) URL ¶
func (r *VatsDefaultGetRequest) URL() *url.URL
type VatsDefaultGetRequestBody ¶
type VatsDefaultGetRequestBody struct { }
type VatsDefaultGetRequestPathParams ¶
type VatsDefaultGetRequestPathParams struct { }
func (*VatsDefaultGetRequestPathParams) Params ¶
func (p *VatsDefaultGetRequestPathParams) Params() map[string]string
type VatsDefaultGetRequestQueryParams ¶
type VatsDefaultGetRequestQueryParams struct{}
func (VatsDefaultGetRequestQueryParams) ToURLValues ¶
func (p VatsDefaultGetRequestQueryParams) ToURLValues() (url.Values, error)
type VatsDefaultGetResponseBody ¶
type VatsDefaultGetResponseBody struct { VatInformation VatInformations `json:"vatInformation"` VatStatuses VatStatuses `json:"vatStatuses"` }