notificationsv1

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

Package notificationsv1 provides primitives to interact with the openapi HTTP API.

Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.4.1 DO NOT EDIT.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCreateDestinationRequest

func NewCreateDestinationRequest(server string, body CreateDestinationJSONRequestBody) (*http.Request, error)

NewCreateDestinationRequest calls the generic CreateDestination builder with application/json body

func NewCreateDestinationRequestWithBody

func NewCreateDestinationRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)

NewCreateDestinationRequestWithBody generates requests for CreateDestination with any type of body

func NewCreateSubscriptionRequest

func NewCreateSubscriptionRequest(server string, notificationType NotificationType, body CreateSubscriptionJSONRequestBody) (*http.Request, error)

NewCreateSubscriptionRequest calls the generic CreateSubscription builder with application/json body

func NewCreateSubscriptionRequestWithBody

func NewCreateSubscriptionRequestWithBody(server string, notificationType NotificationType, contentType string, body io.Reader) (*http.Request, error)

NewCreateSubscriptionRequestWithBody generates requests for CreateSubscription with any type of body

func NewDeleteDestinationRequest

func NewDeleteDestinationRequest(server string, destinationId string) (*http.Request, error)

NewDeleteDestinationRequest generates requests for DeleteDestination

func NewDeleteSubscriptionByIdRequest

func NewDeleteSubscriptionByIdRequest(server string, notificationType NotificationType, subscriptionId string) (*http.Request, error)

NewDeleteSubscriptionByIdRequest generates requests for DeleteSubscriptionById

func NewGetDestinationRequest

func NewGetDestinationRequest(server string, destinationId string) (*http.Request, error)

NewGetDestinationRequest generates requests for GetDestination

func NewGetDestinationsRequest

func NewGetDestinationsRequest(server string) (*http.Request, error)

NewGetDestinationsRequest generates requests for GetDestinations

func NewGetSubscriptionByIdRequest

func NewGetSubscriptionByIdRequest(server string, notificationType NotificationType, subscriptionId string) (*http.Request, error)

NewGetSubscriptionByIdRequest generates requests for GetSubscriptionById

func NewGetSubscriptionRequest

func NewGetSubscriptionRequest(server string, notificationType NotificationType, params *GetSubscriptionParams) (*http.Request, error)

NewGetSubscriptionRequest generates requests for GetSubscription

Types

type AggregationFilter

type AggregationFilter struct {
	// AggregationSettings A container that holds all of the necessary properties to configure the aggregation of notifications.
	AggregationSettings *AggregationSettings `json:"aggregationSettings,omitempty"`
}

AggregationFilter A filter used to select the aggregation time period at which to send notifications (for example: limit to one notification every five minutes for high frequency notifications).

type AggregationSettings

type AggregationSettings struct {
	// AggregationTimePeriod The supported aggregation time periods. For example, if FiveMinutes is the value chosen, and 50 price updates occur for an ASIN within 5 minutes, Amazon will send only two notifications; one for the first event, and then a subsequent notification 5 minutes later with the final end state of the data. The 48 interim events will be dropped.
	AggregationTimePeriod AggregationTimePeriod `json:"aggregationTimePeriod"`
}

AggregationSettings A container that holds all of the necessary properties to configure the aggregation of notifications.

type AggregationTimePeriod

type AggregationTimePeriod string

AggregationTimePeriod The supported aggregation time periods. For example, if FiveMinutes is the value chosen, and 50 price updates occur for an ASIN within 5 minutes, Amazon will send only two notifications; one for the first event, and then a subsequent notification 5 minutes later with the final end state of the data. The 48 interim events will be dropped.

const (
	FiveMinutes AggregationTimePeriod = "FiveMinutes"
	TenMinutes  AggregationTimePeriod = "TenMinutes"
)

Defines values for AggregationTimePeriod.

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

func (c *Client) CreateDestination(ctx context.Context, body CreateDestinationJSONRequestBody) (*http.Response, error)

func (*Client) CreateDestinationWithBody

func (c *Client) CreateDestinationWithBody(ctx context.Context, contentType string, body io.Reader) (*http.Response, error)

func (*Client) CreateSubscription

func (c *Client) CreateSubscription(ctx context.Context, notificationType NotificationType, body CreateSubscriptionJSONRequestBody) (*http.Response, error)

func (*Client) CreateSubscriptionWithBody

func (c *Client) CreateSubscriptionWithBody(ctx context.Context, notificationType NotificationType, contentType string, body io.Reader) (*http.Response, error)

func (*Client) DeleteDestination

func (c *Client) DeleteDestination(ctx context.Context, destinationId string) (*http.Response, error)

func (*Client) DeleteSubscriptionById

func (c *Client) DeleteSubscriptionById(ctx context.Context, notificationType NotificationType, subscriptionId string) (*http.Response, error)

func (*Client) GetDestination

func (c *Client) GetDestination(ctx context.Context, destinationId string) (*http.Response, error)

func (*Client) GetDestinations

func (c *Client) GetDestinations(ctx context.Context) (*http.Response, error)

func (*Client) GetSubscription

func (c *Client) GetSubscription(ctx context.Context, notificationType NotificationType, params *GetSubscriptionParams) (*http.Response, error)

func (*Client) GetSubscriptionById

func (c *Client) GetSubscriptionById(ctx context.Context, notificationType NotificationType, subscriptionId string) (*http.Response, error)

type ClientInterface

type ClientInterface interface {
	// GetDestinations request
	GetDestinations(ctx context.Context) (*http.Response, error)

	// CreateDestinationWithBody request with any body
	CreateDestinationWithBody(ctx context.Context, contentType string, body io.Reader) (*http.Response, error)

	CreateDestination(ctx context.Context, body CreateDestinationJSONRequestBody) (*http.Response, error)

	// DeleteDestination request
	DeleteDestination(ctx context.Context, destinationId string) (*http.Response, error)

	// GetDestination request
	GetDestination(ctx context.Context, destinationId string) (*http.Response, error)

	// GetSubscription request
	GetSubscription(ctx context.Context, notificationType NotificationType, params *GetSubscriptionParams) (*http.Response, error)

	// CreateSubscriptionWithBody request with any body
	CreateSubscriptionWithBody(ctx context.Context, notificationType NotificationType, contentType string, body io.Reader) (*http.Response, error)

	CreateSubscription(ctx context.Context, notificationType NotificationType, body CreateSubscriptionJSONRequestBody) (*http.Response, error)

	// DeleteSubscriptionById request
	DeleteSubscriptionById(ctx context.Context, notificationType NotificationType, subscriptionId string) (*http.Response, error)

	// GetSubscriptionById request
	GetSubscriptionById(ctx context.Context, notificationType NotificationType, subscriptionId string) (*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) CreateDestinationWithBodyWithResponse

func (c *ClientWithResponses) CreateDestinationWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader) (*CreateDestinationResp, error)

CreateDestinationWithBodyWithResponse request with arbitrary body returning *CreateDestinationResp

func (*ClientWithResponses) CreateDestinationWithResponse

func (c *ClientWithResponses) CreateDestinationWithResponse(ctx context.Context, body CreateDestinationJSONRequestBody) (*CreateDestinationResp, error)

func (*ClientWithResponses) CreateSubscriptionWithBodyWithResponse

func (c *ClientWithResponses) CreateSubscriptionWithBodyWithResponse(ctx context.Context, notificationType NotificationType, contentType string, body io.Reader) (*CreateSubscriptionResp, error)

CreateSubscriptionWithBodyWithResponse request with arbitrary body returning *CreateSubscriptionResp

func (*ClientWithResponses) CreateSubscriptionWithResponse

func (c *ClientWithResponses) CreateSubscriptionWithResponse(ctx context.Context, notificationType NotificationType, body CreateSubscriptionJSONRequestBody) (*CreateSubscriptionResp, error)

func (*ClientWithResponses) DeleteDestinationWithResponse

func (c *ClientWithResponses) DeleteDestinationWithResponse(ctx context.Context, destinationId string) (*DeleteDestinationResp, error)

DeleteDestinationWithResponse request returning *DeleteDestinationResp

func (*ClientWithResponses) DeleteSubscriptionByIdWithResponse

func (c *ClientWithResponses) DeleteSubscriptionByIdWithResponse(ctx context.Context, notificationType NotificationType, subscriptionId string) (*DeleteSubscriptionByIdResp, error)

DeleteSubscriptionByIdWithResponse request returning *DeleteSubscriptionByIdResp

func (*ClientWithResponses) GetDestinationWithResponse

func (c *ClientWithResponses) GetDestinationWithResponse(ctx context.Context, destinationId string) (*GetDestinationResp, error)

GetDestinationWithResponse request returning *GetDestinationResp

func (*ClientWithResponses) GetDestinationsWithResponse

func (c *ClientWithResponses) GetDestinationsWithResponse(ctx context.Context) (*GetDestinationsResp, error)

GetDestinationsWithResponse request returning *GetDestinationsResp

func (*ClientWithResponses) GetSubscriptionByIdWithResponse

func (c *ClientWithResponses) GetSubscriptionByIdWithResponse(ctx context.Context, notificationType NotificationType, subscriptionId string) (*GetSubscriptionByIdResp, error)

GetSubscriptionByIdWithResponse request returning *GetSubscriptionByIdResp

func (*ClientWithResponses) GetSubscriptionWithResponse

func (c *ClientWithResponses) GetSubscriptionWithResponse(ctx context.Context, notificationType NotificationType, params *GetSubscriptionParams) (*GetSubscriptionResp, error)

GetSubscriptionWithResponse request returning *GetSubscriptionResp

type ClientWithResponsesInterface

type ClientWithResponsesInterface interface {
	// GetDestinationsWithResponse request
	GetDestinationsWithResponse(ctx context.Context) (*GetDestinationsResp, error)

	// CreateDestinationWithBodyWithResponse request with any body
	CreateDestinationWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader) (*CreateDestinationResp, error)

	CreateDestinationWithResponse(ctx context.Context, body CreateDestinationJSONRequestBody) (*CreateDestinationResp, error)

	// DeleteDestinationWithResponse request
	DeleteDestinationWithResponse(ctx context.Context, destinationId string) (*DeleteDestinationResp, error)

	// GetDestinationWithResponse request
	GetDestinationWithResponse(ctx context.Context, destinationId string) (*GetDestinationResp, error)

	// GetSubscriptionWithResponse request
	GetSubscriptionWithResponse(ctx context.Context, notificationType NotificationType, params *GetSubscriptionParams) (*GetSubscriptionResp, error)

	// CreateSubscriptionWithBodyWithResponse request with any body
	CreateSubscriptionWithBodyWithResponse(ctx context.Context, notificationType NotificationType, contentType string, body io.Reader) (*CreateSubscriptionResp, error)

	CreateSubscriptionWithResponse(ctx context.Context, notificationType NotificationType, body CreateSubscriptionJSONRequestBody) (*CreateSubscriptionResp, error)

	// DeleteSubscriptionByIdWithResponse request
	DeleteSubscriptionByIdWithResponse(ctx context.Context, notificationType NotificationType, subscriptionId string) (*DeleteSubscriptionByIdResp, error)

	// GetSubscriptionByIdWithResponse request
	GetSubscriptionByIdWithResponse(ctx context.Context, notificationType NotificationType, subscriptionId string) (*GetSubscriptionByIdResp, error)
}

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

type CreateDestinationJSONRequestBody

type CreateDestinationJSONRequestBody = CreateDestinationRequest

CreateDestinationJSONRequestBody defines body for CreateDestination for application/json ContentType.

type CreateDestinationRequest

type CreateDestinationRequest struct {
	// Name A developer-defined name to help identify this destination.
	Name string `json:"name"`

	// ResourceSpecification The information required to create a destination resource. Applications should use one resource type (sqs or eventBridge) per destination.
	ResourceSpecification DestinationResourceSpecification `json:"resourceSpecification"`
}

CreateDestinationRequest The request schema for the `createDestination` operation.

type CreateDestinationResp

func ParseCreateDestinationResp

func ParseCreateDestinationResp(rsp *http.Response) (*CreateDestinationResp, error)

ParseCreateDestinationResp parses an HTTP response from a CreateDestinationWithResponse call

func (CreateDestinationResp) Status

func (r CreateDestinationResp) Status() string

Status returns HTTPResponse.Status

func (CreateDestinationResp) StatusCode

func (r CreateDestinationResp) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type CreateDestinationResponse

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

	// Payload Information about the destination created when you call the `createDestination` operation.
	Payload *Destination `json:"payload,omitempty"`
}

CreateDestinationResponse The response schema for the createDestination operation.

type CreateSubscriptionJSONRequestBody

type CreateSubscriptionJSONRequestBody = CreateSubscriptionRequest

CreateSubscriptionJSONRequestBody defines body for CreateSubscription for application/json ContentType.

type CreateSubscriptionRequest

type CreateSubscriptionRequest struct {
	// DestinationId The identifier for the destination where notifications will be delivered.
	DestinationId string `json:"destinationId"`

	// PayloadVersion The version of the payload object to be used in the notification.
	PayloadVersion string `json:"payloadVersion"`

	// ProcessingDirective Additional information passed to the subscription to control the processing of notifications. For example, you can use an `eventFilter` to customize your subscription to send notifications for only the specified `marketplaceId`s, or select the aggregation time period at which to send notifications (for example: limit to one notification every five minutes for high frequency notifications). The specific features available vary depending on the `notificationType`.
	//
	// This feature is currently only supported by the `ANY_OFFER_CHANGED` and `ORDER_CHANGE` `notificationType`s.
	ProcessingDirective *ProcessingDirective `json:"processingDirective,omitempty"`
}

CreateSubscriptionRequest The request schema for the `createSubscription` operation.

type CreateSubscriptionResp

func ParseCreateSubscriptionResp

func ParseCreateSubscriptionResp(rsp *http.Response) (*CreateSubscriptionResp, error)

ParseCreateSubscriptionResp parses an HTTP response from a CreateSubscriptionWithResponse call

func (CreateSubscriptionResp) Status

func (r CreateSubscriptionResp) Status() string

Status returns HTTPResponse.Status

func (CreateSubscriptionResp) StatusCode

func (r CreateSubscriptionResp) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type CreateSubscriptionResponse

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

	// Payload Information about the subscription.
	Payload *Subscription `json:"payload,omitempty"`
}

CreateSubscriptionResponse The response schema for the `createSubscription` operation.

type DeleteDestinationResp

func ParseDeleteDestinationResp

func ParseDeleteDestinationResp(rsp *http.Response) (*DeleteDestinationResp, error)

ParseDeleteDestinationResp parses an HTTP response from a DeleteDestinationWithResponse call

func (DeleteDestinationResp) Status

func (r DeleteDestinationResp) Status() string

Status returns HTTPResponse.Status

func (DeleteDestinationResp) StatusCode

func (r DeleteDestinationResp) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type DeleteDestinationResponse

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

DeleteDestinationResponse The response schema for the `deleteDestination` operation.

type DeleteSubscriptionByIdResp

func ParseDeleteSubscriptionByIdResp

func ParseDeleteSubscriptionByIdResp(rsp *http.Response) (*DeleteSubscriptionByIdResp, error)

ParseDeleteSubscriptionByIdResp parses an HTTP response from a DeleteSubscriptionByIdWithResponse call

func (DeleteSubscriptionByIdResp) Status

Status returns HTTPResponse.Status

func (DeleteSubscriptionByIdResp) StatusCode

func (r DeleteSubscriptionByIdResp) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type DeleteSubscriptionByIdResponse

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

DeleteSubscriptionByIdResponse The response schema for the `deleteSubscriptionById` operation.

type Destination

type Destination struct {
	// DestinationId The destination identifier generated when you created the destination.
	DestinationId string `json:"destinationId"`

	// Name The developer-defined name for this destination.
	Name string `json:"name"`

	// Resource The destination resource types.
	Resource DestinationResource `json:"resource"`
}

Destination Information about the destination created when you call the `createDestination` operation.

type DestinationList

type DestinationList = []Destination

DestinationList A list of destinations.

type DestinationResource

type DestinationResource struct {
	// EventBridge The Amazon EventBridge destination.
	EventBridge *EventBridgeResource `json:"eventBridge,omitempty"`

	// Sqs The information required to create an Amazon Simple Queue Service (Amazon SQS) queue destination.
	Sqs *SqsResource `json:"sqs,omitempty"`
}

DestinationResource The destination resource types.

type DestinationResourceSpecification

type DestinationResourceSpecification struct {
	// EventBridge The information required to create an Amazon EventBridge destination.
	EventBridge *EventBridgeResourceSpecification `json:"eventBridge,omitempty"`

	// Sqs The information required to create an Amazon Simple Queue Service (Amazon SQS) queue destination.
	Sqs *SqsResource `json:"sqs,omitempty"`
}

DestinationResourceSpecification The information required to create a destination resource. Applications should use one resource type (sqs or eventBridge) per destination.

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 An 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 EventBridgeResource

type EventBridgeResource struct {
	// AccountId The identifier for the AWS account that is responsible for charges related to receiving notifications.
	AccountId string `json:"accountId"`

	// Name The name of the partner event source associated with the destination.
	Name string `json:"name"`

	// Region The AWS region in which you receive the notifications. For AWS regions that are supported in Amazon EventBridge, refer to [Amazon EventBridge endpoints and quotas](https://docs.aws.amazon.com/general/latest/gr/ev.html).
	Region string `json:"region"`
}

EventBridgeResource The Amazon EventBridge destination.

type EventBridgeResourceSpecification

type EventBridgeResourceSpecification struct {
	// AccountId The identifier for the AWS account that is responsible for charges related to receiving notifications.
	AccountId string `json:"accountId"`

	// Region The AWS region in which you will be receiving the notifications.
	Region string `json:"region"`
}

EventBridgeResourceSpecification The information required to create an Amazon EventBridge destination.

type EventFilter

type EventFilter struct {
	// AggregationSettings A container that holds all of the necessary properties to configure the aggregation of notifications.
	AggregationSettings *AggregationSettings `json:"aggregationSettings,omitempty"`

	// EventFilterType An `eventFilterType` value that is supported by the specific `notificationType`. This is used by the subscription service to determine the type of event filter. Refer to [Notification Type Values](https://developer-docs.amazon.com/sp-api/docs/notification-type-values) to determine if an `eventFilterType` is supported.
	EventFilterType EventFilterEventFilterType `json:"eventFilterType"`

	// MarketplaceIds A list of marketplace identifiers to subscribe to (for example: ATVPDKIKX0DER). To receive notifications in every marketplace, do not provide this list.
	MarketplaceIds *MarketplaceIds `json:"marketplaceIds,omitempty"`

	// OrderChangeTypes A list of order change types to subscribe to (for example: `BuyerRequestedChange`). To receive notifications of all change types, do not provide this list.
	OrderChangeTypes *OrderChangeTypes `json:"orderChangeTypes,omitempty"`
}

EventFilter defines model for EventFilter.

type EventFilterEventFilterType

type EventFilterEventFilterType string

EventFilterEventFilterType An `eventFilterType` value that is supported by the specific `notificationType`. This is used by the subscription service to determine the type of event filter. Refer to [Notification Type Values](https://developer-docs.amazon.com/sp-api/docs/notification-type-values) to determine if an `eventFilterType` is supported.

const (
	ANYOFFERCHANGED EventFilterEventFilterType = "ANY_OFFER_CHANGED"
	ORDERCHANGE     EventFilterEventFilterType = "ORDER_CHANGE"
)

Defines values for EventFilterEventFilterType.

type GetDestinationResp

type GetDestinationResp struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *GetDestinationResponse
	JSON400      *GetDestinationResponse
	JSON403      *GetDestinationResponse
	JSON404      *GetDestinationResponse
	JSON409      *GetDestinationResponse
	JSON413      *GetDestinationResponse
	JSON415      *GetDestinationResponse
	JSON429      *GetDestinationResponse
	JSON500      *GetDestinationResponse
	JSON503      *GetDestinationResponse
}

func ParseGetDestinationResp

func ParseGetDestinationResp(rsp *http.Response) (*GetDestinationResp, error)

ParseGetDestinationResp parses an HTTP response from a GetDestinationWithResponse call

func (GetDestinationResp) Status

func (r GetDestinationResp) Status() string

Status returns HTTPResponse.Status

func (GetDestinationResp) StatusCode

func (r GetDestinationResp) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetDestinationResponse

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

	// Payload Information about the destination created when you call the `createDestination` operation.
	Payload *Destination `json:"payload,omitempty"`
}

GetDestinationResponse The response schema for the `getDestination` operation.

type GetDestinationsResp

func ParseGetDestinationsResp

func ParseGetDestinationsResp(rsp *http.Response) (*GetDestinationsResp, error)

ParseGetDestinationsResp parses an HTTP response from a GetDestinationsWithResponse call

func (GetDestinationsResp) Status

func (r GetDestinationsResp) Status() string

Status returns HTTPResponse.Status

func (GetDestinationsResp) StatusCode

func (r GetDestinationsResp) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetDestinationsResponse

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

	// Payload A list of destinations.
	Payload *DestinationList `json:"payload,omitempty"`
}

GetDestinationsResponse The response schema for the `getDestinations` operation.

type GetSubscriptionByIdResp

func ParseGetSubscriptionByIdResp

func ParseGetSubscriptionByIdResp(rsp *http.Response) (*GetSubscriptionByIdResp, error)

ParseGetSubscriptionByIdResp parses an HTTP response from a GetSubscriptionByIdWithResponse call

func (GetSubscriptionByIdResp) Status

func (r GetSubscriptionByIdResp) Status() string

Status returns HTTPResponse.Status

func (GetSubscriptionByIdResp) StatusCode

func (r GetSubscriptionByIdResp) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetSubscriptionByIdResponse

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

	// Payload Information about the subscription.
	Payload *Subscription `json:"payload,omitempty"`
}

GetSubscriptionByIdResponse The response schema for the `getSubscriptionById` operation.

type GetSubscriptionParams added in v1.0.7

type GetSubscriptionParams struct {
	// PayloadVersion The version of the payload object to be used in the notification.
	PayloadVersion *string `form:"payloadVersion,omitempty" json:"payloadVersion,omitempty"`
}

GetSubscriptionParams defines parameters for GetSubscription.

type GetSubscriptionResp

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

func ParseGetSubscriptionResp

func ParseGetSubscriptionResp(rsp *http.Response) (*GetSubscriptionResp, error)

ParseGetSubscriptionResp parses an HTTP response from a GetSubscriptionWithResponse call

func (GetSubscriptionResp) Status

func (r GetSubscriptionResp) Status() string

Status returns HTTPResponse.Status

func (GetSubscriptionResp) StatusCode

func (r GetSubscriptionResp) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetSubscriptionResponse

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

	// Payload Information about the subscription.
	Payload *Subscription `json:"payload,omitempty"`
}

GetSubscriptionResponse The response schema for the `getSubscription` operation.

type HttpRequestDoer

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

Doer performs HTTP requests.

The standard http.Client implements this interface.

type MarketplaceFilter

type MarketplaceFilter struct {
	// MarketplaceIds A list of marketplace identifiers to subscribe to (for example: ATVPDKIKX0DER). To receive notifications in every marketplace, do not provide this list.
	MarketplaceIds *MarketplaceIds `json:"marketplaceIds,omitempty"`
}

MarketplaceFilter An event filter to customize your subscription to send notifications for only the specified `marketplaceId`s.

type MarketplaceIds

type MarketplaceIds = []string

MarketplaceIds A list of marketplace identifiers to subscribe to (for example: ATVPDKIKX0DER). To receive notifications in every marketplace, do not provide this list.

type NotificationType

type NotificationType = string

NotificationType defines model for NotificationType.

type OrderChangeTypeEnum

type OrderChangeTypeEnum string

OrderChangeTypeEnum The supported order change type of ORDER_CHANGE notification.

const (
	BuyerRequestedChange OrderChangeTypeEnum = "BuyerRequestedChange"
	OrderStatusChange    OrderChangeTypeEnum = "OrderStatusChange"
)

Defines values for OrderChangeTypeEnum.

type OrderChangeTypeFilter

type OrderChangeTypeFilter struct {
	// OrderChangeTypes A list of order change types to subscribe to (for example: `BuyerRequestedChange`). To receive notifications of all change types, do not provide this list.
	OrderChangeTypes *OrderChangeTypes `json:"orderChangeTypes,omitempty"`
}

OrderChangeTypeFilter An event filter to customize your subscription to send notifications for only the specified `orderChangeType`.

type OrderChangeTypes

type OrderChangeTypes = []OrderChangeTypeEnum

OrderChangeTypes A list of order change types to subscribe to (for example: `BuyerRequestedChange`). To receive notifications of all change types, do not provide this list.

type ProcessingDirective

type ProcessingDirective struct {
	// EventFilter A `notificationType` specific filter. This object contains all of the currently available filters and properties that you can use to define a `notificationType` specific filter.
	EventFilter *EventFilter `json:"eventFilter,omitempty"`
}

ProcessingDirective Additional information passed to the subscription to control the processing of notifications. For example, you can use an `eventFilter` to customize your subscription to send notifications for only the specified `marketplaceId`s, or select the aggregation time period at which to send notifications (for example: limit to one notification every five minutes for high frequency notifications). The specific features available vary depending on the `notificationType`.

This feature is currently only supported by the `ANY_OFFER_CHANGED` and `ORDER_CHANGE` `notificationType`s.

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 SqsResource

type SqsResource struct {
	// Arn The Amazon Resource Name (ARN) associated with the SQS queue.
	Arn string `json:"arn"`
}

SqsResource The information required to create an Amazon Simple Queue Service (Amazon SQS) queue destination.

type Subscription

type Subscription struct {
	// DestinationId The identifier for the destination where notifications will be delivered.
	DestinationId string `json:"destinationId"`

	// PayloadVersion The version of the payload object to be used in the notification.
	PayloadVersion string `json:"payloadVersion"`

	// ProcessingDirective Additional information passed to the subscription to control the processing of notifications. For example, you can use an `eventFilter` to customize your subscription to send notifications for only the specified `marketplaceId`s, or select the aggregation time period at which to send notifications (for example: limit to one notification every five minutes for high frequency notifications). The specific features available vary depending on the `notificationType`.
	//
	// This feature is currently only supported by the `ANY_OFFER_CHANGED` and `ORDER_CHANGE` `notificationType`s.
	ProcessingDirective *ProcessingDirective `json:"processingDirective,omitempty"`

	// SubscriptionId The subscription identifier generated when the subscription is created.
	SubscriptionId string `json:"subscriptionId"`
}

Subscription Information about the subscription.

Jump to

Keyboard shortcuts

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