origination_urls

package
v0.14.1 Latest Latest
Warning

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

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

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

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

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

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

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

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

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 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 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"`
}

Jump to

Keyboard shortcuts

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