Documentation
¶
Overview ¶
Package webhooks contains auto-generated files. DO NOT MODIFY
Package webhooks contains auto-generated files. DO NOT MODIFY
Package webhooks contains auto-generated files. DO NOT MODIFY
Index ¶
- type Client
- func (c Client) Create(input *CreateWebhookInput) (*CreateWebhookResponse, error)
- func (c Client) CreateWithContext(context context.Context, input *CreateWebhookInput) (*CreateWebhookResponse, error)
- func (c *Client) NewWebhooksPaginator() *WebhooksPaginator
- func (c *Client) NewWebhooksPaginatorWithOptions(options *WebhooksPageOptions) *WebhooksPaginator
- func (c Client) Page(options *WebhooksPageOptions) (*WebhooksPageResponse, error)
- func (c Client) PageWithContext(context context.Context, options *WebhooksPageOptions) (*WebhooksPageResponse, error)
- type ClientProperties
- type CreateWebhookInput
- type CreateWebhookResponse
- type PageMetaResponse
- type PageWebhookResponse
- type WebhooksPage
- type WebhooksPageOptions
- type WebhooksPageResponse
- type WebhooksPaginator
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
}
Client for managing webhook resources See https://www.twilio.com/docs/autopilot/api/event-webhooks for more details
func New ¶
func New(client *client.Client, properties ClientProperties) *Client
New creates a new instance of the webhooks client
func (Client) Create ¶
func (c Client) Create(input *CreateWebhookInput) (*CreateWebhookResponse, error)
Create creates a new webhook See https://www.twilio.com/docs/autopilot/api/event-webhooks#create-a-webhook-resource for more details Context is defaulted to Background. See https://golang.org/pkg/context/#Background for more information
func (Client) CreateWithContext ¶
func (c Client) CreateWithContext(context context.Context, input *CreateWebhookInput) (*CreateWebhookResponse, error)
CreateWithContext creates a new webhook See https://www.twilio.com/docs/autopilot/api/event-webhooks#create-a-webhook-resource for more details
func (*Client) NewWebhooksPaginator ¶
func (c *Client) NewWebhooksPaginator() *WebhooksPaginator
NewWebhooksPaginator creates a new instance of the paginator for Page.
func (*Client) NewWebhooksPaginatorWithOptions ¶
func (c *Client) NewWebhooksPaginatorWithOptions(options *WebhooksPageOptions) *WebhooksPaginator
NewWebhooksPaginatorWithOptions creates a new instance of the paginator for Page with options.
func (Client) Page ¶
func (c Client) Page(options *WebhooksPageOptions) (*WebhooksPageResponse, error)
Page retrieves a page of webhook See https://www.twilio.com/docs/autopilot/api/event-webhooks#read-multiple-webhook-resources for more details Context is defaulted to Background. See https://golang.org/pkg/context/#Background for more information
func (Client) PageWithContext ¶
func (c Client) PageWithContext(context context.Context, options *WebhooksPageOptions) (*WebhooksPageResponse, error)
PageWithContext retrieves a page of webhook See https://www.twilio.com/docs/autopilot/api/event-webhooks#read-multiple-webhook-resources for more details
type ClientProperties ¶
type ClientProperties struct {
AssistantSid string
}
ClientProperties are the properties required to manage the webhooks resources
type CreateWebhookInput ¶
type CreateWebhookInput struct { Events string `validate:"required" form:"Events"` UniqueName string `validate:"required" form:"UniqueName"` WebhookMethod *string `form:"WebhookMethod,omitempty"` WebhookURL string `validate:"required" form:"WebhookUrl"` }
CreateWebhookInput defines the input fields for creating a new webhook resource
type CreateWebhookResponse ¶
type CreateWebhookResponse struct { AccountSid string `json:"account_sid"` AssistantSid string `json:"assistant_sid"` DateCreated time.Time `json:"date_created"` DateUpdated *time.Time `json:"date_updated,omitempty"` Events string `json:"events"` Sid string `json:"sid"` URL string `json:"url"` UniqueName string `json:"unique_name"` WebhookMethod string `json:"webhook_method"` WebhookURL string `json:"webhook_url"` }
CreateWebhookResponse defines the response fields for the created webhook
type PageMetaResponse ¶
type PageWebhookResponse ¶
type PageWebhookResponse struct { AccountSid string `json:"account_sid"` AssistantSid string `json:"assistant_sid"` DateCreated time.Time `json:"date_created"` DateUpdated *time.Time `json:"date_updated,omitempty"` Events string `json:"events"` Sid string `json:"sid"` URL string `json:"url"` UniqueName string `json:"unique_name"` WebhookMethod string `json:"webhook_method"` WebhookURL string `json:"webhook_url"` }
type WebhooksPage ¶
type WebhooksPage struct { CurrentPage *WebhooksPageResponse Error error // contains filtered or unexported fields }
WebhooksPage defines the fields for the page The CurrentPage and Error fields can be used to access the PageWebhookResponse or error that is returned from the api call(s)
type WebhooksPageOptions ¶
WebhooksPageOptions defines the query options for the api operation
type WebhooksPageResponse ¶
type WebhooksPageResponse struct { Meta PageMetaResponse `json:"meta"` Webhooks []PageWebhookResponse `json:"webhooks"` }
WebhooksPageResponse defines the response fields for the webhook page
type WebhooksPaginator ¶
type WebhooksPaginator struct { Page *WebhooksPage Webhooks []PageWebhookResponse // contains filtered or unexported fields }
WebhooksPaginator defines the fields for makings paginated api calls Webhooks is an array of webhooks that have been returned from all of the page calls
func (*WebhooksPaginator) CurrentPage ¶
func (p *WebhooksPaginator) CurrentPage() *WebhooksPageResponse
CurrentPage retrieves the results for the current page
func (*WebhooksPaginator) Error ¶
func (p *WebhooksPaginator) Error() error
Error retrieves the error returned from the page
func (*WebhooksPaginator) Next ¶
func (p *WebhooksPaginator) Next() bool
Next retrieves the next page of results. Next will return false when either an error occurs or there are no more pages to iterate Context is defaulted to Background. See https://golang.org/pkg/context/#Background for more information
func (*WebhooksPaginator) NextWithContext ¶
func (p *WebhooksPaginator) NextWithContext(context context.Context) bool
NextWithContext retrieves the next page of results. NextWithContext will return false when either an error occurs or there are no more pages to iterate