shipmentInvoicingv0

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2023 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

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

Code generated by github.com/deepmap/oapi-codegen version v1.13.4 DO NOT EDIT.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewGetInvoiceStatusRequest

func NewGetInvoiceStatusRequest(server string, shipmentId string) (*http.Request, error)

NewGetInvoiceStatusRequest generates requests for GetInvoiceStatus

func NewGetShipmentDetailsRequest

func NewGetShipmentDetailsRequest(server string, shipmentId string) (*http.Request, error)

NewGetShipmentDetailsRequest generates requests for GetShipmentDetails

func NewSubmitInvoiceRequest

func NewSubmitInvoiceRequest(server string, shipmentId string, body SubmitInvoiceJSONRequestBody) (*http.Request, error)

NewSubmitInvoiceRequest calls the generic SubmitInvoice builder with application/json body

func NewSubmitInvoiceRequestWithBody

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

NewSubmitInvoiceRequestWithBody generates requests for SubmitInvoice with any type of body

Types

type Address

type Address struct {
	// AddressLine1 The street address.
	AddressLine1 *string `json:"AddressLine1,omitempty"`

	// AddressLine2 Additional street address information, if required.
	AddressLine2 *string `json:"AddressLine2,omitempty"`

	// AddressLine3 Additional street address information, if required.
	AddressLine3 *string `json:"AddressLine3,omitempty"`

	// AddressType The shipping address type.
	AddressType *AddressTypeEnum `json:"AddressType,omitempty"`

	// City The city.
	City *string `json:"City,omitempty"`

	// CountryCode The country code.
	CountryCode *string `json:"CountryCode,omitempty"`

	// County The county.
	County *string `json:"County,omitempty"`

	// District The district.
	District *string `json:"District,omitempty"`

	// Name The name.
	Name *string `json:"Name,omitempty"`

	// Phone The phone number.
	Phone *string `json:"Phone,omitempty"`

	// PostalCode The postal code.
	PostalCode *string `json:"PostalCode,omitempty"`

	// StateOrRegion The state or region.
	StateOrRegion *string `json:"StateOrRegion,omitempty"`
}

Address The shipping address details of the shipment.

type AddressTypeEnum

type AddressTypeEnum string

AddressTypeEnum The shipping address type.

const (
	Commercial  AddressTypeEnum = "Commercial"
	Residential AddressTypeEnum = "Residential"
)

Defines values for AddressTypeEnum.

type Blob

type Blob = []byte

Blob Shipment invoice document content.

type BuyerTaxInfo

type BuyerTaxInfo struct {
	// CompanyLegalName The legal name of the company.
	CompanyLegalName *string `json:"CompanyLegalName,omitempty"`

	// TaxClassifications The list of tax classifications.
	TaxClassifications *TaxClassificationList `json:"TaxClassifications,omitempty"`

	// TaxingRegion The country or region imposing the tax.
	TaxingRegion *string `json:"TaxingRegion,omitempty"`
}

BuyerTaxInfo Tax information about the buyer.

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

func (c *Client) GetInvoiceStatus(ctx context.Context, shipmentId string) (*http.Response, error)

func (*Client) GetShipmentDetails

func (c *Client) GetShipmentDetails(ctx context.Context, shipmentId string) (*http.Response, error)

func (*Client) SubmitInvoice

func (c *Client) SubmitInvoice(ctx context.Context, shipmentId string, body SubmitInvoiceJSONRequestBody) (*http.Response, error)

func (*Client) SubmitInvoiceWithBody

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

type ClientInterface

type ClientInterface interface {
	// GetShipmentDetails request
	GetShipmentDetails(ctx context.Context, shipmentId string) (*http.Response, error)

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

	SubmitInvoice(ctx context.Context, shipmentId string, body SubmitInvoiceJSONRequestBody) (*http.Response, error)

	// GetInvoiceStatus request
	GetInvoiceStatus(ctx context.Context, shipmentId string) (*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) GetInvoiceStatusWithResponse

func (c *ClientWithResponses) GetInvoiceStatusWithResponse(ctx context.Context, shipmentId string) (*GetInvoiceStatusResp, error)

GetInvoiceStatusWithResponse request returning *GetInvoiceStatusResp

func (*ClientWithResponses) GetShipmentDetailsWithResponse

func (c *ClientWithResponses) GetShipmentDetailsWithResponse(ctx context.Context, shipmentId string) (*GetShipmentDetailsResp, error)

GetShipmentDetailsWithResponse request returning *GetShipmentDetailsResp

func (*ClientWithResponses) SubmitInvoiceWithBodyWithResponse

func (c *ClientWithResponses) SubmitInvoiceWithBodyWithResponse(ctx context.Context, shipmentId string, contentType string, body io.Reader) (*SubmitInvoiceResp, error)

SubmitInvoiceWithBodyWithResponse request with arbitrary body returning *SubmitInvoiceResp

func (*ClientWithResponses) SubmitInvoiceWithResponse

func (c *ClientWithResponses) SubmitInvoiceWithResponse(ctx context.Context, shipmentId string, body SubmitInvoiceJSONRequestBody) (*SubmitInvoiceResp, error)

type ClientWithResponsesInterface

type ClientWithResponsesInterface interface {
	// GetShipmentDetailsWithResponse request
	GetShipmentDetailsWithResponse(ctx context.Context, shipmentId string) (*GetShipmentDetailsResp, error)

	// SubmitInvoiceWithBodyWithResponse request with any body
	SubmitInvoiceWithBodyWithResponse(ctx context.Context, shipmentId string, contentType string, body io.Reader) (*SubmitInvoiceResp, error)

	SubmitInvoiceWithResponse(ctx context.Context, shipmentId string, body SubmitInvoiceJSONRequestBody) (*SubmitInvoiceResp, error)

	// GetInvoiceStatusWithResponse request
	GetInvoiceStatusWithResponse(ctx context.Context, shipmentId string) (*GetInvoiceStatusResp, error)
}

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

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 An error response returned when the request is unsuccessful.

type ErrorList

type ErrorList = []Error

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

type GetInvoiceStatusResp

func ParseGetInvoiceStatusResp

func ParseGetInvoiceStatusResp(rsp *http.Response) (*GetInvoiceStatusResp, error)

ParseGetInvoiceStatusResp parses an HTTP response from a GetInvoiceStatusWithResponse call

func (GetInvoiceStatusResp) Status

func (r GetInvoiceStatusResp) Status() string

Status returns HTTPResponse.Status

func (GetInvoiceStatusResp) StatusCode

func (r GetInvoiceStatusResp) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetInvoiceStatusResponse

type GetInvoiceStatusResponse struct {
	// Errors A list of error responses returned when a request is unsuccessful.
	Errors *ErrorList `json:"errors,omitempty"`

	// Payload The shipment invoice status response.
	Payload *ShipmentInvoiceStatusResponse `json:"payload,omitempty"`
}

GetInvoiceStatusResponse The response schema for the getInvoiceStatus operation.

type GetShipmentDetailsResp

func ParseGetShipmentDetailsResp

func ParseGetShipmentDetailsResp(rsp *http.Response) (*GetShipmentDetailsResp, error)

ParseGetShipmentDetailsResp parses an HTTP response from a GetShipmentDetailsWithResponse call

func (GetShipmentDetailsResp) Status

func (r GetShipmentDetailsResp) Status() string

Status returns HTTPResponse.Status

func (GetShipmentDetailsResp) StatusCode

func (r GetShipmentDetailsResp) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetShipmentDetailsResponse

type GetShipmentDetailsResponse struct {
	// Errors A list of error responses returned when a request is unsuccessful.
	Errors *ErrorList `json:"errors,omitempty"`

	// Payload The information required by a selling partner to issue a shipment invoice.
	Payload *ShipmentDetail `json:"payload,omitempty"`
}

GetShipmentDetailsResponse The response schema for the getShipmentDetails operation.

type HttpRequestDoer

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

Doer performs HTTP requests.

The standard http.Client implements this interface.

type MarketplaceTaxInfo

type MarketplaceTaxInfo struct {
	// CompanyLegalName The legal name of the company.
	CompanyLegalName *string `json:"CompanyLegalName,omitempty"`

	// TaxClassifications The list of tax classifications.
	TaxClassifications *TaxClassificationList `json:"TaxClassifications,omitempty"`

	// TaxingRegion The country or region imposing the tax.
	TaxingRegion *string `json:"TaxingRegion,omitempty"`
}

MarketplaceTaxInfo Tax information about the marketplace.

type Money

type Money struct {
	// Amount The currency amount.
	Amount *string `json:"Amount,omitempty"`

	// CurrencyCode Three-digit currency code in ISO 4217 format.
	CurrencyCode *string `json:"CurrencyCode,omitempty"`
}

Money The currency type and amount.

type PaymentMethodDetailItemList

type PaymentMethodDetailItemList = []string

PaymentMethodDetailItemList The list of payment method details.

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 SerialNumbersList

type SerialNumbersList = []string

SerialNumbersList The list of serial numbers.

type ShipmentDetail

type ShipmentDetail struct {
	// AmazonOrderId The Amazon-defined identifier for the order.
	AmazonOrderId *string `json:"AmazonOrderId,omitempty"`

	// AmazonShipmentId The Amazon-defined identifier for the shipment.
	AmazonShipmentId *string `json:"AmazonShipmentId,omitempty"`

	// BuyerCounty The county of the buyer.
	BuyerCounty *string `json:"BuyerCounty,omitempty"`

	// BuyerName The name of the buyer.
	BuyerName *string `json:"BuyerName,omitempty"`

	// BuyerTaxInfo Tax information about the buyer.
	BuyerTaxInfo *BuyerTaxInfo `json:"BuyerTaxInfo,omitempty"`

	// MarketplaceId The identifier for the marketplace where the order was placed.
	MarketplaceId *string `json:"MarketplaceId,omitempty"`

	// MarketplaceTaxInfo Tax information about the marketplace.
	MarketplaceTaxInfo *MarketplaceTaxInfo `json:"MarketplaceTaxInfo,omitempty"`

	// PaymentMethodDetails The list of payment method details.
	PaymentMethodDetails *PaymentMethodDetailItemList `json:"PaymentMethodDetails,omitempty"`

	// PurchaseDate The date and time when the order was created.
	PurchaseDate *time.Time `json:"PurchaseDate,omitempty"`

	// SellerDisplayName The seller’s friendly name registered in the marketplace.
	SellerDisplayName *string `json:"SellerDisplayName,omitempty"`

	// SellerId The seller identifier.
	SellerId *string `json:"SellerId,omitempty"`

	// ShipmentItems A list of shipment items.
	ShipmentItems *ShipmentItems `json:"ShipmentItems,omitempty"`

	// ShippingAddress The shipping address details of the shipment.
	ShippingAddress *Address `json:"ShippingAddress,omitempty"`

	// WarehouseId The Amazon-defined identifier for the warehouse.
	WarehouseId *string `json:"WarehouseId,omitempty"`
}

ShipmentDetail The information required by a selling partner to issue a shipment invoice.

type ShipmentInvoiceStatus

type ShipmentInvoiceStatus string

ShipmentInvoiceStatus The shipment invoice status.

const (
	Accepted   ShipmentInvoiceStatus = "Accepted"
	Errored    ShipmentInvoiceStatus = "Errored"
	NotFound   ShipmentInvoiceStatus = "NotFound"
	Processing ShipmentInvoiceStatus = "Processing"
)

Defines values for ShipmentInvoiceStatus.

type ShipmentInvoiceStatusInfo

type ShipmentInvoiceStatusInfo struct {
	// AmazonShipmentId The Amazon-defined shipment identifier.
	AmazonShipmentId *string `json:"AmazonShipmentId,omitempty"`

	// InvoiceStatus The shipment invoice status.
	InvoiceStatus *ShipmentInvoiceStatus `json:"InvoiceStatus,omitempty"`
}

ShipmentInvoiceStatusInfo The shipment invoice status information.

type ShipmentInvoiceStatusResponse

type ShipmentInvoiceStatusResponse struct {
	// Shipments The shipment invoice status information.
	Shipments *ShipmentInvoiceStatusInfo `json:"Shipments,omitempty"`
}

ShipmentInvoiceStatusResponse The shipment invoice status response.

type ShipmentItem

type ShipmentItem struct {
	// ASIN The Amazon Standard Identification Number (ASIN) of the item.
	ASIN *string `json:"ASIN,omitempty"`

	// GiftWrapPrice The currency type and amount.
	GiftWrapPrice *Money `json:"GiftWrapPrice,omitempty"`

	// ItemPrice The currency type and amount.
	ItemPrice *Money `json:"ItemPrice,omitempty"`

	// OrderItemId The Amazon-defined identifier for the order item.
	OrderItemId *string `json:"OrderItemId,omitempty"`

	// PromotionDiscount The currency type and amount.
	PromotionDiscount *Money `json:"PromotionDiscount,omitempty"`

	// QuantityOrdered The number of items ordered.
	QuantityOrdered *float32 `json:"QuantityOrdered,omitempty"`

	// SellerSKU The seller SKU of the item.
	SellerSKU *string `json:"SellerSKU,omitempty"`

	// SerialNumbers The list of serial numbers.
	SerialNumbers *SerialNumbersList `json:"SerialNumbers,omitempty"`

	// ShippingDiscount The currency type and amount.
	ShippingDiscount *Money `json:"ShippingDiscount,omitempty"`

	// ShippingPrice The currency type and amount.
	ShippingPrice *Money `json:"ShippingPrice,omitempty"`

	// Title The name of the item.
	Title *string `json:"Title,omitempty"`
}

ShipmentItem The shipment item information required by a seller to issue a shipment invoice.

type ShipmentItems

type ShipmentItems = []ShipmentItem

ShipmentItems A list of shipment items.

type SubmitInvoiceJSONRequestBody

type SubmitInvoiceJSONRequestBody = SubmitInvoiceRequest

SubmitInvoiceJSONRequestBody defines body for SubmitInvoice for application/json ContentType.

type SubmitInvoiceRequest

type SubmitInvoiceRequest struct {
	// ContentMD5Value MD5 sum for validating the invoice data. For more information about calculating this value, see [Working with Content-MD5 Checksums](https://docs.developer.amazonservices.com/en_US/dev_guide/DG_MD5.html).
	ContentMD5Value string `json:"ContentMD5Value"`

	// InvoiceContent Shipment invoice document content.
	InvoiceContent Blob `json:"InvoiceContent"`

	// MarketplaceId An Amazon marketplace identifier.
	MarketplaceId *string `json:"MarketplaceId,omitempty"`
}

SubmitInvoiceRequest The request schema for the submitInvoice operation.

type SubmitInvoiceResp

type SubmitInvoiceResp struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *SubmitInvoiceResponse
	JSON400      *SubmitInvoiceResponse
	JSON401      *SubmitInvoiceResponse
	JSON403      *SubmitInvoiceResponse
	JSON404      *SubmitInvoiceResponse
	JSON415      *SubmitInvoiceResponse
	JSON429      *SubmitInvoiceResponse
	JSON500      *SubmitInvoiceResponse
	JSON503      *SubmitInvoiceResponse
}

func ParseSubmitInvoiceResp

func ParseSubmitInvoiceResp(rsp *http.Response) (*SubmitInvoiceResp, error)

ParseSubmitInvoiceResp parses an HTTP response from a SubmitInvoiceWithResponse call

func (SubmitInvoiceResp) Status

func (r SubmitInvoiceResp) Status() string

Status returns HTTPResponse.Status

func (SubmitInvoiceResp) StatusCode

func (r SubmitInvoiceResp) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type SubmitInvoiceResponse

type SubmitInvoiceResponse struct {
	// Errors A list of error responses returned when a request is unsuccessful.
	Errors *ErrorList `json:"errors,omitempty"`
}

SubmitInvoiceResponse The response schema for the submitInvoice operation.

type TaxClassification

type TaxClassification struct {
	// Name The type of tax.
	Name *string `json:"Name,omitempty"`

	// Value The entity's tax identifier.
	Value *string `json:"Value,omitempty"`
}

TaxClassification The tax classification for the entity.

type TaxClassificationList

type TaxClassificationList = []TaxClassification

TaxClassificationList The list of tax classifications.

Jump to

Keyboard shortcuts

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