listingsRestrictions20210801

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 listingsRestrictions20210801 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 NewGetListingsRestrictionsRequest

func NewGetListingsRestrictionsRequest(server string, params *GetListingsRestrictionsParams) (*http.Request, error)

NewGetListingsRestrictionsRequest generates requests for GetListingsRestrictions

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

func (c *Client) GetListingsRestrictions(ctx context.Context, params *GetListingsRestrictionsParams) (*http.Response, error)

type ClientInterface

type ClientInterface interface {
	// GetListingsRestrictions request
	GetListingsRestrictions(ctx context.Context, params *GetListingsRestrictionsParams) (*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) GetListingsRestrictionsWithResponse

func (c *ClientWithResponses) GetListingsRestrictionsWithResponse(ctx context.Context, params *GetListingsRestrictionsParams) (*GetListingsRestrictionsResp, error)

GetListingsRestrictionsWithResponse request returning *GetListingsRestrictionsResp

type ClientWithResponsesInterface

type ClientWithResponsesInterface interface {
	// GetListingsRestrictionsWithResponse request
	GetListingsRestrictionsWithResponse(ctx context.Context, params *GetListingsRestrictionsParams) (*GetListingsRestrictionsResp, 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 details 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 GetListingsRestrictionsParams

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

	// ConditionType The condition used to filter restrictions.
	ConditionType *GetListingsRestrictionsParamsConditionType `form:"conditionType,omitempty" json:"conditionType,omitempty"`

	// SellerId A selling partner identifier, such as a merchant account.
	SellerId string `form:"sellerId" json:"sellerId"`

	// MarketplaceIds A comma-delimited list of Amazon marketplace identifiers for the request.
	MarketplaceIds []string `form:"marketplaceIds" json:"marketplaceIds"`

	// ReasonLocale A locale for reason text localization. When not provided, the default language code of the first marketplace is used. Examples: "en_US", "fr_CA", "fr_FR". Localized messages default to "en_US" when a localization is not available in the specified locale.
	ReasonLocale *string `form:"reasonLocale,omitempty" json:"reasonLocale,omitempty"`
}

GetListingsRestrictionsParams defines parameters for GetListingsRestrictions.

type GetListingsRestrictionsParamsConditionType

type GetListingsRestrictionsParamsConditionType string

GetListingsRestrictionsParamsConditionType defines parameters for GetListingsRestrictions.

const (
	GetListingsRestrictionsParamsConditionTypeClubClub               GetListingsRestrictionsParamsConditionType = "club_club"
	GetListingsRestrictionsParamsConditionTypeCollectibleAcceptable  GetListingsRestrictionsParamsConditionType = "collectible_acceptable"
	GetListingsRestrictionsParamsConditionTypeCollectibleGood        GetListingsRestrictionsParamsConditionType = "collectible_good"
	GetListingsRestrictionsParamsConditionTypeCollectibleLikeNew     GetListingsRestrictionsParamsConditionType = "collectible_like_new"
	GetListingsRestrictionsParamsConditionTypeCollectibleVeryGood    GetListingsRestrictionsParamsConditionType = "collectible_very_good"
	GetListingsRestrictionsParamsConditionTypeNewNew                 GetListingsRestrictionsParamsConditionType = "new_new"
	GetListingsRestrictionsParamsConditionTypeNewOem                 GetListingsRestrictionsParamsConditionType = "new_oem"
	GetListingsRestrictionsParamsConditionTypeNewOpenBox             GetListingsRestrictionsParamsConditionType = "new_open_box"
	GetListingsRestrictionsParamsConditionTypeRefurbishedRefurbished GetListingsRestrictionsParamsConditionType = "refurbished_refurbished"
	GetListingsRestrictionsParamsConditionTypeUsedAcceptable         GetListingsRestrictionsParamsConditionType = "used_acceptable"
	GetListingsRestrictionsParamsConditionTypeUsedGood               GetListingsRestrictionsParamsConditionType = "used_good"
	GetListingsRestrictionsParamsConditionTypeUsedLikeNew            GetListingsRestrictionsParamsConditionType = "used_like_new"
	GetListingsRestrictionsParamsConditionTypeUsedVeryGood           GetListingsRestrictionsParamsConditionType = "used_very_good"
)

Defines values for GetListingsRestrictionsParamsConditionType.

type GetListingsRestrictionsResp

type GetListingsRestrictionsResp struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *RestrictionList
	JSON400      *ErrorList
	JSON403      *ErrorList
	JSON404      *ErrorList
	JSON413      *ErrorList
	JSON415      *ErrorList
	JSON429      *ErrorList
	JSON500      *ErrorList
	JSON503      *ErrorList
}

func ParseGetListingsRestrictionsResp

func ParseGetListingsRestrictionsResp(rsp *http.Response) (*GetListingsRestrictionsResp, error)

ParseGetListingsRestrictionsResp parses an HTTP response from a GetListingsRestrictionsWithResponse call

func (GetListingsRestrictionsResp) Status

Status returns HTTPResponse.Status

func (GetListingsRestrictionsResp) StatusCode

func (r GetListingsRestrictionsResp) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type HttpRequestDoer

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

Doer performs HTTP requests.

The standard http.Client implements this interface.

type Link struct {
	// Resource The URI of the related resource.
	Resource string `json:"resource"`

	// Title The title of the related resource.
	Title *string `json:"title,omitempty"`

	// Type The media type of the related resource.
	Type *string `json:"type,omitempty"`

	// Verb The HTTP verb used to interact with the related resource.
	Verb LinkVerb `json:"verb"`
}

Link A link to resources related to a listing restriction.

type LinkVerb

type LinkVerb string

LinkVerb The HTTP verb used to interact with the related resource.

const (
	GET LinkVerb = "GET"
)

Defines values for LinkVerb.

type Reason

type Reason struct {
	// Links A list of path forward links that may allow Selling Partners to remove the restriction.
	Links *[]Link `json:"links,omitempty"`

	// Message A message describing the reason for the restriction.
	Message string `json:"message"`

	// ReasonCode A code indicating why the listing is restricted.
	ReasonCode *ReasonReasonCode `json:"reasonCode,omitempty"`
}

Reason A reason for the restriction, including path forward links that may allow Selling Partners to remove the restriction, if available.

type ReasonReasonCode

type ReasonReasonCode string

ReasonReasonCode A code indicating why the listing is restricted.

const (
	APPROVALREQUIRED ReasonReasonCode = "APPROVAL_REQUIRED"
	ASINNOTFOUND     ReasonReasonCode = "ASIN_NOT_FOUND"
	NOTELIGIBLE      ReasonReasonCode = "NOT_ELIGIBLE"
)

Defines values for ReasonReasonCode.

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 Restriction

type Restriction struct {
	// ConditionType The condition that applies to the restriction.
	ConditionType *RestrictionConditionType `json:"conditionType,omitempty"`

	// MarketplaceId A marketplace identifier. Identifies the Amazon marketplace where the restriction is enforced.
	MarketplaceId string `json:"marketplaceId"`

	// Reasons A list of reasons for the restriction.
	Reasons *[]Reason `json:"reasons,omitempty"`
}

Restriction A listing restriction, optionally qualified by a condition, with a list of reasons for the restriction.

type RestrictionConditionType

type RestrictionConditionType string

RestrictionConditionType The condition that applies to the restriction.

const (
	RestrictionConditionTypeClubClub               RestrictionConditionType = "club_club"
	RestrictionConditionTypeCollectibleAcceptable  RestrictionConditionType = "collectible_acceptable"
	RestrictionConditionTypeCollectibleGood        RestrictionConditionType = "collectible_good"
	RestrictionConditionTypeCollectibleLikeNew     RestrictionConditionType = "collectible_like_new"
	RestrictionConditionTypeCollectibleVeryGood    RestrictionConditionType = "collectible_very_good"
	RestrictionConditionTypeNewNew                 RestrictionConditionType = "new_new"
	RestrictionConditionTypeNewOem                 RestrictionConditionType = "new_oem"
	RestrictionConditionTypeNewOpenBox             RestrictionConditionType = "new_open_box"
	RestrictionConditionTypeRefurbishedRefurbished RestrictionConditionType = "refurbished_refurbished"
	RestrictionConditionTypeUsedAcceptable         RestrictionConditionType = "used_acceptable"
	RestrictionConditionTypeUsedGood               RestrictionConditionType = "used_good"
	RestrictionConditionTypeUsedLikeNew            RestrictionConditionType = "used_like_new"
	RestrictionConditionTypeUsedVeryGood           RestrictionConditionType = "used_very_good"
)

Defines values for RestrictionConditionType.

type RestrictionList

type RestrictionList struct {
	Restrictions []Restriction `json:"restrictions"`
}

RestrictionList A list of restrictions for the specified Amazon catalog item.

Jump to

Keyboard shortcuts

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