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 FBA Small and Light lets you help sellers manage their listings in the Small and Light program. The program reduces the cost of fulfilling orders for small and lightweight FBA inventory. You can enroll or remove items from the program and check item eligibility and enrollment status. You can also preview the estimated program fees charged to a seller for items sold while enrolled in the program.

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
SmallAndLightApi DeleteSmallAndLightEnrollmentBySellerSKU Delete /fba/smallAndLight/v1/enrollments/{sellerSKU}
SmallAndLightApi GetSmallAndLightEligibilityBySellerSKU Get /fba/smallAndLight/v1/eligibilities/{sellerSKU}
SmallAndLightApi GetSmallAndLightEnrollmentBySellerSKU Get /fba/smallAndLight/v1/enrollments/{sellerSKU}
SmallAndLightApi GetSmallAndLightFeePreview Post /fba/smallAndLight/v1/feePreviews
SmallAndLightApi PutSmallAndLightEnrollmentBySellerSKU Put /fba/smallAndLight/v1/enrollments/{sellerSKU}

Documentation For Models

Documentation For Authorization

Endpoints do not require authorization.

Author

Documentation

Overview

* Selling Partner API for FBA Small And Light * * The Selling Partner API for FBA Small and Light lets you help sellers manage their listings in the Small and Light program. The program reduces the cost of fulfilling orders for small and lightweight FBA inventory. You can enroll or remove items from the program and check item eligibility and enrollment status. You can also preview the estimated program fees charged to a seller for items sold while enrolled in the program. * * API version: v1 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Selling Partner API for FBA Small And Light * * The Selling Partner API for FBA Small and Light lets you help sellers manage their listings in the Small and Light program. The program reduces the cost of fulfilling orders for small and lightweight FBA inventory. You can enroll or remove items from the program and check item eligibility and enrollment status. You can also preview the estimated program fees charged to a seller for items sold while enrolled in the program. * * API version: v1 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Selling Partner API for FBA Small And Light * * The Selling Partner API for FBA Small and Light lets you help sellers manage their listings in the Small and Light program. The program reduces the cost of fulfilling orders for small and lightweight FBA inventory. You can enroll or remove items from the program and check item eligibility and enrollment status. You can also preview the estimated program fees charged to a seller for items sold while enrolled in the program. * * API version: v1 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Selling Partner API for FBA Small And Light * * The Selling Partner API for FBA Small and Light lets you help sellers manage their listings in the Small and Light program. The program reduces the cost of fulfilling orders for small and lightweight FBA inventory. You can enroll or remove items from the program and check item eligibility and enrollment status. You can also preview the estimated program fees charged to a seller for items sold while enrolled in the program. * * API version: v1 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Selling Partner API for FBA Small And Light * * The Selling Partner API for FBA Small and Light lets you help sellers manage their listings in the Small and Light program. The program reduces the cost of fulfilling orders for small and lightweight FBA inventory. You can enroll or remove items from the program and check item eligibility and enrollment status. You can also preview the estimated program fees charged to a seller for items sold while enrolled in the program. * * API version: v1 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Selling Partner API for FBA Small And Light * * The Selling Partner API for FBA Small and Light lets you help sellers manage their listings in the Small and Light program. The program reduces the cost of fulfilling orders for small and lightweight FBA inventory. You can enroll or remove items from the program and check item eligibility and enrollment status. You can also preview the estimated program fees charged to a seller for items sold while enrolled in the program. * * API version: v1 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Selling Partner API for FBA Small And Light * * The Selling Partner API for FBA Small and Light lets you help sellers manage their listings in the Small and Light program. The program reduces the cost of fulfilling orders for small and lightweight FBA inventory. You can enroll or remove items from the program and check item eligibility and enrollment status. You can also preview the estimated program fees charged to a seller for items sold while enrolled in the program. * * API version: v1 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Selling Partner API for FBA Small And Light * * The Selling Partner API for FBA Small and Light lets you help sellers manage their listings in the Small and Light program. The program reduces the cost of fulfilling orders for small and lightweight FBA inventory. You can enroll or remove items from the program and check item eligibility and enrollment status. You can also preview the estimated program fees charged to a seller for items sold while enrolled in the program. * * API version: v1 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Selling Partner API for FBA Small And Light * * The Selling Partner API for FBA Small and Light lets you help sellers manage their listings in the Small and Light program. The program reduces the cost of fulfilling orders for small and lightweight FBA inventory. You can enroll or remove items from the program and check item eligibility and enrollment status. You can also preview the estimated program fees charged to a seller for items sold while enrolled in the program. * * API version: v1 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Selling Partner API for FBA Small And Light * * The Selling Partner API for FBA Small and Light lets you help sellers manage their listings in the Small and Light program. The program reduces the cost of fulfilling orders for small and lightweight FBA inventory. You can enroll or remove items from the program and check item eligibility and enrollment status. You can also preview the estimated program fees charged to a seller for items sold while enrolled in the program. * * API version: v1 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Selling Partner API for FBA Small And Light * * The Selling Partner API for FBA Small and Light lets you help sellers manage their listings in the Small and Light program. The program reduces the cost of fulfilling orders for small and lightweight FBA inventory. You can enroll or remove items from the program and check item eligibility and enrollment status. You can also preview the estimated program fees charged to a seller for items sold while enrolled in the program. * * API version: v1 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Selling Partner API for FBA Small And Light * * The Selling Partner API for FBA Small and Light lets you help sellers manage their listings in the Small and Light program. The program reduces the cost of fulfilling orders for small and lightweight FBA inventory. You can enroll or remove items from the program and check item eligibility and enrollment status. You can also preview the estimated program fees charged to a seller for items sold while enrolled in the program. * * API version: v1 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Selling Partner API for FBA Small And Light * * The Selling Partner API for FBA Small and Light lets you help sellers manage their listings in the Small and Light program. The program reduces the cost of fulfilling orders for small and lightweight FBA inventory. You can enroll or remove items from the program and check item eligibility and enrollment status. You can also preview the estimated program fees charged to a seller for items sold while enrolled in the program. * * API version: v1 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Selling Partner API for FBA Small And Light * * The Selling Partner API for FBA Small and Light lets you help sellers manage their listings in the Small and Light program. The program reduces the cost of fulfilling orders for small and lightweight FBA inventory. You can enroll or remove items from the program and check item eligibility and enrollment status. You can also preview the estimated program fees charged to a seller for items sold while enrolled in the program. * * API version: v1 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Selling Partner API for FBA Small And Light * * The Selling Partner API for FBA Small and Light lets you help sellers manage their listings in the Small and Light program. The program reduces the cost of fulfilling orders for small and lightweight FBA inventory. You can enroll or remove items from the program and check item eligibility and enrollment status. You can also preview the estimated program fees charged to a seller for items sold while enrolled in the program. * * API version: v1 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Selling Partner API for FBA Small And Light * * The Selling Partner API for FBA Small and Light lets you help sellers manage their listings in the Small and Light program. The program reduces the cost of fulfilling orders for small and lightweight FBA inventory. You can enroll or remove items from the program and check item eligibility and enrollment status. You can also preview the estimated program fees charged to a seller for items sold while enrolled in the program. * * API version: v1 * 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 {
	SmallAndLightApi *SmallAndLightApiService
	// contains filtered or unexported fields
}

APIClient manages communication with the Selling Partner API for FBA Small And Light API vv1 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 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 ErrorList

type ErrorList struct {
	Errors []ModelError `json:"errors,omitempty"`
}

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

type FeeLineItem

type FeeLineItem struct {
	// The type of fee charged to the seller.
	FeeType   string     `json:"feeType"`
	FeeCharge *MoneyType `json:"feeCharge"`
}

Fee details for a specific fee.

type FeePreview

type FeePreview struct {
	// The Amazon Standard Identification Number (ASIN) value used to identify the item.
	Asin  string     `json:"asin,omitempty"`
	Price *MoneyType `json:"price,omitempty"`
	// A list of the Small and Light fees for the item.
	FeeBreakdown []FeeLineItem `json:"feeBreakdown,omitempty"`
	TotalFees    *MoneyType    `json:"totalFees,omitempty"`
	// One or more unexpected errors occurred during the getSmallAndLightFeePreview operation.
	Errors []ModelError `json:"errors,omitempty"`
}

The fee estimate for a specific item.

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 Item

type Item struct {
	// The Amazon Standard Identification Number (ASIN) value used to identify the item.
	Asin  string     `json:"asin"`
	Price *MoneyType `json:"price"`
}

An item to be sold.

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 in a human-readable form.
	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 SmallAndLightApiService

type SmallAndLightApiService service

func (*SmallAndLightApiService) DeleteSmallAndLightEnrollmentBySellerSKU

func (a *SmallAndLightApiService) DeleteSmallAndLightEnrollmentBySellerSKU(ctx context.Context, sellerSKU string, marketplaceIds []string) (*http.Response, error)

SmallAndLightApiService Removes the item indicated by the specified seller SKU from the Small and Light program in the specified marketplace. If the item is not eligible for disenrollment, the ineligibility reasons are returned. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 5 | 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](https://developer-docs.amazon.com/sp-api/docs/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 sellerSKU The seller SKU that identifies the item.
  • @param marketplaceIds The marketplace in which to remove the item from the Small and Light program. Note: Accepts a single marketplace only.

func (*SmallAndLightApiService) GetSmallAndLightEligibilityBySellerSKU

func (a *SmallAndLightApiService) GetSmallAndLightEligibilityBySellerSKU(ctx context.Context, sellerSKU string, marketplaceIds []string) (SmallAndLightEligibility, *http.Response, error)

SmallAndLightApiService Returns the Small and Light program eligibility status of the item indicated by the specified seller SKU in the specified marketplace. If the item is not eligible, the ineligibility reasons are returned. **Note:** The parameters associated with this operation may contain special characters that must be encoded to successfully call the API. To avoid errors with SKUs when encoding URLs, refer to [URL Encoding](https://developer-docs.amazon.com/sp-api/docs/url-encoding). **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 10 | 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](https://developer-docs.amazon.com/sp-api/docs/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 sellerSKU The seller SKU that identifies the item.
  • @param marketplaceIds The marketplace for which the eligibility status is retrieved. NOTE: Accepts a single marketplace only.

@return SmallAndLightEligibility

func (*SmallAndLightApiService) GetSmallAndLightEnrollmentBySellerSKU

func (a *SmallAndLightApiService) GetSmallAndLightEnrollmentBySellerSKU(ctx context.Context, sellerSKU string, marketplaceIds []string) (SmallAndLightEnrollment, *http.Response, error)

SmallAndLightApiService Returns the Small and Light enrollment status for the item indicated by the specified seller SKU in the specified marketplace. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 10 | 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](https://developer-docs.amazon.com/sp-api/docs/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 sellerSKU The seller SKU that identifies the item.
  • @param marketplaceIds The marketplace for which the enrollment status is retrieved. Note: Accepts a single marketplace only.

@return SmallAndLightEnrollment

func (*SmallAndLightApiService) GetSmallAndLightFeePreview

SmallAndLightApiService Returns the Small and Light fee estimates for the specified items. You must include a marketplaceId parameter to retrieve the proper fee estimates for items to be sold in that marketplace. The ordering of items in the response will mirror the order of the items in the request. Duplicate ASIN/price combinations are removed. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 3 | 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](https://developer-docs.amazon.com/sp-api/docs/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 SmallAndLightFeePreviews

func (*SmallAndLightApiService) PutSmallAndLightEnrollmentBySellerSKU

func (a *SmallAndLightApiService) PutSmallAndLightEnrollmentBySellerSKU(ctx context.Context, sellerSKU string, marketplaceIds []string) (SmallAndLightEnrollment, *http.Response, error)

SmallAndLightApiService Enrolls the item indicated by the specified seller SKU in the Small and Light program in the specified marketplace. If the item is not eligible, the ineligibility reasons are returned. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 5 | 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](https://developer-docs.amazon.com/sp-api/docs/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 sellerSKU The seller SKU that identifies the item.
  • @param marketplaceIds The marketplace in which to enroll the item. Note: Accepts a single marketplace only.

@return SmallAndLightEnrollment

type SmallAndLightEligibility

type SmallAndLightEligibility struct {
	MarketplaceId string                          `json:"marketplaceId"`
	SellerSKU     string                          `json:"sellerSKU"`
	Status        *SmallAndLightEligibilityStatus `json:"status"`
}

The Small and Light eligibility status of the item indicated by the specified seller SKU.

type SmallAndLightEligibilityStatus

type SmallAndLightEligibilityStatus string

SmallAndLightEligibilityStatus : The Small and Light eligibility status of the item.

const (
	ELIGIBLE_SmallAndLightEligibilityStatus     SmallAndLightEligibilityStatus = "ELIGIBLE"
	NOT_ELIGIBLE_SmallAndLightEligibilityStatus SmallAndLightEligibilityStatus = "NOT_ELIGIBLE"
)

List of SmallAndLightEligibilityStatus

type SmallAndLightEnrollment

type SmallAndLightEnrollment struct {
	MarketplaceId string                         `json:"marketplaceId"`
	SellerSKU     string                         `json:"sellerSKU"`
	Status        *SmallAndLightEnrollmentStatus `json:"status"`
}

The Small and Light enrollment status of the item indicated by the specified seller SKU.

type SmallAndLightEnrollmentStatus

type SmallAndLightEnrollmentStatus string

SmallAndLightEnrollmentStatus : The Small and Light enrollment status of the item.

const (
	ENROLLED_SmallAndLightEnrollmentStatus     SmallAndLightEnrollmentStatus = "ENROLLED"
	NOT_ENROLLED_SmallAndLightEnrollmentStatus SmallAndLightEnrollmentStatus = "NOT_ENROLLED"
)

List of SmallAndLightEnrollmentStatus

type SmallAndLightFeePreviewRequest

type SmallAndLightFeePreviewRequest struct {
	MarketplaceId string `json:"marketplaceId"`
	// A list of items for which to retrieve fee estimates (limit: 25).
	Items []Item `json:"items"`
}

Request schema for submitting items for which to retrieve fee estimates.

type SmallAndLightFeePreviews

type SmallAndLightFeePreviews struct {
	// A list of fee estimates for the requested items. The order of the fee estimates will follow the same order as the items in the request, with duplicates removed.
	Data []FeePreview `json:"data,omitempty"`
}

Jump to

Keyboard shortcuts

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