openapi

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2021 License: MIT Imports: 6 Imported by: 1

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.1
  • 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://voice.twilio.com

Class Method HTTP request Description
DefaultApi CreateByocTrunk Post /v1/ByocTrunks
DefaultApi CreateConnectionPolicy Post /v1/ConnectionPolicies
DefaultApi CreateConnectionPolicyTarget Post /v1/ConnectionPolicies/{ConnectionPolicySid}/Targets
DefaultApi CreateDialingPermissionsCountryBulkUpdate Post /v1/DialingPermissions/BulkCountryUpdates
DefaultApi CreateIpRecord Post /v1/IpRecords
DefaultApi CreateSourceIpMapping Post /v1/SourceIpMappings
DefaultApi DeleteByocTrunk Delete /v1/ByocTrunks/{Sid}
DefaultApi DeleteConnectionPolicy Delete /v1/ConnectionPolicies/{Sid}
DefaultApi DeleteConnectionPolicyTarget Delete /v1/ConnectionPolicies/{ConnectionPolicySid}/Targets/{Sid}
DefaultApi DeleteIpRecord Delete /v1/IpRecords/{Sid}
DefaultApi DeleteSourceIpMapping Delete /v1/SourceIpMappings/{Sid}
DefaultApi FetchByocTrunk Get /v1/ByocTrunks/{Sid}
DefaultApi FetchConnectionPolicy Get /v1/ConnectionPolicies/{Sid}
DefaultApi FetchConnectionPolicyTarget Get /v1/ConnectionPolicies/{ConnectionPolicySid}/Targets/{Sid}
DefaultApi FetchDialingPermissionsCountry Get /v1/DialingPermissions/Countries/{IsoCode}
DefaultApi FetchDialingPermissionsSettings Get /v1/Settings
DefaultApi FetchIpRecord Get /v1/IpRecords/{Sid}
DefaultApi FetchSourceIpMapping Get /v1/SourceIpMappings/{Sid}
DefaultApi ListByocTrunk Get /v1/ByocTrunks
DefaultApi ListConnectionPolicy Get /v1/ConnectionPolicies
DefaultApi ListConnectionPolicyTarget Get /v1/ConnectionPolicies/{ConnectionPolicySid}/Targets
DefaultApi ListDialingPermissionsCountry Get /v1/DialingPermissions/Countries
DefaultApi ListDialingPermissionsHrsPrefixes Get /v1/DialingPermissions/Countries/{IsoCode}/HighRiskSpecialPrefixes
DefaultApi ListIpRecord Get /v1/IpRecords
DefaultApi ListSourceIpMapping Get /v1/SourceIpMappings
DefaultApi UpdateByocTrunk Post /v1/ByocTrunks/{Sid}
DefaultApi UpdateConnectionPolicy Post /v1/ConnectionPolicies/{Sid}
DefaultApi UpdateConnectionPolicyTarget Post /v1/ConnectionPolicies/{ConnectionPolicySid}/Targets/{Sid}
DefaultApi UpdateDialingPermissionsSettings Post /v1/Settings
DefaultApi UpdateIpRecord Post /v1/IpRecords/{Sid}
DefaultApi UpdateSourceIpMapping Post /v1/SourceIpMappings/{Sid}

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 CreateByocTrunkParams

type CreateByocTrunkParams struct {
	// Whether Caller ID Name (CNAM) lookup is enabled for the trunk. If enabled, all inbound calls to the BYOC Trunk from the United States and Canada automatically perform a CNAM Lookup and display Caller ID data on your phone. See [CNAM Lookups](https://www.twilio.com/docs/sip-trunking#CNAM) for more information.
	CnamLookupEnabled *bool `json:"CnamLookupEnabled,omitempty"`
	// The SID of the Connection Policy that Twilio will use when routing traffic to your communications infrastructure.
	ConnectionPolicySid *string `json:"ConnectionPolicySid,omitempty"`
	// A descriptive string that you create to describe the resource. It is not unique and can be up to 255 characters long.
	FriendlyName *string `json:"FriendlyName,omitempty"`
	// The SID of the SIP Domain that should be used in the `From` header of originating calls sent to your SIP infrastructure. If your SIP infrastructure allows users to \\\"call back\\\" an incoming call, configure this with a [SIP Domain](https://www.twilio.com/docs/voice/api/sending-sip) to ensure proper routing. If not configured, the from domain will default to \\\"sip.twilio.com\\\".
	FromDomainSid *string `json:"FromDomainSid,omitempty"`
	// The HTTP method we should use to call `status_callback_url`. Can be: `GET` or `POST`.
	StatusCallbackMethod *string `json:"StatusCallbackMethod,omitempty"`
	// The URL that we should call to pass status parameters (such as call ended) to your application.
	StatusCallbackUrl *string `json:"StatusCallbackUrl,omitempty"`
	// The HTTP method we should use to call `voice_fallback_url`. Can be: `GET` or `POST`.
	VoiceFallbackMethod *string `json:"VoiceFallbackMethod,omitempty"`
	// The URL that we should call when an error occurs while retrieving or executing the TwiML from `voice_url`.
	VoiceFallbackUrl *string `json:"VoiceFallbackUrl,omitempty"`
	// The HTTP method we should use to call `voice_url`. Can be: `GET` or `POST`.
	VoiceMethod *string `json:"VoiceMethod,omitempty"`
	// The URL we should call when the BYOC Trunk receives a call.
	VoiceUrl *string `json:"VoiceUrl,omitempty"`
}

Optional parameters for the method 'CreateByocTrunk'

func (*CreateByocTrunkParams) SetCnamLookupEnabled

func (params *CreateByocTrunkParams) SetCnamLookupEnabled(CnamLookupEnabled bool) *CreateByocTrunkParams

func (*CreateByocTrunkParams) SetConnectionPolicySid

func (params *CreateByocTrunkParams) SetConnectionPolicySid(ConnectionPolicySid string) *CreateByocTrunkParams

func (*CreateByocTrunkParams) SetFriendlyName

func (params *CreateByocTrunkParams) SetFriendlyName(FriendlyName string) *CreateByocTrunkParams

func (*CreateByocTrunkParams) SetFromDomainSid

func (params *CreateByocTrunkParams) SetFromDomainSid(FromDomainSid string) *CreateByocTrunkParams

func (*CreateByocTrunkParams) SetStatusCallbackMethod

func (params *CreateByocTrunkParams) SetStatusCallbackMethod(StatusCallbackMethod string) *CreateByocTrunkParams

func (*CreateByocTrunkParams) SetStatusCallbackUrl

func (params *CreateByocTrunkParams) SetStatusCallbackUrl(StatusCallbackUrl string) *CreateByocTrunkParams

func (*CreateByocTrunkParams) SetVoiceFallbackMethod

func (params *CreateByocTrunkParams) SetVoiceFallbackMethod(VoiceFallbackMethod string) *CreateByocTrunkParams

func (*CreateByocTrunkParams) SetVoiceFallbackUrl

func (params *CreateByocTrunkParams) SetVoiceFallbackUrl(VoiceFallbackUrl string) *CreateByocTrunkParams

func (*CreateByocTrunkParams) SetVoiceMethod

func (params *CreateByocTrunkParams) SetVoiceMethod(VoiceMethod string) *CreateByocTrunkParams

func (*CreateByocTrunkParams) SetVoiceUrl

func (params *CreateByocTrunkParams) SetVoiceUrl(VoiceUrl string) *CreateByocTrunkParams

type CreateConnectionPolicyParams

type CreateConnectionPolicyParams struct {
	// A descriptive string that you create to describe the resource. It is not unique and can be up to 255 characters long.
	FriendlyName *string `json:"FriendlyName,omitempty"`
}

Optional parameters for the method 'CreateConnectionPolicy'

func (*CreateConnectionPolicyParams) SetFriendlyName

func (params *CreateConnectionPolicyParams) SetFriendlyName(FriendlyName string) *CreateConnectionPolicyParams

type CreateConnectionPolicyTargetParams

type CreateConnectionPolicyTargetParams struct {
	// Whether the Target is enabled. The default is `true`.
	Enabled *bool `json:"Enabled,omitempty"`
	// A descriptive string that you create to describe the resource. It is not unique and can be up to 255 characters long.
	FriendlyName *string `json:"FriendlyName,omitempty"`
	// The relative importance of the target. Can be an integer from 0 to 65535, inclusive, and the default is 10. The lowest number represents the most important target.
	Priority *int32 `json:"Priority,omitempty"`
	// The SIP address you want Twilio to route your calls to. This must be a `sip:` schema. `sips` is NOT supported.
	Target *string `json:"Target,omitempty"`
	// The value that determines the relative share of the load the Target should receive compared to other Targets with the same priority. Can be an integer from 1 to 65535, inclusive, and the default is 10. Targets with higher values receive more load than those with lower ones with the same priority.
	Weight *int32 `json:"Weight,omitempty"`
}

Optional parameters for the method 'CreateConnectionPolicyTarget'

func (*CreateConnectionPolicyTargetParams) SetEnabled

func (*CreateConnectionPolicyTargetParams) SetFriendlyName

func (params *CreateConnectionPolicyTargetParams) SetFriendlyName(FriendlyName string) *CreateConnectionPolicyTargetParams

func (*CreateConnectionPolicyTargetParams) SetPriority

func (*CreateConnectionPolicyTargetParams) SetTarget

func (*CreateConnectionPolicyTargetParams) SetWeight

type CreateDialingPermissionsCountryBulkUpdateParams

type CreateDialingPermissionsCountryBulkUpdateParams struct {
	// URL encoded JSON array of update objects. example : `[ { \\\"iso_code\\\": \\\"GB\\\", \\\"low_risk_numbers_enabled\\\": \\\"true\\\", \\\"high_risk_special_numbers_enabled\\\":\\\"true\\\", \\\"high_risk_tollfraud_numbers_enabled\\\": \\\"false\\\" } ]`
	UpdateRequest *string `json:"UpdateRequest,omitempty"`
}

Optional parameters for the method 'CreateDialingPermissionsCountryBulkUpdate'

func (*CreateDialingPermissionsCountryBulkUpdateParams) SetUpdateRequest

type CreateIpRecordParams

type CreateIpRecordParams struct {
	// An integer representing the length of the [CIDR](https://tools.ietf.org/html/rfc4632) prefix to use with this IP address. By default the entire IP address is used, which for IPv4 is value 32.
	CidrPrefixLength *int32 `json:"CidrPrefixLength,omitempty"`
	// A descriptive string that you create to describe the resource. It is not unique and can be up to 255 characters long.
	FriendlyName *string `json:"FriendlyName,omitempty"`
	// An IP address in dotted decimal notation, IPv4 only.
	IpAddress *string `json:"IpAddress,omitempty"`
}

Optional parameters for the method 'CreateIpRecord'

func (*CreateIpRecordParams) SetCidrPrefixLength

func (params *CreateIpRecordParams) SetCidrPrefixLength(CidrPrefixLength int32) *CreateIpRecordParams

func (*CreateIpRecordParams) SetFriendlyName

func (params *CreateIpRecordParams) SetFriendlyName(FriendlyName string) *CreateIpRecordParams

func (*CreateIpRecordParams) SetIpAddress

func (params *CreateIpRecordParams) SetIpAddress(IpAddress string) *CreateIpRecordParams

type CreateSourceIpMappingParams

type CreateSourceIpMappingParams struct {
	// The Twilio-provided string that uniquely identifies the IP Record resource to map from.
	IpRecordSid *string `json:"IpRecordSid,omitempty"`
	// The SID of the SIP Domain that the IP Record should be mapped to.
	SipDomainSid *string `json:"SipDomainSid,omitempty"`
}

Optional parameters for the method 'CreateSourceIpMapping'

func (*CreateSourceIpMappingParams) SetIpRecordSid

func (params *CreateSourceIpMappingParams) SetIpRecordSid(IpRecordSid string) *CreateSourceIpMappingParams

func (*CreateSourceIpMappingParams) SetSipDomainSid

func (params *CreateSourceIpMappingParams) SetSipDomainSid(SipDomainSid string) *CreateSourceIpMappingParams

type DefaultApiService

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

func NewDefaultApiService

func NewDefaultApiService(requestHandler *twilio.RequestHandler) *DefaultApiService

func NewDefaultApiServiceWithClient added in v0.9.0

func NewDefaultApiServiceWithClient(client twilio.BaseClient) *DefaultApiService

func (*DefaultApiService) CreateByocTrunk

func (c *DefaultApiService) CreateByocTrunk(params *CreateByocTrunkParams) (*VoiceV1ByocTrunk, error)

func (*DefaultApiService) CreateConnectionPolicy

func (c *DefaultApiService) CreateConnectionPolicy(params *CreateConnectionPolicyParams) (*VoiceV1ConnectionPolicy, error)

func (*DefaultApiService) CreateConnectionPolicyTarget

func (c *DefaultApiService) CreateConnectionPolicyTarget(ConnectionPolicySid string, params *CreateConnectionPolicyTargetParams) (*VoiceV1ConnectionPolicyConnectionPolicyTarget, error)

func (*DefaultApiService) CreateDialingPermissionsCountryBulkUpdate

Create a bulk update request to change voice dialing country permissions of one or more countries identified by the corresponding [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)

func (*DefaultApiService) CreateIpRecord

func (c *DefaultApiService) CreateIpRecord(params *CreateIpRecordParams) (*VoiceV1IpRecord, error)

func (*DefaultApiService) CreateSourceIpMapping

func (c *DefaultApiService) CreateSourceIpMapping(params *CreateSourceIpMappingParams) (*VoiceV1SourceIpMapping, error)

func (*DefaultApiService) DeleteByocTrunk

func (c *DefaultApiService) DeleteByocTrunk(Sid string) error

func (*DefaultApiService) DeleteConnectionPolicy

func (c *DefaultApiService) DeleteConnectionPolicy(Sid string) error

func (*DefaultApiService) DeleteConnectionPolicyTarget

func (c *DefaultApiService) DeleteConnectionPolicyTarget(ConnectionPolicySid string, Sid string) error

func (*DefaultApiService) DeleteIpRecord

func (c *DefaultApiService) DeleteIpRecord(Sid string) error

func (*DefaultApiService) DeleteSourceIpMapping

func (c *DefaultApiService) DeleteSourceIpMapping(Sid string) error

func (*DefaultApiService) FetchByocTrunk

func (c *DefaultApiService) FetchByocTrunk(Sid string) (*VoiceV1ByocTrunk, error)

func (*DefaultApiService) FetchConnectionPolicy

func (c *DefaultApiService) FetchConnectionPolicy(Sid string) (*VoiceV1ConnectionPolicy, error)

func (*DefaultApiService) FetchConnectionPolicyTarget

func (c *DefaultApiService) FetchConnectionPolicyTarget(ConnectionPolicySid string, Sid string) (*VoiceV1ConnectionPolicyConnectionPolicyTarget, error)

func (*DefaultApiService) FetchDialingPermissionsCountry

func (c *DefaultApiService) FetchDialingPermissionsCountry(IsoCode string) (*VoiceV1DialingPermissionsDialingPermissionsCountryInstance, error)

Retrieve voice dialing country permissions identified by the given ISO country code

func (*DefaultApiService) FetchDialingPermissionsSettings

func (c *DefaultApiService) FetchDialingPermissionsSettings() (*VoiceV1DialingPermissionsDialingPermissionsSettings, error)

Retrieve voice dialing permissions inheritance for the sub-account

func (*DefaultApiService) FetchIpRecord

func (c *DefaultApiService) FetchIpRecord(Sid string) (*VoiceV1IpRecord, error)

func (*DefaultApiService) FetchSourceIpMapping

func (c *DefaultApiService) FetchSourceIpMapping(Sid string) (*VoiceV1SourceIpMapping, error)

func (*DefaultApiService) ListByocTrunk

func (c *DefaultApiService) ListByocTrunk(params *ListByocTrunkParams) (*ListByocTrunkResponse, error)

func (*DefaultApiService) ListConnectionPolicy

func (*DefaultApiService) ListConnectionPolicyTarget

func (c *DefaultApiService) ListConnectionPolicyTarget(ConnectionPolicySid string, params *ListConnectionPolicyTargetParams) (*ListConnectionPolicyTargetResponse, error)

func (*DefaultApiService) ListDialingPermissionsCountry

Retrieve all voice dialing country permissions for this account

func (*DefaultApiService) ListDialingPermissionsHrsPrefixes

func (c *DefaultApiService) ListDialingPermissionsHrsPrefixes(IsoCode string, params *ListDialingPermissionsHrsPrefixesParams) (*ListDialingPermissionsHrsPrefixesResponse, error)

Fetch the high-risk special services prefixes from the country resource corresponding to the [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)

func (*DefaultApiService) ListIpRecord

func (c *DefaultApiService) ListIpRecord(params *ListIpRecordParams) (*ListIpRecordResponse, error)

func (*DefaultApiService) ListSourceIpMapping

func (*DefaultApiService) UpdateByocTrunk

func (c *DefaultApiService) UpdateByocTrunk(Sid string, params *UpdateByocTrunkParams) (*VoiceV1ByocTrunk, error)

func (*DefaultApiService) UpdateConnectionPolicy

func (c *DefaultApiService) UpdateConnectionPolicy(Sid string, params *UpdateConnectionPolicyParams) (*VoiceV1ConnectionPolicy, error)

func (*DefaultApiService) UpdateConnectionPolicyTarget

func (c *DefaultApiService) UpdateConnectionPolicyTarget(ConnectionPolicySid string, Sid string, params *UpdateConnectionPolicyTargetParams) (*VoiceV1ConnectionPolicyConnectionPolicyTarget, error)

func (*DefaultApiService) UpdateDialingPermissionsSettings

Update voice dialing permissions inheritance for the sub-account

func (*DefaultApiService) UpdateIpRecord

func (c *DefaultApiService) UpdateIpRecord(Sid string, params *UpdateIpRecordParams) (*VoiceV1IpRecord, error)

func (*DefaultApiService) UpdateSourceIpMapping

func (c *DefaultApiService) UpdateSourceIpMapping(Sid string, params *UpdateSourceIpMappingParams) (*VoiceV1SourceIpMapping, error)

type ListByocTrunkParams

type ListByocTrunkParams 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 'ListByocTrunk'

func (*ListByocTrunkParams) SetPageSize

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

type ListByocTrunkResponse

type ListByocTrunkResponse struct {
	ByocTrunks []VoiceV1ByocTrunk        `json:"byoc_trunks,omitempty"`
	Meta       ListByocTrunkResponseMeta `json:"meta,omitempty"`
}

ListByocTrunkResponse struct for ListByocTrunkResponse

type ListByocTrunkResponseMeta

type ListByocTrunkResponseMeta 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"`
}

ListByocTrunkResponseMeta struct for ListByocTrunkResponseMeta

type ListConnectionPolicyParams

type ListConnectionPolicyParams 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 'ListConnectionPolicy'

func (*ListConnectionPolicyParams) SetPageSize

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

type ListConnectionPolicyResponse

type ListConnectionPolicyResponse struct {
	ConnectionPolicies []VoiceV1ConnectionPolicy `json:"connection_policies,omitempty"`
	Meta               ListByocTrunkResponseMeta `json:"meta,omitempty"`
}

ListConnectionPolicyResponse struct for ListConnectionPolicyResponse

type ListConnectionPolicyTargetParams

type ListConnectionPolicyTargetParams 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 'ListConnectionPolicyTarget'

func (*ListConnectionPolicyTargetParams) SetPageSize

type ListConnectionPolicyTargetResponse

type ListConnectionPolicyTargetResponse struct {
	Meta    ListByocTrunkResponseMeta                       `json:"meta,omitempty"`
	Targets []VoiceV1ConnectionPolicyConnectionPolicyTarget `json:"targets,omitempty"`
}

ListConnectionPolicyTargetResponse struct for ListConnectionPolicyTargetResponse

type ListDialingPermissionsCountryParams

type ListDialingPermissionsCountryParams struct {
	// Filter to retrieve the country permissions by specifying the [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)
	IsoCode *string `json:"IsoCode,omitempty"`
	// Filter to retrieve the country permissions by specifying the continent
	Continent *string `json:"Continent,omitempty"`
	// Filter the results by specified [country codes](https://www.itu.int/itudoc/itu-t/ob-lists/icc/e164_763.html)
	CountryCode *string `json:"CountryCode,omitempty"`
	// Filter to retrieve the country permissions with dialing to low-risk numbers enabled. Can be: `true` or `false`.
	LowRiskNumbersEnabled *bool `json:"LowRiskNumbersEnabled,omitempty"`
	// Filter to retrieve the country permissions with dialing to high-risk special service numbers enabled. Can be: `true` or `false`
	HighRiskSpecialNumbersEnabled *bool `json:"HighRiskSpecialNumbersEnabled,omitempty"`
	// Filter to retrieve the country permissions with dialing to high-risk [toll fraud](https://www.twilio.com/learn/voice-and-video/toll-fraud) numbers enabled. Can be: `true` or `false`.
	HighRiskTollfraudNumbersEnabled *bool `json:"HighRiskTollfraudNumbersEnabled,omitempty"`
	// 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 'ListDialingPermissionsCountry'

func (*ListDialingPermissionsCountryParams) SetContinent

func (*ListDialingPermissionsCountryParams) SetCountryCode

func (*ListDialingPermissionsCountryParams) SetHighRiskSpecialNumbersEnabled

func (params *ListDialingPermissionsCountryParams) SetHighRiskSpecialNumbersEnabled(HighRiskSpecialNumbersEnabled bool) *ListDialingPermissionsCountryParams

func (*ListDialingPermissionsCountryParams) SetHighRiskTollfraudNumbersEnabled

func (params *ListDialingPermissionsCountryParams) SetHighRiskTollfraudNumbersEnabled(HighRiskTollfraudNumbersEnabled bool) *ListDialingPermissionsCountryParams

func (*ListDialingPermissionsCountryParams) SetIsoCode

func (*ListDialingPermissionsCountryParams) SetLowRiskNumbersEnabled

func (params *ListDialingPermissionsCountryParams) SetLowRiskNumbersEnabled(LowRiskNumbersEnabled bool) *ListDialingPermissionsCountryParams

func (*ListDialingPermissionsCountryParams) SetPageSize

type ListDialingPermissionsCountryResponse

type ListDialingPermissionsCountryResponse struct {
	Content []VoiceV1DialingPermissionsDialingPermissionsCountry `json:"content,omitempty"`
	Meta    ListByocTrunkResponseMeta                            `json:"meta,omitempty"`
}

ListDialingPermissionsCountryResponse struct for ListDialingPermissionsCountryResponse

type ListDialingPermissionsHrsPrefixesParams

type ListDialingPermissionsHrsPrefixesParams 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 'ListDialingPermissionsHrsPrefixes'

func (*ListDialingPermissionsHrsPrefixesParams) SetPageSize

type ListDialingPermissionsHrsPrefixesResponse

type ListDialingPermissionsHrsPrefixesResponse struct {
	Content []VoiceV1DialingPermissionsDialingPermissionsCountryDialingPermissionsHrsPrefixes `json:"content,omitempty"`
	Meta    ListByocTrunkResponseMeta                                                         `json:"meta,omitempty"`
}

ListDialingPermissionsHrsPrefixesResponse struct for ListDialingPermissionsHrsPrefixesResponse

type ListIpRecordParams

type ListIpRecordParams 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 'ListIpRecord'

func (*ListIpRecordParams) SetPageSize

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

type ListIpRecordResponse

type ListIpRecordResponse struct {
	IpRecords []VoiceV1IpRecord         `json:"ip_records,omitempty"`
	Meta      ListByocTrunkResponseMeta `json:"meta,omitempty"`
}

ListIpRecordResponse struct for ListIpRecordResponse

type ListSourceIpMappingParams

type ListSourceIpMappingParams 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 'ListSourceIpMapping'

func (*ListSourceIpMappingParams) SetPageSize

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

type ListSourceIpMappingResponse

type ListSourceIpMappingResponse struct {
	Meta             ListByocTrunkResponseMeta `json:"meta,omitempty"`
	SourceIpMappings []VoiceV1SourceIpMapping  `json:"source_ip_mappings,omitempty"`
}

ListSourceIpMappingResponse struct for ListSourceIpMappingResponse

type UpdateByocTrunkParams

type UpdateByocTrunkParams struct {
	// Whether Caller ID Name (CNAM) lookup is enabled for the trunk. If enabled, all inbound calls to the BYOC Trunk from the United States and Canada automatically perform a CNAM Lookup and display Caller ID data on your phone. See [CNAM Lookups](https://www.twilio.com/docs/sip-trunking#CNAM) for more information.
	CnamLookupEnabled *bool `json:"CnamLookupEnabled,omitempty"`
	// The SID of the Connection Policy that Twilio will use when routing traffic to your communications infrastructure.
	ConnectionPolicySid *string `json:"ConnectionPolicySid,omitempty"`
	// A descriptive string that you create to describe the resource. It is not unique and can be up to 255 characters long.
	FriendlyName *string `json:"FriendlyName,omitempty"`
	// The SID of the SIP Domain that should be used in the `From` header of originating calls sent to your SIP infrastructure. If your SIP infrastructure allows users to \\\"call back\\\" an incoming call, configure this with a [SIP Domain](https://www.twilio.com/docs/voice/api/sending-sip) to ensure proper routing. If not configured, the from domain will default to \\\"sip.twilio.com\\\".
	FromDomainSid *string `json:"FromDomainSid,omitempty"`
	// The HTTP method we should use to call `status_callback_url`. Can be: `GET` or `POST`.
	StatusCallbackMethod *string `json:"StatusCallbackMethod,omitempty"`
	// The URL that we should call to pass status parameters (such as call ended) to your application.
	StatusCallbackUrl *string `json:"StatusCallbackUrl,omitempty"`
	// The HTTP method we should use to call `voice_fallback_url`. Can be: `GET` or `POST`.
	VoiceFallbackMethod *string `json:"VoiceFallbackMethod,omitempty"`
	// The URL that we should call when an error occurs while retrieving or executing the TwiML requested by `voice_url`.
	VoiceFallbackUrl *string `json:"VoiceFallbackUrl,omitempty"`
	// The HTTP method we should use to call `voice_url`
	VoiceMethod *string `json:"VoiceMethod,omitempty"`
	// The URL we should call when the BYOC Trunk receives a call.
	VoiceUrl *string `json:"VoiceUrl,omitempty"`
}

Optional parameters for the method 'UpdateByocTrunk'

func (*UpdateByocTrunkParams) SetCnamLookupEnabled

func (params *UpdateByocTrunkParams) SetCnamLookupEnabled(CnamLookupEnabled bool) *UpdateByocTrunkParams

func (*UpdateByocTrunkParams) SetConnectionPolicySid

func (params *UpdateByocTrunkParams) SetConnectionPolicySid(ConnectionPolicySid string) *UpdateByocTrunkParams

func (*UpdateByocTrunkParams) SetFriendlyName

func (params *UpdateByocTrunkParams) SetFriendlyName(FriendlyName string) *UpdateByocTrunkParams

func (*UpdateByocTrunkParams) SetFromDomainSid

func (params *UpdateByocTrunkParams) SetFromDomainSid(FromDomainSid string) *UpdateByocTrunkParams

func (*UpdateByocTrunkParams) SetStatusCallbackMethod

func (params *UpdateByocTrunkParams) SetStatusCallbackMethod(StatusCallbackMethod string) *UpdateByocTrunkParams

func (*UpdateByocTrunkParams) SetStatusCallbackUrl

func (params *UpdateByocTrunkParams) SetStatusCallbackUrl(StatusCallbackUrl string) *UpdateByocTrunkParams

func (*UpdateByocTrunkParams) SetVoiceFallbackMethod

func (params *UpdateByocTrunkParams) SetVoiceFallbackMethod(VoiceFallbackMethod string) *UpdateByocTrunkParams

func (*UpdateByocTrunkParams) SetVoiceFallbackUrl

func (params *UpdateByocTrunkParams) SetVoiceFallbackUrl(VoiceFallbackUrl string) *UpdateByocTrunkParams

func (*UpdateByocTrunkParams) SetVoiceMethod

func (params *UpdateByocTrunkParams) SetVoiceMethod(VoiceMethod string) *UpdateByocTrunkParams

func (*UpdateByocTrunkParams) SetVoiceUrl

func (params *UpdateByocTrunkParams) SetVoiceUrl(VoiceUrl string) *UpdateByocTrunkParams

type UpdateConnectionPolicyParams

type UpdateConnectionPolicyParams struct {
	// A descriptive string that you create to describe the resource. It is not unique and can be up to 255 characters long.
	FriendlyName *string `json:"FriendlyName,omitempty"`
}

Optional parameters for the method 'UpdateConnectionPolicy'

func (*UpdateConnectionPolicyParams) SetFriendlyName

func (params *UpdateConnectionPolicyParams) SetFriendlyName(FriendlyName string) *UpdateConnectionPolicyParams

type UpdateConnectionPolicyTargetParams

type UpdateConnectionPolicyTargetParams struct {
	// Whether the Target is enabled.
	Enabled *bool `json:"Enabled,omitempty"`
	// A descriptive string that you create to describe the resource. It is not unique and can be up to 255 characters long.
	FriendlyName *string `json:"FriendlyName,omitempty"`
	// The relative importance of the target. Can be an integer from 0 to 65535, inclusive. The lowest number represents the most important target.
	Priority *int32 `json:"Priority,omitempty"`
	// The SIP address you want Twilio to route your calls to. This must be a `sip:` schema. `sips` is NOT supported.
	Target *string `json:"Target,omitempty"`
	// The value that determines the relative share of the load the Target should receive compared to other Targets with the same priority. Can be an integer from 1 to 65535, inclusive. Targets with higher values receive more load than those with lower ones with the same priority.
	Weight *int32 `json:"Weight,omitempty"`
}

Optional parameters for the method 'UpdateConnectionPolicyTarget'

func (*UpdateConnectionPolicyTargetParams) SetEnabled

func (*UpdateConnectionPolicyTargetParams) SetFriendlyName

func (params *UpdateConnectionPolicyTargetParams) SetFriendlyName(FriendlyName string) *UpdateConnectionPolicyTargetParams

func (*UpdateConnectionPolicyTargetParams) SetPriority

func (*UpdateConnectionPolicyTargetParams) SetTarget

func (*UpdateConnectionPolicyTargetParams) SetWeight

type UpdateDialingPermissionsSettingsParams

type UpdateDialingPermissionsSettingsParams struct {
	// `true` for the sub-account to inherit voice dialing permissions from the Master Project; otherwise `false`.
	DialingPermissionsInheritance *bool `json:"DialingPermissionsInheritance,omitempty"`
}

Optional parameters for the method 'UpdateDialingPermissionsSettings'

func (*UpdateDialingPermissionsSettingsParams) SetDialingPermissionsInheritance

func (params *UpdateDialingPermissionsSettingsParams) SetDialingPermissionsInheritance(DialingPermissionsInheritance bool) *UpdateDialingPermissionsSettingsParams

type UpdateIpRecordParams

type UpdateIpRecordParams struct {
	// A descriptive string that you create to describe the resource. It is not unique and can be up to 255 characters long.
	FriendlyName *string `json:"FriendlyName,omitempty"`
}

Optional parameters for the method 'UpdateIpRecord'

func (*UpdateIpRecordParams) SetFriendlyName

func (params *UpdateIpRecordParams) SetFriendlyName(FriendlyName string) *UpdateIpRecordParams

type UpdateSourceIpMappingParams

type UpdateSourceIpMappingParams struct {
	// The SID of the SIP Domain that the IP Record should be mapped to.
	SipDomainSid *string `json:"SipDomainSid,omitempty"`
}

Optional parameters for the method 'UpdateSourceIpMapping'

func (*UpdateSourceIpMappingParams) SetSipDomainSid

func (params *UpdateSourceIpMappingParams) SetSipDomainSid(SipDomainSid string) *UpdateSourceIpMappingParams

type VoiceV1ByocTrunk

type VoiceV1ByocTrunk struct {
	// The SID of the Account that created the resource
	AccountSid *string `json:"account_sid,omitempty"`
	// Whether Caller ID Name (CNAM) lookup is enabled for the trunk
	CnamLookupEnabled *bool `json:"cnam_lookup_enabled,omitempty"`
	// Origination Connection Policy (to your Carrier)
	ConnectionPolicySid *string `json:"connection_policy_sid,omitempty"`
	// The RFC 2822 date and time in GMT that the resource was created
	DateCreated *time.Time `json:"date_created,omitempty"`
	// The RFC 2822 date and time in GMT that the resource was last updated
	DateUpdated *time.Time `json:"date_updated,omitempty"`
	// The string that you assigned to describe the resource
	FriendlyName *string `json:"friendly_name,omitempty"`
	// The SID of the SIP Domain that should be used in the `From` header of originating calls
	FromDomainSid *string `json:"from_domain_sid,omitempty"`
	// The unique string that identifies the resource
	Sid *string `json:"sid,omitempty"`
	// The HTTP method we use to call status_callback_url
	StatusCallbackMethod *string `json:"status_callback_method,omitempty"`
	// The URL that we call with status updates
	StatusCallbackUrl *string `json:"status_callback_url,omitempty"`
	// The absolute URL of the resource
	Url *string `json:"url,omitempty"`
	// The HTTP method used with voice_fallback_url
	VoiceFallbackMethod *string `json:"voice_fallback_method,omitempty"`
	// The URL we call when an error occurs while executing TwiML
	VoiceFallbackUrl *string `json:"voice_fallback_url,omitempty"`
	// The HTTP method to use with voice_url
	VoiceMethod *string `json:"voice_method,omitempty"`
	// The URL we call when receiving a call
	VoiceUrl *string `json:"voice_url,omitempty"`
}

VoiceV1ByocTrunk struct for VoiceV1ByocTrunk

type VoiceV1ConnectionPolicy

type VoiceV1ConnectionPolicy struct {
	// The SID of the Account that created the resource
	AccountSid *string `json:"account_sid,omitempty"`
	// The RFC 2822 date and time in GMT when the resource was created
	DateCreated *time.Time `json:"date_created,omitempty"`
	// The RFC 2822 date and time in GMT when the resource was last updated
	DateUpdated *time.Time `json:"date_updated,omitempty"`
	// The string that you assigned to describe the resource
	FriendlyName *string `json:"friendly_name,omitempty"`
	// The URLs of related resources
	Links *map[string]interface{} `json:"links,omitempty"`
	// The unique string that identifies the resource
	Sid *string `json:"sid,omitempty"`
	// The absolute URL of the resource
	Url *string `json:"url,omitempty"`
}

VoiceV1ConnectionPolicy struct for VoiceV1ConnectionPolicy

type VoiceV1ConnectionPolicyConnectionPolicyTarget

type VoiceV1ConnectionPolicyConnectionPolicyTarget struct {
	// The SID of the Account that created the resource
	AccountSid *string `json:"account_sid,omitempty"`
	// The SID of the Connection Policy that owns the Target
	ConnectionPolicySid *string `json:"connection_policy_sid,omitempty"`
	// The RFC 2822 date and time in GMT when the resource was created
	DateCreated *time.Time `json:"date_created,omitempty"`
	// The RFC 2822 date and time in GMT when the resource was last updated
	DateUpdated *time.Time `json:"date_updated,omitempty"`
	// Whether the target is enabled
	Enabled *bool `json:"enabled,omitempty"`
	// The string that you assigned to describe the resource
	FriendlyName *string `json:"friendly_name,omitempty"`
	// The relative importance of the target
	Priority *int32 `json:"priority,omitempty"`
	// The unique string that identifies the resource
	Sid *string `json:"sid,omitempty"`
	// The SIP address you want Twilio to route your calls to
	Target *string `json:"target,omitempty"`
	// The absolute URL of the resource
	Url *string `json:"url,omitempty"`
	// The value that determines the relative load the Target should receive compared to others with the same priority
	Weight *int32 `json:"weight,omitempty"`
}

VoiceV1ConnectionPolicyConnectionPolicyTarget struct for VoiceV1ConnectionPolicyConnectionPolicyTarget

type VoiceV1DialingPermissionsDialingPermissionsCountry

type VoiceV1DialingPermissionsDialingPermissionsCountry struct {
	// The name of the continent in which the country is located
	Continent *string `json:"continent,omitempty"`
	// The E.164 assigned country codes(s)
	CountryCodes *[]string `json:"country_codes,omitempty"`
	// Whether dialing to high-risk special services numbers is enabled
	HighRiskSpecialNumbersEnabled *bool `json:"high_risk_special_numbers_enabled,omitempty"`
	// Whether dialing to high-risk toll fraud numbers is enabled, else `false`
	HighRiskTollfraudNumbersEnabled *bool `json:"high_risk_tollfraud_numbers_enabled,omitempty"`
	// The ISO country code
	IsoCode *string `json:"iso_code,omitempty"`
	// A list of URLs related to this resource
	Links *map[string]interface{} `json:"links,omitempty"`
	// Whether dialing to low-risk numbers is enabled
	LowRiskNumbersEnabled *bool `json:"low_risk_numbers_enabled,omitempty"`
	// The name of the country
	Name *string `json:"name,omitempty"`
	// The absolute URL of this resource
	Url *string `json:"url,omitempty"`
}

VoiceV1DialingPermissionsDialingPermissionsCountry struct for VoiceV1DialingPermissionsDialingPermissionsCountry

type VoiceV1DialingPermissionsDialingPermissionsCountryBulkUpdate

type VoiceV1DialingPermissionsDialingPermissionsCountryBulkUpdate struct {
	// The number of countries updated
	UpdateCount *int32 `json:"update_count,omitempty"`
	// A URL encoded JSON array of update objects
	UpdateRequest *string `json:"update_request,omitempty"`
}

VoiceV1DialingPermissionsDialingPermissionsCountryBulkUpdate struct for VoiceV1DialingPermissionsDialingPermissionsCountryBulkUpdate

type VoiceV1DialingPermissionsDialingPermissionsCountryDialingPermissionsHrsPrefixes

type VoiceV1DialingPermissionsDialingPermissionsCountryDialingPermissionsHrsPrefixes struct {
	// A prefix that includes the E.164 assigned country code
	Prefix *string `json:"prefix,omitempty"`
}

VoiceV1DialingPermissionsDialingPermissionsCountryDialingPermissionsHrsPrefixes struct for VoiceV1DialingPermissionsDialingPermissionsCountryDialingPermissionsHrsPrefixes

type VoiceV1DialingPermissionsDialingPermissionsCountryInstance

type VoiceV1DialingPermissionsDialingPermissionsCountryInstance struct {
	// The name of the continent in which the country is located
	Continent *string `json:"continent,omitempty"`
	// The E.164 assigned country codes(s)
	CountryCodes *[]string `json:"country_codes,omitempty"`
	// Whether dialing to high-risk special services numbers is enabled
	HighRiskSpecialNumbersEnabled *bool `json:"high_risk_special_numbers_enabled,omitempty"`
	// Whether dialing to high-risk toll fraud numbers is enabled, else `false`
	HighRiskTollfraudNumbersEnabled *bool `json:"high_risk_tollfraud_numbers_enabled,omitempty"`
	// The ISO country code
	IsoCode *string `json:"iso_code,omitempty"`
	// A list of URLs related to this resource
	Links *map[string]interface{} `json:"links,omitempty"`
	// Whether dialing to low-risk numbers is enabled
	LowRiskNumbersEnabled *bool `json:"low_risk_numbers_enabled,omitempty"`
	// The name of the country
	Name *string `json:"name,omitempty"`
	// The absolute URL of this resource
	Url *string `json:"url,omitempty"`
}

VoiceV1DialingPermissionsDialingPermissionsCountryInstance struct for VoiceV1DialingPermissionsDialingPermissionsCountryInstance

type VoiceV1DialingPermissionsDialingPermissionsSettings

type VoiceV1DialingPermissionsDialingPermissionsSettings struct {
	// `true` if the sub-account will inherit voice dialing permissions from the Master Project; otherwise `false`
	DialingPermissionsInheritance *bool `json:"dialing_permissions_inheritance,omitempty"`
	// The absolute URL of this resource
	Url *string `json:"url,omitempty"`
}

VoiceV1DialingPermissionsDialingPermissionsSettings struct for VoiceV1DialingPermissionsDialingPermissionsSettings

type VoiceV1IpRecord

type VoiceV1IpRecord struct {
	// The SID of the Account that created the resource
	AccountSid *string `json:"account_sid,omitempty"`
	// An integer representing the length of the [CIDR](https://tools.ietf.org/html/rfc4632) prefix to use with this IP address. By default the entire IP address is used, which for IPv4 is value 32.
	CidrPrefixLength *int32 `json:"cidr_prefix_length,omitempty"`
	// The RFC 2822 date and time in GMT that the resource was created
	DateCreated *time.Time `json:"date_created,omitempty"`
	// The RFC 2822 date and time in GMT that the resource was last updated
	DateUpdated *time.Time `json:"date_updated,omitempty"`
	// The string that you assigned to describe the resource
	FriendlyName *string `json:"friendly_name,omitempty"`
	// An IP address in dotted decimal notation, IPv4 only.
	IpAddress *string `json:"ip_address,omitempty"`
	// The unique string that identifies the resource
	Sid *string `json:"sid,omitempty"`
	// The absolute URL of the resource
	Url *string `json:"url,omitempty"`
}

VoiceV1IpRecord struct for VoiceV1IpRecord

type VoiceV1SourceIpMapping

type VoiceV1SourceIpMapping struct {
	// The RFC 2822 date and time in GMT that the resource was created
	DateCreated *time.Time `json:"date_created,omitempty"`
	// The RFC 2822 date and time in GMT that the resource was last updated
	DateUpdated *time.Time `json:"date_updated,omitempty"`
	// The unique string that identifies an IP Record
	IpRecordSid *string `json:"ip_record_sid,omitempty"`
	// The unique string that identifies the resource
	Sid *string `json:"sid,omitempty"`
	// The unique string that identifies a SIP Domain
	SipDomainSid *string `json:"sip_domain_sid,omitempty"`
	// The absolute URL of the resource
	Url *string `json:"url,omitempty"`
}

VoiceV1SourceIpMapping struct for VoiceV1SourceIpMapping

Jump to

Keyboard shortcuts

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