short_codes

package
v0.5.0 Latest Latest
Warning

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

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

Documentation

Overview

Package short_codes contains auto-generated files. DO NOT MODIFY

Package short_codes contains auto-generated files. DO NOT MODIFY

Package short_codes 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 short code resources See https://www.twilio.com/docs/proxy/api/short-code for more details

func New

func New(client *client.Client, properties ClientProperties) *Client

New creates a new instance of the short codes client

func (Client) Create

Create add a new short code to the proxy service See https://www.twilio.com/docs/proxy/api/short-code#add-a-short-code-to-a-proxy-service 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 *CreateShortCodeInput) (*CreateShortCodeResponse, error)

CreateWithContext add a new short code to the proxy service See https://www.twilio.com/docs/proxy/api/short-code#add-a-short-code-to-a-proxy-service for more details

func (*Client) NewShortCodesPaginator

func (c *Client) NewShortCodesPaginator() *ShortCodesPaginator

NewShortCodesPaginator creates a new instance of the paginator for Page.

func (*Client) NewShortCodesPaginatorWithOptions

func (c *Client) NewShortCodesPaginatorWithOptions(options *ShortCodesPageOptions) *ShortCodesPaginator

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

func (Client) Page

Page retrieves a page of short codes See https://www.twilio.com/docs/proxy/api/short-code#get-the-list-of-short-codes-associated-with-a-proxy-service 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 *ShortCodesPageOptions) (*ShortCodesPageResponse, error)

PageWithContext retrieves a page of short codes See https://www.twilio.com/docs/proxy/api/short-code#get-the-list-of-short-codes-associated-with-a-proxy-service for more details

type ClientProperties

type ClientProperties struct {
	ServiceSid string
}

ClientProperties are the properties required to manage the short codes resources

type CreateShortCodeInput

type CreateShortCodeInput struct {
	Sid string `validate:"required" form:"Sid"`
}

CreateShortCodeInput defines the input fields for creating a new short code resource

type CreateShortCodeResponse

type CreateShortCodeResponse struct {
	AccountSid   string                               `json:"account_sid"`
	Capabilities *CreateShortCodeResponseCapabilities `json:"capabilities,omitempty"`
	DateCreated  time.Time                            `json:"date_created"`
	DateUpdated  *time.Time                           `json:"date_updated,omitempty"`
	IsReserved   *bool                                `json:"is_reserved,omitempty"`
	IsoCountry   *string                              `json:"iso_country,omitempty"`
	ServiceSid   string                               `json:"service_sid"`
	ShortCode    *string                              `json:"short_code,omitempty"`
	Sid          string                               `json:"sid"`
	URL          string                               `json:"url"`
}

CreateShortCodeResponse defines the response fields for the created short code

type CreateShortCodeResponseCapabilities

type CreateShortCodeResponseCapabilities struct {
	FaxInbound               *bool `json:"fax_inbound,omitempty"`
	FaxOutbound              *bool `json:"fax_outbound,omitempty"`
	MmsInbound               *bool `json:"mms_inbound,omitempty"`
	MmsOutbound              *bool `json:"mms_outbound,omitempty"`
	RestrictionFaxDomestic   *bool `json:"restriction_fax_domestic,omitempty"`
	RestrictionMmsDomestic   *bool `json:"restriction_mms_domestic,omitempty"`
	RestrictionSmsDomestic   *bool `json:"restriction_sms_domestic,omitempty"`
	RestrictionVoiceDomestic *bool `json:"restriction_voice_domestic,omitempty"`
	SipTrunking              *bool `json:"sip_trunking,omitempty"`
	SmsInbound               *bool `json:"sms_inbound,omitempty"`
	SmsOutbound              *bool `json:"sms_outbound,omitempty"`
	VoiceInbound             *bool `json:"voice_inbound,omitempty"`
	VoiceOutbound            *bool `json:"voice_outbound,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"`
}

type PageShortCodeResponse

type PageShortCodeResponse struct {
	AccountSid   string                             `json:"account_sid"`
	Capabilities *PageShortCodeResponseCapabilities `json:"capabilities,omitempty"`
	DateCreated  time.Time                          `json:"date_created"`
	DateUpdated  *time.Time                         `json:"date_updated,omitempty"`
	IsReserved   *bool                              `json:"is_reserved,omitempty"`
	IsoCountry   *string                            `json:"iso_country,omitempty"`
	ServiceSid   string                             `json:"service_sid"`
	ShortCode    *string                            `json:"short_code,omitempty"`
	Sid          string                             `json:"sid"`
	URL          string                             `json:"url"`
}

type PageShortCodeResponseCapabilities

type PageShortCodeResponseCapabilities struct {
	FaxInbound               *bool `json:"fax_inbound,omitempty"`
	FaxOutbound              *bool `json:"fax_outbound,omitempty"`
	MmsInbound               *bool `json:"mms_inbound,omitempty"`
	MmsOutbound              *bool `json:"mms_outbound,omitempty"`
	RestrictionFaxDomestic   *bool `json:"restriction_fax_domestic,omitempty"`
	RestrictionMmsDomestic   *bool `json:"restriction_mms_domestic,omitempty"`
	RestrictionSmsDomestic   *bool `json:"restriction_sms_domestic,omitempty"`
	RestrictionVoiceDomestic *bool `json:"restriction_voice_domestic,omitempty"`
	SipTrunking              *bool `json:"sip_trunking,omitempty"`
	SmsInbound               *bool `json:"sms_inbound,omitempty"`
	SmsOutbound              *bool `json:"sms_outbound,omitempty"`
	VoiceInbound             *bool `json:"voice_inbound,omitempty"`
	VoiceOutbound            *bool `json:"voice_outbound,omitempty"`
}

type ShortCodesPage

type ShortCodesPage struct {
	CurrentPage *ShortCodesPageResponse
	Error       error
	// contains filtered or unexported fields
}

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

type ShortCodesPageOptions

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

ShortCodesPageOptions defines the query options for the api operation

type ShortCodesPageResponse

type ShortCodesPageResponse struct {
	Meta       PageMetaResponse        `json:"meta"`
	ShortCodes []PageShortCodeResponse `json:"short_codes"`
}

ShortCodesPageResponse defines the response fields for the short codes page

type ShortCodesPaginator

type ShortCodesPaginator struct {
	Page       *ShortCodesPage
	ShortCodes []PageShortCodeResponse
	// contains filtered or unexported fields
}

ShortCodesPaginator defines the fields for makings paginated api calls ShortCodes is an array of shortcodes that have been returned from all of the page calls

func (*ShortCodesPaginator) CurrentPage

func (p *ShortCodesPaginator) CurrentPage() *ShortCodesPageResponse

CurrentPage retrieves the results for the current page

func (*ShortCodesPaginator) Error

func (p *ShortCodesPaginator) Error() error

Error retrieves the error returned from the page

func (*ShortCodesPaginator) Next

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

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

Jump to

Keyboard shortcuts

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