Documentation
¶
Overview ¶
Package origination_urls contains auto-generated files. DO NOT MODIFY
Package origination_urls contains auto-generated files. DO NOT MODIFY
Package origination_urls contains auto-generated files. DO NOT MODIFY
Index ¶
- type Client
- func (c Client) Create(input *CreateOriginationURLInput) (*CreateOriginationURLResponse, error)
- func (c Client) CreateWithContext(context context.Context, input *CreateOriginationURLInput) (*CreateOriginationURLResponse, error)
- func (c *Client) NewOriginationURLsPaginator() *OriginationURLsPaginator
- func (c *Client) NewOriginationURLsPaginatorWithOptions(options *OriginationURLsPageOptions) *OriginationURLsPaginator
- func (c Client) Page(options *OriginationURLsPageOptions) (*OriginationURLsPageResponse, error)
- func (c Client) PageWithContext(context context.Context, options *OriginationURLsPageOptions) (*OriginationURLsPageResponse, error)
- type ClientProperties
- type CreateOriginationURLInput
- type CreateOriginationURLResponse
- type OriginationURLsPage
- type OriginationURLsPageOptions
- type OriginationURLsPageResponse
- type OriginationURLsPaginator
- type PageMetaResponse
- type PageOriginationURLResponse
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 Origination URL resources See https://www.twilio.com/docs/sip-trunking/api/originationurl-resource for more details
func New ¶
func New(client *client.Client, properties ClientProperties) *Client
New creates a new instance of the origination urls client
func (Client) Create ¶
func (c Client) Create(input *CreateOriginationURLInput) (*CreateOriginationURLResponse, error)
Create creates a new origination url resource See https://www.twilio.com/docs/sip-trunking/api/originationurl-resource#create-an-originationurl-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 *CreateOriginationURLInput) (*CreateOriginationURLResponse, error)
CreateWithContext creates a new origination url resource See https://www.twilio.com/docs/sip-trunking/api/originationurl-resource#create-an-originationurl-resource for more details
func (*Client) NewOriginationURLsPaginator ¶
func (c *Client) NewOriginationURLsPaginator() *OriginationURLsPaginator
NewOriginationURLsPaginator creates a new instance of the paginator for Page.
func (*Client) NewOriginationURLsPaginatorWithOptions ¶
func (c *Client) NewOriginationURLsPaginatorWithOptions(options *OriginationURLsPageOptions) *OriginationURLsPaginator
NewOriginationURLsPaginatorWithOptions creates a new instance of the paginator for Page with options.
func (Client) Page ¶
func (c Client) Page(options *OriginationURLsPageOptions) (*OriginationURLsPageResponse, error)
Page retrieves a page of origination url resources See https://www.twilio.com/docs/sip-trunking/api/originationurl-resource#read-multiple-originationurl-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 *OriginationURLsPageOptions) (*OriginationURLsPageResponse, error)
PageWithContext retrieves a page of origination url resources See https://www.twilio.com/docs/sip-trunking/api/originationurl-resource#read-multiple-originationurl-resources for more details
type ClientProperties ¶
type ClientProperties struct {
TrunkSid string
}
ClientProperties are the properties required to manage the origination urls resources
type CreateOriginationURLInput ¶
type CreateOriginationURLInput struct { Enabled bool `form:"Enabled"` FriendlyName string `validate:"required" form:"FriendlyName"` Priority int `form:"Priority"` SipURL string `validate:"required" form:"SipUrl"` Weight int `form:"Weight"` }
CreateOriginationURLInput defines the input fields for creating a new origination url resource
type CreateOriginationURLResponse ¶
type CreateOriginationURLResponse struct { AccountSid string `json:"account_sid"` DateCreated time.Time `json:"date_created"` DateUpdated *time.Time `json:"date_updated,omitempty"` Enabled bool `json:"enabled"` FriendlyName string `json:"friendly_name"` Priority int `json:"priority"` Sid string `json:"sid"` SipURL string `json:"sip_url"` TrunkSid string `json:"trunk_sid"` URL string `json:"url"` Weight int `json:"weight"` }
CreateOriginationURLResponse defines the response fields for the created origination url resource
type OriginationURLsPage ¶
type OriginationURLsPage struct { CurrentPage *OriginationURLsPageResponse Error error // contains filtered or unexported fields }
OriginationURLsPage defines the fields for the page The CurrentPage and Error fields can be used to access the PageOriginationURLResponse or error that is returned from the api call(s)
type OriginationURLsPageOptions ¶
OriginationURLsPageOptions defines the query options for the api operation
type OriginationURLsPageResponse ¶
type OriginationURLsPageResponse struct { Meta PageMetaResponse `json:"meta"` OriginationURLs []PageOriginationURLResponse `json:"origination_urls"` }
OriginationURLsPageResponse defines the response fields for the origination urls page
type OriginationURLsPaginator ¶
type OriginationURLsPaginator struct { Page *OriginationURLsPage OriginationURLs []PageOriginationURLResponse // contains filtered or unexported fields }
OriginationURLsPaginator defines the fields for makings paginated api calls OriginationURLs is an array of originationurls that have been returned from all of the page calls
func (*OriginationURLsPaginator) CurrentPage ¶
func (p *OriginationURLsPaginator) CurrentPage() *OriginationURLsPageResponse
CurrentPage retrieves the results for the current page
func (*OriginationURLsPaginator) Error ¶
func (p *OriginationURLsPaginator) Error() error
Error retrieves the error returned from the page
func (*OriginationURLsPaginator) Next ¶
func (p *OriginationURLsPaginator) 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 (*OriginationURLsPaginator) NextWithContext ¶
func (p *OriginationURLsPaginator) 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 PageMetaResponse ¶
type PageOriginationURLResponse ¶
type PageOriginationURLResponse struct { AccountSid string `json:"account_sid"` DateCreated time.Time `json:"date_created"` DateUpdated *time.Time `json:"date_updated,omitempty"` Enabled bool `json:"enabled"` FriendlyName string `json:"friendly_name"` Priority int `json:"priority"` Sid string `json:"sid"` SipURL string `json:"sip_url"` TrunkSid string `json:"trunk_sid"` URL string `json:"url"` Weight int `json:"weight"` }