economic

package module
v0.0.0-...-b9eda44 Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2023 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	BaseURL = url.URL{
		Scheme: "https",
		Host:   "restapi.e-conomic.com",
		Path:   "",
	}
)

Functions

func AddQueryParamsToRequest

func AddQueryParamsToRequest(requestParams interface{}, req *http.Request, skipEmpty bool) error

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.

func QueryEscape

func QueryEscape(s string) string

Types

type Account

type Account struct {
	AccountNumber int    `json:"accountNumber"`
	Self          string `json:"self,omitempty"`
}

func (Account) IsEmpty

func (a Account) IsEmpty() bool

type AccountingYear

type AccountingYear struct {
	FromDate Date   `json:"fromDate"`
	ToDate   Date   `json:"toDate"`
	Closed   bool   `json:"closed,omitempty"`
	Year     string `json:"year"`
	Periods  string `json:"periods"`
	Entries  string `json:"entries"`
	Totals   string `json:"totals"`
	Vouchers string `json:"vouchers"`
	Self     string `json:"self"`
}

type AccountingYearsEntriesGetPathParams

type AccountingYearsEntriesGetPathParams struct {
	AccountingYear string
}

func (*AccountingYearsEntriesGetPathParams) Params

type AccountingYearsEntriesGetQueryParams

type AccountingYearsEntriesGetQueryParams struct {
}

func (AccountingYearsEntriesGetQueryParams) ToURLValues

type AccountingYearsEntriesGetRequest

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

func (*AccountingYearsEntriesGetRequest) Do

func (AccountingYearsEntriesGetRequest) FilterableProperties

func (r AccountingYearsEntriesGetRequest) FilterableProperties() []string

func (*AccountingYearsEntriesGetRequest) Method

func (*AccountingYearsEntriesGetRequest) NewResponseBody

func (*AccountingYearsEntriesGetRequest) PathParams

func (*AccountingYearsEntriesGetRequest) QueryParams

func (*AccountingYearsEntriesGetRequest) RequestBody

func (AccountingYearsEntriesGetRequest) RequiredProperties

func (r AccountingYearsEntriesGetRequest) RequiredProperties() []string

func (*AccountingYearsEntriesGetRequest) SetMethod

func (r *AccountingYearsEntriesGetRequest) SetMethod(method string)

func (*AccountingYearsEntriesGetRequest) SetRequestBody

func (AccountingYearsEntriesGetRequest) SortableProperties

func (r AccountingYearsEntriesGetRequest) SortableProperties() []string

func (*AccountingYearsEntriesGetRequest) URL

type AccountingYearsEntriesGetRequestBody

type AccountingYearsEntriesGetRequestBody struct {
}

type AccountingYearsEntriesGetResponseBody

type AccountingYearsEntriesGetResponseBody struct {
}

type AccountingYearsGetPathParams

type AccountingYearsGetPathParams struct {
}

func (*AccountingYearsGetPathParams) Params

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

type AccountingYearsGetQueryParams

type AccountingYearsGetQueryParams struct {
}

func (AccountingYearsGetQueryParams) ToURLValues

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

type AccountingYearsGetRequest

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

func (*AccountingYearsGetRequest) Do

func (AccountingYearsGetRequest) FilterableProperties

func (r AccountingYearsGetRequest) FilterableProperties() []string

func (*AccountingYearsGetRequest) Method

func (r *AccountingYearsGetRequest) Method() string

func (*AccountingYearsGetRequest) NewResponseBody

func (*AccountingYearsGetRequest) PathParams

func (*AccountingYearsGetRequest) QueryParams

func (*AccountingYearsGetRequest) RequestBody

func (AccountingYearsGetRequest) RequiredProperties

func (r AccountingYearsGetRequest) RequiredProperties() []string

func (*AccountingYearsGetRequest) SetMethod

func (r *AccountingYearsGetRequest) SetMethod(method string)

func (*AccountingYearsGetRequest) SetRequestBody

func (AccountingYearsGetRequest) SortableProperties

func (r AccountingYearsGetRequest) SortableProperties() []string

func (*AccountingYearsGetRequest) URL

func (r *AccountingYearsGetRequest) URL() (url.URL, error)

type AccountingYearsGetRequestBody

type AccountingYearsGetRequestBody struct {
}

type AccountingYearsGetResponseBody

type AccountingYearsGetResponseBody struct {
	Collection []AccountingYear `json:"collection"`
	Pagination struct {
		MaxPageSizeAllowed   int    `json:"maxPageSizeAllowed"`
		SkipPages            int    `json:"skipPages"`
		PageSize             int    `json:"pageSize"`
		Results              int    `json:"results"`
		ResultsWithoutFilter int    `json:"resultsWithoutFilter"`
		FirstPage            string `json:"firstPage"`
		LastPage             string `json:"lastPage"`
	} `json:"pagination"`
	Self string `json:"self"`
}

type AccountsGetPathParams

type AccountsGetPathParams struct {
}

func (*AccountsGetPathParams) Params

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

type AccountsGetQueryParams

type AccountsGetQueryParams struct {
	// https://restdocs.e-conomic.com/#pagination
	SkipPages int `schema:"skippages,omitempty"`
	PageSize  int `schema:"pagesize,omitempty"`
	// https://restdocs.e-conomic.com/#filtering
	// Filterable properties: accountNumber, accountType, balance, barred, blockDirectEntries, debitCredit, name
	Filter string `schema:"filter,omitempty"`
	// https://restdocs.e-conomic.com/#sorting
	Sort string `schema:"sort,omitempty"`
}

func (AccountsGetQueryParams) ToURLValues

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

type AccountsGetRequest

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

func (*AccountsGetRequest) Do

func (AccountsGetRequest) FilterableProperties

func (r AccountsGetRequest) FilterableProperties() []string

func (*AccountsGetRequest) Method

func (r *AccountsGetRequest) Method() string

func (*AccountsGetRequest) NewResponseBody

func (r *AccountsGetRequest) NewResponseBody() *AccountsGetResponseBody

func (*AccountsGetRequest) PathParams

func (r *AccountsGetRequest) PathParams() *AccountsGetPathParams

func (*AccountsGetRequest) QueryParams

func (r *AccountsGetRequest) QueryParams() *AccountsGetQueryParams

func (*AccountsGetRequest) RequestBody

func (r *AccountsGetRequest) RequestBody() *AccountsGetRequestBody

func (AccountsGetRequest) RequiredProperties

func (r AccountsGetRequest) RequiredProperties() []string

func (*AccountsGetRequest) SetMethod

func (r *AccountsGetRequest) SetMethod(method string)

func (*AccountsGetRequest) SetRequestBody

func (r *AccountsGetRequest) SetRequestBody(body AccountsGetRequestBody)

func (AccountsGetRequest) SortableProperties

func (r AccountsGetRequest) SortableProperties() []string

func (*AccountsGetRequest) URL

func (r *AccountsGetRequest) URL() (url.URL, error)

type AccountsGetRequestBody

type AccountsGetRequestBody struct {
}

type AccountsGetResponseBody

type AccountsGetResponseBody struct {
	Collection []struct {
		AccountNumber      int     `json:"accountNumber"`
		AccountType        string  `json:"accountType"`
		Balance            float64 `json:"balance"`
		BlockDirectEntries bool    `json:"blockDirectEntries"`
		DebitCredit        string  `json:"debitCredit"`
		Name               string  `json:"name"`
		AccountingYears    string  `json:"accountingYears"`
		Self               string  `json:"self"`
		VatAccount         struct {
			VatCode string `json:"vatCode"`
			Self    string `json:"self"`
		} `json:"vatAccount,omitempty"`
		TotalFromAccount struct {
			AccountNumber int    `json:"accountNumber"`
			Self          string `json:"self"`
		} `json:"totalFromAccount,omitempty"`
	} `json:"collection"`
	Pagination Pagination `json:"pagination"`
	Self       string     `json:"self"`
}

type Attention

type Attention struct {

	// The unique identifier of the customer employee.
	CustomerContactNumber int `json:"customerContactNumber,omitempty"`

	// A unique link reference to the customer employee item.
	Self string `json:"self,omitempty"`
}

Attention The customer's person of attention.

type Bool

type Bool bool

func (Bool) MarshalJSON

func (b Bool) MarshalJSON() ([]byte, error)

func (Bool) MarshalSchema

func (b Bool) MarshalSchema() string

type Client

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

Client manages communication with InvoiceXpress Client

func NewClient

func NewClient(httpClient *http.Client) *Client

NewClient returns a new InvoiceXpress Client client

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

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

func (Client) GrantToken

func (c Client) GrantToken() string

func (*Client) MediaType

func (c *Client) MediaType() string

func (*Client) NewAccountingYearsEntriesGetPathParams

func (c *Client) NewAccountingYearsEntriesGetPathParams() *AccountingYearsEntriesGetPathParams

func (*Client) NewAccountingYearsEntriesGetQueryParams

func (c *Client) NewAccountingYearsEntriesGetQueryParams() *AccountingYearsEntriesGetQueryParams

func (*Client) NewAccountingYearsEntriesGetRequest

func (c *Client) NewAccountingYearsEntriesGetRequest() AccountingYearsEntriesGetRequest

func (*Client) NewAccountingYearsEntriesGetRequestBody

func (s *Client) NewAccountingYearsEntriesGetRequestBody() AccountingYearsEntriesGetRequestBody

func (*Client) NewAccountingYearsGetPathParams

func (c *Client) NewAccountingYearsGetPathParams() *AccountingYearsGetPathParams

func (*Client) NewAccountingYearsGetQueryParams

func (c *Client) NewAccountingYearsGetQueryParams() *AccountingYearsGetQueryParams

func (*Client) NewAccountingYearsGetRequest

func (c *Client) NewAccountingYearsGetRequest() AccountingYearsGetRequest

func (*Client) NewAccountingYearsGetRequestBody

func (s *Client) NewAccountingYearsGetRequestBody() AccountingYearsGetRequestBody

func (*Client) NewAccountsGetPathParams

func (c *Client) NewAccountsGetPathParams() *AccountsGetPathParams

func (*Client) NewAccountsGetQueryParams

func (c *Client) NewAccountsGetQueryParams() *AccountsGetQueryParams

func (*Client) NewAccountsGetRequest

func (c *Client) NewAccountsGetRequest() AccountsGetRequest

func (*Client) NewAccountsGetRequestBody

func (s *Client) NewAccountsGetRequestBody() AccountsGetRequestBody

func (*Client) NewCustomersGetPathParams

func (c *Client) NewCustomersGetPathParams() *CustomersGetPathParams

func (*Client) NewCustomersGetQueryParams

func (c *Client) NewCustomersGetQueryParams() *CustomersGetQueryParams

func (*Client) NewCustomersGetRequest

func (c *Client) NewCustomersGetRequest() CustomersGetRequest

func (*Client) NewCustomersGetRequestBody

func (s *Client) NewCustomersGetRequestBody() CustomersGetRequestBody

func (*Client) NewCustomersPostPathParams

func (c *Client) NewCustomersPostPathParams() *CustomersPostPathParams

func (*Client) NewCustomersPostQueryParams

func (c *Client) NewCustomersPostQueryParams() *CustomersPostQueryParams

func (*Client) NewCustomersPostRequest

func (c *Client) NewCustomersPostRequest() CustomersPostRequest

func (*Client) NewCustomersPostRequestBody

func (s *Client) NewCustomersPostRequestBody() CustomersPostRequestBody

func (*Client) NewInvoicesDraftsPostPathParams

func (c *Client) NewInvoicesDraftsPostPathParams() *InvoicesDraftsPostPathParams

func (*Client) NewInvoicesDraftsPostQueryParams

func (c *Client) NewInvoicesDraftsPostQueryParams() *InvoicesDraftsPostQueryParams

func (*Client) NewInvoicesDraftsPostRequest

func (c *Client) NewInvoicesDraftsPostRequest() InvoicesDraftsPostRequest

func (*Client) NewInvoicesDraftsPostRequestBody

func (s *Client) NewInvoicesDraftsPostRequestBody() InvoicesDraftsPostRequestBody

func (*Client) NewJournalsEntriesGetPathParams

func (c *Client) NewJournalsEntriesGetPathParams() *JournalsEntriesGetPathParams

func (*Client) NewJournalsEntriesGetQueryParams

func (c *Client) NewJournalsEntriesGetQueryParams() *JournalsEntriesGetQueryParams

func (*Client) NewJournalsEntriesGetRequest

func (c *Client) NewJournalsEntriesGetRequest() JournalsEntriesGetRequest

func (*Client) NewJournalsEntriesGetRequestBody

func (s *Client) NewJournalsEntriesGetRequestBody() JournalsEntriesGetRequestBody

func (*Client) NewJournalsGetPathParams

func (c *Client) NewJournalsGetPathParams() *JournalsGetPathParams

func (*Client) NewJournalsGetQueryParams

func (c *Client) NewJournalsGetQueryParams() *JournalsGetQueryParams

func (*Client) NewJournalsGetRequest

func (c *Client) NewJournalsGetRequest() JournalsGetRequest

func (*Client) NewJournalsGetRequestBody

func (s *Client) NewJournalsGetRequestBody() JournalsGetRequestBody

func (*Client) NewJournalsVouchersByNumberGetPathParams

func (c *Client) NewJournalsVouchersByNumberGetPathParams() *JournalsVouchersByNumberGetPathParams

func (*Client) NewJournalsVouchersByNumberGetQueryParams

func (c *Client) NewJournalsVouchersByNumberGetQueryParams() *JournalsVouchersByNumberGetQueryParams

func (*Client) NewJournalsVouchersByNumberGetRequest

func (c *Client) NewJournalsVouchersByNumberGetRequest() JournalsVouchersByNumberGetRequest

func (*Client) NewJournalsVouchersByNumberGetRequestBody

func (s *Client) NewJournalsVouchersByNumberGetRequestBody() JournalsVouchersByNumberGetRequestBody

func (*Client) NewJournalsVouchersGetPathParams

func (c *Client) NewJournalsVouchersGetPathParams() *JournalsVouchersGetPathParams

func (*Client) NewJournalsVouchersGetQueryParams

func (c *Client) NewJournalsVouchersGetQueryParams() *JournalsVouchersGetQueryParams

func (*Client) NewJournalsVouchersGetRequest

func (c *Client) NewJournalsVouchersGetRequest() JournalsVouchersGetRequest

func (*Client) NewJournalsVouchersGetRequestBody

func (s *Client) NewJournalsVouchersGetRequestBody() JournalsVouchersGetRequestBody

func (*Client) NewJournalsVouchersPostPathParams

func (c *Client) NewJournalsVouchersPostPathParams() *JournalsVouchersPostPathParams

func (*Client) NewJournalsVouchersPostQueryParams

func (c *Client) NewJournalsVouchersPostQueryParams() *JournalsVouchersPostQueryParams

func (*Client) NewJournalsVouchersPostRequest

func (c *Client) NewJournalsVouchersPostRequest() JournalsVouchersPostRequest

func (*Client) NewJournalsVouchersPostRequestBody

func (s *Client) NewJournalsVouchersPostRequestBody() JournalsVouchersPostRequestBody

func (*Client) NewRequest

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

func (Client) SecretToken

func (c Client) SecretToken() 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) SetGrantToken

func (c *Client) SetGrantToken(token string)

func (*Client) SetMediaType

func (c *Client) SetMediaType(mediaType string)

func (*Client) SetSecretToken

func (c *Client) SetSecretToken(token string)

func (*Client) SetUserAgent

func (c *Client) SetUserAgent(userAgent string)

func (*Client) Unmarshal

func (c *Client) Unmarshal(r io.Reader, vv ...interface{}) error

func (*Client) UserAgent

func (c *Client) UserAgent() string

type Customer

type Customer struct {

	// Address for the customer including street and number.
	Address string `json:"address,omitempty"`

	// The customer's person of attention.
	Attention *Attention `json:"attention,omitempty"`

	// The outstanding amount for this customer.
	Balance float64 `json:"balance,omitempty"`

	// Boolean indication of whether the customer is barred from invoicing.
	Barred bool `json:"barred,omitempty"`

	// The customer's city.
	City string `json:"city,omitempty"`

	// A unique link reference to the customer contacts items.
	Contacts string `json:"contacts,omitempty"`

	// Corporate Identification Number. For example CVR in Denmark.
	CorporateIdentificationNumber string `json:"corporateIdentificationNumber,omitempty"`

	// The customer's country.
	Country string `json:"country,omitempty"`

	// A maximum credit for this customer. Once the maximum is reached or passed in connection with an order/quotation/invoice for this customer you see a warning in e-conomic.
	CreditLimit float64 `json:"creditLimit,omitempty"`

	// Default payment currency.
	Currency string `json:"currency,omitempty"`

	// Reference to main contact employee at customer.
	CustomerContact *CustomerContact `json:"customerContact,omitempty"`

	// Reference to the customer group this customer is attached to.
	CustomerGroup *CustomerGroup `json:"customerGroup,omitempty"`

	// The customer number is a positive unique numerical identifier with a maximum of 9 digits.
	CustomerNumber int `json:"customerNumber,omitempty"`

	// Customers default delivery location.
	DefaultDeliveryLocation *DefaultDeliveryLocation `json:"defaultDeliveryLocation,omitempty"`

	// A unique link reference to the customer delivery locations items.
	DeliveryLocations string `json:"deliveryLocations,omitempty"`

	// European Article Number. EAN is used for invoicing the Danish public sector.
	Ean string `json:"ean,omitempty"`

	// Customer e-mail address where e-conomic invoices should be emailed. Note: you can specify multiple email addresses in this field, separated by a space. If you need to send a copy of the invoice or write to other e-mail addresses, you can also create one or more customer contacts.
	Email    string    `json:"email,omitempty"`
	Invoices *Invoices `json:"invoices,omitempty"`

	// The date this customer was last updated. The date is formatted according to ISO-8601.
	LastUpdated string `json:"lastUpdated,omitempty"`

	// Layout to be applied for invoices and other documents for this customer.
	Layout *Layout `json:"layout,omitempty"`

	// The customer's mobile phone number.
	MobilePhone string `json:"mobilePhone,omitempty"`

	// The customer name.
	Name string `json:"name,omitempty"`

	// Extension of corporate identification number (CVR). Identifying separate production unit (p-nummer).
	PNumber string `json:"pNumber,omitempty"`

	// The default payment terms for the customer.
	PaymentTerms *PaymentTerms `json:"paymentTerms,omitempty"`

	// The public entry number is used for electronic invoicing, to define the account invoices will be registered on at the customer.
	PublicEntryNumber string `json:"publicEntryNumber,omitempty"`

	// Reference to the employee responsible for contact with this customer.
	SalesPerson *SalesPerson `json:"salesPerson,omitempty"`

	// The unique self reference of the customer resource.
	Self string `json:"self,omitempty"`

	// The customer's telephone and/or fax number.
	TelephoneAndFaxNumber string     `json:"telephoneAndFaxNumber,omitempty"`
	Templates             *Templates `json:"templates,omitempty"`
	Totals                *Totals    `json:"totals,omitempty"`

	// The customer's value added tax identification number. This field is only available to agreements in Sweden, UK, Germany, Poland and Finland. Not to be mistaken for the danish CVR number, which is defined on the corporateIdentificationNumber property.
	VatNumber string `json:"vatNumber,omitempty"`

	// Indicates in which VAT-zone the customer is located (e.g.: domestically, in Europe or elsewhere abroad).
	VatZone *VatZone `json:"vatZone,omitempty"`

	// Customer website, if applicable.
	Website string `json:"website,omitempty"`

	// The customer's postcode.
	Zip string `json:"zip,omitempty"`
}

Customer

type CustomerCollectionGETSchema

type CustomerCollectionGETSchema struct {

	// A collection of customers.
	Collection []*Customer `json:"collection,omitempty"`

	// Information about possible actions, endpoints and resource paths related to the endpoint.
	MetaData *MetaData `json:"metaData,omitempty"`

	// Information about the pagination.
	Pagination *Pagination `json:"pagination,omitempty"`

	// The unique self reference of the customer collection resource.
	Self string `json:"self,omitempty"`
}

CustomerCollectionGETSchema A schema for fetching a collection of customer, aka. Debtor.

type CustomerContact

type CustomerContact struct {

	// The unique identifier of the customer contact.
	CustomerContactNumber int `json:"customerContactNumber,omitempty"`

	// A unique link reference to the customer contact item.
	Self string `json:"self,omitempty"`
}

CustomerContact Reference to main contact employee at customer.

type CustomerGroup

type CustomerGroup struct {

	// The unique identifier of the customer group.
	CustomerGroupNumber int `json:"customerGroupNumber,omitempty"`

	// A unique link reference to the customer group item.
	Self string `json:"self,omitempty"`
}

CustomerGroup In order to set up a new customer, it is necessary to specify a customer group. It is useful to group a company’s customers (e.g., ‘domestic’ and ‘foreign’ customers) and to link the group members to the same account when generating reports.

type CustomerPOSTSchema

type CustomerPOSTSchema struct {

	// Address for the customer including street and number.
	Address string `json:"address,omitempty"`

	// The outstanding amount for this customer.
	Balance float64 `json:"balance,omitempty"`

	// Boolean indication of whether the customer is barred from invoicing.
	Barred bool `json:"barred,omitempty"`

	// The customer's city.
	City string `json:"city,omitempty"`

	// Corporate Identification Number. For example CVR in Denmark.
	CorporateIdentificationNumber string `json:"corporateIdentificationNumber,omitempty"`

	// The customer's country.
	Country string `json:"country,omitempty"`

	// A maximum credit for this customer. Once the maximum is reached or passed in connection with an order/quotation/invoice for this customer you see a warning in e-conomic.
	CreditLimit float64 `json:"creditLimit,omitempty"`

	// Default payment currency.
	Currency string `json:"currency,omitempty"`

	// In order to set up a new customer, it is necessary to specify a customer group. It is useful to group a company’s customers (e.g., ‘domestic’ and ‘foreign’ customers) and to link the group members to the same account when generating reports.
	CustomerGroup *CustomerGroup `json:"customerGroup,omitempty"`

	// The customer number is a positive unique numerical identifier with a maximum of 9 digits. If no customer number is specified a number will be supplied by the system.
	CustomerNumber int `json:"customerNumber,omitempty"`

	// European Article Number. EAN is used for invoicing the Danish public sector.
	Ean string `json:"ean,omitempty"`

	// Customer e-mail address where e-conomic invoices should be emailed. Note: you can specify multiple email addresses in this field, separated by a space. If you need to send a copy of the invoice or write to other e-mail addresses, you can also create one or more customer contacts.
	Email string `json:"email,omitempty"`

	// Layout to be applied for invoices and other documents for this customer.
	Layout *Layout `json:"layout,omitempty"`

	// The customer's mobile phone number.
	MobilePhone string `json:"mobilePhone,omitempty"`

	// The customer name.
	Name string `json:"name,omitempty"`

	// Extension of corporate identification number (CVR). Identifying separate production unit (p-nummer).
	PNumber string `json:"pNumber,omitempty"`

	// The default payment terms for the customer.
	PaymentTerms *PaymentTerms `json:"paymentTerms,omitempty"`
	PriceGroup   interface{}   `json:"priceGroup,omitempty"`

	// The public entry number is used for electronic invoicing, to define the account invoices will be registered on at the customer.
	PublicEntryNumber string `json:"publicEntryNumber,omitempty"`

	// Reference to the employee responsible for contact with this customer.
	SalesPerson *SalesPerson `json:"salesPerson,omitempty"`

	// The customer's telephone and/or fax number.
	TelephoneAndFaxNumber string `json:"telephoneAndFaxNumber,omitempty"`

	// The customer's value added tax identification number. This field is only available to agreements in Sweden, UK, Germany, Poland and Finland. Not to be mistaken for the danish CVR number, which is defined on the corporateIdentificationNumber property.
	VatNumber string `json:"vatNumber,omitempty"`

	// Indicates in which VAT-zone the customer is located (e.g.: domestically, in Europe or elsewhere abroad).
	VatZone *VatZone `json:"vatZone,omitempty"`

	// Customer website, if applicable.
	Website string `json:"website,omitempty"`

	// The customer's postcode.
	Zip string `json:"zip,omitempty"`
}

CustomerPOSTSchema A schema for creating a customer, aka. Debtor.

type CustomerPayment

type CustomerPayment struct {
	Customer struct {
		CustomerNumber int    `json:"customerNumber"`
		Self           string `json:"self,omitempty"`
	} `json:"customer"`
	Text    string  `json:"text"`
	Amount  float64 `json:"amount"`
	Account struct {
		AccountNumber int    `json:"accountNumber"`
		Self          string `json:"self,omitempty"`
	} `json:"account"`
	ContraAccount struct {
		AccountNumber int    `json:"accountNumber"`
		Self          string `json:"self,omitempty"`
	} `json:"contraAccount"`
	Currency struct {
		Code string `json:"code"`
		Self string `json:"self,omitempty"`
	} `json:"currency"`
	Date string `json:"date"`
	Type string `json:"type"`
	Self string `json:"self,omitempty"`
}

type CustomersGetPathParams

type CustomersGetPathParams struct {
}

func (*CustomersGetPathParams) Params

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

type CustomersGetQueryParams

type CustomersGetQueryParams struct {
	// https://restdocs.e-conomic.com/#pagination
	SkipPages int `schema:"skippages,omitempty"`
	PageSize  int `schema:"pagesize,omitempty"`
	// https://restdocs.e-conomic.com/#filtering
	Filter Filter `schema:"filter,omitempty"`
	// https://restdocs.e-conomic.com/#sorting
	Sort string `schema:"sort,omitempty"`
}

func (CustomersGetQueryParams) ToURLValues

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

type CustomersGetRequest

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

func (*CustomersGetRequest) Do

func (CustomersGetRequest) FilterableProperties

func (r CustomersGetRequest) FilterableProperties() []string

func (*CustomersGetRequest) Method

func (r *CustomersGetRequest) Method() string

func (*CustomersGetRequest) NewResponseBody

func (r *CustomersGetRequest) NewResponseBody() *CustomersGetResponseBody

func (*CustomersGetRequest) PathParams

func (*CustomersGetRequest) QueryParams

func (r *CustomersGetRequest) QueryParams() *CustomersGetQueryParams

func (*CustomersGetRequest) RequestBody

func (r *CustomersGetRequest) RequestBody() *CustomersGetRequestBody

func (CustomersGetRequest) RequiredProperties

func (r CustomersGetRequest) RequiredProperties() []string

func (*CustomersGetRequest) SetMethod

func (r *CustomersGetRequest) SetMethod(method string)

func (*CustomersGetRequest) SetRequestBody

func (r *CustomersGetRequest) SetRequestBody(body CustomersGetRequestBody)

func (CustomersGetRequest) SortableProperties

func (r CustomersGetRequest) SortableProperties() []string

func (*CustomersGetRequest) URL

func (r *CustomersGetRequest) URL() (url.URL, error)

type CustomersGetRequestBody

type CustomersGetRequestBody struct {
}

type CustomersGetResponseBody

type CustomersGetResponseBody struct {
	Collection []Customer `json:"collection"`
	Pagination Pagination `json:"pagination"`
	MetaData   struct {
		Create struct {
			Description string `json:"description"`
			Href        string `json:"href"`
			HTTPMethod  string `json:"httpMethod"`
		} `json:"create"`
	} `json:"metaData"`
	Self string `json:"self"`
}

type CustomersPostPathParams

type CustomersPostPathParams struct {
	JournalNumber int
}

func (*CustomersPostPathParams) Params

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

type CustomersPostQueryParams

type CustomersPostQueryParams struct {
}

func (CustomersPostQueryParams) ToURLValues

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

type CustomersPostRequest

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

func (*CustomersPostRequest) Do

func (CustomersPostRequest) FilterableProperties

func (r CustomersPostRequest) FilterableProperties() []string

func (*CustomersPostRequest) Method

func (r *CustomersPostRequest) Method() string

func (*CustomersPostRequest) NewResponseBody

func (r *CustomersPostRequest) NewResponseBody() *CustomersPostResponseBody

func (*CustomersPostRequest) PathParams

func (*CustomersPostRequest) QueryParams

func (*CustomersPostRequest) RequestBody

func (CustomersPostRequest) RequiredProperties

func (r CustomersPostRequest) RequiredProperties() []string

func (*CustomersPostRequest) SetMethod

func (r *CustomersPostRequest) SetMethod(method string)

func (*CustomersPostRequest) SetRequestBody

func (r *CustomersPostRequest) SetRequestBody(body CustomersPostRequestBody)

func (CustomersPostRequest) SortableProperties

func (r CustomersPostRequest) SortableProperties() []string

func (*CustomersPostRequest) URL

func (r *CustomersPostRequest) URL() (url.URL, error)

type CustomersPostRequestBody

type CustomersPostRequestBody CustomerPOSTSchema

type CustomersPostResponseBody

type CustomersPostResponseBody []struct {
}

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

func (d *Date) UnmarshalJSON(data []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) MarshalSchema

func (d DateTime) MarshalSchema() string

func (*DateTime) UnmarshalJSON

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

type DefaultDeliveryLocation

type DefaultDeliveryLocation struct {

	// The unique identifier of the delivery location.
	DeliveryLocationNumber int `json:"deliveryLocationNumber,omitempty"`

	// A unique link reference to the delivery location.
	Self string `json:"self,omitempty"`
}

DefaultDeliveryLocation Customers default delivery location.

type DepartmentalDistribution

type DepartmentalDistribution struct {
}

func (DepartmentalDistribution) IsEmpty

func (d DepartmentalDistribution) IsEmpty() bool

type Error

type Error struct {
	PropertyName  string      `json:"propertyName"`
	ErrorMessage  string      `json:"errorMessage"`
	ErrorCode     string      `json:"errorCode"`
	InputValue    interface{} `json:"inputValue"`
	DeveloperHint string      `json:"developerHint"`
}

func (Error) Error

func (r Error) Error() string

func (*Error) UnmarshalJSON

func (e *Error) UnmarshalJSON(data []byte) error

type ErrorCollection

type ErrorCollection []struct {
	ArrayIndex int `json:"arrayIndex"`
	Account    struct {
		Errors []Error `json:"errors"`
	} `json:"account"`
	Entries struct {
		Items ErrorCollection `json:"items"`
	} `json:"entries"`
	Type struct {
		Errors []Error `json:"errors"`
	} `json:"type"`
}

func (ErrorCollection) Error

func (cc ErrorCollection) Error() string

type ErrorResponse

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

	Message Message
}

func (*ErrorResponse) Error

func (r *ErrorResponse) Error() string

func (*ErrorResponse) UnmarshalJSON

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

type Filter

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

https://restdocs.e-conomic.com/#filtering

func (Filter) IsZero

func (f Filter) IsZero() bool

func (Filter) MarshalSchema

func (f Filter) MarshalSchema() string

func (*Filter) Set

func (f *Filter) Set(s string)

func (Filter) String

func (f Filter) String() string

type FinanceVoucher

type FinanceVoucher struct {
	Account                       Account `json:"account,omitempty"`
	Amount                        float64 `json:"amount"`
	AmountBaseCurrency            float64 `json:"amountBaseCurrency,omitempty"`
	ContraAccount                 Account `json:"contraAccount,omitempty"`
	ContactVATAccount             Account `json:"contraVatAccount,omitempty"`
	ContraVatAmount               float64 `json:"contraVatAmount,omitempty"`
	ContraVatAmountInBaseCurrency float64 `json:"contraVatAmountInBaseCurrency,omitempty"`
	Currency                      struct {
		Code string `json:"code"`
		Self string `json:"self,omitempty"`
	} `json:"currency"`
	//  Entry date. Format according to ISO-8601 (YYYY-MM-DD).
	Date                     string                   `json:"date"`
	DepartmentalDistribution DepartmentalDistribution `json:"departmentalDistribution,omitempty"`
	Employee                 struct {
	} `json:"employee,omitempty"`
	// Type of the journal entry. This is automatically set to financeVoucher.
	EntryType    string  `json:"entryType,omitempty"`
	ExchangeRate float64 `json:"exchangeRate,omitempty"`
	Journal      *struct {
		JournalNumber int    `json:"journalNumber"`
		Self          string `json:"self,omitempty"`
	} `json:"journal,omitempty"`
	Project struct {
	} `json:"project,omitempty"`
	Quantity1                  float64 `json:"quantity1,omitempty"`
	Quantity2                  float64 `json:"quantity2,omitempty"`
	Remainder                  float64 `json:"remainder,omitempty"`
	RemainderInDefaultCurrency float64 `json:"remainderInDefaultCurrency,omitempty"`
	Text                       string  `json:"text,omitempty"`
	Unit1                      struct {
	} `json:"unit1,omitempty"`
	Unit2 struct {
	} `json:"unit2,omitempty"`
	VATAccount struct {
		Self    string `json:"self,omitempty"`
		VATCode string `json:"vatCode"`
	} `json:"vatAccount"`
	VATAmount             float64 `json:"vatAmount"`
	VATAmountBaseCurrency float64 `json:"vatAmountBaseCurrency,omitempty"`
	Voucher               Voucher `json:"voucher,omitempty"`
}

func (FinanceVoucher) MarshalJSON

func (f FinanceVoucher) MarshalJSON() ([]byte, error)

type Int

type Int int

func (Int) MarshalJSON

func (i Int) MarshalJSON() ([]byte, error)

func (*Int) UnmarshalJSON

func (i *Int) UnmarshalJSON(data []byte) error

type InvoiceDraftDelivery

type InvoiceDraftDelivery struct {
	Address      string `json:"address"`
	Zip          string `json:"zip"`
	City         string `json:"city"`
	Country      string `json:"country"`
	DeliveryDate string `json:"deliveryDate"`
}

func (InvoiceDraftDelivery) IsEmpty

func (d InvoiceDraftDelivery) IsEmpty() bool

type InvoiceDraftLayout

type InvoiceDraftLayout struct {
	LayoutNumber int `json:"layoutNumber,omitempty"`
}

func (InvoiceDraftLayout) IsEmpty

func (l InvoiceDraftLayout) IsEmpty() bool

type InvoiceDraftLine

type InvoiceDraftLine struct {
	LineNumber int `json:"lineNumber"`
	SortKey    int `json:"sortKey"`
	Unit       struct {
		UnitNumber int    `json:"unitNumber"`
		Name       string `json:"name"`
	} `json:"unit,omitempty"`
	Product struct {
		ProductNumber string `json:"productNumber"`
	} `json:"product"`
	Quantity             float64 `json:"quantity"`
	UnitNetPrice         float64 `json:"unitNetPrice"`
	DiscountPercentage   float64 `json:"discountPercentage"`
	UnitCostPrice        float64 `json:"unitCostPrice"`
	TotalNetAmount       float64 `json:"totalNetAmount"`
	MarginInBaseCurrency float64 `json:"marginInBaseCurrency"`
	MarginPercentage     float64 `json:"marginPercentage"`
}

type InvoiceDraftPaymentTerms

type InvoiceDraftPaymentTerms struct {
	PaymentTermsNumber int    `json:"paymentTermsNumber"`
	DaysOfCredit       int    `json:"daysOfCredit,omitempty"`
	Name               string `json:"name,omitempty"`
	PaymentTermsType   string `json:"paymentTermsType,omitempty"`
}

func (InvoiceDraftPaymentTerms) IsEmpty

func (pt InvoiceDraftPaymentTerms) IsEmpty() bool

type InvoiceDraftRecipient

type InvoiceDraftRecipient struct {
	Name    string              `json:"name"`
	Address string              `json:"address"`
	Zip     string              `json:"zip"`
	City    string              `json:"city"`
	VatZone InvoiceDraftVatZone `json:"vatZone,omitempty"`
}

func (InvoiceDraftRecipient) IsEmpty

func (r InvoiceDraftRecipient) IsEmpty() bool

func (InvoiceDraftRecipient) MarshalJSON

func (r InvoiceDraftRecipient) MarshalJSON() ([]byte, error)

type InvoiceDraftVatZone

type InvoiceDraftVatZone struct {
	Name               string `json:"name"`
	VatZoneNumber      int    `json:"vatZoneNumber,omitempty"`
	EnabledForCustomer bool   `json:"enabledForCustomer"`
	EnabledForSupplier bool   `json:"enabledForSupplier"`
}

func (InvoiceDraftVatZone) IsEmpty

func (vz InvoiceDraftVatZone) IsEmpty() bool

type Invoices

type Invoices struct {

	// The unique reference to the booked invoices for this customer.
	Booked string `json:"booked,omitempty"`

	// The unique reference to the draft invoices for this customer.
	Drafts string `json:"drafts,omitempty"`

	// A unique link reference to the invoices resource for this customer.
	Self string `json:"self,omitempty"`
}

Invoices

type InvoicesDraftsPostPathParams

type InvoicesDraftsPostPathParams struct {
}

func (*InvoicesDraftsPostPathParams) Params

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

type InvoicesDraftsPostQueryParams

type InvoicesDraftsPostQueryParams struct {
}

func (InvoicesDraftsPostQueryParams) ToURLValues

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

type InvoicesDraftsPostRequest

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

func (*InvoicesDraftsPostRequest) Do

func (InvoicesDraftsPostRequest) FilterableProperties

func (r InvoicesDraftsPostRequest) FilterableProperties() []string

func (*InvoicesDraftsPostRequest) Method

func (r *InvoicesDraftsPostRequest) Method() string

func (*InvoicesDraftsPostRequest) NewResponseBody

func (*InvoicesDraftsPostRequest) PathParams

func (*InvoicesDraftsPostRequest) QueryParams

func (*InvoicesDraftsPostRequest) RequestBody

func (InvoicesDraftsPostRequest) RequiredProperties

func (r InvoicesDraftsPostRequest) RequiredProperties() []string

func (*InvoicesDraftsPostRequest) SetMethod

func (r *InvoicesDraftsPostRequest) SetMethod(method string)

func (*InvoicesDraftsPostRequest) SetRequestBody

func (InvoicesDraftsPostRequest) SortableProperties

func (r InvoicesDraftsPostRequest) SortableProperties() []string

func (*InvoicesDraftsPostRequest) URL

func (r *InvoicesDraftsPostRequest) URL() (url.URL, error)

type InvoicesDraftsPostRequestBody

type InvoicesDraftsPostRequestBody struct {
	Date                    Date                     `json:"date"`
	Currency                string                   `json:"currency"`
	ExchangeRate            float64                  `json:"exchangeRate,omitempty"`
	NetAmount               float64                  `json:"netAmount"`
	NetAmountInBaseCurrency float64                  `json:"netAmountInBaseCurrency"`
	GrossAmount             float64                  `json:"grossAmount"`
	MarginInBaseCurrency    float64                  `json:"marginInBaseCurrency"`
	MarginPercentage        float64                  `json:"marginPercentage"`
	VatAmount               float64                  `json:"vatAmount"`
	RoundingAmount          float64                  `json:"roundingAmount"`
	CostPriceInBaseCurrency float64                  `json:"costPriceInBaseCurrency"`
	PaymentTerms            InvoiceDraftPaymentTerms `json:"paymentTerms,omitempty"`
	Customer                struct {
		CustomerNumber int `json:"customerNumber"`
	} `json:"customer"`
	Recipient  InvoiceDraftRecipient `json:"recipient,omitempty"`
	Delivery   InvoiceDraftDelivery  `json:"delivery,omitempty"`
	References struct {
		Other string `json:"other"`
	} `json:"references"`
	Layout InvoiceDraftLayout `json:"layout,omitempty"`
	Lines  []InvoiceDraftLine `json:"lines,omitempty"`
}

func (InvoicesDraftsPostRequestBody) MarshalJSON

func (i InvoicesDraftsPostRequestBody) MarshalJSON() ([]byte, error)

type InvoicesDraftsPostResponseBody

type InvoicesDraftsPostResponseBody struct {
	DraftInvoiceNumber int `json:"draftInvoiceNumber"`
	Soap               struct {
		CurrentInvoiceHandle struct {
			ID int `json:"id"`
		} `json:"currentInvoiceHandle"`
	} `json:"soap"`
	Templates struct {
		BookingInstructions string `json:"bookingInstructions"`
		Self                string `json:"self"`
	} `json:"templates"`
	Date                      string  `json:"date"`
	Currency                  string  `json:"currency"`
	ExchangeRate              float64 `json:"exchangeRate"`
	NetAmount                 float64 `json:"netAmount"`
	NetAmountInBaseCurrency   float64 `json:"netAmountInBaseCurrency"`
	GrossAmount               float64 `json:"grossAmount"`
	GrossAmountInBaseCurrency float64 `json:"grossAmountInBaseCurrency"`
	MarginInBaseCurrency      float64 `json:"marginInBaseCurrency"`
	MarginPercentage          float64 `json:"marginPercentage"`
	VatAmount                 float64 `json:"vatAmount"`
	RoundingAmount            float64 `json:"roundingAmount"`
	CostPriceInBaseCurrency   float64 `json:"costPriceInBaseCurrency"`
	DueDate                   string  `json:"dueDate"`
	PaymentTerms              struct {
		PaymentTermsNumber int    `json:"paymentTermsNumber"`
		Name               string `json:"name"`
		PaymentTermsType   string `json:"paymentTermsType"`
		Self               string `json:"self"`
	} `json:"paymentTerms"`
	Customer struct {
		CustomerNumber int    `json:"customerNumber"`
		Self           string `json:"self"`
	} `json:"customer"`
	Recipient struct {
		Name    string `json:"name"`
		Address string `json:"address"`
		Zip     string `json:"zip"`
		City    string `json:"city"`
		VatZone struct {
			Name               string `json:"name"`
			VatZoneNumber      int    `json:"vatZoneNumber"`
			EnabledForCustomer bool   `json:"enabledForCustomer"`
			EnabledForSupplier bool   `json:"enabledForSupplier"`
			Self               string `json:"self"`
		} `json:"vatZone"`
	} `json:"recipient"`
	Layout struct {
		LayoutNumber int    `json:"layoutNumber"`
		Self         string `json:"self"`
	} `json:"layout"`
	Pdf struct {
		Download string `json:"download"`
	} `json:"pdf"`
	Self string `json:"self"`
}

type Journal

type Journal struct {
	Name      string `json:"name"`
	Vouchers  string `json:"vouchers"`
	Entries   string `json:"entries"`
	Templates struct {
		FinanceVoucher        string `json:"financeVoucher"`
		ManualCustomerInvoice string `json:"manualCustomerInvoice"`
		Self                  string `json:"self"`
	} `json:"templates"`
	JournalNumber int    `json:"journalNumber"`
	Self          string `json:"self"`
	Settings      struct {
		VoucherNumbers struct {
			MinimumVoucherNumber int `json:"minimumVoucherNumber"`
		} `json:"voucherNumbers"`
		EntryTypeRestrictedTo string `json:"entryTypeRestrictedTo"`
		ContraAccounts        struct {
			CustomerPayments struct {
				AccountNumber int    `json:"accountNumber"`
				Self          string `json:"self"`
			} `json:"customerPayments"`
		} `json:"contraAccounts"`
	} `json:"settings,omitempty"`
}

type JournalsEntriesGetPathParams

type JournalsEntriesGetPathParams struct {
	JournalNumber int
}

func (*JournalsEntriesGetPathParams) Params

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

type JournalsEntriesGetQueryParams

type JournalsEntriesGetQueryParams struct {
}

func (JournalsEntriesGetQueryParams) ToURLValues

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

type JournalsEntriesGetRequest

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

func (*JournalsEntriesGetRequest) Do

func (JournalsEntriesGetRequest) FilterableProperties

func (r JournalsEntriesGetRequest) FilterableProperties() []string

func (*JournalsEntriesGetRequest) Method

func (r *JournalsEntriesGetRequest) Method() string

func (*JournalsEntriesGetRequest) NewResponseBody

func (*JournalsEntriesGetRequest) PathParams

func (*JournalsEntriesGetRequest) QueryParams

func (*JournalsEntriesGetRequest) RequestBody

func (JournalsEntriesGetRequest) RequiredProperties

func (r JournalsEntriesGetRequest) RequiredProperties() []string

func (*JournalsEntriesGetRequest) SetMethod

func (r *JournalsEntriesGetRequest) SetMethod(method string)

func (*JournalsEntriesGetRequest) SetRequestBody

func (JournalsEntriesGetRequest) SortableProperties

func (r JournalsEntriesGetRequest) SortableProperties() []string

func (*JournalsEntriesGetRequest) URL

func (r *JournalsEntriesGetRequest) URL() (url.URL, error)

type JournalsEntriesGetRequestBody

type JournalsEntriesGetRequestBody struct {
}

type JournalsEntriesGetResponseBody

type JournalsEntriesGetResponseBody struct {
}

type JournalsGetPathParams

type JournalsGetPathParams struct {
}

func (*JournalsGetPathParams) Params

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

type JournalsGetQueryParams

type JournalsGetQueryParams struct {
	// https://restdocs.e-conomic.com/#pagination
	SkipPages int `schema:"skippages,omitempty"`
	PageSize  int `schema:"pagesize,omitempty"`
	// https://restdocs.e-conomic.com/#filtering
	// Filterable properties: accountNumber, accountType, balance, barred, blockDirectEntries, debitCredit, name
	Filter string `schema:"filter,omitempty"`
	// https://restdocs.e-conomic.com/#sorting
	Sort string `schema:"sort,omitempty"`
}

func (JournalsGetQueryParams) ToURLValues

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

type JournalsGetRequest

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

func (*JournalsGetRequest) Do

func (JournalsGetRequest) FilterableProperties

func (r JournalsGetRequest) FilterableProperties() []string

func (*JournalsGetRequest) Method

func (r *JournalsGetRequest) Method() string

func (*JournalsGetRequest) NewResponseBody

func (r *JournalsGetRequest) NewResponseBody() *JournalsGetResponseBody

func (*JournalsGetRequest) PathParams

func (r *JournalsGetRequest) PathParams() *JournalsGetPathParams

func (*JournalsGetRequest) QueryParams

func (r *JournalsGetRequest) QueryParams() *JournalsGetQueryParams

func (*JournalsGetRequest) RequestBody

func (r *JournalsGetRequest) RequestBody() *JournalsGetRequestBody

func (JournalsGetRequest) RequiredProperties

func (r JournalsGetRequest) RequiredProperties() []string

func (*JournalsGetRequest) SetMethod

func (r *JournalsGetRequest) SetMethod(method string)

func (*JournalsGetRequest) SetRequestBody

func (r *JournalsGetRequest) SetRequestBody(body JournalsGetRequestBody)

func (JournalsGetRequest) SortableProperties

func (r JournalsGetRequest) SortableProperties() []string

func (*JournalsGetRequest) URL

func (r *JournalsGetRequest) URL() (url.URL, error)

type JournalsGetRequestBody

type JournalsGetRequestBody struct {
}

type JournalsGetResponseBody

type JournalsGetResponseBody struct {
	Collection []Journal  `json:"collection"`
	Pagination Pagination `json:"pagination"`
	Self       string     `json:"self"`
}

type JournalsVouchersByNumberGetPathParams

type JournalsVouchersByNumberGetPathParams struct {
	JournalNumber  int
	AccountingYear string
	VoucherNumber  int
}

func (*JournalsVouchersByNumberGetPathParams) Params

type JournalsVouchersByNumberGetQueryParams

type JournalsVouchersByNumberGetQueryParams struct {
}

func (JournalsVouchersByNumberGetQueryParams) ToURLValues

type JournalsVouchersByNumberGetRequest

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

func (*JournalsVouchersByNumberGetRequest) Do

func (JournalsVouchersByNumberGetRequest) FilterableProperties

func (r JournalsVouchersByNumberGetRequest) FilterableProperties() []string

func (*JournalsVouchersByNumberGetRequest) Method

func (*JournalsVouchersByNumberGetRequest) NewResponseBody

func (*JournalsVouchersByNumberGetRequest) PathParams

func (*JournalsVouchersByNumberGetRequest) QueryParams

func (*JournalsVouchersByNumberGetRequest) RequestBody

func (JournalsVouchersByNumberGetRequest) RequiredProperties

func (r JournalsVouchersByNumberGetRequest) RequiredProperties() []string

func (*JournalsVouchersByNumberGetRequest) SetMethod

func (r *JournalsVouchersByNumberGetRequest) SetMethod(method string)

func (*JournalsVouchersByNumberGetRequest) SetRequestBody

func (JournalsVouchersByNumberGetRequest) SortableProperties

func (r JournalsVouchersByNumberGetRequest) SortableProperties() []string

func (*JournalsVouchersByNumberGetRequest) URL

type JournalsVouchersByNumberGetRequestBody

type JournalsVouchersByNumberGetRequestBody struct {
}

type JournalsVouchersByNumberGetResponseBody

type JournalsVouchersByNumberGetResponseBody struct {
	AccountingYear struct {
		Year string `json:"year"`
		Self string `json:"self"`
	} `json:"accountingYear"`
	Journal struct {
		JournalNumber int    `json:"journalNumber"`
		Self          string `json:"self"`
	} `json:"journal"`
	Entries struct {
		FinanceVouchers []struct {
			Account    Account `json:"account"`
			VatAccount struct {
				VatCode string `json:"vatCode"`
				Self    string `json:"self"`
			} `json:"vatAccount,omitempty"`
			VatAmount             float64 `json:"vatAmount"`
			VatAmountBaseCurrency float64 `json:"vatAmountBaseCurrency"`
			Text                  string  `json:"text"`
			Journal               struct {
				JournalNumber int    `json:"journalNumber"`
				Self          string `json:"self"`
			} `json:"journal"`
			Amount   float64 `json:"amount"`
			Currency struct {
				Code string `json:"code"`
				Self string `json:"self"`
			} `json:"currency"`
			Date         string  `json:"date"`
			ExchangeRate float64 `json:"exchangeRate"`
			EntryType    string  `json:"entryType"`
			Voucher      struct {
				AccountingYear struct {
					Year string `json:"year"`
					Self string `json:"self"`
				} `json:"accountingYear"`
				VoucherNumber int    `json:"voucherNumber"`
				Attachment    string `json:"attachment"`
				Self          string `json:"self"`
			} `json:"voucher"`
			AmountDefaultCurrency    float64 `json:"amountDefaultCurrency"`
			Remainder                float64 `json:"remainder"`
			RemainderDefaultCurrency float64 `json:"remainderDefaultCurrency"`
			JournalEntryNumber       int     `json:"journalEntryNumber"`
			MetaData                 struct {
				Delete struct {
					Description string `json:"description"`
					Href        string `json:"href"`
					HTTPMethod  string `json:"httpMethod"`
				} `json:"delete"`
			} `json:"metaData"`
			Self string `json:"self"`
		} `json:"financeVouchers"`
		ManualCustomerInvoices []struct {
			Customer struct {
				CustomerNumber int    `json:"customerNumber"`
				Self           string `json:"self"`
			} `json:"customer"`
			CustomerInvoice int    `json:"customerInvoice"`
			DueDate         string `json:"dueDate"`
			Templates       struct {
				CustomerPayment string `json:"customerPayment"`
				Self            string `json:"self"`
			} `json:"templates"`
			Text    string `json:"text"`
			Journal struct {
				JournalNumber int    `json:"journalNumber"`
				Self          string `json:"self"`
			} `json:"journal"`
			Amount   float64 `json:"amount"`
			Currency struct {
				Code string `json:"code"`
				Self string `json:"self"`
			} `json:"currency"`
			Date         string  `json:"date"`
			ExchangeRate float64 `json:"exchangeRate"`
			EntryType    string  `json:"entryType"`
			Voucher      struct {
				AccountingYear struct {
					Year string `json:"year"`
					Self string `json:"self"`
				} `json:"accountingYear"`
				VoucherNumber int    `json:"voucherNumber"`
				Attachment    string `json:"attachment"`
				Self          string `json:"self"`
			} `json:"voucher"`
			AmountDefaultCurrency    float64 `json:"amountDefaultCurrency"`
			Remainder                float64 `json:"remainder"`
			RemainderDefaultCurrency float64 `json:"remainderDefaultCurrency"`
			JournalEntryNumber       int     `json:"journalEntryNumber"`
			MetaData                 struct {
				Delete struct {
					Description string `json:"description"`
					Href        string `json:"href"`
					HTTPMethod  string `json:"httpMethod"`
				} `json:"delete"`
			} `json:"metaData"`
			Self string `json:"self"`
		} `json:"manualCustomerInvoices"`
	} `json:"entries"`
	VoucherNumber int    `json:"voucherNumber"`
	Attachment    string `json:"attachment"`
	Self          string `json:"self"`
}

type JournalsVouchersGetPathParams

type JournalsVouchersGetPathParams struct {
	JournalNumber int
}

func (*JournalsVouchersGetPathParams) Params

type JournalsVouchersGetQueryParams

type JournalsVouchersGetQueryParams struct {
}

func (JournalsVouchersGetQueryParams) ToURLValues

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

type JournalsVouchersGetRequest

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

func (*JournalsVouchersGetRequest) Do

func (JournalsVouchersGetRequest) FilterableProperties

func (r JournalsVouchersGetRequest) FilterableProperties() []string

func (*JournalsVouchersGetRequest) Method

func (r *JournalsVouchersGetRequest) Method() string

func (*JournalsVouchersGetRequest) NewResponseBody

func (*JournalsVouchersGetRequest) PathParams

func (*JournalsVouchersGetRequest) QueryParams

func (*JournalsVouchersGetRequest) RequestBody

func (JournalsVouchersGetRequest) RequiredProperties

func (r JournalsVouchersGetRequest) RequiredProperties() []string

func (*JournalsVouchersGetRequest) SetMethod

func (r *JournalsVouchersGetRequest) SetMethod(method string)

func (*JournalsVouchersGetRequest) SetRequestBody

func (JournalsVouchersGetRequest) SortableProperties

func (r JournalsVouchersGetRequest) SortableProperties() []string

func (*JournalsVouchersGetRequest) URL

type JournalsVouchersGetRequestBody

type JournalsVouchersGetRequestBody struct {
}

type JournalsVouchersGetResponseBody

type JournalsVouchersGetResponseBody struct {
}

type JournalsVouchersPostPathParams

type JournalsVouchersPostPathParams struct {
	JournalNumber int
}

func (*JournalsVouchersPostPathParams) Params

type JournalsVouchersPostQueryParams

type JournalsVouchersPostQueryParams struct {
}

func (JournalsVouchersPostQueryParams) ToURLValues

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

type JournalsVouchersPostRequest

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

func (*JournalsVouchersPostRequest) Do

func (JournalsVouchersPostRequest) FilterableProperties

func (r JournalsVouchersPostRequest) FilterableProperties() []string

func (*JournalsVouchersPostRequest) Method

func (r *JournalsVouchersPostRequest) Method() string

func (*JournalsVouchersPostRequest) NewResponseBody

func (*JournalsVouchersPostRequest) PathParams

func (*JournalsVouchersPostRequest) QueryParams

func (*JournalsVouchersPostRequest) RequestBody

func (JournalsVouchersPostRequest) RequiredProperties

func (r JournalsVouchersPostRequest) RequiredProperties() []string

func (*JournalsVouchersPostRequest) SetMethod

func (r *JournalsVouchersPostRequest) SetMethod(method string)

func (*JournalsVouchersPostRequest) SetRequestBody

func (JournalsVouchersPostRequest) SortableProperties

func (r JournalsVouchersPostRequest) SortableProperties() []string

func (*JournalsVouchersPostRequest) URL

type JournalsVouchersPostRequestBody

type JournalsVouchersPostRequestBody struct {
	AccountingYear *struct {
		Year string `json:"year"`
	} `json:"accountingYear,omitempty"`
	Journal struct {
		JournalNumber int    `json:"journalNumber"`
		Self          string `json:"self,omitempty"`
	} `json:"journal"`
	Entries struct {
		SupplierInvoices       []SupplierInvoice       `json:"supplierInvoices,omitempty"`
		SupplierPayments       []SupplierPayment       `json:"supplierPayments,omitempty"`
		CustomerPayments       []CustomerPayment       `json:"customerPayments,omitempty"`
		ManualCustomerInvoices []ManualCustomerInvoice `json:"manualCustomerInvoices,omitempty"`
		FinanceVouchers        []FinanceVoucher        `json:"financeVouchers,omitempty"`
	} `json:"entries"`
}

type JournalsVouchersPostResponseBody

type JournalsVouchersPostResponseBody []struct {
}

type Layout

type Layout struct {

	// The unique identifier of the layout.
	LayoutNumber int `json:"layoutNumber,omitempty"`

	// A unique link reference to the layout item.
	Self string `json:"self,omitempty"`
}

Layout Layout to be applied for invoices and other documents for this customer.

type LogTime

type LogTime struct {
	time.Time
}

func (*LogTime) MarshalJSON

func (l *LogTime) MarshalJSON() ([]byte, error)

func (LogTime) MarshalSchema

func (l LogTime) MarshalSchema() string

func (*LogTime) UnmarshalJSON

func (l *LogTime) UnmarshalJSON(text []byte) (err error)

type ManualCustomerInvoice

type ManualCustomerInvoice struct {
	Customer struct {
		CustomerNumber int    `json:"customerNumber"`
		Self           string `json:"self,omitempty"`
	} `json:"customer"`
	CustomerInvoice int     `json:"customerInvoice"`
	Text            string  `json:"text"`
	Amount          float64 `json:"amount"`
	Account         Account `json:"account,omitempty"`
	// The account used for the funds. Either ‘customer’ or ‘contraAccount’ is
	// required.
	ContraAccount Account `json:"contactAccount,omitempty"`
	Currency      struct {
		Code string `json:"code"`
		Self string `json:"self,omitempty"`
	} `json:"currency"`
	Date string `json:"date"`
	Type string `json:"type"`
	Self string `json:"self,omitempty"`
	// Voucher that the entry belongs to.
	Voucher Voucher `json:"voucher,omitempty"`
	// The date the entry is due for payment. Format according to ISO-8601 (YYYY-MM-DD).
	DueDate Date `json:"dueDate,omitempty"`
}

func (ManualCustomerInvoice) MarshalJSON

func (i ManualCustomerInvoice) MarshalJSON() ([]byte, error)

type Message

type Message struct {
	Message        string          `json:"message"`
	ErrorCode      string          `json:"errorCode"`
	DeveloperHint  string          `json:"developerHint"`
	LogID          string          `json:"logId"`
	HTTPStatusCode int             `json:"httpStatusCode"`
	Errors         ErrorCollection `json:"errors"`
	LogTime        LogTime         `json:"logTime"`
	SchemaPath     URL             `json:"schemaPath"`
}

func (Message) Error

func (m Message) Error() string

type Message2

type Message2 struct {
	Message        string `json:"message"`
	ErrorCode      string `json:"errorCode"`
	DeveloperHint  string `json:"developerHint"`
	LogID          string `json:"logId"`
	HTTPStatusCode int    `json:"httpStatusCode"`
	Errors         struct {
		CustomerGroup struct {
			Errors []Error `json:"errors"`
		} `json:"customerGroup"`
	} `json:"errors"`
	LogTime    LogTime `json:"logTime"`
	SchemaPath URL     `json:"schemaPath"`
}
{
    "developerHint": "Inspect validation errors and correct your request.",
    "errorCode": "E04300",
    "errorCount": 1,
    "errors": {
        "customerGroup": {
            "errors": [
                {
                    "developerHint": "Find a list of customer groups at https://restapi.e-conomic.com/customer-groups .",
                    "errorCode": "E07140",
                    "errorMessage": "CustomerGroup '1' not found.",
                    "inputValue": 1,
                    "propertyName": "customerGroup"
                }
            ]
        }
    },
    "httpStatusCode": 400,
    "logId": "7dacf1e1192c3689-FRA",
    "logTime": "2023-06-21T16:29:38",
    "message": "Validation failed. 1 error found."
}

func (Message2) Error

func (m Message2) Error() string

type MetaData

type MetaData struct {
}

MetaData Information about possible actions, endpoints and resource paths related to the endpoint.

type Pagination

type Pagination struct {
	MaxPageSizeAllowed   int    `json:"maxPageSizeAllowed"`
	SkipPages            int    `json:"skipPages"`
	PageSize             int    `json:"pageSize"`
	Results              int    `json:"results"`
	ResultsWithoutFilter int    `json:"resultsWithoutFilter"`
	FirstPage            string `json:"firstPage"`
	NextPage             string `json:"nextPage"`
	LastPage             string `json:"lastPage"`
}

type PathParams

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

type PaymentTerms

type PaymentTerms struct {

	// The unique identifier of the payment terms.
	PaymentTermsNumber int `json:"paymentTermsNumber,omitempty"`

	// A unique link reference to the payment terms item.
	Self string `json:"self,omitempty"`
}

PaymentTerms The default payment terms for the customer.

type RequestCompletionCallback

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

RequestCompletionCallback defines the type of the request callback function

type SalesPerson

type SalesPerson struct {

	// The unique identifier of the employee.
	EmployeeNumber int `json:"employeeNumber,omitempty"`

	// A unique link reference to the employee resource.
	Self string `json:"self,omitempty"`
}

SalesPerson Reference to the employee responsible for contact with this customer.

type SchemaMarshaler

type SchemaMarshaler interface {
	MarshalSchema() string
}

type SupplierInvoice

type SupplierInvoice struct {
	Supplier struct {
		SupplierNumber int    `json:"supplierNumber"`
		Self           string `json:"self,omitempty"`
	} `json:"supplier"`
	Amount  float64 `json:"amount"`
	Account struct {
		AccountNumber int    `json:"accountNumber"`
		Self          string `json:"self,omitempty"`
	} `json:"account"`
	ContraAccount struct {
		AccountNumber int    `json:"accountNumber"`
		Self          string `json:"self,omitempty"`
	} `json:"contraAccount"`
	Currency struct {
		Code string `json:"code"`
		Self string `json:"self,omitempty"`
	} `json:"currency"`
	Date string `json:"date"`
	Type string `json:"type"`
	Self string `json:"self,omitempty"`
}

type SupplierPayment

type SupplierPayment struct {
	Supplier struct {
		SupplierNumber int    `json:"supplierNumber"`
		Self           string `json:"self,omitempty"`
	} `json:"supplier"`
	SupplierInvoiceNumber string  `json:"supplierInvoiceNumber"`
	Text                  string  `json:"text"`
	Amount                float64 `json:"amount"`
	Account               struct {
		AccountNumber int    `json:"accountNumber"`
		Self          string `json:"self,omitempty"`
	} `json:"account"`
	ContraAccount struct {
		AccountNumber int    `json:"accountNumber"`
		Self          string `json:"sel,omitemptyf"`
	} `json:"contraAccount"`
	Currency struct {
		Code string `json:"code"`
		Self string `json:"self,omitempty"`
	} `json:"currency"`
	Date string `json:"date"`
	Type string `json:"type"`
	Self string `json:"self,omitempty"`
}

type Templates

type Templates struct {

	// The unique reference to the invoice template.
	Invoice string `json:"invoice,omitempty"`

	// The unique reference to the invoiceLine template.
	InvoiceLine string `json:"invoiceLine,omitempty"`

	// A unique link reference to the templates resource.
	Self string `json:"self,omitempty"`
}

Templates

type ToURLValues

type ToURLValues interface {
	ToURLValues() (url.Values, error)
}

type Totals

type Totals struct {

	// The unique reference to the booked invoice totals for this customer.
	Booked string `json:"booked,omitempty"`

	// The unique reference to the draft invoice totals for this customer.
	Drafts string `json:"drafts,omitempty"`

	// A unique link reference to the totals resource for this customer.
	Self string `json:"self,omitempty"`
}

Totals

type URL

type URL url.URL

func NewURL

func NewURL(s string) (*URL, error)

func (URL) MarshalJSON

func (u URL) MarshalJSON() ([]byte, error)

func (URL) String

func (u URL) String() string

func (*URL) UnmarshalJSON

func (u *URL) UnmarshalJSON(data []byte) error

type VatZone

type VatZone struct {

	// A unique link reference to the VAT-zone item.
	Self string `json:"self,omitempty"`

	// The unique identifier of the VAT-zone.
	VatZoneNumber int `json:"vatZoneNumber,omitempty"`
}

VatZone Indicates in which VAT-zone the customer is located (e.g.: domestically, in Europe or elsewhere abroad).

type Voucher

type Voucher struct {
	// Journal voucher number must be between 1-999999999.
	VoucherNumber int `json:"voucherNumber"`
	//  A unique link reference to the voucher item.
	Self string `json:"self,omitempty"`
}

func (Voucher) IsEmpty

func (v Voucher) IsEmpty() bool

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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