webhooks

package
v0.0.23 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	API checkout.HTTPClient
}

Client ...

func NewClient

func NewClient(config checkout.Config) *Client

NewClient ...

func (*Client) PartiallyUpdateWebhook

func (c *Client) PartiallyUpdateWebhook(webhookID string, request *Request) (*Response, error)

PartiallyUpdateWebhook ...

func (*Client) RegisterWebhook

func (c *Client) RegisterWebhook(request *Request) (*Response, error)

RegisterWebhook ...

func (*Client) RemoveWebhook

func (c *Client) RemoveWebhook(webhookID string) (*Response, error)

RemoveWebhook ...

func (*Client) Retrieve

func (c *Client) Retrieve() (*Response, error)

Retrieve ...

func (*Client) RetrieveWebhook

func (c *Client) RetrieveWebhook(webhookID string) (*Response, error)

RetrieveWebhook ...

func (*Client) UpdateWebhook

func (c *Client) UpdateWebhook(webhookID string, request *Request) (*Response, error)

UpdateWebhook ...

type Headers

type Headers struct {
	Authorization string `json:"Authorization,omitempty"`
}

Headers ...

type Request

type Request struct {
	*Webhook
}

Request -

type Response

type Response struct {
	StatusResponse     *checkout.StatusResponse `json:"api_response,omitempty"`
	ConfiguredWebhooks []WebhookResponse        `json:"webhooks,omitempty"`
	Webhook            *WebhookResponse         `json:"webhook,omitempty"`
}

Response -

type Webhook

type Webhook struct {
	URL         string                    `json:"url,omitempty"`
	Active      *bool                     `json:"active,omitempty"`
	Headers     *Headers                  `json:"headers,omitempty"`
	ContentType common.WebhookContentType `json:"content_type,omitempty"`
	EventTypes  []string                  `json:"event_types,omitempty"`
}

Webhook ...

type WebhookResponse

type WebhookResponse struct {
	ID          string                    `json:"id,omitempty"`
	URL         string                    `json:"url,omitempty"`
	Active      *bool                     `json:"active,omitempty"`
	Headers     *Headers                  `json:"headers,omitempty"`
	ContentType common.WebhookContentType `json:"content_type,omitempty"`
	EventTypes  []string                  `json:"event_types,omitempty"`
	Links       map[string]common.Link    `json:"_links,omitempty"`
	Version     string                    `json:"version,omitempty"`
}

WebhookResponse -

Jump to

Keyboard shortcuts

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