sage

package module
v0.0.0-...-947664b Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2020 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	BaseURL = url.URL{
		Scheme: "https",
		Host:   "accounting.sageone.co.za",
		Path:   "/api/2.0.0/",
	}
)

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 {
	Name     string `json:"Name"`
	Category struct {
		Comment     string `json:"Comment"`
		Order       int    `json:"Order"`
		Description string `json:"Description"`
		ID          int    `json:"ID"`
		Modified    string `json:"Modified"`
		Created     string `json:"Created"`
	} `json:"Category"`
	Active             bool    `json:"Active"`
	Balance            float64 `json:"Balance"`
	Description        string  `json:"Description"`
	ReportingGroupID   int     `json:"ReportingGroupId"`
	UnallocatedAccount bool    `json:"UnallocatedAccount"`
	IsTaxLocked        bool    `json:"IsTaxLocked"`
	Modified           string  `json:"Modified"`
	Created            string  `json:"Created"`
	AccountType        int     `json:"AccountType"`
	HasActivity        bool    `json:"HasActivity"`
	DefaultTaxTypeID   int     `json:"DefaultTaxTypeId"`
	DefaultTaxType     struct {
		ID                int     `json:"ID"`
		Name              string  `json:"Name"`
		Percentage        float64 `json:"Percentage"`
		IsDefault         bool    `json:"IsDefault"`
		HasActivity       bool    `json:"HasActivity"`
		IsManualTax       bool    `json:"IsManualTax"`
		Active            bool    `json:"Active"`
		Created           string  `json:"Created"`
		Modified          string  `json:"Modified"`
		TaxTypeDefaultUID string  `json:"TaxTypeDefaultUID"`
	} `json:"DefaultTaxType"`
	ID int `json:"ID"`
}

type Accounts

type Accounts []Account

type Client

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

Client manages communication with Exact Globe Client

func NewClient

func NewClient(httpClient *http.Client, user, password, apiKey string) *Client

NewClient returns a new Exact Globe Client client

func (Client) APIKey

func (c Client) APIKey() string

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

func (Client) MediaType

func (c Client) MediaType() string

func (*Client) NewGetAccountsRequest

func (c *Client) NewGetAccountsRequest() GetAccountsRequest

func (*Client) NewGetChartOfAccountsRequest

func (c *Client) NewGetChartOfAccountsRequest() GetChartOfAccountsRequest

func (*Client) NewGetCompaniesRequest

func (c *Client) NewGetCompaniesRequest() GetCompaniesRequest

func (*Client) NewGetCustomersRequest

func (c *Client) NewGetCustomersRequest() GetCustomersRequest

func (*Client) NewGetJournalEntriesRequest

func (c *Client) NewGetJournalEntriesRequest() GetJournalEntriesRequest

func (*Client) NewGetSalesOrdersRequest

func (c *Client) NewGetSalesOrdersRequest() GetSalesOrdersRequest

func (*Client) NewGetTaxInvoicesRequest

func (c *Client) NewGetTaxInvoicesRequest() GetTaxInvoicesRequest

func (*Client) NewGetTaxTypesRequest

func (c *Client) NewGetTaxTypesRequest() GetTaxTypesRequest

func (*Client) NewRequest

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

func (*Client) NewSaveCustomerRequest

func (c *Client) NewSaveCustomerRequest() SaveCustomerRequest

func (*Client) NewSaveJournalEntriesBatchRequest

func (c *Client) NewSaveJournalEntriesBatchRequest() SaveJournalEntriesBatchRequest

func (*Client) NewSaveSalesOrderRequest

func (c *Client) NewSaveSalesOrderRequest() SaveSalesOrderRequest

func (*Client) NewSaveTaxInvoiceRequest

func (c *Client) NewSaveTaxInvoiceRequest() SaveTaxInvoiceRequest

func (Client) Password

func (c Client) Password() string

func (*Client) SetAPIKey

func (c *Client) SetAPIKey(apiKey string)

func (*Client) SetBaseURL

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

func (*Client) SetCharset

func (c *Client) SetCharset(charset string)

func (*Client) SetDebug

func (c *Client) SetDebug(debug bool)

func (*Client) SetDisallowUnknownFields

func (c *Client) SetDisallowUnknownFields(disallowUnknownFields bool)

func (*Client) SetHTTPClient

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

func (*Client) SetMediaType

func (c *Client) SetMediaType(mediaType string)

func (*Client) SetPassword

func (c *Client) SetPassword(password string)

func (*Client) SetUser

func (c *Client) SetUser(user 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) User

func (c Client) User() string

func (Client) UserAgent

func (c Client) UserAgent() string

type Companies

type Companies []Company

type Company

type Company struct {
	ID                                         int    `json:"ID"`
	Name                                       string `json:"Name"`
	CurrencySymbol                             string `json:"CurrencySymbol"`
	CurrencyDecimalDigits                      int    `json:"CurrencyDecimalDigits"`
	NumberDecimalDigits                        int    `json:"NumberDecimalDigits"`
	DecimalSeparator                           string `json:"DecimalSeparator"`
	HoursDecimalDigits                         int    `json:"HoursDecimalDigits"`
	ItemCostPriceDecimalDigits                 int    `json:"ItemCostPriceDecimalDigits"`
	ItemSellingPriceDecimalDigits              int    `json:"ItemSellingPriceDecimalDigits"`
	PostalAddress1                             string `json:"PostalAddress1"`
	PostalAddress2                             string `json:"PostalAddress2"`
	PostalAddress3                             string `json:"PostalAddress3"`
	PostalAddress4                             string `json:"PostalAddress4"`
	PostalAddress5                             string `json:"PostalAddress5"`
	GroupSeparator                             string `json:"GroupSeparator"`
	RoundingValue                              int    `json:"RoundingValue"`
	TaxSystem                                  int    `json:"TaxSystem"`
	RoundingType                               int    `json:"RoundingType"`
	AgeMonthly                                 bool   `json:"AgeMonthly"`
	DisplayInactiveItems                       bool   `json:"DisplayInactiveItems"`
	WarnWhenItemCostIsZero                     bool   `json:"WarnWhenItemCostIsZero"`
	DoNotAllowProcessingIntoNegativeQuantities bool   `json:"DoNotAllowProcessingIntoNegativeQuantities"`
	WarnWhenItemQuantityIsZero                 bool   `json:"WarnWhenItemQuantityIsZero"`
	WarnWhenItemSellingBelowCost               bool   `json:"WarnWhenItemSellingBelowCost"`
	CountryID                                  int    `json:"CountryId"`
	CompanyEntityTypeID                        int    `json:"CompanyEntityTypeId"`
	TakeOnBalanceDate                          string `json:"TakeOnBalanceDate"`
	EnableCustomerZone                         bool   `json:"EnableCustomerZone"`
	EnableAutomaticBankFeedRefresh             bool   `json:"EnableAutomaticBankFeedRefresh"`
	ContactName                                string `json:"ContactName"`
	Telephone                                  string `json:"Telephone"`
	Fax                                        string `json:"Fax"`
	Mobile                                     string `json:"Mobile"`
	Email                                      string `json:"Email"`
	IsPrimarySendingEmail                      bool   `json:"IsPrimarySendingEmail"`
	PostalAddress01                            string `json:"PostalAddress01"`
	PostalAddress02                            string `json:"PostalAddress02"`
	PostalAddress03                            string `json:"PostalAddress03"`
	PostalAddress04                            string `json:"PostalAddress04"`
	PostalAddress05                            string `json:"PostalAddress05"`
	CompanyInfo01                              string `json:"CompanyInfo01"`
	CompanyInfo02                              string `json:"CompanyInfo02"`
	CompanyInfo03                              string `json:"CompanyInfo03"`
	CompanyInfo04                              string `json:"CompanyInfo04"`
	CompanyInfo05                              string `json:"CompanyInfo05"`
	IsOwner                                    bool   `json:"IsOwner"`
	UseCCEmail                                 bool   `json:"UseCCEmail"`
	CCEmail                                    string `json:"CCEmail"`
	DateFormatID                               int    `json:"DateFormatId"`
	CheckForDuplicateCustomerReferences        bool   `json:"CheckForDuplicateCustomerReferences"`
	CheckForDuplicateSupplierReferences        bool   `json:"CheckForDuplicateSupplierReferences"`
	DisplayName                                string `json:"DisplayName"`
	DisplayInactiveCustomers                   bool   `json:"DisplayInactiveCustomers"`
	DisplayInactiveSuppliers                   bool   `json:"DisplayInactiveSuppliers"`
	DisplayInactiveTimeProjects                bool   `json:"DisplayInactiveTimeProjects"`
	UseInclusiveProcessingByDefault            bool   `json:"UseInclusiveProcessingByDefault"`
	LockProcessing                             bool   `json:"LockProcessing"`
	LockProcessingDate                         string `json:"LockProcessingDate"`
	LockTimesheetProcessing                    bool   `json:"LockTimesheetProcessing"`
	LockTimesheetProcessingDate                string `json:"LockTimesheetProcessingDate"`
	LockedForConversion                        bool   `json:"LockedForConversion"`
	LockedForTransfer                          bool   `json:"LockedForTransfer"`
	TaxPeriodFrequency                         int    `json:"TaxPeriodFrequency"`
	PreviousTaxPeriodEndDate                   string `json:"PreviousTaxPeriodEndDate"`
	PreviousTaxReturnDate                      string `json:"PreviousTaxReturnDate"`
	UseNoreplyEmail                            bool   `json:"UseNoreplyEmail"`
	AgeingBasedOnDueDate                       bool   `json:"AgeingBasedOnDueDate"`
	UseLogoOnEmails                            bool   `json:"UseLogoOnEmails"`
	UseLogoOnCustomerZone                      bool   `json:"UseLogoOnCustomerZone"`
	City                                       string `json:"City"`
	State                                      string `json:"State"`
	Country                                    string `json:"Country"`
	HomeCurrencyID                             int    `json:"HomeCurrencyId"`
	CurrencyID                                 int    `json:"CurrencyId"`
	Created                                    string `json:"Created"`
	Modified                                   string `json:"Modified"`
	Active                                     bool   `json:"Active"`
	TaxNumber                                  string `json:"TaxNumber"`
	RegisteredName                             string `json:"RegisteredName"`
	RegistrationNumber                         string `json:"RegistrationNumber"`
	IsPracticeAccount                          bool   `json:"IsPracticeAccount"`
	LogoPositionID                             int    `json:"LogoPositionID"`
	Attachment                                 struct {
		ID        int    `json:"ID"`
		Image     string `json:"Image"`
		Timestamp string `json:"Timestamp"`
	} `json:"Attachment,omitempty"`
	CompanyTaxNumber                 string `json:"CompanyTaxNumber"`
	TaxOffice                        string `json:"TaxOffice"`
	CustomerZoneGUID                 string `json:"CustomerZoneGuid"`
	ClientTypeID                     int    `json:"ClientTypeId"`
	DisplayTotalTypeID               int    `json:"DisplayTotalTypeId"`
	DisplayInCompanyConsole          bool   `json:"DisplayInCompanyConsole"`
	LastLoginDate                    string `json:"LastLoginDate"`
	Status                           int    `json:"Status"`
	TaxReportingTypeID               int    `json:"TaxReportingTypeId"`
	SalesOrdersReserveItemQuantities bool   `json:"SalesOrdersReserveItemQuantities"`
	PrescribedGoodsTrader            bool   `json:"PrescribedGoodsTrader"`
	DisplayInactiveItemBundles       bool   `json:"DisplayInactiveItemBundles"`
	CompanyTransferStatus            int    `json:"CompanyTransferStatus"`
}

type Customer

type Customer struct {
	Name     string `json:"Name"`
	Category struct {
		Description string `json:"Description"`
		ID          int    `json:"ID"`
		Modified    string `json:"Modified"`
		Created     string `json:"Created"`
	} `json:"Category"`
	SalesRepresentativeID int `json:"SalesRepresentativeId"`
	SalesRepresentative   struct {
		ID        int    `json:"ID"`
		FirstName string `json:"FirstName"`
		LastName  string `json:"LastName"`
		Name      string `json:"Name"`
		Active    bool   `json:"Active"`
		Email     string `json:"Email"`
		Mobile    string `json:"Mobile"`
		Telephone string `json:"Telephone"`
		Created   string `json:"Created"`
		Modified  string `json:"Modified"`
	} `json:"SalesRepresentative"`
	TaxReference                string  `json:"TaxReference"`
	ContactName                 string  `json:"ContactName"`
	Telephone                   string  `json:"Telephone"`
	Fax                         string  `json:"Fax"`
	Mobile                      string  `json:"Mobile"`
	Email                       string  `json:"Email"`
	WebAddress                  string  `json:"WebAddress"`
	Active                      bool    `json:"Active"`
	IsObfuscated                bool    `json:"IsObfuscated"`
	Balance                     float64 `json:"Balance"`
	CreditLimit                 float64 `json:"CreditLimit"`
	CommunicationMethod         int     `json:"CommunicationMethod"`
	PostalAddress01             string  `json:"PostalAddress01"`
	PostalAddress02             string  `json:"PostalAddress02"`
	PostalAddress03             string  `json:"PostalAddress03"`
	PostalAddress04             string  `json:"PostalAddress04"`
	PostalAddress05             string  `json:"PostalAddress05"`
	DeliveryAddress01           string  `json:"DeliveryAddress01"`
	DeliveryAddress02           string  `json:"DeliveryAddress02"`
	DeliveryAddress03           string  `json:"DeliveryAddress03"`
	DeliveryAddress04           string  `json:"DeliveryAddress04"`
	DeliveryAddress05           string  `json:"DeliveryAddress05"`
	AutoAllocateToOldestInvoice bool    `json:"AutoAllocateToOldestInvoice"`
	EnableCustomerZone          bool    `json:"EnableCustomerZone"`
	CustomerZoneGUID            string  `json:"CustomerZoneGuid"`
	CashSale                    bool    `json:"CashSale"`
	TextField1                  string  `json:"TextField1"`
	TextField2                  string  `json:"TextField2"`
	TextField3                  string  `json:"TextField3"`
	NumericField1               float64 `json:"NumericField1"`
	NumericField2               float64 `json:"NumericField2"`
	NumericField3               float64 `json:"NumericField3"`
	YesNoField1                 bool    `json:"YesNoField1"`
	YesNoField2                 bool    `json:"YesNoField2"`
	YesNoField3                 bool    `json:"YesNoField3"`
	DateField1                  string  `json:"DateField1"`
	DateField2                  string  `json:"DateField2"`
	DateField3                  string  `json:"DateField3"`
	DefaultPriceListID          int     `json:"DefaultPriceListId"`
	DefaultPriceList            struct {
		ID          int    `json:"ID"`
		Description string `json:"Description"`
		IsDefault   bool   `json:"IsDefault"`
	} `json:"DefaultPriceList"`
	DefaultPriceListName       string  `json:"DefaultPriceListName"`
	AcceptsElectronicInvoices  bool    `json:"AcceptsElectronicInvoices"`
	Modified                   string  `json:"Modified"`
	Created                    string  `json:"Created"`
	BusinessRegistrationNumber string  `json:"BusinessRegistrationNumber"`
	TaxStatusVerified          string  `json:"TaxStatusVerified"`
	CurrencyID                 int     `json:"CurrencyId"`
	CurrencySymbol             string  `json:"CurrencySymbol"`
	HasActivity                bool    `json:"HasActivity"`
	DefaultDiscountPercentage  float64 `json:"DefaultDiscountPercentage"`
	DefaultTaxTypeID           int     `json:"DefaultTaxTypeId"`
	DefaultTaxType             struct {
		ID                int     `json:"ID"`
		Name              string  `json:"Name"`
		Percentage        float64 `json:"Percentage"`
		IsDefault         bool    `json:"IsDefault"`
		HasActivity       bool    `json:"HasActivity"`
		IsManualTax       bool    `json:"IsManualTax"`
		Active            bool    `json:"Active"`
		Created           string  `json:"Created"`
		Modified          string  `json:"Modified"`
		TaxTypeDefaultUID string  `json:"TaxTypeDefaultUID"`
	} `json:"DefaultTaxType"`
	DueDateMethodID              int  `json:"DueDateMethodId"`
	DueDateMethodValue           int  `json:"DueDateMethodValue"`
	CityID                       int  `json:"CityId"`
	HasSpecialCountryTax         bool `json:"HasSpecialCountryTax"`
	AccountingAgreement          bool `json:"AccountingAgreement"`
	HasSpecialCountryTaxActivity bool `json:"HasSpecialCountryTaxActivity"`
	ID                           int  `json:"ID"`
}

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 Effect

type Effect int
var (
	EffectDebit  Effect = 1
	EffectCredit Effect = 2
)

type Error

type Error struct {
	Message       string `json:"message"`
	MessageDetail string `json:"MessageDetail"`
}

func (Error) Error

func (e Error) Error() string

type ErrorResponse

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

	Errors []error
}

func (ErrorResponse) Error

func (r ErrorResponse) Error() string

func (*ErrorResponse) UnmarshalJSON

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

type GetAccountsPathParams

type GetAccountsPathParams struct {
}

func (*GetAccountsPathParams) Params

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

type GetAccountsQueryParams

type GetAccountsQueryParams struct {
	odata.Pagination
	CompanyID int `schema:"CompanyId"`
}

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 {
	TotalResults    int `json:"TotalResults"`
	ReturnedResults int `json:"ReturnedResults"`
	Results         Accounts
}

type GetChartOfAccountsPathParams

type GetChartOfAccountsPathParams struct {
}

func (*GetChartOfAccountsPathParams) Params

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

type GetChartOfAccountsQueryParams

type GetChartOfAccountsQueryParams struct {
	odata.Pagination
	CompanyID int `schema:"CompanyId"`
}

func (GetChartOfAccountsQueryParams) ToURLValues

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

type GetChartOfAccountsRequest

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

func (*GetChartOfAccountsRequest) Do

func (*GetChartOfAccountsRequest) Method

func (r *GetChartOfAccountsRequest) Method() string

func (GetChartOfAccountsRequest) NewGetChartOfAccountsPathParams

func (r GetChartOfAccountsRequest) NewGetChartOfAccountsPathParams() *GetChartOfAccountsPathParams

func (GetChartOfAccountsRequest) NewGetChartOfAccountsQueryParams

func (r GetChartOfAccountsRequest) NewGetChartOfAccountsQueryParams() *GetChartOfAccountsQueryParams

func (GetChartOfAccountsRequest) NewGetChartOfAccountsRequestBody

func (r GetChartOfAccountsRequest) NewGetChartOfAccountsRequestBody() GetChartOfAccountsRequestBody

func (*GetChartOfAccountsRequest) NewResponseBody

func (*GetChartOfAccountsRequest) PathParams

func (*GetChartOfAccountsRequest) QueryParams

func (*GetChartOfAccountsRequest) RequestBody

func (*GetChartOfAccountsRequest) SetMethod

func (r *GetChartOfAccountsRequest) SetMethod(method string)

func (*GetChartOfAccountsRequest) SetRequestBody

func (*GetChartOfAccountsRequest) URL

type GetChartOfAccountsRequestBody

type GetChartOfAccountsRequestBody struct{}

type GetChartOfAccountsResponseBody

type GetChartOfAccountsResponseBody struct {
	TotalResults    int `json:"TotalResults"`
	ReturnedResults int `json:"ReturnedResults"`
	Results         Accounts
}

type GetCompaniesPathParams

type GetCompaniesPathParams struct {
}

func (*GetCompaniesPathParams) Params

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

type GetCompaniesQueryParams

type GetCompaniesQueryParams struct{}

func (GetCompaniesQueryParams) ToURLValues

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

type GetCompaniesRequest

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

func (*GetCompaniesRequest) Do

func (*GetCompaniesRequest) Method

func (r *GetCompaniesRequest) Method() string

func (GetCompaniesRequest) NewGetCompaniesPathParams

func (r GetCompaniesRequest) NewGetCompaniesPathParams() *GetCompaniesPathParams

func (GetCompaniesRequest) NewGetCompaniesQueryParams

func (r GetCompaniesRequest) NewGetCompaniesQueryParams() *GetCompaniesQueryParams

func (GetCompaniesRequest) NewGetCompaniesRequestBody

func (r GetCompaniesRequest) NewGetCompaniesRequestBody() GetCompaniesRequestBody

func (*GetCompaniesRequest) NewResponseBody

func (r *GetCompaniesRequest) NewResponseBody() *GetCompaniesResponseBody

func (*GetCompaniesRequest) PathParams

func (*GetCompaniesRequest) QueryParams

func (r *GetCompaniesRequest) QueryParams() *GetCompaniesQueryParams

func (*GetCompaniesRequest) RequestBody

func (r *GetCompaniesRequest) RequestBody() *GetCompaniesRequestBody

func (*GetCompaniesRequest) SetMethod

func (r *GetCompaniesRequest) SetMethod(method string)

func (*GetCompaniesRequest) SetRequestBody

func (r *GetCompaniesRequest) SetRequestBody(body GetCompaniesRequestBody)

func (*GetCompaniesRequest) URL

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

type GetCompaniesRequestBody

type GetCompaniesRequestBody struct {
}

type GetCompaniesResponseBody

type GetCompaniesResponseBody struct {
	TotalResults    int
	ReturnedResults int
	Results         Companies
}

type GetCustomersPathParams

type GetCustomersPathParams struct {
}

func (*GetCustomersPathParams) Params

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

type GetCustomersQueryParams

type GetCustomersQueryParams struct {
	CompanyID int `schema:"CompanyId"`

	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 (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 {
	TotalResults    int `json:"TotalResults"`
	ReturnedResults int `json:"ReturnedResults"`
	Results         Customers
}

type GetJournalEntriesPathParams

type GetJournalEntriesPathParams struct {
}

func (*GetJournalEntriesPathParams) Params

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

type GetJournalEntriesQueryParams

type GetJournalEntriesQueryParams struct {
	CompanyID int `schema:"CompanyId"`
}

func (GetJournalEntriesQueryParams) ToURLValues

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

type GetJournalEntriesRequest

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

func (*GetJournalEntriesRequest) Do

func (*GetJournalEntriesRequest) Method

func (r *GetJournalEntriesRequest) Method() string

func (GetJournalEntriesRequest) NewGetJournalEntriesPathParams

func (r GetJournalEntriesRequest) NewGetJournalEntriesPathParams() *GetJournalEntriesPathParams

func (GetJournalEntriesRequest) NewGetJournalEntriesQueryParams

func (r GetJournalEntriesRequest) NewGetJournalEntriesQueryParams() *GetJournalEntriesQueryParams

func (GetJournalEntriesRequest) NewGetJournalEntriesRequestBody

func (r GetJournalEntriesRequest) NewGetJournalEntriesRequestBody() GetJournalEntriesRequestBody

func (*GetJournalEntriesRequest) NewResponseBody

func (*GetJournalEntriesRequest) PathParams

func (*GetJournalEntriesRequest) QueryParams

func (*GetJournalEntriesRequest) RequestBody

func (*GetJournalEntriesRequest) SetMethod

func (r *GetJournalEntriesRequest) SetMethod(method string)

func (*GetJournalEntriesRequest) SetRequestBody

func (*GetJournalEntriesRequest) URL

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

type GetJournalEntriesRequestBody

type GetJournalEntriesRequestBody struct {
}

type GetJournalEntriesResponseBody

type GetJournalEntriesResponseBody struct {
	TotalResults    int
	ReturnedResults int
	Results         JournalEntries
}

type GetSalesOrdersPathParams

type GetSalesOrdersPathParams struct {
}

func (*GetSalesOrdersPathParams) Params

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

type GetSalesOrdersQueryParams

type GetSalesOrdersQueryParams struct {
	CompanyID              int  `schema:"CompanyId"`
	IncludeDetail          bool `schema:"includeDetail"`
	IncludeCustomerDetails bool `schema:"includeCustomerDetails"`
}

func (GetSalesOrdersQueryParams) ToURLValues

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

type GetSalesOrdersRequest

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

func (*GetSalesOrdersRequest) Do

func (*GetSalesOrdersRequest) Method

func (r *GetSalesOrdersRequest) Method() string

func (GetSalesOrdersRequest) NewGetSalesOrdersPathParams

func (r GetSalesOrdersRequest) NewGetSalesOrdersPathParams() *GetSalesOrdersPathParams

func (GetSalesOrdersRequest) NewGetSalesOrdersQueryParams

func (r GetSalesOrdersRequest) NewGetSalesOrdersQueryParams() *GetSalesOrdersQueryParams

func (GetSalesOrdersRequest) NewGetSalesOrdersRequestBody

func (r GetSalesOrdersRequest) NewGetSalesOrdersRequestBody() GetSalesOrdersRequestBody

func (*GetSalesOrdersRequest) NewResponseBody

func (r *GetSalesOrdersRequest) NewResponseBody() *GetSalesOrdersResponseBody

func (*GetSalesOrdersRequest) PathParams

func (*GetSalesOrdersRequest) QueryParams

func (*GetSalesOrdersRequest) RequestBody

func (*GetSalesOrdersRequest) SetMethod

func (r *GetSalesOrdersRequest) SetMethod(method string)

func (*GetSalesOrdersRequest) SetRequestBody

func (r *GetSalesOrdersRequest) SetRequestBody(body GetSalesOrdersRequestBody)

func (*GetSalesOrdersRequest) URL

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

type GetSalesOrdersRequestBody

type GetSalesOrdersRequestBody struct {
}

type GetSalesOrdersResponseBody

type GetSalesOrdersResponseBody struct {
	TotalResults    int
	ReturnedResults int
	Results         SalesOrders
}

type GetTaxInvoicesPathParams

type GetTaxInvoicesPathParams struct {
}

func (*GetTaxInvoicesPathParams) Params

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

type GetTaxInvoicesQueryParams

type GetTaxInvoicesQueryParams struct {
	CompanyID              int  `schema:"CompanyId"`
	IncludeDetail          bool `schema:"includeDetail"`
	IncludeCustomerDetails bool `schema:"includeCustomerDetails"`
}

func (GetTaxInvoicesQueryParams) ToURLValues

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

type GetTaxInvoicesRequest

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

func (*GetTaxInvoicesRequest) Do

func (*GetTaxInvoicesRequest) Method

func (r *GetTaxInvoicesRequest) Method() string

func (GetTaxInvoicesRequest) NewGetTaxInvoicesPathParams

func (r GetTaxInvoicesRequest) NewGetTaxInvoicesPathParams() *GetTaxInvoicesPathParams

func (GetTaxInvoicesRequest) NewGetTaxInvoicesQueryParams

func (r GetTaxInvoicesRequest) NewGetTaxInvoicesQueryParams() *GetTaxInvoicesQueryParams

func (GetTaxInvoicesRequest) NewGetTaxInvoicesRequestBody

func (r GetTaxInvoicesRequest) NewGetTaxInvoicesRequestBody() GetTaxInvoicesRequestBody

func (*GetTaxInvoicesRequest) NewResponseBody

func (r *GetTaxInvoicesRequest) NewResponseBody() *GetTaxInvoicesResponseBody

func (*GetTaxInvoicesRequest) PathParams

func (*GetTaxInvoicesRequest) QueryParams

func (*GetTaxInvoicesRequest) RequestBody

func (*GetTaxInvoicesRequest) SetMethod

func (r *GetTaxInvoicesRequest) SetMethod(method string)

func (*GetTaxInvoicesRequest) SetRequestBody

func (r *GetTaxInvoicesRequest) SetRequestBody(body GetTaxInvoicesRequestBody)

func (*GetTaxInvoicesRequest) URL

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

type GetTaxInvoicesRequestBody

type GetTaxInvoicesRequestBody struct {
}

type GetTaxInvoicesResponseBody

type GetTaxInvoicesResponseBody struct {
	TotalResults    int
	ReturnedResults int
	Results         TaxInvoices
}

type GetTaxTypesPathParams

type GetTaxTypesPathParams struct {
}

func (*GetTaxTypesPathParams) Params

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

type GetTaxTypesQueryParams

type GetTaxTypesQueryParams struct {
	odata.Pagination
	CompanyID int `schema:"CompanyId"`
}

func (GetTaxTypesQueryParams) ToURLValues

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

type GetTaxTypesRequest

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

func (*GetTaxTypesRequest) Do

func (*GetTaxTypesRequest) Method

func (r *GetTaxTypesRequest) Method() string

func (GetTaxTypesRequest) NewGetTaxTypesPathParams

func (r GetTaxTypesRequest) NewGetTaxTypesPathParams() *GetTaxTypesPathParams

func (GetTaxTypesRequest) NewGetTaxTypesQueryParams

func (r GetTaxTypesRequest) NewGetTaxTypesQueryParams() *GetTaxTypesQueryParams

func (GetTaxTypesRequest) NewGetTaxTypesRequestBody

func (r GetTaxTypesRequest) NewGetTaxTypesRequestBody() GetTaxTypesRequestBody

func (*GetTaxTypesRequest) NewResponseBody

func (r *GetTaxTypesRequest) NewResponseBody() *GetTaxTypesResponseBody

func (*GetTaxTypesRequest) PathParams

func (r *GetTaxTypesRequest) PathParams() *GetTaxTypesPathParams

func (*GetTaxTypesRequest) QueryParams

func (r *GetTaxTypesRequest) QueryParams() *GetTaxTypesQueryParams

func (*GetTaxTypesRequest) RequestBody

func (r *GetTaxTypesRequest) RequestBody() *GetTaxTypesRequestBody

func (*GetTaxTypesRequest) SetMethod

func (r *GetTaxTypesRequest) SetMethod(method string)

func (*GetTaxTypesRequest) SetRequestBody

func (r *GetTaxTypesRequest) SetRequestBody(body GetTaxTypesRequestBody)

func (*GetTaxTypesRequest) URL

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

type GetTaxTypesRequestBody

type GetTaxTypesRequestBody struct{}

type GetTaxTypesResponseBody

type GetTaxTypesResponseBody struct {
	TotalResults    int `json:"TotalResults"`
	ReturnedResults int `json:"ReturnedResults"`
	Results         TaxTypes
}

type JournalEntries

type JournalEntries []JournalEntry

type JournalEntry

type JournalEntry struct {
	ID                  int     `json:"ID"`
	Date                Date    `json:"Date"`
	Effect              Effect  `json:"Effect"`
	AccountID           int     `json:"AccountId"`
	Reference           string  `json:"Reference"`
	Description         string  `json:"Description"`
	TaxTypeID           int     `json:"TaxTypeId"`
	TaxPeriodID         int     `json:"TaxPeriodId"`
	Exclusive           float64 `json:"Exclusive"`
	Tax                 float64 `json:"Tax"`
	Total               float64 `json:"Total"`
	ContraAccountID     int     `json:"ContraAccountId"`
	Memo                string  `json:"Memo"`
	HasAttachments      bool    `json:"HasAttachments"`
	AnalysisCategoryID1 int     `json:"AnalysisCategoryId1"`
	AnalysisCategoryID2 int     `json:"AnalysisCategoryId2"`
	AnalysisCategoryID3 int     `json:"AnalysisCategoryId3"`
	Editable            bool    `json:"Editable"`
	Locked              bool    `json:"Locked"`
	TrackingCode        string  `json:"$TrackingCode"`
	Debit               float64 `json:"Debit"`
	Credit              float64 `json:"Credit"`
	BusinessID          int     `json:"BusinessId"`
	PayRunID            int     `json:"PayRunId"`
}

type NewCustomer

type NewCustomer struct {
	Name     string `json:"Name"`
	Category struct {
		Description string `json:"Description"`
		ID          int    `json:"ID"`
		Modified    string `json:"Modified"`
		Created     string `json:"Created"`
	} `json:"Category"`
	SalesRepresentativeID int `json:"SalesRepresentativeId,omitempty"`
	SalesRepresentative   *struct {
		ID        int    `json:"ID"`
		FirstName string `json:"FirstName"`
		LastName  string `json:"LastName"`
		Name      string `json:"Name"`
		Active    bool   `json:"Active"`
		Email     string `json:"Email"`
		Mobile    string `json:"Mobile"`
		Telephone string `json:"Telephone"`
		Created   string `json:"Created"`
		Modified  string `json:"Modified"`
	} `json:"SalesRepresentative,omitempty"`
	TaxReference                string  `json:"TaxReference"`
	ContactName                 string  `json:"ContactName"`
	Telephone                   string  `json:"Telephone"`
	Fax                         string  `json:"Fax"`
	Mobile                      string  `json:"Mobile"`
	Email                       string  `json:"Email"`
	WebAddress                  string  `json:"WebAddress"`
	Active                      bool    `json:"Active"`
	IsObfuscated                bool    `json:"IsObfuscated"`
	Balance                     float64 `json:"Balance"`
	CreditLimit                 float64 `json:"CreditLimit"`
	CommunicationMethod         int     `json:"CommunicationMethod"`
	PostalAddress01             string  `json:"PostalAddress01"`
	PostalAddress02             string  `json:"PostalAddress02"`
	PostalAddress03             string  `json:"PostalAddress03"`
	PostalAddress04             string  `json:"PostalAddress04"`
	PostalAddress05             string  `json:"PostalAddress05"`
	DeliveryAddress01           string  `json:"DeliveryAddress01"`
	DeliveryAddress02           string  `json:"DeliveryAddress02"`
	DeliveryAddress03           string  `json:"DeliveryAddress03"`
	DeliveryAddress04           string  `json:"DeliveryAddress04"`
	DeliveryAddress05           string  `json:"DeliveryAddress05"`
	AutoAllocateToOldestInvoice bool    `json:"AutoAllocateToOldestInvoice"`
	EnableCustomerZone          bool    `json:"EnableCustomerZone"`
	CustomerZoneGUID            string  `json:"CustomerZoneGuid"`
	CashSale                    bool    `json:"CashSale"`
	TextField1                  string  `json:"TextField1"`
	TextField2                  string  `json:"TextField2"`
	TextField3                  string  `json:"TextField3"`
	NumericField1               float64 `json:"NumericField1"`
	NumericField2               float64 `json:"NumericField2"`
	NumericField3               float64 `json:"NumericField3"`
	YesNoField1                 bool    `json:"YesNoField1"`
	YesNoField2                 bool    `json:"YesNoField2"`
	YesNoField3                 bool    `json:"YesNoField3"`
	DateField1                  string  `json:"DateField1"`
	DateField2                  string  `json:"DateField2"`
	DateField3                  string  `json:"DateField3"`
	DefaultPriceListID          int     `json:"DefaultPriceListId"`
	DefaultPriceList            *struct {
		ID          int    `json:"ID"`
		Description string `json:"Description"`
		IsDefault   bool   `json:"IsDefault"`
	} `json:"DefaultPriceList,omitempty"`
	DefaultPriceListName       string  `json:"DefaultPriceListName"`
	AcceptsElectronicInvoices  bool    `json:"AcceptsElectronicInvoices"`
	Modified                   string  `json:"Modified"`
	Created                    string  `json:"Created"`
	BusinessRegistrationNumber string  `json:"BusinessRegistrationNumber"`
	TaxStatusVerified          string  `json:"TaxStatusVerified"`
	CurrencyID                 int     `json:"CurrencyId"`
	CurrencySymbol             string  `json:"CurrencySymbol"`
	HasActivity                bool    `json:"HasActivity"`
	DefaultDiscountPercentage  float64 `json:"DefaultDiscountPercentage"`
	DefaultTaxTypeID           int     `json:"DefaultTaxTypeId"`
	DefaultTaxType             *struct {
		ID                int     `json:"ID"`
		Name              string  `json:"Name"`
		Percentage        float64 `json:"Percentage"`
		IsDefault         bool    `json:"IsDefault"`
		HasActivity       bool    `json:"HasActivity"`
		IsManualTax       bool    `json:"IsManualTax"`
		Active            bool    `json:"Active"`
		Created           string  `json:"Created"`
		Modified          string  `json:"Modified"`
		TaxTypeDefaultUID string  `json:"TaxTypeDefaultUID"`
	} `json:"DefaultTaxType,omitempty"`
	DueDateMethodID              int  `json:"DueDateMethodId"`
	DueDateMethodValue           int  `json:"DueDateMethodValue"`
	CityID                       int  `json:"CityId"`
	HasSpecialCountryTax         bool `json:"HasSpecialCountryTax"`
	AccountingAgreement          bool `json:"AccountingAgreement"`
	HasSpecialCountryTaxActivity bool `json:"HasSpecialCountryTaxActivity"`
	ID                           int  `json:"ID"`
}

type NewJournalEntry

type NewJournalEntry struct {
	ID                  int     `json:"ID"`
	Date                Date    `json:"Date"`
	Effect              Effect  `json:"Effect"`
	AccountID           int     `json:"AccountId"`
	Reference           string  `json:"Reference"`
	Description         string  `json:"Description"`
	TaxTypeID           int     `json:"TaxTypeId"`
	TaxPeriodID         int     `json:"TaxPeriodId"`
	Exclusive           float64 `json:"Exclusive"`
	Tax                 float64 `json:"Tax"`
	Total               float64 `json:"Total"`
	ContraAccountID     int     `json:"ContraAccountId"`
	Memo                string  `json:"Memo"`
	HasAttachments      bool    `json:"HasAttachments"`
	AnalysisCategoryID1 int     `json:"AnalysisCategoryId1"`
	AnalysisCategoryID2 int     `json:"AnalysisCategoryId2"`
	AnalysisCategoryID3 int     `json:"AnalysisCategoryId3"`
	Editable            bool    `json:"Editable"`
	Locked              bool    `json:"Locked"`
	TrackingCode        string  `json:"$TrackingCode"`
	Debit               float64 `json:"Debit"`
	Credit              float64 `json:"Credit"`
	BusinessID          int     `json:"BusinessId"`
	PayRunID            int     `json:"PayRunId"`
}

type NewSalesOrder

type NewSalesOrder struct {
	DeliveryDate       string `json:"DeliveryDate"`
	AllowOnlineAccept  bool   `json:"AllowOnlineAccept"`
	UseForeignCurrency bool   `json:"UseForeignCurrency"`
	Status             string `json:"Status"`
	CustomerID         int    `json:"CustomerId,omitempty"`
	CustomerName       string `json:"CustomerName,omitempty"`
	// Customer           struct {
	// 	Name     string `json:"Name"`
	// 	Category struct {
	// 		Description string `json:"Description"`
	// 		ID          int    `json:"ID"`
	// 		Modified    string `json:"Modified"`
	// 		Created     string `json:"Created"`
	// 	} `json:"Category"`
	// 	SalesRepresentativeID int `json:"SalesRepresentativeId,omitempty"`
	// 	SalesRepresentative   struct {
	// 		ID        int    `json:"ID"`
	// 		FirstName string `json:"FirstName"`
	// 		LastName  string `json:"LastName"`
	// 		Name      string `json:"Name"`
	// 		Active    bool   `json:"Active"`
	// 		Email     string `json:"Email"`
	// 		Mobile    string `json:"Mobile"`
	// 		Telephone string `json:"Telephone"`
	// 		Created   string `json:"Created"`
	// 		Modified  string `json:"Modified"`
	// 	} `json:"SalesRepresentative,omitempty"`
	// 	TaxReference                string  `json:"TaxReference"`
	// 	ContactName                 string  `json:"ContactName"`
	// 	Telephone                   string  `json:"Telephone"`
	// 	Fax                         string  `json:"Fax"`
	// 	Mobile                      string  `json:"Mobile"`
	// 	Email                       string  `json:"Email"`
	// 	WebAddress                  string  `json:"WebAddress"`
	// 	Active                      bool    `json:"Active"`
	// 	IsObfuscated                bool    `json:"IsObfuscated"`
	// 	Balance                     float64 `json:"Balance"`
	// 	CreditLimit                 float64 `json:"CreditLimit"`
	// 	CommunicationMethod         int     `json:"CommunicationMethod"`
	// 	PostalAddress01             string  `json:"PostalAddress01"`
	// 	PostalAddress02             string  `json:"PostalAddress02"`
	// 	PostalAddress03             string  `json:"PostalAddress03"`
	// 	PostalAddress04             string  `json:"PostalAddress04"`
	// 	PostalAddress05             string  `json:"PostalAddress05"`
	// 	DeliveryAddress01           string  `json:"DeliveryAddress01"`
	// 	DeliveryAddress02           string  `json:"DeliveryAddress02"`
	// 	DeliveryAddress03           string  `json:"DeliveryAddress03"`
	// 	DeliveryAddress04           string  `json:"DeliveryAddress04"`
	// 	DeliveryAddress05           string  `json:"DeliveryAddress05"`
	// 	AutoAllocateToOldestInvoice bool    `json:"AutoAllocateToOldestInvoice"`
	// 	EnableCustomerZone          bool    `json:"EnableCustomerZone"`
	// 	CustomerZoneGUID            string  `json:"CustomerZoneGuid"`
	// 	CashSale                    bool    `json:"CashSale"`
	// 	TextField1                  string  `json:"TextField1"`
	// 	TextField2                  string  `json:"TextField2"`
	// 	TextField3                  string  `json:"TextField3"`
	// 	NumericField1               float64 `json:"NumericField1"`
	// 	NumericField2               float64 `json:"NumericField2"`
	// 	NumericField3               float64 `json:"NumericField3"`
	// 	YesNoField1                 bool    `json:"YesNoField1"`
	// 	YesNoField2                 bool    `json:"YesNoField2"`
	// 	YesNoField3                 bool    `json:"YesNoField3"`
	// 	DateField1                  string  `json:"DateField1"`
	// 	DateField2                  string  `json:"DateField2"`
	// 	DateField3                  string  `json:"DateField3"`
	// 	DefaultPriceListID          int     `json:"DefaultPriceListId"`
	// 	DefaultPriceList            struct {
	// 		ID          int    `json:"ID"`
	// 		Description string `json:"Description"`
	// 		IsDefault   bool   `json:"IsDefault"`
	// 	} `json:"DefaultPriceList"`
	// 	DefaultPriceListName       string  `json:"DefaultPriceListName"`
	// 	AcceptsElectronicInvoices  bool    `json:"AcceptsElectronicInvoices"`
	// 	Modified                   string  `json:"Modified"`
	// 	Created                    string  `json:"Created"`
	// 	BusinessRegistrationNumber string  `json:"BusinessRegistrationNumber"`
	// 	TaxStatusVerified          string  `json:"TaxStatusVerified"`
	// 	CurrencyID                 int     `json:"CurrencyId"`
	// 	CurrencySymbol             string  `json:"CurrencySymbol"`
	// 	HasActivity                bool    `json:"HasActivity"`
	// 	DefaultDiscountPercentage  float64 `json:"DefaultDiscountPercentage"`
	// 	DefaultTaxTypeID           int     `json:"DefaultTaxTypeId"`
	// 	DefaultTaxType             struct {
	// 		ID                int     `json:"ID"`
	// 		Name              string  `json:"Name"`
	// 		Percentage        float64 `json:"Percentage"`
	// 		IsDefault         bool    `json:"IsDefault"`
	// 		HasActivity       bool    `json:"HasActivity"`
	// 		IsManualTax       bool    `json:"IsManualTax"`
	// 		Active            bool    `json:"Active"`
	// 		Created           string  `json:"Created"`
	// 		Modified          string  `json:"Modified"`
	// 		TaxTypeDefaultUID string  `json:"TaxTypeDefaultUID"`
	// 	} `json:"DefaultTaxType"`
	// 	DueDateMethodID              int  `json:"DueDateMethodId"`
	// 	DueDateMethodValue           int  `json:"DueDateMethodValue"`
	// 	CityID                       int  `json:"CityId"`
	// 	HasSpecialCountryTax         bool `json:"HasSpecialCountryTax"`
	// 	AccountingAgreement          bool `json:"AccountingAgreement"`
	// 	HasSpecialCountryTaxActivity bool `json:"HasSpecialCountryTaxActivity"`
	// 	ID                           int  `json:"ID,omitempty"`
	// } `json:"Customer"`
	SalesRepresentativeID int `json:"SalesRepresentativeId,omitempty"`
	SalesRepresentative   struct {
		ID        int    `json:"ID"`
		FirstName string `json:"FirstName"`
		LastName  string `json:"LastName"`
		Name      string `json:"Name"`
		Active    bool   `json:"Active"`
		Email     string `json:"Email"`
		Mobile    string `json:"Mobile"`
		Telephone string `json:"Telephone"`
		Created   string `json:"Created"`
		Modified  string `json:"Modified"`
	} `json:"SalesRepresentative,omitempty"`
	StatusID             int     `json:"StatusId"`
	Modified             string  `json:"Modified"`
	Created              string  `json:"Created"`
	CustomerCurrencyID   int     `json:"Customer_CurrencyId,omitempty"`
	CustomerExchangeRate float64 `json:"Customer_ExchangeRate,omitempty"`
	ID                   int     `json:"ID,omitempty"`
	Date                 string  `json:"Date"`
	Inclusive            bool    `json:"Inclusive"`
	DiscountPercentage   float64 `json:"DiscountPercentage"`
	TaxReference         string  `json:"TaxReference"`
	DocumentNumber       string  `json:"DocumentNumber"`
	Reference            string  `json:"Reference"`
	Message              string  `json:"Message"`
	Discount             float64 `json:"Discount"`
	Exclusive            float64 `json:"Exclusive"`
	Tax                  float64 `json:"Tax"`
	Rounding             float64 `json:"Rounding"`
	Total                float64 `json:"Total"`
	AmountDue            float64 `json:"AmountDue"`
	PostalAddress01      string  `json:"PostalAddress01"`
	PostalAddress02      string  `json:"PostalAddress02"`
	PostalAddress03      string  `json:"PostalAddress03"`
	PostalAddress04      string  `json:"PostalAddress04"`
	PostalAddress05      string  `json:"PostalAddress05"`
	DeliveryAddress01    string  `json:"DeliveryAddress01"`
	DeliveryAddress02    string  `json:"DeliveryAddress02"`
	DeliveryAddress03    string  `json:"DeliveryAddress03"`
	DeliveryAddress04    string  `json:"DeliveryAddress04"`
	DeliveryAddress05    string  `json:"DeliveryAddress05"`
	Printed              bool    `json:"Printed"`
	TaxPeriodID          int     `json:"TaxPeriodId"`
	Editable             bool    `json:"Editable"`
	HasAttachments       bool    `json:"HasAttachments"`
	HasNotes             bool    `json:"HasNotes"`
	HasAnticipatedDate   bool    `json:"HasAnticipatedDate"`
	AnticipatedDate      string  `json:"AnticipatedDate"`
	ExternalReference    string  `json:"ExternalReference"`
	UID                  string  `json:"UID"`
	Lines                []struct {
		SelectionID         int     `json:"SelectionId"`
		TaxTypeID           int     `json:"TaxTypeId"`
		ID                  int     `json:"ID"`
		Description         string  `json:"Description"`
		LineType            int     `json:"LineType"`
		Quantity            float64 `json:"Quantity"`
		UnitPriceExclusive  float64 `json:"UnitPriceExclusive"`
		Unit                string  `json:"Unit"`
		UnitPriceInclusive  float64 `json:"UnitPriceInclusive"`
		TaxPercentage       float64 `json:"TaxPercentage"`
		DiscountPercentage  float64 `json:"DiscountPercentage"`
		Exclusive           float64 `json:"Exclusive"`
		Discount            float64 `json:"Discount"`
		Tax                 float64 `json:"Tax"`
		Total               float64 `json:"Total"`
		Comments            string  `json:"Comments"`
		AnalysisCategoryID1 int     `json:"AnalysisCategoryId1"`
		AnalysisCategoryID2 int     `json:"AnalysisCategoryId2"`
		AnalysisCategoryID3 int     `json:"AnalysisCategoryId3"`
		TrackingCode        string  `json:"$TrackingCode"`
		CurrencyID          int     `json:"CurrencyId"`
		UnitCost            float64 `json:"UnitCost"`
		UID                 string  `json:"UID"`
	} `json:"Lines"`
}

type NewTaxInvoice

type NewTaxInvoice struct {
	DueDate            string `json:"DueDate"`
	FromDocument       string `json:"FromDocument"`
	FromDocumentID     int    `json:"FromDocumentId"`
	FromDocumentTypeID int    `json:"FromDocumentTypeId"`
	AllowOnlinePayment bool   `json:"AllowOnlinePayment"`
	Paid               bool   `json:"Paid"`
	Status             string `json:"Status"`
	Locked             bool   `json:"Locked"`
	CustomerID         int    `json:"CustomerId"`
	CustomerName       string `json:"CustomerName"`
	Customer           struct {
		Name     string `json:"Name"`
		Category struct {
			Description string `json:"Description"`
			ID          int    `json:"ID"`
			Modified    string `json:"Modified"`
			Created     string `json:"Created"`
		} `json:"Category"`
		SalesRepresentativeID int `json:"SalesRepresentativeId"`
		SalesRepresentative   struct {
			ID        int    `json:"ID"`
			FirstName string `json:"FirstName"`
			LastName  string `json:"LastName"`
			Name      string `json:"Name"`
			Active    bool   `json:"Active"`
			Email     string `json:"Email"`
			Mobile    string `json:"Mobile"`
			Telephone string `json:"Telephone"`
			Created   string `json:"Created"`
			Modified  string `json:"Modified"`
		} `json:"SalesRepresentative"`
		TaxReference                string  `json:"TaxReference"`
		ContactName                 string  `json:"ContactName"`
		Telephone                   string  `json:"Telephone"`
		Fax                         string  `json:"Fax"`
		Mobile                      string  `json:"Mobile"`
		Email                       string  `json:"Email"`
		WebAddress                  string  `json:"WebAddress"`
		Active                      bool    `json:"Active"`
		IsObfuscated                bool    `json:"IsObfuscated"`
		Balance                     float64 `json:"Balance"`
		CreditLimit                 float64 `json:"CreditLimit"`
		CommunicationMethod         int     `json:"CommunicationMethod"`
		PostalAddress01             string  `json:"PostalAddress01"`
		PostalAddress02             string  `json:"PostalAddress02"`
		PostalAddress03             string  `json:"PostalAddress03"`
		PostalAddress04             string  `json:"PostalAddress04"`
		PostalAddress05             string  `json:"PostalAddress05"`
		DeliveryAddress01           string  `json:"DeliveryAddress01"`
		DeliveryAddress02           string  `json:"DeliveryAddress02"`
		DeliveryAddress03           string  `json:"DeliveryAddress03"`
		DeliveryAddress04           string  `json:"DeliveryAddress04"`
		DeliveryAddress05           string  `json:"DeliveryAddress05"`
		AutoAllocateToOldestInvoice bool    `json:"AutoAllocateToOldestInvoice"`
		EnableCustomerZone          bool    `json:"EnableCustomerZone"`
		CustomerZoneGUID            string  `json:"CustomerZoneGuid"`
		CashSale                    bool    `json:"CashSale"`
		TextField1                  string  `json:"TextField1"`
		TextField2                  string  `json:"TextField2"`
		TextField3                  string  `json:"TextField3"`
		NumericField1               float64 `json:"NumericField1"`
		NumericField2               float64 `json:"NumericField2"`
		NumericField3               float64 `json:"NumericField3"`
		YesNoField1                 bool    `json:"YesNoField1"`
		YesNoField2                 bool    `json:"YesNoField2"`
		YesNoField3                 bool    `json:"YesNoField3"`
		DateField1                  string  `json:"DateField1"`
		DateField2                  string  `json:"DateField2"`
		DateField3                  string  `json:"DateField3"`
		DefaultPriceListID          int     `json:"DefaultPriceListId"`
		DefaultPriceList            struct {
			ID          int    `json:"ID"`
			Description string `json:"Description"`
			IsDefault   bool   `json:"IsDefault"`
		} `json:"DefaultPriceList"`
		DefaultPriceListName       string  `json:"DefaultPriceListName"`
		AcceptsElectronicInvoices  bool    `json:"AcceptsElectronicInvoices"`
		Modified                   string  `json:"Modified"`
		Created                    string  `json:"Created"`
		BusinessRegistrationNumber string  `json:"BusinessRegistrationNumber"`
		TaxStatusVerified          string  `json:"TaxStatusVerified"`
		CurrencyID                 int     `json:"CurrencyId"`
		CurrencySymbol             string  `json:"CurrencySymbol"`
		HasActivity                bool    `json:"HasActivity"`
		DefaultDiscountPercentage  float64 `json:"DefaultDiscountPercentage"`
		DefaultTaxTypeID           int     `json:"DefaultTaxTypeId"`
		DefaultTaxType             struct {
			ID                int     `json:"ID"`
			Name              string  `json:"Name"`
			Percentage        float64 `json:"Percentage"`
			IsDefault         bool    `json:"IsDefault"`
			HasActivity       bool    `json:"HasActivity"`
			IsManualTax       bool    `json:"IsManualTax"`
			Active            bool    `json:"Active"`
			Created           string  `json:"Created"`
			Modified          string  `json:"Modified"`
			TaxTypeDefaultUID string  `json:"TaxTypeDefaultUID"`
		} `json:"DefaultTaxType"`
		DueDateMethodID              int  `json:"DueDateMethodId"`
		DueDateMethodValue           int  `json:"DueDateMethodValue"`
		CityID                       int  `json:"CityId"`
		HasSpecialCountryTax         bool `json:"HasSpecialCountryTax"`
		AccountingAgreement          bool `json:"AccountingAgreement"`
		HasSpecialCountryTaxActivity bool `json:"HasSpecialCountryTaxActivity"`
		ID                           int  `json:"ID"`
	} `json:"Customer"`
	SalesRepresentativeID int `json:"SalesRepresentativeId,omitempty"`
	SalesRepresentative   struct {
		ID        int    `json:"ID"`
		FirstName string `json:"FirstName"`
		LastName  string `json:"LastName"`
		Name      string `json:"Name"`
		Active    bool   `json:"Active"`
		Email     string `json:"Email"`
		Mobile    string `json:"Mobile"`
		Telephone string `json:"Telephone"`
		Created   string `json:"Created"`
		Modified  string `json:"Modified"`
	} `json:"SalesRepresentative,omitempty"`
	StatusID             int     `json:"StatusId"`
	Modified             string  `json:"Modified"`
	Created              string  `json:"Created"`
	CustomerCurrencyID   int     `json:"Customer_CurrencyId,omitempty"`
	CustomerExchangeRate float64 `json:"Customer_ExchangeRate,omitempty"`
	ID                   int     `json:"ID"`
	Date                 string  `json:"Date"`
	Inclusive            bool    `json:"Inclusive"`
	DiscountPercentage   float64 `json:"DiscountPercentage"`
	TaxReference         string  `json:"TaxReference"`
	DocumentNumber       string  `json:"DocumentNumber"`
	Reference            string  `json:"Reference"`
	Message              string  `json:"Message"`
	Discount             float64 `json:"Discount"`
	Exclusive            float64 `json:"Exclusive"`
	Tax                  float64 `json:"Tax"`
	Rounding             float64 `json:"Rounding"`
	Total                float64 `json:"Total"`
	AmountDue            float64 `json:"AmountDue"`
	PostalAddress01      string  `json:"PostalAddress01"`
	PostalAddress02      string  `json:"PostalAddress02"`
	PostalAddress03      string  `json:"PostalAddress03"`
	PostalAddress04      string  `json:"PostalAddress04"`
	PostalAddress05      string  `json:"PostalAddress05"`
	DeliveryAddress01    string  `json:"DeliveryAddress01"`
	DeliveryAddress02    string  `json:"DeliveryAddress02"`
	DeliveryAddress03    string  `json:"DeliveryAddress03"`
	DeliveryAddress04    string  `json:"DeliveryAddress04"`
	DeliveryAddress05    string  `json:"DeliveryAddress05"`
	Printed              bool    `json:"Printed"`
	TaxPeriodID          int     `json:"TaxPeriodId"`
	Editable             bool    `json:"Editable"`
	HasAttachments       bool    `json:"HasAttachments"`
	HasNotes             bool    `json:"HasNotes"`
	HasAnticipatedDate   bool    `json:"HasAnticipatedDate"`
	AnticipatedDate      string  `json:"AnticipatedDate"`
	ExternalReference    string  `json:"ExternalReference"`
	UID                  string  `json:"UID"`
	Lines                []struct {
		SelectionID         int     `json:"SelectionId"`
		TaxTypeID           int     `json:"TaxTypeId"`
		ID                  int     `json:"ID"`
		Description         string  `json:"Description"`
		LineType            int     `json:"LineType"`
		Quantity            float64 `json:"Quantity"`
		UnitPriceExclusive  float64 `json:"UnitPriceExclusive"`
		Unit                string  `json:"Unit"`
		UnitPriceInclusive  float64 `json:"UnitPriceInclusive"`
		TaxPercentage       float64 `json:"TaxPercentage"`
		DiscountPercentage  float64 `json:"DiscountPercentage"`
		Exclusive           float64 `json:"Exclusive"`
		Discount            float64 `json:"Discount"`
		Tax                 float64 `json:"Tax"`
		Total               float64 `json:"Total"`
		Comments            string  `json:"Comments"`
		AnalysisCategoryID1 int     `json:"AnalysisCategoryId1"`
		AnalysisCategoryID2 int     `json:"AnalysisCategoryId2"`
		AnalysisCategoryID3 int     `json:"AnalysisCategoryId3"`
		TrackingCode        string  `json:"$TrackingCode"`
		CurrencyID          int     `json:"CurrencyId"`
		UnitCost            float64 `json:"UnitCost"`
		UID                 string  `json:"UID"`
	} `json:"Lines"`
}

type PathParams

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

type RequestCompletionCallback

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

RequestCompletionCallback defines the type of the request callback function

type SalesOrder

type SalesOrder struct {
	DeliveryDate       string `json:"DeliveryDate"`
	AllowOnlineAccept  bool   `json:"AllowOnlineAccept"`
	UseForeignCurrency bool   `json:"UseForeignCurrency"`
	Status             string `json:"Status"`
	CustomerID         int    `json:"CustomerId"`
	CustomerName       string `json:"CustomerName"`
	Customer           struct {
		Name     string `json:"Name"`
		Category struct {
			Description string `json:"Description"`
			ID          int    `json:"ID"`
			Modified    string `json:"Modified"`
			Created     string `json:"Created"`
		} `json:"Category"`
		SalesRepresentativeID int `json:"SalesRepresentativeId"`
		SalesRepresentative   struct {
			ID        int    `json:"ID"`
			FirstName string `json:"FirstName"`
			LastName  string `json:"LastName"`
			Name      string `json:"Name"`
			Active    bool   `json:"Active"`
			Email     string `json:"Email"`
			Mobile    string `json:"Mobile"`
			Telephone string `json:"Telephone"`
			Created   string `json:"Created"`
			Modified  string `json:"Modified"`
		} `json:"SalesRepresentative"`
		TaxReference                string  `json:"TaxReference"`
		ContactName                 string  `json:"ContactName"`
		Telephone                   string  `json:"Telephone"`
		Fax                         string  `json:"Fax"`
		Mobile                      string  `json:"Mobile"`
		Email                       string  `json:"Email"`
		WebAddress                  string  `json:"WebAddress"`
		Active                      bool    `json:"Active"`
		IsObfuscated                bool    `json:"IsObfuscated"`
		Balance                     float64 `json:"Balance"`
		CreditLimit                 float64 `json:"CreditLimit"`
		CommunicationMethod         int     `json:"CommunicationMethod"`
		PostalAddress01             string  `json:"PostalAddress01"`
		PostalAddress02             string  `json:"PostalAddress02"`
		PostalAddress03             string  `json:"PostalAddress03"`
		PostalAddress04             string  `json:"PostalAddress04"`
		PostalAddress05             string  `json:"PostalAddress05"`
		DeliveryAddress01           string  `json:"DeliveryAddress01"`
		DeliveryAddress02           string  `json:"DeliveryAddress02"`
		DeliveryAddress03           string  `json:"DeliveryAddress03"`
		DeliveryAddress04           string  `json:"DeliveryAddress04"`
		DeliveryAddress05           string  `json:"DeliveryAddress05"`
		AutoAllocateToOldestInvoice bool    `json:"AutoAllocateToOldestInvoice"`
		EnableCustomerZone          bool    `json:"EnableCustomerZone"`
		CustomerZoneGUID            string  `json:"CustomerZoneGuid"`
		CashSale                    bool    `json:"CashSale"`
		TextField1                  string  `json:"TextField1"`
		TextField2                  string  `json:"TextField2"`
		TextField3                  string  `json:"TextField3"`
		NumericField1               float64 `json:"NumericField1"`
		NumericField2               float64 `json:"NumericField2"`
		NumericField3               float64 `json:"NumericField3"`
		YesNoField1                 bool    `json:"YesNoField1"`
		YesNoField2                 bool    `json:"YesNoField2"`
		YesNoField3                 bool    `json:"YesNoField3"`
		DateField1                  string  `json:"DateField1"`
		DateField2                  string  `json:"DateField2"`
		DateField3                  string  `json:"DateField3"`
		DefaultPriceListID          int     `json:"DefaultPriceListId"`
		DefaultPriceList            struct {
			ID          int    `json:"ID"`
			Description string `json:"Description"`
			IsDefault   bool   `json:"IsDefault"`
		} `json:"DefaultPriceList"`
		DefaultPriceListName       string  `json:"DefaultPriceListName"`
		AcceptsElectronicInvoices  bool    `json:"AcceptsElectronicInvoices"`
		Modified                   string  `json:"Modified"`
		Created                    string  `json:"Created"`
		BusinessRegistrationNumber string  `json:"BusinessRegistrationNumber"`
		TaxStatusVerified          string  `json:"TaxStatusVerified"`
		CurrencyID                 int     `json:"CurrencyId"`
		CurrencySymbol             string  `json:"CurrencySymbol"`
		HasActivity                bool    `json:"HasActivity"`
		DefaultDiscountPercentage  float64 `json:"DefaultDiscountPercentage"`
		DefaultTaxTypeID           int     `json:"DefaultTaxTypeId"`
		DefaultTaxType             struct {
			ID                int     `json:"ID"`
			Name              string  `json:"Name"`
			Percentage        float64 `json:"Percentage"`
			IsDefault         bool    `json:"IsDefault"`
			HasActivity       bool    `json:"HasActivity"`
			IsManualTax       bool    `json:"IsManualTax"`
			Active            bool    `json:"Active"`
			Created           string  `json:"Created"`
			Modified          string  `json:"Modified"`
			TaxTypeDefaultUID string  `json:"TaxTypeDefaultUID"`
		} `json:"DefaultTaxType"`
		DueDateMethodID              int  `json:"DueDateMethodId"`
		DueDateMethodValue           int  `json:"DueDateMethodValue"`
		CityID                       int  `json:"CityId"`
		HasSpecialCountryTax         bool `json:"HasSpecialCountryTax"`
		AccountingAgreement          bool `json:"AccountingAgreement"`
		HasSpecialCountryTaxActivity bool `json:"HasSpecialCountryTaxActivity"`
		ID                           int  `json:"ID"`
	} `json:"Customer"`
	SalesRepresentativeID int `json:"SalesRepresentativeId"`
	SalesRepresentative   struct {
		ID        int    `json:"ID"`
		FirstName string `json:"FirstName"`
		LastName  string `json:"LastName"`
		Name      string `json:"Name"`
		Active    bool   `json:"Active"`
		Email     string `json:"Email"`
		Mobile    string `json:"Mobile"`
		Telephone string `json:"Telephone"`
		Created   string `json:"Created"`
		Modified  string `json:"Modified"`
	} `json:"SalesRepresentative"`
	StatusID             int     `json:"StatusId"`
	Modified             string  `json:"Modified"`
	Created              string  `json:"Created"`
	CustomerCurrencyID   int     `json:"Customer_CurrencyId"`
	CustomerExchangeRate float64 `json:"Customer_ExchangeRate"`
	ID                   int     `json:"ID"`
	Date                 string  `json:"Date"`
	Inclusive            bool    `json:"Inclusive"`
	DiscountPercentage   float64 `json:"DiscountPercentage"`
	TaxReference         string  `json:"TaxReference"`
	DocumentNumber       string  `json:"DocumentNumber"`
	Reference            string  `json:"Reference"`
	Message              string  `json:"Message"`
	Discount             float64 `json:"Discount"`
	Exclusive            float64 `json:"Exclusive"`
	Tax                  float64 `json:"Tax"`
	Rounding             float64 `json:"Rounding"`
	Total                float64 `json:"Total"`
	AmountDue            float64 `json:"AmountDue"`
	PostalAddress01      string  `json:"PostalAddress01"`
	PostalAddress02      string  `json:"PostalAddress02"`
	PostalAddress03      string  `json:"PostalAddress03"`
	PostalAddress04      string  `json:"PostalAddress04"`
	PostalAddress05      string  `json:"PostalAddress05"`
	DeliveryAddress01    string  `json:"DeliveryAddress01"`
	DeliveryAddress02    string  `json:"DeliveryAddress02"`
	DeliveryAddress03    string  `json:"DeliveryAddress03"`
	DeliveryAddress04    string  `json:"DeliveryAddress04"`
	DeliveryAddress05    string  `json:"DeliveryAddress05"`
	Printed              bool    `json:"Printed"`
	TaxPeriodID          int     `json:"TaxPeriodId"`
	Editable             bool    `json:"Editable"`
	HasAttachments       bool    `json:"HasAttachments"`
	HasNotes             bool    `json:"HasNotes"`
	HasAnticipatedDate   bool    `json:"HasAnticipatedDate"`
	AnticipatedDate      string  `json:"AnticipatedDate"`
	ExternalReference    string  `json:"ExternalReference"`
	UID                  string  `json:"UID"`
	Lines                []struct {
		SelectionID         int     `json:"SelectionId"`
		TaxTypeID           int     `json:"TaxTypeId"`
		ID                  int     `json:"ID"`
		Description         string  `json:"Description"`
		LineType            int     `json:"LineType"`
		Quantity            float64 `json:"Quantity"`
		UnitPriceExclusive  float64 `json:"UnitPriceExclusive"`
		Unit                string  `json:"Unit"`
		UnitPriceInclusive  float64 `json:"UnitPriceInclusive"`
		TaxPercentage       float64 `json:"TaxPercentage"`
		DiscountPercentage  float64 `json:"DiscountPercentage"`
		Exclusive           float64 `json:"Exclusive"`
		Discount            float64 `json:"Discount"`
		Tax                 float64 `json:"Tax"`
		Total               float64 `json:"Total"`
		Comments            string  `json:"Comments"`
		AnalysisCategoryID1 int     `json:"AnalysisCategoryId1"`
		AnalysisCategoryID2 int     `json:"AnalysisCategoryId2"`
		AnalysisCategoryID3 int     `json:"AnalysisCategoryId3"`
		TrackingCode        string  `json:"$TrackingCode"`
		CurrencyID          int     `json:"CurrencyId"`
		UnitCost            float64 `json:"UnitCost"`
		UID                 string  `json:"UID"`
	} `json:"Lines"`
}

type SalesOrders

type SalesOrders []SalesOrder

type SaveCustomerPathParams

type SaveCustomerPathParams struct {
}

func (*SaveCustomerPathParams) Params

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

type SaveCustomerQueryParams

type SaveCustomerQueryParams struct {
	CompanyID int `schema:"CompanyId"`
}

func (SaveCustomerQueryParams) ToURLValues

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

type SaveCustomerRequest

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

func (*SaveCustomerRequest) Do

func (*SaveCustomerRequest) Method

func (r *SaveCustomerRequest) Method() string

func (*SaveCustomerRequest) NewResponseBody

func (r *SaveCustomerRequest) NewResponseBody() *SaveCustomerResponseBody

func (SaveCustomerRequest) NewSaveCustomerPathParams

func (r SaveCustomerRequest) NewSaveCustomerPathParams() *SaveCustomerPathParams

func (SaveCustomerRequest) NewSaveCustomerQueryParams

func (r SaveCustomerRequest) NewSaveCustomerQueryParams() *SaveCustomerQueryParams

func (SaveCustomerRequest) NewSaveCustomerRequestBody

func (r SaveCustomerRequest) NewSaveCustomerRequestBody() SaveCustomerRequestBody

func (*SaveCustomerRequest) PathParams

func (*SaveCustomerRequest) QueryParams

func (r *SaveCustomerRequest) QueryParams() *SaveCustomerQueryParams

func (*SaveCustomerRequest) RequestBody

func (r *SaveCustomerRequest) RequestBody() *SaveCustomerRequestBody

func (*SaveCustomerRequest) SetMethod

func (r *SaveCustomerRequest) SetMethod(method string)

func (*SaveCustomerRequest) SetRequestBody

func (r *SaveCustomerRequest) SetRequestBody(body SaveCustomerRequestBody)

func (*SaveCustomerRequest) URL

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

type SaveCustomerRequestBody

type SaveCustomerRequestBody NewCustomer

type SaveCustomerResponseBody

type SaveCustomerResponseBody Customer

type SaveJournalEntriesBatchPathParams

type SaveJournalEntriesBatchPathParams struct {
}

func (*SaveJournalEntriesBatchPathParams) Params

type SaveJournalEntriesBatchQueryParams

type SaveJournalEntriesBatchQueryParams struct {
	CompanyID int `schema:"CompanyId"`
}

func (SaveJournalEntriesBatchQueryParams) ToURLValues

type SaveJournalEntriesBatchRequest

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

func (*SaveJournalEntriesBatchRequest) Do

func (*SaveJournalEntriesBatchRequest) Method

func (*SaveJournalEntriesBatchRequest) NewResponseBody

func (SaveJournalEntriesBatchRequest) NewSaveJournalEntriesBatchPathParams

func (r SaveJournalEntriesBatchRequest) NewSaveJournalEntriesBatchPathParams() *SaveJournalEntriesBatchPathParams

func (SaveJournalEntriesBatchRequest) NewSaveJournalEntriesBatchQueryParams

func (r SaveJournalEntriesBatchRequest) NewSaveJournalEntriesBatchQueryParams() *SaveJournalEntriesBatchQueryParams

func (SaveJournalEntriesBatchRequest) NewSaveJournalEntriesBatchRequestBody

func (r SaveJournalEntriesBatchRequest) NewSaveJournalEntriesBatchRequestBody() SaveJournalEntriesBatchRequestBody

func (*SaveJournalEntriesBatchRequest) PathParams

func (*SaveJournalEntriesBatchRequest) QueryParams

func (*SaveJournalEntriesBatchRequest) RequestBody

func (*SaveJournalEntriesBatchRequest) SetMethod

func (r *SaveJournalEntriesBatchRequest) SetMethod(method string)

func (*SaveJournalEntriesBatchRequest) SetRequestBody

func (*SaveJournalEntriesBatchRequest) URL

type SaveJournalEntriesBatchRequestBody

type SaveJournalEntriesBatchRequestBody []NewJournalEntry

type SaveJournalEntriesBatchResponseBody

type SaveJournalEntriesBatchResponseBody JournalEntries

type SaveSalesOrderPathParams

type SaveSalesOrderPathParams struct {
}

func (*SaveSalesOrderPathParams) Params

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

type SaveSalesOrderQueryParams

type SaveSalesOrderQueryParams struct {
	CompanyID int `schema:"CompanyId"`
}

func (SaveSalesOrderQueryParams) ToURLValues

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

type SaveSalesOrderRequest

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

func (*SaveSalesOrderRequest) Do

func (*SaveSalesOrderRequest) Method

func (r *SaveSalesOrderRequest) Method() string

func (*SaveSalesOrderRequest) NewResponseBody

func (r *SaveSalesOrderRequest) NewResponseBody() *SaveSalesOrderResponseBody

func (SaveSalesOrderRequest) NewSaveSalesOrderPathParams

func (r SaveSalesOrderRequest) NewSaveSalesOrderPathParams() *SaveSalesOrderPathParams

func (SaveSalesOrderRequest) NewSaveSalesOrderQueryParams

func (r SaveSalesOrderRequest) NewSaveSalesOrderQueryParams() *SaveSalesOrderQueryParams

func (SaveSalesOrderRequest) NewSaveSalesOrderRequestBody

func (r SaveSalesOrderRequest) NewSaveSalesOrderRequestBody() SaveSalesOrderRequestBody

func (*SaveSalesOrderRequest) PathParams

func (*SaveSalesOrderRequest) QueryParams

func (*SaveSalesOrderRequest) RequestBody

func (*SaveSalesOrderRequest) SetMethod

func (r *SaveSalesOrderRequest) SetMethod(method string)

func (*SaveSalesOrderRequest) SetRequestBody

func (r *SaveSalesOrderRequest) SetRequestBody(body SaveSalesOrderRequestBody)

func (*SaveSalesOrderRequest) URL

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

type SaveSalesOrderRequestBody

type SaveSalesOrderRequestBody NewSalesOrder

type SaveSalesOrderResponseBody

type SaveSalesOrderResponseBody SalesOrder

type SaveTaxInvoicePathParams

type SaveTaxInvoicePathParams struct {
}

func (*SaveTaxInvoicePathParams) Params

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

type SaveTaxInvoiceQueryParams

type SaveTaxInvoiceQueryParams struct {
	CompanyID int `schema:"CompanyId"`
}

func (SaveTaxInvoiceQueryParams) ToURLValues

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

type SaveTaxInvoiceRequest

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

func (*SaveTaxInvoiceRequest) Do

func (*SaveTaxInvoiceRequest) Method

func (r *SaveTaxInvoiceRequest) Method() string

func (*SaveTaxInvoiceRequest) NewResponseBody

func (r *SaveTaxInvoiceRequest) NewResponseBody() *SaveTaxInvoiceResponseBody

func (SaveTaxInvoiceRequest) NewSaveTaxInvoicePathParams

func (r SaveTaxInvoiceRequest) NewSaveTaxInvoicePathParams() *SaveTaxInvoicePathParams

func (SaveTaxInvoiceRequest) NewSaveTaxInvoiceQueryParams

func (r SaveTaxInvoiceRequest) NewSaveTaxInvoiceQueryParams() *SaveTaxInvoiceQueryParams

func (SaveTaxInvoiceRequest) NewSaveTaxInvoiceRequestBody

func (r SaveTaxInvoiceRequest) NewSaveTaxInvoiceRequestBody() SaveTaxInvoiceRequestBody

func (*SaveTaxInvoiceRequest) PathParams

func (*SaveTaxInvoiceRequest) QueryParams

func (*SaveTaxInvoiceRequest) RequestBody

func (*SaveTaxInvoiceRequest) SetMethod

func (r *SaveTaxInvoiceRequest) SetMethod(method string)

func (*SaveTaxInvoiceRequest) SetRequestBody

func (r *SaveTaxInvoiceRequest) SetRequestBody(body SaveTaxInvoiceRequestBody)

func (*SaveTaxInvoiceRequest) URL

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

type SaveTaxInvoiceRequestBody

type SaveTaxInvoiceRequestBody NewTaxInvoice

type SaveTaxInvoiceResponseBody

type SaveTaxInvoiceResponseBody TaxInvoice

type TaxInvoice

type TaxInvoice struct {
	DueDate            string `json:"DueDate"`
	FromDocument       string `json:"FromDocument"`
	FromDocumentID     int    `json:"FromDocumentId"`
	FromDocumentTypeID int    `json:"FromDocumentTypeId"`
	AllowOnlinePayment bool   `json:"AllowOnlinePayment"`
	Paid               bool   `json:"Paid"`
	Status             string `json:"Status"`
	Locked             bool   `json:"Locked"`
	CustomerID         int    `json:"CustomerId"`
	CustomerName       string `json:"CustomerName"`
	Customer           struct {
		Name     string `json:"Name"`
		Category struct {
			Description string `json:"Description"`
			ID          int    `json:"ID"`
			Modified    string `json:"Modified"`
			Created     string `json:"Created"`
		} `json:"Category"`
		SalesRepresentativeID int `json:"SalesRepresentativeId"`
		SalesRepresentative   struct {
			ID        int    `json:"ID"`
			FirstName string `json:"FirstName"`
			LastName  string `json:"LastName"`
			Name      string `json:"Name"`
			Active    bool   `json:"Active"`
			Email     string `json:"Email"`
			Mobile    string `json:"Mobile"`
			Telephone string `json:"Telephone"`
			Created   string `json:"Created"`
			Modified  string `json:"Modified"`
		} `json:"SalesRepresentative"`
		TaxReference                string  `json:"TaxReference"`
		ContactName                 string  `json:"ContactName"`
		Telephone                   string  `json:"Telephone"`
		Fax                         string  `json:"Fax"`
		Mobile                      string  `json:"Mobile"`
		Email                       string  `json:"Email"`
		WebAddress                  string  `json:"WebAddress"`
		Active                      bool    `json:"Active"`
		IsObfuscated                bool    `json:"IsObfuscated"`
		Balance                     float64 `json:"Balance"`
		CreditLimit                 float64 `json:"CreditLimit"`
		CommunicationMethod         int     `json:"CommunicationMethod"`
		PostalAddress01             string  `json:"PostalAddress01"`
		PostalAddress02             string  `json:"PostalAddress02"`
		PostalAddress03             string  `json:"PostalAddress03"`
		PostalAddress04             string  `json:"PostalAddress04"`
		PostalAddress05             string  `json:"PostalAddress05"`
		DeliveryAddress01           string  `json:"DeliveryAddress01"`
		DeliveryAddress02           string  `json:"DeliveryAddress02"`
		DeliveryAddress03           string  `json:"DeliveryAddress03"`
		DeliveryAddress04           string  `json:"DeliveryAddress04"`
		DeliveryAddress05           string  `json:"DeliveryAddress05"`
		AutoAllocateToOldestInvoice bool    `json:"AutoAllocateToOldestInvoice"`
		EnableCustomerZone          bool    `json:"EnableCustomerZone"`
		CustomerZoneGUID            string  `json:"CustomerZoneGuid"`
		CashSale                    bool    `json:"CashSale"`
		TextField1                  string  `json:"TextField1"`
		TextField2                  string  `json:"TextField2"`
		TextField3                  string  `json:"TextField3"`
		NumericField1               float64 `json:"NumericField1"`
		NumericField2               float64 `json:"NumericField2"`
		NumericField3               float64 `json:"NumericField3"`
		YesNoField1                 bool    `json:"YesNoField1"`
		YesNoField2                 bool    `json:"YesNoField2"`
		YesNoField3                 bool    `json:"YesNoField3"`
		DateField1                  string  `json:"DateField1"`
		DateField2                  string  `json:"DateField2"`
		DateField3                  string  `json:"DateField3"`
		DefaultPriceListID          int     `json:"DefaultPriceListId"`
		DefaultPriceList            struct {
			ID          int    `json:"ID"`
			Description string `json:"Description"`
			IsDefault   bool   `json:"IsDefault"`
		} `json:"DefaultPriceList"`
		DefaultPriceListName       string  `json:"DefaultPriceListName"`
		AcceptsElectronicInvoices  bool    `json:"AcceptsElectronicInvoices"`
		Modified                   string  `json:"Modified"`
		Created                    string  `json:"Created"`
		BusinessRegistrationNumber string  `json:"BusinessRegistrationNumber"`
		TaxStatusVerified          string  `json:"TaxStatusVerified"`
		CurrencyID                 int     `json:"CurrencyId"`
		CurrencySymbol             string  `json:"CurrencySymbol"`
		HasActivity                bool    `json:"HasActivity"`
		DefaultDiscountPercentage  float64 `json:"DefaultDiscountPercentage"`
		DefaultTaxTypeID           int     `json:"DefaultTaxTypeId"`
		DefaultTaxType             struct {
			ID                int     `json:"ID"`
			Name              string  `json:"Name"`
			Percentage        float64 `json:"Percentage"`
			IsDefault         bool    `json:"IsDefault"`
			HasActivity       bool    `json:"HasActivity"`
			IsManualTax       bool    `json:"IsManualTax"`
			Active            bool    `json:"Active"`
			Created           string  `json:"Created"`
			Modified          string  `json:"Modified"`
			TaxTypeDefaultUID string  `json:"TaxTypeDefaultUID"`
		} `json:"DefaultTaxType"`
		DueDateMethodID              int  `json:"DueDateMethodId"`
		DueDateMethodValue           int  `json:"DueDateMethodValue"`
		CityID                       int  `json:"CityId"`
		HasSpecialCountryTax         bool `json:"HasSpecialCountryTax"`
		AccountingAgreement          bool `json:"AccountingAgreement"`
		HasSpecialCountryTaxActivity bool `json:"HasSpecialCountryTaxActivity"`
		ID                           int  `json:"ID"`
	} `json:"Customer"`
	SalesRepresentativeID int `json:"SalesRepresentativeId"`
	SalesRepresentative   struct {
		ID        int    `json:"ID"`
		FirstName string `json:"FirstName"`
		LastName  string `json:"LastName"`
		Name      string `json:"Name"`
		Active    bool   `json:"Active"`
		Email     string `json:"Email"`
		Mobile    string `json:"Mobile"`
		Telephone string `json:"Telephone"`
		Created   string `json:"Created"`
		Modified  string `json:"Modified"`
	} `json:"SalesRepresentative"`
	StatusID             int     `json:"StatusId"`
	Modified             string  `json:"Modified"`
	Created              string  `json:"Created"`
	CustomerCurrencyID   int     `json:"Customer_CurrencyId"`
	CustomerExchangeRate float64 `json:"Customer_ExchangeRate"`
	ID                   int     `json:"ID"`
	Date                 string  `json:"Date"`
	Inclusive            bool    `json:"Inclusive"`
	DiscountPercentage   float64 `json:"DiscountPercentage"`
	TaxReference         string  `json:"TaxReference"`
	DocumentNumber       string  `json:"DocumentNumber"`
	Reference            string  `json:"Reference"`
	Message              string  `json:"Message"`
	Discount             float64 `json:"Discount"`
	Exclusive            float64 `json:"Exclusive"`
	Tax                  float64 `json:"Tax"`
	Rounding             float64 `json:"Rounding"`
	Total                float64 `json:"Total"`
	AmountDue            float64 `json:"AmountDue"`
	PostalAddress01      string  `json:"PostalAddress01"`
	PostalAddress02      string  `json:"PostalAddress02"`
	PostalAddress03      string  `json:"PostalAddress03"`
	PostalAddress04      string  `json:"PostalAddress04"`
	PostalAddress05      string  `json:"PostalAddress05"`
	DeliveryAddress01    string  `json:"DeliveryAddress01"`
	DeliveryAddress02    string  `json:"DeliveryAddress02"`
	DeliveryAddress03    string  `json:"DeliveryAddress03"`
	DeliveryAddress04    string  `json:"DeliveryAddress04"`
	DeliveryAddress05    string  `json:"DeliveryAddress05"`
	Printed              bool    `json:"Printed"`
	TaxPeriodID          int     `json:"TaxPeriodId"`
	Editable             bool    `json:"Editable"`
	HasAttachments       bool    `json:"HasAttachments"`
	HasNotes             bool    `json:"HasNotes"`
	HasAnticipatedDate   bool    `json:"HasAnticipatedDate"`
	AnticipatedDate      string  `json:"AnticipatedDate"`
	ExternalReference    string  `json:"ExternalReference"`
	UID                  string  `json:"UID"`
	Lines                []struct {
		SelectionID         int     `json:"SelectionId"`
		TaxTypeID           int     `json:"TaxTypeId"`
		ID                  int     `json:"ID"`
		Description         string  `json:"Description"`
		LineType            int     `json:"LineType"`
		Quantity            float64 `json:"Quantity"`
		UnitPriceExclusive  float64 `json:"UnitPriceExclusive"`
		Unit                string  `json:"Unit"`
		UnitPriceInclusive  float64 `json:"UnitPriceInclusive"`
		TaxPercentage       float64 `json:"TaxPercentage"`
		DiscountPercentage  float64 `json:"DiscountPercentage"`
		Exclusive           float64 `json:"Exclusive"`
		Discount            float64 `json:"Discount"`
		Tax                 float64 `json:"Tax"`
		Total               float64 `json:"Total"`
		Comments            string  `json:"Comments"`
		AnalysisCategoryID1 int     `json:"AnalysisCategoryId1"`
		AnalysisCategoryID2 int     `json:"AnalysisCategoryId2"`
		AnalysisCategoryID3 int     `json:"AnalysisCategoryId3"`
		TrackingCode        string  `json:"$TrackingCode"`
		CurrencyID          int     `json:"CurrencyId"`
		UnitCost            float64 `json:"UnitCost"`
		UID                 string  `json:"UID"`
	} `json:"Lines"`
}

type TaxInvoices

type TaxInvoices []TaxInvoice

type TaxType

type TaxType struct {
	ID                int     `json:"ID"`
	Name              string  `json:"Name"`
	Percentage        float64 `json:"Percentage"`
	IsDefault         bool    `json:"IsDefault"`
	HasActivity       bool    `json:"HasActivity"`
	IsManualTax       bool    `json:"IsManualTax"`
	Active            bool    `json:"Active"`
	Created           string  `json:"Created"`
	Modified          string  `json:"Modified,omitempty"`
	TaxTypeDefaultUID string  `json:"TaxTypeDefaultUID,omitempty"`
}

type TaxTypes

type TaxTypes []TaxType

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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