Documentation
¶
Overview ¶
Package accounts contains auto-generated files. DO NOT MODIFY
Package accounts contains auto-generated files. DO NOT MODIFY
Package accounts contains auto-generated files. DO NOT MODIFY
Index ¶
- type AccountsPage
- type AccountsPageOptions
- type AccountsPageResponse
- type AccountsPaginator
- type Client
- func (c Client) Create(input *CreateAccountInput) (*CreateAccountResponse, error)
- func (c Client) CreateWithContext(context context.Context, input *CreateAccountInput) (*CreateAccountResponse, error)
- func (c *Client) NewAccountsPaginator() *AccountsPaginator
- func (c *Client) NewAccountsPaginatorWithOptions(options *AccountsPageOptions) *AccountsPaginator
- func (c Client) Page(options *AccountsPageOptions) (*AccountsPageResponse, error)
- func (c Client) PageWithContext(context context.Context, options *AccountsPageOptions) (*AccountsPageResponse, error)
- type CreateAccountInput
- type CreateAccountResponse
- type PageAccountResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccountsPage ¶
type AccountsPage struct { CurrentPage *AccountsPageResponse Error error // contains filtered or unexported fields }
AccountsPage defines the fields for the page The CurrentPage and Error fields can be used to access the PageAccountResponse or error that is returned from the api call(s)
type AccountsPageOptions ¶
type AccountsPageOptions struct { PageSize *int Page *int PageToken *string FriendlyName *string Status *string }
AccountsPageOptions defines the query options for the api operation
type AccountsPageResponse ¶
type AccountsPageResponse struct { Accounts []PageAccountResponse `json:"accounts"` End int `json:"end"` FirstPageURI string `json:"first_page_uri"` NextPageURI *string `json:"next_page_uri,omitempty"` Page int `json:"page"` PageSize int `json:"page_size"` PreviousPageURI *string `json:"previous_page_uri,omitempty"` Start int `json:"start"` URI string `json:"uri"` }
AccountsPageResponse defines the response fields for the accounts page
type AccountsPaginator ¶
type AccountsPaginator struct { Page *AccountsPage Accounts []PageAccountResponse // contains filtered or unexported fields }
AccountsPaginator defines the fields for makings paginated api calls Accounts is an array of accounts that have been returned from all of the page calls
func (*AccountsPaginator) CurrentPage ¶
func (p *AccountsPaginator) CurrentPage() *AccountsPageResponse
CurrentPage retrieves the results for the current page
func (*AccountsPaginator) Error ¶
func (p *AccountsPaginator) Error() error
Error retrieves the error returned from the page
func (*AccountsPaginator) Next ¶
func (p *AccountsPaginator) 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 (*AccountsPaginator) NextWithContext ¶
func (p *AccountsPaginator) 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 Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client for managing account resources See https://www.twilio.com/docs/iam/api/account for more details
func (Client) Create ¶
func (c Client) Create(input *CreateAccountInput) (*CreateAccountResponse, error)
Create provisions a new Twilio sub account under the current account See https://www.twilio.com/docs/iam/api/account#create-an-account-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 *CreateAccountInput) (*CreateAccountResponse, error)
CreateWithContext provisions a new Twilio sub account under the current account See https://www.twilio.com/docs/iam/api/account#create-an-account-resource for more details
func (*Client) NewAccountsPaginator ¶
func (c *Client) NewAccountsPaginator() *AccountsPaginator
NewAccountsPaginator creates a new instance of the paginator for Page.
func (*Client) NewAccountsPaginatorWithOptions ¶
func (c *Client) NewAccountsPaginatorWithOptions(options *AccountsPageOptions) *AccountsPaginator
NewAccountsPaginatorWithOptions creates a new instance of the paginator for Page with options.
func (Client) Page ¶
func (c Client) Page(options *AccountsPageOptions) (*AccountsPageResponse, error)
Page retrieves a page of account See https://www.twilio.com/docs/iam/api/account#read-multiple-account-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 *AccountsPageOptions) (*AccountsPageResponse, error)
PageWithContext retrieves a page of account See https://www.twilio.com/docs/iam/api/account#read-multiple-account-resources for more details
type CreateAccountInput ¶
type CreateAccountInput struct {
FriendlyName *string `form:"FriendlyName,omitempty"`
}
CreateAccountInput defines the input fields for creating a new Twilio sub account resource
type CreateAccountResponse ¶
type CreateAccountResponse struct { AuthToken string `json:"auth_token"` DateCreated utils.RFC2822Time `json:"date_created"` DateUpdated *utils.RFC2822Time `json:"date_updated,omitempty"` FriendlyName string `json:"friendly_name"` OwnerAccountSid string `json:"owner_account_sid"` Sid string `json:"sid"` Status string `json:"status"` Type string `json:"type"` }
CreateAccountResponse defines the response fields for the created sub account
type PageAccountResponse ¶
type PageAccountResponse struct { AuthToken string `json:"auth_token"` DateCreated utils.RFC2822Time `json:"date_created"` DateUpdated *utils.RFC2822Time `json:"date_updated,omitempty"` FriendlyName string `json:"friendly_name"` OwnerAccountSid string `json:"owner_account_sid"` Sid string `json:"sid"` Status string `json:"status"` Type string `json:"type"` }