addresses

package
v0.25.0 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2022 License: Apache-2.0 Imports: 6 Imported by: 2

Documentation

Overview

Package addresses contains auto-generated files. DO NOT MODIFY

Package addresses contains auto-generated files. DO NOT MODIFY

Package addresses 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 AddressesPage

type AddressesPage struct {
	CurrentPage *AddressesPageResponse
	Error       error
	// contains filtered or unexported fields
}

AddressesPage defines the fields for the page The CurrentPage and Error fields can be used to access the PageAddressResponse or error that is returned from the api call(s)

type AddressesPageOptions

type AddressesPageOptions struct {
	PageSize     *int
	Page         *int
	PageToken    *string
	FriendlyName *string
	CustomerName *string
	IsoCountry   *string
}

AddressesPageOptions defines the query options for the api operation

type AddressesPageResponse

type AddressesPageResponse struct {
	Addresses       []PageAddressResponse `json:"addresses"`
	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"`
}

AddressesPageResponse defines the response fields for the addresses page

type AddressesPaginator

type AddressesPaginator struct {
	Page      *AddressesPage
	Addresses []PageAddressResponse
	// contains filtered or unexported fields
}

AddressesPaginator defines the fields for makings paginated api calls Addresses is an array of addresses that have been returned from all of the page calls

func (*AddressesPaginator) CurrentPage

func (p *AddressesPaginator) CurrentPage() *AddressesPageResponse

CurrentPage retrieves the results for the current page

func (*AddressesPaginator) Error

func (p *AddressesPaginator) Error() error

Error retrieves the error returned from the page

func (*AddressesPaginator) Next

func (p *AddressesPaginator) 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 (*AddressesPaginator) NextWithContext

func (p *AddressesPaginator) 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 address resources See https://www.twilio.com/docs/usage/api/address for more details

func New

func New(client *client.Client, properties ClientProperties) *Client

New creates a new instance of the addresses client

func (Client) Create

Create creates a new address resource See https://www.twilio.com/docs/usage/api/address#create-an-address-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 *CreateAddressInput) (*CreateAddressResponse, error)

CreateWithContext creates a new address resource See https://www.twilio.com/docs/usage/api/address#create-an-address-resource for more details

func (*Client) NewAddressesPaginator

func (c *Client) NewAddressesPaginator() *AddressesPaginator

NewAddressesPaginator creates a new instance of the paginator for Page.

func (*Client) NewAddressesPaginatorWithOptions

func (c *Client) NewAddressesPaginatorWithOptions(options *AddressesPageOptions) *AddressesPaginator

NewAddressesPaginatorWithOptions creates a new instance of the paginator for Page with options.

func (Client) Page

Page retrieves a page of addresses See https://www.twilio.com/docs/usage/api/address#read-multiple-address-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 *AddressesPageOptions) (*AddressesPageResponse, error)

PageWithContext retrieves a page of addresses See https://www.twilio.com/docs/usage/api/address#read-multiple-address-resources for more details

type ClientProperties

type ClientProperties struct {
	AccountSid string
}

ClientProperties are the properties required to manage the addresses resources

type CreateAddressInput

type CreateAddressInput struct {
	AutoCorrectAddress *bool   `form:"AutoCorrectAddress,omitempty"`
	City               string  `validate:"required" form:"City"`
	CustomerName       string  `validate:"required" form:"CustomerName"`
	EmergencyEnabled   *bool   `form:"EmergencyEnabled,omitempty"`
	FriendlyName       *string `form:"FriendlyName,omitempty"`
	IsoCountry         string  `validate:"required" form:"IsoCountry"`
	PostalCode         string  `validate:"required" form:"PostalCode"`
	Region             string  `validate:"required" form:"Region"`
	Street             string  `validate:"required" form:"Street"`
	StreetSecondary    *string `form:"StreetSecondary,omitempty"`
}

CreateAddressInput defines input fields for creating a new address

type CreateAddressResponse

type CreateAddressResponse struct {
	AccountSid       string             `json:"account_sid"`
	City             string             `json:"city"`
	CustomerName     string             `json:"customer_name"`
	DateCreated      utils.RFC2822Time  `json:"date_created"`
	DateUpdated      *utils.RFC2822Time `json:"date_updated,omitempty"`
	EmergencyEnabled bool               `json:"emergency_enabled"`
	FriendlyName     *string            `json:"friendly_name,omitempty"`
	IsoCountry       string             `json:"iso_country"`
	PostalCode       string             `json:"postal_code"`
	Region           string             `json:"region"`
	Sid              string             `json:"sid"`
	Street           string             `json:"street"`
	StreetSecondary  *string            `json:"street_secondary,omitempty"`
	Validated        bool               `json:"validated"`
	Verified         bool               `json:"verified"`
}

CreateAddressResponse defines the response fields for creating a new address

type PageAddressResponse

type PageAddressResponse struct {
	AccountSid       string             `json:"account_sid"`
	City             string             `json:"city"`
	CustomerName     string             `json:"customer_name"`
	DateCreated      utils.RFC2822Time  `json:"date_created"`
	DateUpdated      *utils.RFC2822Time `json:"date_updated,omitempty"`
	EmergencyEnabled bool               `json:"emergency_enabled"`
	FriendlyName     *string            `json:"friendly_name,omitempty"`
	IsoCountry       string             `json:"iso_country"`
	PostalCode       string             `json:"postal_code"`
	Region           string             `json:"region"`
	Sid              string             `json:"sid"`
	Street           string             `json:"street"`
	StreetSecondary  *string            `json:"street_secondary,omitempty"`
	Validated        bool               `json:"validated"`
	Verified         bool               `json:"verified"`
}

Jump to

Keyboard shortcuts

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