phoneid

package
v1.0.6 Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2019 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(ip string, phone string, accLifecycleEvent string) telesign.Request

New return new SMS request

func NewClient

func NewClient(options ...telesign.OptConFunc) telesign.Connection

NewClient return new PhoneID API connection

func NewLive

func NewLive(phone string, ucid string) telesign.Request

NewLive return new Live request

Types

type BlocklistingResponse

type BlocklistingResponse struct {
	BlockCode        int64  `json:"block_code"`
	BlockCescription string `json:"block_description"`
	Blocked          bool   `json:"blocked"`
}

BlocklistingResponse returned by telesign API

type CarrierResponse

type CarrierResponse struct {
	Name string `json:"name"`
}

CarrierResponse returned by telesign API

type CoordinatesResponse

type CoordinatesResponse struct {
	Latitude  float64 `json:"latitude"`
	Longitude float64 `json:"longitude"`
}

CoordinatesResponse returned by telesign API

type CountryResponse

type CountryResponse struct {
	Name string `json:"name"`
	Iso2 string `json:"iso2"`
	Iso3 string `json:"iso3"`
}

CountryResponse returned by telesign API

type LiveRequest

type LiveRequest struct {
	// contains filtered or unexported fields
}

LiveRequest object

func (*LiveRequest) GetBody

func (r *LiveRequest) GetBody() string

GetBody return body request

func (LiveRequest) GetMethod

func (r LiveRequest) GetMethod() string

GetMethod return method request

func (LiveRequest) GetPath

func (r LiveRequest) GetPath() string

GetPath return path request

func (LiveRequest) GetURI

func (r LiveRequest) GetURI() string

GetURI return uri request

func (LiveRequest) ParseResponse

func (r LiveRequest) ParseResponse(statusCode int, content []byte) (telesign.Response, error)

ParseResponse return parsed response

type LiveResponse

type LiveResponse struct {
	SubscriberStatus   string `json:"subscriber_status"`
	DeviceStatus       string `json:"device_status"`
	Roaming            string `json:"roaming"`
	RoamingCountry     string `json:"roaming_country"`
	RoamingCountryIso2 string `json:"roaming_country_iso2"`
}

LiveResponse returned by telesign API

type LocationResponse

type LocationResponse struct {
	City        string              `json:"city"`
	State       string              `json:"state"`
	Zip         string              `json:"zip"`
	MetroCode   string              `json:"metro_code"`
	County      string              `json:"county"`
	Country     CountryResponse     `json:"country"`
	Coordinates CoordinatesResponse `json:"coordinates"`
	Timezone    TimezoneResponse    `json:"time_zone"`
}

LocationResponse returned by telesign API

type NumberingCleansingItemResponse

type NumberingCleansingItemResponse struct {
	CountryCode  string `json:"country_code"`
	PhoneNumber  string `json:"phone_number"`
	CleansedCode int64  `json:"cleansed_code"`
	MinLength    int64  `json:"min_length"`
	MaxLength    int64  `json:"max_length"`
}

NumberingCleansingItemResponse returned by telesign API

type NumberingCleansingResponse

type NumberingCleansingResponse struct {
	Call NumberingCleansingItemResponse `json:"call"`
	SMS  NumberingCleansingItemResponse `json:"sms"`
}

NumberingCleansingResponse returned by telesign API

type NumberingOriginalResponse

type NumberingOriginalResponse struct {
	CompletePhoneNumber string `json:"complete_phone_number"`
	CountryCode         string `json:"country_code"`
	PhoneNumber         string `json:"phone_number"`
}

NumberingOriginalResponse returned by telesign API

type NumberingResponse

type NumberingResponse struct {
	Original  NumberingOriginalResponse  `json:"original"`
	Cleansing NumberingCleansingResponse `json:"cleansing"`
}

NumberingResponse returned by telesign API

type PhoneTypeResponse

type PhoneTypeResponse struct {
	Code        string `json:"code"`
	Description string `json:"description"`
}

PhoneTypeResponse returned by telesign API

type Request

type Request struct {
	// contains filtered or unexported fields
}

Request object

func (*Request) GetBody

func (r *Request) GetBody() string

GetBody return body request

func (Request) GetMethod

func (r Request) GetMethod() string

GetMethod return method request

func (Request) GetPath

func (r Request) GetPath() string

GetPath return path request

func (Request) GetURI

func (r Request) GetURI() string

GetURI return uri request

func (Request) ParseResponse

func (r Request) ParseResponse(statusCode int, content []byte) (telesign.Response, error)

ParseResponse return parsed response

type RequestData

type RequestData struct {
	OriginatingIP         string `schema:"originating_ip"`
	PhoneNumber           string `schema:"-"`
	AccountLifecycleEvent string `schema:"account_lifecycle_event"`
}

RequestData data

type Response

type Response struct {
	telesign.MainResponse
	Errors       []telesign.Error     `json:"errors"`
	Location     LocationResponse     `json:"location"`
	Numbering    NumberingResponse    `json:"numbering"`
	PhoneType    PhoneTypeResponse    `json:"phone_type"`
	Blocklisting BlocklistingResponse `json:"blocklisting"`
	Carrier      CarrierResponse      `json:"carrier"`
	Live         LiveResponse         `json:"live"`
}

Response returned by telesign API

type TimezoneResponse

type TimezoneResponse struct {
	Name         string `json:"name"`
	UTCOffsetMin string `json:"utc_offset_min"`
	UTCOffsetMax string `json:"utc_offset_max"`
}

TimezoneResponse returned by telesign API

Jump to

Keyboard shortcuts

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