appIntegrations20240401

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

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

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

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCreateNotificationRequest

func NewCreateNotificationRequest(server string, body CreateNotificationJSONRequestBody) (*http.Request, error)

NewCreateNotificationRequest calls the generic CreateNotification builder with application/json body

func NewCreateNotificationRequestWithBody

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

NewCreateNotificationRequestWithBody generates requests for CreateNotification with any type of body

func NewDeleteNotificationsRequest

func NewDeleteNotificationsRequest(server string, body DeleteNotificationsJSONRequestBody) (*http.Request, error)

NewDeleteNotificationsRequest calls the generic DeleteNotifications builder with application/json body

func NewDeleteNotificationsRequestWithBody

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

NewDeleteNotificationsRequestWithBody generates requests for DeleteNotifications with any type of body

func NewRecordActionFeedbackRequest

func NewRecordActionFeedbackRequest(server string, notificationId string, body RecordActionFeedbackJSONRequestBody) (*http.Request, error)

NewRecordActionFeedbackRequest calls the generic RecordActionFeedback builder with application/json body

func NewRecordActionFeedbackRequestWithBody

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

NewRecordActionFeedbackRequestWithBody generates requests for RecordActionFeedback 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.
	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) CreateNotification

func (c *Client) CreateNotification(ctx context.Context, body CreateNotificationJSONRequestBody) (*http.Response, error)

func (*Client) CreateNotificationWithBody

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

func (*Client) DeleteNotifications

func (c *Client) DeleteNotifications(ctx context.Context, body DeleteNotificationsJSONRequestBody) (*http.Response, error)

func (*Client) DeleteNotificationsWithBody

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

func (*Client) RecordActionFeedback

func (c *Client) RecordActionFeedback(ctx context.Context, notificationId string, body RecordActionFeedbackJSONRequestBody) (*http.Response, error)

func (*Client) RecordActionFeedbackWithBody

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

type ClientInterface

type ClientInterface interface {
	// CreateNotificationWithBody request with any body
	CreateNotificationWithBody(ctx context.Context, contentType string, body io.Reader) (*http.Response, error)

	CreateNotification(ctx context.Context, body CreateNotificationJSONRequestBody) (*http.Response, error)

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

	DeleteNotifications(ctx context.Context, body DeleteNotificationsJSONRequestBody) (*http.Response, error)

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

	RecordActionFeedback(ctx context.Context, notificationId string, body RecordActionFeedbackJSONRequestBody) (*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) CreateNotificationWithBodyWithResponse

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

CreateNotificationWithBodyWithResponse request with arbitrary body returning *CreateNotificationResp

func (*ClientWithResponses) CreateNotificationWithResponse

func (c *ClientWithResponses) CreateNotificationWithResponse(ctx context.Context, body CreateNotificationJSONRequestBody) (*CreateNotificationResp, error)

func (*ClientWithResponses) DeleteNotificationsWithBodyWithResponse

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

DeleteNotificationsWithBodyWithResponse request with arbitrary body returning *DeleteNotificationsResp

func (*ClientWithResponses) DeleteNotificationsWithResponse

func (c *ClientWithResponses) DeleteNotificationsWithResponse(ctx context.Context, body DeleteNotificationsJSONRequestBody) (*DeleteNotificationsResp, error)

func (*ClientWithResponses) RecordActionFeedbackWithBodyWithResponse

func (c *ClientWithResponses) RecordActionFeedbackWithBodyWithResponse(ctx context.Context, notificationId string, contentType string, body io.Reader) (*RecordActionFeedbackResp, error)

RecordActionFeedbackWithBodyWithResponse request with arbitrary body returning *RecordActionFeedbackResp

func (*ClientWithResponses) RecordActionFeedbackWithResponse

func (c *ClientWithResponses) RecordActionFeedbackWithResponse(ctx context.Context, notificationId string, body RecordActionFeedbackJSONRequestBody) (*RecordActionFeedbackResp, error)

type ClientWithResponsesInterface

type ClientWithResponsesInterface interface {
	// CreateNotificationWithBodyWithResponse request with any body
	CreateNotificationWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader) (*CreateNotificationResp, error)

	CreateNotificationWithResponse(ctx context.Context, body CreateNotificationJSONRequestBody) (*CreateNotificationResp, error)

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

	DeleteNotificationsWithResponse(ctx context.Context, body DeleteNotificationsJSONRequestBody) (*DeleteNotificationsResp, error)

	// RecordActionFeedbackWithBodyWithResponse request with any body
	RecordActionFeedbackWithBodyWithResponse(ctx context.Context, notificationId string, contentType string, body io.Reader) (*RecordActionFeedbackResp, error)

	RecordActionFeedbackWithResponse(ctx context.Context, notificationId string, body RecordActionFeedbackJSONRequestBody) (*RecordActionFeedbackResp, error)
}

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

type CreateNotificationJSONRequestBody

type CreateNotificationJSONRequestBody = CreateNotificationRequest

CreateNotificationJSONRequestBody defines body for CreateNotification for application/json ContentType.

type CreateNotificationRequest

type CreateNotificationRequest struct {
	// MarketplaceId An encrypted marketplace identifier for the posted notification.
	MarketplaceId *string `json:"marketplaceId,omitempty"`

	// NotificationParameters The dynamic parameters required by the notification templated specified by `templateId`.
	NotificationParameters NotificationParameters `json:"notificationParameters"`

	// TemplateId The unique identifier of the notification template you used to onboard your application.
	TemplateId string `json:"templateId"`
}

CreateNotificationRequest The request for the `createNotification` operation.

type CreateNotificationResp

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

func ParseCreateNotificationResp

func ParseCreateNotificationResp(rsp *http.Response) (*CreateNotificationResp, error)

ParseCreateNotificationResp parses an HTTP response from a CreateNotificationWithResponse call

func (CreateNotificationResp) Status

func (r CreateNotificationResp) Status() string

Status returns HTTPResponse.Status

func (CreateNotificationResp) StatusCode

func (r CreateNotificationResp) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type CreateNotificationResponse

type CreateNotificationResponse struct {
	// NotificationId The unique identifier assigned to each notification.
	NotificationId *string `json:"notificationId,omitempty"`
}

CreateNotificationResponse The response for the `createNotification` operation.

type DeleteNotificationsJSONRequestBody

type DeleteNotificationsJSONRequestBody = DeleteNotificationsRequest

DeleteNotificationsJSONRequestBody defines body for DeleteNotifications for application/json ContentType.

type DeleteNotificationsRequest

type DeleteNotificationsRequest struct {
	// DeletionReason The unique identifier that maps each notification status to a reason code.
	DeletionReason DeleteNotificationsRequestDeletionReason `json:"deletionReason"`

	// TemplateId The unique identifier of the notification template you used to onboard your application.
	TemplateId string `json:"templateId"`
}

DeleteNotificationsRequest The request for the `deleteNotifications` operation.

type DeleteNotificationsRequestDeletionReason

type DeleteNotificationsRequestDeletionReason string

DeleteNotificationsRequestDeletionReason The unique identifier that maps each notification status to a reason code.

const (
	INCORRECTCONTENT   DeleteNotificationsRequestDeletionReason = "INCORRECT_CONTENT"
	INCORRECTRECIPIENT DeleteNotificationsRequestDeletionReason = "INCORRECT_RECIPIENT"
)

Defines values for DeleteNotificationsRequestDeletionReason.

type DeleteNotificationsResp

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

func ParseDeleteNotificationsResp

func ParseDeleteNotificationsResp(rsp *http.Response) (*DeleteNotificationsResp, error)

ParseDeleteNotificationsResp parses an HTTP response from a DeleteNotificationsWithResponse call

func (DeleteNotificationsResp) Status

func (r DeleteNotificationsResp) Status() string

Status returns HTTPResponse.Status

func (DeleteNotificationsResp) StatusCode

func (r DeleteNotificationsResp) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

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 struct {
	// Errors Error response returned when the request is unsuccessful.
	Errors []Error `json:"errors"`
}

ErrorList A list of error responses returned when a request is unsuccessful.

type HttpRequestDoer

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

Doer performs HTTP requests.

The standard http.Client implements this interface.

type NotificationParameters

type NotificationParameters map[string]interface{}

NotificationParameters The dynamic parameters required by the notification templated specified by `templateId`.

type RecordActionFeedbackJSONRequestBody

type RecordActionFeedbackJSONRequestBody = RecordActionFeedbackRequest

RecordActionFeedbackJSONRequestBody defines body for RecordActionFeedback for application/json ContentType.

type RecordActionFeedbackRequest

type RecordActionFeedbackRequest struct {
	// FeedbackActionCode The unique identifier for each notification status.
	FeedbackActionCode RecordActionFeedbackRequestFeedbackActionCode `json:"feedbackActionCode"`
}

RecordActionFeedbackRequest The request for the `recordActionFeedback` operation.

type RecordActionFeedbackRequestFeedbackActionCode

type RecordActionFeedbackRequestFeedbackActionCode string

RecordActionFeedbackRequestFeedbackActionCode The unique identifier for each notification status.

const (
	SELLERACTIONCOMPLETED RecordActionFeedbackRequestFeedbackActionCode = "SELLER_ACTION_COMPLETED"
)

Defines values for RecordActionFeedbackRequestFeedbackActionCode.

type RecordActionFeedbackResp

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

func ParseRecordActionFeedbackResp

func ParseRecordActionFeedbackResp(rsp *http.Response) (*RecordActionFeedbackResp, error)

ParseRecordActionFeedbackResp parses an HTTP response from a RecordActionFeedbackWithResponse call

func (RecordActionFeedbackResp) Status

func (r RecordActionFeedbackResp) Status() string

Status returns HTTPResponse.Status

func (RecordActionFeedbackResp) StatusCode

func (r RecordActionFeedbackResp) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

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

Jump to

Keyboard shortcuts

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