productFeesv0

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 productFeesv0 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 NewGetMyFeesEstimateForASINRequest

func NewGetMyFeesEstimateForASINRequest(server string, asin string, body GetMyFeesEstimateForASINJSONRequestBody) (*http.Request, error)

NewGetMyFeesEstimateForASINRequest calls the generic GetMyFeesEstimateForASIN builder with application/json body

func NewGetMyFeesEstimateForASINRequestWithBody

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

NewGetMyFeesEstimateForASINRequestWithBody generates requests for GetMyFeesEstimateForASIN with any type of body

func NewGetMyFeesEstimateForSKURequest

func NewGetMyFeesEstimateForSKURequest(server string, sellerSKU string, body GetMyFeesEstimateForSKUJSONRequestBody) (*http.Request, error)

NewGetMyFeesEstimateForSKURequest calls the generic GetMyFeesEstimateForSKU builder with application/json body

func NewGetMyFeesEstimateForSKURequestWithBody

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

NewGetMyFeesEstimateForSKURequestWithBody generates requests for GetMyFeesEstimateForSKU with any type of body

func NewGetMyFeesEstimatesRequest

func NewGetMyFeesEstimatesRequest(server string, body GetMyFeesEstimatesJSONRequestBody) (*http.Request, error)

NewGetMyFeesEstimatesRequest calls the generic GetMyFeesEstimates builder with application/json body

func NewGetMyFeesEstimatesRequestWithBody

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

NewGetMyFeesEstimatesRequestWithBody generates requests for GetMyFeesEstimates with any type of body

Types

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

func (c *Client) GetMyFeesEstimateForASIN(ctx context.Context, asin string, body GetMyFeesEstimateForASINJSONRequestBody) (*http.Response, error)

func (*Client) GetMyFeesEstimateForASINWithBody

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

func (*Client) GetMyFeesEstimateForSKU

func (c *Client) GetMyFeesEstimateForSKU(ctx context.Context, sellerSKU string, body GetMyFeesEstimateForSKUJSONRequestBody) (*http.Response, error)

func (*Client) GetMyFeesEstimateForSKUWithBody

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

func (*Client) GetMyFeesEstimates

func (c *Client) GetMyFeesEstimates(ctx context.Context, body GetMyFeesEstimatesJSONRequestBody) (*http.Response, error)

func (*Client) GetMyFeesEstimatesWithBody

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

type ClientInterface

type ClientInterface interface {
	// GetMyFeesEstimatesWithBody request with any body
	GetMyFeesEstimatesWithBody(ctx context.Context, contentType string, body io.Reader) (*http.Response, error)

	GetMyFeesEstimates(ctx context.Context, body GetMyFeesEstimatesJSONRequestBody) (*http.Response, error)

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

	GetMyFeesEstimateForASIN(ctx context.Context, asin string, body GetMyFeesEstimateForASINJSONRequestBody) (*http.Response, error)

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

	GetMyFeesEstimateForSKU(ctx context.Context, sellerSKU string, body GetMyFeesEstimateForSKUJSONRequestBody) (*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) GetMyFeesEstimateForASINWithBodyWithResponse

func (c *ClientWithResponses) GetMyFeesEstimateForASINWithBodyWithResponse(ctx context.Context, asin string, contentType string, body io.Reader) (*GetMyFeesEstimateForASINResp, error)

GetMyFeesEstimateForASINWithBodyWithResponse request with arbitrary body returning *GetMyFeesEstimateForASINResp

func (*ClientWithResponses) GetMyFeesEstimateForASINWithResponse

func (c *ClientWithResponses) GetMyFeesEstimateForASINWithResponse(ctx context.Context, asin string, body GetMyFeesEstimateForASINJSONRequestBody) (*GetMyFeesEstimateForASINResp, error)

func (*ClientWithResponses) GetMyFeesEstimateForSKUWithBodyWithResponse

func (c *ClientWithResponses) GetMyFeesEstimateForSKUWithBodyWithResponse(ctx context.Context, sellerSKU string, contentType string, body io.Reader) (*GetMyFeesEstimateForSKUResp, error)

GetMyFeesEstimateForSKUWithBodyWithResponse request with arbitrary body returning *GetMyFeesEstimateForSKUResp

func (*ClientWithResponses) GetMyFeesEstimateForSKUWithResponse

func (c *ClientWithResponses) GetMyFeesEstimateForSKUWithResponse(ctx context.Context, sellerSKU string, body GetMyFeesEstimateForSKUJSONRequestBody) (*GetMyFeesEstimateForSKUResp, error)

func (*ClientWithResponses) GetMyFeesEstimatesWithBodyWithResponse

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

GetMyFeesEstimatesWithBodyWithResponse request with arbitrary body returning *GetMyFeesEstimatesResp

func (*ClientWithResponses) GetMyFeesEstimatesWithResponse

func (c *ClientWithResponses) GetMyFeesEstimatesWithResponse(ctx context.Context, body GetMyFeesEstimatesJSONRequestBody) (*GetMyFeesEstimatesResp, error)

type ClientWithResponsesInterface

type ClientWithResponsesInterface interface {
	// GetMyFeesEstimatesWithBodyWithResponse request with any body
	GetMyFeesEstimatesWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader) (*GetMyFeesEstimatesResp, error)

	GetMyFeesEstimatesWithResponse(ctx context.Context, body GetMyFeesEstimatesJSONRequestBody) (*GetMyFeesEstimatesResp, error)

	// GetMyFeesEstimateForASINWithBodyWithResponse request with any body
	GetMyFeesEstimateForASINWithBodyWithResponse(ctx context.Context, asin string, contentType string, body io.Reader) (*GetMyFeesEstimateForASINResp, error)

	GetMyFeesEstimateForASINWithResponse(ctx context.Context, asin string, body GetMyFeesEstimateForASINJSONRequestBody) (*GetMyFeesEstimateForASINResp, error)

	// GetMyFeesEstimateForSKUWithBodyWithResponse request with any body
	GetMyFeesEstimateForSKUWithBodyWithResponse(ctx context.Context, sellerSKU string, contentType string, body io.Reader) (*GetMyFeesEstimateForSKUResp, error)

	GetMyFeesEstimateForSKUWithResponse(ctx context.Context, sellerSKU string, body GetMyFeesEstimateForSKUJSONRequestBody) (*GetMyFeesEstimateForSKUResp, 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 information 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 defines model for Error.

type ErrorList

type ErrorList = []Error

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

type FeeDetail

type FeeDetail struct {
	FeeAmount    MoneyType  `json:"FeeAmount"`
	FeePromotion *MoneyType `json:"FeePromotion,omitempty"`

	// FeeType The type of fee charged to a seller.
	FeeType  string    `json:"FeeType"`
	FinalFee MoneyType `json:"FinalFee"`

	// IncludedFeeDetailList A list of other fees that contribute to a given fee.
	IncludedFeeDetailList *IncludedFeeDetailList `json:"IncludedFeeDetailList,omitempty"`
	TaxAmount             *MoneyType             `json:"TaxAmount,omitempty"`
}

FeeDetail The type of fee, fee amount, and other details.

type FeeDetailList

type FeeDetailList = []FeeDetail

FeeDetailList A list of other fees that contribute to a given fee.

type FeesEstimate

type FeesEstimate struct {
	// FeeDetailList A list of other fees that contribute to a given fee.
	FeeDetailList *FeeDetailList `json:"FeeDetailList,omitempty"`

	// TimeOfFeesEstimation The time at which the fees were estimated. This defaults to the time the request is made.
	TimeOfFeesEstimation time.Time  `json:"TimeOfFeesEstimation"`
	TotalFeesEstimate    *MoneyType `json:"TotalFeesEstimate,omitempty"`
}

FeesEstimate The total estimated fees for an item and a list of details.

type FeesEstimateByIdRequest

type FeesEstimateByIdRequest struct {
	// FeesEstimateRequest A product, marketplace, and proposed price used to request estimated fees.
	FeesEstimateRequest *FeesEstimateRequest `json:"FeesEstimateRequest,omitempty"`

	// IdType The type of product identifier used in a `FeesEstimateByIdRequest`.
	IdType IdType `json:"IdType"`

	// IdValue The item identifier.
	IdValue string `json:"IdValue"`
}

FeesEstimateByIdRequest A product, marketplace, and proposed price used to request estimated fees.

type FeesEstimateError

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

	// Detail Additional information that can help the caller understand or fix the issue.
	Detail FeesEstimateErrorDetail `json:"Detail"`

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

	// Type An error type, identifying either the receiver or the sender as the originator of the error.
	Type string `json:"Type"`
}

FeesEstimateError An unexpected error occurred during this operation.

type FeesEstimateErrorDetail

type FeesEstimateErrorDetail = []map[string]interface{}

FeesEstimateErrorDetail Additional information that can help the caller understand or fix the issue.

type FeesEstimateIdentifier

type FeesEstimateIdentifier struct {
	// IdType The type of product identifier used in a `FeesEstimateByIdRequest`.
	IdType *IdType `json:"IdType,omitempty"`

	// IdValue The item identifier.
	IdValue *string `json:"IdValue,omitempty"`

	// IsAmazonFulfilled When true, the offer is fulfilled by Amazon.
	IsAmazonFulfilled *bool `json:"IsAmazonFulfilled,omitempty"`

	// MarketplaceId A marketplace identifier.
	MarketplaceId *string `json:"MarketplaceId,omitempty"`

	// OptionalFulfillmentProgram An optional enrollment program to return the estimated fees when the offer is fulfilled by Amazon (IsAmazonFulfilled is set to true).
	OptionalFulfillmentProgram *OptionalFulfillmentProgram `json:"OptionalFulfillmentProgram,omitempty"`

	// PriceToEstimateFees Price information for an item, used to estimate fees.
	PriceToEstimateFees *PriceToEstimateFees `json:"PriceToEstimateFees,omitempty"`

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

	// SellerInputIdentifier A unique identifier provided by the caller to track this request.
	SellerInputIdentifier *string `json:"SellerInputIdentifier,omitempty"`
}

FeesEstimateIdentifier An item identifier, marketplace, time of request, and other details that identify an estimate.

type FeesEstimateRequest

type FeesEstimateRequest struct {
	// Identifier A unique identifier provided by the caller to track this request.
	Identifier string `json:"Identifier"`

	// IsAmazonFulfilled When true, the offer is fulfilled by Amazon.
	IsAmazonFulfilled *bool `json:"IsAmazonFulfilled,omitempty"`

	// MarketplaceId A marketplace identifier.
	MarketplaceId string `json:"MarketplaceId"`

	// OptionalFulfillmentProgram An optional enrollment program to return the estimated fees when the offer is fulfilled by Amazon (IsAmazonFulfilled is set to true).
	OptionalFulfillmentProgram *OptionalFulfillmentProgram `json:"OptionalFulfillmentProgram,omitempty"`

	// PriceToEstimateFees Price information for an item, used to estimate fees.
	PriceToEstimateFees PriceToEstimateFees `json:"PriceToEstimateFees"`
}

FeesEstimateRequest A product, marketplace, and proposed price used to request estimated fees.

type FeesEstimateResult

type FeesEstimateResult struct {
	// Error An unexpected error occurred during this operation.
	Error *FeesEstimateError `json:"Error,omitempty"`

	// FeesEstimate The total estimated fees for an item and a list of details.
	FeesEstimate *FeesEstimate `json:"FeesEstimate,omitempty"`

	// FeesEstimateIdentifier An item identifier, marketplace, time of request, and other details that identify an estimate.
	FeesEstimateIdentifier *FeesEstimateIdentifier `json:"FeesEstimateIdentifier,omitempty"`

	// Status The status of the fee request. Possible values: Success, ClientError, ServiceError.
	Status *string `json:"Status,omitempty"`
}

FeesEstimateResult An item identifier and the estimated fees for the item.

type GetMyFeesEstimateForASINJSONRequestBody

type GetMyFeesEstimateForASINJSONRequestBody = GetMyFeesEstimateRequest

GetMyFeesEstimateForASINJSONRequestBody defines body for GetMyFeesEstimateForASIN for application/json ContentType.

type GetMyFeesEstimateForASINResp

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

func ParseGetMyFeesEstimateForASINResp

func ParseGetMyFeesEstimateForASINResp(rsp *http.Response) (*GetMyFeesEstimateForASINResp, error)

ParseGetMyFeesEstimateForASINResp parses an HTTP response from a GetMyFeesEstimateForASINWithResponse call

func (GetMyFeesEstimateForASINResp) Status

Status returns HTTPResponse.Status

func (GetMyFeesEstimateForASINResp) StatusCode

func (r GetMyFeesEstimateForASINResp) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetMyFeesEstimateForSKUJSONRequestBody

type GetMyFeesEstimateForSKUJSONRequestBody = GetMyFeesEstimateRequest

GetMyFeesEstimateForSKUJSONRequestBody defines body for GetMyFeesEstimateForSKU for application/json ContentType.

type GetMyFeesEstimateForSKUResp

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

func ParseGetMyFeesEstimateForSKUResp

func ParseGetMyFeesEstimateForSKUResp(rsp *http.Response) (*GetMyFeesEstimateForSKUResp, error)

ParseGetMyFeesEstimateForSKUResp parses an HTTP response from a GetMyFeesEstimateForSKUWithResponse call

func (GetMyFeesEstimateForSKUResp) Status

Status returns HTTPResponse.Status

func (GetMyFeesEstimateForSKUResp) StatusCode

func (r GetMyFeesEstimateForSKUResp) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetMyFeesEstimateRequest

type GetMyFeesEstimateRequest struct {
	// FeesEstimateRequest A product, marketplace, and proposed price used to request estimated fees.
	FeesEstimateRequest *FeesEstimateRequest `json:"FeesEstimateRequest,omitempty"`
}

GetMyFeesEstimateRequest Request schema.

type GetMyFeesEstimateResponse

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

	// Payload Response schema.
	Payload *GetMyFeesEstimateResult `json:"payload,omitempty"`
}

GetMyFeesEstimateResponse defines model for GetMyFeesEstimateResponse.

type GetMyFeesEstimateResult

type GetMyFeesEstimateResult struct {
	// FeesEstimateResult An item identifier and the estimated fees for the item.
	FeesEstimateResult *FeesEstimateResult `json:"FeesEstimateResult,omitempty"`
}

GetMyFeesEstimateResult Response schema.

type GetMyFeesEstimatesErrorList

type GetMyFeesEstimatesErrorList struct {
	Errors []Error `json:"errors"`
}

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

type GetMyFeesEstimatesJSONRequestBody

type GetMyFeesEstimatesJSONRequestBody = GetMyFeesEstimatesRequest

GetMyFeesEstimatesJSONRequestBody defines body for GetMyFeesEstimates for application/json ContentType.

type GetMyFeesEstimatesRequest

type GetMyFeesEstimatesRequest = []FeesEstimateByIdRequest

GetMyFeesEstimatesRequest Request for estimated fees for a list of products.

type GetMyFeesEstimatesResp

func ParseGetMyFeesEstimatesResp

func ParseGetMyFeesEstimatesResp(rsp *http.Response) (*GetMyFeesEstimatesResp, error)

ParseGetMyFeesEstimatesResp parses an HTTP response from a GetMyFeesEstimatesWithResponse call

func (GetMyFeesEstimatesResp) Status

func (r GetMyFeesEstimatesResp) Status() string

Status returns HTTPResponse.Status

func (GetMyFeesEstimatesResp) StatusCode

func (r GetMyFeesEstimatesResp) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetMyFeesEstimatesResponse

type GetMyFeesEstimatesResponse = []FeesEstimateResult

GetMyFeesEstimatesResponse Estimated fees for a list of products.

type HttpRequestDoer

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

Doer performs HTTP requests.

The standard http.Client implements this interface.

type IdType

type IdType string

IdType The type of product identifier used in a `FeesEstimateByIdRequest`.

const (
	ASIN      IdType = "ASIN"
	SellerSKU IdType = "SellerSKU"
)

Defines values for IdType.

type IncludedFeeDetail

type IncludedFeeDetail struct {
	FeeAmount    MoneyType  `json:"FeeAmount"`
	FeePromotion *MoneyType `json:"FeePromotion,omitempty"`

	// FeeType The type of fee charged to a seller.
	FeeType   string     `json:"FeeType"`
	FinalFee  MoneyType  `json:"FinalFee"`
	TaxAmount *MoneyType `json:"TaxAmount,omitempty"`
}

IncludedFeeDetail The type of fee, fee amount, and other details.

type IncludedFeeDetailList

type IncludedFeeDetailList = []IncludedFeeDetail

IncludedFeeDetailList A list of other fees that contribute to a given fee.

type MoneyType

type MoneyType struct {
	// Amount The monetary value.
	Amount *float32 `json:"Amount,omitempty"`

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

MoneyType defines model for MoneyType.

type OptionalFulfillmentProgram

type OptionalFulfillmentProgram string

OptionalFulfillmentProgram An optional enrollment program to return the estimated fees when the offer is fulfilled by Amazon (IsAmazonFulfilled is set to true).

const (
	FBACORE OptionalFulfillmentProgram = "FBA_CORE"
	FBAEFN  OptionalFulfillmentProgram = "FBA_EFN"
	FBASNL  OptionalFulfillmentProgram = "FBA_SNL"
)

Defines values for OptionalFulfillmentProgram.

type Points

type Points struct {
	PointsMonetaryValue *MoneyType `json:"PointsMonetaryValue,omitempty"`
	PointsNumber        *int32     `json:"PointsNumber,omitempty"`
}

Points defines model for Points.

type PriceToEstimateFees

type PriceToEstimateFees struct {
	ListingPrice MoneyType  `json:"ListingPrice"`
	Points       *Points    `json:"Points,omitempty"`
	Shipping     *MoneyType `json:"Shipping,omitempty"`
}

PriceToEstimateFees Price information for an item, used to estimate fees.

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

Jump to

Keyboard shortcuts

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