Documentation ¶
Overview ¶
Package listingsItems provides primitives to interact the openapi HTTP API.
Code generated by go-sdk-codegen DO NOT EDIT.
Package listingsItems provides primitives to interact the openapi HTTP API.
Code generated by go-sdk-codegen DO NOT EDIT.
Index ¶
- func NewDeleteListingsItemRequest(endpoint string, sellerId string, sku string, params *DeleteListingsItemParams) (*http.Request, error)
- func NewPatchListingsItemRequest(endpoint string, sellerId string, sku string, params *PatchListingsItemParams, ...) (*http.Request, error)
- func NewPatchListingsItemRequestWithBody(endpoint string, sellerId string, sku string, params *PatchListingsItemParams, ...) (*http.Request, error)
- func NewPutListingsItemRequest(endpoint string, sellerId string, sku string, params *PutListingsItemParams, ...) (*http.Request, error)
- func NewPutListingsItemRequestWithBody(endpoint string, sellerId string, sku string, params *PutListingsItemParams, ...) (*http.Request, error)
- type Client
- func (c *Client) DeleteListingsItem(ctx context.Context, sellerId string, sku string, ...) (*http.Response, error)
- func (c *Client) PatchListingsItem(ctx context.Context, sellerId string, sku string, ...) (*http.Response, error)
- func (c *Client) PatchListingsItemWithBody(ctx context.Context, sellerId string, sku string, ...) (*http.Response, error)
- func (c *Client) PutListingsItem(ctx context.Context, sellerId string, sku string, ...) (*http.Response, error)
- func (c *Client) PutListingsItemWithBody(ctx context.Context, sellerId string, sku string, ...) (*http.Response, error)
- type ClientInterface
- type ClientOption
- type ClientWithResponses
- func (c *ClientWithResponses) DeleteListingsItemWithResponse(ctx context.Context, sellerId string, sku string, ...) (*DeleteListingsItemResp, error)
- func (c *ClientWithResponses) PatchListingsItemWithBodyWithResponse(ctx context.Context, sellerId string, sku string, ...) (*PatchListingsItemResp, error)
- func (c *ClientWithResponses) PatchListingsItemWithResponse(ctx context.Context, sellerId string, sku string, ...) (*PatchListingsItemResp, error)
- func (c *ClientWithResponses) PutListingsItemWithBodyWithResponse(ctx context.Context, sellerId string, sku string, ...) (*PutListingsItemResp, error)
- func (c *ClientWithResponses) PutListingsItemWithResponse(ctx context.Context, sellerId string, sku string, ...) (*PutListingsItemResp, error)
- type ClientWithResponsesInterface
- type DeleteListingsItemParams
- type DeleteListingsItemResp
- type Error
- type ErrorList
- type HttpRequestDoer
- type Issue
- type ListingsItemPatchRequest
- type ListingsItemPutRequest
- type ListingsItemPutRequest_Attributes
- func (a ListingsItemPutRequest_Attributes) Get(fieldName string) (value interface{}, found bool)
- func (a ListingsItemPutRequest_Attributes) MarshalJSON() ([]byte, error)
- func (a *ListingsItemPutRequest_Attributes) Set(fieldName string, value interface{})
- func (a *ListingsItemPutRequest_Attributes) UnmarshalJSON(b []byte) error
- type ListingsItemSubmissionResponse
- type PatchListingsItemJSONBody
- type PatchListingsItemJSONRequestBody
- type PatchListingsItemParams
- type PatchListingsItemResp
- type PatchOperation
- type PutListingsItemJSONBody
- type PutListingsItemJSONRequestBody
- type PutListingsItemParams
- type PutListingsItemResp
- type RequestBeforeFn
- type ResponseAfterFn
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewDeleteListingsItemRequest ¶
func NewDeleteListingsItemRequest(endpoint string, sellerId string, sku string, params *DeleteListingsItemParams) (*http.Request, error)
NewDeleteListingsItemRequest generates requests for DeleteListingsItem
func NewPatchListingsItemRequest ¶
func NewPatchListingsItemRequest(endpoint string, sellerId string, sku string, params *PatchListingsItemParams, body PatchListingsItemJSONRequestBody) (*http.Request, error)
NewPatchListingsItemRequest calls the generic PatchListingsItem builder with application/json body
func NewPatchListingsItemRequestWithBody ¶
func NewPatchListingsItemRequestWithBody(endpoint string, sellerId string, sku string, params *PatchListingsItemParams, contentType string, body io.Reader) (*http.Request, error)
NewPatchListingsItemRequestWithBody generates requests for PatchListingsItem with any type of body
func NewPutListingsItemRequest ¶
func NewPutListingsItemRequest(endpoint string, sellerId string, sku string, params *PutListingsItemParams, body PutListingsItemJSONRequestBody) (*http.Request, error)
NewPutListingsItemRequest calls the generic PutListingsItem builder with application/json body
func NewPutListingsItemRequestWithBody ¶
func NewPutListingsItemRequestWithBody(endpoint string, sellerId string, sku string, params *PutListingsItemParams, contentType string, body io.Reader) (*http.Request, error)
NewPutListingsItemRequestWithBody generates requests for PutListingsItem with any type of body
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. Endpoint string // Doer for performing requests, typically a *http.Client with any // customized settings, such as certificate chains. Client HttpRequestDoer // A callback for modifying requests which are generated before sending over // the network. RequestBefore RequestBeforeFn // A callback for modifying response which are generated before sending over // the network. ResponseAfter ResponseAfterFn // 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(endpoint string, opts ...ClientOption) (*Client, error)
Creates a new Client, with reasonable defaults
func (*Client) DeleteListingsItem ¶
func (*Client) PatchListingsItem ¶
func (c *Client) PatchListingsItem(ctx context.Context, sellerId string, sku string, params *PatchListingsItemParams, body PatchListingsItemJSONRequestBody) (*http.Response, error)
func (*Client) PatchListingsItemWithBody ¶
func (*Client) PutListingsItem ¶
func (c *Client) PutListingsItem(ctx context.Context, sellerId string, sku string, params *PutListingsItemParams, body PutListingsItemJSONRequestBody) (*http.Response, error)
type ClientInterface ¶
type ClientInterface interface { // DeleteListingsItem request DeleteListingsItem(ctx context.Context, sellerId string, sku string, params *DeleteListingsItemParams) (*http.Response, error) // PatchListingsItem request with any body PatchListingsItemWithBody(ctx context.Context, sellerId string, sku string, params *PatchListingsItemParams, contentType string, body io.Reader) (*http.Response, error) PatchListingsItem(ctx context.Context, sellerId string, sku string, params *PatchListingsItemParams, body PatchListingsItemJSONRequestBody) (*http.Response, error) // PutListingsItem request with any body PutListingsItemWithBody(ctx context.Context, sellerId string, sku string, params *PutListingsItemParams, contentType string, body io.Reader) (*http.Response, error) PutListingsItem(ctx context.Context, sellerId string, sku string, params *PutListingsItemParams, body PutListingsItemJSONRequestBody) (*http.Response, error) }
The interface specification for the client above.
type ClientOption ¶
ClientOption allows setting custom parameters during construction
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 WithRequestBefore ¶
func WithRequestBefore(fn RequestBeforeFn) ClientOption
WithRequestBefore allows setting up a callback function, which will be called right before sending the request. This can be used to mutate the request.
func WithResponseAfter ¶
func WithResponseAfter(fn ResponseAfterFn) ClientOption
WithResponseAfter allows setting up a callback function, which will be called right after get response the request. This can be used to log.
func WithUserAgent ¶
func WithUserAgent(userAgent string) ClientOption
WithUserAgent set up useragent add user agent to every request automatically
type ClientWithResponses ¶
type ClientWithResponses struct {
ClientInterface
}
ClientWithResponses builds on ClientInterface to offer response payloads
func NewClientWithResponses ¶
func NewClientWithResponses(endpoint string, opts ...ClientOption) (*ClientWithResponses, error)
NewClientWithResponses creates a new ClientWithResponses, which wraps Client with return type handling
func (*ClientWithResponses) DeleteListingsItemWithResponse ¶
func (c *ClientWithResponses) DeleteListingsItemWithResponse(ctx context.Context, sellerId string, sku string, params *DeleteListingsItemParams) (*DeleteListingsItemResp, error)
DeleteListingsItemWithResponse request returning *DeleteListingsItemResponse
func (*ClientWithResponses) PatchListingsItemWithBodyWithResponse ¶
func (c *ClientWithResponses) PatchListingsItemWithBodyWithResponse(ctx context.Context, sellerId string, sku string, params *PatchListingsItemParams, contentType string, body io.Reader) (*PatchListingsItemResp, error)
PatchListingsItemWithBodyWithResponse request with arbitrary body returning *PatchListingsItemResponse
func (*ClientWithResponses) PatchListingsItemWithResponse ¶
func (c *ClientWithResponses) PatchListingsItemWithResponse(ctx context.Context, sellerId string, sku string, params *PatchListingsItemParams, body PatchListingsItemJSONRequestBody) (*PatchListingsItemResp, error)
func (*ClientWithResponses) PutListingsItemWithBodyWithResponse ¶
func (c *ClientWithResponses) PutListingsItemWithBodyWithResponse(ctx context.Context, sellerId string, sku string, params *PutListingsItemParams, contentType string, body io.Reader) (*PutListingsItemResp, error)
PutListingsItemWithBodyWithResponse request with arbitrary body returning *PutListingsItemResponse
func (*ClientWithResponses) PutListingsItemWithResponse ¶
func (c *ClientWithResponses) PutListingsItemWithResponse(ctx context.Context, sellerId string, sku string, params *PutListingsItemParams, body PutListingsItemJSONRequestBody) (*PutListingsItemResp, error)
type ClientWithResponsesInterface ¶
type ClientWithResponsesInterface interface { // DeleteListingsItem request DeleteListingsItemWithResponse(ctx context.Context, sellerId string, sku string, params *DeleteListingsItemParams) (*DeleteListingsItemResp, error) // PatchListingsItem request with any body PatchListingsItemWithBodyWithResponse(ctx context.Context, sellerId string, sku string, params *PatchListingsItemParams, contentType string, body io.Reader) (*PatchListingsItemResp, error) PatchListingsItemWithResponse(ctx context.Context, sellerId string, sku string, params *PatchListingsItemParams, body PatchListingsItemJSONRequestBody) (*PatchListingsItemResp, error) // PutListingsItem request with any body PutListingsItemWithBodyWithResponse(ctx context.Context, sellerId string, sku string, params *PutListingsItemParams, contentType string, body io.Reader) (*PutListingsItemResp, error) PutListingsItemWithResponse(ctx context.Context, sellerId string, sku string, params *PutListingsItemParams, body PutListingsItemJSONRequestBody) (*PutListingsItemResp, error) }
ClientWithResponsesInterface is the interface specification for the client with responses above.
type DeleteListingsItemParams ¶
type DeleteListingsItemParams struct { // A comma-delimited list of Amazon marketplace identifiers for the request. MarketplaceIds []string `json:"marketplaceIds"` // A locale for localization of issues. 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. IssueLocale *string `json:"issueLocale,omitempty"` }
DeleteListingsItemParams defines parameters for DeleteListingsItem.
type DeleteListingsItemResp ¶
type DeleteListingsItemResp struct { Body []byte HTTPResponse *http.Response JSON200 *ListingsItemSubmissionResponse JSON400 *ErrorList JSON403 *ErrorList JSON413 *ErrorList JSON415 *ErrorList JSON429 *ErrorList JSON500 *ErrorList JSON503 *ErrorList }
func ParseDeleteListingsItemResp ¶
func ParseDeleteListingsItemResp(rsp *http.Response) (*DeleteListingsItemResp, error)
ParseDeleteListingsItemResp parses an HTTP response from a DeleteListingsItemWithResponse call
func (DeleteListingsItemResp) Status ¶
func (r DeleteListingsItemResp) Status() string
Status returns HTTPResponse.Status
func (DeleteListingsItemResp) StatusCode ¶
func (r DeleteListingsItemResp) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type Error ¶
type Error struct { // An error code that identifies the type of error that occurred. Code string `json:"code"` // Additional details that can help the caller understand or fix the issue. Details *string `json:"details,omitempty"` // A message that describes the error condition. Message string `json:"message"` }
Error defines model for Error.
type ErrorList ¶
type ErrorList struct {
Errors []Error `json:"errors"`
}
ErrorList defines model for ErrorList.
type HttpRequestDoer ¶
Doer performs HTTP requests.
The standard http.Client implements this interface.
type Issue ¶
type Issue struct { // Name of the attribute associated with the issue, if applicable. AttributeName *string `json:"attributeName,omitempty"` // An issue code that identifies the type of issue. Code string `json:"code"` // A message that describes the issue. Message string `json:"message"` // The severity of the issue. Severity string `json:"severity"` }
Issue defines model for Issue.
type ListingsItemPatchRequest ¶
type ListingsItemPatchRequest struct { // One or more JSON Patch operations to perform on the listings item. Patches []PatchOperation `json:"patches"` // The Amazon product type of the listings item. ProductType string `json:"productType"` }
ListingsItemPatchRequest defines model for ListingsItemPatchRequest.
type ListingsItemPutRequest ¶
type ListingsItemPutRequest struct { // JSON object containing structured listings item attribute data keyed by attribute name. Attributes ListingsItemPutRequest_Attributes `json:"attributes"` // The Amazon product type of the listings item. ProductType string `json:"productType"` // The name of the requirements set for the provided data. Requirements *string `json:"requirements,omitempty"` }
ListingsItemPutRequest defines model for ListingsItemPutRequest.
type ListingsItemPutRequest_Attributes ¶
type ListingsItemPutRequest_Attributes struct {
AdditionalProperties map[string]interface{} `json:"-"`
}
ListingsItemPutRequest_Attributes defines model for ListingsItemPutRequest.Attributes.
func (ListingsItemPutRequest_Attributes) Get ¶
func (a ListingsItemPutRequest_Attributes) Get(fieldName string) (value interface{}, found bool)
Getter for additional properties for ListingsItemPutRequest_Attributes. Returns the specified element and whether it was found
func (ListingsItemPutRequest_Attributes) MarshalJSON ¶
func (a ListingsItemPutRequest_Attributes) MarshalJSON() ([]byte, error)
Override default JSON handling for ListingsItemPutRequest_Attributes to handle AdditionalProperties
func (*ListingsItemPutRequest_Attributes) Set ¶
func (a *ListingsItemPutRequest_Attributes) Set(fieldName string, value interface{})
Setter for additional properties for ListingsItemPutRequest_Attributes
func (*ListingsItemPutRequest_Attributes) UnmarshalJSON ¶
func (a *ListingsItemPutRequest_Attributes) UnmarshalJSON(b []byte) error
Override default JSON handling for ListingsItemPutRequest_Attributes to handle AdditionalProperties
type ListingsItemSubmissionResponse ¶
type ListingsItemSubmissionResponse struct { // Listings item issues related to the listings item submission. Issues *[]Issue `json:"issues,omitempty"` // A selling partner provided identifier for an Amazon listing. Sku string `json:"sku"` // The status of the listings item submission. Status string `json:"status"` // The unique identifier of the listings item submission. SubmissionId string `json:"submissionId"` }
ListingsItemSubmissionResponse defines model for ListingsItemSubmissionResponse.
type PatchListingsItemJSONBody ¶
type PatchListingsItemJSONBody ListingsItemPatchRequest
PatchListingsItemJSONBody defines parameters for PatchListingsItem.
type PatchListingsItemJSONRequestBody ¶
type PatchListingsItemJSONRequestBody PatchListingsItemJSONBody
PatchListingsItemRequestBody defines body for PatchListingsItem for application/json ContentType.
type PatchListingsItemParams ¶
type PatchListingsItemParams struct { // A comma-delimited list of Amazon marketplace identifiers for the request. MarketplaceIds []string `json:"marketplaceIds"` // A locale for localization of issues. 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. IssueLocale *string `json:"issueLocale,omitempty"` }
PatchListingsItemParams defines parameters for PatchListingsItem.
type PatchListingsItemResp ¶
type PatchListingsItemResp struct { Body []byte HTTPResponse *http.Response JSON200 *ListingsItemSubmissionResponse JSON400 *ErrorList JSON403 *ErrorList JSON413 *ErrorList JSON415 *ErrorList JSON429 *ErrorList JSON500 *ErrorList JSON503 *ErrorList }
func ParsePatchListingsItemResp ¶
func ParsePatchListingsItemResp(rsp *http.Response) (*PatchListingsItemResp, error)
ParsePatchListingsItemResp parses an HTTP response from a PatchListingsItemWithResponse call
func (PatchListingsItemResp) Status ¶
func (r PatchListingsItemResp) Status() string
Status returns HTTPResponse.Status
func (PatchListingsItemResp) StatusCode ¶
func (r PatchListingsItemResp) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type PatchOperation ¶
type PatchOperation struct { // Type of JSON Patch operation. Supported JSON Patch operations include add, replace, and delete. See <https://tools.ietf.org/html/rfc6902>. Op string `json:"op"` // JSON Pointer path of the element to patch. See <https://tools.ietf.org/html/rfc6902>. Path string `json:"path"` // JSON value to add, replace, or delete. Value *[]struct { AdditionalProperties map[string]interface{} `json:"-"` } `json:"value,omitempty"` }
PatchOperation defines model for PatchOperation.
type PutListingsItemJSONBody ¶
type PutListingsItemJSONBody ListingsItemPutRequest
PutListingsItemJSONBody defines parameters for PutListingsItem.
type PutListingsItemJSONRequestBody ¶
type PutListingsItemJSONRequestBody PutListingsItemJSONBody
PutListingsItemRequestBody defines body for PutListingsItem for application/json ContentType.
type PutListingsItemParams ¶
type PutListingsItemParams struct { // A comma-delimited list of Amazon marketplace identifiers for the request. MarketplaceIds []string `json:"marketplaceIds"` // A locale for localization of issues. 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. IssueLocale *string `json:"issueLocale,omitempty"` }
PutListingsItemParams defines parameters for PutListingsItem.
type PutListingsItemResp ¶
type PutListingsItemResp struct { Body []byte HTTPResponse *http.Response JSON200 *ListingsItemSubmissionResponse JSON400 *ErrorList JSON403 *ErrorList JSON413 *ErrorList JSON415 *ErrorList JSON429 *ErrorList JSON500 *ErrorList JSON503 *ErrorList }
func ParsePutListingsItemResp ¶
func ParsePutListingsItemResp(rsp *http.Response) (*PutListingsItemResp, error)
ParsePutListingsItemResp parses an HTTP response from a PutListingsItemWithResponse call
func (PutListingsItemResp) Status ¶
func (r PutListingsItemResp) Status() string
Status returns HTTPResponse.Status
func (PutListingsItemResp) StatusCode ¶
func (r PutListingsItemResp) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type RequestBeforeFn ¶
RequestBeforeFn is the function signature for the RequestBefore callback function