swagger

package
v0.0.0-...-c324a2f Latest Latest
Warning

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

Go to latest
Published: May 6, 2023 License: MIT Imports: 20 Imported by: 0

README

Go API client for swagger

The Selling Partner API for Pricing helps you programmatically retrieve product pricing and offer pricing information for Amazon Marketplace products. For more information, see the Product Pricing v2022-05-01 Use Case Guide.

Overview

This API client was generated by the swagger-codegen project. By using the swagger-spec from a remote server, you can easily generate an API client.

Installation

Put the package under your project folder and add the following in import:

import "./swagger"

Documentation for API Endpoints

All URIs are relative to https://sellingpartnerapi-na.amazon.com/

Class Method HTTP request Description
ProductPricingApi GetFeaturedOfferExpectedPriceBatch Post /batches/products/pricing/2022-05-01/offer/featuredOfferExpectedPrice

Documentation For Models

Documentation For Authorization

Endpoints do not require authorization.

Author

Documentation

Overview

* Selling Partner API for Pricing * * The Selling Partner API for Pricing helps you programmatically retrieve product pricing and offer pricing information for Amazon Marketplace products. For more information, see the [Product Pricing v2022-05-01 Use Case Guide](doc:product-pricing-api-v2022-05-01-use-case-guide). * * API version: 2022-05-01 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Selling Partner API for Pricing * * The Selling Partner API for Pricing helps you programmatically retrieve product pricing and offer pricing information for Amazon Marketplace products. For more information, see the [Product Pricing v2022-05-01 Use Case Guide](doc:product-pricing-api-v2022-05-01-use-case-guide). * * API version: 2022-05-01 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Selling Partner API for Pricing * * The Selling Partner API for Pricing helps you programmatically retrieve product pricing and offer pricing information for Amazon Marketplace products. For more information, see the [Product Pricing v2022-05-01 Use Case Guide](doc:product-pricing-api-v2022-05-01-use-case-guide). * * API version: 2022-05-01 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Selling Partner API for Pricing * * The Selling Partner API for Pricing helps you programmatically retrieve product pricing and offer pricing information for Amazon Marketplace products. For more information, see the [Product Pricing v2022-05-01 Use Case Guide](doc:product-pricing-api-v2022-05-01-use-case-guide). * * API version: 2022-05-01 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Selling Partner API for Pricing * * The Selling Partner API for Pricing helps you programmatically retrieve product pricing and offer pricing information for Amazon Marketplace products. For more information, see the [Product Pricing v2022-05-01 Use Case Guide](doc:product-pricing-api-v2022-05-01-use-case-guide). * * API version: 2022-05-01 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Selling Partner API for Pricing * * The Selling Partner API for Pricing helps you programmatically retrieve product pricing and offer pricing information for Amazon Marketplace products. For more information, see the [Product Pricing v2022-05-01 Use Case Guide](doc:product-pricing-api-v2022-05-01-use-case-guide). * * API version: 2022-05-01 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Selling Partner API for Pricing * * The Selling Partner API for Pricing helps you programmatically retrieve product pricing and offer pricing information for Amazon Marketplace products. For more information, see the [Product Pricing v2022-05-01 Use Case Guide](doc:product-pricing-api-v2022-05-01-use-case-guide). * * API version: 2022-05-01 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Selling Partner API for Pricing * * The Selling Partner API for Pricing helps you programmatically retrieve product pricing and offer pricing information for Amazon Marketplace products. For more information, see the [Product Pricing v2022-05-01 Use Case Guide](doc:product-pricing-api-v2022-05-01-use-case-guide). * * API version: 2022-05-01 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Selling Partner API for Pricing * * The Selling Partner API for Pricing helps you programmatically retrieve product pricing and offer pricing information for Amazon Marketplace products. For more information, see the [Product Pricing v2022-05-01 Use Case Guide](doc:product-pricing-api-v2022-05-01-use-case-guide). * * API version: 2022-05-01 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Selling Partner API for Pricing * * The Selling Partner API for Pricing helps you programmatically retrieve product pricing and offer pricing information for Amazon Marketplace products. For more information, see the [Product Pricing v2022-05-01 Use Case Guide](doc:product-pricing-api-v2022-05-01-use-case-guide). * * API version: 2022-05-01 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Selling Partner API for Pricing * * The Selling Partner API for Pricing helps you programmatically retrieve product pricing and offer pricing information for Amazon Marketplace products. For more information, see the [Product Pricing v2022-05-01 Use Case Guide](doc:product-pricing-api-v2022-05-01-use-case-guide). * * API version: 2022-05-01 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Selling Partner API for Pricing * * The Selling Partner API for Pricing helps you programmatically retrieve product pricing and offer pricing information for Amazon Marketplace products. For more information, see the [Product Pricing v2022-05-01 Use Case Guide](doc:product-pricing-api-v2022-05-01-use-case-guide). * * API version: 2022-05-01 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Selling Partner API for Pricing * * The Selling Partner API for Pricing helps you programmatically retrieve product pricing and offer pricing information for Amazon Marketplace products. For more information, see the [Product Pricing v2022-05-01 Use Case Guide](doc:product-pricing-api-v2022-05-01-use-case-guide). * * API version: 2022-05-01 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Selling Partner API for Pricing * * The Selling Partner API for Pricing helps you programmatically retrieve product pricing and offer pricing information for Amazon Marketplace products. For more information, see the [Product Pricing v2022-05-01 Use Case Guide](doc:product-pricing-api-v2022-05-01-use-case-guide). * * API version: 2022-05-01 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Selling Partner API for Pricing * * The Selling Partner API for Pricing helps you programmatically retrieve product pricing and offer pricing information for Amazon Marketplace products. For more information, see the [Product Pricing v2022-05-01 Use Case Guide](doc:product-pricing-api-v2022-05-01-use-case-guide). * * API version: 2022-05-01 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Selling Partner API for Pricing * * The Selling Partner API for Pricing helps you programmatically retrieve product pricing and offer pricing information for Amazon Marketplace products. For more information, see the [Product Pricing v2022-05-01 Use Case Guide](doc:product-pricing-api-v2022-05-01-use-case-guide). * * API version: 2022-05-01 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Selling Partner API for Pricing * * The Selling Partner API for Pricing helps you programmatically retrieve product pricing and offer pricing information for Amazon Marketplace products. For more information, see the [Product Pricing v2022-05-01 Use Case Guide](doc:product-pricing-api-v2022-05-01-use-case-guide). * * API version: 2022-05-01 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Selling Partner API for Pricing * * The Selling Partner API for Pricing helps you programmatically retrieve product pricing and offer pricing information for Amazon Marketplace products. For more information, see the [Product Pricing v2022-05-01 Use Case Guide](doc:product-pricing-api-v2022-05-01-use-case-guide). * * API version: 2022-05-01 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Selling Partner API for Pricing * * The Selling Partner API for Pricing helps you programmatically retrieve product pricing and offer pricing information for Amazon Marketplace products. For more information, see the [Product Pricing v2022-05-01 Use Case Guide](doc:product-pricing-api-v2022-05-01-use-case-guide). * * API version: 2022-05-01 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Selling Partner API for Pricing * * The Selling Partner API for Pricing helps you programmatically retrieve product pricing and offer pricing information for Amazon Marketplace products. For more information, see the [Product Pricing v2022-05-01 Use Case Guide](doc:product-pricing-api-v2022-05-01-use-case-guide). * * API version: 2022-05-01 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Selling Partner API for Pricing * * The Selling Partner API for Pricing helps you programmatically retrieve product pricing and offer pricing information for Amazon Marketplace products. For more information, see the [Product Pricing v2022-05-01 Use Case Guide](doc:product-pricing-api-v2022-05-01-use-case-guide). * * API version: 2022-05-01 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Selling Partner API for Pricing * * The Selling Partner API for Pricing helps you programmatically retrieve product pricing and offer pricing information for Amazon Marketplace products. For more information, see the [Product Pricing v2022-05-01 Use Case Guide](doc:product-pricing-api-v2022-05-01-use-case-guide). * * API version: 2022-05-01 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Selling Partner API for Pricing * * The Selling Partner API for Pricing helps you programmatically retrieve product pricing and offer pricing information for Amazon Marketplace products. For more information, see the [Product Pricing v2022-05-01 Use Case Guide](doc:product-pricing-api-v2022-05-01-use-case-guide). * * API version: 2022-05-01 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Selling Partner API for Pricing * * The Selling Partner API for Pricing helps you programmatically retrieve product pricing and offer pricing information for Amazon Marketplace products. For more information, see the [Product Pricing v2022-05-01 Use Case Guide](doc:product-pricing-api-v2022-05-01-use-case-guide). * * API version: 2022-05-01 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Selling Partner API for Pricing * * The Selling Partner API for Pricing helps you programmatically retrieve product pricing and offer pricing information for Amazon Marketplace products. For more information, see the [Product Pricing v2022-05-01 Use Case Guide](doc:product-pricing-api-v2022-05-01-use-case-guide). * * API version: 2022-05-01 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

Index

Constants

This section is empty.

Variables

View Source
var (
	// ContextOAuth2 takes a oauth2.TokenSource as authentication for the request.
	ContextOAuth2 = contextKey("token")

	// ContextBasicAuth takes BasicAuth as authentication for the request.
	ContextBasicAuth = contextKey("basic")

	// ContextAccessToken takes a string oauth2 access token as authentication for the request.
	ContextAccessToken = contextKey("accesstoken")

	// ContextAPIKey takes an APIKey as authentication for the request
	ContextAPIKey = contextKey("apikey")
)

Functions

func CacheExpires

func CacheExpires(r *http.Response) time.Time

CacheExpires helper function to determine remaining time before repeating a request.

Types

type APIClient

type APIClient struct {
	ProductPricingApi *ProductPricingApiService
	// contains filtered or unexported fields
}

APIClient manages communication with the Selling Partner API for Pricing API v2022-05-01 In most cases there should be only one, shared, APIClient.

func NewAPIClient

func NewAPIClient(cfg *Configuration) *APIClient

NewAPIClient creates a new API client. Requires a userAgent string describing your application. optionally a custom http.Client to allow for advanced features such as caching.

func (*APIClient) ChangeBasePath

func (c *APIClient) ChangeBasePath(path string)

Change base path to allow switching to mocks

type APIKey

type APIKey struct {
	Key    string
	Prefix string
}

APIKey provides API key based authentication to a request passed via context using ContextAPIKey

type APIResponse

type APIResponse struct {
	*http.Response `json:"-"`
	Message        string `json:"message,omitempty"`
	// Operation is the name of the swagger operation.
	Operation string `json:"operation,omitempty"`
	// RequestURL is the request URL. This value is always available, even if the
	// embedded *http.Response is nil.
	RequestURL string `json:"url,omitempty"`
	// Method is the HTTP method used for the request.  This value is always
	// available, even if the embedded *http.Response is nil.
	Method string `json:"method,omitempty"`
	// Payload holds the contents of the response body (which may be nil or empty).
	// This is provided here as the raw response.Body() reader will have already
	// been drained.
	Payload []byte `json:"-"`
}

func NewAPIResponse

func NewAPIResponse(r *http.Response) *APIResponse

func NewAPIResponseWithError

func NewAPIResponseWithError(errorMessage string) *APIResponse

type BasicAuth

type BasicAuth struct {
	UserName string `json:"userName,omitempty"`
	Password string `json:"password,omitempty"`
}

BasicAuth provides basic http authentication to a request passed via context using ContextBasicAuth

type BatchRequest

type BatchRequest struct {
	// 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"`
	Method  *HttpMethod             `json:"method"`
	Body    *map[string]interface{} `json:"body,omitempty"`
	Headers *map[string]string      `json:"headers,omitempty"`
}

The common properties for individual requests within a batch.

type BatchResponse

type BatchResponse struct {
	Headers *map[string]string `json:"headers"`
	Status  *HttpStatusLine    `json:"status"`
}

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

type Condition

type Condition string

Condition : The condition of the item.

const (
	NEW_Condition         Condition = "New"
	USED_Condition        Condition = "Used"
	COLLECTIBLE_Condition Condition = "Collectible"
	REFURBISHED_Condition Condition = "Refurbished"
	CLUB_Condition        Condition = "Club"
)

List of Condition

type Configuration

type Configuration struct {
	BasePath      string            `json:"basePath,omitempty"`
	Host          string            `json:"host,omitempty"`
	Scheme        string            `json:"scheme,omitempty"`
	DefaultHeader map[string]string `json:"defaultHeader,omitempty"`
	UserAgent     string            `json:"userAgent,omitempty"`
	HTTPClient    *http.Client
}

func NewConfiguration

func NewConfiguration() *Configuration

func (*Configuration) AddDefaultHeader

func (c *Configuration) AddDefaultHeader(key string, value string)

type Errors

type Errors struct {
	Errors *[]ModelError `json:"errors"`
}

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

type FeaturedOffer

type FeaturedOffer struct {
	OfferIdentifier *OfferIdentifier `json:"offerIdentifier"`
	Condition       *Condition       `json:"condition,omitempty"`
	Price           *Price           `json:"price,omitempty"`
}

type FeaturedOfferExpectedPrice

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

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

type FeaturedOfferExpectedPriceRequest

type FeaturedOfferExpectedPriceRequest struct {
	MarketplaceId string `json:"marketplaceId"`
	Sku           string `json:"sku"`
	// 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"`
	Method  *HttpMethod             `json:"method"`
	Body    *map[string]interface{} `json:"body,omitempty"`
	Headers *map[string]string      `json:"headers,omitempty"`
}

An individual featured offer expected price request for a particular SKU.

type FeaturedOfferExpectedPriceRequestParams

type FeaturedOfferExpectedPriceRequestParams struct {
	MarketplaceId string `json:"marketplaceId"`
	Sku           string `json:"sku"`
}

The parameters for an individual request.

type FeaturedOfferExpectedPriceResponse

type FeaturedOfferExpectedPriceResponse struct {
	Headers *map[string]string                       `json:"headers"`
	Status  *HttpStatusLine                          `json:"status"`
	Request *FeaturedOfferExpectedPriceRequestParams `json:"request"`
	Body    *FeaturedOfferExpectedPriceResponseBody  `json:"body,omitempty"`
}

type FeaturedOfferExpectedPriceResponseBody

type FeaturedOfferExpectedPriceResponseBody struct {
	OfferIdentifier                   *OfferIdentifier                    `json:"offerIdentifier"`
	FeaturedOfferExpectedPriceResults *[]FeaturedOfferExpectedPriceResult `json:"featuredOfferExpectedPriceResults,omitempty"`
	Errors                            *[]ModelError                       `json:"errors,omitempty"`
}

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

type FeaturedOfferExpectedPriceResult

type FeaturedOfferExpectedPriceResult struct {
	FeaturedOfferExpectedPrice *FeaturedOfferExpectedPrice `json:"featuredOfferExpectedPrice,omitempty"`
	// 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"`
	CompetingFeaturedOffer *FeaturedOffer `json:"competingFeaturedOffer,omitempty"`
	CurrentFeaturedOffer   *FeaturedOffer `json:"currentFeaturedOffer,omitempty"`
}

The featured offer expected price result data 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 FulfillmentType = "AFN"
	MFN_FulfillmentType FulfillmentType = "MFN"
)

List of FulfillmentType

type GenericSwaggerError

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

GenericSwaggerError Provides access to the body, error and model on returned errors.

func (GenericSwaggerError) Body

func (e GenericSwaggerError) Body() []byte

Body returns the raw bytes of the response

func (GenericSwaggerError) Error

func (e GenericSwaggerError) Error() string

Error returns non-empty string if there was an error.

func (GenericSwaggerError) Model

func (e GenericSwaggerError) Model() interface{}

Model returns the unpacked model of the error

type GetFeaturedOfferExpectedPriceBatchRequest

type GetFeaturedOfferExpectedPriceBatchRequest struct {
	Requests *[]FeaturedOfferExpectedPriceRequest `json:"requests,omitempty"`
}

The request body for the getFeaturedOfferExpectedPriceBatch operation.

type GetFeaturedOfferExpectedPriceBatchResponse

type GetFeaturedOfferExpectedPriceBatchResponse struct {
	Responses *[]FeaturedOfferExpectedPriceResponse `json:"responses,omitempty"`
}

The response schema for the getFeaturedOfferExpectedPriceBatch operation.

type HttpMethod

type HttpMethod string

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

const (
	GET_HttpMethod    HttpMethod = "GET"
	PUT_HttpMethod    HttpMethod = "PUT"
	PATCH_HttpMethod  HttpMethod = "PATCH"
	DELETE_HttpMethod HttpMethod = "DELETE"
	POST_HttpMethod   HttpMethod = "POST"
)

List of HttpMethod

type HttpStatusLine

type HttpStatusLine struct {
	// The HTTP response Status-Code.
	StatusCode int32 `json:"statusCode,omitempty"`
	// The HTTP response Reason-Phase.
	ReasonPhrase string `json:"reasonPhrase,omitempty"`
}

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 ModelError

type ModelError struct {
	// An error code that identifies the type of error that occurred.
	Code string `json:"code"`
	// A message that describes the error condition.
	Message string `json:"message"`
	// Additional information that can help the caller understand or fix the issue.
	Details string `json:"details,omitempty"`
}

Error response returned when the request is unsuccessful.

type MoneyType

type MoneyType struct {
	// The currency code in ISO 4217 format.
	CurrencyCode string `json:"currencyCode,omitempty"`
	// The monetary value.
	Amount float64 `json:"amount,omitempty"`
}

type OfferIdentifier

type OfferIdentifier struct {
	MarketplaceId string `json:"marketplaceId"`
	// The seller identifier for the offer.
	SellerId string `json:"sellerId,omitempty"`
	// 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"`
	Asin            string           `json:"asin"`
	FulfillmentType *FulfillmentType `json:"fulfillmentType,omitempty"`
}

Identifies an offer from a particular seller on an ASIN.

type Points

type Points struct {
	// The number of points.
	PointsNumber        int32      `json:"pointsNumber,omitempty"`
	PointsMonetaryValue *MoneyType `json:"pointsMonetaryValue,omitempty"`
}

type Price

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

type ProductPricingApiService

type ProductPricingApiService service

func (*ProductPricingApiService) GetFeaturedOfferExpectedPriceBatch

ProductPricingApiService Returns the set of responses that correspond to the batched list of up to 40 requests defined in the request body. The response for each successful (HTTP status code 200) request in the set includes the computed listing price at or below which a seller can expect to become the featured offer (before applicable promotions). This is called the featured offer expected price (FOEP). Featured offer is not guaranteed, because competing offers may change, and different offers may be featured based on other factors, including fulfillment capabilities to a specific customer. The response to an unsuccessful request includes the available error text. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.033 | 1 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](doc:usage-plans-and-rate-limits-in-the-sp-api).

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param body

@return GetFeaturedOfferExpectedPriceBatchResponse

Jump to

Keyboard shortcuts

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