Documentation ¶
Overview ¶
Package phone_numbers contains auto-generated files. DO NOT MODIFY
Package phone_numbers contains auto-generated files. DO NOT MODIFY
Package phone_numbers contains auto-generated files. DO NOT MODIFY
Index ¶
- type Client
- func (c Client) Create(input *CreatePhoneNumberInput) (*CreatePhoneNumberResponse, error)
- func (c Client) CreateWithContext(context context.Context, input *CreatePhoneNumberInput) (*CreatePhoneNumberResponse, error)
- func (c *Client) NewPhoneNumbersPaginator() *PhoneNumbersPaginator
- func (c *Client) NewPhoneNumbersPaginatorWithOptions(options *PhoneNumbersPageOptions) *PhoneNumbersPaginator
- func (c Client) Page(options *PhoneNumbersPageOptions) (*PhoneNumbersPageResponse, error)
- func (c Client) PageWithContext(context context.Context, options *PhoneNumbersPageOptions) (*PhoneNumbersPageResponse, error)
- type ClientProperties
- type CreatePhoneNumberCapabilitiesResponse
- type CreatePhoneNumberInput
- type CreatePhoneNumberResponse
- type PageMetaResponse
- type PagePhoneNumberCapabilitiesResponse
- type PagePhoneNumberResponse
- type PhoneNumbersPage
- type PhoneNumbersPageOptions
- type PhoneNumbersPageResponse
- type PhoneNumbersPaginator
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 phone number resources See https://www.twilio.com/docs/sip-trunking/api/phonenumber-resource for more details
func New ¶
func New(client *client.Client, properties ClientProperties) *Client
New creates a new instance of the phone numbers client
func (Client) Create ¶
func (c Client) Create(input *CreatePhoneNumberInput) (*CreatePhoneNumberResponse, error)
Create adds a phone number resource to the SIP trunk See https://www.twilio.com/docs/sip-trunking/api/phonenumber-resource#create-a-phonenumber-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 *CreatePhoneNumberInput) (*CreatePhoneNumberResponse, error)
CreateWithContext adds a phone number resource to the SIP trunk See https://www.twilio.com/docs/sip-trunking/api/phonenumber-resource#create-a-phonenumber-resource for more details
func (*Client) NewPhoneNumbersPaginator ¶
func (c *Client) NewPhoneNumbersPaginator() *PhoneNumbersPaginator
NewPhoneNumbersPaginator creates a new instance of the paginator for Page.
func (*Client) NewPhoneNumbersPaginatorWithOptions ¶
func (c *Client) NewPhoneNumbersPaginatorWithOptions(options *PhoneNumbersPageOptions) *PhoneNumbersPaginator
NewPhoneNumbersPaginatorWithOptions creates a new instance of the paginator for Page with options.
func (Client) Page ¶
func (c Client) Page(options *PhoneNumbersPageOptions) (*PhoneNumbersPageResponse, error)
Page retrieves a page of phone number resources See https://www.twilio.com/docs/sip-trunking/api/phonenumber-resource#read-multiple-phonenumber-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 *PhoneNumbersPageOptions) (*PhoneNumbersPageResponse, error)
PageWithContext retrieves a page of phone number resources See https://www.twilio.com/docs/sip-trunking/api/phonenumber-resource#read-multiple-phonenumber-resources for more details
type ClientProperties ¶
type ClientProperties struct {
TrunkSid string
}
ClientProperties are the properties required to manage the phone numbers resources
type CreatePhoneNumberInput ¶
type CreatePhoneNumberInput struct {
PhoneNumberSid string `validate:"required" form:"PhoneNumberSid"`
}
CreatePhoneNumberInput defines the input fields for creating a new phone number resource
type CreatePhoneNumberResponse ¶
type CreatePhoneNumberResponse struct { APIVersion string `json:"api_version"` AccountSid string `json:"account_sid"` AddressRequirements string `json:"address_requirements"` Beta bool `json:"beta"` Capabilities CreatePhoneNumberCapabilitiesResponse `json:"capabilities"` DateCreated time.Time `json:"date_created"` DateUpdated *time.Time `json:"date_updated,omitempty"` FriendlyName *string `json:"friendly_name,omitempty"` PhoneNumber string `json:"phone_number"` Sid string `json:"sid"` SmsApplicationSid *string `json:"sms_application_sid,omitempty"` SmsFallbackMethod string `json:"sms_fallback_method"` SmsFallbackURL *string `json:"sms_fallback_url,omitempty"` SmsMethod string `json:"sms_method"` SmsURL *string `json:"sms_url,omitempty"` StatusCallback *string `json:"status_callback,omitempty"` StatusCallbackMethod string `json:"status_callback_method"` TrunkSid string `json:"trunk_sid"` URL string `json:"url"` VoiceApplicationSid *string `json:"voice_application_sid,omitempty"` VoiceCallerIDLookup bool `json:"voice_caller_id_lookup"` VoiceFallbackMethod string `json:"voice_fallback_method"` VoiceFallbackURL *string `json:"voice_fallback_url,omitempty"` VoiceMethod string `json:"voice_method"` VoiceReceiveMode *string `json:"voice_receive_mode,omitempty"` VoiceURL *string `json:"voice_url,omitempty"` }
CreatePhoneNumberResponse defines the response fields for the created phone number resource
type PageMetaResponse ¶
type PagePhoneNumberResponse ¶
type PagePhoneNumberResponse struct { APIVersion string `json:"api_version"` AccountSid string `json:"account_sid"` AddressRequirements string `json:"address_requirements"` Beta bool `json:"beta"` Capabilities PagePhoneNumberCapabilitiesResponse `json:"capabilities"` DateCreated time.Time `json:"date_created"` DateUpdated *time.Time `json:"date_updated,omitempty"` FriendlyName *string `json:"friendly_name,omitempty"` PhoneNumber string `json:"phone_number"` Sid string `json:"sid"` SmsApplicationSid *string `json:"sms_application_sid,omitempty"` SmsFallbackMethod string `json:"sms_fallback_method"` SmsFallbackURL *string `json:"sms_fallback_url,omitempty"` SmsMethod string `json:"sms_method"` SmsURL *string `json:"sms_url,omitempty"` StatusCallback *string `json:"status_callback,omitempty"` StatusCallbackMethod string `json:"status_callback_method"` TrunkSid string `json:"trunk_sid"` URL string `json:"url"` VoiceApplicationSid *string `json:"voice_application_sid,omitempty"` VoiceCallerIDLookup bool `json:"voice_caller_id_lookup"` VoiceFallbackMethod string `json:"voice_fallback_method"` VoiceFallbackURL *string `json:"voice_fallback_url,omitempty"` VoiceMethod string `json:"voice_method"` VoiceReceiveMode *string `json:"voice_receive_mode,omitempty"` VoiceURL *string `json:"voice_url,omitempty"` }
type PhoneNumbersPage ¶
type PhoneNumbersPage struct { CurrentPage *PhoneNumbersPageResponse Error error // contains filtered or unexported fields }
PhoneNumbersPage defines the fields for the page The CurrentPage and Error fields can be used to access the PagePhoneNumberResponse or error that is returned from the api call(s)
type PhoneNumbersPageOptions ¶
PhoneNumbersPageOptions defines the query options for the api operation
type PhoneNumbersPageResponse ¶
type PhoneNumbersPageResponse struct { Meta PageMetaResponse `json:"meta"` PhoneNumbers []PagePhoneNumberResponse `json:"phone_numbers"` }
PhoneNumbersPageResponse defines the response fields for the phone numbers page
type PhoneNumbersPaginator ¶
type PhoneNumbersPaginator struct { Page *PhoneNumbersPage PhoneNumbers []PagePhoneNumberResponse // contains filtered or unexported fields }
PhoneNumbersPaginator defines the fields for makings paginated api calls PhoneNumbers is an array of phonenumbers that have been returned from all of the page calls
func (*PhoneNumbersPaginator) CurrentPage ¶
func (p *PhoneNumbersPaginator) CurrentPage() *PhoneNumbersPageResponse
CurrentPage retrieves the results for the current page
func (*PhoneNumbersPaginator) Error ¶
func (p *PhoneNumbersPaginator) Error() error
Error retrieves the error returned from the page
func (*PhoneNumbersPaginator) Next ¶
func (p *PhoneNumbersPaginator) 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 (*PhoneNumbersPaginator) NextWithContext ¶
func (p *PhoneNumbersPaginator) 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