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 CreateWebhookResponseConfiguration
- type PageMetaResponse
- type PageWebhookResponse
- type PageWebhookResponseConfiguration
- 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/conversations/api/conversation-scoped-webhook-resource 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/conversations/api/conversation-scoped-webhook-resource#create-a-conversationscopedwebhook-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/conversations/api/conversation-scoped-webhook-resource#create-a-conversationscopedwebhook-resource for more details
func (*Client) NewWebhooksPaginator ¶ added in v0.4.0
func (c *Client) NewWebhooksPaginator() *WebhooksPaginator
NewWebhooksPaginator creates a new instance of the paginator for Page.
func (*Client) NewWebhooksPaginatorWithOptions ¶ added in v0.4.0
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 webhooks See https://www.twilio.com/docs/conversations/api/conversation-scoped-webhook-resource#read-multiple-conversationscopedwebhook-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 webhooks See https://www.twilio.com/docs/conversations/api/conversation-scoped-webhook-resource#read-multiple-conversationscopedwebhook-resources for more details
type ClientProperties ¶
type ClientProperties struct {
ConversationSid string
}
ClientProperties are the properties required to manage the webhooks resources
type CreateWebhookInput ¶ added in v0.4.0
type CreateWebhookInput struct { ConfigurationFilters *[]string `form:"Configuration.Filters,omitempty"` ConfigurationFlowSid *string `form:"Configuration.FlowSid,omitempty"` ConfigurationMethod *string `form:"Configuration.Method,omitempty"` ConfigurationReplayAfter *int `form:"Configuration.ReplayAfter,omitempty"` ConfigurationTriggers *[]string `form:"Configuration.Triggers,omitempty"` ConfigurationURL *string `form:"Configuration.Url,omitempty"` Target string `validate:"required" form:"Target"` }
CreateWebhookInput defines the input fields for creating a new webhook resource
type CreateWebhookResponse ¶ added in v0.4.0
type CreateWebhookResponse struct { AccountSid string `json:"account_sid"` Configuration CreateWebhookResponseConfiguration `json:"configuration"` ConversationSid string `json:"conversation_sid"` DateCreated time.Time `json:"date_created"` DateUpdated *time.Time `json:"date_updated,omitempty"` Sid string `json:"sid"` Target string `json:"target"` URL string `json:"url"` }
CreateWebhookResponse defines the response fields for the created webhook
type CreateWebhookResponseConfiguration ¶ added in v0.4.0
type CreateWebhookResponseConfiguration struct { Filters *[]string `json:"filters,omitempty"` FlowSid *string `json:"flow_sid,omitempty"` Method *string `json:"method,omitempty"` ReplayAfter *int `json:"replay_after,omitempty"` Triggers *[]string `json:"triggers,omitempty"` URL *string `json:"url,omitempty"` }
type PageMetaResponse ¶
type PageWebhookResponse ¶ added in v0.4.0
type PageWebhookResponse struct { AccountSid string `json:"account_sid"` Configuration PageWebhookResponseConfiguration `json:"configuration"` ConversationSid string `json:"conversation_sid"` DateCreated time.Time `json:"date_created"` DateUpdated *time.Time `json:"date_updated,omitempty"` Sid string `json:"sid"` Target string `json:"target"` URL string `json:"url"` }
type PageWebhookResponseConfiguration ¶ added in v0.4.0
type PageWebhookResponseConfiguration struct { Filters *[]string `json:"filters,omitempty"` FlowSid *string `json:"flow_sid,omitempty"` Method *string `json:"method,omitempty"` ReplayAfter *int `json:"replay_after,omitempty"` Triggers *[]string `json:"triggers,omitempty"` URL *string `json:"url,omitempty"` }
type WebhooksPage ¶ added in v0.4.0
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 ¶ added in v0.4.0
WebhooksPageOptions defines the query options for the api operation
type WebhooksPageResponse ¶ added in v0.4.0
type WebhooksPageResponse struct { Meta PageMetaResponse `json:"meta"` Webhooks []PageWebhookResponse `json:"webhooks"` }
WebhooksPageResponse defines the response fields for the webhooks page
type WebhooksPaginator ¶ added in v0.4.0
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 ¶ added in v0.4.0
func (p *WebhooksPaginator) CurrentPage() *WebhooksPageResponse
CurrentPage retrieves the results for the current page
func (*WebhooksPaginator) Error ¶ added in v0.4.0
func (p *WebhooksPaginator) Error() error
Error retrieves the error returned from the page
func (*WebhooksPaginator) Next ¶ added in v0.4.0
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 ¶ added in v0.4.0
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