inexchange

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

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

Go to latest
Published: Feb 4, 2026 License: MIT Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

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

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.

func CreateFormFile

func CreateFormFile(w *multipart.Writer, data io.Reader, fieldname, filename string) (io.Writer, error)

Types

type Bool

type Bool bool

func (Bool) MarshalJSON

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

func (Bool) MarshalSchema

func (b Bool) MarshalSchema() string

type BuyerPartiesLookupHeaders

type BuyerPartiesLookupHeaders struct {
	TenantID string `schema:"AC-Tenant-ID,omitempty"`
}

type BuyerPartiesLookupPathParams

type BuyerPartiesLookupPathParams struct {
}

func (*BuyerPartiesLookupPathParams) Params

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

type BuyerPartiesLookupQueryParams

type BuyerPartiesLookupQueryParams struct {
	StatusCode string `schema:"statusCode,omitempty"`
	ParentID   string `schema:"parentId,omitempty"`
	Recursive  bool   `schema:"recursive,omitempty"`
	Sort       string `schema:"sort,omitempty"`
	PageNumber int32  `schema:"pageNumber,omitempty"`
	PageSize   int32  `schema:"pageSize,omitempty"`
}

func (BuyerPartiesLookupQueryParams) ToURLValues

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

type BuyerPartiesLookupRequest

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

func (*BuyerPartiesLookupRequest) Do

func (*BuyerPartiesLookupRequest) Headers

func (*BuyerPartiesLookupRequest) Method

func (r *BuyerPartiesLookupRequest) Method() string

func (*BuyerPartiesLookupRequest) NewResponseBody

func (*BuyerPartiesLookupRequest) PathParams

func (*BuyerPartiesLookupRequest) PathParamsInterface

func (r *BuyerPartiesLookupRequest) PathParamsInterface() PathParams

func (*BuyerPartiesLookupRequest) QueryParams

func (*BuyerPartiesLookupRequest) RequestBody

func (*BuyerPartiesLookupRequest) RequestBodyInterface

func (r *BuyerPartiesLookupRequest) RequestBodyInterface() any

func (*BuyerPartiesLookupRequest) SetMethod

func (r *BuyerPartiesLookupRequest) SetMethod(method string)

func (*BuyerPartiesLookupRequest) SetRequestBody

func (*BuyerPartiesLookupRequest) URL

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

type BuyerPartiesLookupRequestBody

type BuyerPartiesLookupRequestBody struct {
	// Customer number
	PartyID string `json:"PartyId,omitempty"`
	// Company name
	Name string `json:"name,omitempty"`
	// Department name
	Department string `json:"department,omitempty"`
	// Street name
	StreetName string `json:"streetName,omitempty"`
	// Post box
	PostBox string `json:"postBox,omitempty"`
	// Postal zone
	PostalZone string `json:"postalZone,omitempty"`
	// City
	City string `json:"city,omitempty"`
	// Country code, eg. SE, DK, FI etc
	CountryCode string `json:"countryCode,omitempty"`
	// Phone number
	PhoneNo string `json:"phoneNo,omitempty"`
	// Fax number
	FaxNo string `json:"faxNo,omitempty"`
	// Email
	Email string `json:"email,omitempty"`
	// GLN
	GLN string `json:"gln,omitempty"`
	// Org number
	OrgNo string `json:"orgNo,omitempty"`
	// Vat number
	VATNo string `json:"vatNo,omitempty"`
	// Peppol participant identifier, schema:idvalue
	PeppolParticipantIdentifier string `json:"peppolParticipantIdentifier,omitempty"`
	// Postal code. Use PostalZone instead. Will only be used if PostalZone isn’t set.
	PostalCode string `json:"postalCode,omitempty"`
}

type BuyerPartiesLookupResponseBody

type BuyerPartiesLookupResponseBody struct {
	Parties          Parties `json:"parties"`
	PotentialMatches int     `json:"potentialMatches"`
	ExactHit         bool    `json:"exactHit"`
}

type Client

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

Client manages communication with InvoiceXpress Client

func NewClient

func NewClient(httpClient *http.Client) *Client

NewClient returns a new InvoiceXpress 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) ClientToken

func (c *Client) ClientToken() string

func (*Client) Debug

func (c *Client) Debug() bool

func (*Client) Do

func (c *Client) Do(req *http.Request, responseBody any) (*http.Response, error)

Do sends an Client request and returns the Client response. The Client response is json decoded and stored in the value pointed to by v, or returned as an error if an Client error has occurred. If v implements the io.Writer interface, the raw response will be written to v, without attempting to decode it.

func (*Client) GetEndpointURL

func (c *Client) GetEndpointURL(relative string, pathParams PathParams) url.URL

func (*Client) MediaType

func (c *Client) MediaType() string

func (*Client) NewBuyerPartiesLookupHeaders

func (c *Client) NewBuyerPartiesLookupHeaders() *BuyerPartiesLookupHeaders

func (*Client) NewBuyerPartiesLookupPathParams

func (c *Client) NewBuyerPartiesLookupPathParams() *BuyerPartiesLookupPathParams

func (*Client) NewBuyerPartiesLookupQueryParams

func (c *Client) NewBuyerPartiesLookupQueryParams() *BuyerPartiesLookupQueryParams

func (*Client) NewBuyerPartiesLookupRequest

func (c *Client) NewBuyerPartiesLookupRequest() BuyerPartiesLookupRequest

func (*Client) NewBuyerPartiesLookupRequestBody

func (s *Client) NewBuyerPartiesLookupRequestBody() BuyerPartiesLookupRequestBody

func (*Client) NewCompaniesRegisterHeaders

func (c *Client) NewCompaniesRegisterHeaders() *CompaniesRegisterHeaders

func (*Client) NewCompaniesRegisterPathParams

func (c *Client) NewCompaniesRegisterPathParams() *CompaniesRegisterPathParams

func (*Client) NewCompaniesRegisterQueryParams

func (c *Client) NewCompaniesRegisterQueryParams() *CompaniesRegisterQueryParams

func (*Client) NewCompaniesRegisterRequest

func (c *Client) NewCompaniesRegisterRequest() CompaniesRegisterRequest

func (*Client) NewCompaniesRegisterRequestBody

func (s *Client) NewCompaniesRegisterRequestBody() CompaniesRegisterRequestBody

func (*Client) NewDocumentsFormParams

func (c *Client) NewDocumentsFormParams() *DocumentsFormParams

func (*Client) NewDocumentsHeaders

func (c *Client) NewDocumentsHeaders() *DocumentsHeaders

func (*Client) NewDocumentsOutboundHeaders

func (c *Client) NewDocumentsOutboundHeaders() *DocumentsOutboundHeaders

func (*Client) NewDocumentsOutboundListHeaders

func (c *Client) NewDocumentsOutboundListHeaders() *DocumentsOutboundListHeaders

func (*Client) NewDocumentsOutboundListPathParams

func (c *Client) NewDocumentsOutboundListPathParams() *DocumentsOutboundListPathParams

func (*Client) NewDocumentsOutboundListQueryParams

func (c *Client) NewDocumentsOutboundListQueryParams() *DocumentsOutboundListQueryParams

func (*Client) NewDocumentsOutboundListRequest

func (c *Client) NewDocumentsOutboundListRequest() DocumentsOutboundListRequest

func (*Client) NewDocumentsOutboundListRequestBody

func (s *Client) NewDocumentsOutboundListRequestBody() DocumentsOutboundListRequestBody

func (*Client) NewDocumentsOutboundPathParams

func (c *Client) NewDocumentsOutboundPathParams() *DocumentsOutboundPathParams

func (*Client) NewDocumentsOutboundQueryParams

func (c *Client) NewDocumentsOutboundQueryParams() *DocumentsOutboundQueryParams

func (*Client) NewDocumentsOutboundRequest

func (c *Client) NewDocumentsOutboundRequest() DocumentsOutboundRequest

func (*Client) NewDocumentsOutboundRequestBody

func (s *Client) NewDocumentsOutboundRequestBody() DocumentsOutboundRequestBody

func (*Client) NewDocumentsPathParams

func (c *Client) NewDocumentsPathParams() *DocumentsPathParams

func (*Client) NewDocumentsQueryParams

func (c *Client) NewDocumentsQueryParams() *DocumentsQueryParams

func (*Client) NewDocumentsRequest

func (c *Client) NewDocumentsRequest() DocumentsRequest

func (*Client) NewDocumentsRequestBody

func (s *Client) NewDocumentsRequestBody() DocumentsRequestBody

func (*Client) NewInvoicesOutboundDocumentByERPIDHeaders

func (c *Client) NewInvoicesOutboundDocumentByERPIDHeaders() *InvoicesOutboundDocumentByERPIDHeaders

func (*Client) NewInvoicesOutboundDocumentByERPIDPathParams

func (c *Client) NewInvoicesOutboundDocumentByERPIDPathParams() *InvoicesOutboundDocumentByERPIDPathParams

func (*Client) NewInvoicesOutboundDocumentByERPIDQueryParams

func (c *Client) NewInvoicesOutboundDocumentByERPIDQueryParams() *InvoicesOutboundDocumentByERPIDQueryParams

func (*Client) NewInvoicesOutboundDocumentByERPIDRequest

func (c *Client) NewInvoicesOutboundDocumentByERPIDRequest() InvoicesOutboundDocumentByERPIDRequest

func (*Client) NewInvoicesOutboundDocumentByERPIDRequestBody

func (s *Client) NewInvoicesOutboundDocumentByERPIDRequestBody() InvoicesOutboundDocumentByERPIDRequestBody

func (*Client) NewInvoicesOutboundDocumentIDHeaders

func (c *Client) NewInvoicesOutboundDocumentIDHeaders() *InvoicesOutboundDocumentIDHeaders

func (*Client) NewInvoicesOutboundDocumentIDPathParams

func (c *Client) NewInvoicesOutboundDocumentIDPathParams() *InvoicesOutboundDocumentIDPathParams

func (*Client) NewInvoicesOutboundDocumentIDQueryParams

func (c *Client) NewInvoicesOutboundDocumentIDQueryParams() *InvoicesOutboundDocumentIDQueryParams

func (*Client) NewInvoicesOutboundDocumentIDRequest

func (c *Client) NewInvoicesOutboundDocumentIDRequest() InvoicesOutboundDocumentIDRequest

func (*Client) NewInvoicesOutboundDocumentIDRequestBody

func (s *Client) NewInvoicesOutboundDocumentIDRequestBody() InvoicesOutboundDocumentIDRequestBody

func (*Client) NewNetworkSetupRequestHeaders

func (c *Client) NewNetworkSetupRequestHeaders() *NetworkSetupRequestHeaders

func (*Client) NewNetworkSetupRequestPathParams

func (c *Client) NewNetworkSetupRequestPathParams() *NetworkSetupRequestPathParams

func (*Client) NewNetworkSetupRequestQueryParams

func (c *Client) NewNetworkSetupRequestQueryParams() *NetworkSetupRequestQueryParams

func (*Client) NewNetworkSetupRequestRequest

func (c *Client) NewNetworkSetupRequestRequest() NetworkSetupRequestRequest

func (*Client) NewNetworkSetupRequestRequestBody

func (s *Client) NewNetworkSetupRequestRequestBody() NetworkSetupRequestRequestBody

func (*Client) NewRequest

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

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

func (c *Client) SetClientToken(clientToken string)

func (*Client) SetDebug

func (c *Client) SetDebug(debug bool)

func (*Client) SetDisallowUnknownFields

func (c *Client) SetDisallowUnknownFields(disallowUnknownFields bool)

func (*Client) SetMediaType

func (c *Client) SetMediaType(mediaType string)

func (*Client) SetUserAgent

func (c *Client) SetUserAgent(userAgent string)

func (*Client) Unmarshal

func (c *Client) Unmarshal(r io.Reader, vv []any, optionalVv []any) error

func (*Client) UserAgent

func (c *Client) UserAgent() string

type CompaniesRegisterHeaders

type CompaniesRegisterHeaders struct {
	TenantID string `schema:"AC-Tenant-ID,omitempty"`
}

type CompaniesRegisterPathParams

type CompaniesRegisterPathParams struct{}

func (*CompaniesRegisterPathParams) Params

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

type CompaniesRegisterQueryParams

type CompaniesRegisterQueryParams struct {
}

func (CompaniesRegisterQueryParams) ToURLValues

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

type CompaniesRegisterRequest

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

func (*CompaniesRegisterRequest) Do

func (*CompaniesRegisterRequest) Headers

func (*CompaniesRegisterRequest) Method

func (r *CompaniesRegisterRequest) Method() string

func (*CompaniesRegisterRequest) NewResponseBody

func (*CompaniesRegisterRequest) PathParams

func (*CompaniesRegisterRequest) PathParamsInterface

func (r *CompaniesRegisterRequest) PathParamsInterface() PathParams

func (*CompaniesRegisterRequest) QueryParams

func (*CompaniesRegisterRequest) RequestBody

func (*CompaniesRegisterRequest) RequestBodyInterface

func (r *CompaniesRegisterRequest) RequestBodyInterface() any

func (*CompaniesRegisterRequest) SetMethod

func (r *CompaniesRegisterRequest) SetMethod(method string)

func (*CompaniesRegisterRequest) SetRequestBody

func (*CompaniesRegisterRequest) URL

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

type CompaniesRegisterRequestBody

type CompaniesRegisterRequestBody struct {
	ErpID           string   `json:"ErpId"`
	ErpProduct      string   `json:"ErpProduct"`
	Name            string   `json:"Name"`
	Email           string   `json:"Email"`
	CountryCode     string   `json:"CountryCode"`
	AltName         string   `json:"AltName"`
	StreetName      string   `json:"StreetName"`
	Department      string   `json:"Department"`
	PostBox         string   `json:"PostBox"`
	City            string   `json:"City"`
	PostalZone      string   `json:"PostalZone"`
	PostalCode      string   `json:"PostalCode"`
	LanguageCode    string   `json:"LanguageCode"`
	PhoneNo         string   `json:"PhoneNo"`
	FaxNo           string   `json:"FaxNo"`
	OrgNo           string   `json:"OrgNo"`
	VAtNo           string   `json:"VatNo"`
	GLN             string   `json:"GLN"`
	IsVatRegistered bool     `json:"IsVatRegistered"`
	Processes       []string `json:"Processes"`
}

type CompaniesRegisterResponseBody

type CompaniesRegisterResponseBody struct{}

type Date

type Date struct {
	time.Time
}

func (Date) MarshalJSON

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

func (Date) MarshalSchema

func (d Date) MarshalSchema() string

func (*Date) UnmarshalJSON

func (d *Date) UnmarshalJSON(data []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) MarshalSchema

func (d DateTime) MarshalSchema() string

func (*DateTime) UnmarshalJSON

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

type Document

type Document struct {
	ID            string `json:"id"`
	DocumentType  string `json:"documentType"`
	CurrentStatus struct {
		Status string    `json:"status"`
		Time   time.Time `json:"time"`
	} `json:"currentStatus"`
	ErpDocumentID string `json:"erpDocumentId"`
}

type DocumentsFormParams

type DocumentsFormParams struct {
	File FormFile
}

func (DocumentsFormParams) Files

func (p DocumentsFormParams) Files() map[string]FormFile

func (DocumentsFormParams) IsMultiPart

func (p DocumentsFormParams) IsMultiPart() bool

func (DocumentsFormParams) Values

func (p DocumentsFormParams) Values() url.Values

type DocumentsHeaders

type DocumentsHeaders struct {
	TenantID string `schema:"AC-Tenant-ID,omitempty"`
}

type DocumentsOutboundBusinessToConsumer

type DocumentsOutboundBusinessToConsumer struct {
	FMI      string `json:"FMI"`
	SSN      string `json:"SSN"`
	Provider string `json:"Provider"`
}

func (DocumentsOutboundBusinessToConsumer) IsZero

type DocumentsOutboundDocument

type DocumentsOutboundDocument struct {
	DocumentFormat         string   `json:"DocumentFormat"`
	ErpDocumentID          string   `json:"ErpDocumentId"`
	DocumentURI            string   `json:"DocumentUri"`
	RenderedDocumentFormat string   `json:"RenderedDocumentFormat"`
	RenderedDocumentURI    string   `json:"RenderedDocumentUri"`
	Language               string   `json:"Language"`
	Culture                string   `json:"Culture"`
	Attachments            []string `json:"Attachments"`
}

func (DocumentsOutboundDocument) IsZero

func (do DocumentsOutboundDocument) IsZero() bool

type DocumentsOutboundElectronic

type DocumentsOutboundElectronic struct {
	RecipientID string `json:"RecipientId"`
}

func (DocumentsOutboundElectronic) IsZero

func (do DocumentsOutboundElectronic) IsZero() bool

type DocumentsOutboundHeaders

type DocumentsOutboundHeaders struct {
	TenantID string `schema:"AC-Tenant-ID,omitempty"`
}

type DocumentsOutboundListHeaders

type DocumentsOutboundListHeaders struct {
	TenantID string `schema:"AC-Tenant-ID,omitempty"`
}

type DocumentsOutboundListPathParams

type DocumentsOutboundListPathParams struct {
}

func (*DocumentsOutboundListPathParams) Params

type DocumentsOutboundListQueryParams

type DocumentsOutboundListQueryParams struct {
	StatusCode string `schema:"statusCode,omitempty"`
	ParentID   string `schema:"parentId,omitempty"`
	Recursive  bool   `schema:"recursive,omitempty"`
	Sort       string `schema:"sort,omitempty"`
	PageNumber int32  `schema:"pageNumber,omitempty"`
	PageSize   int32  `schema:"pageSize,omitempty"`
}

func (DocumentsOutboundListQueryParams) ToURLValues

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

type DocumentsOutboundListRequest

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

func (*DocumentsOutboundListRequest) Do

func (*DocumentsOutboundListRequest) Headers

func (*DocumentsOutboundListRequest) Method

func (*DocumentsOutboundListRequest) NewResponseBody

func (*DocumentsOutboundListRequest) PathParams

func (*DocumentsOutboundListRequest) PathParamsInterface

func (r *DocumentsOutboundListRequest) PathParamsInterface() PathParams

func (*DocumentsOutboundListRequest) QueryParams

func (*DocumentsOutboundListRequest) RequestBody

func (*DocumentsOutboundListRequest) RequestBodyInterface

func (r *DocumentsOutboundListRequest) RequestBodyInterface() any

func (*DocumentsOutboundListRequest) SetMethod

func (r *DocumentsOutboundListRequest) SetMethod(method string)

func (*DocumentsOutboundListRequest) SetRequestBody

func (*DocumentsOutboundListRequest) URL

type DocumentsOutboundListRequestBody

type DocumentsOutboundListRequestBody struct {
	Take             int      `json:"take,omitempty"`
	Skip             int      `json:"skip,omitempty"`
	CreatedFrom      DateTime `json:"createdFrom,omitzero"`
	CreatedTo        DateTime `json:"createdTo,omitzero"`
	UpdatedAfter     DateTime `json:"updatedAfter,omitzero"`
	DocumentType     string   `json:"documentType,omitempty"`
	Status           string   `json:"status,omitempty"`
	IgnoreStatuses   []string `json:"ignoreStatuses,omitempty"`
	IncludeFileInfo  bool     `json:"includeFileInfo,omitempty"`
	IncludeErrorInfo bool     `json:"includeErrorInfo,omitempty"`
}

type DocumentsOutboundListResponseBody

type DocumentsOutboundListResponseBody struct {
	Documents  OutboundDocuments `json:"documents"`
	TotalCount int               `json:"totalCount"`
}

type DocumentsOutboundPDF

type DocumentsOutboundPDF struct {
	RecipientEmail string `json:"RecipientEmail"`
	RecipientName  string `json:"RecipientName"`
	SenderEmail    string `json:"SenderEmail"`
	SenderName     string `json:"SenderName"`
}

func (DocumentsOutboundPDF) IsZero

func (do DocumentsOutboundPDF) IsZero() bool

type DocumentsOutboundPaper

type DocumentsOutboundPaper struct {
	RecipientAddress struct {
		Name        string `json:"Name"`
		Department  string `json:"Department"`
		StreetName  string `json:"StreetName"`
		PostBox     string `json:"PostBox"`
		PostalZone  string `json:"PostalZone"`
		City        string `json:"City"`
		CountryCode string `json:"CountryCode"`
	} `json:"RecipientAddress"`
	ReturnAddress struct {
		Name        string `json:"Name"`
		Department  string `json:"Department"`
		StreetName  string `json:"StreetName"`
		PostBox     string `json:"PostBox"`
		PostalZone  string `json:"PostalZone"`
		City        string `json:"City"`
		CountryCode string `json:"CountryCode"`
	} `json:"ReturnAddress"`
}

func (DocumentsOutboundPaper) IsZero

func (do DocumentsOutboundPaper) IsZero() bool

type DocumentsOutboundPathParams

type DocumentsOutboundPathParams struct{}

func (*DocumentsOutboundPathParams) Params

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

type DocumentsOutboundQueryParams

type DocumentsOutboundQueryParams struct {
}

func (DocumentsOutboundQueryParams) ToURLValues

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

type DocumentsOutboundRecipientInformation

type DocumentsOutboundRecipientInformation struct {
	GLN         string `json:"GLN"`
	OrgNo       string `json:"OrgNo"`
	VatNo       string `json:"VatNo"`
	Name        string `json:"Name"`
	RecipientNo string `json:"RecipientNo"`
	CountryCode string `json:"CountryCode"`
}

func (DocumentsOutboundRecipientInformation) IsZero

type DocumentsOutboundRequest

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

func (*DocumentsOutboundRequest) Do

func (*DocumentsOutboundRequest) Headers

func (*DocumentsOutboundRequest) Method

func (r *DocumentsOutboundRequest) Method() string

func (*DocumentsOutboundRequest) NewResponseBody

func (*DocumentsOutboundRequest) PathParams

func (*DocumentsOutboundRequest) PathParamsInterface

func (r *DocumentsOutboundRequest) PathParamsInterface() PathParams

func (*DocumentsOutboundRequest) QueryParams

func (*DocumentsOutboundRequest) RequestBody

func (*DocumentsOutboundRequest) RequestBodyInterface

func (r *DocumentsOutboundRequest) RequestBodyInterface() any

func (*DocumentsOutboundRequest) SetMethod

func (r *DocumentsOutboundRequest) SetMethod(method string)

func (*DocumentsOutboundRequest) SetRequestBody

func (*DocumentsOutboundRequest) URL

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

type DocumentsOutboundRequestBody

type DocumentsOutboundRequestBody struct {
	SendDocumentAs       DocumentsOutboundSendDocumentAs       `json:"SendDocumentAs"`
	RecipientInformation DocumentsOutboundRecipientInformation `json:"RecipientInformation"`
	Document             DocumentsOutboundDocument             `json:"Document"`
}

type DocumentsOutboundResponseBody

type DocumentsOutboundResponseBody struct {
	Location string `json:"location"`
}

type DocumentsOutboundSendDocumentAs

type DocumentsOutboundSendDocumentAs struct {
	// - possible values: Paper, Electronic, Pdf, BusinessToConsumer
	Type               string                              `json:"Type"`
	Paper              DocumentsOutboundPaper              `json:"Paper,omitzero"`
	Electronic         DocumentsOutboundElectronic         `json:"Electronic,omitzero"`
	Pdf                DocumentsOutboundPDF                `json:"Pdf,omitzero"`
	BusinessToConsumer DocumentsOutboundBusinessToConsumer `json:"BusinessToConsumer,omitzero"`
}

type DocumentsPathParams

type DocumentsPathParams struct{}

func (*DocumentsPathParams) Params

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

type DocumentsQueryParams

type DocumentsQueryParams struct {
}

func (DocumentsQueryParams) ToURLValues

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

type DocumentsRequest

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

func (*DocumentsRequest) Do

func (*DocumentsRequest) FormParams

func (r *DocumentsRequest) FormParams() *DocumentsFormParams

func (*DocumentsRequest) FormParamsInterface

func (r *DocumentsRequest) FormParamsInterface() Form

func (*DocumentsRequest) Headers

func (r *DocumentsRequest) Headers() *DocumentsHeaders

func (*DocumentsRequest) Method

func (r *DocumentsRequest) Method() string

func (*DocumentsRequest) NewResponseBody

func (r *DocumentsRequest) NewResponseBody() *DocumentsResponseBody

func (*DocumentsRequest) PathParams

func (r *DocumentsRequest) PathParams() *DocumentsPathParams

func (*DocumentsRequest) PathParamsInterface

func (r *DocumentsRequest) PathParamsInterface() PathParams

func (*DocumentsRequest) QueryParams

func (r *DocumentsRequest) QueryParams() *DocumentsQueryParams

func (*DocumentsRequest) RequestBody

func (r *DocumentsRequest) RequestBody() *DocumentsRequestBody

func (*DocumentsRequest) RequestBodyInterface

func (r *DocumentsRequest) RequestBodyInterface() any

func (*DocumentsRequest) SetMethod

func (r *DocumentsRequest) SetMethod(method string)

func (*DocumentsRequest) SetRequestBody

func (r *DocumentsRequest) SetRequestBody(body DocumentsRequestBody)

func (*DocumentsRequest) URL

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

type DocumentsRequestBody

type DocumentsRequestBody struct {
}

type DocumentsResponseBody

type DocumentsResponseBody struct {
	DocumentURI string `json:"DocumentURI"`
}

type ErrorResponse

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

	Message    string              `json:"message"`
	ModelState map[string][]string `json:"modelState,omitempty"`
}
{
  "message": "The request is invalid.",
  "modelState": {
    "search.PartyId": [
      "The PartyId field is required."
    ]
  }
}

func (*ErrorResponse) Error

func (r *ErrorResponse) Error() string

type Form

type Form interface {
	IsMultiPart() bool
	Values() url.Values
	Files() map[string]FormFile
}

type FormFile

type FormFile struct {
	Filename string
	Content  io.Reader
}

type Int

type Int int

func (Int) MarshalJSON

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

func (*Int) UnmarshalJSON

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

type InvoicesOutboundDocumentByERPIDHeaders

type InvoicesOutboundDocumentByERPIDHeaders struct {
	TenantID string `schema:"AC-Tenant-ID,omitempty"`
}

type InvoicesOutboundDocumentByERPIDPathParams

type InvoicesOutboundDocumentByERPIDPathParams struct {
	DocumentERPID string `schema:"document_erp_id"`
}

func (*InvoicesOutboundDocumentByERPIDPathParams) Params

type InvoicesOutboundDocumentByERPIDQueryParams

type InvoicesOutboundDocumentByERPIDQueryParams struct {
	StatusCode string `schema:"statusCode,omitempty"`
	ParentID   string `schema:"parentId,omitempty"`
	Recursive  bool   `schema:"recursive,omitempty"`
	Sort       string `schema:"sort,omitempty"`
	PageNumber int32  `schema:"pageNumber,omitempty"`
	PageSize   int32  `schema:"pageSize,omitempty"`
}

func (InvoicesOutboundDocumentByERPIDQueryParams) ToURLValues

type InvoicesOutboundDocumentByERPIDRequest

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

func (*InvoicesOutboundDocumentByERPIDRequest) Do

func (*InvoicesOutboundDocumentByERPIDRequest) Headers

func (*InvoicesOutboundDocumentByERPIDRequest) Method

func (*InvoicesOutboundDocumentByERPIDRequest) NewResponseBody

func (*InvoicesOutboundDocumentByERPIDRequest) PathParams

func (*InvoicesOutboundDocumentByERPIDRequest) PathParamsInterface

func (r *InvoicesOutboundDocumentByERPIDRequest) PathParamsInterface() PathParams

func (*InvoicesOutboundDocumentByERPIDRequest) QueryParams

func (*InvoicesOutboundDocumentByERPIDRequest) RequestBody

func (*InvoicesOutboundDocumentByERPIDRequest) RequestBodyInterface

func (r *InvoicesOutboundDocumentByERPIDRequest) RequestBodyInterface() any

func (*InvoicesOutboundDocumentByERPIDRequest) SetMethod

func (r *InvoicesOutboundDocumentByERPIDRequest) SetMethod(method string)

func (*InvoicesOutboundDocumentByERPIDRequest) SetRequestBody

func (*InvoicesOutboundDocumentByERPIDRequest) URL

type InvoicesOutboundDocumentByERPIDRequestBody

type InvoicesOutboundDocumentByERPIDRequestBody struct {
	IncludeFileInfo bool `json:"includeFileInfo,omitempty"`
}

type InvoicesOutboundDocumentByERPIDResponseBody

type InvoicesOutboundDocumentByERPIDResponseBody OutboundDocument

type InvoicesOutboundDocumentIDHeaders

type InvoicesOutboundDocumentIDHeaders struct {
	TenantID string `schema:"AC-Tenant-ID,omitempty"`
}

type InvoicesOutboundDocumentIDPathParams

type InvoicesOutboundDocumentIDPathParams struct {
	DocumentID string `schema:"document_id"`
}

func (*InvoicesOutboundDocumentIDPathParams) Params

type InvoicesOutboundDocumentIDQueryParams

type InvoicesOutboundDocumentIDQueryParams struct {
	StatusCode string `schema:"statusCode,omitempty"`
	ParentID   string `schema:"parentId,omitempty"`
	Recursive  bool   `schema:"recursive,omitempty"`
	Sort       string `schema:"sort,omitempty"`
	PageNumber int32  `schema:"pageNumber,omitempty"`
	PageSize   int32  `schema:"pageSize,omitempty"`
}

func (InvoicesOutboundDocumentIDQueryParams) ToURLValues

type InvoicesOutboundDocumentIDRequest

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

func (*InvoicesOutboundDocumentIDRequest) Do

func (*InvoicesOutboundDocumentIDRequest) Headers

func (*InvoicesOutboundDocumentIDRequest) Method

func (*InvoicesOutboundDocumentIDRequest) NewResponseBody

func (*InvoicesOutboundDocumentIDRequest) PathParams

func (*InvoicesOutboundDocumentIDRequest) PathParamsInterface

func (r *InvoicesOutboundDocumentIDRequest) PathParamsInterface() PathParams

func (*InvoicesOutboundDocumentIDRequest) QueryParams

func (*InvoicesOutboundDocumentIDRequest) RequestBody

func (*InvoicesOutboundDocumentIDRequest) RequestBodyInterface

func (r *InvoicesOutboundDocumentIDRequest) RequestBodyInterface() any

func (*InvoicesOutboundDocumentIDRequest) SetMethod

func (r *InvoicesOutboundDocumentIDRequest) SetMethod(method string)

func (*InvoicesOutboundDocumentIDRequest) SetRequestBody

func (*InvoicesOutboundDocumentIDRequest) URL

type InvoicesOutboundDocumentIDRequestBody

type InvoicesOutboundDocumentIDRequestBody struct {
	IncludeFileInfo bool `json:"includeFileInfo,omitempty"`
}

type InvoicesOutboundDocumentIDResponseBody

type InvoicesOutboundDocumentIDResponseBody Document

type NetworkSetupRequestHeaders

type NetworkSetupRequestHeaders struct {
	TenantID string `schema:"AC-Tenant-ID,omitempty"`
}

type NetworkSetupRequestPathParams

type NetworkSetupRequestPathParams struct{}

func (*NetworkSetupRequestPathParams) Params

type NetworkSetupRequestQueryParams

type NetworkSetupRequestQueryParams struct {
}

func (NetworkSetupRequestQueryParams) ToURLValues

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

type NetworkSetupRequestRequest

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

func (*NetworkSetupRequestRequest) Do

func (*NetworkSetupRequestRequest) Headers

func (*NetworkSetupRequestRequest) Method

func (r *NetworkSetupRequestRequest) Method() string

func (*NetworkSetupRequestRequest) NewResponseBody

func (*NetworkSetupRequestRequest) PathParams

func (*NetworkSetupRequestRequest) PathParamsInterface

func (r *NetworkSetupRequestRequest) PathParamsInterface() PathParams

func (*NetworkSetupRequestRequest) QueryParams

func (*NetworkSetupRequestRequest) RequestBody

func (*NetworkSetupRequestRequest) RequestBodyInterface

func (r *NetworkSetupRequestRequest) RequestBodyInterface() any

func (*NetworkSetupRequestRequest) SetMethod

func (r *NetworkSetupRequestRequest) SetMethod(method string)

func (*NetworkSetupRequestRequest) SetRequestBody

func (*NetworkSetupRequestRequest) URL

type NetworkSetupRequestRequestBody

type NetworkSetupRequestRequestBody struct {
	Operator struct {
		Name         string `json:"Name,omitempty"`
		ContactName  string `json:"ContactName,omitempty"`
		ContactPhone string `json:"ContactPhone,omitempty"`
		ContactEmail string `json:"ContactEmail,omitempty"`
	} `json:"Operator,omitempty"`

	Name                      string   `json:"Name,omitempty"`
	Department                string   `json:"Department,omitempty"`
	StreetName                string   `json:"StreetName,omitempty"`
	PostBox                   string   `json:"PostBox,omitempty"`
	City                      string   `json:"City,omitempty"`
	PostalZone                string   `json:"PostalZone,omitempty"`
	CountryCode               string   `json:"CountryCode,omitempty"`
	PhoneNo                   string   `json:"PhoneNo,omitempty"`
	FaxNo                     string   `json:"FaxNo,omitempty"`
	Email                     string   `json:"Email,omitempty"`
	GLN                       string   `json:"GLN,omitempty"`
	OrgNo                     string   `json:"OrgNo,omitempty"`
	VatNo                     string   `json:"VatNo,omitempty"`
	AttachmentUri             string   `json:"AttachmentUri,omitempty"`
	Processes                 []string `json:"Processes,omitempty"`
	NetworkSetupFeedbackEmail string   `json:"NetworkSetupFeedbackEmail,omitempty"`
}

type NetworkSetupRequestResponseBody

type NetworkSetupRequestResponseBody struct{}

type Oauth2Config

type Oauth2Config struct {
	oauth2.Config
}

func NewOauth2Config

func NewOauth2Config() *Oauth2Config

func (*Oauth2Config) SetBaseURL

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

type Oauth2PasswordConfig

type Oauth2PasswordConfig struct {
	passwordcredentials.Config
}

func NewOauth2PasswordConfig

func NewOauth2PasswordConfig() *Oauth2PasswordConfig

func (*Oauth2PasswordConfig) SetBaseURL

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

type OutboundDocument

type OutboundDocument struct {
	ID            string `json:"id"`
	DocumentType  string `json:"documentType"`
	CurrentStatus struct {
		Status string    `json:"status"`
		Time   time.Time `json:"time"`
	} `json:"currentStatus"`
	ErpDocumentID string `json:"erpDocumentId"`
	StatusHistory []struct {
		Status string    `json:"status"`
		Time   time.Time `json:"time"`
	} `json:"statusHistory"`
	Error struct {
		Message     string `json:"message"`
		Status      string `json:"status"`
		MoreInfoUri string `json:"moreInfoUri"`
	} `json:"error"`
}

type OutboundDocuments

type OutboundDocuments []OutboundDocument

type Parties

type Parties []Party

type Party

type Party struct {
	CompanyID                    string   `json:"companyId"`
	Name                         string   `json:"name"`
	AltName                      string   `json:"altName"`
	StreetName                   string   `json:"streetName"`
	PostBox                      string   `json:"postBox"`
	City                         string   `json:"city"`
	PostalZone                   string   `json:"postalZone"`
	CountryCode                  string   `json:"countryCode"`
	PhoneNo                      string   `json:"phoneNo"`
	OrgNo                        string   `json:"orgNo"`
	VatNo                        string   `json:"vatNo"`
	GLN                          string   `json:"gln"`
	PeppolParticipantIdentifiers []string `json:"peppolParticipantIdentifiers"`
	Address                      string   `json:"address"`
	Address2                     string   `json:"address2"`
	PostalCode                   string   `json:"postalCode"`
	Connected                    bool     `json:"connected"`
	// Which capabilities a company may have to receive e-invoices
	// * SendsElectronicInvoices - Company can send e-invoices
	// * CannotSendElectronicInvoices - Company cannot send e-invoices
	// * ContactRequiredBeforeSendingElectronicInvoices - Company sends e-invoices. You have to contact the company first to setup e-invoicing
	// * ErpSystemSupportsSendingElectronicInvoices - Company uses an ERP-system that support sending e-invoices, but it’s not activated
	ReceiveElectronicInvoiceCapability string `json:"receiveElectronicInvoiceCapability"`
	// Which capabilities a company may have to receive e-invoices
	// * ReceivesElectronicOrders - Company can receive e-order
	// * CannotReceiveElectronicOrders - Company cannot receive e-order
	// * ContactRequiredBeforeReceivingElectronicOrders - Company receives e-order. You can send orders but expect that they will be stopped unless you have contacted the company first and agreed on which information that is required
	// * ErpSystemSupportsReceivingElectronicOrders - Company uses an ERP-system that support receiving e-orders, but it’s not activated
	SendsElectronicOrderCapability string `json:"sendsElectronicOrderCapability"`
}

type PathParams

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

type QueryParams

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

type Request

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

type RequestCompletionCallback

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

RequestCompletionCallback defines the type of the request callback function

type StatusErrorResponse

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

func (*StatusErrorResponse) Error

func (r *StatusErrorResponse) Error() string

type Time

type Time struct {
	time.Time
}

func (Time) IsEmpty

func (d Time) IsEmpty() bool

func (*Time) MarshalJSON

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

func (Time) MarshalSchema

func (d Time) MarshalSchema() string

func (*Time) UnmarshalJSON

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

type URL

type URL url.URL

func NewURL

func NewURL(s string) (*URL, error)

func (URL) MarshalJSON

func (u URL) MarshalJSON() ([]byte, error)

func (URL) String

func (u URL) String() string

func (*URL) UnmarshalJSON

func (u *URL) UnmarshalJSON(data []byte) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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