openapi

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: May 19, 2021 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.16.0
  • 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://pricing.twilio.com

Class Method HTTP request Description
DefaultApi FetchMessagingCountry Get /v1/Messaging/Countries/{IsoCountry}
DefaultApi FetchPhoneNumberCountry Get /v1/PhoneNumbers/Countries/{IsoCountry}
DefaultApi FetchVoiceCountry Get /v1/Voice/Countries/{IsoCountry}
DefaultApi FetchVoiceNumber Get /v1/Voice/Numbers/{Number}
DefaultApi ListMessagingCountry Get /v1/Messaging/Countries
DefaultApi ListPhoneNumberCountry Get /v1/PhoneNumbers/Countries
DefaultApi ListVoiceCountry Get /v1/Voice/Countries

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)

Author

support@twilio.com

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DefaultApiService

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

func NewDefaultApiService

func NewDefaultApiService(client twilio.BaseClient) *DefaultApiService

func (*DefaultApiService) FetchMessagingCountry

func (c *DefaultApiService) FetchMessagingCountry(IsoCountry string) (*PricingV1MessagingMessagingCountryInstance, error)

func (*DefaultApiService) FetchPhoneNumberCountry

func (c *DefaultApiService) FetchPhoneNumberCountry(IsoCountry string) (*PricingV1PhoneNumberPhoneNumberCountryInstance, error)

func (*DefaultApiService) FetchVoiceCountry

func (c *DefaultApiService) FetchVoiceCountry(IsoCountry string) (*PricingV1VoiceVoiceCountryInstance, error)

func (*DefaultApiService) FetchVoiceNumber

func (c *DefaultApiService) FetchVoiceNumber(Number string) (*PricingV1VoiceVoiceNumber, error)

func (*DefaultApiService) ListMessagingCountry

func (*DefaultApiService) ListPhoneNumberCountry

func (*DefaultApiService) ListVoiceCountry

type ListMessagingCountryParams

type ListMessagingCountryParams struct {
	// How many resources to return in each list page. The default is 50, and the maximum is 1000.
	PageSize *int32 `json:"PageSize,omitempty"`
}

Optional parameters for the method 'ListMessagingCountry'

func (*ListMessagingCountryParams) SetPageSize

func (params *ListMessagingCountryParams) SetPageSize(PageSize int32) *ListMessagingCountryParams

type ListMessagingCountryResponse

type ListMessagingCountryResponse struct {
	Countries []PricingV1MessagingMessagingCountry `json:"countries,omitempty"`
	Meta      ListMessagingCountryResponseMeta     `json:"meta,omitempty"`
}

ListMessagingCountryResponse struct for ListMessagingCountryResponse

type ListMessagingCountryResponseMeta

type ListMessagingCountryResponseMeta struct {
	FirstPageUrl    string `json:"first_page_url,omitempty"`
	Key             string `json:"key,omitempty"`
	NextPageUrl     string `json:"next_page_url,omitempty"`
	Page            int32  `json:"page,omitempty"`
	PageSize        int32  `json:"page_size,omitempty"`
	PreviousPageUrl string `json:"previous_page_url,omitempty"`
	Url             string `json:"url,omitempty"`
}

ListMessagingCountryResponseMeta struct for ListMessagingCountryResponseMeta

type ListPhoneNumberCountryParams

type ListPhoneNumberCountryParams struct {
	// How many resources to return in each list page. The default is 50, and the maximum is 1000.
	PageSize *int32 `json:"PageSize,omitempty"`
}

Optional parameters for the method 'ListPhoneNumberCountry'

func (*ListPhoneNumberCountryParams) SetPageSize

func (params *ListPhoneNumberCountryParams) SetPageSize(PageSize int32) *ListPhoneNumberCountryParams

type ListPhoneNumberCountryResponse

type ListPhoneNumberCountryResponse struct {
	Countries []PricingV1PhoneNumberPhoneNumberCountry `json:"countries,omitempty"`
	Meta      ListMessagingCountryResponseMeta         `json:"meta,omitempty"`
}

ListPhoneNumberCountryResponse struct for ListPhoneNumberCountryResponse

type ListVoiceCountryParams

type ListVoiceCountryParams struct {
	// How many resources to return in each list page. The default is 50, and the maximum is 1000.
	PageSize *int32 `json:"PageSize,omitempty"`
}

Optional parameters for the method 'ListVoiceCountry'

func (*ListVoiceCountryParams) SetPageSize

func (params *ListVoiceCountryParams) SetPageSize(PageSize int32) *ListVoiceCountryParams

type ListVoiceCountryResponse

type ListVoiceCountryResponse struct {
	Countries []PricingV1VoiceVoiceCountry     `json:"countries,omitempty"`
	Meta      ListMessagingCountryResponseMeta `json:"meta,omitempty"`
}

ListVoiceCountryResponse struct for ListVoiceCountryResponse

type PricingV1Messaging

type PricingV1Messaging struct {
	Links *map[string]interface{} `json:"links,omitempty"`
	Name  *string                 `json:"name,omitempty"`
	Url   *string                 `json:"url,omitempty"`
}

PricingV1Messaging struct for PricingV1Messaging

type PricingV1MessagingMessagingCountry

type PricingV1MessagingMessagingCountry struct {
	// The name of the country
	Country *string `json:"country,omitempty"`
	// The ISO country code
	IsoCountry *string `json:"iso_country,omitempty"`
	// The absolute URL of the resource
	Url *string `json:"url,omitempty"`
}

PricingV1MessagingMessagingCountry struct for PricingV1MessagingMessagingCountry

type PricingV1MessagingMessagingCountryInstance

type PricingV1MessagingMessagingCountryInstance struct {
	// The name of the country
	Country *string `json:"country,omitempty"`
	// The list of InboundPrice records
	InboundSmsPrices *[]PricingV1MessagingMessagingCountryInstanceInboundSmsPrices `json:"inbound_sms_prices,omitempty"`
	// The ISO country code
	IsoCountry *string `json:"iso_country,omitempty"`
	// The list of OutboundSMSPrice records
	OutboundSmsPrices *[]PricingV1MessagingMessagingCountryInstanceOutboundSmsPrices `json:"outbound_sms_prices,omitempty"`
	// The currency in which prices are measured, in ISO 4127 format (e.g. usd, eur, jpy)
	PriceUnit *string `json:"price_unit,omitempty"`
	// The absolute URL of the resource
	Url *string `json:"url,omitempty"`
}

PricingV1MessagingMessagingCountryInstance struct for PricingV1MessagingMessagingCountryInstance

type PricingV1MessagingMessagingCountryInstanceInboundSmsPrices

type PricingV1MessagingMessagingCountryInstanceInboundSmsPrices struct {
	BasePrice    float32 `json:"base_price,omitempty"`
	CurrentPrice float32 `json:"current_price,omitempty"`
	NumberType   string  `json:"number_type,omitempty"`
}

PricingV1MessagingMessagingCountryInstanceInboundSmsPrices struct for PricingV1MessagingMessagingCountryInstanceInboundSmsPrices

type PricingV1MessagingMessagingCountryInstanceOutboundSmsPrices

type PricingV1MessagingMessagingCountryInstanceOutboundSmsPrices struct {
	Carrier string                                                       `json:"carrier,omitempty"`
	Mcc     string                                                       `json:"mcc,omitempty"`
	Mnc     string                                                       `json:"mnc,omitempty"`
	Prices  []PricingV1MessagingMessagingCountryInstanceInboundSmsPrices `json:"prices,omitempty"`
}

PricingV1MessagingMessagingCountryInstanceOutboundSmsPrices struct for PricingV1MessagingMessagingCountryInstanceOutboundSmsPrices

type PricingV1PhoneNumber

type PricingV1PhoneNumber struct {
	Links *map[string]interface{} `json:"links,omitempty"`
	Name  *string                 `json:"name,omitempty"`
	Url   *string                 `json:"url,omitempty"`
}

PricingV1PhoneNumber struct for PricingV1PhoneNumber

type PricingV1PhoneNumberPhoneNumberCountry

type PricingV1PhoneNumberPhoneNumberCountry struct {
	// The name of the country
	Country *string `json:"country,omitempty"`
	// The ISO country code
	IsoCountry *string `json:"iso_country,omitempty"`
	// The absolute URL of the resource
	Url *string `json:"url,omitempty"`
}

PricingV1PhoneNumberPhoneNumberCountry struct for PricingV1PhoneNumberPhoneNumberCountry

type PricingV1PhoneNumberPhoneNumberCountryInstance

type PricingV1PhoneNumberPhoneNumberCountryInstance struct {
	// The name of the country
	Country *string `json:"country,omitempty"`
	// The ISO country code
	IsoCountry *string `json:"iso_country,omitempty"`
	// The list of PhoneNumberPrices records
	PhoneNumberPrices *[]PricingV1MessagingMessagingCountryInstanceInboundSmsPrices `json:"phone_number_prices,omitempty"`
	// The currency in which prices are measured, in ISO 4127 format (e.g. usd, eur, jpy)
	PriceUnit *string `json:"price_unit,omitempty"`
	// The absolute URL of the resource
	Url *string `json:"url,omitempty"`
}

PricingV1PhoneNumberPhoneNumberCountryInstance struct for PricingV1PhoneNumberPhoneNumberCountryInstance

type PricingV1Voice

type PricingV1Voice struct {
	Links *map[string]interface{} `json:"links,omitempty"`
	Name  *string                 `json:"name,omitempty"`
	Url   *string                 `json:"url,omitempty"`
}

PricingV1Voice struct for PricingV1Voice

type PricingV1VoiceVoiceCountry

type PricingV1VoiceVoiceCountry struct {
	// The name of the country
	Country *string `json:"country,omitempty"`
	// The ISO country code
	IsoCountry *string `json:"iso_country,omitempty"`
	// The absolute URL of the resource
	Url *string `json:"url,omitempty"`
}

PricingV1VoiceVoiceCountry struct for PricingV1VoiceVoiceCountry

type PricingV1VoiceVoiceCountryInstance

type PricingV1VoiceVoiceCountryInstance struct {
	// The name of the country
	Country *string `json:"country,omitempty"`
	// The list of InboundCallPrice records
	InboundCallPrices *[]PricingV1MessagingMessagingCountryInstanceInboundSmsPrices `json:"inbound_call_prices,omitempty"`
	// The ISO country code
	IsoCountry *string `json:"iso_country,omitempty"`
	// The list of OutboundPrefixPrice records
	OutboundPrefixPrices *[]PricingV1VoiceVoiceCountryInstanceOutboundPrefixPrices `json:"outbound_prefix_prices,omitempty"`
	// The currency in which prices are measured, in ISO 4127 format (e.g. usd, eur, jpy)
	PriceUnit *string `json:"price_unit,omitempty"`
	// The absolute URL of the resource
	Url *string `json:"url,omitempty"`
}

PricingV1VoiceVoiceCountryInstance struct for PricingV1VoiceVoiceCountryInstance

type PricingV1VoiceVoiceCountryInstanceOutboundPrefixPrices

type PricingV1VoiceVoiceCountryInstanceOutboundPrefixPrices struct {
	BasePrice    float32  `json:"base_price,omitempty"`
	CurrentPrice float32  `json:"current_price,omitempty"`
	FriendlyName string   `json:"friendly_name,omitempty"`
	Prefixes     []string `json:"prefixes,omitempty"`
}

PricingV1VoiceVoiceCountryInstanceOutboundPrefixPrices struct for PricingV1VoiceVoiceCountryInstanceOutboundPrefixPrices

type PricingV1VoiceVoiceNumber

type PricingV1VoiceVoiceNumber struct {
	// The name of the country
	Country          *string                                    `json:"country,omitempty"`
	InboundCallPrice *PricingV1VoiceVoiceNumberInboundCallPrice `json:"inbound_call_price,omitempty"`
	// The ISO country code
	IsoCountry *string `json:"iso_country,omitempty"`
	// The phone number
	Number            *string                                     `json:"number,omitempty"`
	OutboundCallPrice *PricingV1VoiceVoiceNumberOutboundCallPrice `json:"outbound_call_price,omitempty"`
	// The currency in which prices are measured, in ISO 4127 format (e.g. usd, eur, jpy)
	PriceUnit *string `json:"price_unit,omitempty"`
	// The absolute URL of the resource
	Url *string `json:"url,omitempty"`
}

PricingV1VoiceVoiceNumber struct for PricingV1VoiceVoiceNumber

type PricingV1VoiceVoiceNumberInboundCallPrice

type PricingV1VoiceVoiceNumberInboundCallPrice struct {
	BasePrice    float32 `json:"base_price,omitempty"`
	CurrentPrice float32 `json:"current_price,omitempty"`
	NumberType   string  `json:"number_type,omitempty"`
}

PricingV1VoiceVoiceNumberInboundCallPrice The InboundCallPrice record

type PricingV1VoiceVoiceNumberOutboundCallPrice

type PricingV1VoiceVoiceNumberOutboundCallPrice struct {
	BasePrice    float32 `json:"base_price,omitempty"`
	CurrentPrice float32 `json:"current_price,omitempty"`
}

PricingV1VoiceVoiceNumberOutboundCallPrice The OutboundCallPrice record

Jump to

Keyboard shortcuts

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