central

package module
v0.0.0-...-6568ee8 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	BaseURL = url.URL{
		Scheme: "https",
		Host:   "api.businesscentral.dynamics.com",
		Path:   "",
	}
)

Functions

func CheckContentType

func CheckContentType(r *http.Response) error

CheckContentType 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 {
	OdataEtag            string    `json:"@odata.etag"`
	ID                   string    `json:"id"`
	Number               string    `json:"number"`
	DisplayName          string    `json:"displayName"`
	Category             string    `json:"category"`
	SubCategory          string    `json:"subCategory"`
	Blocked              bool      `json:"blocked"`
	AccountType          string    `json:"accountType"`
	DirectPosting        bool      `json:"directPosting"`
	NetChange            float64   `json:"netChange"`
	LastModifiedDateTime time.Time `json:"lastModifiedDateTime"`
}

type Accounts

type Accounts []Account

type AccountsGet

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

func (*AccountsGet) Do

func (*AccountsGet) Headers

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

func (*AccountsGet) Method

func (r *AccountsGet) Method() string

func (AccountsGet) NewPathParams

func (r AccountsGet) NewPathParams() *AccountsGetPathParams

func (AccountsGet) NewQueryParams

func (r AccountsGet) NewQueryParams() *AccountsGetQueryParams

func (AccountsGet) NewRequestBody

func (r AccountsGet) NewRequestBody() AccountsGetBody

func (*AccountsGet) NewResponseBody

func (r *AccountsGet) NewResponseBody() *AccountsGetResponseBody

func (*AccountsGet) PathParams

func (r *AccountsGet) PathParams() *AccountsGetPathParams

func (*AccountsGet) PathParamsInterface

func (r *AccountsGet) PathParamsInterface() PathParams

func (*AccountsGet) QueryParams

func (r *AccountsGet) QueryParams() *AccountsGetQueryParams

func (*AccountsGet) RequestBody

func (r *AccountsGet) RequestBody() *AccountsGetBody

func (*AccountsGet) RequestBodyInterface

func (r *AccountsGet) RequestBodyInterface() interface{}

func (*AccountsGet) SetMethod

func (r *AccountsGet) SetMethod(method string)

func (*AccountsGet) SetRequestBody

func (r *AccountsGet) SetRequestBody(body AccountsGetBody)

func (*AccountsGet) URL

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

type AccountsGetBody

type AccountsGetBody struct {
}

type AccountsGetPathParams

type AccountsGetPathParams struct {
	EnvironmentName string `schema:"environmentName"`
	CompanyID       string `schema:"companyID"`
}

func (*AccountsGetPathParams) Params

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

type AccountsGetQueryParams

type AccountsGetQueryParams struct {
	// @TODO: check if this an OData struct or something
	Select *odata.Select `schema:"$select,omitempty"`
	Filter *odata.Filter `schema:"$filter,omitempty"`
	Top    *odata.Top    `schema:"$top,omitempty"`
	Skip   *odata.Skip   `schema:"$skip,omitempty"`
}

func (AccountsGetQueryParams) ToURLValues

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

type AccountsGetResponseBody

type AccountsGetResponseBody struct {
	OdataContext string   `json:"@odata.context"`
	Value        Accounts `json:"value"`
}

type BatchPost

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

func (*BatchPost) Do

func (*BatchPost) FromRequest

func (r *BatchPost) FromRequest(req Request) (BatchPostBodyRequest, error)

func (*BatchPost) Headers

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

func (*BatchPost) Method

func (r *BatchPost) Method() string

func (BatchPost) NewPathParams

func (r BatchPost) NewPathParams() *BatchPostPathParams

func (BatchPost) NewQueryParams

func (r BatchPost) NewQueryParams() *BatchPostQueryParams

func (BatchPost) NewRequestBody

func (r BatchPost) NewRequestBody() BatchPostBody

func (*BatchPost) NewResponseBody

func (r *BatchPost) NewResponseBody() *BatchPostResponseBody

func (*BatchPost) PathParams

func (r *BatchPost) PathParams() *BatchPostPathParams

func (*BatchPost) PathParamsInterface

func (r *BatchPost) PathParamsInterface() PathParams

func (*BatchPost) QueryParams

func (r *BatchPost) QueryParams() QueryParams

func (*BatchPost) RequestBody

func (r *BatchPost) RequestBody() *BatchPostBody

func (*BatchPost) RequestBodyInterface

func (r *BatchPost) RequestBodyInterface() interface{}

func (*BatchPost) SetMethod

func (r *BatchPost) SetMethod(method string)

func (*BatchPost) SetRequestBody

func (r *BatchPost) SetRequestBody(body BatchPostBody)

func (*BatchPost) URL

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

type BatchPostBody

type BatchPostBody struct {
	Requests []BatchPostBodyRequest `json:"requests"`
}

type BatchPostBodyRequest

type BatchPostBodyRequest struct {
	Method  string            `json:"method"`
	URL     string            `json:"url"`
	Headers map[string]string `json:"headers"`
	Body    json.RawMessage   `json:"body,omitempty"`
}

func NewBatchPostBodyRequest

func NewBatchPostBodyRequest() BatchPostBodyRequest

type BatchPostBodyResponse

type BatchPostBodyResponse struct {
	ID      interface{}       `json:"id"`
	Status  int               `json:"status"`
	Headers map[string]string `json:"headers,omitempty"`
	Body    json.RawMessage   `json:"body"`
}

func (BatchPostBodyResponse) ToHTTPResponse

func (r BatchPostBodyResponse) ToHTTPResponse() (*http.Response, error)

type BatchPostPathParams

type BatchPostPathParams struct {
	EnvironmentName string `schema:"environmentName"`
	CompanyID       string `schema:"companyID"`
	JournalID       string `schema:"journalID"`
}

func (*BatchPostPathParams) Params

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

type BatchPostQueryParams

type BatchPostQueryParams struct {
}

func (BatchPostQueryParams) ToURLValues

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

type BatchPostResponseBody

type BatchPostResponseBody struct {
	Responses []BatchPostBodyResponse `json:"responses"`
}

type BeforeRequestDoCallback

type BeforeRequestDoCallback func(*http.Client, *http.Request, interface{})

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

func (c Client) BaseURL() url.URL

func (Client) Charset

func (c Client) Charset() string

func (*Client) CheckResponse

func (c *Client) CheckResponse(resp *http.Response) error

func (Client) Debug

func (c Client) Debug() bool

func (*Client) Do

func (c *Client) Do(req *http.Request, body 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(p string, pathParams PathParams) url.URL

func (Client) MediaType

func (c Client) MediaType() string

func (*Client) NewAccountsGet

func (c *Client) NewAccountsGet() AccountsGet

func (*Client) NewBatchPost

func (c *Client) NewBatchPost() BatchPost

func (*Client) NewCompaniesGet

func (c *Client) NewCompaniesGet() CompaniesGet

func (*Client) NewCustomersGet

func (c *Client) NewCustomersGet() CustomersGet

func (*Client) NewDimensionSetLinesGet

func (c *Client) NewDimensionSetLinesGet() DimensionSetLinesGet

func (*Client) NewDimensionSetLinesPost

func (c *Client) NewDimensionSetLinesPost() DimensionSetLinesPost

func (*Client) NewDimensionValuesGet

func (c *Client) NewDimensionValuesGet() DimensionValuesGet

func (*Client) NewDimensionsGet

func (c *Client) NewDimensionsGet() DimensionsGet

func (*Client) NewEnvironmentsGet

func (c *Client) NewEnvironmentsGet() EnvironmentsGet

func (*Client) NewJournalLinesGet

func (c *Client) NewJournalLinesGet() JournalLinesGet

func (*Client) NewJournalLinesPost

func (c *Client) NewJournalLinesPost() JournalLinesPost

func (*Client) NewJournalsGet

func (c *Client) NewJournalsGet() JournalsGet

func (*Client) NewRequest

func (c *Client) NewRequest(ctx context.Context, req Request) (*http.Request, error)

func (*Client) NewTaxAreasGet

func (c *Client) NewTaxAreasGet() TaxAreasGet

func (*Client) NewTaxGroupsGet

func (c *Client) NewTaxGroupsGet() TaxGroupsGet

func (*Client) SetBaseURL

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

func (*Client) SetBeforeRequestDo

func (c *Client) SetBeforeRequestDo(fun BeforeRequestDoCallback)

func (*Client) SetCharset

func (c *Client) SetCharset(charset string)

func (*Client) SetDebug

func (c *Client) SetDebug(debug bool)

func (*Client) SetDisallowUnknownFields

func (c *Client) SetDisallowUnknownFields(disallowUnknownFields bool)

func (*Client) SetHTTPClient

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

func (*Client) SetMediaType

func (c *Client) SetMediaType(mediaType string)

func (*Client) SetUserAgent

func (c *Client) SetUserAgent(userAgent string)

func (*Client) Unmarshal

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

func (Client) UserAgent

func (c Client) UserAgent() string

type Companies

type Companies []Company

type CompaniesGet

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

func (*CompaniesGet) Do

func (*CompaniesGet) Headers

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

func (*CompaniesGet) Method

func (r *CompaniesGet) Method() string

func (CompaniesGet) NewPathParams

func (r CompaniesGet) NewPathParams() *CompaniesGetPathParams

func (CompaniesGet) NewQueryParams

func (r CompaniesGet) NewQueryParams() *CompaniesGetQueryParams

func (CompaniesGet) NewRequestBody

func (r CompaniesGet) NewRequestBody() CompaniesGetBody

func (*CompaniesGet) NewResponseBody

func (r *CompaniesGet) NewResponseBody() *CompaniesGetResponseBody

func (*CompaniesGet) PathParams

func (r *CompaniesGet) PathParams() *CompaniesGetPathParams

func (*CompaniesGet) PathParamsInterface

func (r *CompaniesGet) PathParamsInterface() PathParams

func (*CompaniesGet) QueryParams

func (r *CompaniesGet) QueryParams() QueryParams

func (*CompaniesGet) RequestBody

func (r *CompaniesGet) RequestBody() *CompaniesGetBody

func (*CompaniesGet) RequestBodyInterface

func (r *CompaniesGet) RequestBodyInterface() interface{}

func (*CompaniesGet) SetMethod

func (r *CompaniesGet) SetMethod(method string)

func (*CompaniesGet) SetRequestBody

func (r *CompaniesGet) SetRequestBody(body CompaniesGetBody)

func (*CompaniesGet) URL

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

type CompaniesGetBody

type CompaniesGetBody struct {
}

type CompaniesGetPathParams

type CompaniesGetPathParams struct {
	EnvironmentName string `schema:"environmentName"`
}

func (*CompaniesGetPathParams) Params

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

type CompaniesGetQueryParams

type CompaniesGetQueryParams struct {
}

func (CompaniesGetQueryParams) ToURLValues

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

type CompaniesGetResponseBody

type CompaniesGetResponseBody struct {
	OdataContext string    `json:"@odata.context"`
	Value        Companies `json:"value"`
}

type Company

type Company struct {
	ID                string    `json:"id"`
	SystemVersion     string    `json:"systemVersion"`
	Timestamp         int       `json:"timestamp"`
	Name              string    `json:"name"`
	DisplayName       string    `json:"displayName"`
	BusinessProfileID string    `json:"businessProfileId"`
	SystemCreatedAt   time.Time `json:"systemCreatedAt"`
	SystemCreatedBy   string    `json:"systemCreatedBy"`
	SystemModifiedAt  time.Time `json:"systemModifiedAt"`
	SystemModifiedBy  string    `json:"systemModifiedBy"`
}

func (Company) IsEmpty

func (c Company) IsEmpty() bool

func (Company) MarshalJSON

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

type CustomersGet

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

func (*CustomersGet) Do

func (*CustomersGet) Headers

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

func (*CustomersGet) Method

func (r *CustomersGet) Method() string

func (CustomersGet) NewPathParams

func (r CustomersGet) NewPathParams() *CustomersGetPathParams

func (CustomersGet) NewQueryParams

func (r CustomersGet) NewQueryParams() *CustomersGetQueryParams

func (CustomersGet) NewRequestBody

func (r CustomersGet) NewRequestBody() CustomersGetBody

func (*CustomersGet) NewResponseBody

func (r *CustomersGet) NewResponseBody() *CustomersGetResponseBody

func (*CustomersGet) PathParams

func (r *CustomersGet) PathParams() *CustomersGetPathParams

func (*CustomersGet) PathParamsInterface

func (r *CustomersGet) PathParamsInterface() PathParams

func (*CustomersGet) QueryParams

func (r *CustomersGet) QueryParams() QueryParams

func (*CustomersGet) RequestBody

func (r *CustomersGet) RequestBody() *CustomersGetBody

func (*CustomersGet) RequestBodyInterface

func (r *CustomersGet) RequestBodyInterface() interface{}

func (*CustomersGet) SetMethod

func (r *CustomersGet) SetMethod(method string)

func (*CustomersGet) SetRequestBody

func (r *CustomersGet) SetRequestBody(body CustomersGetBody)

func (*CustomersGet) URL

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

type CustomersGetBody

type CustomersGetBody struct {
}

type CustomersGetPathParams

type CustomersGetPathParams struct {
	EnvironmentName string `schema:"environmentName"`
	CompanyID       string `schema:"companyID"`
}

func (*CustomersGetPathParams) Params

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

type CustomersGetQueryParams

type CustomersGetQueryParams struct {
}

func (CustomersGetQueryParams) ToURLValues

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

type CustomersGetResponseBody

type CustomersGetResponseBody struct {
	OdataContext string `json:"@odata.context"`
	Value        []struct {
		OdataEtag             string    `json:"@odata.etag"`
		ID                    string    `json:"id"`
		Number                string    `json:"number"`
		DisplayName           string    `json:"displayName"`
		Type                  string    `json:"type"`
		AddressLine1          string    `json:"addressLine1"`
		AddressLine2          string    `json:"addressLine2"`
		City                  string    `json:"city"`
		State                 string    `json:"state"`
		Country               string    `json:"country"`
		PostalCode            string    `json:"postalCode"`
		PhoneNumber           string    `json:"phoneNumber"`
		Email                 string    `json:"email"`
		Website               string    `json:"website"`
		SalespersonCode       string    `json:"salespersonCode"`
		BalanceDue            int       `json:"balanceDue"`
		CreditLimit           int       `json:"creditLimit"`
		TaxLiable             bool      `json:"taxLiable"`
		TaxAreaID             string    `json:"taxAreaId"`
		TaxAreaDisplayName    string    `json:"taxAreaDisplayName"`
		TaxRegistrationNumber string    `json:"taxRegistrationNumber"`
		CurrencyID            string    `json:"currencyId"`
		CurrencyCode          string    `json:"currencyCode"`
		PaymentTermsID        string    `json:"paymentTermsId"`
		ShipmentMethodID      string    `json:"shipmentMethodId"`
		PaymentMethodID       string    `json:"paymentMethodId"`
		Blocked               string    `json:"blocked"`
		LastModifiedDateTime  time.Time `json:"lastModifiedDateTime"`
	} `json:"value"`
}

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

func (d Date) MarshalSchema() 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) MarshalSchema

func (d DateTime) MarshalSchema() string

type Dimension

type Dimension struct {
	OdataEtag            string    `json:"@odata.etag"`
	ID                   string    `json:"id"`
	Code                 string    `json:"code"`
	DisplayName          string    `json:"displayName"`
	LastModifiedDateTime time.Time `json:"lastModifiedDateTime"`
}

func (Dimension) IsEmpty

func (d Dimension) IsEmpty() bool

func (Dimension) MarshalJSON

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

type DimensionSetLine

type DimensionSetLine struct {
	OdataEtag        string `json:"@odata.etag,omitempty"`
	ID               string `json:"id,omitempty"`
	Code             string `json:"code"`
	ParentID         string `json:"parentId"`
	ParentType       string `json:"parentType,omitempty"`
	DisplayName      string `json:"displayName,omitempty"`
	ValueID          string `json:"valueId,omitempty"`
	ValueCode        string `json:"valueCode,omitempty"`
	ValueDisplayName string `json:"valueDisplayName,omitempty"`
}

type DimensionSetLines

type DimensionSetLines []DimensionSetLine

type DimensionSetLinesGet

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

func (*DimensionSetLinesGet) Do

func (*DimensionSetLinesGet) Headers

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

func (*DimensionSetLinesGet) Method

func (r *DimensionSetLinesGet) Method() string

func (DimensionSetLinesGet) NewPathParams

func (DimensionSetLinesGet) NewQueryParams

func (DimensionSetLinesGet) NewRequestBody

func (*DimensionSetLinesGet) NewResponseBody

func (*DimensionSetLinesGet) PathParams

func (*DimensionSetLinesGet) PathParamsInterface

func (r *DimensionSetLinesGet) PathParamsInterface() PathParams

func (*DimensionSetLinesGet) QueryParams

func (r *DimensionSetLinesGet) QueryParams() QueryParams

func (*DimensionSetLinesGet) RequestBody

func (*DimensionSetLinesGet) RequestBodyInterface

func (r *DimensionSetLinesGet) RequestBodyInterface() interface{}

func (*DimensionSetLinesGet) SetMethod

func (r *DimensionSetLinesGet) SetMethod(method string)

func (*DimensionSetLinesGet) SetRequestBody

func (r *DimensionSetLinesGet) SetRequestBody(body DimensionSetLinesGetBody)

func (*DimensionSetLinesGet) URL

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

type DimensionSetLinesGetBody

type DimensionSetLinesGetBody struct {
}

type DimensionSetLinesGetPathParams

type DimensionSetLinesGetPathParams struct {
	EnvironmentName string `schema:"environmentName"`
	CompanyID       string `schema:"companyID"`
	Object          string `schema:"object"`
	ObjectID        string `schema:"objectID"`
}

func (*DimensionSetLinesGetPathParams) Params

type DimensionSetLinesGetQueryParams

type DimensionSetLinesGetQueryParams struct {
}

func (DimensionSetLinesGetQueryParams) ToURLValues

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

type DimensionSetLinesGetResponseBody

type DimensionSetLinesGetResponseBody struct {
	OdataContext string `json:"@odata.context"`
	Value        []struct {
		OdataEtag        string `json:"@odata.etag"`
		ID               string `json:"id"`
		Code             string `json:"code"`
		ParentID         string `json:"parentId"`
		ParentType       string `json:"parentType"`
		DisplayName      string `json:"displayName"`
		ValueID          string `json:"valueId"`
		ValueCode        string `json:"valueCode"`
		ValueDisplayName string `json:"valueDisplayName"`
	} `json:"value"`
}

type DimensionSetLinesPost

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

func (*DimensionSetLinesPost) Do

func (*DimensionSetLinesPost) Headers

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

func (*DimensionSetLinesPost) Method

func (r *DimensionSetLinesPost) Method() string

func (DimensionSetLinesPost) NewPathParams

func (DimensionSetLinesPost) NewQueryParams

func (DimensionSetLinesPost) NewRequestBody

func (*DimensionSetLinesPost) NewResponseBody

func (*DimensionSetLinesPost) PathParams

func (*DimensionSetLinesPost) PathParamsInterface

func (r *DimensionSetLinesPost) PathParamsInterface() PathParams

func (*DimensionSetLinesPost) QueryParams

func (r *DimensionSetLinesPost) QueryParams() QueryParams

func (*DimensionSetLinesPost) RequestBody

func (*DimensionSetLinesPost) RequestBodyInterface

func (r *DimensionSetLinesPost) RequestBodyInterface() interface{}

func (*DimensionSetLinesPost) SetMethod

func (r *DimensionSetLinesPost) SetMethod(method string)

func (*DimensionSetLinesPost) SetRequestBody

func (r *DimensionSetLinesPost) SetRequestBody(body DimensionSetLinesPostBody)

func (*DimensionSetLinesPost) URL

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

type DimensionSetLinesPostBody

type DimensionSetLinesPostBody struct {
	DimensionSetLine
}

type DimensionSetLinesPostPathParams

type DimensionSetLinesPostPathParams struct {
	EnvironmentName string `schema:"environmentName"`
	CompanyID       string `schema:"companyID"`
	Object          string `schema:"object"`
	ObjectID        string `schema:"objectID"`
}

func (*DimensionSetLinesPostPathParams) Params

type DimensionSetLinesPostQueryParams

type DimensionSetLinesPostQueryParams struct {
}

func (DimensionSetLinesPostQueryParams) ToURLValues

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

type DimensionSetLinesPostResponseBody

type DimensionSetLinesPostResponseBody struct {
	OdataContext string            `json:"@odata.context"`
	Value        DimensionSetLines `json:"value"`
}

type DimensionValue

type DimensionValue struct {
	OdataEtag            string    `json:"@odata.etag"`
	ID                   string    `json:"id"`
	Code                 string    `json:"code"`
	DimensionID          string    `json:"dimensionId"`
	DisplayName          string    `json:"displayName"`
	LastModifiedDateTime time.Time `json:"lastModifiedDateTime"`
}

type DimensionValues

type DimensionValues []DimensionValue

type DimensionValuesGet

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

func (*DimensionValuesGet) Do

func (*DimensionValuesGet) Headers

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

func (*DimensionValuesGet) Method

func (r *DimensionValuesGet) Method() string

func (DimensionValuesGet) NewPathParams

func (DimensionValuesGet) NewQueryParams

func (DimensionValuesGet) NewRequestBody

func (r DimensionValuesGet) NewRequestBody() DimensionValuesGetBody

func (*DimensionValuesGet) NewResponseBody

func (r *DimensionValuesGet) NewResponseBody() *DimensionValuesGetResponseBody

func (*DimensionValuesGet) PathParams

func (*DimensionValuesGet) PathParamsInterface

func (r *DimensionValuesGet) PathParamsInterface() PathParams

func (*DimensionValuesGet) QueryParams

func (*DimensionValuesGet) RequestBody

func (r *DimensionValuesGet) RequestBody() *DimensionValuesGetBody

func (*DimensionValuesGet) RequestBodyInterface

func (r *DimensionValuesGet) RequestBodyInterface() interface{}

func (*DimensionValuesGet) SetMethod

func (r *DimensionValuesGet) SetMethod(method string)

func (*DimensionValuesGet) SetRequestBody

func (r *DimensionValuesGet) SetRequestBody(body DimensionValuesGetBody)

func (*DimensionValuesGet) URL

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

type DimensionValuesGetBody

type DimensionValuesGetBody struct {
}

type DimensionValuesGetPathParams

type DimensionValuesGetPathParams struct {
	EnvironmentName string `schema:"environmentName"`
	CompanyID       string `schema:"companyID"`
	DimensionID     string `schema:"dimensionID"`
}

func (*DimensionValuesGetPathParams) Params

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

type DimensionValuesGetQueryParams

type DimensionValuesGetQueryParams struct {
	// @TODO: check if this an OData struct or something
	Select *odata.Select `schema:"$select,omitempty"`
	Filter *odata.Filter `schema:"$filter,omitempty"`
	Top    *odata.Top    `schema:"$top,omitempty"`
	Skip   *odata.Skip   `schema:"$skip,omitempty"`
}

func (DimensionValuesGetQueryParams) ToURLValues

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

type DimensionValuesGetResponseBody

type DimensionValuesGetResponseBody struct {
	OdataContext string          `json:"@odata.context"`
	Value        DimensionValues `json:"value"`
}

type Dimensions

type Dimensions []Dimension

type DimensionsGet

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

func (*DimensionsGet) Do

func (*DimensionsGet) Headers

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

func (*DimensionsGet) Method

func (r *DimensionsGet) Method() string

func (DimensionsGet) NewPathParams

func (r DimensionsGet) NewPathParams() *DimensionsGetPathParams

func (DimensionsGet) NewQueryParams

func (r DimensionsGet) NewQueryParams() *DimensionsGetQueryParams

func (DimensionsGet) NewRequestBody

func (r DimensionsGet) NewRequestBody() DimensionsGetBody

func (*DimensionsGet) NewResponseBody

func (r *DimensionsGet) NewResponseBody() *DimensionsGetResponseBody

func (*DimensionsGet) PathParams

func (r *DimensionsGet) PathParams() *DimensionsGetPathParams

func (*DimensionsGet) PathParamsInterface

func (r *DimensionsGet) PathParamsInterface() PathParams

func (*DimensionsGet) QueryParams

func (r *DimensionsGet) QueryParams() *DimensionsGetQueryParams

func (*DimensionsGet) RequestBody

func (r *DimensionsGet) RequestBody() *DimensionsGetBody

func (*DimensionsGet) RequestBodyInterface

func (r *DimensionsGet) RequestBodyInterface() interface{}

func (*DimensionsGet) SetMethod

func (r *DimensionsGet) SetMethod(method string)

func (*DimensionsGet) SetRequestBody

func (r *DimensionsGet) SetRequestBody(body DimensionsGetBody)

func (*DimensionsGet) URL

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

type DimensionsGetBody

type DimensionsGetBody struct {
}

type DimensionsGetPathParams

type DimensionsGetPathParams struct {
	EnvironmentName string `schema:"environmentName"`
	CompanyID       string `schema:"companyID"`
}

func (*DimensionsGetPathParams) Params

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

type DimensionsGetQueryParams

type DimensionsGetQueryParams struct {
	// @TODO: check if this an OData struct or something
	Select *odata.Select `schema:"$select,omitempty"`
	Filter *odata.Filter `schema:"$filter,omitempty"`
	Top    *odata.Top    `schema:"$top,omitempty"`
	Skip   *odata.Skip   `schema:"$skip,omitempty"`
}

func (DimensionsGetQueryParams) ToURLValues

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

type DimensionsGetResponseBody

type DimensionsGetResponseBody struct {
	OdataContext string     `json:"@odata.context"`
	Value        Dimensions `json:"value"`
}

type EnvironmentsGet

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

func (*EnvironmentsGet) Do

func (*EnvironmentsGet) Headers

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

func (*EnvironmentsGet) Method

func (r *EnvironmentsGet) Method() string

func (EnvironmentsGet) NewPathParams

func (r EnvironmentsGet) NewPathParams() *EnvironmentsGetPathParams

func (EnvironmentsGet) NewQueryParams

func (r EnvironmentsGet) NewQueryParams() *EnvironmentsGetQueryParams

func (EnvironmentsGet) NewRequestBody

func (r EnvironmentsGet) NewRequestBody() EnvironmentsGetBody

func (*EnvironmentsGet) NewResponseBody

func (r *EnvironmentsGet) NewResponseBody() *EnvironmentsGetResponseBody

func (*EnvironmentsGet) PathParams

func (r *EnvironmentsGet) PathParams() *EnvironmentsGetPathParams

func (*EnvironmentsGet) PathParamsInterface

func (r *EnvironmentsGet) PathParamsInterface() PathParams

func (*EnvironmentsGet) QueryParams

func (r *EnvironmentsGet) QueryParams() QueryParams

func (*EnvironmentsGet) RequestBody

func (r *EnvironmentsGet) RequestBody() *EnvironmentsGetBody

func (*EnvironmentsGet) RequestBodyInterface

func (r *EnvironmentsGet) RequestBodyInterface() interface{}

func (*EnvironmentsGet) SetMethod

func (r *EnvironmentsGet) SetMethod(method string)

func (*EnvironmentsGet) SetRequestBody

func (r *EnvironmentsGet) SetRequestBody(body EnvironmentsGetBody)

func (*EnvironmentsGet) URL

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

type EnvironmentsGetBody

type EnvironmentsGetBody struct {
}

type EnvironmentsGetPathParams

type EnvironmentsGetPathParams struct {
}

func (*EnvironmentsGetPathParams) Params

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

type EnvironmentsGetQueryParams

type EnvironmentsGetQueryParams struct {
}

func (EnvironmentsGetQueryParams) ToURLValues

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

type EnvironmentsGetResponseBody

type EnvironmentsGetResponseBody struct {
	Value []struct {
		AadTenantID       string `json:"aadTenantId"`
		ApplicationFamily string `json:"applicationFamily"`
		Type              string `json:"type"`
		Name              string `json:"name"`
		CountryCode       string `json:"countryCode"`
		WebServiceURL     string `json:"webServiceUrl"`
		WebClientLoginURL string `json:"webClientLoginUrl"`
	} `json:"value"`
}

type ErrorResponse

type ErrorResponse struct {
	// HTTP response that caused this error
	Response *http.Response

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

func (*ErrorResponse) Error

func (r *ErrorResponse) Error() string

type Journal

type Journal struct {
	OdataEtag              string    `json:"@odata.etag"`
	ID                     string    `json:"id"`
	Code                   string    `json:"code"`
	DisplayName            string    `json:"displayName"`
	TemplateDisplayName    string    `json:"templateDisplayName"`
	LastModifiedDateTime   time.Time `json:"lastModifiedDateTime"`
	BalancingAccountID     string    `json:"balancingAccountId"`
	BalancingAccountNumber string    `json:"balancingAccountNumber"`
}

type JournalLine

type JournalLine struct {
	OdataEtag              string  `json:"@odata.etag,omitempty"`
	ID                     string  `json:"id,omitempty"`
	JournalID              string  `json:"journalId,omitempty"`
	JournalDisplayName     string  `json:"journalDisplayName,omitempty"`
	LineNumber             int     `json:"lineNumber"`
	AccountType            string  `json:"accountType,omitempty"`
	AccountID              string  `json:"accountId,omitempty"`
	AccountNumber          string  `json:"accountNumber,omitempty"`
	PostingDate            string  `json:"postingDate"`
	DocumentNumber         string  `json:"documentNumber"`
	ExternalDocumentNumber string  `json:"externalDocumentNumber"`
	Amount                 float64 `json:"amount"`
	Description            string  `json:"description"`
	Comment                string  `json:"comment"`
	TaxCode                string  `json:"taxCode"`
	BalanceAccountType     string  `json:"balanceAccountType,omitempty"`
	BalancingAccountID     string  `json:"balancingAccountId,omitempty"`
	BalancingAccountNumber string  `json:"balancingAccountNumber,omitempty"`
	LastModifiedDateTime   Time    `json:"lastModifiedDateTime,omitempty"`
}

func (JournalLine) IsEmpty

func (l JournalLine) IsEmpty() bool

func (JournalLine) MarshalJSON

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

type JournalLines

type JournalLines []JournalLine

type JournalLinesGet

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

func (*JournalLinesGet) Do

func (*JournalLinesGet) Headers

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

func (*JournalLinesGet) Method

func (r *JournalLinesGet) Method() string

func (JournalLinesGet) NewPathParams

func (r JournalLinesGet) NewPathParams() *JournalLinesGetPathParams

func (JournalLinesGet) NewQueryParams

func (r JournalLinesGet) NewQueryParams() *JournalLinesGetQueryParams

func (JournalLinesGet) NewRequestBody

func (r JournalLinesGet) NewRequestBody() JournalLinesGetBody

func (*JournalLinesGet) NewResponseBody

func (r *JournalLinesGet) NewResponseBody() *JournalLinesGetResponseBody

func (*JournalLinesGet) PathParams

func (r *JournalLinesGet) PathParams() *JournalLinesGetPathParams

func (*JournalLinesGet) PathParamsInterface

func (r *JournalLinesGet) PathParamsInterface() PathParams

func (*JournalLinesGet) QueryParams

func (r *JournalLinesGet) QueryParams() QueryParams

func (*JournalLinesGet) RequestBody

func (r *JournalLinesGet) RequestBody() *JournalLinesGetBody

func (*JournalLinesGet) RequestBodyInterface

func (r *JournalLinesGet) RequestBodyInterface() interface{}

func (*JournalLinesGet) SetMethod

func (r *JournalLinesGet) SetMethod(method string)

func (*JournalLinesGet) SetRequestBody

func (r *JournalLinesGet) SetRequestBody(body JournalLinesGetBody)

func (*JournalLinesGet) URL

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

type JournalLinesGetBody

type JournalLinesGetBody struct {
}

type JournalLinesGetPathParams

type JournalLinesGetPathParams struct {
	EnvironmentName string `schema:"environmentName"`
	CompanyID       string `schema:"companyID"`
	JournalID       string `schema:"journalID"`
}

func (*JournalLinesGetPathParams) Params

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

type JournalLinesGetQueryParams

type JournalLinesGetQueryParams struct {
}

func (JournalLinesGetQueryParams) ToURLValues

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

type JournalLinesGetResponseBody

type JournalLinesGetResponseBody struct {
	OdataContext string       `json:"@odata.context"`
	Value        JournalLines `json:"value"`
}

type JournalLinesPost

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

func (*JournalLinesPost) Do

func (*JournalLinesPost) Headers

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

func (*JournalLinesPost) Method

func (r *JournalLinesPost) Method() string

func (JournalLinesPost) NewPathParams

func (r JournalLinesPost) NewPathParams() *JournalLinesPostPathParams

func (JournalLinesPost) NewQueryParams

func (r JournalLinesPost) NewQueryParams() *JournalLinesPostQueryParams

func (JournalLinesPost) NewRequestBody

func (r JournalLinesPost) NewRequestBody() JournalLinesPostBody

func (*JournalLinesPost) NewResponseBody

func (r *JournalLinesPost) NewResponseBody() *JournalLinesPostResponseBody

func (*JournalLinesPost) PathParams

func (*JournalLinesPost) PathParamsInterface

func (r *JournalLinesPost) PathParamsInterface() PathParams

func (*JournalLinesPost) QueryParams

func (r *JournalLinesPost) QueryParams() QueryParams

func (*JournalLinesPost) RequestBody

func (r *JournalLinesPost) RequestBody() *JournalLinesPostBody

func (*JournalLinesPost) RequestBodyInterface

func (r *JournalLinesPost) RequestBodyInterface() interface{}

func (*JournalLinesPost) SetMethod

func (r *JournalLinesPost) SetMethod(method string)

func (*JournalLinesPost) SetRequestBody

func (r *JournalLinesPost) SetRequestBody(body JournalLinesPostBody)

func (*JournalLinesPost) URL

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

type JournalLinesPostBody

type JournalLinesPostBody struct {
	JournalLine
}

type JournalLinesPostPathParams

type JournalLinesPostPathParams struct {
	EnvironmentName string `schema:"environmentName"`
	CompanyID       string `schema:"companyID"`
	JournalID       string `schema:"journalID"`
}

func (*JournalLinesPostPathParams) Params

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

type JournalLinesPostQueryParams

type JournalLinesPostQueryParams struct {
}

func (JournalLinesPostQueryParams) ToURLValues

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

type JournalLinesPostResponseBody

type JournalLinesPostResponseBody struct {
	OdataContext string       `json:"@odata.context"`
	Value        JournalLines `json:"value"`
}

type Journals

type Journals []Journal

type JournalsGet

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

func (*JournalsGet) Do

func (*JournalsGet) Headers

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

func (*JournalsGet) Method

func (r *JournalsGet) Method() string

func (JournalsGet) NewPathParams

func (r JournalsGet) NewPathParams() *JournalsGetPathParams

func (JournalsGet) NewQueryParams

func (r JournalsGet) NewQueryParams() *JournalsGetQueryParams

func (JournalsGet) NewRequestBody

func (r JournalsGet) NewRequestBody() JournalsGetBody

func (*JournalsGet) NewResponseBody

func (r *JournalsGet) NewResponseBody() *JournalsGetResponseBody

func (*JournalsGet) PathParams

func (r *JournalsGet) PathParams() *JournalsGetPathParams

func (*JournalsGet) PathParamsInterface

func (r *JournalsGet) PathParamsInterface() PathParams

func (*JournalsGet) QueryParams

func (r *JournalsGet) QueryParams() *JournalsGetQueryParams

func (*JournalsGet) RequestBody

func (r *JournalsGet) RequestBody() *JournalsGetBody

func (*JournalsGet) RequestBodyInterface

func (r *JournalsGet) RequestBodyInterface() interface{}

func (*JournalsGet) SetMethod

func (r *JournalsGet) SetMethod(method string)

func (*JournalsGet) SetRequestBody

func (r *JournalsGet) SetRequestBody(body JournalsGetBody)

func (*JournalsGet) URL

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

type JournalsGetBody

type JournalsGetBody struct {
}

type JournalsGetPathParams

type JournalsGetPathParams struct {
	EnvironmentName string `schema:"environmentName"`
	CompanyID       string `schema:"companyID"`
}

func (*JournalsGetPathParams) Params

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

type JournalsGetQueryParams

type JournalsGetQueryParams struct {
	// @TODO: check if this an OData struct or something
	Select *odata.Select `schema:"$select,omitempty"`
	Filter *odata.Filter `schema:"$filter,omitempty"`
	Top    *odata.Top    `schema:"$top,omitempty"`
	Skip   *odata.Skip   `schema:"$skip,omitempty"`
}

func (JournalsGetQueryParams) ToURLValues

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

type JournalsGetResponseBody

type JournalsGetResponseBody struct {
	OdataContext string   `json:"@odata.context"`
	Value        Journals `json:"value"`
}

type Oauth2Config

type Oauth2Config struct {
	oauth2.Config
	APIKey string
}

func NewOauth2Config

func NewOauth2Config() *Oauth2Config

type PathParams

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

type QueryParams

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

type Request

type Request interface {
	Method() string
	Headers() http.Header
	// QueryParams() QueryParams
	PathParamsInterface() PathParams
	RequestBodyInterface() interface{}
	URL() *url.URL
}

type RequestCompletionCallback

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

RequestCompletionCallback defines the type of the request callback function

type TaxAreasGet

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

func (*TaxAreasGet) Do

func (*TaxAreasGet) Headers

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

func (*TaxAreasGet) Method

func (r *TaxAreasGet) Method() string

func (TaxAreasGet) NewPathParams

func (r TaxAreasGet) NewPathParams() *TaxAreasGetPathParams

func (TaxAreasGet) NewQueryParams

func (r TaxAreasGet) NewQueryParams() *TaxAreasGetQueryParams

func (TaxAreasGet) NewRequestBody

func (r TaxAreasGet) NewRequestBody() TaxAreasGetBody

func (*TaxAreasGet) NewResponseBody

func (r *TaxAreasGet) NewResponseBody() *TaxAreasGetResponseBody

func (*TaxAreasGet) PathParams

func (r *TaxAreasGet) PathParams() *TaxAreasGetPathParams

func (*TaxAreasGet) PathParamsInterface

func (r *TaxAreasGet) PathParamsInterface() PathParams

func (*TaxAreasGet) QueryParams

func (r *TaxAreasGet) QueryParams() QueryParams

func (*TaxAreasGet) RequestBody

func (r *TaxAreasGet) RequestBody() *TaxAreasGetBody

func (*TaxAreasGet) RequestBodyInterface

func (r *TaxAreasGet) RequestBodyInterface() interface{}

func (*TaxAreasGet) SetMethod

func (r *TaxAreasGet) SetMethod(method string)

func (*TaxAreasGet) SetRequestBody

func (r *TaxAreasGet) SetRequestBody(body TaxAreasGetBody)

func (*TaxAreasGet) URL

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

type TaxAreasGetBody

type TaxAreasGetBody struct {
}

type TaxAreasGetPathParams

type TaxAreasGetPathParams struct {
	EnvironmentName string `schema:"environmentName"`
	CompanyID       string `schema:"companyID"`
}

func (*TaxAreasGetPathParams) Params

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

type TaxAreasGetQueryParams

type TaxAreasGetQueryParams struct {
}

func (TaxAreasGetQueryParams) ToURLValues

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

type TaxAreasGetResponseBody

type TaxAreasGetResponseBody struct {
	OdataContext string `json:"@odata.context"`
	Value        []struct {
		OdataEtag            string    `json:"@odata.etag"`
		ID                   string    `json:"id"`
		Code                 string    `json:"code"`
		DisplayName          string    `json:"displayName"`
		TaxType              string    `json:"taxType"`
		LastModifiedDateTime time.Time `json:"lastModifiedDateTime"`
	} `json:"value"`
}

type TaxGroupsGet

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

func (*TaxGroupsGet) Do

func (*TaxGroupsGet) Headers

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

func (*TaxGroupsGet) Method

func (r *TaxGroupsGet) Method() string

func (TaxGroupsGet) NewPathParams

func (r TaxGroupsGet) NewPathParams() *TaxGroupsGetPathParams

func (TaxGroupsGet) NewQueryParams

func (r TaxGroupsGet) NewQueryParams() *TaxGroupsGetQueryParams

func (TaxGroupsGet) NewRequestBody

func (r TaxGroupsGet) NewRequestBody() TaxGroupsGetBody

func (*TaxGroupsGet) NewResponseBody

func (r *TaxGroupsGet) NewResponseBody() *TaxGroupsGetResponseBody

func (*TaxGroupsGet) PathParams

func (r *TaxGroupsGet) PathParams() *TaxGroupsGetPathParams

func (*TaxGroupsGet) PathParamsInterface

func (r *TaxGroupsGet) PathParamsInterface() PathParams

func (*TaxGroupsGet) QueryParams

func (r *TaxGroupsGet) QueryParams() QueryParams

func (*TaxGroupsGet) RequestBody

func (r *TaxGroupsGet) RequestBody() *TaxGroupsGetBody

func (*TaxGroupsGet) RequestBodyInterface

func (r *TaxGroupsGet) RequestBodyInterface() interface{}

func (*TaxGroupsGet) SetMethod

func (r *TaxGroupsGet) SetMethod(method string)

func (*TaxGroupsGet) SetRequestBody

func (r *TaxGroupsGet) SetRequestBody(body TaxGroupsGetBody)

func (*TaxGroupsGet) URL

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

type TaxGroupsGetBody

type TaxGroupsGetBody struct {
}

type TaxGroupsGetPathParams

type TaxGroupsGetPathParams struct {
	EnvironmentName string `schema:"environmentName"`
	CompanyID       string `schema:"companyID"`
}

func (*TaxGroupsGetPathParams) Params

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

type TaxGroupsGetQueryParams

type TaxGroupsGetQueryParams struct {
}

func (TaxGroupsGetQueryParams) ToURLValues

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

type TaxGroupsGetResponseBody

type TaxGroupsGetResponseBody struct {
	OdataContext string `json:"@odata.context"`
	Value        []struct {
		OdataEtag            string    `json:"@odata.etag"`
		ID                   string    `json:"id"`
		Code                 string    `json:"code"`
		DisplayName          string    `json:"displayName"`
		TaxType              string    `json:"taxType"`
		LastModifiedDateTime time.Time `json:"lastModifiedDateTime"`
	} `json:"value"`
}

type Time

type Time struct {
	time.Time
}

func (Time) IsEmpty

func (t Time) IsEmpty() bool

func (Time) MarshalJSON

func (dt Time) MarshalJSON() ([]byte, error)

func (Time) MarshalSchema

func (d Time) MarshalSchema() string

func (*Time) UnmarshalJSON

func (dt *Time) UnmarshalJSON(text []byte) (err error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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