financials

package module
v0.0.0-...-53f4bf0 Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2024 License: MIT Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	BaseURL string = "https://webservices.financials.com/services/NetSuitePort_2022_2"
)

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 xml response body that maps to ErrorResponse. Any other response body will be silently ignored.

Types

type Address

type Address struct {
	DefaultAddress bool   `xml:"DefaultAddress"`
	Name           string `xml:"Name"`
	Address1       string `xml:"Address1,omitempty"`
	Address2       string `xml:"Address2,omitempty"`
	Address3       string `xml:"Address3,omitempty"`
	Address4       string `xml:"Address4,omitempty"`
	Address5       string `xml:"Address5,omitempty"`
	Address6       string `xml:"Address6,omitempty"`
	PostCode       string `xml:"PostCode"`
	Category       string `xml:"Category"`
	Country        string `xml:"Country"`
}

type Addresses

type Addresses []Address

type AuthenticateRequest

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

func (*AuthenticateRequest) Do

func (*AuthenticateRequest) Method

func (r *AuthenticateRequest) Method() string

func (AuthenticateRequest) NewPathParams

func (AuthenticateRequest) NewQueryParams

func (AuthenticateRequest) NewRequestBody

func (r AuthenticateRequest) NewRequestBody() AuthenticateRequestBody

func (*AuthenticateRequest) NewResponseBody

func (*AuthenticateRequest) PathParams

func (r *AuthenticateRequest) PathParams() PathParams

func (*AuthenticateRequest) QueryParams

func (r *AuthenticateRequest) QueryParams() QueryParams

func (*AuthenticateRequest) RequestBody

func (r *AuthenticateRequest) RequestBody() *AuthenticateRequestBody

func (AuthenticateRequest) SOAPAction

func (r AuthenticateRequest) SOAPAction() string

func (*AuthenticateRequest) SOAPBodyInterface

func (r *AuthenticateRequest) SOAPBodyInterface() interface{}

func (AuthenticateRequest) SOAPHeader

func (r AuthenticateRequest) SOAPHeader() SOAPHeader

func (AuthenticateRequest) SOAPNS

func (r AuthenticateRequest) SOAPNS() []xml.Attr

func (*AuthenticateRequest) SetMethod

func (r *AuthenticateRequest) SetMethod(method string)

func (*AuthenticateRequest) SetRequestBody

func (r *AuthenticateRequest) SetRequestBody(body AuthenticateRequestBody)

func (*AuthenticateRequest) URL

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

type AuthenticateRequestBody

type AuthenticateRequestBody struct {
	XMLName xml.Name `xml:"AuthenticateRequest"`

	SuppressDefaultUser bool `xml:"SuppressDefaultUser"`
}

type AuthenticateRequestPathParams

type AuthenticateRequestPathParams struct {
}

func (*AuthenticateRequestPathParams) Params

type AuthenticateRequestQueryParams

type AuthenticateRequestQueryParams struct {
}

func (AuthenticateRequestQueryParams) ToURLValues

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

type AuthenticateRequestResponseBody

type AuthenticateRequestResponseBody struct {
	XMLName xml.Name `xml:"AuthenticateResponse"`

	User                   string `xml:"User"`
	UserTimestamp          string `xml:"UserTimestamp"`
	Company                string `xml:"Company"`
	Capability             string `xml:"Capability"`
	CapabilityTimestamp    string `xml:"CapabilityTimestamp"`
	PasswordExpiryWarning  string `xml:"PasswordExpiryWarning"`
	RecordLogoff           string `xml:"RecordLogoff"`
	FunctionalSecurityHash string `xml:"FunctionalSecurityHash"`
	Session                string `xml:"Session"`
}

type BeforeRequestDoCallback

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

type Body

type Body struct {
	ActionBody interface{} `xml:",any"`
}

type Bool

type Bool bool

func (*Bool) UnmarshalJSON

func (b *Bool) UnmarshalJSON(text []byte) (err error)

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, error)

func (Client) Charset

func (c Client) Charset() string

func (Client) CompanyCode

func (c Client) CompanyCode() string

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 xml 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, error)

func (Client) Locale

func (c Client) Locale() string

func (Client) MediaType

func (c Client) MediaType() string

func (*Client) NewAuthenticateRequest

func (c *Client) NewAuthenticateRequest() AuthenticateRequest

func (*Client) NewDocumentMasterListRequest

func (c *Client) NewDocumentMasterListRequest() DocumentMasterListRequest

func (*Client) NewElementMasterAddRequest

func (c *Client) NewElementMasterAddRequest() ElementMasterAddRequest

func (*Client) NewElementMasterGetRequest

func (c *Client) NewElementMasterGetRequest() ElementMasterGetRequest

func (*Client) NewElementMasterListRequest

func (c *Client) NewElementMasterListRequest() ElementMasterListRequest

func (*Client) NewEnvironmentGetRequest

func (c *Client) NewEnvironmentGetRequest() EnvironmentGetRequest

func (*Client) NewInputPostRequest

func (c *Client) NewInputPostRequest() InputPostRequest

func (*Client) NewRequest

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

func (*Client) NewSession

func (c *Client) NewSession() (string, error)

func (*Client) NewTaxGetRequest

func (c *Client) NewTaxGetRequest() TaxGetRequest

func (*Client) NewTaxListRequest

func (c *Client) NewTaxListRequest() TaxListRequest

func (Client) Password

func (c Client) Password() string

func (*Client) Session

func (c *Client) Session() (string, error)

func (*Client) SetBaseURL

func (c *Client) SetBaseURL(baseURL string)

func (*Client) SetBeforeRequestDo

func (c *Client) SetBeforeRequestDo(fun BeforeRequestDoCallback)

func (*Client) SetCharset

func (c *Client) SetCharset(charset string)

func (*Client) SetCompanyCode

func (c *Client) SetCompanyCode(companyCode string)

func (*Client) SetDebug

func (c *Client) SetDebug(debug bool)

func (*Client) SetHTTPClient

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

func (*Client) SetLocale

func (c *Client) SetLocale(locale string)

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 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 (dt DateTime) IsEmpty() bool

func (*DateTime) MarshalJSON

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

func (DateTime) MarshalSchema

func (d DateTime) MarshalSchema() string

func (*DateTime) UnmarshalJSON

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

type Decimal

type Decimal struct {
	decimal.Big
}

func (Decimal) IsEmpty

func (d Decimal) IsEmpty() bool

func (Decimal) MarshalXML

func (d Decimal) MarshalXML(e *xml.Encoder, start xml.StartElement) error

type DocSeletKey

type DocSeletKey struct {
	MaxKeys   int    `xml:"com:MaxKeys"`   // The maximum number of items to be returned. The value zero has the special meaning of 'no limit'.
	ShortName string `xml:"com:ShortName"` // The short name.
}

type DocumentMasterListRequest

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

func (*DocumentMasterListRequest) Do

func (*DocumentMasterListRequest) Method

func (r *DocumentMasterListRequest) Method() string

func (DocumentMasterListRequest) NewPathParams

func (DocumentMasterListRequest) NewQueryParams

func (DocumentMasterListRequest) NewRequestBody

func (*DocumentMasterListRequest) NewResponseBody

func (*DocumentMasterListRequest) PathParams

func (r *DocumentMasterListRequest) PathParams() PathParams

func (*DocumentMasterListRequest) QueryParams

func (r *DocumentMasterListRequest) QueryParams() QueryParams

func (*DocumentMasterListRequest) RequestBody

func (DocumentMasterListRequest) SOAPAction

func (r DocumentMasterListRequest) SOAPAction() string

func (*DocumentMasterListRequest) SOAPBodyInterface

func (r *DocumentMasterListRequest) SOAPBodyInterface() interface{}

func (DocumentMasterListRequest) SOAPHeader

func (r DocumentMasterListRequest) SOAPHeader() SOAPHeader

func (DocumentMasterListRequest) SOAPNS

func (r DocumentMasterListRequest) SOAPNS() []xml.Attr

func (*DocumentMasterListRequest) SetMethod

func (r *DocumentMasterListRequest) SetMethod(method string)

func (*DocumentMasterListRequest) SetRequestBody

func (*DocumentMasterListRequest) URL

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

type DocumentMasterListRequestBody

type DocumentMasterListRequestBody struct {
	XMLName xml.Name `xml:"web:ListRequest"`

	Filter DocSeletKey `xml:"web:Filter"`
}

type DocumentMasterListRequestPathParams

type DocumentMasterListRequestPathParams struct {
}

func (*DocumentMasterListRequestPathParams) Params

type DocumentMasterListRequestQueryParams

type DocumentMasterListRequestQueryParams struct {
}

func (DocumentMasterListRequestQueryParams) ToURLValues

type DocumentMasterListRequestResponseBody

type DocumentMasterListRequestResponseBody struct {
	XMLName xml.Name `xml:"GetEnvironmentResponse"`
}

type Element

type Element struct {
	XMLName          xml.Name  `xml:"Element"`
	CmpCode          string    `xml:"CmpCode"`
	Level            int       `xml:"Level"`
	Code             string    `xml:"Code"`
	Name             string    `xml:"Name"`
	ShortName        string    `xml:"ShortName,omitempty"`
	Matchable        bool      `xml:"Matchable"`
	AccountType      string    `xml:"AccountType"`
	CustomerSupplier bool      `xml:"CustomerSupplier"`
	IsCustomer       bool      `xml:"IsCustomer"`
	IsSupplier       bool      `xml:"IsSupplier"`
	Terms            string    `xml:"Terms"`
	PayStatus        string    `xml:"PayStatus"`
	Addresses        Addresses `xml:"Addresses>Address"`
}

type ElementFilterListFilter

type ElementFilterListFilter struct {
	MaxKeys   int    `xml:"com:MaxKeys"`   // The maximum number of items to be returned. The value zero has the special meaning of 'no limit'.
	CmpCode   string `xml:"com:CmpCode"`   // The company code.
	ShortName string `xml:"com:ShortName"` // The short name.
	Level     int    `xml:"elem:Level"`    // The element level to which the element filter master applies.
}

type ElementMasterAddRequest

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

func (*ElementMasterAddRequest) Do

func (*ElementMasterAddRequest) Method

func (r *ElementMasterAddRequest) Method() string

func (ElementMasterAddRequest) NewPathParams

func (ElementMasterAddRequest) NewQueryParams

func (ElementMasterAddRequest) NewRequestBody

func (*ElementMasterAddRequest) NewResponseBody

func (*ElementMasterAddRequest) PathParams

func (r *ElementMasterAddRequest) PathParams() PathParams

func (*ElementMasterAddRequest) QueryParams

func (r *ElementMasterAddRequest) QueryParams() QueryParams

func (*ElementMasterAddRequest) RequestBody

func (ElementMasterAddRequest) SOAPAction

func (r ElementMasterAddRequest) SOAPAction() string

func (*ElementMasterAddRequest) SOAPBodyInterface

func (r *ElementMasterAddRequest) SOAPBodyInterface() interface{}

func (ElementMasterAddRequest) SOAPHeader

func (r ElementMasterAddRequest) SOAPHeader() SOAPHeader

func (ElementMasterAddRequest) SOAPNS

func (r ElementMasterAddRequest) SOAPNS() []xml.Attr

func (*ElementMasterAddRequest) SetMethod

func (r *ElementMasterAddRequest) SetMethod(method string)

func (*ElementMasterAddRequest) SetRequestBody

func (r *ElementMasterAddRequest) SetRequestBody(body ElementMasterAddRequestBody)

func (*ElementMasterAddRequest) URL

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

type ElementMasterAddRequestBody

type ElementMasterAddRequestBody struct {
	XMLName xml.Name `xml:"AddRequest"`
	Element Element  `xml:"Element"`
}

type ElementMasterAddRequestPathParams

type ElementMasterAddRequestPathParams struct {
}

func (*ElementMasterAddRequestPathParams) Params

type ElementMasterAddRequestQueryParams

type ElementMasterAddRequestQueryParams struct {
}

func (ElementMasterAddRequestQueryParams) ToURLValues

type ElementMasterAddRequestResponseBody

type ElementMasterAddRequestResponseBody struct {
	XMLName xml.Name `xml:"GetEnvironmentResponse"`
}

type ElementMasterGetRequest

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

func (*ElementMasterGetRequest) Do

func (*ElementMasterGetRequest) Method

func (r *ElementMasterGetRequest) Method() string

func (ElementMasterGetRequest) NewPathParams

func (ElementMasterGetRequest) NewQueryParams

func (ElementMasterGetRequest) NewRequestBody

func (*ElementMasterGetRequest) NewResponseBody

func (*ElementMasterGetRequest) PathParams

func (r *ElementMasterGetRequest) PathParams() PathParams

func (*ElementMasterGetRequest) QueryParams

func (r *ElementMasterGetRequest) QueryParams() QueryParams

func (*ElementMasterGetRequest) RequestBody

func (ElementMasterGetRequest) SOAPAction

func (r ElementMasterGetRequest) SOAPAction() string

func (*ElementMasterGetRequest) SOAPBodyInterface

func (r *ElementMasterGetRequest) SOAPBodyInterface() interface{}

func (ElementMasterGetRequest) SOAPHeader

func (r ElementMasterGetRequest) SOAPHeader() SOAPHeader

func (ElementMasterGetRequest) SOAPNS

func (r ElementMasterGetRequest) SOAPNS() []xml.Attr

func (*ElementMasterGetRequest) SetMethod

func (r *ElementMasterGetRequest) SetMethod(method string)

func (*ElementMasterGetRequest) SetRequestBody

func (r *ElementMasterGetRequest) SetRequestBody(body ElementMasterGetRequestBody)

func (*ElementMasterGetRequest) URL

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

type ElementMasterGetRequestBody

type ElementMasterGetRequestBody struct {
	XMLName xml.Name `xml:"GetRequest"`
	Key     struct {
		CmpCode string `xml:"elem:CmpCode"`
		Level   int    `xml:"elem:Level"`
		Code    string `xml:"elem:Code,omitempty"`
	} `xml:"Key"`
}

type ElementMasterGetRequestPathParams

type ElementMasterGetRequestPathParams struct {
}

func (*ElementMasterGetRequestPathParams) Params

type ElementMasterGetRequestQueryParams

type ElementMasterGetRequestQueryParams struct {
}

func (ElementMasterGetRequestQueryParams) ToURLValues

type ElementMasterGetRequestResponseBody

type ElementMasterGetRequestResponseBody struct {
	XMLName xml.Name `xml:"GetResponse"`

	CmpCode string  `xml:"CmpCode"`
	Level   string  `xml:"Level"`
	Code    string  `xml:"Code"`
	Element Element `xml:"Element"`
}

type ElementMasterListRequest

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

func (*ElementMasterListRequest) Do

func (*ElementMasterListRequest) Method

func (r *ElementMasterListRequest) Method() string

func (ElementMasterListRequest) NewPathParams

func (ElementMasterListRequest) NewQueryParams

func (ElementMasterListRequest) NewRequestBody

func (*ElementMasterListRequest) NewResponseBody

func (*ElementMasterListRequest) PathParams

func (r *ElementMasterListRequest) PathParams() PathParams

func (*ElementMasterListRequest) QueryParams

func (r *ElementMasterListRequest) QueryParams() QueryParams

func (*ElementMasterListRequest) RequestBody

func (ElementMasterListRequest) SOAPAction

func (r ElementMasterListRequest) SOAPAction() string

func (*ElementMasterListRequest) SOAPBodyInterface

func (r *ElementMasterListRequest) SOAPBodyInterface() interface{}

func (ElementMasterListRequest) SOAPHeader

func (r ElementMasterListRequest) SOAPHeader() SOAPHeader

func (ElementMasterListRequest) SOAPNS

func (r ElementMasterListRequest) SOAPNS() []xml.Attr

func (*ElementMasterListRequest) SetMethod

func (r *ElementMasterListRequest) SetMethod(method string)

func (*ElementMasterListRequest) SetRequestBody

func (*ElementMasterListRequest) URL

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

type ElementMasterListRequestBody

type ElementMasterListRequestBody struct {
	XMLName xml.Name `xml:"web:ListRequest"`

	Filter ElmReqFullKeys `xml:"web:Filter"`
}

type ElementMasterListRequestPathParams

type ElementMasterListRequestPathParams struct {
}

func (*ElementMasterListRequestPathParams) Params

type ElementMasterListRequestQueryParams

type ElementMasterListRequestQueryParams struct {
}

func (ElementMasterListRequestQueryParams) ToURLValues

type ElementMasterListRequestResponseBody

type ElementMasterListRequestResponseBody struct {
	XMLName xml.Name `xml:"GetEnvironmentResponse"`
}

type ElmReqFullKeys

type ElmReqFullKeys struct {
	MaxKeys     int `xml:"MaxKeys"`
	FullWildKey struct {
		CmpCode string `xml:"CmpCode"`
		Level   int    `xml:"Level"`
		Code    string `xml:"Code"`
	} `xml:"FullWildKey"`
}

type EnvironmentGetRequest

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

func (*EnvironmentGetRequest) Do

func (*EnvironmentGetRequest) Method

func (r *EnvironmentGetRequest) Method() string

func (EnvironmentGetRequest) NewPathParams

func (EnvironmentGetRequest) NewQueryParams

func (EnvironmentGetRequest) NewRequestBody

func (*EnvironmentGetRequest) NewResponseBody

func (*EnvironmentGetRequest) PathParams

func (r *EnvironmentGetRequest) PathParams() PathParams

func (*EnvironmentGetRequest) QueryParams

func (r *EnvironmentGetRequest) QueryParams() QueryParams

func (*EnvironmentGetRequest) RequestBody

func (EnvironmentGetRequest) SOAPAction

func (r EnvironmentGetRequest) SOAPAction() string

func (*EnvironmentGetRequest) SOAPBodyInterface

func (r *EnvironmentGetRequest) SOAPBodyInterface() interface{}

func (EnvironmentGetRequest) SOAPHeader

func (r EnvironmentGetRequest) SOAPHeader() SOAPHeader

func (EnvironmentGetRequest) SOAPNS

func (r EnvironmentGetRequest) SOAPNS() []xml.Attr

func (*EnvironmentGetRequest) SetMethod

func (r *EnvironmentGetRequest) SetMethod(method string)

func (*EnvironmentGetRequest) SetRequestBody

func (r *EnvironmentGetRequest) SetRequestBody(body EnvironmentGetRequestBody)

func (*EnvironmentGetRequest) URL

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

type EnvironmentGetRequestBody

type EnvironmentGetRequestBody struct {
	XMLName xml.Name `xml:"GetEnvironmentRequest"`
}

type EnvironmentGetRequestPathParams

type EnvironmentGetRequestPathParams struct {
}

func (*EnvironmentGetRequestPathParams) Params

type EnvironmentGetRequestQueryParams

type EnvironmentGetRequestQueryParams struct {
}

func (EnvironmentGetRequestQueryParams) ToURLValues

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

type EnvironmentGetRequestResponseBody

type EnvironmentGetRequestResponseBody struct {
	XMLName xml.Name `xml:"GetEnvironmentResponse"`

	Text        string `xml:",chardata"`
	Webservice  string `xml:"webservice,attr"`
	Xmlns       string `xml:"xmlns,attr"`
	Com         string `xml:"com,attr"`
	Environment struct {
		CmpCode           string `xml:"CmpCode"`
		CapCode           string `xml:"CapCode"`
		HomeCurr          string `xml:"HomeCurr"`
		DateOrder         string `xml:"DateOrder"`
		DateDisplay       string `xml:"DateDisplay"`
		DateSep           string `xml:"DateSep"`
		HomeCurrDps       string `xml:"HomeCurrDps"`
		HomeCurrSymbol    string `xml:"HomeCurrSymbol"`
		HomeCurrSymbolPos string `xml:"HomeCurrSymbolPos"`
		HomeCurrLinkType  string `xml:"HomeCurrLinkType"`
		HomeCurrParent    string `xml:"HomeCurrParent"`
		CurrentPeriod     string `xml:"CurrentPeriod"`
		CmpTimeStamp      string `xml:"CmpTimeStamp"`
		CapTimeStamp      string `xml:"CapTimeStamp"`
		UsrTimeStamp      string `xml:"UsrTimeStamp"`
		ServerVersion     string `xml:"ServerVersion"`
		SubsChar          string `xml:"SubsChar"`
	} `xml:"Environment"`
}

type ErrorResponse

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

func (*ErrorResponse) Error

func (r *ErrorResponse) Error() string
type Header struct {
	Key struct {
		CmpCode string `xml:"CmpCode"`
		Code    string `xml:"Code"`
	} `xml:"Key"`
	Period          string   `xml:"Period"`
	CurCode         string   `xml:"CurCode"`
	Date            DateTime `xml:"Date"`
	Description     string   `xml:"Description"`
	OriginalCompany string   `xml:"OriginalCompany"`
}

func (Header) MarshalXML

func (h Header) MarshalXML(e *xml.Encoder, start xml.StartElement) error

type InputPostRequest

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

func (*InputPostRequest) Do

func (*InputPostRequest) Method

func (r *InputPostRequest) Method() string

func (InputPostRequest) NewPathParams

func (r InputPostRequest) NewPathParams() *InputPostRequestPathParams

func (InputPostRequest) NewQueryParams

func (r InputPostRequest) NewQueryParams() *InputPostRequestQueryParams

func (InputPostRequest) NewRequestBody

func (r InputPostRequest) NewRequestBody() InputPostRequestBody

func (*InputPostRequest) NewResponseBody

func (r *InputPostRequest) NewResponseBody() *InputPostRequestResponseBody

func (*InputPostRequest) PathParams

func (r *InputPostRequest) PathParams() PathParams

func (*InputPostRequest) QueryParams

func (r *InputPostRequest) QueryParams() QueryParams

func (*InputPostRequest) RequestBody

func (r *InputPostRequest) RequestBody() *InputPostRequestBody

func (InputPostRequest) SOAPAction

func (r InputPostRequest) SOAPAction() string

func (*InputPostRequest) SOAPBodyInterface

func (r *InputPostRequest) SOAPBodyInterface() interface{}

func (InputPostRequest) SOAPHeader

func (r InputPostRequest) SOAPHeader() SOAPHeader

func (InputPostRequest) SOAPNS

func (r InputPostRequest) SOAPNS() []xml.Attr

func (*InputPostRequest) SetMethod

func (r *InputPostRequest) SetMethod(method string)

func (*InputPostRequest) SetRequestBody

func (r *InputPostRequest) SetRequestBody(body InputPostRequestBody)

func (*InputPostRequest) URL

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

type InputPostRequestBody

type InputPostRequestBody struct {
	XMLName xml.Name `xml:"web:PostRequest"`

	PostOptions struct {
		Postto string `xml:"postto,attr"`
	} `xml:"web:PostOptions"`
	Transaction Transaction `xml:"web:Transaction"`
}

type InputPostRequestPathParams

type InputPostRequestPathParams struct {
}

func (*InputPostRequestPathParams) Params

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

type InputPostRequestQueryParams

type InputPostRequestQueryParams struct {
}

func (InputPostRequestQueryParams) ToURLValues

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

type InputPostRequestResponseBody

type InputPostRequestResponseBody struct {
	XMLName xml.Name `xml:"GetEnvironmentResponse"`
}

type Line

type Line struct {
	Number           int      `xml:"Number,omitempty"`
	AccountCode      string   `xml:"AccountCode"`
	BalancingAccount string   `xml:"BalancingAccount,omitempty"`
	DocValue         Decimal  `xml:"DocValue"`
	LineType         string   `xml:"LineType"`
	LineSense        string   `xml:"LineSense"`
	Description      string   `xml:"Description"`
	DueDate          DateTime `xml:"DueDate,omitempty"`
	ExtRef1          string   `xml:"ExtRef1,omitempty"`
	ExtRef2          string   `xml:"ExtRef2,omitempty"`
	ExtRef3          string   `xml:"ExtRef3,omitempty"`
	ExtRef4          string   `xml:"ExtRef4,omitempty"`
	ExtRef5          string   `xml:"ExtRef5,omitempty"`
	ExtRef6          string   `xml:"ExtRef6,omitempty"`
	Taxes            Taxes    `xml:"Taxes>Tax,omitempty"`
	TaxLineCode      string   `xml:"TaxLineCode,omitempty"`
	DocTaxTurnover   Decimal  `xml:"DocTaxTurnover,omitempty"`
	DocSumTax        Decimal  `xml:"DocSumTax,omitempty"`
}

func (Line) MarshalXML

func (l Line) MarshalXML(e *xml.Encoder, start xml.StartElement) error

type Lines

type Lines []Line

type Options

type Options struct {
	Locale  string `xml:"locale,attr"`
	Session string `xml:"session,attr,omitempty"`
}

type PathParams

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

type QueryParams

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

type ReqKeys

type ReqKeys struct {
	MaxKeys int `xml:"com:MaxKeys"` // The maximum number of items to be returned. The value zero has the special meaning of 'no limit'.
	Key     struct {
		CmpCode string `xml:"com:CmpCode,omitepty"`
		Code    string `xml:"com:Code,omitempty"`
	} `xml:"com:Key"`
}

type Request

type Request interface {
	Method() string
	// QueryParams() QueryParams
	PathParams() PathParams
	SOAPBodyInterface() interface{}
	SOAPHeader() SOAPHeader
	URL() (*url.URL, error)
	SOAPAction() string
}

type RequestCompletionCallback

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

RequestCompletionCallback defines the type of the request callback function

type RequestEnvelope

type RequestEnvelope struct {
	XMLName xml.Name

	NS     []xml.Attr `xml:"-"`
	Header SOAPHeader `xml:"env:Header,omitempty"`
	Body   Body       `xml:"env:Body"`
}

func NewRequestEnvelope

func NewRequestEnvelope() RequestEnvelope

func (RequestEnvelope) MarshalXML

func (env RequestEnvelope) MarshalXML(e *xml.Encoder, start xml.StartElement) error

type ResponseEnvelope

type ResponseEnvelope struct {
	XMLName xml.Name

	Header SOAPHeader `xml:"Header,omitempty"`
	Body   Body       `xml:"Body"`
}

type SOAPError

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

func (SOAPError) Error

func (e SOAPError) Error() string

type SOAPFault

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

	XMLName     xml.Name `xml:"Fault"`
	Faultcode   string   `xml:"faultcode"`
	Faultstring string   `xml:"faultstring"`
	Detail      struct {
		Reason struct {
			Text struct {
				Code int    `xml:"Code,attr"`
				Text string `xml:",chardata"`
			} `xml:"Text"`
			Path string `xml:"Path"`
		} `xml:"Reason"`
	} `xml:"detail"`
}

func (SOAPFault) Error

func (f SOAPFault) Error() string

type SOAPHeader

type SOAPHeader struct {
	Options Options `xml:"Options"`
}

func NewSOAPHeader

func NewSOAPHeader() SOAPHeader

func (SOAPHeader) IsEmpty

func (h SOAPHeader) IsEmpty() bool

func (SOAPHeader) MarshalXML

func (h SOAPHeader) MarshalXML(e *xml.Encoder, start xml.StartElement) error

type StatusResponseBody

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

	Node struct {
	} `xml:",any"`
}

type Tax

type Tax struct {
	Code  string  `xml:"Code"`
	Value Decimal `xml:"Value"`
}

func (Tax) IsEmpty

func (t Tax) IsEmpty() bool

func (Tax) MarshalXML

func (t Tax) MarshalXML(e *xml.Encoder, start xml.StartElement) error

type TaxGetRequest

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

func (*TaxGetRequest) Do

func (*TaxGetRequest) Method

func (r *TaxGetRequest) Method() string

func (TaxGetRequest) NewPathParams

func (r TaxGetRequest) NewPathParams() *TaxGetRequestPathParams

func (TaxGetRequest) NewQueryParams

func (r TaxGetRequest) NewQueryParams() *TaxGetRequestQueryParams

func (TaxGetRequest) NewRequestBody

func (r TaxGetRequest) NewRequestBody() TaxGetRequestBody

func (*TaxGetRequest) NewResponseBody

func (r *TaxGetRequest) NewResponseBody() *TaxGetRequestResponseBody

func (*TaxGetRequest) PathParams

func (r *TaxGetRequest) PathParams() PathParams

func (*TaxGetRequest) QueryParams

func (r *TaxGetRequest) QueryParams() QueryParams

func (*TaxGetRequest) RequestBody

func (r *TaxGetRequest) RequestBody() *TaxGetRequestBody

func (TaxGetRequest) SOAPAction

func (r TaxGetRequest) SOAPAction() string

func (*TaxGetRequest) SOAPBodyInterface

func (r *TaxGetRequest) SOAPBodyInterface() interface{}

func (TaxGetRequest) SOAPHeader

func (r TaxGetRequest) SOAPHeader() SOAPHeader

func (TaxGetRequest) SOAPNS

func (r TaxGetRequest) SOAPNS() []xml.Attr

func (*TaxGetRequest) SetMethod

func (r *TaxGetRequest) SetMethod(method string)

func (*TaxGetRequest) SetRequestBody

func (r *TaxGetRequest) SetRequestBody(body TaxGetRequestBody)

func (*TaxGetRequest) URL

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

type TaxGetRequestBody

type TaxGetRequestBody struct {
	XMLName xml.Name `xml:"GetRequest"`
	Key     struct {
		CmpCode string `xml:"elem:CmpCode"`
		Code    string `xml:"elem:Code,omitempty"`
	} `xml:"Key"`
}

type TaxGetRequestPathParams

type TaxGetRequestPathParams struct {
}

func (*TaxGetRequestPathParams) Params

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

type TaxGetRequestQueryParams

type TaxGetRequestQueryParams struct {
}

func (TaxGetRequestQueryParams) ToURLValues

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

type TaxGetRequestResponseBody

type TaxGetRequestResponseBody struct {
	XMLName xml.Name `xml:"GetResponse"`

	Text       string    `xml:",chardata"`
	Webservice string    `xml:"webservice,attr"`
	Xmlns      string    `xml:"xmlns,attr"`
	Com        string    `xml:"com,attr"`
	CmpCode    string    `xml:"CmpCode"`
	Code       string    `xml:"Code"`
	Tax        TaxMaster `xml:"Tax"`
}

type TaxListRequest

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

func (*TaxListRequest) Do

func (*TaxListRequest) Method

func (r *TaxListRequest) Method() string

func (TaxListRequest) NewPathParams

func (r TaxListRequest) NewPathParams() *TaxListRequestPathParams

func (TaxListRequest) NewQueryParams

func (r TaxListRequest) NewQueryParams() *TaxListRequestQueryParams

func (TaxListRequest) NewRequestBody

func (r TaxListRequest) NewRequestBody() TaxListRequestBody

func (*TaxListRequest) NewResponseBody

func (r *TaxListRequest) NewResponseBody() *TaxListRequestResponseBody

func (*TaxListRequest) PathParams

func (r *TaxListRequest) PathParams() PathParams

func (*TaxListRequest) QueryParams

func (r *TaxListRequest) QueryParams() QueryParams

func (*TaxListRequest) RequestBody

func (r *TaxListRequest) RequestBody() *TaxListRequestBody

func (TaxListRequest) SOAPAction

func (r TaxListRequest) SOAPAction() string

func (*TaxListRequest) SOAPBodyInterface

func (r *TaxListRequest) SOAPBodyInterface() interface{}

func (TaxListRequest) SOAPHeader

func (r TaxListRequest) SOAPHeader() SOAPHeader

func (TaxListRequest) SOAPNS

func (r TaxListRequest) SOAPNS() []xml.Attr

func (*TaxListRequest) SetMethod

func (r *TaxListRequest) SetMethod(method string)

func (*TaxListRequest) SetRequestBody

func (r *TaxListRequest) SetRequestBody(body TaxListRequestBody)

func (*TaxListRequest) URL

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

type TaxListRequestBody

type TaxListRequestBody struct {
	XMLName xml.Name `xml:"web:ListRequest"`

	Filter ReqKeys `xml:"web:Filter"`
}

type TaxListRequestPathParams

type TaxListRequestPathParams struct {
}

func (*TaxListRequestPathParams) Params

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

type TaxListRequestQueryParams

type TaxListRequestQueryParams struct {
}

func (TaxListRequestQueryParams) ToURLValues

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

type TaxListRequestResponseBody

type TaxListRequestResponseBody struct {
	XMLName xml.Name `xml:"ListResponse"`

	Webservice string `xml:"webservice,attr"`
	Com        string `xml:"com,attr"`
	Filter     struct {
		MaxKeys string `xml:"MaxKeys"`
		Key     struct {
			CmpCode string `xml:"CmpCode"`
			Code    string `xml:"Code"`
		} `xml:"Key"`
	} `xml:"Filter"`
	Keys []struct {
		Code      string `xml:"Code"`
		ShortName string `xml:"ShortName"`
	} `xml:"Keys>Key"`
}

type TaxMaster

type TaxMaster struct {
	TimeStamp           string `xml:"TimeStamp"`
	CmpCode             string `xml:"CmpCode"`
	Code                string `xml:"Code"`
	Name                string `xml:"Name"`
	ShortName           string `xml:"ShortName"`
	RecoveryScope       string `xml:"RecoveryScope"`
	Rev                 string `xml:"Rev"`
	RecoverAcc          string `xml:"RecoverAcc"`
	RecoverRevAcc       string `xml:"RecoverRevAcc"`
	IrrecoverToGoods    string `xml:"IrrecoverToGoods"`
	IrrecoverAcc        string `xml:"IrrecoverAcc"`
	IrrecoverRevToGoods string `xml:"IrrecoverRevToGoods"`
	IrrecoverRevAcc     string `xml:"IrrecoverRevAcc"`
	DestCode            string `xml:"DestCode"`
	Intercompany        string `xml:"Intercompany"`
	IsDeferredVAT       string `xml:"IsDeferredVAT"`
	DeferredAccount     string `xml:"DeferredAccount"`
	CollectionAccount   string `xml:"CollectionAccount"`
	RateInfoList        struct {
		RateInfo struct {
			EffectiveDate      string `xml:"EffectiveDate"`
			Rate               string `xml:"Rate"`
			RecoveryPercentage string `xml:"RecoveryPercentage"`
		} `xml:"RateInfo"`
	} `xml:"RateInfoList"`
}

type Taxes

type Taxes []Tax

func (Taxes) IsEmpty

func (t Taxes) IsEmpty() bool

type Transaction

type Transaction struct {
	Header Header `xml:"Header"`
	Lines  Lines  `xml:"Lines>Line"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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