openapi

package
v1.7.2 Latest Latest
Warning

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

Go to latest
Published: Jun 1, 2023 License: MIT Imports: 5 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.43.2
  • 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://numbers.twilio.com

Class Method HTTP request Description
HostedNumberEligibilityBulkApi FetchBulkEligibility Get /v1/HostedNumber/Eligibility/Bulk/{RequestId}

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) FetchBulkEligibility added in v1.7.1

func (c *ApiService) FetchBulkEligibility(RequestId string) (*NumbersV1BulkEligibility, error)

Fetch an eligibility bulk check that you requested to host in Twilio.

type NumbersV1BulkEligibility added in v1.7.1

type NumbersV1BulkEligibility struct {
	// The SID of the bulk eligibility check that you want to know about.
	RequestId *string `json:"request_id,omitempty"`
	// This is the url of the request that you're trying to reach out to locate the resource.
	Url *string `json:"url,omitempty"`
	// The result set that contains the eligibility check response for each requested number, each result has at least the following attributes:  phone_number: The requested phone number ,hosting_account_sid: The account sid where the phone number will be hosted, country: Phone number’s country, eligibility_status: Indicates the eligibility status of the PN (Eligible/Ineligible), eligibility_sub_status: Indicates the sub status of the eligibility , ineligibility_reason: Reason for number's ineligibility (if applicable), next_step: Suggested next step in the hosting process based on the eligibility status.
	Results *[]interface{} `json:"results,omitempty"`
	// This is the string that you assigned as a friendly name for describing the eligibility check request.
	FriendlyName *string `json:"friendly_name,omitempty"`
	// This is the status of the bulk eligibility check request. (Example: COMPLETE, IN_PROGRESS)
	Status        *string    `json:"status,omitempty"`
	DateCreated   *time.Time `json:"date_created,omitempty"`
	DateCompleted *time.Time `json:"date_completed,omitempty"`
}

NumbersV1BulkEligibility struct for NumbersV1BulkEligibility

type NumbersV1Eligibility

type NumbersV1Eligibility struct {
	// The result set that contains the eligibility check response for the requested number, each result has at least the following attributes:  phone_number: The requested phone number ,hosting_account_sid: The account sid where the phone number will be hosted, date_last_checked: Datetime (ISO 8601) when the PN was last checked for eligibility, country: Phone number’s country, eligibility_status: Indicates the eligibility status of the PN (Eligible/Ineligible), eligibility_sub_status: Indicates the sub status of the eligibility , ineligibility_reason: Reason for number's ineligibility (if applicable), next_step: Suggested next step in the hosting process based on the eligibility status.
	Results *[]interface{} `json:"results,omitempty"`
}

NumbersV1Eligibility struct for NumbersV1Eligibility

Jump to

Keyboard shortcuts

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