invoicesv20240619

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Overview

Package invoicesv20240619 provides primitives to interact with the openapi HTTP API.

Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.4.1 DO NOT EDIT.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCreateInvoicesExportRequest

func NewCreateInvoicesExportRequest(server string, body CreateInvoicesExportJSONRequestBody) (*http.Request, error)

NewCreateInvoicesExportRequest calls the generic CreateInvoicesExport builder with application/json body

func NewCreateInvoicesExportRequestWithBody

func NewCreateInvoicesExportRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)

NewCreateInvoicesExportRequestWithBody generates requests for CreateInvoicesExport with any type of body

func NewGetInvoiceRequest

func NewGetInvoiceRequest(server string, invoiceId string, params *GetInvoiceParams) (*http.Request, error)

NewGetInvoiceRequest generates requests for GetInvoice

func NewGetInvoicesAttributesRequest

func NewGetInvoicesAttributesRequest(server string, params *GetInvoicesAttributesParams) (*http.Request, error)

NewGetInvoicesAttributesRequest generates requests for GetInvoicesAttributes

func NewGetInvoicesDocumentRequest

func NewGetInvoicesDocumentRequest(server string, invoicesDocumentId string) (*http.Request, error)

NewGetInvoicesDocumentRequest generates requests for GetInvoicesDocument

func NewGetInvoicesExportRequest

func NewGetInvoicesExportRequest(server string, exportId string) (*http.Request, error)

NewGetInvoicesExportRequest generates requests for GetInvoicesExport

func NewGetInvoicesExportsRequest

func NewGetInvoicesExportsRequest(server string, params *GetInvoicesExportsParams) (*http.Request, error)

NewGetInvoicesExportsRequest generates requests for GetInvoicesExports

func NewGetInvoicesRequest

func NewGetInvoicesRequest(server string, params *GetInvoicesParams) (*http.Request, error)

NewGetInvoicesRequest generates requests for GetInvoices

Types

type AttributeOption

type AttributeOption struct {
	// Description The description of the attribute value.
	Description *string `json:"description,omitempty"`

	// Value The possible values for the attribute option.
	Value *string `json:"value,omitempty"`
}

AttributeOption The definition of the attribute option.

type Client

type Client struct {
	// The endpoint of the server conforming to this interface, with scheme,
	// https://api.deepmap.com for example. This can contain a path relative
	// to the server, such as https://api.deepmap.com/dev-test, and all the
	// paths in the swagger spec will be appended to the server.
	Server string

	// Doer for performing requests, typically a *http.Client with any
	// customized settings, such as certificate chains.
	Client HttpRequestDoer

	// A list of callbacks for modifying requests which are generated before sending over
	// the network.
	RequestEditors []RequestEditorFn

	// A callback for modifying response which are generated after receive from the network.
	ResponseEditors []ResponseEditorFn

	// The user agent header identifies your application, its version number, and the platform and programming language you are using.
	// You must include a user agent header in each request submitted to the sales partner API.
	UserAgent string
}

Client which conforms to the OpenAPI3 specification for this service.

func NewClient

func NewClient(server string, opts ...ClientOption) (*Client, error)

Creates a new Client, with reasonable defaults

func (*Client) CreateInvoicesExport

func (c *Client) CreateInvoicesExport(ctx context.Context, body CreateInvoicesExportJSONRequestBody) (*http.Response, error)

func (*Client) CreateInvoicesExportWithBody

func (c *Client) CreateInvoicesExportWithBody(ctx context.Context, contentType string, body io.Reader) (*http.Response, error)

func (*Client) GetInvoice

func (c *Client) GetInvoice(ctx context.Context, invoiceId string, params *GetInvoiceParams) (*http.Response, error)

func (*Client) GetInvoices

func (c *Client) GetInvoices(ctx context.Context, params *GetInvoicesParams) (*http.Response, error)

func (*Client) GetInvoicesAttributes

func (c *Client) GetInvoicesAttributes(ctx context.Context, params *GetInvoicesAttributesParams) (*http.Response, error)

func (*Client) GetInvoicesDocument

func (c *Client) GetInvoicesDocument(ctx context.Context, invoicesDocumentId string) (*http.Response, error)

func (*Client) GetInvoicesExport

func (c *Client) GetInvoicesExport(ctx context.Context, exportId string) (*http.Response, error)

func (*Client) GetInvoicesExports

func (c *Client) GetInvoicesExports(ctx context.Context, params *GetInvoicesExportsParams) (*http.Response, error)

type ClientInterface

type ClientInterface interface {
	// GetInvoicesAttributes request
	GetInvoicesAttributes(ctx context.Context, params *GetInvoicesAttributesParams) (*http.Response, error)

	// GetInvoicesDocument request
	GetInvoicesDocument(ctx context.Context, invoicesDocumentId string) (*http.Response, error)

	// GetInvoicesExports request
	GetInvoicesExports(ctx context.Context, params *GetInvoicesExportsParams) (*http.Response, error)

	// CreateInvoicesExportWithBody request with any body
	CreateInvoicesExportWithBody(ctx context.Context, contentType string, body io.Reader) (*http.Response, error)

	CreateInvoicesExport(ctx context.Context, body CreateInvoicesExportJSONRequestBody) (*http.Response, error)

	// GetInvoicesExport request
	GetInvoicesExport(ctx context.Context, exportId string) (*http.Response, error)

	// GetInvoices request
	GetInvoices(ctx context.Context, params *GetInvoicesParams) (*http.Response, error)

	// GetInvoice request
	GetInvoice(ctx context.Context, invoiceId string, params *GetInvoiceParams) (*http.Response, error)
}

The interface specification for the client above.

type ClientOption

type ClientOption func(*Client) error

ClientOption allows setting custom parameters during construction

func WithBaseURL

func WithBaseURL(baseURL string) ClientOption

WithBaseURL overrides the baseURL.

func WithHTTPClient

func WithHTTPClient(doer HttpRequestDoer) ClientOption

WithHTTPClient allows overriding the default Doer, which is automatically created using http.Client. This is useful for tests.

func WithRequestEditorFn

func WithRequestEditorFn(fn RequestEditorFn) ClientOption

WithRequestEditorFn allows setting up a callback function, which will be called right before sending the request. This can be used to mutate the request.

func WithResponseEditorFn

func WithResponseEditorFn(fn ResponseEditorFn) ClientOption

WithResponseEditorFn allows setting up a callback function, which will be called right after receive the response.

type ClientWithResponses

type ClientWithResponses struct {
	ClientInterface
}

func NewClientWithResponses

func NewClientWithResponses(server string, opts ...ClientOption) (*ClientWithResponses, error)

NewClientWithResponses creates a new ClientWithResponses, which wraps Client with return type handling

func (*ClientWithResponses) CreateInvoicesExportWithBodyWithResponse

func (c *ClientWithResponses) CreateInvoicesExportWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader) (*CreateInvoicesExportResp, error)

CreateInvoicesExportWithBodyWithResponse request with arbitrary body returning *CreateInvoicesExportResp

func (*ClientWithResponses) CreateInvoicesExportWithResponse

func (c *ClientWithResponses) CreateInvoicesExportWithResponse(ctx context.Context, body CreateInvoicesExportJSONRequestBody) (*CreateInvoicesExportResp, error)

func (*ClientWithResponses) GetInvoiceWithResponse

func (c *ClientWithResponses) GetInvoiceWithResponse(ctx context.Context, invoiceId string, params *GetInvoiceParams) (*GetInvoiceResp, error)

GetInvoiceWithResponse request returning *GetInvoiceResp

func (*ClientWithResponses) GetInvoicesAttributesWithResponse

func (c *ClientWithResponses) GetInvoicesAttributesWithResponse(ctx context.Context, params *GetInvoicesAttributesParams) (*GetInvoicesAttributesResp, error)

GetInvoicesAttributesWithResponse request returning *GetInvoicesAttributesResp

func (*ClientWithResponses) GetInvoicesDocumentWithResponse

func (c *ClientWithResponses) GetInvoicesDocumentWithResponse(ctx context.Context, invoicesDocumentId string) (*GetInvoicesDocumentResp, error)

GetInvoicesDocumentWithResponse request returning *GetInvoicesDocumentResp

func (*ClientWithResponses) GetInvoicesExportWithResponse

func (c *ClientWithResponses) GetInvoicesExportWithResponse(ctx context.Context, exportId string) (*GetInvoicesExportResp, error)

GetInvoicesExportWithResponse request returning *GetInvoicesExportResp

func (*ClientWithResponses) GetInvoicesExportsWithResponse

func (c *ClientWithResponses) GetInvoicesExportsWithResponse(ctx context.Context, params *GetInvoicesExportsParams) (*GetInvoicesExportsResp, error)

GetInvoicesExportsWithResponse request returning *GetInvoicesExportsResp

func (*ClientWithResponses) GetInvoicesWithResponse

func (c *ClientWithResponses) GetInvoicesWithResponse(ctx context.Context, params *GetInvoicesParams) (*GetInvoicesResp, error)

GetInvoicesWithResponse request returning *GetInvoicesResp

type ClientWithResponsesInterface

type ClientWithResponsesInterface interface {
	// GetInvoicesAttributesWithResponse request
	GetInvoicesAttributesWithResponse(ctx context.Context, params *GetInvoicesAttributesParams) (*GetInvoicesAttributesResp, error)

	// GetInvoicesDocumentWithResponse request
	GetInvoicesDocumentWithResponse(ctx context.Context, invoicesDocumentId string) (*GetInvoicesDocumentResp, error)

	// GetInvoicesExportsWithResponse request
	GetInvoicesExportsWithResponse(ctx context.Context, params *GetInvoicesExportsParams) (*GetInvoicesExportsResp, error)

	// CreateInvoicesExportWithBodyWithResponse request with any body
	CreateInvoicesExportWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader) (*CreateInvoicesExportResp, error)

	CreateInvoicesExportWithResponse(ctx context.Context, body CreateInvoicesExportJSONRequestBody) (*CreateInvoicesExportResp, error)

	// GetInvoicesExportWithResponse request
	GetInvoicesExportWithResponse(ctx context.Context, exportId string) (*GetInvoicesExportResp, error)

	// GetInvoicesWithResponse request
	GetInvoicesWithResponse(ctx context.Context, params *GetInvoicesParams) (*GetInvoicesResp, error)

	// GetInvoiceWithResponse request
	GetInvoiceWithResponse(ctx context.Context, invoiceId string, params *GetInvoiceParams) (*GetInvoiceResp, error)
}

ClientWithResponsesInterface is the interface specification for the client with responses above.

type CreateInvoicesExportJSONRequestBody

type CreateInvoicesExportJSONRequestBody = ExportInvoicesRequest

CreateInvoicesExportJSONRequestBody defines body for CreateInvoicesExport for application/json ContentType.

type CreateInvoicesExportResp

type CreateInvoicesExportResp struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON202      *ExportInvoicesResponse
	JSON400      *ErrorList
	JSON401      *ErrorList
	JSON403      *ErrorList
	JSON404      *ErrorList
	JSON413      *ErrorList
	JSON415      *ErrorList
	JSON429      *ErrorList
	JSON500      *ErrorList
	JSON503      *ErrorList
}

func ParseCreateInvoicesExportResp

func ParseCreateInvoicesExportResp(rsp *http.Response) (*CreateInvoicesExportResp, error)

ParseCreateInvoicesExportResp parses an HTTP response from a CreateInvoicesExportWithResponse call

func (CreateInvoicesExportResp) Status

func (r CreateInvoicesExportResp) Status() string

Status returns HTTPResponse.Status

func (CreateInvoicesExportResp) StatusCode

func (r CreateInvoicesExportResp) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type Error

type Error struct {
	// Code An error code that identifies the type of error that occurred.
	Code string `json:"code"`

	// Details Additional details that can help the caller understand or fix the issue.
	Details *string `json:"details,omitempty"`

	// Message A message that describes the error condition.
	Message string `json:"message"`
}

Error The error response that is returned when the request is unsuccessful.

type ErrorList

type ErrorList struct {
	// Errors List of errors.
	Errors []Error `json:"errors"`
}

ErrorList A list of error responses that are returned when a request is unsuccessful.

type Export

type Export struct {
	// ErrorMessage When the export generation fails, this attribute contains a description of the error.
	ErrorMessage *string `json:"errorMessage,omitempty"`

	// ExportId The export identifier.
	ExportId *string `json:"exportId,omitempty"`

	// GenerateExportFinishedAt The date and time when the export generation finished. Vales are in [ISO 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) date-time format.
	GenerateExportFinishedAt *time.Time `json:"generateExportFinishedAt,omitempty"`

	// GenerateExportStartedAt The date and time when the export generation started. Values are in [ISO 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) date-time format.
	GenerateExportStartedAt *time.Time `json:"generateExportStartedAt,omitempty"`

	// InvoicesDocumentIds The identifier for the export documents. To get the information required to retrieve the export document's contents, pass each ID in the `getInvoicesDocument` operation.
	//
	// This list is empty until the status is `DONE`.
	InvoicesDocumentIds *[]string `json:"invoicesDocumentIds,omitempty"`

	// Status The current status of the request.
	Status *ExportStatus `json:"status,omitempty"`
}

Export Detailed information about the export.

type ExportInvoicesRequest

type ExportInvoicesRequest struct {
	// DateEnd The latest invoice creation date for invoices that you want to include in the response. Dates are in [ISO 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) date-time format. The default is the time of the request.
	DateEnd *openapi_types.Date `json:"dateEnd,omitempty"`

	// DateStart The earliest invoice creation date for invoices that you want to include in the response. Dates are in [ISO 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) date-time format. The default is 24 hours prior to the time of the request.
	DateStart *openapi_types.Date `json:"dateStart,omitempty"`

	// ExternalInvoiceId The external ID of the invoices you want included in the response.
	ExternalInvoiceId *string `json:"externalInvoiceId,omitempty"`

	// FileFormat Supported invoice file extensions.
	FileFormat *FileFormat `json:"fileFormat,omitempty"`

	// InvoiceType The marketplace-specific classification of the invoice type. Use the `getInvoicesAttributes` operation to check `invoiceType` options.
	InvoiceType *string `json:"invoiceType,omitempty"`

	// MarketplaceId The ID of the marketplace from which you want the invoices.
	MarketplaceId string `json:"marketplaceId"`

	// Series The series number of the invoices you want included in the response.
	Series *string `json:"series,omitempty"`

	// Statuses A list of statuses that you can use to filter invoices. Use the `getInvoicesAttributes` operation to check invoice status options.
	//
	// Min count: 1
	Statuses *[]string `json:"statuses,omitempty"`

	// TransactionIdentifier The identifier for a transaction.
	TransactionIdentifier *TransactionIdentifier `json:"transactionIdentifier,omitempty"`

	// TransactionType The marketplace-specific classification of the transaction type for which the invoice was created. Use the `getInvoicesAttributes` operation to check `transactionType` options
	TransactionType *string `json:"transactionType,omitempty"`
}

ExportInvoicesRequest The information required to create the export request.

type ExportInvoicesResponse

type ExportInvoicesResponse struct {
	// ExportId The export identifier.
	ExportId *string `json:"exportId,omitempty"`
}

ExportInvoicesResponse Success.

type ExportStatus

type ExportStatus string

ExportStatus The current status of the request.

const (
	ExportStatusDONE       ExportStatus = "DONE"
	ExportStatusERROR      ExportStatus = "ERROR"
	ExportStatusPROCESSING ExportStatus = "PROCESSING"
	ExportStatusREQUESTED  ExportStatus = "REQUESTED"
)

Defines values for ExportStatus.

type FileFormat

type FileFormat string

FileFormat Supported invoice file extensions.

const (
	XML FileFormat = "XML"
)

Defines values for FileFormat.

type GetInvoiceParams

type GetInvoiceParams struct {
	// MarketplaceId The marketplace from which you want the invoice.
	MarketplaceId string `form:"marketplaceId" json:"marketplaceId"`
}

GetInvoiceParams defines parameters for GetInvoice.

type GetInvoiceResp

type GetInvoiceResp struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *GetInvoiceResponse
	JSON400      *ErrorList
	JSON401      *ErrorList
	JSON403      *ErrorList
	JSON404      *ErrorList
	JSON413      *ErrorList
	JSON415      *ErrorList
	JSON429      *ErrorList
	JSON500      *ErrorList
	JSON503      *ErrorList
}

func ParseGetInvoiceResp

func ParseGetInvoiceResp(rsp *http.Response) (*GetInvoiceResp, error)

ParseGetInvoiceResp parses an HTTP response from a GetInvoiceWithResponse call

func (GetInvoiceResp) Status

func (r GetInvoiceResp) Status() string

Status returns HTTPResponse.Status

func (GetInvoiceResp) StatusCode

func (r GetInvoiceResp) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetInvoiceResponse

type GetInvoiceResponse struct {
	// Invoice Provides detailed information about an invoice.
	Invoice *Invoice `json:"invoice,omitempty"`
}

GetInvoiceResponse Success.

type GetInvoicesAttributesParams

type GetInvoicesAttributesParams struct {
	// MarketplaceId The marketplace identifier.
	MarketplaceId string `form:"marketplaceId" json:"marketplaceId"`
}

GetInvoicesAttributesParams defines parameters for GetInvoicesAttributes.

type GetInvoicesAttributesResp

type GetInvoicesAttributesResp struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *GetInvoicesAttributesResponse
	JSON400      *ErrorList
	JSON401      *ErrorList
	JSON403      *ErrorList
	JSON404      *ErrorList
	JSON413      *ErrorList
	JSON415      *ErrorList
	JSON429      *ErrorList
	JSON500      *ErrorList
	JSON503      *ErrorList
}

func ParseGetInvoicesAttributesResp

func ParseGetInvoicesAttributesResp(rsp *http.Response) (*GetInvoicesAttributesResp, error)

ParseGetInvoicesAttributesResp parses an HTTP response from a GetInvoicesAttributesWithResponse call

func (GetInvoicesAttributesResp) Status

func (r GetInvoicesAttributesResp) Status() string

Status returns HTTPResponse.Status

func (GetInvoicesAttributesResp) StatusCode

func (r GetInvoicesAttributesResp) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetInvoicesAttributesResponse

type GetInvoicesAttributesResponse struct {
	// InvoicesAttributes An object that contains the invoice attributes definition.
	InvoicesAttributes *InvoicesAttributes `json:"invoicesAttributes,omitempty"`
}

GetInvoicesAttributesResponse Success.

type GetInvoicesDocumentResp

type GetInvoicesDocumentResp struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *GetInvoicesDocumentResponse
	JSON400      *ErrorList
	JSON401      *ErrorList
	JSON403      *ErrorList
	JSON404      *ErrorList
	JSON413      *ErrorList
	JSON415      *ErrorList
	JSON429      *ErrorList
	JSON500      *ErrorList
	JSON503      *ErrorList
}

func ParseGetInvoicesDocumentResp

func ParseGetInvoicesDocumentResp(rsp *http.Response) (*GetInvoicesDocumentResp, error)

ParseGetInvoicesDocumentResp parses an HTTP response from a GetInvoicesDocumentWithResponse call

func (GetInvoicesDocumentResp) Status

func (r GetInvoicesDocumentResp) Status() string

Status returns HTTPResponse.Status

func (GetInvoicesDocumentResp) StatusCode

func (r GetInvoicesDocumentResp) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetInvoicesDocumentResponse

type GetInvoicesDocumentResponse struct {
	// InvoicesDocument An object that contains the `documentId` and an S3 pre-signed URL that you can use to download the specified file.
	InvoicesDocument *InvoicesDocument `json:"invoicesDocument,omitempty"`
}

GetInvoicesDocumentResponse Success.

type GetInvoicesExportResp

type GetInvoicesExportResp struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *GetInvoicesExportResponse
	JSON400      *ErrorList
	JSON401      *ErrorList
	JSON403      *ErrorList
	JSON404      *ErrorList
	JSON413      *ErrorList
	JSON415      *ErrorList
	JSON429      *ErrorList
	JSON500      *ErrorList
	JSON503      *ErrorList
}

func ParseGetInvoicesExportResp

func ParseGetInvoicesExportResp(rsp *http.Response) (*GetInvoicesExportResp, error)

ParseGetInvoicesExportResp parses an HTTP response from a GetInvoicesExportWithResponse call

func (GetInvoicesExportResp) Status

func (r GetInvoicesExportResp) Status() string

Status returns HTTPResponse.Status

func (GetInvoicesExportResp) StatusCode

func (r GetInvoicesExportResp) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetInvoicesExportResponse

type GetInvoicesExportResponse struct {
	// Export Detailed information about the export.
	Export *Export `json:"export,omitempty"`
}

GetInvoicesExportResponse Success.

type GetInvoicesExportsParams

type GetInvoicesExportsParams struct {
	// MarketplaceId The returned exports match the specified marketplace.
	MarketplaceId string `form:"marketplaceId" json:"marketplaceId"`

	// DateStart The earliest export creation date and time for exports that you want to include in the response. Values are in [ISO 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) date-time format. The default is 30 days ago.
	DateStart *time.Time `form:"dateStart,omitempty" json:"dateStart,omitempty"`

	// NextToken The response includes `nextToken` when the number of results exceeds the specified `pageSize` value. To get the next page of results, call the operation with this token and include the same arguments as the call that produced the token. To get a complete list, call this operation until `nextToken` is null. Note that this operation can return empty pages.
	NextToken *string `form:"nextToken,omitempty" json:"nextToken,omitempty"`

	// PageSize The maximum number of invoices to return in a single call.
	//
	// Minimum: 1
	//
	// Maximum: 100
	PageSize *int `form:"pageSize,omitempty" json:"pageSize,omitempty"`

	// DateEnd The latest export creation date and time for exports that you want to include in the response. Values are in [ISO 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) date-time format. The default value is the time of the request.
	DateEnd *time.Time `form:"dateEnd,omitempty" json:"dateEnd,omitempty"`

	// Status Return exports matching the status specified.
	Status *GetInvoicesExportsParamsStatus `form:"status,omitempty" json:"status,omitempty"`
}

GetInvoicesExportsParams defines parameters for GetInvoicesExports.

type GetInvoicesExportsParamsStatus

type GetInvoicesExportsParamsStatus string

GetInvoicesExportsParamsStatus defines parameters for GetInvoicesExports.

const (
	GetInvoicesExportsParamsStatusDONE       GetInvoicesExportsParamsStatus = "DONE"
	GetInvoicesExportsParamsStatusERROR      GetInvoicesExportsParamsStatus = "ERROR"
	GetInvoicesExportsParamsStatusPROCESSING GetInvoicesExportsParamsStatus = "PROCESSING"
	GetInvoicesExportsParamsStatusREQUESTED  GetInvoicesExportsParamsStatus = "REQUESTED"
)

Defines values for GetInvoicesExportsParamsStatus.

type GetInvoicesExportsResp

type GetInvoicesExportsResp struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *GetInvoicesExportsResponse
	JSON400      *ErrorList
	JSON401      *ErrorList
	JSON403      *ErrorList
	JSON404      *ErrorList
	JSON413      *ErrorList
	JSON415      *ErrorList
	JSON429      *ErrorList
	JSON500      *ErrorList
	JSON503      *ErrorList
}

func ParseGetInvoicesExportsResp

func ParseGetInvoicesExportsResp(rsp *http.Response) (*GetInvoicesExportsResp, error)

ParseGetInvoicesExportsResp parses an HTTP response from a GetInvoicesExportsWithResponse call

func (GetInvoicesExportsResp) Status

func (r GetInvoicesExportsResp) Status() string

Status returns HTTPResponse.Status

func (GetInvoicesExportsResp) StatusCode

func (r GetInvoicesExportsResp) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetInvoicesExportsResponse

type GetInvoicesExportsResponse struct {
	// Exports A list of exports.
	Exports *[]Export `json:"exports,omitempty"`

	// NextToken This token is returned when the number of results exceeds the specified `pageSize` value. To get the next page of results, call the `getInvoices` operation and include this token with the previous call parameters.
	NextToken *string `json:"nextToken,omitempty"`
}

GetInvoicesExportsResponse Success.

type GetInvoicesParams

type GetInvoicesParams struct {
	// TransactionIdentifierName The name of the transaction identifier filter. If you provide a value for this field, you must also provide a value for the `transactionIdentifierId` field.Use the `getInvoicesAttributes` operation to check `transactionIdentifierName` options.
	TransactionIdentifierName *string `form:"transactionIdentifierName,omitempty" json:"transactionIdentifierName,omitempty"`

	// PageSize The maximum number of invoices you want to return in a single call.
	//
	// Minimum: 1
	//
	// Maximum: 200
	PageSize *int `form:"pageSize,omitempty" json:"pageSize,omitempty"`

	// DateEnd The latest invoice creation date for invoices that you want to include in the response. Dates are in [ISO 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) date-time format. The default is the current date-time.
	DateEnd *time.Time `form:"dateEnd,omitempty" json:"dateEnd,omitempty"`

	// MarketplaceId The response includes only the invoices that match the specified marketplace.
	MarketplaceId string `form:"marketplaceId" json:"marketplaceId"`

	// TransactionType The marketplace-specific classification of the transaction type for which the invoice was created. Use the `getInvoicesAttributes` operation to check `transactionType` options.
	TransactionType *string `form:"transactionType,omitempty" json:"transactionType,omitempty"`

	// TransactionIdentifierId The ID of the transaction identifier filter. If you provide a value for this field, you must also provide a value for the `transactionIdentifierName` field.
	TransactionIdentifierId *string `form:"transactionIdentifierId,omitempty" json:"transactionIdentifierId,omitempty"`

	// DateStart The earliest invoice creation date for invoices that you want to include in the response. Dates are in [ISO 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) date-time format. The default is 24 hours prior to the time of the request.
	DateStart *time.Time `form:"dateStart,omitempty" json:"dateStart,omitempty"`

	// Series Return invoices with the specified series number.
	Series *string `form:"series,omitempty" json:"series,omitempty"`

	// NextToken The response includes `nextToken` when the number of results exceeds the specified `pageSize` value. To get the next page of results, call the operation with this token and include the same arguments as the call that produced the token. To get a complete list, call this operation until `nextToken` is null. Note that this operation can return empty pages.
	NextToken *string `form:"nextToken,omitempty" json:"nextToken,omitempty"`

	// SortOrder Sort the invoices in the response in ascending or descending order.
	SortOrder *GetInvoicesParamsSortOrder `form:"sortOrder,omitempty" json:"sortOrder,omitempty"`

	// InvoiceType The marketplace-specific classification of the invoice type. Use the `getInvoicesAttributes` operation to check `invoiceType` options.
	InvoiceType *string `form:"invoiceType,omitempty" json:"invoiceType,omitempty"`

	// Statuses A list of statuses that you can use to filter invoices. Use the `getInvoicesAttributes` operation to check invoice status options.
	//
	// Min count: 1
	Statuses *[]string `form:"statuses,omitempty" json:"statuses,omitempty"`

	// ExternalInvoiceId Return invoices that match this external ID. This is typically the Government Invoice ID.
	ExternalInvoiceId *string `form:"externalInvoiceId,omitempty" json:"externalInvoiceId,omitempty"`

	// SortBy The attribute by which you want to sort the invoices in the response.
	SortBy *GetInvoicesParamsSortBy `form:"sortBy,omitempty" json:"sortBy,omitempty"`
}

GetInvoicesParams defines parameters for GetInvoices.

type GetInvoicesParamsSortBy

type GetInvoicesParamsSortBy string

GetInvoicesParamsSortBy defines parameters for GetInvoices.

const (
	STARTDATETIME GetInvoicesParamsSortBy = "START_DATE_TIME"
)

Defines values for GetInvoicesParamsSortBy.

type GetInvoicesParamsSortOrder

type GetInvoicesParamsSortOrder string

GetInvoicesParamsSortOrder defines parameters for GetInvoices.

const (
	ASC  GetInvoicesParamsSortOrder = "ASC"
	DESC GetInvoicesParamsSortOrder = "DESC"
)

Defines values for GetInvoicesParamsSortOrder.

type GetInvoicesResp

type GetInvoicesResp struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *GetInvoicesResponse
	JSON400      *ErrorList
	JSON401      *ErrorList
	JSON403      *ErrorList
	JSON404      *ErrorList
	JSON413      *ErrorList
	JSON415      *ErrorList
	JSON429      *ErrorList
	JSON500      *ErrorList
	JSON503      *ErrorList
}

func ParseGetInvoicesResp

func ParseGetInvoicesResp(rsp *http.Response) (*GetInvoicesResp, error)

ParseGetInvoicesResp parses an HTTP response from a GetInvoicesWithResponse call

func (GetInvoicesResp) Status

func (r GetInvoicesResp) Status() string

Status returns HTTPResponse.Status

func (GetInvoicesResp) StatusCode

func (r GetInvoicesResp) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetInvoicesResponse

type GetInvoicesResponse struct {
	// Invoices A list of invoices.
	Invoices *[]Invoice `json:"invoices,omitempty"`

	// NextToken This token is returned when the number of results exceeds the specified `pageSize` value. To get the next page of results, call the `getInvoices` operation and include this token with the previous call parameters.
	NextToken *string `json:"nextToken,omitempty"`
}

GetInvoicesResponse Success.

type HttpRequestDoer

type HttpRequestDoer interface {
	Do(req *http.Request) (*http.Response, error)
}

Doer performs HTTP requests.

The standard http.Client implements this interface.

type Invoice

type Invoice struct {
	// Date The date and time the invoice is issued. Values are in [ISO 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) date-time format.
	Date *time.Time `json:"date,omitempty"`

	// ErrorCode If the invoice is in an error state, this attribute displays the error code.
	ErrorCode *string `json:"errorCode,omitempty"`

	// ExternalInvoiceId The invoice identifier that is used by an external party. This is typically the government agency that authorized the invoice.
	ExternalInvoiceId *string `json:"externalInvoiceId,omitempty"`

	// GovResponse The response message from the government authority when there is an error during invoice issuance.
	GovResponse *string `json:"govResponse,omitempty"`

	// Id The invoice identifier.
	Id *string `json:"id,omitempty"`

	// InvoiceType The classification of the invoice type. This varies across marketplaces. Use the `getInvoicesAttributes` operation to check `invoiceType` options.
	InvoiceType *string `json:"invoiceType,omitempty"`

	// Series Use this identifier in conjunction with `externalInvoiceId` to identify invoices from the same seller.
	Series *string `json:"series,omitempty"`

	// Status The invoice status classification. Use the `getInvoicesAttributes` operation to check invoice status options.
	Status *string `json:"status,omitempty"`

	// TransactionIds List with identifiers for the transactions associated to the invoice.
	TransactionIds *[]TransactionIdentifier `json:"transactionIds,omitempty"`

	// TransactionType Classification of the transaction that originated this invoice. Use the `getInvoicesAttributes` operation to check `transactionType` options.
	TransactionType *string `json:"transactionType,omitempty"`
}

Invoice Provides detailed information about an invoice.

type InvoicesAttributes

type InvoicesAttributes struct {
	// InvoiceStatusOptions A list of all the options that are available for the invoice status attribute.
	InvoiceStatusOptions *[]AttributeOption `json:"invoiceStatusOptions,omitempty"`

	// InvoiceTypeOptions A list of all the options that are available for the invoice type attribute.
	InvoiceTypeOptions *[]AttributeOption `json:"invoiceTypeOptions,omitempty"`

	// TransactionIdentifierNameOptions A list of all the options that are available for the transaction identifier name attribute.
	TransactionIdentifierNameOptions *[]AttributeOption `json:"transactionIdentifierNameOptions,omitempty"`

	// TransactionTypeOptions A list of all the options that are available for the transaction type attribute.
	TransactionTypeOptions *[]AttributeOption `json:"transactionTypeOptions,omitempty"`
}

InvoicesAttributes An object that contains the invoice attributes definition.

type InvoicesDocument

type InvoicesDocument struct {
	// InvoicesDocumentId The identifier of the export document.
	InvoicesDocumentId *string `json:"invoicesDocumentId,omitempty"`

	// InvoicesDocumentUrl A pre-signed URL that you can use to download the invoices document in zip format. This URL expires after 30 seconds.
	InvoicesDocumentUrl *string `json:"invoicesDocumentUrl,omitempty"`
}

InvoicesDocument An object that contains the `documentId` and an S3 pre-signed URL that you can use to download the specified file.

type RequestEditorFn

type RequestEditorFn func(ctx context.Context, req *http.Request) error

RequestEditorFn is the function signature for the RequestEditor callback function

type ResponseEditorFn

type ResponseEditorFn func(ctx context.Context, rsp *http.Response) error

ResponseEditorFn is the function signature for the ResponseEditor callback function

type TransactionIdentifier

type TransactionIdentifier struct {
	// Id The transaction identifier.
	Id *string `json:"id,omitempty"`

	// Name The transaction identifier name. Use the `getInvoicesAttributes` operation to check `transactionIdentifierName` options.
	Name *string `json:"name,omitempty"`
}

TransactionIdentifier The identifier for a transaction.

Jump to

Keyboard shortcuts

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