productPricingv20220501

package
v1.0.6 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Package productPricingv20220501 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 NewGetFeaturedOfferExpectedPriceBatchRequest

func NewGetFeaturedOfferExpectedPriceBatchRequest(server string, body GetFeaturedOfferExpectedPriceBatchJSONRequestBody) (*http.Request, error)

NewGetFeaturedOfferExpectedPriceBatchRequest calls the generic GetFeaturedOfferExpectedPriceBatch builder with application/json body

func NewGetFeaturedOfferExpectedPriceBatchRequestWithBody

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

NewGetFeaturedOfferExpectedPriceBatchRequestWithBody generates requests for GetFeaturedOfferExpectedPriceBatch with any type of body

Types

type Asin

type Asin = string

Asin The Amazon Standard Identification Number (ASIN) of the item.

type BatchRequest

type BatchRequest struct {
	// Body Additional HTTP body information associated with an individual request within a batch.
	Body *HttpBody `json:"body,omitempty"`

	// Headers A mapping of additional HTTP headers to send/receive for an individual request within a batch.
	Headers *HttpHeaders `json:"headers,omitempty"`

	// Method The HTTP method associated with an individual request within a batch.
	Method HttpMethod `json:"method"`

	// Uri The URI associated with an individual request within a batch. For FeaturedOfferExpectedPrice, this should be '/products/pricing/2022-05-01/offer/featuredOfferExpectedPrice'.
	Uri string `json:"uri"`
}

BatchRequest The common properties for individual requests within a batch.

type BatchResponse

type BatchResponse struct {
	// Headers A mapping of additional HTTP headers to send/receive for an individual request within a batch.
	Headers HttpHeaders `json:"headers"`

	// Status The HTTP status line associated with the response to an individual request within a batch. For more information, consult [RFC 2616](https://www.w3.org/Protocols/rfc2616/rfc2616-sec6.html).
	Status HttpStatusLine `json:"status"`
}

BatchResponse The common properties for responses to individual requests within a batch.

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

func (c *Client) GetFeaturedOfferExpectedPriceBatch(ctx context.Context, body GetFeaturedOfferExpectedPriceBatchJSONRequestBody) (*http.Response, error)

func (*Client) GetFeaturedOfferExpectedPriceBatchWithBody

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

type ClientInterface

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

	GetFeaturedOfferExpectedPriceBatch(ctx context.Context, body GetFeaturedOfferExpectedPriceBatchJSONRequestBody) (*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) GetFeaturedOfferExpectedPriceBatchWithBodyWithResponse

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

GetFeaturedOfferExpectedPriceBatchWithBodyWithResponse request with arbitrary body returning *GetFeaturedOfferExpectedPriceBatchResp

type ClientWithResponsesInterface

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

	GetFeaturedOfferExpectedPriceBatchWithResponse(ctx context.Context, body GetFeaturedOfferExpectedPriceBatchJSONRequestBody) (*GetFeaturedOfferExpectedPriceBatchResp, error)
}

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

type Condition

type Condition string

Condition The condition of the item.

const (
	Club        Condition = "Club"
	Collectible Condition = "Collectible"
	New         Condition = "New"
	Refurbished Condition = "Refurbished"
	Used        Condition = "Used"
)

Defines values for Condition.

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 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 Errors

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

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

type FeaturedOffer

type FeaturedOffer struct {
	// Condition The condition of the item.
	Condition *Condition `json:"condition,omitempty"`

	// OfferIdentifier Identifies an offer from a particular seller on an ASIN.
	OfferIdentifier OfferIdentifier `json:"offerIdentifier"`
	Price           *Price          `json:"price,omitempty"`
}

FeaturedOffer defines model for FeaturedOffer.

type FeaturedOfferExpectedPrice

type FeaturedOfferExpectedPrice struct {
	ListingPrice MoneyType `json:"listingPrice"`
	Points       *Points   `json:"points,omitempty"`
}

FeaturedOfferExpectedPrice The item price at or below which the target offer may be featured.

type FeaturedOfferExpectedPriceRequest

type FeaturedOfferExpectedPriceRequest struct {
	// Body Additional HTTP body information associated with an individual request within a batch.
	Body *HttpBody `json:"body,omitempty"`

	// Headers A mapping of additional HTTP headers to send/receive for an individual request within a batch.
	Headers *HttpHeaders `json:"headers,omitempty"`

	// MarketplaceId A marketplace identifier. Specifies the marketplace for which data is returned.
	MarketplaceId MarketplaceId `json:"marketplaceId"`

	// Method The HTTP method associated with an individual request within a batch.
	Method HttpMethod `json:"method"`

	// Sku The seller SKU of the item.
	Sku Sku `json:"sku"`

	// Uri The URI associated with an individual request within a batch. For FeaturedOfferExpectedPrice, this should be '/products/pricing/2022-05-01/offer/featuredOfferExpectedPrice'.
	Uri string `json:"uri"`
}

FeaturedOfferExpectedPriceRequest defines model for FeaturedOfferExpectedPriceRequest.

type FeaturedOfferExpectedPriceRequestList

type FeaturedOfferExpectedPriceRequestList = []FeaturedOfferExpectedPriceRequest

FeaturedOfferExpectedPriceRequestList A batched list of featured offer expected price requests.

type FeaturedOfferExpectedPriceRequestParams

type FeaturedOfferExpectedPriceRequestParams struct {
	// MarketplaceId A marketplace identifier. Specifies the marketplace for which data is returned.
	MarketplaceId MarketplaceId `json:"marketplaceId"`

	// Sku The seller SKU of the item.
	Sku Sku `json:"sku"`
}

FeaturedOfferExpectedPriceRequestParams The parameters for an individual request.

type FeaturedOfferExpectedPriceResponse

type FeaturedOfferExpectedPriceResponse struct {
	// Body The featured offer expected price response data for a requested SKU.
	Body *FeaturedOfferExpectedPriceResponseBody `json:"body,omitempty"`

	// Headers A mapping of additional HTTP headers to send/receive for an individual request within a batch.
	Headers HttpHeaders `json:"headers"`

	// Request The parameters for an individual request.
	Request FeaturedOfferExpectedPriceRequestParams `json:"request"`

	// Status The HTTP status line associated with the response to an individual request within a batch. For more information, consult [RFC 2616](https://www.w3.org/Protocols/rfc2616/rfc2616-sec6.html).
	Status HttpStatusLine `json:"status"`
}

FeaturedOfferExpectedPriceResponse defines model for FeaturedOfferExpectedPriceResponse.

type FeaturedOfferExpectedPriceResponseBody

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

	// FeaturedOfferExpectedPriceResults A list of featured offer expected price results for the requested offer.
	FeaturedOfferExpectedPriceResults *FeaturedOfferExpectedPriceResultList `json:"featuredOfferExpectedPriceResults,omitempty"`

	// OfferIdentifier Identifies an offer from a particular seller on an ASIN.
	OfferIdentifier OfferIdentifier `json:"offerIdentifier"`
}

FeaturedOfferExpectedPriceResponseBody The featured offer expected price response data for a requested SKU.

type FeaturedOfferExpectedPriceResponseList

type FeaturedOfferExpectedPriceResponseList = []FeaturedOfferExpectedPriceResponse

FeaturedOfferExpectedPriceResponseList A batched list of featured offer expected price responses.

type FeaturedOfferExpectedPriceResult

type FeaturedOfferExpectedPriceResult struct {
	CompetingFeaturedOffer *FeaturedOffer `json:"competingFeaturedOffer,omitempty"`
	CurrentFeaturedOffer   *FeaturedOffer `json:"currentFeaturedOffer,omitempty"`

	// FeaturedOfferExpectedPrice The item price at or below which the target offer may be featured.
	FeaturedOfferExpectedPrice *FeaturedOfferExpectedPrice `json:"featuredOfferExpectedPrice,omitempty"`

	// ResultStatus The status of the featured offer expected price computation. Possible values include VALID_FOEP, NO_COMPETING_OFFER, OFFER_NOT_ELIGIBLE, OFFER_NOT_FOUND.
	ResultStatus string `json:"resultStatus"`
}

FeaturedOfferExpectedPriceResult The featured offer expected price result data for the requested offer.

type FeaturedOfferExpectedPriceResultList

type FeaturedOfferExpectedPriceResultList = []FeaturedOfferExpectedPriceResult

FeaturedOfferExpectedPriceResultList A list of featured offer expected price results for the requested offer.

type FulfillmentType

type FulfillmentType string

FulfillmentType Indicates whether the item is fulfilled by Amazon or by the seller (merchant).

const (
	AFN FulfillmentType = "AFN"
	MFN FulfillmentType = "MFN"
)

Defines values for FulfillmentType.

type GetFeaturedOfferExpectedPriceBatchJSONRequestBody

type GetFeaturedOfferExpectedPriceBatchJSONRequestBody = GetFeaturedOfferExpectedPriceBatchRequest

GetFeaturedOfferExpectedPriceBatchJSONRequestBody defines body for GetFeaturedOfferExpectedPriceBatch for application/json ContentType.

type GetFeaturedOfferExpectedPriceBatchRequest

type GetFeaturedOfferExpectedPriceBatchRequest struct {
	// Requests A batched list of featured offer expected price requests.
	Requests *FeaturedOfferExpectedPriceRequestList `json:"requests,omitempty"`
}

GetFeaturedOfferExpectedPriceBatchRequest The request body for the getFeaturedOfferExpectedPriceBatch operation.

type GetFeaturedOfferExpectedPriceBatchResp

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

func ParseGetFeaturedOfferExpectedPriceBatchResp

func ParseGetFeaturedOfferExpectedPriceBatchResp(rsp *http.Response) (*GetFeaturedOfferExpectedPriceBatchResp, error)

ParseGetFeaturedOfferExpectedPriceBatchResp parses an HTTP response from a GetFeaturedOfferExpectedPriceBatchWithResponse call

func (GetFeaturedOfferExpectedPriceBatchResp) Status

Status returns HTTPResponse.Status

func (GetFeaturedOfferExpectedPriceBatchResp) StatusCode

StatusCode returns HTTPResponse.StatusCode

type GetFeaturedOfferExpectedPriceBatchResponse

type GetFeaturedOfferExpectedPriceBatchResponse struct {
	// Responses A batched list of featured offer expected price responses.
	Responses *FeaturedOfferExpectedPriceResponseList `json:"responses,omitempty"`
}

GetFeaturedOfferExpectedPriceBatchResponse The response schema for the getFeaturedOfferExpectedPriceBatch operation.

type HttpBody

type HttpBody map[string]interface{}

HttpBody Additional HTTP body information associated with an individual request within a batch.

type HttpHeaders

type HttpHeaders map[string]string

HttpHeaders A mapping of additional HTTP headers to send/receive for an individual request within a batch.

type HttpMethod

type HttpMethod string

HttpMethod The HTTP method associated with an individual request within a batch.

const (
	DELETE HttpMethod = "DELETE"
	GET    HttpMethod = "GET"
	PATCH  HttpMethod = "PATCH"
	POST   HttpMethod = "POST"
	PUT    HttpMethod = "PUT"
)

Defines values for HttpMethod.

type HttpRequestDoer

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

Doer performs HTTP requests.

The standard http.Client implements this interface.

type HttpStatusLine

type HttpStatusLine struct {
	// ReasonPhrase The HTTP response Reason-Phase.
	ReasonPhrase *string `json:"reasonPhrase,omitempty"`

	// StatusCode The HTTP response Status-Code.
	StatusCode *int `json:"statusCode,omitempty"`
}

HttpStatusLine The HTTP status line associated with the response to an individual request within a batch. For more information, consult [RFC 2616](https://www.w3.org/Protocols/rfc2616/rfc2616-sec6.html).

type MarketplaceId

type MarketplaceId = string

MarketplaceId A marketplace identifier. Specifies the marketplace for which data is returned.

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 OfferIdentifier

type OfferIdentifier struct {
	// Asin The Amazon Standard Identification Number (ASIN) of the item.
	Asin Asin `json:"asin"`

	// FulfillmentType Indicates whether the item is fulfilled by Amazon or by the seller (merchant).
	FulfillmentType *FulfillmentType `json:"fulfillmentType,omitempty"`

	// MarketplaceId A marketplace identifier. Specifies the marketplace for which data is returned.
	MarketplaceId MarketplaceId `json:"marketplaceId"`

	// SellerId The seller identifier for the offer.
	SellerId *string `json:"sellerId,omitempty"`

	// Sku The seller stock keeping unit (SKU) of the item. This will only be present for the target offer, which belongs to the requesting seller.
	Sku *string `json:"sku,omitempty"`
}

OfferIdentifier Identifies an offer from a particular seller on an ASIN.

type Points

type Points struct {
	PointsMonetaryValue *MoneyType `json:"pointsMonetaryValue,omitempty"`

	// PointsNumber The number of points.
	PointsNumber *int32 `json:"pointsNumber,omitempty"`
}

Points defines model for Points.

type Price

type Price struct {
	ListingPrice  MoneyType  `json:"listingPrice"`
	Points        *Points    `json:"points,omitempty"`
	ShippingPrice *MoneyType `json:"shippingPrice,omitempty"`
}

Price defines model for Price.

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 Sku

type Sku = string

Sku The seller SKU of the item.

Jump to

Keyboard shortcuts

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