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 ¶
- func NewCreateProductReviewAndSellerFeedbackSolicitationRequest(endpoint string, amazonOrderId string, ...) (*http.Request, error)
- func NewGetSolicitationActionsForOrderRequest(endpoint string, amazonOrderId string, ...) (*http.Request, error)
- type Client
- type ClientInterface
- type ClientOption
- type ClientWithResponses
- func (c *ClientWithResponses) CreateProductReviewAndSellerFeedbackSolicitationWithResponse(ctx context.Context, amazonOrderId string, ...) (*CreateProductReviewAndSellerFeedbackSolicitationResp, error)
- func (c *ClientWithResponses) GetSolicitationActionsForOrderWithResponse(ctx context.Context, amazonOrderId string, ...) (*GetSolicitationActionsForOrderResp, error)
- type ClientWithResponsesInterface
- type CreateProductReviewAndSellerFeedbackSolicitationParams
- type CreateProductReviewAndSellerFeedbackSolicitationResp
- type CreateProductReviewAndSellerFeedbackSolicitationResponse
- type Error
- type ErrorList
- type GetSchemaResponse
- type GetSolicitationActionResponse
- type GetSolicitationActionsForOrderParams
- type GetSolicitationActionsForOrderResp
- type GetSolicitationActionsForOrderResponse
- type HttpRequestDoer
- type LinkObject
- type RequestBeforeFn
- type ResponseAfterFn
- type Schema
- type SolicitationsAction
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 (*Client) GetSolicitationActionsForOrder ¶
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 ¶
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) 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 ¶
func (r CreateProductReviewAndSellerFeedbackSolicitationResp) Status() string
Status returns HTTPResponse.Status
func (CreateProductReviewAndSellerFeedbackSolicitationResp) StatusCode ¶
func (r CreateProductReviewAndSellerFeedbackSolicitationResp) StatusCode() int
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 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 ¶
func (r GetSolicitationActionsForOrderResp) Status() string
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 ¶
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 ¶
RequestBeforeFn is the function signature for the RequestBefore callback function
type ResponseAfterFn ¶
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 ¶
Getter for additional properties for Schema. Returns the specified element and whether it was found
func (Schema) MarshalJSON ¶
Override default JSON handling for Schema to handle AdditionalProperties
func (*Schema) UnmarshalJSON ¶
Override default JSON handling for Schema to handle AdditionalProperties
type SolicitationsAction ¶
type SolicitationsAction struct {
Name string `json:"name"`
}
SolicitationsAction defines model for SolicitationsAction.