abc

package
v0.0.0-...-ff628f3 Latest Latest
Warning

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

Go to latest
Published: Aug 9, 2023 License: MIT Imports: 5 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 {
	// contains filtered or unexported fields
}

func NewClient

func NewClient(configuration *configuration.Configuration, apiClient client.HttpClient) *Client

func (*Client) PartiallyUpdateWebhook

func (c *Client) PartiallyUpdateWebhook(webhookId string, request WebhookRequest) (*WebhookResponse, error)

func (*Client) PartiallyUpdateWebhookWithContext

func (c *Client) PartiallyUpdateWebhookWithContext(ctx context.Context, webhookId string, request WebhookRequest) (*WebhookResponse, error)

func (*Client) RegisterWebhook

func (c *Client) RegisterWebhook(request WebhookRequest) (*WebhookResponse, error)

func (*Client) RegisterWebhookWithContext

func (c *Client) RegisterWebhookWithContext(ctx context.Context, request WebhookRequest) (*WebhookResponse, error)

func (*Client) RemoveWebhook

func (c *Client) RemoveWebhook(webhookId string) (*common.MetadataResponse, error)

func (*Client) RemoveWebhookWithContext

func (c *Client) RemoveWebhookWithContext(ctx context.Context, webhookId string) (*common.MetadataResponse, error)

func (*Client) RetrieveWebhook

func (c *Client) RetrieveWebhook(webhookId string) (*WebhookResponse, error)

func (*Client) RetrieveWebhookWithContext

func (c *Client) RetrieveWebhookWithContext(ctx context.Context, webhookId string) (*WebhookResponse, error)

func (*Client) RetrieveWebhooks

func (c *Client) RetrieveWebhooks() (*WebhooksResponse, error)

func (*Client) RetrieveWebhooksWithContext

func (c *Client) RetrieveWebhooksWithContext(ctx context.Context) (*WebhooksResponse, error)

func (*Client) UpdateWebhook

func (c *Client) UpdateWebhook(webhookId string, request WebhookRequest) (*WebhookResponse, error)

func (*Client) UpdateWebhookWithContext

func (c *Client) UpdateWebhookWithContext(ctx context.Context, webhookId string, request WebhookRequest) (*WebhookResponse, error)

type ContentType

type ContentType string
const (
	Json ContentType = "json"
)

type WebhookRequest

type WebhookRequest struct {
	Url         string                 `json:"url"`
	Active      bool                   `json:"active,omitempty" default:"true"`
	Headers     map[string]interface{} `json:"headers,omitempty"`
	ContentType ContentType            `json:"content_type,omitempty" default:"json"`
	EventTypes  []string               `json:"event_types"`
}

type WebhookResponse

type WebhookResponse struct {
	HttpResponse common.HttpMetadata
	Id           string                 `json:"id,omitempty"`
	Url          string                 `json:"url,omitempty"`
	Active       bool                   `json:"active,omitempty"`
	Headers      interface{}            `json:"headers,omitempty"`
	ContentType  ContentType            `json:"content_type,omitempty"`
	EventTypes   []string               `json:"event_types,omitempty"`
	Links        map[string]common.Link `json:"_links" json:"links,omitempty"`
}

type WebhooksResponse

type WebhooksResponse struct {
	HttpResponse common.HttpMetadata
	WebhookArray []WebhookResponse
}

func (*WebhooksResponse) UnmarshalJSON

func (e *WebhooksResponse) UnmarshalJSON(data []byte) error

Jump to

Keyboard shortcuts

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