conversations

package
v0.15.0 Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2021 License: Apache-2.0 Imports: 7 Imported by: 2

Documentation

Overview

Package conversations contains auto-generated files. DO NOT MODIFY

Package conversations contains auto-generated files. DO NOT MODIFY

Package conversations contains auto-generated files. DO NOT MODIFY

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
}

Client for managing conversation resources See https://www.twilio.com/docs/conversations/api/conversation-resource for more details

func New

func New(client *client.Client) *Client

New creates a new instance of the conversations client

func (Client) Create

Create creates a new conversation See https://www.twilio.com/docs/conversations/api/conversation-resource#create-a-conversation-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 *CreateConversationInput) (*CreateConversationResponse, error)

CreateWithContext creates a new conversation See https://www.twilio.com/docs/conversations/api/conversation-resource#create-a-conversation-resource for more details

func (*Client) NewConversationsPaginator

func (c *Client) NewConversationsPaginator() *ConversationsPaginator

NewConversationsPaginator creates a new instance of the paginator for Page.

func (*Client) NewConversationsPaginatorWithOptions

func (c *Client) NewConversationsPaginatorWithOptions(options *ConversationsPageOptions) *ConversationsPaginator

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

func (Client) Page

Page retrieves a page of conversations See https://www.twilio.com/docs/conversations/api/conversation-resource#read-multiple-conversation-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 *ConversationsPageOptions) (*ConversationsPageResponse, error)

PageWithContext retrieves a page of conversations See https://www.twilio.com/docs/conversations/api/conversation-resource#read-multiple-conversation-resources for more details

type ConversationsPage

type ConversationsPage struct {
	CurrentPage *ConversationsPageResponse
	Error       error
	// contains filtered or unexported fields
}

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

type ConversationsPageOptions

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

ConversationsPageOptions defines the query options for the api operation

type ConversationsPageResponse

type ConversationsPageResponse struct {
	Conversations []PageConversationResponse `json:"conversations"`
	Meta          PageMetaResponse           `json:"meta"`
}

ConversationsPageResponse defines the response fields for the conversations page

type ConversationsPaginator

type ConversationsPaginator struct {
	Page          *ConversationsPage
	Conversations []PageConversationResponse
	// contains filtered or unexported fields
}

ConversationsPaginator defines the fields for makings paginated api calls Conversations is an array of conversations that have been returned from all of the page calls

func (*ConversationsPaginator) CurrentPage

CurrentPage retrieves the results for the current page

func (*ConversationsPaginator) Error

func (p *ConversationsPaginator) Error() error

Error retrieves the error returned from the page

func (*ConversationsPaginator) Next

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

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

type CreateConversationInput struct {
	Attributes          *string                        `form:"Attributes,omitempty"`
	DateCreated         *utils.RFC2822Time             `form:"DateCreated,omitempty"`
	DateUpdated         *utils.RFC2822Time             `form:"DateUpdated,omitempty"`
	FriendlyName        *string                        `form:"FriendlyName,omitempty"`
	MessagingServiceSid *string                        `form:"MessagingServiceSid,omitempty"`
	State               *string                        `form:"State,omitempty"`
	Timers              *CreateConversationTimersInput `form:"Timers,omitempty"`
	UniqueName          *string                        `form:"UniqueName,omitempty"`
}

CreateConversationInput defines the input fields for creating a new conversation resource

type CreateConversationResponse

type CreateConversationResponse struct {
	AccountSid          string                           `json:"account_sid"`
	Attributes          string                           `json:"attributes"`
	ChatServiceSid      *string                          `json:"chat_service_sid,omitempty"`
	DateCreated         time.Time                        `json:"date_created"`
	DateUpdated         *time.Time                       `json:"date_updated,omitempty"`
	FriendlyName        *string                          `json:"friendly_name,omitempty"`
	MessagingServiceSid *string                          `json:"messaging_service_sid,omitempty"`
	Sid                 string                           `json:"sid"`
	State               string                           `json:"state"`
	Timers              CreateConversationTimersResponse `json:"timers"`
	URL                 string                           `json:"url"`
	UniqueName          *string                          `json:"unique_name,omitempty"`
}

CreateConversationResponse defines the response fields for the created conversation

type CreateConversationTimersInput added in v0.6.0

type CreateConversationTimersInput struct {
	Closed   *string `form:"Closed,omitempty"`
	Inactive *string `form:"Inactive,omitempty"`
}

type CreateConversationTimersResponse added in v0.6.0

type CreateConversationTimersResponse struct {
	DateClosed   *time.Time `json:"date_closed,omitempty"`
	DateInactive *time.Time `json:"date_inactive,omitempty"`
}

type PageConversationResponse

type PageConversationResponse struct {
	AccountSid          string                         `json:"account_sid"`
	Attributes          string                         `json:"attributes"`
	ChatServiceSid      *string                        `json:"chat_service_sid,omitempty"`
	DateCreated         time.Time                      `json:"date_created"`
	DateUpdated         *time.Time                     `json:"date_updated,omitempty"`
	FriendlyName        *string                        `json:"friendly_name,omitempty"`
	MessagingServiceSid *string                        `json:"messaging_service_sid,omitempty"`
	Sid                 string                         `json:"sid"`
	State               string                         `json:"state"`
	Timers              PageConversationTimersResponse `json:"timers"`
	URL                 string                         `json:"url"`
	UniqueName          *string                        `json:"unique_name,omitempty"`
}

type PageConversationTimersResponse added in v0.6.0

type PageConversationTimersResponse struct {
	DateClosed   *time.Time `json:"date_closed,omitempty"`
	DateInactive *time.Time `json:"date_inactive,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