openapi

package
v1.2.2 Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2022 License: MIT Imports: 4 Imported by: 0

README

Go API client for openapi

This is the public Twilio REST API.

Overview

This API client was generated by the OpenAPI Generator project from the OpenAPI specs located at twilio/twilio-oai. By using the OpenAPI-spec from a remote server, you can easily generate an API client.

  • API version: 1.37.4
  • Package version: 1.0.0
  • Build package: com.twilio.oai.TwilioGoGenerator For more information, please visit https://support.twilio.com

Installation

Install the following dependencies:

go get github.com/stretchr/testify/assert
go get golang.org/x/net/context

Put the package under your project folder and add the following in import:

import "./openapi"

Documentation for API Endpoints

All URIs are relative to https://lookups.twilio.com

Class Method HTTP request Description
PhoneNumbersApi FetchPhoneNumber Get /v2/PhoneNumbers/{PhoneNumber}

Documentation For Models

Documentation For Authorization

accountSid_authToken

  • Type: HTTP basic authentication

Example

auth := context.WithValue(context.Background(), sw.ContextBasicAuth, sw.BasicAuth{
    UserName: "username",
    Password: "password",
})
r, err := client.Service.Operation(auth, args)

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ApiService

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

func NewApiService

func NewApiService(requestHandler *twilio.RequestHandler) *ApiService

func NewApiServiceWithClient

func NewApiServiceWithClient(client twilio.BaseClient) *ApiService

func (*ApiService) FetchPhoneNumber

func (c *ApiService) FetchPhoneNumber(PhoneNumber string, params *FetchPhoneNumberParams) (*LookupsV2PhoneNumber, error)

type FetchPhoneNumberParams

type FetchPhoneNumberParams struct {
	// A comma-separated list of fields to return. Possible values are caller_name, sim_swap, call_forwarding, live_activity, line_type_intelligence, identity_match.
	Fields *string `json:"Fields,omitempty"`
	// The [country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) used if the phone number provided is in national format.
	CountryCode *string `json:"CountryCode,omitempty"`
	// User’s first name. This query parameter is only used (optionally) for identity_match package requests.
	FirstName *string `json:"FirstName,omitempty"`
	// User’s last name. This query parameter is only used (optionally) for identity_match package requests.
	LastName *string `json:"LastName,omitempty"`
	// User’s first address line. This query parameter is only used (optionally) for identity_match package requests.
	AddressLine1 *string `json:"AddressLine1,omitempty"`
	// User’s second address line. This query parameter is only used (optionally) for identity_match package requests.
	AddressLine2 *string `json:"AddressLine2,omitempty"`
	// User’s city. This query parameter is only used (optionally) for identity_match package requests.
	City *string `json:"City,omitempty"`
	// User’s country subdivision, such as state, province, or locality. This query parameter is only used (optionally) for identity_match package requests.
	State *string `json:"State,omitempty"`
	// User’s postal zip code. This query parameter is only used (optionally) for identity_match package requests.
	PostalCode *string `json:"PostalCode,omitempty"`
	// User’s country, up to two characters. This query parameter is only used (optionally) for identity_match package requests.
	AddressCountryCode *string `json:"AddressCountryCode,omitempty"`
	// User’s national ID, such as SSN or Passport ID. This query parameter is only used (optionally) for identity_match package requests.
	NationalId *string `json:"NationalId,omitempty"`
	// User’s date of birth, in YYYYMMDD format. This query parameter is only used (optionally) for identity_match package requests.
	DateOfBirth *string `json:"DateOfBirth,omitempty"`
}

Optional parameters for the method 'FetchPhoneNumber'

func (*FetchPhoneNumberParams) SetAddressCountryCode added in v1.2.2

func (params *FetchPhoneNumberParams) SetAddressCountryCode(AddressCountryCode string) *FetchPhoneNumberParams

func (*FetchPhoneNumberParams) SetAddressLine1 added in v1.2.2

func (params *FetchPhoneNumberParams) SetAddressLine1(AddressLine1 string) *FetchPhoneNumberParams

func (*FetchPhoneNumberParams) SetAddressLine2 added in v1.2.2

func (params *FetchPhoneNumberParams) SetAddressLine2(AddressLine2 string) *FetchPhoneNumberParams

func (*FetchPhoneNumberParams) SetCity added in v1.2.2

func (params *FetchPhoneNumberParams) SetCity(City string) *FetchPhoneNumberParams

func (*FetchPhoneNumberParams) SetCountryCode

func (params *FetchPhoneNumberParams) SetCountryCode(CountryCode string) *FetchPhoneNumberParams

func (*FetchPhoneNumberParams) SetDateOfBirth added in v1.2.2

func (params *FetchPhoneNumberParams) SetDateOfBirth(DateOfBirth string) *FetchPhoneNumberParams

func (*FetchPhoneNumberParams) SetFields

func (params *FetchPhoneNumberParams) SetFields(Fields string) *FetchPhoneNumberParams

func (*FetchPhoneNumberParams) SetFirstName added in v1.2.2

func (params *FetchPhoneNumberParams) SetFirstName(FirstName string) *FetchPhoneNumberParams

func (*FetchPhoneNumberParams) SetLastName added in v1.2.2

func (params *FetchPhoneNumberParams) SetLastName(LastName string) *FetchPhoneNumberParams

func (*FetchPhoneNumberParams) SetNationalId added in v1.2.2

func (params *FetchPhoneNumberParams) SetNationalId(NationalId string) *FetchPhoneNumberParams

func (*FetchPhoneNumberParams) SetPostalCode added in v1.2.2

func (params *FetchPhoneNumberParams) SetPostalCode(PostalCode string) *FetchPhoneNumberParams

func (*FetchPhoneNumberParams) SetState added in v1.2.2

func (params *FetchPhoneNumberParams) SetState(State string) *FetchPhoneNumberParams

type LookupsV2PhoneNumber

type LookupsV2PhoneNumber struct {
	// International dialing prefix
	CallingCountryCode *string `json:"calling_country_code,omitempty"`
	// Phone number's ISO country code
	CountryCode *string `json:"country_code,omitempty"`
	// Phone number in E.164 format
	PhoneNumber *string `json:"phone_number,omitempty"`
	// Phone number in national format
	NationalFormat *string `json:"national_format,omitempty"`
	// Boolean which indicates if the phone number is valid
	Valid *bool `json:"valid,omitempty"`
	// Contains reasons why a phone number is invalid
	ValidationErrors *[]string `json:"validation_errors,omitempty"`
	// An object that contains caller name information
	CallerName *interface{} `json:"caller_name,omitempty"`
	// An object that contains SIM swap information
	SimSwap *interface{} `json:"sim_swap,omitempty"`
	// An object that contains call forwarding status information
	CallForwarding *interface{} `json:"call_forwarding,omitempty"`
	// An object that contains live activity information
	LiveActivity *interface{} `json:"live_activity,omitempty"`
	// An object that contains line type information
	LineTypeIntelligence *interface{} `json:"line_type_intelligence,omitempty"`
	// An object that contains identity match information
	IdentityMatch *interface{} `json:"identity_match,omitempty"`
	// The absolute URL of the resource
	Url *string `json:"url,omitempty"`
}

LookupsV2PhoneNumber struct for LookupsV2PhoneNumber

Jump to

Keyboard shortcuts

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