openapi

package
v0.0.0-...-e041b52 Latest Latest
Warning

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

Go to latest
Published: Jan 20, 2024 License: MIT Imports: 6 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.52.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://proxy.twilio.com

Class Method HTTP request Description
ServicesApi CreateService Post /v1/Services
ServicesApi DeleteService Delete /v1/Services/{Sid}
ServicesApi FetchService Get /v1/Services/{Sid}
ServicesApi ListService Get /v1/Services
ServicesApi UpdateService Post /v1/Services/{Sid}
ServicesPhoneNumbersApi CreatePhoneNumber Post /v1/Services/{ServiceSid}/PhoneNumbers
ServicesPhoneNumbersApi DeletePhoneNumber Delete /v1/Services/{ServiceSid}/PhoneNumbers/{Sid}
ServicesPhoneNumbersApi FetchPhoneNumber Get /v1/Services/{ServiceSid}/PhoneNumbers/{Sid}
ServicesPhoneNumbersApi ListPhoneNumber Get /v1/Services/{ServiceSid}/PhoneNumbers
ServicesPhoneNumbersApi UpdatePhoneNumber Post /v1/Services/{ServiceSid}/PhoneNumbers/{Sid}
ServicesSessionsApi CreateSession Post /v1/Services/{ServiceSid}/Sessions
ServicesSessionsApi DeleteSession Delete /v1/Services/{ServiceSid}/Sessions/{Sid}
ServicesSessionsApi FetchSession Get /v1/Services/{ServiceSid}/Sessions/{Sid}
ServicesSessionsApi ListSession Get /v1/Services/{ServiceSid}/Sessions
ServicesSessionsApi UpdateSession Post /v1/Services/{ServiceSid}/Sessions/{Sid}
ServicesSessionsInteractionsApi DeleteInteraction Delete /v1/Services/{ServiceSid}/Sessions/{SessionSid}/Interactions/{Sid}
ServicesSessionsInteractionsApi FetchInteraction Get /v1/Services/{ServiceSid}/Sessions/{SessionSid}/Interactions/{Sid}
ServicesSessionsInteractionsApi ListInteraction Get /v1/Services/{ServiceSid}/Sessions/{SessionSid}/Interactions
ServicesSessionsParticipantsApi CreateParticipant Post /v1/Services/{ServiceSid}/Sessions/{SessionSid}/Participants
ServicesSessionsParticipantsApi DeleteParticipant Delete /v1/Services/{ServiceSid}/Sessions/{SessionSid}/Participants/{Sid}
ServicesSessionsParticipantsApi FetchParticipant Get /v1/Services/{ServiceSid}/Sessions/{SessionSid}/Participants/{Sid}
ServicesSessionsParticipantsApi ListParticipant Get /v1/Services/{ServiceSid}/Sessions/{SessionSid}/Participants
ServicesSessionsParticipantsMessageInteractionsApi CreateMessageInteraction Post /v1/Services/{ServiceSid}/Sessions/{SessionSid}/Participants/{ParticipantSid}/MessageInteractions
ServicesSessionsParticipantsMessageInteractionsApi FetchMessageInteraction Get /v1/Services/{ServiceSid}/Sessions/{SessionSid}/Participants/{ParticipantSid}/MessageInteractions/{Sid}
ServicesSessionsParticipantsMessageInteractionsApi ListMessageInteraction Get /v1/Services/{ServiceSid}/Sessions/{SessionSid}/Participants/{ParticipantSid}/MessageInteractions
ServicesShortCodesApi CreateShortCode Post /v1/Services/{ServiceSid}/ShortCodes
ServicesShortCodesApi DeleteShortCode Delete /v1/Services/{ServiceSid}/ShortCodes/{Sid}
ServicesShortCodesApi FetchShortCode Get /v1/Services/{ServiceSid}/ShortCodes/{Sid}
ServicesShortCodesApi ListShortCode Get /v1/Services/{ServiceSid}/ShortCodes
ServicesShortCodesApi UpdateShortCode Post /v1/Services/{ServiceSid}/ShortCodes/{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)

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) CreateMessageInteraction

func (c *ApiService) CreateMessageInteraction(ServiceSid string, SessionSid string, ParticipantSid string, params *CreateMessageInteractionParams) (*ProxyV1MessageInteraction, error)

Create a new message Interaction to send directly from your system to one [Participant](https://www.twilio.com/docs/proxy/api/participant). The `inbound` properties for the Interaction will always be empty.

func (*ApiService) CreateParticipant

func (c *ApiService) CreateParticipant(ServiceSid string, SessionSid string, params *CreateParticipantParams) (*ProxyV1Participant, error)

Add a new Participant to the Session

func (*ApiService) CreatePhoneNumber

func (c *ApiService) CreatePhoneNumber(ServiceSid string, params *CreatePhoneNumberParams) (*ProxyV1PhoneNumber, error)

Add a Phone Number to a Service's Proxy Number Pool.

func (*ApiService) CreateService

func (c *ApiService) CreateService(params *CreateServiceParams) (*ProxyV1Service, error)

Create a new Service for Twilio Proxy

func (*ApiService) CreateSession

func (c *ApiService) CreateSession(ServiceSid string, params *CreateSessionParams) (*ProxyV1Session, error)

Create a new Session

func (*ApiService) CreateShortCode

func (c *ApiService) CreateShortCode(ServiceSid string, params *CreateShortCodeParams) (*ProxyV1ShortCode, error)

Add a Short Code to the Proxy Number Pool for the Service.

func (*ApiService) DeleteInteraction

func (c *ApiService) DeleteInteraction(ServiceSid string, SessionSid string, Sid string) error

Delete a specific Interaction.

func (*ApiService) DeleteParticipant

func (c *ApiService) DeleteParticipant(ServiceSid string, SessionSid string, Sid string) error

Delete a specific Participant. This is a soft-delete. The participant remains associated with the session and cannot be re-added. Participants are only permanently deleted when the [Session](https://www.twilio.com/docs/proxy/api/session) is deleted.

func (*ApiService) DeletePhoneNumber

func (c *ApiService) DeletePhoneNumber(ServiceSid string, Sid string) error

Delete a specific Phone Number from a Service.

func (*ApiService) DeleteService

func (c *ApiService) DeleteService(Sid string) error

Delete a specific Service.

func (*ApiService) DeleteSession

func (c *ApiService) DeleteSession(ServiceSid string, Sid string) error

Delete a specific Session.

func (*ApiService) DeleteShortCode

func (c *ApiService) DeleteShortCode(ServiceSid string, Sid string) error

Delete a specific Short Code from a Service.

func (*ApiService) FetchInteraction

func (c *ApiService) FetchInteraction(ServiceSid string, SessionSid string, Sid string) (*ProxyV1Interaction, error)

Retrieve a list of Interactions for a given [Session](https://www.twilio.com/docs/proxy/api/session).

func (*ApiService) FetchMessageInteraction

func (c *ApiService) FetchMessageInteraction(ServiceSid string, SessionSid string, ParticipantSid string, Sid string) (*ProxyV1MessageInteraction, error)

func (*ApiService) FetchParticipant

func (c *ApiService) FetchParticipant(ServiceSid string, SessionSid string, Sid string) (*ProxyV1Participant, error)

Fetch a specific Participant.

func (*ApiService) FetchPhoneNumber

func (c *ApiService) FetchPhoneNumber(ServiceSid string, Sid string) (*ProxyV1PhoneNumber, error)

Fetch a specific Phone Number.

func (*ApiService) FetchService

func (c *ApiService) FetchService(Sid string) (*ProxyV1Service, error)

Fetch a specific Service.

func (*ApiService) FetchSession

func (c *ApiService) FetchSession(ServiceSid string, Sid string) (*ProxyV1Session, error)

Fetch a specific Session.

func (*ApiService) FetchShortCode

func (c *ApiService) FetchShortCode(ServiceSid string, Sid string) (*ProxyV1ShortCode, error)

Fetch a specific Short Code.

func (*ApiService) ListInteraction

func (c *ApiService) ListInteraction(ServiceSid string, SessionSid string, params *ListInteractionParams) ([]ProxyV1Interaction, error)

Lists Interaction records from the API as a list. Unlike stream, this operation is eager and loads 'limit' records into memory before returning.

func (*ApiService) ListMessageInteraction

func (c *ApiService) ListMessageInteraction(ServiceSid string, SessionSid string, ParticipantSid string, params *ListMessageInteractionParams) ([]ProxyV1MessageInteraction, error)

Lists MessageInteraction records from the API as a list. Unlike stream, this operation is eager and loads 'limit' records into memory before returning.

func (*ApiService) ListParticipant

func (c *ApiService) ListParticipant(ServiceSid string, SessionSid string, params *ListParticipantParams) ([]ProxyV1Participant, error)

Lists Participant records from the API as a list. Unlike stream, this operation is eager and loads 'limit' records into memory before returning.

func (*ApiService) ListPhoneNumber

func (c *ApiService) ListPhoneNumber(ServiceSid string, params *ListPhoneNumberParams) ([]ProxyV1PhoneNumber, error)

Lists PhoneNumber records from the API as a list. Unlike stream, this operation is eager and loads 'limit' records into memory before returning.

func (*ApiService) ListService

func (c *ApiService) ListService(params *ListServiceParams) ([]ProxyV1Service, error)

Lists Service records from the API as a list. Unlike stream, this operation is eager and loads 'limit' records into memory before returning.

func (*ApiService) ListSession

func (c *ApiService) ListSession(ServiceSid string, params *ListSessionParams) ([]ProxyV1Session, error)

Lists Session records from the API as a list. Unlike stream, this operation is eager and loads 'limit' records into memory before returning.

func (*ApiService) ListShortCode

func (c *ApiService) ListShortCode(ServiceSid string, params *ListShortCodeParams) ([]ProxyV1ShortCode, error)

Lists ShortCode records from the API as a list. Unlike stream, this operation is eager and loads 'limit' records into memory before returning.

func (*ApiService) PageInteraction

func (c *ApiService) PageInteraction(ServiceSid string, SessionSid string, params *ListInteractionParams, pageToken, pageNumber string) (*ListInteractionResponse, error)

Retrieve a single page of Interaction records from the API. Request is executed immediately.

func (*ApiService) PageMessageInteraction

func (c *ApiService) PageMessageInteraction(ServiceSid string, SessionSid string, ParticipantSid string, params *ListMessageInteractionParams, pageToken, pageNumber string) (*ListMessageInteractionResponse, error)

Retrieve a single page of MessageInteraction records from the API. Request is executed immediately.

func (*ApiService) PageParticipant

func (c *ApiService) PageParticipant(ServiceSid string, SessionSid string, params *ListParticipantParams, pageToken, pageNumber string) (*ListParticipantResponse, error)

Retrieve a single page of Participant records from the API. Request is executed immediately.

func (*ApiService) PagePhoneNumber

func (c *ApiService) PagePhoneNumber(ServiceSid string, params *ListPhoneNumberParams, pageToken, pageNumber string) (*ListPhoneNumberResponse, error)

Retrieve a single page of PhoneNumber records from the API. Request is executed immediately.

func (*ApiService) PageService

func (c *ApiService) PageService(params *ListServiceParams, pageToken, pageNumber string) (*ListServiceResponse, error)

Retrieve a single page of Service records from the API. Request is executed immediately.

func (*ApiService) PageSession

func (c *ApiService) PageSession(ServiceSid string, params *ListSessionParams, pageToken, pageNumber string) (*ListSessionResponse, error)

Retrieve a single page of Session records from the API. Request is executed immediately.

func (*ApiService) PageShortCode

func (c *ApiService) PageShortCode(ServiceSid string, params *ListShortCodeParams, pageToken, pageNumber string) (*ListShortCodeResponse, error)

Retrieve a single page of ShortCode records from the API. Request is executed immediately.

func (*ApiService) StreamInteraction

func (c *ApiService) StreamInteraction(ServiceSid string, SessionSid string, params *ListInteractionParams) (chan ProxyV1Interaction, chan error)

Streams Interaction records from the API as a channel stream. This operation lazily loads records as efficiently as possible until the limit is reached.

func (*ApiService) StreamMessageInteraction

func (c *ApiService) StreamMessageInteraction(ServiceSid string, SessionSid string, ParticipantSid string, params *ListMessageInteractionParams) (chan ProxyV1MessageInteraction, chan error)

Streams MessageInteraction records from the API as a channel stream. This operation lazily loads records as efficiently as possible until the limit is reached.

func (*ApiService) StreamParticipant

func (c *ApiService) StreamParticipant(ServiceSid string, SessionSid string, params *ListParticipantParams) (chan ProxyV1Participant, chan error)

Streams Participant records from the API as a channel stream. This operation lazily loads records as efficiently as possible until the limit is reached.

func (*ApiService) StreamPhoneNumber

func (c *ApiService) StreamPhoneNumber(ServiceSid string, params *ListPhoneNumberParams) (chan ProxyV1PhoneNumber, chan error)

Streams PhoneNumber records from the API as a channel stream. This operation lazily loads records as efficiently as possible until the limit is reached.

func (*ApiService) StreamService

func (c *ApiService) StreamService(params *ListServiceParams) (chan ProxyV1Service, chan error)

Streams Service records from the API as a channel stream. This operation lazily loads records as efficiently as possible until the limit is reached.

func (*ApiService) StreamSession

func (c *ApiService) StreamSession(ServiceSid string, params *ListSessionParams) (chan ProxyV1Session, chan error)

Streams Session records from the API as a channel stream. This operation lazily loads records as efficiently as possible until the limit is reached.

func (*ApiService) StreamShortCode

func (c *ApiService) StreamShortCode(ServiceSid string, params *ListShortCodeParams) (chan ProxyV1ShortCode, chan error)

Streams ShortCode records from the API as a channel stream. This operation lazily loads records as efficiently as possible until the limit is reached.

func (*ApiService) UpdatePhoneNumber

func (c *ApiService) UpdatePhoneNumber(ServiceSid string, Sid string, params *UpdatePhoneNumberParams) (*ProxyV1PhoneNumber, error)

Update a specific Proxy Number.

func (*ApiService) UpdateService

func (c *ApiService) UpdateService(Sid string, params *UpdateServiceParams) (*ProxyV1Service, error)

Update a specific Service.

func (*ApiService) UpdateSession

func (c *ApiService) UpdateSession(ServiceSid string, Sid string, params *UpdateSessionParams) (*ProxyV1Session, error)

Update a specific Session.

func (*ApiService) UpdateShortCode

func (c *ApiService) UpdateShortCode(ServiceSid string, Sid string, params *UpdateShortCodeParams) (*ProxyV1ShortCode, error)

Update a specific Short Code.

type CreateMessageInteractionParams

type CreateMessageInteractionParams struct {
	// The message to send to the participant
	Body *string `json:"Body,omitempty"`
	// Reserved. Not currently supported.
	MediaUrl *[]string `json:"MediaUrl,omitempty"`
}

Optional parameters for the method 'CreateMessageInteraction'

func (*CreateMessageInteractionParams) SetBody

func (*CreateMessageInteractionParams) SetMediaUrl

func (params *CreateMessageInteractionParams) SetMediaUrl(MediaUrl []string) *CreateMessageInteractionParams

type CreateParticipantParams

type CreateParticipantParams struct {
	// The phone number of the Participant.
	Identifier *string `json:"Identifier,omitempty"`
	// The string that you assigned to describe the participant. This value must be 255 characters or fewer. **This value should not have PII.**
	FriendlyName *string `json:"FriendlyName,omitempty"`
	// The proxy phone number to use for the Participant. If not specified, Proxy will select a number from the pool.
	ProxyIdentifier *string `json:"ProxyIdentifier,omitempty"`
	// The SID of the Proxy Identifier to assign to the Participant.
	ProxyIdentifierSid *string `json:"ProxyIdentifierSid,omitempty"`
}

Optional parameters for the method 'CreateParticipant'

func (*CreateParticipantParams) SetFriendlyName

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

func (*CreateParticipantParams) SetIdentifier

func (params *CreateParticipantParams) SetIdentifier(Identifier string) *CreateParticipantParams

func (*CreateParticipantParams) SetProxyIdentifier

func (params *CreateParticipantParams) SetProxyIdentifier(ProxyIdentifier string) *CreateParticipantParams

func (*CreateParticipantParams) SetProxyIdentifierSid

func (params *CreateParticipantParams) SetProxyIdentifierSid(ProxyIdentifierSid string) *CreateParticipantParams

type CreatePhoneNumberParams

type CreatePhoneNumberParams struct {
	// The SID of a Twilio [IncomingPhoneNumber](https://www.twilio.com/docs/phone-numbers/api/incomingphonenumber-resource) resource that represents the Twilio Number you would like to assign to your Proxy Service.
	Sid *string `json:"Sid,omitempty"`
	// The phone number in [E.164](https://www.twilio.com/docs/glossary/what-e164) format.  E.164 phone numbers consist of a + followed by the country code and subscriber number without punctuation characters. For example, +14155551234.
	PhoneNumber *string `json:"PhoneNumber,omitempty"`
	// Whether the new phone number should be reserved and not be assigned to a participant using proxy pool logic. See [Reserved Phone Numbers](https://www.twilio.com/docs/proxy/reserved-phone-numbers) for more information.
	IsReserved *bool `json:"IsReserved,omitempty"`
}

Optional parameters for the method 'CreatePhoneNumber'

func (*CreatePhoneNumberParams) SetIsReserved

func (params *CreatePhoneNumberParams) SetIsReserved(IsReserved bool) *CreatePhoneNumberParams

func (*CreatePhoneNumberParams) SetPhoneNumber

func (params *CreatePhoneNumberParams) SetPhoneNumber(PhoneNumber string) *CreatePhoneNumberParams

func (*CreatePhoneNumberParams) SetSid

type CreateServiceParams

type CreateServiceParams struct {
	// An application-defined string that uniquely identifies the resource. This value must be 191 characters or fewer in length and be unique. **This value should not have PII.**
	UniqueName *string `json:"UniqueName,omitempty"`
	// The default `ttl` value to set for Sessions created in the Service. The TTL (time to live) is measured in seconds after the Session's last create or last Interaction. The default value of `0` indicates an unlimited Session length. You can override a Session's default TTL value by setting its `ttl` value.
	DefaultTtl *int `json:"DefaultTtl,omitempty"`
	// The URL we should call when the interaction status changes.
	CallbackUrl *string `json:"CallbackUrl,omitempty"`
	//
	GeoMatchLevel *string `json:"GeoMatchLevel,omitempty"`
	//
	NumberSelectionBehavior *string `json:"NumberSelectionBehavior,omitempty"`
	// The URL we call on each interaction. If we receive a 403 status, we block the interaction; otherwise the interaction continues.
	InterceptCallbackUrl *string `json:"InterceptCallbackUrl,omitempty"`
	// The URL we should call when an inbound call or SMS action occurs on a closed or non-existent Session. If your server (or a Twilio [function](https://www.twilio.com/en-us/serverless/functions)) responds with valid [TwiML](https://www.twilio.com/docs/voice/twiml), we will process it. This means it is possible, for example, to play a message for a call, send an automated text message response, or redirect a call to another Phone Number. See [Out-of-Session Callback Response Guide](https://www.twilio.com/docs/proxy/out-session-callback-response-guide) for more information.
	OutOfSessionCallbackUrl *string `json:"OutOfSessionCallbackUrl,omitempty"`
	// The SID of the Chat Service Instance managed by Proxy Service. The Chat Service enables Proxy to forward SMS and channel messages to this chat instance. This is a one-to-one relationship.
	ChatInstanceSid *string `json:"ChatInstanceSid,omitempty"`
}

Optional parameters for the method 'CreateService'

func (*CreateServiceParams) SetCallbackUrl

func (params *CreateServiceParams) SetCallbackUrl(CallbackUrl string) *CreateServiceParams

func (*CreateServiceParams) SetChatInstanceSid

func (params *CreateServiceParams) SetChatInstanceSid(ChatInstanceSid string) *CreateServiceParams

func (*CreateServiceParams) SetDefaultTtl

func (params *CreateServiceParams) SetDefaultTtl(DefaultTtl int) *CreateServiceParams

func (*CreateServiceParams) SetGeoMatchLevel

func (params *CreateServiceParams) SetGeoMatchLevel(GeoMatchLevel string) *CreateServiceParams

func (*CreateServiceParams) SetInterceptCallbackUrl

func (params *CreateServiceParams) SetInterceptCallbackUrl(InterceptCallbackUrl string) *CreateServiceParams

func (*CreateServiceParams) SetNumberSelectionBehavior

func (params *CreateServiceParams) SetNumberSelectionBehavior(NumberSelectionBehavior string) *CreateServiceParams

func (*CreateServiceParams) SetOutOfSessionCallbackUrl

func (params *CreateServiceParams) SetOutOfSessionCallbackUrl(OutOfSessionCallbackUrl string) *CreateServiceParams

func (*CreateServiceParams) SetUniqueName

func (params *CreateServiceParams) SetUniqueName(UniqueName string) *CreateServiceParams

type CreateSessionParams

type CreateSessionParams struct {
	// An application-defined string that uniquely identifies the resource. This value must be 191 characters or fewer in length and be unique. **This value should not have PII.**
	UniqueName *string `json:"UniqueName,omitempty"`
	// The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date when the Session should expire. If this is value is present, it overrides the `ttl` value.
	DateExpiry *time.Time `json:"DateExpiry,omitempty"`
	// The time, in seconds, when the session will expire. The time is measured from the last Session create or the Session's last Interaction.
	Ttl *int `json:"Ttl,omitempty"`
	//
	Mode *string `json:"Mode,omitempty"`
	//
	Status *string `json:"Status,omitempty"`
	// The Participant objects to include in the new session.
	Participants *[]interface{} `json:"Participants,omitempty"`
}

Optional parameters for the method 'CreateSession'

func (*CreateSessionParams) SetDateExpiry

func (params *CreateSessionParams) SetDateExpiry(DateExpiry time.Time) *CreateSessionParams

func (*CreateSessionParams) SetMode

func (params *CreateSessionParams) SetMode(Mode string) *CreateSessionParams

func (*CreateSessionParams) SetParticipants

func (params *CreateSessionParams) SetParticipants(Participants []interface{}) *CreateSessionParams

func (*CreateSessionParams) SetStatus

func (params *CreateSessionParams) SetStatus(Status string) *CreateSessionParams

func (*CreateSessionParams) SetTtl

func (params *CreateSessionParams) SetTtl(Ttl int) *CreateSessionParams

func (*CreateSessionParams) SetUniqueName

func (params *CreateSessionParams) SetUniqueName(UniqueName string) *CreateSessionParams

type CreateShortCodeParams

type CreateShortCodeParams struct {
	// The SID of a Twilio [ShortCode](https://www.twilio.com/en-us/messaging/channels/sms/short-codes) resource that represents the short code you would like to assign to your Proxy Service.
	Sid *string `json:"Sid,omitempty"`
}

Optional parameters for the method 'CreateShortCode'

func (*CreateShortCodeParams) SetSid

func (params *CreateShortCodeParams) SetSid(Sid string) *CreateShortCodeParams

type ListInteractionParams

type ListInteractionParams struct {
	// How many resources to return in each list page. The default is 50, and the maximum is 1000.
	PageSize *int `json:"PageSize,omitempty"`
	// Max number of records to return.
	Limit *int `json:"limit,omitempty"`
}

Optional parameters for the method 'ListInteraction'

func (*ListInteractionParams) SetLimit

func (params *ListInteractionParams) SetLimit(Limit int) *ListInteractionParams

func (*ListInteractionParams) SetPageSize

func (params *ListInteractionParams) SetPageSize(PageSize int) *ListInteractionParams

type ListInteractionResponse

type ListInteractionResponse struct {
	Interactions []ProxyV1Interaction        `json:"interactions,omitempty"`
	Meta         ListInteractionResponseMeta `json:"meta,omitempty"`
}

ListInteractionResponse struct for ListInteractionResponse

type ListInteractionResponseMeta

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

ListInteractionResponseMeta struct for ListInteractionResponseMeta

type ListMessageInteractionParams

type ListMessageInteractionParams struct {
	// How many resources to return in each list page. The default is 50, and the maximum is 1000.
	PageSize *int `json:"PageSize,omitempty"`
	// Max number of records to return.
	Limit *int `json:"limit,omitempty"`
}

Optional parameters for the method 'ListMessageInteraction'

func (*ListMessageInteractionParams) SetLimit

func (*ListMessageInteractionParams) SetPageSize

func (params *ListMessageInteractionParams) SetPageSize(PageSize int) *ListMessageInteractionParams

type ListMessageInteractionResponse

type ListMessageInteractionResponse struct {
	Interactions []ProxyV1MessageInteraction `json:"interactions,omitempty"`
	Meta         ListInteractionResponseMeta `json:"meta,omitempty"`
}

ListMessageInteractionResponse struct for ListMessageInteractionResponse

type ListParticipantParams

type ListParticipantParams struct {
	// How many resources to return in each list page. The default is 50, and the maximum is 1000.
	PageSize *int `json:"PageSize,omitempty"`
	// Max number of records to return.
	Limit *int `json:"limit,omitempty"`
}

Optional parameters for the method 'ListParticipant'

func (*ListParticipantParams) SetLimit

func (params *ListParticipantParams) SetLimit(Limit int) *ListParticipantParams

func (*ListParticipantParams) SetPageSize

func (params *ListParticipantParams) SetPageSize(PageSize int) *ListParticipantParams

type ListParticipantResponse

type ListParticipantResponse struct {
	Participants []ProxyV1Participant        `json:"participants,omitempty"`
	Meta         ListInteractionResponseMeta `json:"meta,omitempty"`
}

ListParticipantResponse struct for ListParticipantResponse

type ListPhoneNumberParams

type ListPhoneNumberParams struct {
	// How many resources to return in each list page. The default is 50, and the maximum is 1000.
	PageSize *int `json:"PageSize,omitempty"`
	// Max number of records to return.
	Limit *int `json:"limit,omitempty"`
}

Optional parameters for the method 'ListPhoneNumber'

func (*ListPhoneNumberParams) SetLimit

func (params *ListPhoneNumberParams) SetLimit(Limit int) *ListPhoneNumberParams

func (*ListPhoneNumberParams) SetPageSize

func (params *ListPhoneNumberParams) SetPageSize(PageSize int) *ListPhoneNumberParams

type ListPhoneNumberResponse

type ListPhoneNumberResponse struct {
	PhoneNumbers []ProxyV1PhoneNumber        `json:"phone_numbers,omitempty"`
	Meta         ListInteractionResponseMeta `json:"meta,omitempty"`
}

ListPhoneNumberResponse struct for ListPhoneNumberResponse

type ListServiceParams

type ListServiceParams struct {
	// How many resources to return in each list page. The default is 50, and the maximum is 1000.
	PageSize *int `json:"PageSize,omitempty"`
	// Max number of records to return.
	Limit *int `json:"limit,omitempty"`
}

Optional parameters for the method 'ListService'

func (*ListServiceParams) SetLimit

func (params *ListServiceParams) SetLimit(Limit int) *ListServiceParams

func (*ListServiceParams) SetPageSize

func (params *ListServiceParams) SetPageSize(PageSize int) *ListServiceParams

type ListServiceResponse

type ListServiceResponse struct {
	Services []ProxyV1Service            `json:"services,omitempty"`
	Meta     ListInteractionResponseMeta `json:"meta,omitempty"`
}

ListServiceResponse struct for ListServiceResponse

type ListSessionParams

type ListSessionParams struct {
	// How many resources to return in each list page. The default is 50, and the maximum is 1000.
	PageSize *int `json:"PageSize,omitempty"`
	// Max number of records to return.
	Limit *int `json:"limit,omitempty"`
}

Optional parameters for the method 'ListSession'

func (*ListSessionParams) SetLimit

func (params *ListSessionParams) SetLimit(Limit int) *ListSessionParams

func (*ListSessionParams) SetPageSize

func (params *ListSessionParams) SetPageSize(PageSize int) *ListSessionParams

type ListSessionResponse

type ListSessionResponse struct {
	Sessions []ProxyV1Session            `json:"sessions,omitempty"`
	Meta     ListInteractionResponseMeta `json:"meta,omitempty"`
}

ListSessionResponse struct for ListSessionResponse

type ListShortCodeParams

type ListShortCodeParams struct {
	// How many resources to return in each list page. The default is 50, and the maximum is 1000.
	PageSize *int `json:"PageSize,omitempty"`
	// Max number of records to return.
	Limit *int `json:"limit,omitempty"`
}

Optional parameters for the method 'ListShortCode'

func (*ListShortCodeParams) SetLimit

func (params *ListShortCodeParams) SetLimit(Limit int) *ListShortCodeParams

func (*ListShortCodeParams) SetPageSize

func (params *ListShortCodeParams) SetPageSize(PageSize int) *ListShortCodeParams

type ListShortCodeResponse

type ListShortCodeResponse struct {
	ShortCodes []ProxyV1ShortCode          `json:"short_codes,omitempty"`
	Meta       ListInteractionResponseMeta `json:"meta,omitempty"`
}

ListShortCodeResponse struct for ListShortCodeResponse

type ProxyV1Interaction

type ProxyV1Interaction struct {
	// The unique string that we created to identify the Interaction resource.
	Sid *string `json:"sid,omitempty"`
	// The SID of the parent [Session](https://www.twilio.com/docs/proxy/api/session) resource.
	SessionSid *string `json:"session_sid,omitempty"`
	// The SID of the parent [Service](https://www.twilio.com/docs/proxy/api/service) resource.
	ServiceSid *string `json:"service_sid,omitempty"`
	// The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Interaction resource.
	AccountSid *string `json:"account_sid,omitempty"`
	// A JSON string that includes the message body of message interactions (e.g. `{\"body\": \"hello\"}`) or the call duration (when available) of a call (e.g. `{\"duration\": \"5\"}`).
	Data *string `json:"data,omitempty"`
	Type *string `json:"type,omitempty"`
	// The SID of the inbound [Participant](https://www.twilio.com/docs/proxy/api/participant) resource.
	InboundParticipantSid *string `json:"inbound_participant_sid,omitempty"`
	// The SID of the inbound resource; either the [Call](https://www.twilio.com/docs/voice/api/call-resource) or [Message](https://www.twilio.com/docs/sms/api/message-resource).
	InboundResourceSid    *string `json:"inbound_resource_sid,omitempty"`
	InboundResourceStatus *string `json:"inbound_resource_status,omitempty"`
	// The inbound resource type. Can be [Call](https://www.twilio.com/docs/voice/api/call-resource) or [Message](https://www.twilio.com/docs/sms/api/message-resource).
	InboundResourceType *string `json:"inbound_resource_type,omitempty"`
	// The URL of the Twilio inbound resource
	InboundResourceUrl *string `json:"inbound_resource_url,omitempty"`
	// The SID of the outbound [Participant](https://www.twilio.com/docs/proxy/api/participant)).
	OutboundParticipantSid *string `json:"outbound_participant_sid,omitempty"`
	// The SID of the outbound resource; either the [Call](https://www.twilio.com/docs/voice/api/call-resource) or [Message](https://www.twilio.com/docs/sms/api/message-resource).
	OutboundResourceSid    *string `json:"outbound_resource_sid,omitempty"`
	OutboundResourceStatus *string `json:"outbound_resource_status,omitempty"`
	// The outbound resource type. Can be: [Call](https://www.twilio.com/docs/voice/api/call-resource) or [Message](https://www.twilio.com/docs/sms/api/message-resource).
	OutboundResourceType *string `json:"outbound_resource_type,omitempty"`
	// The URL of the Twilio outbound resource.
	OutboundResourceUrl *string `json:"outbound_resource_url,omitempty"`
	// The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time in GMT when the Interaction was created.
	DateCreated *time.Time `json:"date_created,omitempty"`
	// The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time in GMT when the resource was last updated.
	DateUpdated *time.Time `json:"date_updated,omitempty"`
	// The absolute URL of the Interaction resource.
	Url *string `json:"url,omitempty"`
}

ProxyV1Interaction struct for ProxyV1Interaction

type ProxyV1MessageInteraction

type ProxyV1MessageInteraction struct {
	// The unique string that we created to identify the MessageInteraction resource.
	Sid *string `json:"sid,omitempty"`
	// The SID of the parent [Session](https://www.twilio.com/docs/proxy/api/session) resource.
	SessionSid *string `json:"session_sid,omitempty"`
	// The SID of the parent [Service](https://www.twilio.com/docs/proxy/api/service) resource.
	ServiceSid *string `json:"service_sid,omitempty"`
	// The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the MessageInteraction resource.
	AccountSid *string `json:"account_sid,omitempty"`
	// A JSON string that includes the message body sent to the participant. (e.g. `{\"body\": \"hello\"}`)
	Data *string `json:"data,omitempty"`
	Type *string `json:"type,omitempty"`
	// The SID of the [Participant](https://www.twilio.com/docs/proxy/api/participant) resource.
	ParticipantSid *string `json:"participant_sid,omitempty"`
	// Always empty for created Message Interactions.
	InboundParticipantSid *string `json:"inbound_participant_sid,omitempty"`
	// Always empty for created Message Interactions.
	InboundResourceSid    *string `json:"inbound_resource_sid,omitempty"`
	InboundResourceStatus *string `json:"inbound_resource_status,omitempty"`
	// Always empty for created Message Interactions.
	InboundResourceType *string `json:"inbound_resource_type,omitempty"`
	// Always empty for created Message Interactions.
	InboundResourceUrl *string `json:"inbound_resource_url,omitempty"`
	// The SID of the outbound [Participant](https://www.twilio.com/docs/proxy/api/participant) resource.
	OutboundParticipantSid *string `json:"outbound_participant_sid,omitempty"`
	// The SID of the outbound [Message](https://www.twilio.com/docs/sms/api/message-resource) resource.
	OutboundResourceSid    *string `json:"outbound_resource_sid,omitempty"`
	OutboundResourceStatus *string `json:"outbound_resource_status,omitempty"`
	// The outbound resource type. This value is always `Message`.
	OutboundResourceType *string `json:"outbound_resource_type,omitempty"`
	// The URL of the Twilio message resource.
	OutboundResourceUrl *string `json:"outbound_resource_url,omitempty"`
	// The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time in GMT when the resource was created.
	DateCreated *time.Time `json:"date_created,omitempty"`
	// The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time in GMT when the resource was last updated.
	DateUpdated *time.Time `json:"date_updated,omitempty"`
	// The absolute URL of the MessageInteraction resource.
	Url *string `json:"url,omitempty"`
}

ProxyV1MessageInteraction struct for ProxyV1MessageInteraction

type ProxyV1Participant

type ProxyV1Participant struct {
	// The unique string that we created to identify the Participant resource.
	Sid *string `json:"sid,omitempty"`
	// The SID of the parent [Session](https://www.twilio.com/docs/proxy/api/session) resource.
	SessionSid *string `json:"session_sid,omitempty"`
	// The SID of the resource's parent [Service](https://www.twilio.com/docs/proxy/api/service) resource.
	ServiceSid *string `json:"service_sid,omitempty"`
	// The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Participant resource.
	AccountSid *string `json:"account_sid,omitempty"`
	// The string that you assigned to describe the participant. This value must be 255 characters or fewer. Supports UTF-8 characters. **This value should not have PII.**
	FriendlyName *string `json:"friendly_name,omitempty"`
	// The phone number or channel identifier of the Participant. This value must be 191 characters or fewer. Supports UTF-8 characters.
	Identifier *string `json:"identifier,omitempty"`
	// The phone number or short code (masked number) of the participant's partner. The participant will call or message the partner participant at this number.
	ProxyIdentifier *string `json:"proxy_identifier,omitempty"`
	// The SID of the Proxy Identifier assigned to the Participant.
	ProxyIdentifierSid *string `json:"proxy_identifier_sid,omitempty"`
	// The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date when the Participant was removed from the session.
	DateDeleted *time.Time `json:"date_deleted,omitempty"`
	// The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time in GMT when the resource was created.
	DateCreated *time.Time `json:"date_created,omitempty"`
	// The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time in GMT when the resource was last updated.
	DateUpdated *time.Time `json:"date_updated,omitempty"`
	// The absolute URL of the Participant resource.
	Url *string `json:"url,omitempty"`
	// The URLs to resources related the participant.
	Links *map[string]interface{} `json:"links,omitempty"`
}

ProxyV1Participant struct for ProxyV1Participant

type ProxyV1PhoneNumber

type ProxyV1PhoneNumber struct {
	// The unique string that we created to identify the PhoneNumber resource.
	Sid *string `json:"sid,omitempty"`
	// The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the PhoneNumber resource.
	AccountSid *string `json:"account_sid,omitempty"`
	// The SID of the PhoneNumber resource's parent [Service](https://www.twilio.com/docs/proxy/api/service) resource.
	ServiceSid *string `json:"service_sid,omitempty"`
	// The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time in GMT when the resource was created.
	DateCreated *time.Time `json:"date_created,omitempty"`
	// The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time in GMT when the resource was last updated.
	DateUpdated *time.Time `json:"date_updated,omitempty"`
	// The phone number in [E.164](https://www.twilio.com/docs/glossary/what-e164) format, which consists of a + followed by the country code and subscriber number.
	PhoneNumber *string `json:"phone_number,omitempty"`
	// The string that you assigned to describe the resource.
	FriendlyName *string `json:"friendly_name,omitempty"`
	// The ISO Country Code for the phone number.
	IsoCountry   *string                                `json:"iso_country,omitempty"`
	Capabilities *ProxyV1ServicePhoneNumberCapabilities `json:"capabilities,omitempty"`
	// The absolute URL of the PhoneNumber resource.
	Url *string `json:"url,omitempty"`
	// Whether the phone number should be reserved and not be assigned to a participant using proxy pool logic. See [Reserved Phone Numbers](https://www.twilio.com/docs/proxy/reserved-phone-numbers) for more information.
	IsReserved *bool `json:"is_reserved,omitempty"`
	// The number of open session assigned to the number. See the [How many Phone Numbers do I need?](https://www.twilio.com/docs/proxy/phone-numbers-needed) guide for more information.
	InUse *int `json:"in_use,omitempty"`
}

ProxyV1PhoneNumber struct for ProxyV1PhoneNumber

type ProxyV1Service

type ProxyV1Service struct {
	// The unique string that we created to identify the Service resource.
	Sid *string `json:"sid,omitempty"`
	// An application-defined string that uniquely identifies the resource. This value must be 191 characters or fewer in length and be unique. Supports UTF-8 characters. **This value should not have PII.**
	UniqueName *string `json:"unique_name,omitempty"`
	// The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Service resource.
	AccountSid *string `json:"account_sid,omitempty"`
	// The SID of the Chat Service Instance managed by Proxy Service. The Chat Service enables Proxy to forward SMS and channel messages to this chat instance. This is a one-to-one relationship.
	ChatInstanceSid *string `json:"chat_instance_sid,omitempty"`
	// The URL we call when the interaction status changes.
	CallbackUrl *string `json:"callback_url,omitempty"`
	// The default `ttl` value for Sessions created in the Service. The TTL (time to live) is measured in seconds after the Session's last create or last Interaction. The default value of `0` indicates an unlimited Session length. You can override a Session's default TTL value by setting its `ttl` value.
	DefaultTtl              *int    `json:"default_ttl,omitempty"`
	NumberSelectionBehavior *string `json:"number_selection_behavior,omitempty"`
	GeoMatchLevel           *string `json:"geo_match_level,omitempty"`
	// The URL we call on each interaction. If we receive a 403 status, we block the interaction; otherwise the interaction continues.
	InterceptCallbackUrl *string `json:"intercept_callback_url,omitempty"`
	// The URL we call when an inbound call or SMS action occurs on a closed or non-existent Session. If your server (or a Twilio [function](https://www.twilio.com/en-us/serverless/functions)) responds with valid [TwiML](https://www.twilio.com/docs/voice/twiml), we will process it. This means it is possible, for example, to play a message for a call, send an automated text message response, or redirect a call to another Phone Number. See [Out-of-Session Callback Response Guide](https://www.twilio.com/docs/proxy/out-session-callback-response-guide) for more information.
	OutOfSessionCallbackUrl *string `json:"out_of_session_callback_url,omitempty"`
	// The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time in GMT when the resource was created.
	DateCreated *time.Time `json:"date_created,omitempty"`
	// The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time in GMT when the resource was last updated.
	DateUpdated *time.Time `json:"date_updated,omitempty"`
	// The absolute URL of the Service resource.
	Url *string `json:"url,omitempty"`
	// The URLs of resources related to the Service.
	Links *map[string]interface{} `json:"links,omitempty"`
}

ProxyV1Service struct for ProxyV1Service

type ProxyV1ServicePhoneNumberCapabilities

type ProxyV1ServicePhoneNumberCapabilities struct {
	Mms   bool `json:"mms,omitempty"`
	Sms   bool `json:"sms,omitempty"`
	Voice bool `json:"voice,omitempty"`
	Fax   bool `json:"fax,omitempty"`
}

ProxyV1ServicePhoneNumberCapabilities The capabilities of the phone number.

type ProxyV1ServiceShortCodeCapabilities

type ProxyV1ServiceShortCodeCapabilities struct {
	Mms   bool `json:"mms,omitempty"`
	Sms   bool `json:"sms,omitempty"`
	Voice bool `json:"voice,omitempty"`
	Fax   bool `json:"fax,omitempty"`
}

ProxyV1ServiceShortCodeCapabilities The capabilities of the short code.

type ProxyV1Session

type ProxyV1Session struct {
	// The unique string that we created to identify the Session resource.
	Sid *string `json:"sid,omitempty"`
	// The SID of the [Service](https://www.twilio.com/docs/proxy/api/service) the session is associated with.
	ServiceSid *string `json:"service_sid,omitempty"`
	// The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Session resource.
	AccountSid *string `json:"account_sid,omitempty"`
	// The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date when the Session started.
	DateStarted *time.Time `json:"date_started,omitempty"`
	// The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date when the Session ended.
	DateEnded *time.Time `json:"date_ended,omitempty"`
	// The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date when the Session last had an interaction.
	DateLastInteraction *time.Time `json:"date_last_interaction,omitempty"`
	// The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date when the Session should expire. If this is value is present, it overrides the `ttl` value.
	DateExpiry *time.Time `json:"date_expiry,omitempty"`
	// An application-defined string that uniquely identifies the resource. This value must be 191 characters or fewer in length and be unique. Supports UTF-8 characters. **This value should not have PII.**
	UniqueName *string `json:"unique_name,omitempty"`
	Status     *string `json:"status,omitempty"`
	// The reason the Session ended.
	ClosedReason *string `json:"closed_reason,omitempty"`
	// The time, in seconds, when the session will expire. The time is measured from the last Session create or the Session's last Interaction.
	Ttl  *int    `json:"ttl,omitempty"`
	Mode *string `json:"mode,omitempty"`
	// The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time in GMT when the resource was created.
	DateCreated *time.Time `json:"date_created,omitempty"`
	// The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time in GMT when the resource was last updated.
	DateUpdated *time.Time `json:"date_updated,omitempty"`
	// The absolute URL of the Session resource.
	Url *string `json:"url,omitempty"`
	// The URLs of resources related to the Session.
	Links *map[string]interface{} `json:"links,omitempty"`
}

ProxyV1Session struct for ProxyV1Session

type ProxyV1ShortCode

type ProxyV1ShortCode struct {
	// The unique string that we created to identify the ShortCode resource.
	Sid *string `json:"sid,omitempty"`
	// The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the ShortCode resource.
	AccountSid *string `json:"account_sid,omitempty"`
	// The SID of the ShortCode resource's parent [Service](https://www.twilio.com/docs/proxy/api/service) resource.
	ServiceSid *string `json:"service_sid,omitempty"`
	// The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time in GMT when the resource was created.
	DateCreated *time.Time `json:"date_created,omitempty"`
	// The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time in GMT when the resource was last updated.
	DateUpdated *time.Time `json:"date_updated,omitempty"`
	// The short code's number.
	ShortCode *string `json:"short_code,omitempty"`
	// The ISO Country Code for the short code.
	IsoCountry   *string                              `json:"iso_country,omitempty"`
	Capabilities *ProxyV1ServiceShortCodeCapabilities `json:"capabilities,omitempty"`
	// The absolute URL of the ShortCode resource.
	Url *string `json:"url,omitempty"`
	// Whether the short code should be reserved and not be assigned to a participant using proxy pool logic. See [Reserved Phone Numbers](https://www.twilio.com/docs/proxy/reserved-phone-numbers) for more information.
	IsReserved *bool `json:"is_reserved,omitempty"`
}

ProxyV1ShortCode struct for ProxyV1ShortCode

type UpdatePhoneNumberParams

type UpdatePhoneNumberParams struct {
	// Whether the phone number should be reserved and not be assigned to a participant using proxy pool logic. See [Reserved Phone Numbers](https://www.twilio.com/docs/proxy/reserved-phone-numbers) for more information.
	IsReserved *bool `json:"IsReserved,omitempty"`
}

Optional parameters for the method 'UpdatePhoneNumber'

func (*UpdatePhoneNumberParams) SetIsReserved

func (params *UpdatePhoneNumberParams) SetIsReserved(IsReserved bool) *UpdatePhoneNumberParams

type UpdateServiceParams

type UpdateServiceParams struct {
	// An application-defined string that uniquely identifies the resource. This value must be 191 characters or fewer in length and be unique. **This value should not have PII.**
	UniqueName *string `json:"UniqueName,omitempty"`
	// The default `ttl` value to set for Sessions created in the Service. The TTL (time to live) is measured in seconds after the Session's last create or last Interaction. The default value of `0` indicates an unlimited Session length. You can override a Session's default TTL value by setting its `ttl` value.
	DefaultTtl *int `json:"DefaultTtl,omitempty"`
	// The URL we should call when the interaction status changes.
	CallbackUrl *string `json:"CallbackUrl,omitempty"`
	//
	GeoMatchLevel *string `json:"GeoMatchLevel,omitempty"`
	//
	NumberSelectionBehavior *string `json:"NumberSelectionBehavior,omitempty"`
	// The URL we call on each interaction. If we receive a 403 status, we block the interaction; otherwise the interaction continues.
	InterceptCallbackUrl *string `json:"InterceptCallbackUrl,omitempty"`
	// The URL we should call when an inbound call or SMS action occurs on a closed or non-existent Session. If your server (or a Twilio [function](https://www.twilio.com/en-us/serverless/functions)) responds with valid [TwiML](https://www.twilio.com/docs/voice/twiml), we will process it. This means it is possible, for example, to play a message for a call, send an automated text message response, or redirect a call to another Phone Number. See [Out-of-Session Callback Response Guide](https://www.twilio.com/docs/proxy/out-session-callback-response-guide) for more information.
	OutOfSessionCallbackUrl *string `json:"OutOfSessionCallbackUrl,omitempty"`
	// The SID of the Chat Service Instance managed by Proxy Service. The Chat Service enables Proxy to forward SMS and channel messages to this chat instance. This is a one-to-one relationship.
	ChatInstanceSid *string `json:"ChatInstanceSid,omitempty"`
}

Optional parameters for the method 'UpdateService'

func (*UpdateServiceParams) SetCallbackUrl

func (params *UpdateServiceParams) SetCallbackUrl(CallbackUrl string) *UpdateServiceParams

func (*UpdateServiceParams) SetChatInstanceSid

func (params *UpdateServiceParams) SetChatInstanceSid(ChatInstanceSid string) *UpdateServiceParams

func (*UpdateServiceParams) SetDefaultTtl

func (params *UpdateServiceParams) SetDefaultTtl(DefaultTtl int) *UpdateServiceParams

func (*UpdateServiceParams) SetGeoMatchLevel

func (params *UpdateServiceParams) SetGeoMatchLevel(GeoMatchLevel string) *UpdateServiceParams

func (*UpdateServiceParams) SetInterceptCallbackUrl

func (params *UpdateServiceParams) SetInterceptCallbackUrl(InterceptCallbackUrl string) *UpdateServiceParams

func (*UpdateServiceParams) SetNumberSelectionBehavior

func (params *UpdateServiceParams) SetNumberSelectionBehavior(NumberSelectionBehavior string) *UpdateServiceParams

func (*UpdateServiceParams) SetOutOfSessionCallbackUrl

func (params *UpdateServiceParams) SetOutOfSessionCallbackUrl(OutOfSessionCallbackUrl string) *UpdateServiceParams

func (*UpdateServiceParams) SetUniqueName

func (params *UpdateServiceParams) SetUniqueName(UniqueName string) *UpdateServiceParams

type UpdateSessionParams

type UpdateSessionParams struct {
	// The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date when the Session should expire. If this is value is present, it overrides the `ttl` value.
	DateExpiry *time.Time `json:"DateExpiry,omitempty"`
	// The time, in seconds, when the session will expire. The time is measured from the last Session create or the Session's last Interaction.
	Ttl *int `json:"Ttl,omitempty"`
	//
	Status *string `json:"Status,omitempty"`
}

Optional parameters for the method 'UpdateSession'

func (*UpdateSessionParams) SetDateExpiry

func (params *UpdateSessionParams) SetDateExpiry(DateExpiry time.Time) *UpdateSessionParams

func (*UpdateSessionParams) SetStatus

func (params *UpdateSessionParams) SetStatus(Status string) *UpdateSessionParams

func (*UpdateSessionParams) SetTtl

func (params *UpdateSessionParams) SetTtl(Ttl int) *UpdateSessionParams

type UpdateShortCodeParams

type UpdateShortCodeParams struct {
	// Whether the short code should be reserved and not be assigned to a participant using proxy pool logic. See [Reserved Phone Numbers](https://www.twilio.com/docs/proxy/reserved-phone-numbers) for more information.
	IsReserved *bool `json:"IsReserved,omitempty"`
}

Optional parameters for the method 'UpdateShortCode'

func (*UpdateShortCodeParams) SetIsReserved

func (params *UpdateShortCodeParams) SetIsReserved(IsReserved bool) *UpdateShortCodeParams

Jump to

Keyboard shortcuts

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