phone_number

package
v0.19.0 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2021 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package phone_number contains auto-generated files. DO NOT MODIFY

Package phone_number contains auto-generated files. DO NOT MODIFY

Package phone_number 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 a specific phone number resource 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 number client

func (Client) Delete

func (c Client) Delete() error

Delete removes a phone number resource from the SIP trunk See https://www.twilio.com/docs/sip-trunking/api/phonenumber-resource#delete-a-phonenumber-resource for more details Context is defaulted to Background. See https://golang.org/pkg/context/#Background for more information

func (Client) DeleteWithContext

func (c Client) DeleteWithContext(context context.Context) error

DeleteWithContext removes a phone number resource from the SIP trunk See https://www.twilio.com/docs/sip-trunking/api/phonenumber-resource#delete-a-phonenumber-resource for more details

func (Client) Fetch added in v0.8.0

func (c Client) Fetch() (*FetchPhoneNumberResponse, error)

Fetch retrieves a phone number resource Context is defaulted to Background. See https://golang.org/pkg/context/#Background for more information

func (Client) FetchWithContext added in v0.8.0

func (c Client) FetchWithContext(context context.Context) (*FetchPhoneNumberResponse, error)

FetchWithContext retrieves a phone number resource

type ClientProperties

type ClientProperties struct {
	Sid      string
	TrunkSid string
}

ClientProperties are the properties required to manage the phone number resources

type FetchPhoneNumberCapabilitiesResponse added in v0.8.0

type FetchPhoneNumberCapabilitiesResponse struct {
	Fax   *bool `json:"fax,omitempty"`
	Mms   bool  `json:"MMS"`
	Sms   bool  `json:"SMS"`
	Voice bool  `json:"voice"`
}

type FetchPhoneNumberResponse added in v0.8.0

type FetchPhoneNumberResponse struct {
	APIVersion           string                               `json:"api_version"`
	AccountSid           string                               `json:"account_sid"`
	AddressRequirements  string                               `json:"address_requirements"`
	Beta                 bool                                 `json:"beta"`
	Capabilities         FetchPhoneNumberCapabilitiesResponse `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"`
}

FetchPhoneNumberResponse defines the response fields for the retrieved phone number resource

Jump to

Keyboard shortcuts

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