fortnox

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

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

Go to latest
Published: Jun 16, 2023 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	BaseURL = url.URL{
		Scheme: "https",
		Host:   "api.fortnox.se",
		Path:   "/3",
	}
)

Functions

func CheckResponse

func CheckResponse(r *http.Response) error

CheckResponse checks the Client response for errors, and returns them if present. A response is considered an error if it has a status code outside the 200 range. Client error responses are expected to have either no response body, or a json response body that maps to ErrorResponse. Any other response body will be silently ignored.

Types

type Account

type Account struct {
	URL                   utils.URL `json:"@url"` // Direct url to the record.
	Active                bool      `json:"active"`
	BalanceBroughtForward float64   `json:"BalanceBroughtForward"`
	CostCenter            string    `json:"CostCenter"`
	CostCentersettings    string    `json:"CostCentersettings"`
	Description           string    `json:"Description"`
	Number                int       `json:"Number"`
	Project               string    `json:"Project"`
	ProjectSettings       string    `json:"ProjectSettings"`
	SRU                   int       `json:"SRU"`
	Year                  int       `json:"Year"`
	VATCode               string    `json:"VATCode"`
}

type Accounts

type Accounts []Account

type ApprovalState

type ApprovalState int
var (
	ApprovalStateNotForApproval     ApprovalState = 0
	ApprovalStateNotReadForApproval ApprovalState = 1
	ApprovalStateNotApproved        ApprovalState = 2
	ApprovalStateApproved           ApprovalState = 3
)

type Client

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

Client manages communication with Exact Globe Client

func NewClient

func NewClient(httpClient *http.Client) *Client

NewClient returns a new Exact Globe Client client

func (Client) AccessToken

func (c Client) AccessToken() string

func (Client) BaseURL

func (c Client) BaseURL() url.URL

func (Client) Charset

func (c Client) Charset() string

func (Client) ClientSecret

func (c Client) ClientSecret() 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(path string, pathParams PathParams) url.URL

func (Client) MediaType

func (c Client) MediaType() string

func (*Client) NewGetAccountsRequest

func (c *Client) NewGetAccountsRequest() GetAccountsRequest

func (*Client) NewGetCompanySettingsRequest

func (c *Client) NewGetCompanySettingsRequest() GetCompanySettingsRequest

func (*Client) NewGetCustomerRequest

func (c *Client) NewGetCustomerRequest() GetCustomerRequest

func (*Client) NewGetCustomersRequest

func (c *Client) NewGetCustomersRequest() GetCustomersRequest

func (*Client) NewGetInvoicesRequest

func (c *Client) NewGetInvoicesRequest() GetInvoicesRequest

func (*Client) NewGetPredefinedVoucherSeriesRequest

func (c *Client) NewGetPredefinedVoucherSeriesRequest() GetPredefinedVoucherSeriesRequest

func (*Client) NewGetVouchersRequest

func (c *Client) NewGetVouchersRequest() GetVouchersRequest

func (*Client) NewPostCustomerRequest

func (c *Client) NewPostCustomerRequest() PostCustomerRequest

func (*Client) NewPostInvoiceRequest

func (c *Client) NewPostInvoiceRequest() PostInvoiceRequest

func (*Client) NewPostVoucherRequest

func (c *Client) NewPostVoucherRequest() PostVoucherRequest

func (*Client) NewRequest

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

func (*Client) RegisterRequestTimestamp

func (c *Client) RegisterRequestTimestamp(t time.Time)

func (*Client) SetAccessToken

func (c *Client) SetAccessToken(accessToken string)

func (*Client) SetBaseURL

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

func (*Client) SetCharset

func (c *Client) SetCharset(charset string)

func (*Client) SetClientSecret

func (c *Client) SetClientSecret(clientSecret string)

func (*Client) SetDebug

func (c *Client) SetDebug(debug bool)

func (*Client) SetDisallowUnknownFields

func (c *Client) SetDisallowUnknownFields(disallowUnknownFields bool)

func (*Client) SetHTTPClient

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

func (*Client) SetMediaType

func (c *Client) SetMediaType(mediaType string)

func (*Client) SetUserAgent

func (c *Client) SetUserAgent(userAgent string)

func (*Client) SleepUntilRequestRate

func (c *Client) SleepUntilRequestRate()

func (*Client) Unmarshal

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

func (Client) UserAgent

func (c Client) UserAgent() string

type CompanySettings

type CompanySettings struct {
	Address            string `json:"Address"`
	BG                 string `json:"BG"`
	BIC                string `json:"BIC"`
	BranchCode         string `json:"BranchCode"`
	City               string `json:"City"`
	ContactFirstName   string `json:"ContactFirstName"`
	ContactLastName    string `json:"ContactLastName"`
	Country            string `json:"Country"`
	CountryCode        string `json:"CountryCode"`
	DatabaseNumber     int    `json:"DatabaseNumber"`
	Domicile           string `json:"Domicile"`
	Email              string `json:"Email"`
	Fax                string `json:"Fax"`
	IBAN               string `json:"IBAN"`
	Name               string `json:"Name"`
	OrganizationNumber string `json:"OrganizationNumber"`
	PG                 string `json:"PG"`
	Phone1             string `json:"Phone1"`
	Phone2             string `json:"Phone2"`
	TaxEnabled         bool   `json:"TaxEnabled"`
	VATNumber          string `json:"VATNumber"`
	VisitAddress       string `json:"VisitAddress"`
	VisitCity          string `json:"VisitCity"`
	VisitCountry       string `json:"VisitCountry"`
	VisitCountryCode   string `json:"VisitCountryCode"`
	VisitName          string `json:"VisitName"`
	VisitZipCode       string `json:"VisitZipCode"`
	WWW                string `json:"WWW"`
	ZipCode            string `json:"ZipCode"`
}

type Customer

type Customer struct {
	URL                      utils.URL            `json:"@url,omitempty"`            // Direct URL to the record.
	Active                   bool                 `json:"Active"`                    // If the customer is active or not
	Address1                 string               `json:"Address1"`                  // Address 1 of the customer.
	Address2                 string               `json:"Address2"`                  // Address 2 of the customer.
	City                     string               `json:"City"`                      // City of the customer.
	Country                  string               `json:"Country,omitempty"`         // Country name for the customer.
	Comments                 string               `json:"Comments"`                  // Comments of the customer.
	Currency                 string               `json:"Currency"`                  // Code of the currency for the customer. This will be used as the predefined currency for documents for the customer. The code must be of an existing currency.
	CostCenter               string               `json:"CostCenter"`                // Code of the cost center for the customer. The code must be of a an existing currency.
	CountryCode              string               `json:"CountryCode"`               // Code of the country for the customer. The code must be of an existing country according to ISO 3166-1 Alpha-2.
	CustomerNumber           string               `json:"CustomerNumber"`            // Customer number of the customer. If no customer number is provided, the next number in the series will be used. Only alpha numeric characters, with the addition of – + / and _, are allowed.
	DefaultDeliveryTypes     DefaultDeliveryTypes `json:"DefaultDeliveryTypes"`      // The properties for this object is listed in the table for “Default Delivery Types”.
	DefaultTemplates         DefaultTemplates     `json:"DefaultTemplates"`          // The properties for this object is listed in the table for “Default Templates”.
	DeliveryAddress1         string               `json:"DeliveryAddress1"`          // Delivery address 1 for the customer.
	DeliveryAddress2         string               `json:"DeliveryAddress2"`          // Delivery address 2 for the customer.
	DeliveryCity             string               `json:"DeliveryCity"`              // Delivery city for the customer.
	DeliveryCountry          string               `json:"DeliveryCountry,omitempty"` // Delivery country for the customer.
	DeliveryCountryCode      string               `json:"DeliveryCountryCode"`       // Code of the delivery country for the customer. The code must be of an existing country according to ISO 3166-1 Alpha-2.
	DeliveryFax              string               `json:"DeliveryFax"`               // Delivery fax number of the customer.
	DeliveryName             string               `json:"DeliveryName"`              // Delivery name for the customer.
	DeliveryPhone1           string               `json:"DeliveryPhone1"`            // Delivery phone number 1 for the customer.
	DeliveryPhone2           string               `json:"DeliveryPhone2"`            // Delivery phone number 2 for the customer.
	DeliveryZipCode          string               `json:"DeliveryZipCode"`           // Delivery zip code for the customer.
	Email                    string               `json:"Email"`                     // Email address for the customer. This must be a valid email address.
	EmailInvoice             string               `json:"EmailInvoice"`              // Specific email address used for invoices sent to the customer. This must be a valid email address.
	EmailInvoiceBCC          string               `json:"EmailInvoiceBCC"`           // Specific blind carbon copy email address used for invoices sent to the customer. This must be a valid email address.
	EmailInvoiceCC           string               `json:"EmailInvoiceCC"`            // Specific carbon copy email address used for invoices sent to the customer. This must be a valid email address.
	EmailOffer               string               `json:"EmailOffer"`                // Specific email address used for offers sent to the customer. This must be a valid email address.
	EmailOfferBCC            string               `json:"EmailOfferBCC"`             // Specific blind carbon copy email address used for offers sent to the customer. This must be a valid email address.
	EmailOfferCC             string               `json:"EmailOfferCC"`              // Specific carbon copy email address used for offers sent to the customer. This must be a valid email address.
	EmailOrder               string               `json:"EmailOrder"`                // Specific email address used for orders sent to the customer. This must be a valid email address.
	EmailOrderBCC            string               `json:"EmailOrderBCC"`             // Specific blind carbon copy email address used for orders sent to the customer. This must be a valid email address.
	EmailOrderCC             string               `json:"EmailOrderCC"`              // Specific carbon copy email address used for orders sent to the customer. This must be a valid email address.
	ExternalReference        string               `json:"ExternalReference"`
	Fax                      string               `json:"Fax"`                       // Fax number for the customer.
	GLN                      string               `json:"GLN"`                       // Global Location Number of the customer
	GLNDelivery              string               `json:"GLNDelivery"`               // Global Location Delivery Number
	InvoiceAdministrationFee string               `json:"InvoiceAdministrationFee"`  // Predefined invoice administration fee for the customer.
	InvoiceDiscount          float64              `json:"InvoiceDiscount"`           // Predefined invoice discount for the customer.
	InvoiceFreight           string               `json:"InvoiceFreight"`            // Predefined invoice freight fee for the customer.
	InvoiceRemark            string               `json:"InvoiceRemark"`             // Predefined invoice remark for the customer.
	Name                     string               `json:"Name"`                      // Name of the customer.
	OrganisationNumber       string               `json:"OrganisationNumber"`        // Organisation number of the customer. It needs to be a valid organisation numer.
	OurReference             string               `json:"OurReference"`              // Our reference of the customer.
	Phone                    string               `json:"Phone,omitempty"`           // Phone number of the customer.
	Phone1                   string               `json:"Phone1"`                    // Phone number 1 of the customer.
	Phone2                   string               `json:"Phone2"`                    // Phone number 2 of the customer.
	PriceList                string               `json:"PriceList"`                 // Code of the price list for the customer. The code must be of a an existing price list.
	Project                  string               `json:"Project"`                   // Number of the project for the customer. The number must be of a an existing project.
	SalesAccount             string               `json:"SalesAccount"`              // Predefined sales account of the customer.
	ShowPriceVATIncluded     bool                 `json:"ShowPriceVATIncluded"`      // If prices should be displayed with VAT included.
	TermsOfDelivery          string               `json:"TermsOfDelivery"`           // Code of the terms of delivery for the customer. The code must be of a an existing terms of delivery.
	TermsOfPayment           string               `json:"TermsOfPayment"`            // Code of the terms of payment for the customer. The code must be of a an existing terms of payment.
	Type                     CustomerType         `json:"Type"`                      // Type of the customer. Can be PRIVATE or COMPANY.
	VATNumber                string               `json:"VATNumber"`                 // VAT number for the customer.
	VATType                  VATType              `json:"VATType"`                   // VAT type of the customer. Can be SEVAT SEREVERSEDVAT EUREVERSEDVAT EUVAT or EXPORT.
	VisitingAddress          string               `json:"VisitingAddress"`           // Visiting address of the customer.
	VisitingCity             string               `json:"VisitingCity"`              // Visiting city of the customer.
	VisitingCountry          string               `json:"VisitingCountry,omitempty"` // Visiting country of the customer.
	VisitingCountryCode      string               `json:"VisitingCountryCode"`       // Code of the visiting country for the customer. The code must be of an existing country according to ISO 3166-1 Alpha-2.
	VisitingZipCode          string               `json:"VisitingZipCode"`           // Visiting zip code of the customer.
	WWW                      string               `json:"WWW"`                       // Website of the customer.
	WayOfDelivery            string               `json:"WayOfDelivery"`             // Code of the way of delivery for the customer. The code must be of a an existing way of delivery.
	YourReference            string               `json:"YourReference"`             // Your reference of the customer.
	ZipCode                  string               `json:"ZipCode"`                   // Zip code of the customers.
}

type CustomerType

type CustomerType string
var (
	CustomerTypePrivate CustomerType = "PRIVATE"
	CustomerTypeCompany CustomerType = "COMPANY"
)

type Customers

type Customers []Customer

type Date

type Date struct {
	time.Time
}

func (Date) IsEmpty

func (d Date) IsEmpty() bool

func (*Date) MarshalJSON

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

func (Date) String

func (d Date) String() string

func (*Date) UnmarshalJSON

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

type DateTime

type DateTime struct {
	time.Time
}

func (DateTime) IsEmpty

func (d DateTime) IsEmpty() bool

func (*DateTime) MarshalJSON

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

func (DateTime) String

func (d DateTime) String() string

func (*DateTime) UnmarshalJSON

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

type DefaultDeliveryTypes

type DefaultDeliveryTypes struct {
	Invoice DeliveryType
	Order   DeliveryType
	Offer   DeliveryType
}

type DefaultTemplates

type DefaultTemplates struct {
	Order       string `json:"Order"`
	Offer       string `json:"Offer"`
	Invoice     string `json:"Invoice"`
	CashInvoice string `json:"CashInvoice"`
}

type DeliveryType

type DeliveryType string
var (
	DeliveryTypePrint        DeliveryType = "PRINT"
	DeliveryTypeEmail        DeliveryType = "EMAIL"
	DeliveryTypePrintService DeliveryType = "PRINTSERVICE"
)

type EDIInformation

type EDIInformation struct {
	EDIGlobalLocationNumber         string    `json:"EDIGlobalLocationNumber"`         // Invoice address GLN for EDI
	EDIGlobalLocationNumberDelivery string    `json:"EDIGlobalLocationNumberDelivery"` // Delivery address GLN for EDI
	EDIInvoiceExtra1                string    `json:"EDIInvoiceExtra1"`                // Extra EDI Information
	EDIInvoiceExtra2                string    `json:"EDIInvoiceExtra2"`                // Extra EDI Information
	EDIOurElectronicReference       string    `json:"EDIOurElectronicReference"`       // Our electronic reference for EDI
	EDIYourElectronicReference      string    `json:"EDIYourElectronicReference"`      // Your electronic reference for EDI
	EDIStatus                       EDIStatus `json:"EDIStatus,omitempty"`             // Status of the send process of the invoice. Can have the following codes:
}

type EDIStatus

type EDIStatus string
var (
	EDIStatusSentToCrediflow                 EDIStatus = "1"
	EDIStatusCheckedByCrediflow              EDIStatus = "2"
	EDIStatusDeliveredElectronically         EDIStatus = "3"
	EDIStatusDeliveredToPrintingService      EDIStatus = "4"
	EDIStatusDeliveredToPostenByPrintCompany EDIStatus = "5"
	EDIStatusDeclinedByCrediflow             EDIStatus = "6"
	EDIStatusDeclinedByReceiver              EDIStatus = "7"
)

type EmailInformation

type EmailInformation struct {
	EmailAddressFrom string `json:"EmailAddressFrom"` // Reply to adress. Must be a valid e-mail address
	EmailAddressTo   string `json:"EmailAddressTo"`   // Customer e-mail address. Must be a valid e-mail address.
	EmailAddressCC   string `json:"EmailAddressCC"`   // Customer e-mail address – Copy. Must be a valid e-mail address.
	EmailAddressBCC  string `json:"EmailAddressBCC"`  // Customer e-mail address – Blind carbon copy. Must be a valid e-mail address.
	EmailSubject     string `json:"EmailSubject"`     // Subject of the e-mail
	// The variable {no} = document number. The variable {name} =  customer name
	EmailBody string `json:"EmailBody"` // Body of the e-mail.
}

type ErrorInformation

type ErrorInformation struct {
	Err     int    `json:"error"`
	Message string `json:"message"`
	Code    int    `json:"code"`
}

func (ErrorInformation) Error

func (e ErrorInformation) Error() string

type ErrorResponse

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

	ErrorInformation error `json:"ErrorInformation"`
}

func (ErrorResponse) Error

func (r ErrorResponse) Error() string

type GetAccountsPathParams

type GetAccountsPathParams struct {
}

func (*GetAccountsPathParams) Params

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

type GetAccountsQueryParams

type GetAccountsQueryParams struct {
}

func (GetAccountsQueryParams) ToURLValues

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

type GetAccountsRequest

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

func (*GetAccountsRequest) Do

func (*GetAccountsRequest) Method

func (r *GetAccountsRequest) Method() string

func (GetAccountsRequest) NewGetAccountsPathParams

func (r GetAccountsRequest) NewGetAccountsPathParams() *GetAccountsPathParams

func (GetAccountsRequest) NewGetAccountsQueryParams

func (r GetAccountsRequest) NewGetAccountsQueryParams() *GetAccountsQueryParams

func (GetAccountsRequest) NewGetAccountsRequestBody

func (r GetAccountsRequest) NewGetAccountsRequestBody() GetAccountsRequestBody

func (*GetAccountsRequest) NewResponseBody

func (r *GetAccountsRequest) NewResponseBody() *GetAccountsResponseBody

func (*GetAccountsRequest) PathParams

func (r *GetAccountsRequest) PathParams() *GetAccountsPathParams

func (*GetAccountsRequest) QueryParams

func (r *GetAccountsRequest) QueryParams() *GetAccountsQueryParams

func (*GetAccountsRequest) RequestBody

func (r *GetAccountsRequest) RequestBody() *GetAccountsRequestBody

func (*GetAccountsRequest) SetMethod

func (r *GetAccountsRequest) SetMethod(method string)

func (*GetAccountsRequest) SetRequestBody

func (r *GetAccountsRequest) SetRequestBody(body GetAccountsRequestBody)

func (*GetAccountsRequest) URL

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

type GetAccountsRequestBody

type GetAccountsRequestBody struct{}

type GetAccountsResponseBody

type GetAccountsResponseBody struct {
	MetaInformation `json:"MetaInformation"`
	Accounts        Accounts
}

type GetCompanySettingsPathParams

type GetCompanySettingsPathParams struct {
}

func (*GetCompanySettingsPathParams) Params

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

type GetCompanySettingsQueryParams

type GetCompanySettingsQueryParams struct {
}

func (GetCompanySettingsQueryParams) ToURLValues

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

type GetCompanySettingsRequest

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

func (*GetCompanySettingsRequest) Do

func (*GetCompanySettingsRequest) Method

func (r *GetCompanySettingsRequest) Method() string

func (GetCompanySettingsRequest) NewGetCompanySettingsPathParams

func (r GetCompanySettingsRequest) NewGetCompanySettingsPathParams() *GetCompanySettingsPathParams

func (GetCompanySettingsRequest) NewGetCompanySettingsQueryParams

func (r GetCompanySettingsRequest) NewGetCompanySettingsQueryParams() *GetCompanySettingsQueryParams

func (GetCompanySettingsRequest) NewGetCompanySettingsRequestBody

func (r GetCompanySettingsRequest) NewGetCompanySettingsRequestBody() GetCompanySettingsRequestBody

func (*GetCompanySettingsRequest) NewResponseBody

func (*GetCompanySettingsRequest) PathParams

func (*GetCompanySettingsRequest) QueryParams

func (*GetCompanySettingsRequest) RequestBody

func (*GetCompanySettingsRequest) SetMethod

func (r *GetCompanySettingsRequest) SetMethod(method string)

func (*GetCompanySettingsRequest) SetRequestBody

func (*GetCompanySettingsRequest) URL

type GetCompanySettingsRequestBody

type GetCompanySettingsRequestBody struct{}

type GetCompanySettingsResponseBody

type GetCompanySettingsResponseBody struct {
	CompanySettings CompanySettings
}

type GetCustomerPathParams

type GetCustomerPathParams struct {
	CustomerNumber string
}

func (*GetCustomerPathParams) Params

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

type GetCustomerQueryParams

type GetCustomerQueryParams struct{}

func (GetCustomerQueryParams) ToURLValues

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

type GetCustomerRequest

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

func (*GetCustomerRequest) Do

func (*GetCustomerRequest) Method

func (r *GetCustomerRequest) Method() string

func (GetCustomerRequest) NewGetCustomerPathParams

func (r GetCustomerRequest) NewGetCustomerPathParams() *GetCustomerPathParams

func (GetCustomerRequest) NewGetCustomerQueryParams

func (r GetCustomerRequest) NewGetCustomerQueryParams() *GetCustomerQueryParams

func (GetCustomerRequest) NewGetCustomerRequestBody

func (r GetCustomerRequest) NewGetCustomerRequestBody() GetCustomerRequestBody

func (*GetCustomerRequest) NewResponseBody

func (r *GetCustomerRequest) NewResponseBody() *GetCustomerResponseBody

func (*GetCustomerRequest) PathParams

func (r *GetCustomerRequest) PathParams() *GetCustomerPathParams

func (*GetCustomerRequest) QueryParams

func (r *GetCustomerRequest) QueryParams() *GetCustomerQueryParams

func (*GetCustomerRequest) RequestBody

func (r *GetCustomerRequest) RequestBody() *GetCustomerRequestBody

func (*GetCustomerRequest) SetMethod

func (r *GetCustomerRequest) SetMethod(method string)

func (*GetCustomerRequest) SetRequestBody

func (r *GetCustomerRequest) SetRequestBody(body GetCustomerRequestBody)

func (*GetCustomerRequest) URL

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

type GetCustomerRequestBody

type GetCustomerRequestBody struct{}

type GetCustomerResponseBody

type GetCustomerResponseBody struct {
	MetaInformation `json:"MetaInformation"`
	Customer        Customer
}

type GetCustomersPathParams

type GetCustomersPathParams struct {
}

func (*GetCustomersPathParams) Params

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

type GetCustomersQueryParams

type GetCustomersQueryParams struct {
	CustomerNumber string `schema:"customernumber"`
	Name           string `schema:"name"`
	Email          string `schema:"email"`
}

func (GetCustomersQueryParams) ToURLValues

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

type GetCustomersRequest

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

func (*GetCustomersRequest) Do

func (*GetCustomersRequest) Method

func (r *GetCustomersRequest) Method() string

func (GetCustomersRequest) NewGetCustomersPathParams

func (r GetCustomersRequest) NewGetCustomersPathParams() *GetCustomersPathParams

func (GetCustomersRequest) NewGetCustomersQueryParams

func (r GetCustomersRequest) NewGetCustomersQueryParams() *GetCustomersQueryParams

func (GetCustomersRequest) NewGetCustomersRequestBody

func (r GetCustomersRequest) NewGetCustomersRequestBody() GetCustomersRequestBody

func (*GetCustomersRequest) NewResponseBody

func (r *GetCustomersRequest) NewResponseBody() *GetCustomersResponseBody

func (*GetCustomersRequest) PathParams

func (*GetCustomersRequest) QueryParams

func (r *GetCustomersRequest) QueryParams() *GetCustomersQueryParams

func (*GetCustomersRequest) RequestBody

func (r *GetCustomersRequest) RequestBody() *GetCustomersRequestBody

func (*GetCustomersRequest) SetMethod

func (r *GetCustomersRequest) SetMethod(method string)

func (*GetCustomersRequest) SetRequestBody

func (r *GetCustomersRequest) SetRequestBody(body GetCustomersRequestBody)

func (*GetCustomersRequest) URL

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

type GetCustomersRequestBody

type GetCustomersRequestBody struct{}

type GetCustomersResponseBody

type GetCustomersResponseBody struct {
	MetaInformation `json:"MetaInformation"`
	Customers       Customers
}

type GetInvoicesPathParams

type GetInvoicesPathParams struct {
}

func (*GetInvoicesPathParams) Params

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

type GetInvoicesQueryParams

type GetInvoicesQueryParams struct {
	FromDate Date `schema:"fromdate"`
	ToDate   Date `schema:"todate"`
}

func (GetInvoicesQueryParams) ToURLValues

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

type GetInvoicesRequest

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

func (*GetInvoicesRequest) Do

func (*GetInvoicesRequest) Method

func (r *GetInvoicesRequest) Method() string

func (GetInvoicesRequest) NewGetInvoicesPathParams

func (r GetInvoicesRequest) NewGetInvoicesPathParams() *GetInvoicesPathParams

func (GetInvoicesRequest) NewGetInvoicesQueryParams

func (r GetInvoicesRequest) NewGetInvoicesQueryParams() *GetInvoicesQueryParams

func (GetInvoicesRequest) NewGetInvoicesRequestBody

func (r GetInvoicesRequest) NewGetInvoicesRequestBody() GetInvoicesRequestBody

func (*GetInvoicesRequest) NewResponseBody

func (r *GetInvoicesRequest) NewResponseBody() *GetInvoicesResponseBody

func (*GetInvoicesRequest) PathParams

func (r *GetInvoicesRequest) PathParams() *GetInvoicesPathParams

func (*GetInvoicesRequest) QueryParams

func (r *GetInvoicesRequest) QueryParams() *GetInvoicesQueryParams

func (*GetInvoicesRequest) RequestBody

func (r *GetInvoicesRequest) RequestBody() *GetInvoicesRequestBody

func (*GetInvoicesRequest) SetMethod

func (r *GetInvoicesRequest) SetMethod(method string)

func (*GetInvoicesRequest) SetRequestBody

func (r *GetInvoicesRequest) SetRequestBody(body GetInvoicesRequestBody)

func (*GetInvoicesRequest) URL

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

type GetInvoicesRequestBody

type GetInvoicesRequestBody struct{}

type GetInvoicesResponseBody

type GetInvoicesResponseBody struct {
	MetaInformation `json:"MetaInformation"`
	Invoices        Invoices
}

type GetPredefinedVoucherSeriesPathParams

type GetPredefinedVoucherSeriesPathParams struct {
}

func (*GetPredefinedVoucherSeriesPathParams) Params

type GetPredefinedVoucherSeriesQueryParams

type GetPredefinedVoucherSeriesQueryParams struct {
}

func (GetPredefinedVoucherSeriesQueryParams) ToURLValues

type GetPredefinedVoucherSeriesRequest

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

func (*GetPredefinedVoucherSeriesRequest) Do

func (*GetPredefinedVoucherSeriesRequest) Method

func (GetPredefinedVoucherSeriesRequest) NewGetPredefinedVoucherSeriesPathParams

func (r GetPredefinedVoucherSeriesRequest) NewGetPredefinedVoucherSeriesPathParams() *GetPredefinedVoucherSeriesPathParams

func (GetPredefinedVoucherSeriesRequest) NewGetPredefinedVoucherSeriesQueryParams

func (r GetPredefinedVoucherSeriesRequest) NewGetPredefinedVoucherSeriesQueryParams() *GetPredefinedVoucherSeriesQueryParams

func (GetPredefinedVoucherSeriesRequest) NewGetPredefinedVoucherSeriesRequestBody

func (r GetPredefinedVoucherSeriesRequest) NewGetPredefinedVoucherSeriesRequestBody() GetPredefinedVoucherSeriesRequestBody

func (*GetPredefinedVoucherSeriesRequest) NewResponseBody

func (*GetPredefinedVoucherSeriesRequest) PathParams

func (*GetPredefinedVoucherSeriesRequest) QueryParams

func (*GetPredefinedVoucherSeriesRequest) RequestBody

func (*GetPredefinedVoucherSeriesRequest) SetMethod

func (r *GetPredefinedVoucherSeriesRequest) SetMethod(method string)

func (*GetPredefinedVoucherSeriesRequest) SetRequestBody

func (*GetPredefinedVoucherSeriesRequest) URL

type GetPredefinedVoucherSeriesRequestBody

type GetPredefinedVoucherSeriesRequestBody struct{}

type GetPredefinedVoucherSeriesResponseBody

type GetPredefinedVoucherSeriesResponseBody struct {
	MetaInformation                   `json:"MetaInformation"`
	PreDefinedVoucherSeriesCollection []struct {
		URL           string `json:"@url"`
		Name          string `json:"Name"`
		VoucherSeries string `json:"VoucherSeries"`
	} `json:"PreDefinedVoucherSeriesCollection"`
}

type GetVouchersPathParams

type GetVouchersPathParams struct {
}

func (*GetVouchersPathParams) Params

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

type GetVouchersQueryParams

type GetVouchersQueryParams struct {
}

func (GetVouchersQueryParams) ToURLValues

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

type GetVouchersRequest

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

func (*GetVouchersRequest) Do

func (*GetVouchersRequest) Method

func (r *GetVouchersRequest) Method() string

func (GetVouchersRequest) NewGetVouchersPathParams

func (r GetVouchersRequest) NewGetVouchersPathParams() *GetVouchersPathParams

func (GetVouchersRequest) NewGetVouchersQueryParams

func (r GetVouchersRequest) NewGetVouchersQueryParams() *GetVouchersQueryParams

func (GetVouchersRequest) NewGetVouchersRequestBody

func (r GetVouchersRequest) NewGetVouchersRequestBody() GetVouchersRequestBody

func (*GetVouchersRequest) NewResponseBody

func (r *GetVouchersRequest) NewResponseBody() *GetVouchersResponseBody

func (*GetVouchersRequest) PathParams

func (r *GetVouchersRequest) PathParams() *GetVouchersPathParams

func (*GetVouchersRequest) QueryParams

func (r *GetVouchersRequest) QueryParams() *GetVouchersQueryParams

func (*GetVouchersRequest) RequestBody

func (r *GetVouchersRequest) RequestBody() *GetVouchersRequestBody

func (*GetVouchersRequest) SetMethod

func (r *GetVouchersRequest) SetMethod(method string)

func (*GetVouchersRequest) SetRequestBody

func (r *GetVouchersRequest) SetRequestBody(body GetVouchersRequestBody)

func (*GetVouchersRequest) URL

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

type GetVouchersRequestBody

type GetVouchersRequestBody struct{}

type GetVouchersResponseBody

type GetVouchersResponseBody struct {
	MetaInformation `json:"MetaInformation"`
	Vouchers        Vouchers
}

type Invoice

type Invoice struct {
	URL                       utils.URL         `json:"@url,omitempty"`                   // Direct url to the record.
	UrlTaxReductionList       string            `json:"@UrlTaxReductionList,omitempty"`   // Direct url to the tax reduction for the invoice. This is visible even if no tax reduction exists.
	AccountingMethod          string            `json:"AccountingMethod"`                 // Accounting Method. Can be ACCRUAL orCASH
	AdministrationFee         float64           `json:"AdministrationFee"`                // The invoice administration fee.
	AdministrationFeeVAT      float64           `json:"AdministrationFeeVAT,omitempty"`   // VAT of the invoice administration fee.
	Address1                  string            `json:"Address1"`                         // Invoice address 1.
	Address2                  string            `json:"Address2"`                         // Invoice address 2.
	Balance                   float64           `json:"Balance,omitempty"`                // Balance of the invoice.
	BasisTaxReduction         float64           `json:"BasisTaxReduction,omitempty"`      // Basis of tax reduction.
	Booked                    null.Bool         `json:"Booked"`                           // If the invoice is bookkept. This value can be changed by using the action “bookkeep”.
	Cancelled                 null.Bool         `json:"Cancelled,omitempty"`              // If the invoice is cancelled. This value can be changed by using the action “cancel”.
	Credit                    string            `json:"Credit,omitempty"`                 // If the invoice is a credit invoice.
	CreditInvoiceReference    string            `json:"CreditInvoiceReference,omitempty"` // Reference to the credit invoice, if one exits. The reference must be a document number for an existing credit invoice.
	City                      string            `json:"City,omitempty"`                   // City for the invoice address.
	Comments                  string            `json:"Comments"`                         // Comments of the invoice
	ContractReference         string            `json:"ContractReference,omitempty"`      // Reference to the contract, if one exists.
	ContributionPercent       float64           `json:"ContributionPercent,omitempty"`    // Invoice contribution in percent.
	ContributionValue         float64           `json:"ContributionValue,omitempty"`      // Invoice contribution in amount.
	Country                   string            `json:"Country"`                          // Country for the invoice address. Must be a name of an existing country.
	CostCenter                string            `json:"CostCenter,omitempty"`             // Code of the cost center. The code must be of an existing cost center.
	Currency                  string            `json:"Currency"`                         // Code of the currency. The code must be of an existing currency.
	CurrencyRate              Number            `json:"CurrencyRate"`                     // Currency rate used for the invoice.
	CurrencyUnit              float64           `json:"CurrencyUnit"`                     // Currency unit used for the invoice.
	CustomerName              string            `json:"CustomerName"`                     // Name of the customer.
	CustomerNumber            string            `json:"CustomerNumber"`                   // Customer number of the customer. The customer number must be of an existing customer.
	DeliveryAddress1          string            `json:"DeliveryAddress1"`                 // Invoice delivery address 1.
	DeliveryAddress2          string            `json:"DeliveryAddress2"`                 // Invoice delivery address 2.
	DeliveryCity              string            `json:"DeliveryCity"`                     // City for the invoice delivery address.
	DeliveryCountry           string            `json:"DeliveryCountry"`                  // Country for the invoice delivery address. Must be a name of an existing country.
	DeliveryDate              Date              `json:"DeliveryDate"`                     // Date of delivery. Must be a valid date according to our date format.
	DeliveryName              string            `json:"DeliveryName"`                     // Name of the recipient of the delivery
	DeliveryZipCode           string            `json:"DeliveryZipCode"`                  // ZipCode for the invoice delivery address.
	DocumentNumber            string            `json:"DocumentNumber"`                   // The invoice number. If no document number is provided, the next number in the series will be used.
	DueDate                   Date              `json:"DueDate"`                          // Due date of the invoice. Must be a valid date according to our date format.
	EDIInformation            *EDIInformation   `json:"EDIInformation,omitempty"`         // The properties for this object is listed in the table for “EDI Information”.
	EmailInformation          *EmailInformation `json:"EmailInformation,omitempty"`       // The properties for this object is listed in the table for “Email Information”.
	EUQuarterlyReport         bool              `json:"EUQuarterlyReport"`                // EU Quarterly Report On / Off
	ExternalInvoiceReference1 string            `json:"ExternalInvoiceReference1"`        // External invoice reference 1.
	ExternalInvoiceReference2 string            `json:"ExternalInvoiceReference2"`        // External invoice reference 1.
	FinalPayDate              Date              `json:"FinalPayDate,omitempty"`           // The date when the invoice became fully paid. Only available if the invoice is fully paid.
	Freight                   float64           `json:"Freight"`                          // Freight cost of the invoice.
	FreightVAT                float64           `json:"FreightVAT,omitempty"`             // VAT of the freight cost.
	Gross                     float64           `json:"Gross,omitempty"`                  // Gross value of the invoice
	HouseWork                 null.Bool         `json:"HouseWork,omitempty"`              // If there is any row of the invoice marked “house work”.
	InvoiceDate               Date              `json:"InvoiceDate"`                      // Invoice date. Must be a valid date according to our date format.
	InvoicePeriodStart        Date              `json:"InvoicePeriodStart,omitempty"`     // Start date of the invoice period, only applicable for contract invoices.
	InvoicePeriodEnd          Date              `json:"InvoicePeriodEnd,omitempty"`       // End date of the invoice period, only applicable for contract invoices.
	InvoiceReference          string            `json:"InvoiceReference,omitempty"`
	InvoiceRows               InvoiceRows       `json:"InvoiceRows"`                  // The properties for the object in this array is listed in the table “Invoice Rows”.
	InvoiceType               InvoiceType       `json:"InvoiceType"`                  // The type of invoice. Can be INVOICE AGREEMENTINVOICE INTRESTINVOICE SUMMARYINVOICE or CASHINVOICE.
	Labels                    Labels            `json:"Labels"`                       // The properties for the object in this array is listed in the table “Labels”
	Language                  string            `json:"Language"`                     // Language code. Can be SV or EN.
	LastRemindDate            Date              `json:"LastRemindDate,omitempty"`     // Date of last reminder.
	Net                       float64           `json:"Net,omitempty"`                // Net amount
	NotCompleted              bool              `json:"NotCompleted"`                 // If the invoice is set as not completed.
	NoxFinans                 null.Bool         `json:"NoxFinans,omitempty"`          // If the invoice is managed by NoxFinans
	OCR                       string            `json:"OCR"`                          // OCR number of the invoice.
	OfferReference            string            `json:"OfferReference,omitempty"`     // Reference to the offer, if one exists.
	OrderReference            string            `json:"OrderReference,omitempty"`     // Reference to the order, if one exists.
	OrganisationNumber        string            `json:"OrganisationNumber,omitempty"` // Organisation number of the customer for the invoice.
	OurReference              string            `json:"OurReference"`                 // Our reference.
	PaymentWay                PaymentWay        `json:"PaymentWay,omitempty"`         // CASH, CARD, AG
	Phone1                    string            `json:"Phone1"`                       // Phone number 1 of the customer for the invoice.
	Phone2                    string            `json:"Phone2"`                       // Phone number 2 of the customer for the invoice.
	PriceList                 string            `json:"PriceList"`                    // Code of the price list. The code must be of an existing price list.
	PrintTemplate             string            `json:"PrintTemplate"`                // Print template of the invoice. Must be an existing print template.
	Project                   string            `json:"Project"`                      // Code of the project. The code must be of an existing project.
	WarehouseReady            null.Bool         `json:"WarehouseReady,omitempty"`
	OutboundDate              Date              `json:"OutboundDate"`
	Remarks                   string            `json:"Remarks"`                // Remarks of the invoice. This is the invoice text shown on the invoice.
	Reminders                 int               `json:"Reminders,omitempty"`    // Number of reminders sent to the customer.
	RoundOff                  float64           `json:"RoundOff,omitempty"`     // Round off amount for the invoice.
	Sent                      null.Bool         `json:"Sent,omitempty"`         // If the document is printed or sent in any way.
	TaxReduction              int               `json:"TaxReduction,omitempty"` // The amount of tax reduction.
	TermsOfDelivery           string            `json:"TermsOfDelivery"`        // Code of the terms of delivery. The code must be of an existing terms of delivery.
	TermsOfPayment            string            `json:"TermsOfPayment"`         // Code of the terms of payment. The code must be of an existing terms of payment.
	Total                     float64           `json:"Total,omitempty"`        // The total amount of the invoice.
	TotalVAT                  float64           `json:"TotalVAT,omitempty"`     // The total VAT amount of the invoice.
	TotalToPay                float64           `json:"TotalToPay,omitempty"`
	VATIncluded               bool              `json:"VATIncluded"`             // If the price of the invoice is including VAT.
	VoucherNumber             int               `json:"VoucherNumber,omitempty"` // Voucher number for the invoice. This is created when the invoice is bookkept.
	VoucherSeries             string            `json:"VoucherSeries,omitempty"` // Voucher series for the invoice. This is created when the invoice is bookkept.
	VoucherYear               int               `json:"VoucherYear,omitempty"`   // Voucher year for the invoice. This is created when the invoice is bookkept.
	WayOfDelivery             string            `json:"WayOfDelivery,omitempty"` // Code of the way of delivery. The code must be of an existing way of delivery.
	YourOrderNumber           string            `json:"YourOrderNumber"`         // Your order number.
	YourReference             string            `json:"YourReference"`           // Your reference.
	ZipCode                   string            `json:"ZipCode"`                 // Zip code of the invoice.
}

type InvoiceRow

type InvoiceRow struct {
	AccountNumber       int     `json:"AccountNumber"`                 // Account number. If not provided the predefined account will be used.
	ArticleNumber       string  `json:"ArticleNumber"`                 // Article number.
	ContributionPercent string  `json:"ContributionPercent,omitempty"` // Contribution Percent.
	ContributionValue   string  `json:"ContributionValue,omitempty"`   // Contribution Value.
	CostCenter          string  `json:"CostCenter,omitempty"`          // Code of the cost center for the row. The code must be of an existing cost center.
	DeliveredQuantity   string  `json:"DeliveredQuantity"`             // Delivered quantity.
	Description         string  `json:"Description"`                   // Row description.
	Discount            float64 `json:"Discount"`                      // Discount amount.
	// 12 digits (for amount) / 5 digits (for percent)
	DiscountType           string `json:"DiscountType"`           // The type of discount used for the row. Can be AMOUNT or PERCENT.
	HouseWork              bool   `json:"HouseWork"`              // If the row is housework
	HouseWorkHoursToReport int    `json:"HouseWorkHoursToReport"` // Hours to be reported if the quantity of the row should not be used as hours.
	HouseWorkType          string `json:"HouseWorkType"`          // The type of house work. Can be
	// CONSTRUCTIONELECTRICITYGLASSMETALWORK
	// GROUNDDRAINAGEWORKMASONRY
	// PAINTINGWALLPAPERINGHVACMAJORAPPLIANCEREPAIR
	// MOVINGSERVICESITSERVICESCLEANINGTEXTILECLOTHINGSNOWPLOWING
	// GARDENINGBABYSITTINGOTHERCAREOTHERCOSTS or empty.
	Price             float64 `json:"Price"`                       // Price per unit
	PriceExcludingVAT float64 `json:"PriceExcludingVAT,omitempty"` // Price per unit excluding VAT (regardless of value of VATIncluded flag)
	Project           string  `json:"Project,omitempty"`           // Code of the project for the row. The code must be of an existing project.
	StockPointCode    string  `json:"StockPointCode,omitempty"`
	Total             float64 `json:"Total,omitempty"`             // Total amount for the row.
	TotalExcludingVAT float64 `json:"TotalExcludingVAT,omitempty"` // Total amount for the row excluding VAT (regardless of value of VATIncluded flag)
	Unit              string  `json:"Unit"`                        // Code of the unit for the row. The code must be of an existing unit.
	VAT               int     `json:"VAT"`                         // VAT percentage of the row. The percentage needs to be of an existing VAT percentage.
}

type InvoiceRows

type InvoiceRows []InvoiceRow

type InvoiceType

type InvoiceType string
var (
	InvoiceTypeInvoice          InvoiceType = "INVOICE"
	InvoiceTypeAgreementInvoice InvoiceType = "AGREEMENTINVOICE"
	InvoiceTypeIntrestInvoice   InvoiceType = "INTRESTINVOICE"
	InvoiceTypeSummaryInvoice   InvoiceType = "SUMMARYINVOICE"
	InvoiceTypeCashInvoice      InvoiceType = "CASHINVOICE"
)

type Invoices

type Invoices []Invoice

type Label

type Label struct {
	ID string `json:"Id"` // Id of the label.
}

type Labels

type Labels []Label

type MetaInformation

type MetaInformation struct {
	TotalResources int `json:"@TotalResources"`
	TotalPages     int `json:"@TotalPages"`
	CurrentPage    int `json:"@CurrentPage"`
}

type Number

type Number float64

func (Number) MarshalJSON

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

func (*Number) UnmarshalJSON

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

type Oauth2Config

type Oauth2Config struct {
	oauth2.Config
}

func NewOauth2Config

func NewOauth2Config() *Oauth2Config

type PathParams

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

type PaymentWay

type PaymentWay string
var (
	PaymentWayCash PaymentWay = "CASH" // Payment Way is set to Cash payment
	PaymentWayCard PaymentWay = "Card" // Payment Way is set to Card.
	PaymentWayAG   PaymentWay = "AG"   // Payment Way is set to Direct debit
)

type PostCustomerPathParams

type PostCustomerPathParams struct {
}

func (*PostCustomerPathParams) Params

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

type PostCustomerQueryParams

type PostCustomerQueryParams struct {
}

func (PostCustomerQueryParams) ToURLValues

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

type PostCustomerRequest

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

func (*PostCustomerRequest) Do

func (*PostCustomerRequest) Method

func (r *PostCustomerRequest) Method() string

func (PostCustomerRequest) NewPostCustomerPathParams

func (r PostCustomerRequest) NewPostCustomerPathParams() *PostCustomerPathParams

func (PostCustomerRequest) NewPostCustomerQueryParams

func (r PostCustomerRequest) NewPostCustomerQueryParams() *PostCustomerQueryParams

func (PostCustomerRequest) NewPostCustomerRequestBody

func (r PostCustomerRequest) NewPostCustomerRequestBody() PostCustomerRequestBody

func (*PostCustomerRequest) NewResponseBody

func (r *PostCustomerRequest) NewResponseBody() *PostCustomerResponseBody

func (*PostCustomerRequest) PathParams

func (*PostCustomerRequest) QueryParams

func (r *PostCustomerRequest) QueryParams() *PostCustomerQueryParams

func (*PostCustomerRequest) RequestBody

func (r *PostCustomerRequest) RequestBody() *PostCustomerRequestBody

func (*PostCustomerRequest) SetMethod

func (r *PostCustomerRequest) SetMethod(method string)

func (*PostCustomerRequest) SetRequestBody

func (r *PostCustomerRequest) SetRequestBody(body PostCustomerRequestBody)

func (*PostCustomerRequest) URL

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

type PostCustomerRequestBody

type PostCustomerRequestBody struct {
	Customer Customer
}

type PostCustomerResponseBody

type PostCustomerResponseBody struct {
	MetaInformation `json:"MetaInformation"`
	Customer        Customer
}

type PostInvoicePathParams

type PostInvoicePathParams struct {
}

func (*PostInvoicePathParams) Params

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

type PostInvoiceQueryParams

type PostInvoiceQueryParams struct {
}

func (PostInvoiceQueryParams) ToURLValues

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

type PostInvoiceRequest

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

func (*PostInvoiceRequest) Do

func (*PostInvoiceRequest) Method

func (r *PostInvoiceRequest) Method() string

func (PostInvoiceRequest) NewPostInvoicePathParams

func (r PostInvoiceRequest) NewPostInvoicePathParams() *PostInvoicePathParams

func (PostInvoiceRequest) NewPostInvoiceQueryParams

func (r PostInvoiceRequest) NewPostInvoiceQueryParams() *PostInvoiceQueryParams

func (PostInvoiceRequest) NewPostInvoiceRequestBody

func (r PostInvoiceRequest) NewPostInvoiceRequestBody() PostInvoiceRequestBody

func (*PostInvoiceRequest) NewResponseBody

func (r *PostInvoiceRequest) NewResponseBody() *PostInvoiceResponseBody

func (*PostInvoiceRequest) PathParams

func (r *PostInvoiceRequest) PathParams() *PostInvoicePathParams

func (*PostInvoiceRequest) QueryParams

func (r *PostInvoiceRequest) QueryParams() *PostInvoiceQueryParams

func (*PostInvoiceRequest) RequestBody

func (r *PostInvoiceRequest) RequestBody() *PostInvoiceRequestBody

func (*PostInvoiceRequest) SetMethod

func (r *PostInvoiceRequest) SetMethod(method string)

func (*PostInvoiceRequest) SetRequestBody

func (r *PostInvoiceRequest) SetRequestBody(body PostInvoiceRequestBody)

func (*PostInvoiceRequest) URL

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

type PostInvoiceRequestBody

type PostInvoiceRequestBody struct {
	Invoice Invoice
}

type PostInvoiceResponseBody

type PostInvoiceResponseBody struct {
	MetaInformation `json:"MetaInformation"`
	Invoice         Invoice
}

type PostVoucherPathParams

type PostVoucherPathParams struct {
}

func (*PostVoucherPathParams) Params

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

type PostVoucherQueryParams

type PostVoucherQueryParams struct {
}

func (PostVoucherQueryParams) ToURLValues

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

type PostVoucherRequest

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

func (*PostVoucherRequest) Do

func (*PostVoucherRequest) Method

func (r *PostVoucherRequest) Method() string

func (PostVoucherRequest) NewPostVoucherPathParams

func (r PostVoucherRequest) NewPostVoucherPathParams() *PostVoucherPathParams

func (PostVoucherRequest) NewPostVoucherQueryParams

func (r PostVoucherRequest) NewPostVoucherQueryParams() *PostVoucherQueryParams

func (PostVoucherRequest) NewPostVoucherRequestBody

func (r PostVoucherRequest) NewPostVoucherRequestBody() PostVoucherRequestBody

func (*PostVoucherRequest) NewResponseBody

func (r *PostVoucherRequest) NewResponseBody() *PostVoucherResponseBody

func (*PostVoucherRequest) PathParams

func (r *PostVoucherRequest) PathParams() *PostVoucherPathParams

func (*PostVoucherRequest) QueryParams

func (r *PostVoucherRequest) QueryParams() *PostVoucherQueryParams

func (*PostVoucherRequest) RequestBody

func (r *PostVoucherRequest) RequestBody() *PostVoucherRequestBody

func (*PostVoucherRequest) SetMethod

func (r *PostVoucherRequest) SetMethod(method string)

func (*PostVoucherRequest) SetRequestBody

func (r *PostVoucherRequest) SetRequestBody(body PostVoucherRequestBody)

func (*PostVoucherRequest) URL

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

type PostVoucherRequestBody

type PostVoucherRequestBody struct {
	Voucher Voucher
}

type PostVoucherResponseBody

type PostVoucherResponseBody struct {
	MetaInformation `json:"MetaInformation"`
	Voucher         Voucher
}

type RequestCompletionCallback

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

RequestCompletionCallback defines the type of the request callback function

type VATType

type VATType string

VAT type of the customer. Can be SEVAT SEREVERSEDVAT EUREVERSEDVAT EUVAT or EXPORT.

var (
	VATTypeSEVAT         VATType = "SEVAT"
	VATTypeSEReversedVAT VATType = "SEREVERSEDVAT"
	VATTypeEUReversedVAT VATType = "EUREVERSEDVAT"
	VATTypeEUVat         VATType = "EUVAT"
	VATTypeExport        VATType = "EXPORT"
)

type Voucher

type Voucher struct {
	URL             string        `json:"@url,omitempty"`            // Direct URL to the record.
	Comments        string        `json:"Comments"`                  // Comments of the voucher.
	CostCenter      string        `json:"CostCenter,omitempty"`      // Code of the cost center. The code must be of an existing cost center.
	Description     string        `json:"Description"`               // Description of the voucher.
	Project         string        `json:"Project"`                   // Code of the project. The code must be of an existing project.
	ReferenceNumber string        `json:"ReferenceNumber,omitempty"` // Reference number, for example an invoice number.
	ReferenceType   string        `json:"ReferenceType"`             // Reference type. Can be INVOICE SUPPLIERINVOICE INVOICEPAYMENT SUPPLIERPAYMENT MANUAL CASHINVOICE or ACCRUAL
	TransactionDate Date          `json:"TransactionDate"`           // Date of the transaction. Must be a valid date according to our date format.
	VoucherNumber   int           `json:"VoucherNumber,omitempty"`   // Number of the voucher
	VoucherRows     VoucherRows   `json:"VoucherRows"`               // The properties for the object in this array is listed in the table for “Voucher Rows”.
	VoucherSeries   string        `json:"VoucherSeries"`             // Code of the voucher series. The code must be of an existing voucher series.
	Year            int           `json:"Year,omitempty"`            // Id of the year of the voucher.
	ApprovalState   ApprovalState `json:"ApprovalState,omitempty"`   // // The approval state f the voucher.
}

type VoucherRow

type VoucherRow struct {
	Account                int     `json:"Account"`                // Account number. The number must be of an existing active account.
	CostCenter             string  `json:"CostCenter,omitempty"`   // Code of the cost center. The code must be of an existing cost center.
	Credit                 float64 `json:"Credit"`                 // Amount of credit.
	Description            string  `json:"Description"`            // The description of the account.
	Debit                  float64 `json:"Debit"`                  // Amount of debit.
	Project                string  `json:"Project"`                // Code of the project. The code must be of an existing project.
	Removed                bool    `json:"Removed,omitempty"`      // If the row is marked as removed.
	TransactionInformation string  `json:"TransactionInformation"` // Transaction information regarding the row.
	Quantity               int     `json:"Quantity,omitempty"`
}

type VoucherRows

type VoucherRows []VoucherRow

type Vouchers

type Vouchers []Voucher

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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