phone_number

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2020 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

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 lookup resource See https://www.twilio.com/docs/lookup/api 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) Fetch

Fetch retrieves a phone number details See https://www.twilio.com/docs/lookup/api#lookup-a-phone-number for more details Context is defaulted to Background. See https://golang.org/pkg/context/#Background for more information

func (Client) FetchWithContext

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

FetchWithContext retrieves a phone number details See https://www.twilio.com/docs/lookup/api#lookup-a-phone-number for more details

type ClientProperties

type ClientProperties struct {
	PhoneNumber string
}

ClientProperties are the properties required to manage the phone number resources

type FetchCallerNameResponse

type FetchCallerNameResponse struct {
	CallerName *string `json:"caller_name,omitempty"`
	CallerType *string `json:"caller_type,omitempty"`
	ErrorCode  *string `json:"error_code,omitempty"`
}

type FetchCarrierResponse

type FetchCarrierResponse struct {
	ErrorCode         *string `json:"error_code,omitempty"`
	MobileCountryCode *string `json:"mobile_country_code,omitempty"`
	MobileNetworkCode *string `json:"mobile_network_code,omitempty"`
	Name              *string `json:"name,omitempty"`
	Type              *string `json:"type,omitempty"`
}

type FetchPhoneNumberOptions

type FetchPhoneNumberOptions struct {
	CountryCode *string
	Type        *[]string
	AddOns      *[]string
	AddOnsData  *map[string]interface{}
}

FetchPhoneNumberOptions defines the query options for the api operation

type FetchPhoneNumberResponse

type FetchPhoneNumberResponse struct {
	AddOns         *map[string]interface{}  `json:"add_ons,omitempty"`
	CallerName     *FetchCallerNameResponse `json:"caller_name,omitempty"`
	Carrier        *FetchCarrierResponse    `json:"carrier,omitempty"`
	CountryCode    string                   `json:"country_code"`
	NationalFormat string                   `json:"national_format"`
	PhoneNumber    string                   `json:"phone_number"`
	URL            string                   `json:"url"`
}

FetchPhoneNumberResponse defines the response fields for the retrieved phone number

Jump to

Keyboard shortcuts

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