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 ¶
- func NewCreateNotificationRequest(server string, body CreateNotificationJSONRequestBody) (*http.Request, error)
- func NewCreateNotificationRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
- func NewDeleteNotificationsRequest(server string, body DeleteNotificationsJSONRequestBody) (*http.Request, error)
- func NewDeleteNotificationsRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
- func NewRecordActionFeedbackRequest(server string, notificationId string, body RecordActionFeedbackJSONRequestBody) (*http.Request, error)
- func NewRecordActionFeedbackRequestWithBody(server string, notificationId string, contentType string, body io.Reader) (*http.Request, error)
- type Client
- func (c *Client) CreateNotification(ctx context.Context, body CreateNotificationJSONRequestBody) (*http.Response, error)
- func (c *Client) CreateNotificationWithBody(ctx context.Context, contentType string, body io.Reader) (*http.Response, error)
- func (c *Client) DeleteNotifications(ctx context.Context, body DeleteNotificationsJSONRequestBody) (*http.Response, error)
- func (c *Client) DeleteNotificationsWithBody(ctx context.Context, contentType string, body io.Reader) (*http.Response, error)
- func (c *Client) RecordActionFeedback(ctx context.Context, notificationId string, ...) (*http.Response, error)
- func (c *Client) RecordActionFeedbackWithBody(ctx context.Context, notificationId string, contentType string, body io.Reader) (*http.Response, error)
- type ClientInterface
- type ClientOption
- type ClientWithResponses
- func (c *ClientWithResponses) CreateNotificationWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader) (*CreateNotificationResp, error)
- func (c *ClientWithResponses) CreateNotificationWithResponse(ctx context.Context, body CreateNotificationJSONRequestBody) (*CreateNotificationResp, error)
- func (c *ClientWithResponses) DeleteNotificationsWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader) (*DeleteNotificationsResp, error)
- func (c *ClientWithResponses) DeleteNotificationsWithResponse(ctx context.Context, body DeleteNotificationsJSONRequestBody) (*DeleteNotificationsResp, error)
- func (c *ClientWithResponses) RecordActionFeedbackWithBodyWithResponse(ctx context.Context, notificationId string, contentType string, body io.Reader) (*RecordActionFeedbackResp, error)
- func (c *ClientWithResponses) RecordActionFeedbackWithResponse(ctx context.Context, notificationId string, ...) (*RecordActionFeedbackResp, error)
- type ClientWithResponsesInterface
- type CreateNotificationJSONRequestBody
- type CreateNotificationRequest
- type CreateNotificationResp
- type CreateNotificationResponse
- type DeleteNotificationsJSONRequestBody
- type DeleteNotificationsRequest
- type DeleteNotificationsRequestDeletionReason
- type DeleteNotificationsResp
- type Error
- type ErrorList
- type HttpRequestDoer
- type NotificationParameters
- type RecordActionFeedbackJSONRequestBody
- type RecordActionFeedbackRequest
- type RecordActionFeedbackRequestFeedbackActionCode
- type RecordActionFeedbackResp
- type RequestEditorFn
- type ResponseEditorFn
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
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 (*Client) CreateNotificationWithBody ¶
func (*Client) DeleteNotifications ¶
func (*Client) DeleteNotificationsWithBody ¶
func (*Client) RecordActionFeedback ¶
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 ¶
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 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 ¶
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 ¶
RequestEditorFn is the function signature for the RequestEditor callback function