minox

package module
v0.0.0-...-09b836f Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2024 License: MIT Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	BaseURL = url.URL{
		Scheme: "https",
		Host:   "app.minox.nl",
		Path:   "api/{{.version}}/tenant/{{.tenant_id}}",
	}
)

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.

Types

type AccountIDResponse

type AccountIDResponse struct {
	// id: account_idstring *
	// example: 4010
	// Value range: 1 to 999999. Must be a valid id from a general ledger
	// account, customer or supplier.
	ID string `json:"id"`

	// scheme: account_scheme string *
	Scheme AccountScheme `json:"scheme"`

	// type: account_type string *
	Type AccountType `json:"type"`

	// description: description string
	// Descriptive text defined by the user or the system.
	Description string `json:"description"`
}

type AccountScheme

type AccountScheme string

Enum: [ MINOX ]

type AccountType

type AccountType string

Enum: [ ledger_account, supplier, customer ]

type Address

type Address struct {
	AddressType         string `json:"address_type"`
	ID                  string `json:"id,omitempty"`
	Name                string `json:"name"`
	ExtendedName        string `json:"extended_name"`
	ContactName         string `json:"contact_name"`
	Salutation          string `json:"salutation"`
	StreetnameAndNumber string `json:"streetname_and_number"`
	PostalCode          string `json:"postal_code"`
	City                string `json:"city"`
	CountryCode         string `json:"country_code"`
	Search              string `json:"search"`
	Www                 string `json:"www"`
	PhoneNumbers        []struct {
		PhoneNumberType string `json:"phone_number_type"`
		PhoneNumber     string `json:"phone_number"`
	} `json:"phone_numbers"`
	EmailAddresses []EmailAddress `json:"email_addresses"`
}

type Addresses

type Addresses []Address

type Administration

type Administration struct {
	// id: integer
	// example: 99998
	// minimum: 1
	// maximum: 99999
	ID int `json:"id"`

	// name: string
	// example: Breekstaal B.V.
	Name string `json:"name"`

	// number_of_periods: integer
	// example: 12
	NumberOfPeriods NumberOfPeriods `json:"number_of_periods"`

	VATOnSub bool     `json:"vat_on_sub"`
	Currency Currency `json:"currency"`

	// chamber_of_commerce: string
	// example: 30070111
	ChamberOfCommerce string `json:"chamber_of_commerce"`

	// country_code: string
	// example: NL
	// An ISO-3166-1-alpha2 country code. See:
	// https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements
	CountryCode string `json:"country_code"`

	// [administration_fiscal_year]
	FiscalYears FiscalYears `json:"fiscal_years"`

	LedgerAccounts struct {
		ExchangeRate        AccountIDResponse `json:"exchange_rate"`
		TransactionRounding AccountIDResponse `json:"transaction_rounding"`
		AutomaticPayments   AccountIDResponse `json:"automatic_payments"`
		DebtCollection      AccountIDResponse `json:"debt_collection"`
		ProfitLoss          AccountIDResponse `json:"profit_loss"`
	} `json:"ledger_accounts"`
}

type AdministrationListGetPathParams

type AdministrationListGetPathParams struct {
}

func (*AdministrationListGetPathParams) Params

type AdministrationListGetQueryParams

type AdministrationListGetQueryParams struct {
	CurrentPage int    `schema:"currentpage,omitempty"`
	Status      string `schema:"status,omitempty"`
}

func (AdministrationListGetQueryParams) ToURLValues

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

type AdministrationListGetRequest

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

func (*AdministrationListGetRequest) Do

func (*AdministrationListGetRequest) Method

func (*AdministrationListGetRequest) NewResponseBody

func (*AdministrationListGetRequest) PathParams

func (*AdministrationListGetRequest) QueryParams

func (*AdministrationListGetRequest) RequestBody

func (*AdministrationListGetRequest) SetMethod

func (r *AdministrationListGetRequest) SetMethod(method string)

func (*AdministrationListGetRequest) SetRequestBody

func (*AdministrationListGetRequest) URL

type AdministrationListGetRequestBody

type AdministrationListGetRequestBody struct {
}

type AdministrationListGetResponseBody

type AdministrationListGetResponseBody struct {
	Links      CollectionLinks `json:"links"`
	Collection Administrations `json:"collection"`
}

type Administrations

type Administrations []Administration

type Aggregation

type Aggregation struct {
	AggregationLevel int    `json:"aggregation_level"`
	Description      string `json:"description"`
}

func (Aggregation) IsEmpty

func (a Aggregation) IsEmpty() bool

type Bool

type Bool bool

func (Bool) MarshalJSON

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

type Client

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

Client manages communication with InvoiceXpress Client

func NewClient

func NewClient(httpClient *http.Client, tenantID int) *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

func (*Client) MediaType

func (c *Client) MediaType() string

func (*Client) NewAdministrationListGetPathParams

func (c *Client) NewAdministrationListGetPathParams() *AdministrationListGetPathParams

func (*Client) NewAdministrationListGetQueryParams

func (c *Client) NewAdministrationListGetQueryParams() *AdministrationListGetQueryParams

func (*Client) NewAdministrationListGetRequest

func (c *Client) NewAdministrationListGetRequest() AdministrationListGetRequest

func (*Client) NewAdministrationListGetRequestBody

func (s *Client) NewAdministrationListGetRequestBody() AdministrationListGetRequestBody

func (*Client) NewCustomerPostPathParams

func (c *Client) NewCustomerPostPathParams() *CustomerPostPathParams

func (*Client) NewCustomerPostQueryParams

func (c *Client) NewCustomerPostQueryParams() *CustomerPostQueryParams

func (*Client) NewCustomerPostRequest

func (c *Client) NewCustomerPostRequest() CustomerPostRequest

func (*Client) NewCustomerPostRequestBody

func (s *Client) NewCustomerPostRequestBody() CustomerPostRequestBody

func (*Client) NewCustomerSearchPathParams

func (c *Client) NewCustomerSearchPathParams() *CustomerSearchPathParams

func (*Client) NewCustomerSearchQueryParams

func (c *Client) NewCustomerSearchQueryParams() *CustomerSearchQueryParams

func (*Client) NewCustomerSearchRequest

func (c *Client) NewCustomerSearchRequest() CustomerSearchRequest

func (*Client) NewCustomerSearchRequestBody

func (s *Client) NewCustomerSearchRequestBody() CustomerSearchRequestBody

func (*Client) NewJournalListGetPathParams

func (c *Client) NewJournalListGetPathParams() *JournalListGetPathParams

func (*Client) NewJournalListGetQueryParams

func (c *Client) NewJournalListGetQueryParams() *JournalListGetQueryParams

func (*Client) NewJournalListGetRequest

func (c *Client) NewJournalListGetRequest() JournalListGetRequest

func (*Client) NewJournalListGetRequestBody

func (s *Client) NewJournalListGetRequestBody() JournalListGetRequestBody

func (*Client) NewLedgerAccountListGetPathParams

func (c *Client) NewLedgerAccountListGetPathParams() *LedgerAccountListGetPathParams

func (*Client) NewLedgerAccountListGetQueryParams

func (c *Client) NewLedgerAccountListGetQueryParams() *LedgerAccountListGetQueryParams

func (*Client) NewLedgerAccountListGetRequest

func (c *Client) NewLedgerAccountListGetRequest() LedgerAccountListGetRequest

func (*Client) NewLedgerAccountListGetRequestBody

func (s *Client) NewLedgerAccountListGetRequestBody() LedgerAccountListGetRequestBody

func (*Client) NewRequest

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

func (*Client) NewTransactionLineBatchPutPathParams

func (c *Client) NewTransactionLineBatchPutPathParams() *TransactionLineBatchPutPathParams

func (*Client) NewTransactionLineBatchPutQueryParams

func (c *Client) NewTransactionLineBatchPutQueryParams() *TransactionLineBatchPutQueryParams

func (*Client) NewTransactionLineBatchPutRequest

func (c *Client) NewTransactionLineBatchPutRequest() TransactionLineBatchPutRequest

func (*Client) NewTransactionLineBatchPutRequestBody

func (s *Client) NewTransactionLineBatchPutRequestBody() TransactionLineBatchPutRequestBody

func (*Client) RegisterRequestTimestamp

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

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

func (c *Client) SetMediaType(mediaType string)

func (*Client) SetTenantID

func (c *Client) SetTenantID(tenantID int)

func (*Client) SetUserAgent

func (c *Client) SetUserAgent(userAgent string)

func (*Client) SleepUntilRequestRate

func (c *Client) SleepUntilRequestRate()

func (*Client) TenantID

func (c *Client) TenantID() int

func (*Client) Unmarshal

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

func (*Client) UserAgent

func (c *Client) UserAgent() string
type CollectionLinks struct {
}

type CostCenter

type CostCenter struct {
	ID          int    `json:"id,omitempty"`
	Description string `json:"description"`
}

func (CostCenter) IsEmpty

func (c CostCenter) IsEmpty() bool

type Currency

type Currency struct {
	ID           string  `json:"id"`
	ExchangeRate float64 `json:"exchange_rate"`
	Description  string  `json:"description"`
}

type CustomField

type CustomField struct {
	ID    string `json:"id"`
	Value string `json:"value"`
}

type CustomFields

type CustomFields []CustomField

type CustomerPost

type CustomerPost struct {
	ID int `json:"id,omitempty"`
	// Aggregation Aggregation `json:"aggregation,omitempty"`
	// IsOneTime   bool        `json:"is_one_time,omitempty"`
	Addresses Addresses `json:"addresses"`
	Search    []Search  `json:"search"`
	// Language string `json:"language"`
	VAT struct {
		Active                bool   `json:"active"`
		SuggestedVATID        int    `json:"suggested_vat_id"`
		SuggestedGlAccount    int    `json:"suggested_gl_account"`
		VATRegistrationNumber string `json:"vat_registration_number"`
	} `json:"vat"`
	// Currency struct {
	// 	ID           string `json:"id"`
	// 	ExchangeRate int    `json:"exchange_rate"`
	// 	Description  string `json:"description"`
	// } `json:"currency"`
	// BlockSendingReminders bool `json:"block_sending_reminders"`
	// BlockCollection       bool `json:"block_collection"`
	// PaymentTerm           struct {
	// 	ID          int    `json:"id"`
	// 	Description string `json:"description"`
	// 	Days        int    `json:"days"`
	// 	Mandate     string `json:"mandate"`
	// 	Start       string `json:"start"`
	// 	Terms       struct {
	// 		Type       string `json:"type"`
	// 		Days       int    `json:"days"`
	// 		Percentage int    `json:"percentage"`
	// 	} `json:"terms"`
	// } `json:"payment_term"`
	// Blocked struct {
	// 	Active bool   `json:"active"`
	// 	Reason string `json:"reason"`
	// } `json:"blocked"`
	// ChamberOfCommerce string `json:"chamber_of_commerce"`
	// Bank              struct {
	// 	Iban string `json:"iban"`
	// 	Bic  string `json:"bic"`
	// 	Name string `json:"name"`
	// 	City string `json:"city"`
	// } `json:"bank"`
	CustomFields CustomFields `json:"custom_fields"`
	// Memo struct {
	// 	Active bool   `json:"active"`
	// 	Text   string `json:"text"`
	// } `json:"memo"`
	// Sales struct {
	// 	Pricecode                 int    `json:"pricecode"`
	// 	StatisticsCode            string `json:"statistics_code"`
	// 	VATInclusive              bool   `json:"vat_inclusive"`
	// 	TrackSalesHistory         bool   `json:"track_sales_history"`
	// 	GRekeningPercentage       int    `json:"g_rekening_percentage"`
	// 	InvoiceDiscountPercentage int    `json:"invoice_discount_percentage"`
	// 	CreditLimit               int    `json:"credit_limit"`
	// 	RevenueCategory           int    `json:"revenue_category"`
	// 	DiscountGroup             struct {
	// 		ID          int    `json:"id"`
	// 		Description string `json:"description"`
	// 	} `json:"discount_group"`
	// 	DeliveryTerms struct {
	// 		ID          int    `json:"id"`
	// 		Description string `json:"description"`
	// 	} `json:"delivery_terms"`
	// 	Carrier struct {
	// 		ID          int    `json:"id"`
	// 		Description string `json:"description"`
	// 	} `json:"carrier"`
	// 	Representative struct {
	// 		ID          int    `json:"id"`
	// 		Description string `json:"description"`
	// 	} `json:"representative"`
	// 	Region struct {
	// 		ID          int    `json:"id"`
	// 		Description string `json:"description"`
	// 	} `json:"region"`
	// 	CustomerType struct {
	// 		ID          int    `json:"id"`
	// 		Description string `json:"description"`
	// 	} `json:"customer_type"`
	// 	DeliveryAddress struct {
	// 		ID          int    `json:"id"`
	// 		Description string `json:"description"`
	// 	} `json:"delivery_address"`
	// 	InvoiceType struct {
	// 		PdfDownload  bool   `json:"pdf_download"`
	// 		EmailWithPdf bool   `json:"email_with_pdf"`
	// 		EmailWithUbl bool   `json:"email_with_ubl"`
	// 		Attachment   bool   `json:"attachment"`
	// 		Email        string `json:"email"`
	// 	} `json:"invoice_type"`
	// 	ReminderType struct {
	// 		PdfDownload  bool   `json:"pdf_download"`
	// 		EmailWithPdf bool   `json:"email_with_pdf"`
	// 		Email        string `json:"email"`
	// 	} `json:"reminder_type"`
	// 	QuotationType struct {
	// 		PdfDownload  bool   `json:"pdf_download"`
	// 		EmailWithPdf bool   `json:"email_with_pdf"`
	// 		Attachment   bool   `json:"attachment"`
	// 		Email        string `json:"email"`
	// 	} `json:"quotation_type"`
	// 	OrderType struct {
	// 		PdfDownload  bool   `json:"pdf_download"`
	// 		EmailWithPdf bool   `json:"email_with_pdf"`
	// 		Attachment   bool   `json:"attachment"`
	// 		Email        string `json:"email"`
	// 	} `json:"order_type"`
	// 	PackinglistType struct {
	// 		PdfDownload  bool   `json:"pdf_download"`
	// 		EmailWithPdf bool   `json:"email_with_pdf"`
	// 		Attachment   bool   `json:"attachment"`
	// 		Email        string `json:"email"`
	// 	} `json:"packinglist_type"`
	// 	BillofladingType struct {
	// 		PdfDownload  bool   `json:"pdf_download"`
	// 		EmailWithPdf bool   `json:"email_with_pdf"`
	// 		Attachment   bool   `json:"attachment"`
	// 		Email        string `json:"email"`
	// 	} `json:"billoflading_type"`
	// 	SubscriptionType struct {
	// 		PdfDownload  bool   `json:"pdf_download"`
	// 		EmailWithPdf bool   `json:"email_with_pdf"`
	// 		Attachment   bool   `json:"attachment"`
	// 		Email        string `json:"email"`
	// 	} `json:"subscription_type"`
	// } `json:"sales"`
	ExternalID string `json:"externalid"`
}

func (CustomerPost) MarshalJSON

func (c CustomerPost) MarshalJSON() ([]byte, error)

type CustomerPostPathParams

type CustomerPostPathParams struct {
	AdministrationID string
	BatchID          uuid.UUID
}

func (*CustomerPostPathParams) Params

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

type CustomerPostQueryParams

type CustomerPostQueryParams struct {
	JournalID string `schema:"journal_id,omitempty"`
}

func (CustomerPostQueryParams) ToURLValues

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

type CustomerPostRequest

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

func (*CustomerPostRequest) Do

func (*CustomerPostRequest) Headers

func (r *CustomerPostRequest) Headers() http.Header

func (*CustomerPostRequest) Method

func (r *CustomerPostRequest) Method() string

func (*CustomerPostRequest) NewResponseBody

func (r *CustomerPostRequest) NewResponseBody() *CustomerPostResponseBody

func (*CustomerPostRequest) PathParams

func (*CustomerPostRequest) QueryParams

func (r *CustomerPostRequest) QueryParams() *CustomerPostQueryParams

func (*CustomerPostRequest) RequestBody

func (r *CustomerPostRequest) RequestBody() *CustomerPostRequestBody

func (*CustomerPostRequest) SetMethod

func (r *CustomerPostRequest) SetMethod(method string)

func (*CustomerPostRequest) SetRequestBody

func (r *CustomerPostRequest) SetRequestBody(body CustomerPostRequestBody)

func (*CustomerPostRequest) URL

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

type CustomerPostRequestBody

type CustomerPostRequestBody struct {
	CustomerPost []CustomerPost
}

func (CustomerPostRequestBody) MarshalJSON

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

type CustomerPostResponseBody

type CustomerPostResponseBody struct {
}

type CustomerSearchPathParams

type CustomerSearchPathParams struct {
	AdministrationID string
}

func (*CustomerSearchPathParams) Params

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

type CustomerSearchQueryParams

type CustomerSearchQueryParams struct {
	Next   string `schema:"next,omitempty"`
	Search string `schema:"search,omitempty"`
}

func (CustomerSearchQueryParams) ToURLValues

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

type CustomerSearchRequest

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

func (*CustomerSearchRequest) Do

func (*CustomerSearchRequest) Method

func (r *CustomerSearchRequest) Method() string

func (*CustomerSearchRequest) NewResponseBody

func (r *CustomerSearchRequest) NewResponseBody() *CustomerSearchResponseBody

func (*CustomerSearchRequest) PathParams

func (*CustomerSearchRequest) QueryParams

func (*CustomerSearchRequest) RequestBody

func (*CustomerSearchRequest) SetMethod

func (r *CustomerSearchRequest) SetMethod(method string)

func (*CustomerSearchRequest) SetRequestBody

func (r *CustomerSearchRequest) SetRequestBody(body CustomerSearchRequestBody)

func (*CustomerSearchRequest) URL

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

type CustomerSearchRequestBody

type CustomerSearchRequestBody struct {
}

type CustomerSearchResponseBody

type CustomerSearchResponseBody struct {
	Links      CollectionLinks `json:"links"`
	Collection []CustomerPost  `json:"collection"`
}

type Date

type Date struct {
	time.Time
}

func (Date) MarshalJSON

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

func (*Date) UnmarshalJSON

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

type DebitCreditSuggestion

type DebitCreditSuggestion string

[

debet,
credit,
none

]

type EmailAddress

type EmailAddress struct {
	EmailAddressType string `json:"email_address_type"`
	EmailAddress     string `json:"email_address"`
}

type ErrorResponse

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

	Messages Messages
}

func (*ErrorResponse) Error

func (r *ErrorResponse) Error() string

func (*ErrorResponse) UnmarshalJSON

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

type FilterParams

type FilterParams map[string]string

type FiscalYear

type FiscalYear struct {
	// number_of_periods: integer
	// example: 12
	NumberOfPeriods NumberOfPeriods `json:"number_of_periods"`

	// fiscal_year: integer
	// example: 2018
	FiscalYear int `json:"fiscal_year"`

	// start_date: string ($date)
	// example: 2018-01-01
	StartDate Date `json:"start_date"`

	// end_date: string ($date)
	// example: 2018-12-31
	EndDate Date `json:"end_date"`
}

type FiscalYears

type FiscalYears []FiscalYear

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 Journal

type Journal struct {
	LedgerAccountID int    `json:"ledger_account_id"`
	IBAN            string `json:"iban"`
	Terms           []struct {
		Days          int    `json:"days"`
		TranslationID string `json:"translation_id"`
	} `json:"terms"`
	NextInvoiceNumber        int      `json:"next_invoice_number"`
	LedgerAccountDifferences int      `json:"ledger_account_differences"`
	CheckForNegativeCash     bool     `json:"check_for_negative_cash"`
	Currency                 Currency `json:"currency"`
	FreeEntryNumber          bool     `json:"free_entry_number"`
	EntryNumber              int      `json:"entry_number"`
	Type                     string   `json:"type"`
	CheckClosingBalance      bool     `json:"check_closing_balance"`
	ID                       string   `json:"id"`
	BIC                      string   `json:"bic"`
	Description              string   `json:"description"`
	Range                    struct {
		Start                   int  `json:"start"`
		End                     int  `json:"end"`
		IsAutomaticallyAssigned bool `json:"is_automatically_assigned"`
	}
	AllowLinkingOfDocuments bool `json:"allow_linking_of_documents"`
}

type JournalListGetPathParams

type JournalListGetPathParams struct {
	AdministrationID string
}

func (*JournalListGetPathParams) Params

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

type JournalListGetQueryParams

type JournalListGetQueryParams struct {
	CurrentPage int    `schema:"currentpage,omitempty"`
	Status      string `schema:"status,omitempty"`
}

func (JournalListGetQueryParams) ToURLValues

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

type JournalListGetRequest

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

func (*JournalListGetRequest) Do

func (*JournalListGetRequest) Method

func (r *JournalListGetRequest) Method() string

func (*JournalListGetRequest) NewResponseBody

func (r *JournalListGetRequest) NewResponseBody() *JournalListGetResponseBody

func (*JournalListGetRequest) PathParams

func (*JournalListGetRequest) QueryParams

func (*JournalListGetRequest) RequestBody

func (*JournalListGetRequest) SetMethod

func (r *JournalListGetRequest) SetMethod(method string)

func (*JournalListGetRequest) SetRequestBody

func (r *JournalListGetRequest) SetRequestBody(body JournalListGetRequestBody)

func (*JournalListGetRequest) URL

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

type JournalListGetRequestBody

type JournalListGetRequestBody struct {
}

type JournalListGetResponseBody

type JournalListGetResponseBody struct {
	Links      CollectionLinks `json:"links"`
	Collection Journals        `json:"collection"`
}

type Journals

type Journals []Journal

type LedgerAccount

type LedgerAccount struct {
	Aggregation    Aggregation `json:"aggregation"`
	BudgetDivision struct {
		ID          int    `json:"id"`
		Description string `json:"description"`
	} `json:"budget_division"`
	YearBudget float64 `json:"year_budget"`
	VAT        VAT     `json:"vat"`
	CostType   struct {
		ID          int    `json:"id"`
		Description string `json:"description"`
		Type        string `json:"type"`
	} `json:"cost_type"`
	Blocked struct {
		Active bool   `json:"active"`
		Reason string `json:"reason"`
	} `json:"blocked"`
	IsBalance          bool `json:"isBalance"`
	QuantityApplicable bool `json:"quantity_applicable"`
	// Whether the ledgeraccount needs to be compressed, also known as "verdichten".
	AggregateTransactions bool                  `json:"aggregate_transactions"`
	AllowFreeVATInput     bool                  `json:"allow_free_vat_input"`
	DebitCreditSuggestion DebitCreditSuggestion `json:"debit_credit_suggestion"`
	Memo                  struct {
		Active bool   `json:"active"`
		Text   string `json:"text"`
	} `json:"memo"`
	ID      int `json:"id"`
	Balance struct {
		ID          int    `json:"id"`
		Description string `json:"description"`
		IsGroup     bool   `json:"is_group"`
		Type        string `json:"type"`
		IsBalance   bool   `json:"isBalance"`
	} `json:"balance"`
	Description string `json:"description"`
	RGS         []struct {
		ReferenceCode    string `json:"reference_code"`
		Order            string `json:"order"`
		ReferenceNumber  string `json:"reference_number"`
		Description      string `json:"description"`
		DescriptionShort string `json:"description_short"`
		DebitCredit      string `json:"debit_credit"`
		Level            int    `json:"level"`
		Filters          struct {
			ZZP   bool `json:"ZZP"`
			AFREK bool `json:"AFREK"`
		} `json:"filters"`
	} `json:"rgs"`
}

type LedgerAccountListGetPathParams

type LedgerAccountListGetPathParams struct {
	AdministrationID string
}

func (*LedgerAccountListGetPathParams) Params

type LedgerAccountListGetQueryParams

type LedgerAccountListGetQueryParams struct {
	CurrentPage int    `schema:"currentpage,omitempty"`
	Status      string `schema:"status,omitempty"`
}

func (LedgerAccountListGetQueryParams) ToURLValues

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

type LedgerAccountListGetRequest

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

func (*LedgerAccountListGetRequest) Do

func (*LedgerAccountListGetRequest) Method

func (r *LedgerAccountListGetRequest) Method() string

func (*LedgerAccountListGetRequest) NewResponseBody

func (*LedgerAccountListGetRequest) PathParams

func (*LedgerAccountListGetRequest) QueryParams

func (*LedgerAccountListGetRequest) RequestBody

func (*LedgerAccountListGetRequest) SetMethod

func (r *LedgerAccountListGetRequest) SetMethod(method string)

func (*LedgerAccountListGetRequest) SetRequestBody

func (*LedgerAccountListGetRequest) URL

type LedgerAccountListGetRequestBody

type LedgerAccountListGetRequestBody struct {
}

type LedgerAccountListGetResponseBody

type LedgerAccountListGetResponseBody struct {
	Links      CollectionLinks `json:"links"`
	Collection LedgerAccounts  `json:"collection"`
}

type LedgerAccounts

type LedgerAccounts []LedgerAccount

type Message

type Message struct {
	MessageCode string `json:"message_code"`
	MessageType string `json:"message_type"`
	Message     string `json:"message"`
}

type Messages

type Messages []Message

func (Messages) Error

func (msgs Messages) Error() string

type Metadata

type Metadata struct {
	Last        int `json:"last"`
	Results     Int `json:"results"`
	Currentpage Int `json:"currentpage"`
}

type NumberOfPeriods

type NumberOfPeriods int

Enum: [ 1, 4, 12, 13 ]

type Oauth2Config

type Oauth2Config struct {
	oauth2.Config
}

func NewOauth2Config

func NewOauth2Config() *Oauth2Config

func (*Oauth2Config) SetBaseURL

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

type PathParams

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

type PaymentTerm

type PaymentTerm struct {
	ID          int      `json:"id,omitempty"`
	Description string   `json:"description,omitempty"`
	Search      []Search `json:"search,omitempty"`
	Days        int      `json:"days,omitempty"`
	Mandate     string   `json:"mandate,omitempty"`
	Start       string   `json:"start,omitempty"`
	Terms       Terms    `json:"terms,omitempty"`
}

func (PaymentTerm) IsEmpty

func (t PaymentTerm) IsEmpty() bool

func (PaymentTerm) MarshalJSON

func (t PaymentTerm) MarshalJSON() ([]byte, error)

type RequestCompletionCallback

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

RequestCompletionCallback defines the type of the request callback function

type SchemaMarshaler

type SchemaMarshaler interface {
	MarshalSchema() string
}
type Search struct {
	ID    string `json:"id"`
	Value string `json:"value"`
}

type Terms

type Terms struct {
	Type       string `json:"type,omitempty"`
	Days       int    `json:"days,omitempty"`
	Percentage int    `json:"percentage,omitempty"`
}

type ToURLValues

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

type TransactionLineBatchGet

type TransactionLineBatchGet []TransactionLineGet

type TransactionLineBatchPut

type TransactionLineBatchPut []TransactionLinePut

type TransactionLineBatchPutPathParams

type TransactionLineBatchPutPathParams struct {
	AdministrationID string
	BatchID          uuid.UUID
}

func (*TransactionLineBatchPutPathParams) Params

type TransactionLineBatchPutQueryParams

type TransactionLineBatchPutQueryParams struct {
	CurrentPage int    `schema:"currentpage,omitempty"`
	Status      string `schema:"status,omitempty"`
}

func (TransactionLineBatchPutQueryParams) ToURLValues

type TransactionLineBatchPutRequest

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

func (*TransactionLineBatchPutRequest) Do

func (*TransactionLineBatchPutRequest) Headers

func (*TransactionLineBatchPutRequest) Method

func (*TransactionLineBatchPutRequest) NewResponseBody

func (*TransactionLineBatchPutRequest) PathParams

func (*TransactionLineBatchPutRequest) QueryParams

func (*TransactionLineBatchPutRequest) RequestBody

func (*TransactionLineBatchPutRequest) SetMethod

func (r *TransactionLineBatchPutRequest) SetMethod(method string)

func (*TransactionLineBatchPutRequest) SetRequestBody

func (*TransactionLineBatchPutRequest) URL

type TransactionLineBatchPutRequestBody

type TransactionLineBatchPutRequestBody struct {
	TransactionLineBatchPut
}

func (TransactionLineBatchPutRequestBody) MarshalJSON

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

type TransactionLineBatchPutResponseBody

type TransactionLineBatchPutResponseBody struct {
}

type TransactionLineGet

type TransactionLineGet struct {
	Account struct {
		ID          string `json:"id"`
		Scheme      string `json:"scheme"`
		Type        string `json:"type"`
		Description string `json:"description"`
	} `json:"account"`
	BatchID    string     `json:"batch_id"`
	CostCenter CostCenter `json:"cost_center"`
	CostType   struct {
		ID          int    `json:"id"`
		Description string `json:"description"`
	} `json:"cost_type"`
	Credit   float64 `json:"credit"`
	Currency struct {
		ID           string `json:"id"`
		ExchangeRate int    `json:"exchange_rate"`
		Description  string `json:"description"`
	} `json:"currency"`
	Debit         float64 `json:"debit"`
	DocumentDate  Date    `json:"document_date"`
	DueDate       *Date   `json:"due_date,omitempty"`
	EntryNumber   int     `json:"entry_number"`
	ID            string  `json:"id"`
	InvoiceNumber int     `json:"invoice_number"`
	Journal       struct {
		ID          string `json:"id"`
		Description string `json:"description"`
		Type        string `json:"type"`
		LineNumber  int    `json:"line_number"`
		PageNumber  int    `json:"page_number"`
	} `json:"journal"`
	Messages []struct {
		MessageCode      string `json:"message_code"`
		MessageType      string `json:"message_type"`
		Message          string `json:"message"`
		Field            string `json:"field"`
		TenantID         int    `json:"tenant_id"`
		AdministrationID int    `json:"administration_id"`
	} `json:"messages"`
	PaymentTerm PaymentTerm `json:"payment_term"`
	Period      struct {
		ID          int    `json:"id"`
		FiscalYear  int    `json:"fiscal_year"`
		Description string `json:"description"`
	} `json:"period"`
	Description string    `json:"description"`
	VAT         VAT       `json:"vat"`
	DocumentID  uuid.UUID `json:"document_id"`
}

type TransactionLinePut

type TransactionLinePut struct {
	Account struct {
		ID string `json:"id"`
	} `json:"account"`
	CostCenter    CostCenter `json:"cost_center,omitempty"`
	Credit        float64    `json:"credit"`
	Debit         float64    `json:"debit"`
	DocumentDate  *Date      `json:"document_date,omitempty"`
	DueDate       *Date      `json:"due_date,omitempty"`
	EntryNumber   int        `json:"entry_number,omitempty"`
	InvoiceNumber int        `json:"invoice_number,omitempty"`
	Journal       struct {
		ID string `json:"id"`
	} `json:"journal"`
	PaymentTerm PaymentTerm `json:"payment_term,omitempty"`
	Period      struct {
		ID         int `json:"id,omitempty"`
		FiscalYear int `json:"fiscal_year,omitempty"`
	} `json:"period"`
	Description string `json:"description"`
	VAT         struct {
		ID     int     `json:"id,omitempty"`
		Amount float64 `json:"amount,omitempty"`
	} `json:"vat"`
}

func (TransactionLinePut) IsEmpty

func (l TransactionLinePut) IsEmpty() bool

func (TransactionLinePut) MarshalJSON

func (l TransactionLinePut) MarshalJSON() ([]byte, error)

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 VAT

type VAT struct {
	ID          int     `json:"id"`
	Type        VATType `json:"type"`
	Percentage  int     `json:"percentage"`
	AccountID   string  `json:"account_id"`
	Description string  `json:"description"`
	Amount      int     `json:"amount"`
}

type VATType

type VATType string

[

Af te dragen (1a, 1b),
Te vorderen (5b),
Verlegd binnenland - levering (1e),
Verlegd binnenland - verwerving (2a),
Verlegd buiten EU - levering (3a),
Verlegd binnen EU - levering (3b),
Verlegd buiten EU - verwerving (4a),
Verlegd binnen EU - verwerving (4b),
Afstandsverkopen binnen de EU (3c),
Diensten binnen de EU (ICP)

]

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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