solicitations

package
v0.0.0-...-0593bef Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2022 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Package solicitations provides primitives to interact the openapi HTTP API.

Code generated by go-sdk-codegen DO NOT EDIT.

Package solicitations provides primitives to interact the openapi HTTP API.

Code generated by go-sdk-codegen DO NOT EDIT.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCreateProductReviewAndSellerFeedbackSolicitationRequest

func NewCreateProductReviewAndSellerFeedbackSolicitationRequest(endpoint string, amazonOrderId string, params *CreateProductReviewAndSellerFeedbackSolicitationParams) (*http.Request, error)

NewCreateProductReviewAndSellerFeedbackSolicitationRequest generates requests for CreateProductReviewAndSellerFeedbackSolicitation

func NewGetSolicitationActionsForOrderRequest

func NewGetSolicitationActionsForOrderRequest(endpoint string, amazonOrderId string, params *GetSolicitationActionsForOrderParams) (*http.Request, error)

NewGetSolicitationActionsForOrderRequest generates requests for GetSolicitationActionsForOrder

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

func (c *Client) CreateProductReviewAndSellerFeedbackSolicitation(ctx context.Context, amazonOrderId string, params *CreateProductReviewAndSellerFeedbackSolicitationParams) (*http.Response, error)

func (*Client) GetSolicitationActionsForOrder

func (c *Client) GetSolicitationActionsForOrder(ctx context.Context, amazonOrderId string, params *GetSolicitationActionsForOrderParams) (*http.Response, error)

type ClientInterface

type ClientInterface interface {
	// GetSolicitationActionsForOrder request
	GetSolicitationActionsForOrder(ctx context.Context, amazonOrderId string, params *GetSolicitationActionsForOrderParams) (*http.Response, error)

	// CreateProductReviewAndSellerFeedbackSolicitation request
	CreateProductReviewAndSellerFeedbackSolicitation(ctx context.Context, amazonOrderId string, params *CreateProductReviewAndSellerFeedbackSolicitationParams) (*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 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) CreateProductReviewAndSellerFeedbackSolicitationWithResponse

func (c *ClientWithResponses) CreateProductReviewAndSellerFeedbackSolicitationWithResponse(ctx context.Context, amazonOrderId string, params *CreateProductReviewAndSellerFeedbackSolicitationParams) (*CreateProductReviewAndSellerFeedbackSolicitationResp, error)

CreateProductReviewAndSellerFeedbackSolicitationWithResponse request returning *CreateProductReviewAndSellerFeedbackSolicitationResponse

func (*ClientWithResponses) GetSolicitationActionsForOrderWithResponse

func (c *ClientWithResponses) GetSolicitationActionsForOrderWithResponse(ctx context.Context, amazonOrderId string, params *GetSolicitationActionsForOrderParams) (*GetSolicitationActionsForOrderResp, error)

GetSolicitationActionsForOrderWithResponse request returning *GetSolicitationActionsForOrderResponse

type ClientWithResponsesInterface

type ClientWithResponsesInterface interface {
	// GetSolicitationActionsForOrder request
	GetSolicitationActionsForOrderWithResponse(ctx context.Context, amazonOrderId string, params *GetSolicitationActionsForOrderParams) (*GetSolicitationActionsForOrderResp, error)

	// CreateProductReviewAndSellerFeedbackSolicitation request
	CreateProductReviewAndSellerFeedbackSolicitationWithResponse(ctx context.Context, amazonOrderId string, params *CreateProductReviewAndSellerFeedbackSolicitationParams) (*CreateProductReviewAndSellerFeedbackSolicitationResp, error)
}

ClientWithResponsesInterface is the interface specification for the client with responses above.

type CreateProductReviewAndSellerFeedbackSolicitationParams

type CreateProductReviewAndSellerFeedbackSolicitationParams struct {

	// A marketplace identifier. This specifies the marketplace in which the order was placed. Only one marketplace can be specified.
	MarketplaceIds []string `json:"marketplaceIds"`
}

CreateProductReviewAndSellerFeedbackSolicitationParams defines parameters for CreateProductReviewAndSellerFeedbackSolicitation.

type CreateProductReviewAndSellerFeedbackSolicitationResp

type CreateProductReviewAndSellerFeedbackSolicitationResp struct {
	Body         []byte
	HTTPResponse *http.Response
	Model        *CreateProductReviewAndSellerFeedbackSolicitationResponse
}

func ParseCreateProductReviewAndSellerFeedbackSolicitationResp

func ParseCreateProductReviewAndSellerFeedbackSolicitationResp(rsp *http.Response) (*CreateProductReviewAndSellerFeedbackSolicitationResp, error)

ParseCreateProductReviewAndSellerFeedbackSolicitationResp parses an HTTP response from a CreateProductReviewAndSellerFeedbackSolicitationWithResponse call

func (CreateProductReviewAndSellerFeedbackSolicitationResp) Status

Status returns HTTPResponse.Status

func (CreateProductReviewAndSellerFeedbackSolicitationResp) StatusCode

StatusCode returns HTTPResponse.StatusCode

type CreateProductReviewAndSellerFeedbackSolicitationResponse

type CreateProductReviewAndSellerFeedbackSolicitationResponse struct {

	// A list of error responses returned when a request is unsuccessful.
	Errors *ErrorList `json:"errors,omitempty"`
}

CreateProductReviewAndSellerFeedbackSolicitationResponse defines model for CreateProductReviewAndSellerFeedbackSolicitationResponse.

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 in a human-readable form.
	Message string `json:"message"`
}

Error defines model for Error.

type ErrorList

type ErrorList []Error

ErrorList defines model for ErrorList.

type GetSchemaResponse

type GetSchemaResponse struct {
	Links *struct {

		// A Link object.
		Self LinkObject `json:"self"`
	} `json:"_links,omitempty"`

	// A list of error responses returned when a request is unsuccessful.
	Errors *ErrorList `json:"errors,omitempty"`

	// A JSON schema document describing the expected payload of the action. This object can be validated against <a href=http://json-schema.org/draft-04/schema>http://json-schema.org/draft-04/schema</a>.
	Payload *Schema `json:"payload,omitempty"`
}

GetSchemaResponse defines model for GetSchemaResponse.

type GetSolicitationActionResponse

type GetSolicitationActionResponse struct {
	Embedded *struct {
		Schema *GetSchemaResponse `json:"schema,omitempty"`
	} `json:"_embedded,omitempty"`
	Links *struct {

		// A Link object.
		Schema LinkObject `json:"schema"`

		// A Link object.
		Self LinkObject `json:"self"`
	} `json:"_links,omitempty"`

	// A list of error responses returned when a request is unsuccessful.
	Errors *ErrorList `json:"errors,omitempty"`

	// A simple object containing the name of the template.
	Payload *SolicitationsAction `json:"payload,omitempty"`
}

GetSolicitationActionResponse defines model for GetSolicitationActionResponse.

type GetSolicitationActionsForOrderParams

type GetSolicitationActionsForOrderParams struct {

	// A marketplace identifier. This specifies the marketplace in which the order was placed. Only one marketplace can be specified.
	MarketplaceIds []string `json:"marketplaceIds"`
}

GetSolicitationActionsForOrderParams defines parameters for GetSolicitationActionsForOrder.

type GetSolicitationActionsForOrderResp

type GetSolicitationActionsForOrderResp struct {
	Body         []byte
	HTTPResponse *http.Response
	Model        *GetSolicitationActionsForOrderResponse
}

func ParseGetSolicitationActionsForOrderResp

func ParseGetSolicitationActionsForOrderResp(rsp *http.Response) (*GetSolicitationActionsForOrderResp, error)

ParseGetSolicitationActionsForOrderResp parses an HTTP response from a GetSolicitationActionsForOrderWithResponse call

func (GetSolicitationActionsForOrderResp) Status

Status returns HTTPResponse.Status

func (GetSolicitationActionsForOrderResp) StatusCode

func (r GetSolicitationActionsForOrderResp) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetSolicitationActionsForOrderResponse

type GetSolicitationActionsForOrderResponse struct {
	Embedded *struct {
		Actions []GetSolicitationActionResponse `json:"actions"`
	} `json:"_embedded,omitempty"`
	Links *struct {

		// Eligible actions for the specified amazonOrderId.
		Actions []LinkObject `json:"actions"`

		// A Link object.
		Self LinkObject `json:"self"`
	} `json:"_links,omitempty"`

	// A list of error responses returned when a request is unsuccessful.
	Errors *ErrorList `json:"errors,omitempty"`
}

GetSolicitationActionsForOrderResponse defines model for GetSolicitationActionsForOrderResponse.

type HttpRequestDoer

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

Doer performs HTTP requests.

The standard http.Client implements this interface.

type LinkObject

type LinkObject struct {

	// A URI for this object.
	Href string `json:"href"`

	// An identifier for this object.
	Name *string `json:"name,omitempty"`
}

LinkObject defines model for LinkObject.

type RequestBeforeFn

type RequestBeforeFn func(ctx context.Context, req *http.Request) error

RequestBeforeFn is the function signature for the RequestBefore callback function

type ResponseAfterFn

type ResponseAfterFn func(ctx context.Context, rsp *http.Response) error

ResponseAfterFn is the function signature for the ResponseAfter callback function

type Schema

type Schema struct {
	AdditionalProperties map[string]interface{} `json:"-"`
}

Schema defines model for Schema.

func (Schema) Get

func (a Schema) Get(fieldName string) (value interface{}, found bool)

Getter for additional properties for Schema. Returns the specified element and whether it was found

func (Schema) MarshalJSON

func (a Schema) MarshalJSON() ([]byte, error)

Override default JSON handling for Schema to handle AdditionalProperties

func (*Schema) Set

func (a *Schema) Set(fieldName string, value interface{})

Setter for additional properties for Schema

func (*Schema) UnmarshalJSON

func (a *Schema) UnmarshalJSON(b []byte) error

Override default JSON handling for Schema to handle AdditionalProperties

type SolicitationsAction

type SolicitationsAction struct {
	Name string `json:"name"`
}

SolicitationsAction defines model for SolicitationsAction.

Jump to

Keyboard shortcuts

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