openapi

package
v1.23.2 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2024 License: MIT Imports: 5 Imported by: 0

README

Go API client for openapi

This is the public Twilio REST API.

Overview

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

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

Installation

Install the following dependencies:

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

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

import "./openapi"

Documentation for API Endpoints

All URIs are relative to https://flex-api.twilio.com

Class Method HTTP request Description
InstancesUsersApi FetchFlexUser Get /v2/Instances/{InstanceSid}/Users/{FlexUserSid}
InstancesUsersApi UpdateFlexUser Post /v2/Instances/{InstanceSid}/Users/{FlexUserSid}
WebChatsApi CreateWebChannel Post /v2/WebChats

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

func (c *ApiService) CreateWebChannel(params *CreateWebChannelParams) (*FlexV2WebChannel, error)

func (*ApiService) FetchFlexUser added in v1.20.1

func (c *ApiService) FetchFlexUser(InstanceSid string, FlexUserSid string) (*FlexV2FlexUser, error)

Fetch flex user for the given flex user sid

func (*ApiService) UpdateFlexUser added in v1.22.4

func (c *ApiService) UpdateFlexUser(InstanceSid string, FlexUserSid string, params *UpdateFlexUserParams) (*FlexV2FlexUser, error)

Update flex user for the given flex user sid

type CreateWebChannelParams

type CreateWebChannelParams struct {
	// The Ui-Version HTTP request header
	UiVersion *string `json:"Ui-Version,omitempty"`
	// The SID of the Conversations Address. See [Address Configuration Resource](https://www.twilio.com/docs/conversations/api/address-configuration-resource) for configuration details. When a conversation is created on the Flex backend, the callback URL will be set to the corresponding Studio Flow SID or webhook URL in your address configuration.
	AddressSid *string `json:"AddressSid,omitempty"`
	// The Conversation's friendly name. See the [Conversation resource](https://www.twilio.com/docs/conversations/api/conversation-resource) for an example.
	ChatFriendlyName *string `json:"ChatFriendlyName,omitempty"`
	// The Conversation participant's friendly name. See the [Conversation Participant Resource](https://www.twilio.com/docs/conversations/api/conversation-participant-resource) for an example.
	CustomerFriendlyName *string `json:"CustomerFriendlyName,omitempty"`
	// The pre-engagement data.
	PreEngagementData *string `json:"PreEngagementData,omitempty"`
}

Optional parameters for the method 'CreateWebChannel'

func (*CreateWebChannelParams) SetAddressSid

func (params *CreateWebChannelParams) SetAddressSid(AddressSid string) *CreateWebChannelParams

func (*CreateWebChannelParams) SetChatFriendlyName

func (params *CreateWebChannelParams) SetChatFriendlyName(ChatFriendlyName string) *CreateWebChannelParams

func (*CreateWebChannelParams) SetCustomerFriendlyName

func (params *CreateWebChannelParams) SetCustomerFriendlyName(CustomerFriendlyName string) *CreateWebChannelParams

func (*CreateWebChannelParams) SetPreEngagementData

func (params *CreateWebChannelParams) SetPreEngagementData(PreEngagementData string) *CreateWebChannelParams

func (*CreateWebChannelParams) SetUiVersion added in v1.20.1

func (params *CreateWebChannelParams) SetUiVersion(UiVersion string) *CreateWebChannelParams

type FlexV2FlexUser added in v1.20.1

type FlexV2FlexUser struct {
	// The unique SID of the account that created the resource.
	AccountSid *string `json:"account_sid,omitempty"`
	// The unique ID created by Twilio to identify a Flex instance.
	InstanceSid *string `json:"instance_sid,omitempty"`
	// The unique SID identifier of the Twilio Unified User.
	UserSid *string `json:"user_sid,omitempty"`
	// The unique SID identifier of the Flex User.
	FlexUserSid *string `json:"flex_user_sid,omitempty"`
	// The unique SID identifier of the worker.
	WorkerSid *string `json:"worker_sid,omitempty"`
	// The unique SID identifier of the workspace.
	WorkspaceSid *string `json:"workspace_sid,omitempty"`
	// The unique SID identifier of the Flex Team.
	FlexTeamSid *string `json:"flex_team_sid,omitempty"`
	// First name of the User.
	FirstName *string `json:"first_name,omitempty"`
	// Last name of the User.
	LastName *string `json:"last_name,omitempty"`
	// Username of the User.
	Username *string `json:"username,omitempty"`
	// Email of the User.
	Email *string `json:"email,omitempty"`
	// Friendly name of the User.
	FriendlyName *string `json:"friendly_name,omitempty"`
	// The locale preference of the user.
	Locale *string `json:"locale,omitempty"`
	// The roles of the user.
	Roles *[]string `json:"roles,omitempty"`
	// The date that this user was created, given in ISO 8601 format.
	CreatedDate *time.Time `json:"created_date,omitempty"`
	// The date that this user was updated, given in ISO 8601 format.
	UpdatedDate *time.Time `json:"updated_date,omitempty"`
	// The current version of the user.
	Version int     `json:"version,omitempty"`
	Url     *string `json:"url,omitempty"`
}

FlexV2FlexUser struct for FlexV2FlexUser

type FlexV2WebChannel

type FlexV2WebChannel struct {
	// The unique string representing the [Conversation resource](https://www.twilio.com/docs/conversations/api/conversation-resource) created.
	ConversationSid *string `json:"conversation_sid,omitempty"`
	// The unique string representing the User created and should be authorized to participate in the Conversation. For more details, see [User Identity & Access Tokens](https://www.twilio.com/docs/conversations/identity).
	Identity *string `json:"identity,omitempty"`
}

FlexV2WebChannel struct for FlexV2WebChannel

type UpdateFlexUserParams added in v1.22.4

type UpdateFlexUserParams struct {
	// First name of the User.
	FirstName *string `json:"FirstName,omitempty"`
	// Last name of the User.
	LastName *string `json:"LastName,omitempty"`
	// Email of the User.
	Email *string `json:"Email,omitempty"`
	// Friendly name of the User.
	FriendlyName *string `json:"FriendlyName,omitempty"`
	// The unique SID identifier of the Twilio Unified User.
	UserSid *string `json:"UserSid,omitempty"`
	// The locale preference of the user.
	Locale *string `json:"Locale,omitempty"`
}

Optional parameters for the method 'UpdateFlexUser'

func (*UpdateFlexUserParams) SetEmail added in v1.22.4

func (params *UpdateFlexUserParams) SetEmail(Email string) *UpdateFlexUserParams

func (*UpdateFlexUserParams) SetFirstName added in v1.22.4

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

func (*UpdateFlexUserParams) SetFriendlyName added in v1.22.4

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

func (*UpdateFlexUserParams) SetLastName added in v1.22.4

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

func (*UpdateFlexUserParams) SetLocale added in v1.22.4

func (params *UpdateFlexUserParams) SetLocale(Locale string) *UpdateFlexUserParams

func (*UpdateFlexUserParams) SetUserSid added in v1.22.4

func (params *UpdateFlexUserParams) SetUserSid(UserSid string) *UpdateFlexUserParams

Jump to

Keyboard shortcuts

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