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 ¶
- type Client
- func (c Client) Create(input *CreateShortCodeInput) (*CreateShortCodeResponse, error)
- func (c Client) CreateWithContext(context context.Context, input *CreateShortCodeInput) (*CreateShortCodeResponse, error)
- func (c *Client) NewShortCodesPaginator() *ShortCodesPaginator
- func (c *Client) NewShortCodesPaginatorWithOptions(options *ShortCodesPageOptions) *ShortCodesPaginator
- func (c Client) Page(options *ShortCodesPageOptions) (*ShortCodesPageResponse, error)
- func (c Client) PageWithContext(context context.Context, options *ShortCodesPageOptions) (*ShortCodesPageResponse, error)
- type ClientProperties
- type CreateShortCodeCapabilitiesResponse
- type CreateShortCodeInput
- type CreateShortCodeResponse
- type PageMetaResponse
- type PageShortCodeCapabilitiesResponse
- type PageShortCodeResponse
- type ShortCodesPage
- type ShortCodesPageOptions
- type ShortCodesPageResponse
- type ShortCodesPaginator
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 ¶
func (c Client) Create(input *CreateShortCodeInput) (*CreateShortCodeResponse, error)
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 ¶
func (c Client) Page(options *ShortCodesPageOptions) (*ShortCodesPageResponse, error)
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 CreateShortCodeCapabilitiesResponse ¶ added in v0.6.0
type CreateShortCodeCapabilitiesResponse 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 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 *CreateShortCodeCapabilitiesResponse `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 PageMetaResponse ¶
type PageShortCodeCapabilitiesResponse ¶ added in v0.6.0
type PageShortCodeCapabilitiesResponse 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 PageShortCodeResponse ¶
type PageShortCodeResponse struct { AccountSid string `json:"account_sid"` Capabilities *PageShortCodeCapabilitiesResponse `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 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 ¶
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