webhooks

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2020 License: Apache-2.0 Imports: 7 Imported by: 2

Documentation

Overview

This is an autogenerated file. DO NOT MODIFY

This is an autogenerated file. DO NOT MODIFY

This is an autogenerated file. DO NOT MODIFY

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ChannelWebhooksPage

type ChannelWebhooksPage struct {
	CurrentPage *ChannelWebhooksPageResponse
	Error       error
	// contains filtered or unexported fields
}

ChannelWebhooksPage defines the fields for the page The CurrentPage and Error fields can be used to access the PageChannelWebhookResponse or error that is returned from the api call(s)

type ChannelWebhooksPageOptions

type ChannelWebhooksPageOptions struct {
	PageSize  *int
	Page      *int
	PageToken *string
}

ChannelWebhooksPageOptions defines the query options for the api operation

type ChannelWebhooksPageResponse

type ChannelWebhooksPageResponse struct {
	Meta     PageMetaResponse             `json:"meta"`
	Webhooks []PageChannelWebhookResponse `json:"webhooks"`
}

ChannelWebhooksPageResponse defines the response fields for the channel webhooks page

type ChannelWebhooksPaginator

type ChannelWebhooksPaginator struct {
	Page     *ChannelWebhooksPage
	Webhooks []PageChannelWebhookResponse
	// contains filtered or unexported fields
}

ChannelWebhooksPaginator 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 (*ChannelWebhooksPaginator) CurrentPage

CurrentPage retrieves the results for the current page

func (*ChannelWebhooksPaginator) Error

func (p *ChannelWebhooksPaginator) Error() error

Error retrieves the error returned from the page

func (*ChannelWebhooksPaginator) Next

func (p *ChannelWebhooksPaginator) 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 (*ChannelWebhooksPaginator) NextWithContext

func (p *ChannelWebhooksPaginator) 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

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client for managing webhook resources See https://www.twilio.com/docs/chat/rest/channel-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

Create creates a new webhook See https://www.twilio.com/docs/chat/rest/channel-webhook-resource#create-a-channelwebhook-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 *CreateChannelWebhookInput) (*CreateChannelWebhookResponse, error)

CreateWithContext creates a new webhook See https://www.twilio.com/docs/chat/rest/channel-webhook-resource#create-a-channelwebhook-resource for more details

func (*Client) NewChannelWebhooksPaginator

func (c *Client) NewChannelWebhooksPaginator() *ChannelWebhooksPaginator

NewChannelWebhooksPaginator creates a new instance of the paginator for Page.

func (*Client) NewChannelWebhooksPaginatorWithOptions

func (c *Client) NewChannelWebhooksPaginatorWithOptions(options *ChannelWebhooksPageOptions) *ChannelWebhooksPaginator

NewChannelWebhooksPaginatorWithOptions creates a new instance of the paginator for Page with options.

func (Client) Page

Page retrieves a page of channel webhooks See https://www.twilio.com/docs/chat/rest/channel-webhook-resource#read-multiple-channelwebhook-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 *ChannelWebhooksPageOptions) (*ChannelWebhooksPageResponse, error)

PageWithContext retrieves a page of channel webhooks See https://www.twilio.com/docs/chat/rest/channel-webhook-resource#read-multiple-channelwebhook-resources for more details

type ClientProperties

type ClientProperties struct {
	ChannelSid string
	ServiceSid string
}

ClientProperties are the properties required to manage the webhooks resources

type CreateChannelWebhookInput

type CreateChannelWebhookInput struct {
	ConfigurationFilters    *[]string `form:"Configuration.Filters,omitempty"`
	ConfigurationFlowSid    *string   `form:"Configuration.FlowSid,omitempty"`
	ConfigurationMethod     *string   `form:"Configuration.Method,omitempty"`
	ConfigurationRetryCount *int      `form:"Configuration.RetryCount,omitempty"`
	ConfigurationTriggers   *[]string `form:"Configuration.Triggers,omitempty"`
	ConfigurationURL        *string   `form:"Configuration.Url,omitempty"`
	Type                    string    `validate:"required" form:"Type"`
}

CreateChannelWebhookInput defines the input fields for creating a new webhook resource

type CreateChannelWebhookResponse

type CreateChannelWebhookResponse struct {
	AccountSid    string                                    `json:"account_sid"`
	ChannelSid    string                                    `json:"channel_sid"`
	Configuration CreateChannelWebhookResponseConfiguration `json:"configuration"`
	DateCreated   time.Time                                 `json:"date_created"`
	DateUpdated   *time.Time                                `json:"date_updated,omitempty"`
	ServiceSid    string                                    `json:"service_sid"`
	Sid           string                                    `json:"sid"`
	Type          string                                    `json:"type"`
	URL           string                                    `json:"url"`
}

CreateChannelWebhookResponse defines the response fields for the created webhook

type CreateChannelWebhookResponseConfiguration

type CreateChannelWebhookResponseConfiguration struct {
	Filters    *[]string `json:"filters,omitempty"`
	FlowSid    *string   `json:"flow_sid,omitempty"`
	Method     *string   `json:"method,omitempty"`
	RetryCount *int      `json:"retry_count,omitempty"`
	Triggers   *[]string `json:"triggers,omitempty"`
	URL        *string   `json:"url,omitempty"`
}

type PageChannelWebhookResponse

type PageChannelWebhookResponse struct {
	AccountSid    string                                  `json:"account_sid"`
	ChannelSid    string                                  `json:"channel_sid"`
	Configuration PageChannelWebhookResponseConfiguration `json:"configuration"`
	DateCreated   time.Time                               `json:"date_created"`
	DateUpdated   *time.Time                              `json:"date_updated,omitempty"`
	ServiceSid    string                                  `json:"service_sid"`
	Sid           string                                  `json:"sid"`
	Type          string                                  `json:"type"`
	URL           string                                  `json:"url"`
}

type PageChannelWebhookResponseConfiguration

type PageChannelWebhookResponseConfiguration struct {
	Filters    *[]string `json:"filters,omitempty"`
	FlowSid    *string   `json:"flow_sid,omitempty"`
	Method     *string   `json:"method,omitempty"`
	RetryCount *int      `json:"retry_count,omitempty"`
	Triggers   *[]string `json:"triggers,omitempty"`
	URL        *string   `json:"url,omitempty"`
}

type PageMetaResponse

type PageMetaResponse struct {
	FirstPageURL    string  `json:"first_page_url"`
	Key             string  `json:"key"`
	NextPageURL     *string `json:"next_page_url,omitempty"`
	Page            int     `json:"page"`
	PageSize        int     `json:"page_size"`
	PreviousPageURL *string `json:"previous_page_url,omitempty"`
	URL             string  `json:"url"`
}

Jump to

Keyboard shortcuts

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