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: 21 Imported by: 0

README

Go API client for swagger

The Selling Partner API for FBA Inventory lets you programmatically retrieve information about inventory in Amazon's fulfillment network.

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
FbaInventoryApi GetInventorySummaries Get /fba/inventory/v1/summaries

Documentation For Models

Documentation For Authorization

Endpoints do not require authorization.

Author

Documentation

Overview

* Selling Partner API for FBA Inventory * * The Selling Partner API for FBA Inventory lets you programmatically retrieve information about inventory in Amazon's fulfillment network. * * API version: v1 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Selling Partner API for FBA Inventory * * The Selling Partner API for FBA Inventory lets you programmatically retrieve information about inventory in Amazon's fulfillment network. * * API version: v1 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Selling Partner API for FBA Inventory * * The Selling Partner API for FBA Inventory lets you programmatically retrieve information about inventory in Amazon's fulfillment network. * * API version: v1 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Selling Partner API for FBA Inventory * * The Selling Partner API for FBA Inventory lets you programmatically retrieve information about inventory in Amazon's fulfillment network. * * API version: v1 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Selling Partner API for FBA Inventory * * The Selling Partner API for FBA Inventory lets you programmatically retrieve information about inventory in Amazon's fulfillment network. * * API version: v1 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Selling Partner API for FBA Inventory * * The Selling Partner API for FBA Inventory lets you programmatically retrieve information about inventory in Amazon's fulfillment network. * * API version: v1 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Selling Partner API for FBA Inventory * * The Selling Partner API for FBA Inventory lets you programmatically retrieve information about inventory in Amazon's fulfillment network. * * API version: v1 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Selling Partner API for FBA Inventory * * The Selling Partner API for FBA Inventory lets you programmatically retrieve information about inventory in Amazon's fulfillment network. * * API version: v1 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Selling Partner API for FBA Inventory * * The Selling Partner API for FBA Inventory lets you programmatically retrieve information about inventory in Amazon's fulfillment network. * * API version: v1 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Selling Partner API for FBA Inventory * * The Selling Partner API for FBA Inventory lets you programmatically retrieve information about inventory in Amazon's fulfillment network. * * API version: v1 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Selling Partner API for FBA Inventory * * The Selling Partner API for FBA Inventory lets you programmatically retrieve information about inventory in Amazon's fulfillment network. * * API version: v1 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Selling Partner API for FBA Inventory * * The Selling Partner API for FBA Inventory lets you programmatically retrieve information about inventory in Amazon's fulfillment network. * * API version: v1 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Selling Partner API for FBA Inventory * * The Selling Partner API for FBA Inventory lets you programmatically retrieve information about inventory in Amazon's fulfillment network. * * API version: v1 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Selling Partner API for FBA Inventory * * The Selling Partner API for FBA Inventory lets you programmatically retrieve information about inventory in Amazon's fulfillment network. * * API version: v1 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Selling Partner API for FBA Inventory * * The Selling Partner API for FBA Inventory lets you programmatically retrieve information about inventory in Amazon's fulfillment network. * * 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 {
	FbaInventoryApi *FbaInventoryApiService
	// contains filtered or unexported fields
}

APIClient manages communication with the Selling Partner API for FBA Inventory 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 FbaInventoryApiGetInventorySummariesOpts

type FbaInventoryApiGetInventorySummariesOpts struct {
	Details       optional.Bool
	StartDateTime optional.Time
	SellerSkus    optional.Interface
	SellerSku     optional.String
	NextToken     optional.String
}

type FbaInventoryApiService

type FbaInventoryApiService service

func (*FbaInventoryApiService) GetInventorySummaries

func (a *FbaInventoryApiService) GetInventorySummaries(ctx context.Context, granularityType string, granularityId string, marketplaceIds []string, localVarOptionals *FbaInventoryApiGetInventorySummariesOpts) (GetInventorySummariesResponse, *http.Response, error)

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 GetInventorySummariesResponse

type GetInventorySummariesResponse struct {
	Payload    *GetInventorySummariesResult `json:"payload,omitempty"`
	Pagination *Pagination                  `json:"pagination,omitempty"`
	Errors     *[]ModelError                `json:"errors,omitempty"`
}

The Response schema.

type GetInventorySummariesResult

type GetInventorySummariesResult struct {
	Granularity        *Granularity        `json:"granularity"`
	InventorySummaries *[]InventorySummary `json:"inventorySummaries"`
}

The payload schema for the getInventorySummaries operation.

type Granularity

type Granularity struct {
	// The granularity type for the inventory aggregation level.
	GranularityType string `json:"granularityType,omitempty"`
	// The granularity ID for the specified granularity type. When granularityType is Marketplace, specify the marketplaceId.
	GranularityId string `json:"granularityId,omitempty"`
}

Describes a granularity at which inventory data can be aggregated. For example, if you use Marketplace granularity, the fulfillable quantity will reflect inventory that could be fulfilled in the given marketplace.

type InventoryDetails

type InventoryDetails struct {
	// The item quantity that can be picked, packed, and shipped.
	FulfillableQuantity int32 `json:"fulfillableQuantity,omitempty"`
	// The number of units in an inbound shipment for which you have notified Amazon.
	InboundWorkingQuantity int32 `json:"inboundWorkingQuantity,omitempty"`
	// The number of units in an inbound shipment that you have notified Amazon about and have provided a tracking number.
	InboundShippedQuantity int32 `json:"inboundShippedQuantity,omitempty"`
	// The number of units that have not yet been received at an Amazon fulfillment center for processing, but are part of an inbound shipment with some units that have already been received and processed.
	InboundReceivingQuantity int32                  `json:"inboundReceivingQuantity,omitempty"`
	ReservedQuantity         *ReservedQuantity      `json:"reservedQuantity,omitempty"`
	ResearchingQuantity      *ResearchingQuantity   `json:"researchingQuantity,omitempty"`
	UnfulfillableQuantity    *UnfulfillableQuantity `json:"unfulfillableQuantity,omitempty"`
}

Summarized inventory details. This object will not appear if the details parameter in the request is false.

type InventorySummary

type InventorySummary struct {
	// The Amazon Standard Identification Number (ASIN) of an item.
	Asin string `json:"asin,omitempty"`
	// Amazon's fulfillment network SKU identifier.
	FnSku string `json:"fnSku,omitempty"`
	// The seller SKU of the item.
	SellerSku string `json:"sellerSku,omitempty"`
	// The condition of the item as described by the seller (for example, New Item).
	Condition        string            `json:"condition,omitempty"`
	InventoryDetails *InventoryDetails `json:"inventoryDetails,omitempty"`
	// The date and time that any quantity was last updated.
	LastUpdatedTime time.Time `json:"lastUpdatedTime,omitempty"`
	// The localized language product title of the item within the specific marketplace.
	ProductName string `json:"productName,omitempty"`
	// The total number of units in an inbound shipment or in Amazon fulfillment centers.
	TotalQuantity int32 `json:"totalQuantity,omitempty"`
}

Inventory summary for a specific item.

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,omitempty"`
	// Additional information that can help the caller understand or fix the issue.
	Details string `json:"details,omitempty"`
}

An error response returned when the request is unsuccessful.

type Pagination

type Pagination struct {
	// A generated string used to retrieve the next page of the result. If nextToken is returned, pass the value of nextToken to the next request. If nextToken is not returned, there are no more items to return.
	NextToken string `json:"nextToken,omitempty"`
}

The process of returning the results to a request in batches of a defined size called pages. This is done to exercise some control over result size and overall throughput. It's a form of traffic management.

type ResearchingQuantity

type ResearchingQuantity struct {
	// The total number of units currently being researched in Amazon's fulfillment network.
	TotalResearchingQuantity int32 `json:"totalResearchingQuantity,omitempty"`
	// A list of quantity details for items currently being researched.
	ResearchingQuantityBreakdown []ResearchingQuantityEntry `json:"researchingQuantityBreakdown,omitempty"`
}

The number of misplaced or warehouse damaged units that are actively being confirmed at our fulfillment centers.

type ResearchingQuantityEntry

type ResearchingQuantityEntry struct {
	// The duration of the research.
	Name string `json:"name"`
	// The number of units.
	Quantity int32 `json:"quantity"`
}

The misplaced or warehouse damaged inventory that is actively being confirmed at our fulfillment centers.

type ReservedQuantity

type ReservedQuantity struct {
	// The total number of units in Amazon's fulfillment network that are currently being picked, packed, and shipped; or are sidelined for measurement, sampling, or other internal processes.
	TotalReservedQuantity int32 `json:"totalReservedQuantity,omitempty"`
	// The number of units reserved for customer orders.
	PendingCustomerOrderQuantity int32 `json:"pendingCustomerOrderQuantity,omitempty"`
	// The number of units being transferred from one fulfillment center to another.
	PendingTransshipmentQuantity int32 `json:"pendingTransshipmentQuantity,omitempty"`
	// The number of units that have been sidelined at the fulfillment center for additional processing.
	FcProcessingQuantity int32 `json:"fcProcessingQuantity,omitempty"`
}

The quantity of reserved inventory.

type UnfulfillableQuantity

type UnfulfillableQuantity struct {
	// The total number of units in Amazon's fulfillment network in unsellable condition.
	TotalUnfulfillableQuantity int32 `json:"totalUnfulfillableQuantity,omitempty"`
	// The number of units in customer damaged disposition.
	CustomerDamagedQuantity int32 `json:"customerDamagedQuantity,omitempty"`
	// The number of units in warehouse damaged disposition.
	WarehouseDamagedQuantity int32 `json:"warehouseDamagedQuantity,omitempty"`
	// The number of units in distributor damaged disposition.
	DistributorDamagedQuantity int32 `json:"distributorDamagedQuantity,omitempty"`
	// The number of units in carrier damaged disposition.
	CarrierDamagedQuantity int32 `json:"carrierDamagedQuantity,omitempty"`
	// The number of units in defective disposition.
	DefectiveQuantity int32 `json:"defectiveQuantity,omitempty"`
	// The number of units in expired disposition.
	ExpiredQuantity int32 `json:"expiredQuantity,omitempty"`
}

The quantity of unfulfillable inventory.

Jump to

Keyboard shortcuts

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