engagevoice

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2023 License: MIT Imports: 20 Imported by: 0

README

Go API client for engagevoice

No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)

Overview

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

  • API version: 1.0
  • Package version: 1.0.0
  • Build package: org.openapitools.codegen.languages.GoClientCodegen

Installation

Install the following dependencies:

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

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

import "./engagevoice"

Documentation for API Endpoints

All URIs are relative to https://portal.vacd.biz/api/v1

Class Method HTTP request Description
AgentsApi GetAgentGroups Get /admin/accounts/{accountId}/agentGroups Returns a listing of agent groups for an account
AgentsApi GetAgents Get /admin/accounts/{accountId}/agentGroups/{agentGroupId}/agents Returns a listing of agents for an agent group
CampaignsApi GetDialGroupCampaigns Get /admin/accounts/{accountId}/dialGroups/{dialGroupId}/campaigns Returns a listing of campaigns for a dial group
CountriesApi GetAvailableCountries Get /admin/accounts/{accountId}/countries/available Get a list of available countries
DialGroupsApi GetDialGroups Get /admin/accounts/{accountId}/dialGroups Returns a listing of dial groups for an account
LeadsApi UploadLeads Post /admin/accounts/{accountId}/campaigns/{campaignId}/leadLoader/direct Upload Leads

Documentation For Models

Documentation For Authorization

bearerAuth

  • 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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ContextOAuth2 takes an oauth2.TokenSource as authentication for the request.
	ContextOAuth2 = contextKey("token")

	// ContextBasicAuth takes BasicAuth as authentication for the request.
	ContextBasicAuth = contextKey("basic")

	// ContextAccessToken takes a string oauth2 access token as authentication for the request.
	ContextAccessToken = contextKey("accesstoken")

	// ContextAPIKey takes an APIKey as authentication for the request
	ContextAPIKey = contextKey("apikey")
)

Functions

func CacheExpires

func CacheExpires(r *http.Response) time.Time

CacheExpires helper function to determine remaining time before repeating a request.

Types

type APIClient

type APIClient struct {
	AgentsApi *AgentsApiService

	CampaignsApi *CampaignsApiService

	CountriesApi *CountriesApiService

	DialGroupsApi *DialGroupsApiService

	LeadsApi *LeadsApiService
	// contains filtered or unexported fields
}

APIClient manages communication with the RingCentral Engage Voice API API v1.0 In most cases there should be only one, shared, APIClient.

func NewAPIClient

func NewAPIClient(cfg *Configuration) *APIClient

NewAPIClient creates a new API client. Requires a userAgent string describing your application. optionally a custom http.Client to allow for advanced features such as caching.

func (*APIClient) ChangeBasePath

func (c *APIClient) ChangeBasePath(path string)

Change base path to allow switching to mocks

func (*APIClient) HTTPClient

func (apiClient *APIClient) HTTPClient() *http.Client

type APIKey

type APIKey struct {
	Key    string
	Prefix string
}

APIKey provides API key based authentication to a request passed via context using ContextAPIKey

type APIResponse

type APIResponse struct {
	*http.Response `json:"-"`
	Message        string `json:"message,omitempty"`
	// Operation is the name of the OpenAPI operation.
	Operation string `json:"operation,omitempty"`
	// RequestURL is the request URL. This value is always available, even if the
	// embedded *http.Response is nil.
	RequestURL string `json:"url,omitempty"`
	// Method is the HTTP method used for the request.  This value is always
	// available, even if the embedded *http.Response is nil.
	Method string `json:"method,omitempty"`
	// Payload holds the contents of the response body (which may be nil or empty).
	// This is provided here as the raw response.Body() reader will have already
	// been drained.
	Payload []byte `json:"-"`
}

func NewAPIResponse

func NewAPIResponse(r *http.Response) *APIResponse

func NewAPIResponseWithError

func NewAPIResponseWithError(errorMessage string) *APIResponse

type Agent

type Agent struct {
	AgentId                       int32     `json:"agentId,omitempty"`
	AgentRank                     int32     `json:"agentRank,omitempty"`
	AllowAgentReports             bool      `json:"allowAgentReports,omitempty"`
	AllowAgentStats               bool      `json:"allowAgentStats,omitempty"`
	AllowAutoAnswer               bool      `json:"allowAutoAnswer,omitempty"`
	AllowBlended                  bool      `json:"allowBlended,omitempty"`
	AllowCallControl              bool      `json:"allowCallControl,omitempty"`
	AllowCampStats                bool      `json:"allowCampStats,omitempty"`
	AllowChat                     bool      `json:"allowChat,omitempty"`
	AllowChatStats                bool      `json:"allowChatStats,omitempty"`
	AllowChatVoiceConcurrent      bool      `json:"allowChatVoiceConcurrent,omitempty"`
	AllowCrossGateRequeue         bool      `json:"allowCrossGateRequeue,omitempty"`
	AllowEndcallforeveryone       bool      `json:"allowEndcallforeveryone,omitempty"`
	AllowExternalChat             bool      `json:"allowExternalChat,omitempty"`
	AllowFromIpAddresses          string    `json:"allowFromIpAddresses,omitempty"`
	AllowGateStats                bool      `json:"allowGateStats,omitempty"`
	AllowHangup                   bool      `json:"allowHangup,omitempty"`
	AllowHistoricalDialing        bool      `json:"allowHistoricalDialing,omitempty"`
	AllowHold                     bool      `json:"allowHold,omitempty"`
	AllowInbound                  bool      `json:"allowInbound,omitempty"`
	AllowInboundIntlTransfer      bool      `json:"allowInboundIntlTransfer,omitempty"`
	AllowLeadInserts              bool      `json:"allowLeadInserts,omitempty"`
	AllowLoginControl             bool      `json:"allowLoginControl,omitempty"`
	AllowLoginUpdates             bool      `json:"allowLoginUpdates,omitempty"`
	AllowManualCalls              bool      `json:"allowManualCalls,omitempty"`
	AllowManualIntlCalls          bool      `json:"allowManualIntlCalls,omitempty"`
	AllowManualIntlTransfer       bool      `json:"allowManualIntlTransfer,omitempty"`
	AllowManualOutboundGates      bool      `json:"allowManualOutboundGates,omitempty"`
	AllowManualPass               bool      `json:"allowManualPass,omitempty"`
	AllowOffHook                  bool      `json:"allowOffHook,omitempty"`
	AllowOutbound                 bool      `json:"allowOutbound,omitempty"`
	AllowRequeue                  bool      `json:"allowRequeue,omitempty"`
	AllowSelfAgentStats           bool      `json:"allowSelfAgentStats,omitempty"`
	AllowTransfer                 bool      `json:"allowTransfer,omitempty"`
	AltDefaultLoginDest           string    `json:"altDefaultLoginDest,omitempty"`
	DefaultAutoAnswerOn           bool      `json:"defaultAutoAnswerOn,omitempty"`
	DefaultLoginDest              string    `json:"defaultLoginDest,omitempty"`
	DirectAgentExtension          string    `json:"directAgentExtension,omitempty"`
	DisableSupervisorMonitoring   bool      `json:"disableSupervisorMonitoring,omitempty"`
	Email                         string    `json:"email,omitempty"`
	EnableSoftphone               bool      `json:"enableSoftphone,omitempty"`
	ExternalAgentId               string    `json:"externalAgentId,omitempty"`
	FirstName                     string    `json:"firstName,omitempty"`
	GatesControlAgentVisibility   bool      `json:"gatesControlAgentVisibility,omitempty"`
	GhostRnaAction                string    `json:"ghostRnaAction,omitempty"`
	InitLoginBaseState            string    `json:"initLoginBaseState,omitempty"`
	InitLoginBaseStateId          int32     `json:"initLoginBaseStateId,omitempty"`
	IsActive                      bool      `json:"isActive,omitempty"`
	LastLoginDate                 time.Time `json:"lastLoginDate,omitempty"`
	LastName                      string    `json:"lastName,omitempty"`
	LoadBalanceEnabled            bool      `json:"loadBalanceEnabled,omitempty"`
	Location                      string    `json:"location,omitempty"`
	ManualOutboundDefaultCallerId string    `json:"manualOutboundDefaultCallerId,omitempty"`
	MaxChats                      int32     `json:"maxChats,omitempty"`
	MultiAccountAgent             bool      `json:"multiAccountAgent,omitempty"`
	ParentAgentId                 int32     `json:"parentAgentId,omitempty"`
	Password                      string    `json:"password,omitempty"`
	PhoneLoginPin                 string    `json:"phoneLoginPin,omitempty"`
	RcUserId                      int64     `json:"rcUserId,omitempty"`
	ShowLeadHistory               bool      `json:"showLeadHistory,omitempty"`
	SoftphoneId                   int32     `json:"softphoneId,omitempty"`
	Team                          string    `json:"team,omitempty"`
	TransientAgent                bool      `json:"transientAgent,omitempty"`
	TransientDelete               bool      `json:"transientDelete,omitempty"`
	TransientDeleteDate           time.Time `json:"transientDeleteDate,omitempty"`
	UserManagedByRC               bool      `json:"userManagedByRC,omitempty"`
	Username                      string    `json:"username,omitempty"`
}

type AgentGroup

type AgentGroup struct {
	AgentGroupId int64  `json:"agentGroupId,omitempty"`
	GroupName    string `json:"groupName,omitempty"`
	IsDefault    bool   `json:"isDefault,omitempty"`
}

WIP: `permissions` is an array that needs definition

type AgentsApiService

type AgentsApiService service

func (*AgentsApiService) GetAgentGroups

func (a *AgentsApiService) GetAgentGroups(ctx context.Context, accountId string) ([]AgentGroup, *http.Response, error)

AgentsApiService Returns a listing of agent groups for an account

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param accountId

@return []AgentGroup

func (*AgentsApiService) GetAgents

func (a *AgentsApiService) GetAgents(ctx context.Context, accountId string, agentGroupId string) ([]Agent, *http.Response, error)

AgentsApiService Returns a listing of agents for an agent group

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param accountId
  • @param agentGroupId

@return []Agent

type BasicAuth

type BasicAuth struct {
	UserName string `json:"userName,omitempty"`
	Password string `json:"password,omitempty"`
}

BasicAuth provides basic http authentication to a request passed via context using ContextBasicAuth

type Campaign

type Campaign struct {
	CampaignDesc string                   `json:"campaignDesc,omitempty"`
	CampaignId   int64                    `json:"campaignId,omitempty"`
	CampaignName string                   `json:"campaignName,omitempty"`
	DialGroup    Generic                  `json:"dialGroup,omitempty"`
	IsActive     int64                    `json:"isActive,omitempty"`
	Permissions  []map[string]interface{} `json:"permissions,omitempty"`
	Script       Generic                  `json:"script,omitempty"`
}

type CampaignsApiService

type CampaignsApiService service

func (*CampaignsApiService) GetDialGroupCampaigns

func (a *CampaignsApiService) GetDialGroupCampaigns(ctx context.Context, accountId string, dialGroupId string) ([]Campaign, *http.Response, error)

CampaignsApiService Returns a listing of campaigns for a dial group

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param accountId
  • @param dialGroupId

@return []Campaign

type Configuration

type Configuration struct {
	BasePath      string            `json:"basePath,omitempty"`
	Host          string            `json:"host,omitempty"`
	Scheme        string            `json:"scheme,omitempty"`
	DefaultHeader map[string]string `json:"defaultHeader,omitempty"`
	UserAgent     string            `json:"userAgent,omitempty"`
	HTTPClient    *http.Client
}

func NewConfiguration

func NewConfiguration() *Configuration

func (*Configuration) AddDefaultHeader

func (c *Configuration) AddDefaultHeader(key string, value string)

type CountriesApiService

type CountriesApiService service

func (*CountriesApiService) GetAvailableCountries

func (a *CountriesApiService) GetAvailableCountries(ctx context.Context, accountId string) ([]Country, *http.Response, error)

CountriesApiService Get a list of available countries

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param accountId

@return []Country

type Country

type Country struct {
	CountryCode string `json:"countryCode"`
	// Country code i ISO 3166-1 alpha-3 format
	CountryId    string `json:"countryId,omitempty"`
	CountryName  string `json:"countryName,omitempty"`
	MaxAniLength int32  `json:"maxAniLength,omitempty"`
	MaxUtcOffset int32  `json:"maxUtcOffset,omitempty"`
	MinAniLength int32  `json:"minAniLength,omitempty"`
	MinUtcOffset int32  `json:"minUtcOffset,omitempty"`
}

type DialGroup

type DialGroup struct {
	AgentDialGroupMembers map[string]interface{} `json:"agentDialGroupMembers,omitempty"`
	DialGroupDesc         string                 `json:"dialGroupDesc,omitempty"`
	DialGroupId           int64                  `json:"dialGroupId,omitempty"`
	DialGroupName         string                 `json:"dialGroupName,omitempty"`
	// Can be `PREDICTIVE`
	DialMode string `json:"dialMode,omitempty"`
	// Can be `DISABLED`
	HciEnabled  string                   `json:"hciEnabled,omitempty"`
	IsActive    bool                     `json:"isActive,omitempty"`
	Permissions []map[string]interface{} `json:"permissions,omitempty"`
}

type DialGroupsApiService

type DialGroupsApiService service

func (*DialGroupsApiService) GetDialGroups

func (a *DialGroupsApiService) GetDialGroups(ctx context.Context, accountId string) ([]DialGroup, *http.Response, error)

DialGroupsApiService Returns a listing of dial groups for an account

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param accountId

@return []DialGroup

type Error

type Error struct {
	Details        string `json:"details,omitempty"`
	GeneralMessage string `json:"generalMessage,omitempty"`
	RequestUri     string `json:"requestUri,omitempty"`
	Timestamp      int64  `json:"timestamp,omitempty"`
}

type ExtendedLeadData

type ExtendedLeadData struct {
	Important  string `json:"important,omitempty"`
	Interested bool   `json:"interested,omitempty"`
}

type Generic

type Generic struct {
	Description string `json:"description,omitempty"`
	Id          int64  `json:"id,omitempty"`
}

type GenericOpenAPIError

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

GenericOpenAPIError Provides access to the body, error and model on returned errors.

func (GenericOpenAPIError) Body

func (e GenericOpenAPIError) Body() []byte

Body returns the raw bytes of the response

func (GenericOpenAPIError) Error

func (e GenericOpenAPIError) Error() string

Error returns non-empty string if there was an error.

func (GenericOpenAPIError) Model

func (e GenericOpenAPIError) Model() interface{}

Model returns the unpacked model of the error

type Lead

type Lead struct {
	Address1         string           `json:"address1,omitempty"`
	Address2         string           `json:"address2,omitempty"`
	AuxData1         string           `json:"auxData1,omitempty"`
	AuxData2         string           `json:"auxData2,omitempty"`
	AuxData3         string           `json:"auxData3,omitempty"`
	AuxData4         string           `json:"auxData4,omitempty"`
	AuxData5         string           `json:"auxData5,omitempty"`
	AuxPhone         string           `json:"auxPhone,omitempty"`
	City             string           `json:"city,omitempty"`
	Email            string           `json:"email,omitempty"`
	ExtendedLeadData ExtendedLeadData `json:"extendedLeadData,omitempty"`
	ExternId         int64            `json:"externId"`
	FirstName        string           `json:"firstName,omitempty"`
	GateKeeper       string           `json:"gateKeeper,omitempty"`
	LastName         string           `json:"lastName,omitempty"`
	// multiple values can be submitted with a pipe delimiter between phone numbers
	LeadPhone string `json:"leadPhone,omitempty"`
	MidName   string `json:"midName,omitempty"`
	State     string `json:"state,omitempty"`
	Suffix    string `json:"suffix,omitempty"`
	Title     string `json:"title,omitempty"`
	Zip       string `json:"zip,omitempty"`
}

type LeadsApiService

type LeadsApiService service

func (*LeadsApiService) UploadLeads

func (a *LeadsApiService) UploadLeads(ctx context.Context, accountId string, campaignId string, uploadLeadsRequest UploadLeadsRequest) (UploadLeadsResponse, *http.Response, error)

LeadsApiService Upload Leads Uploads a single lead or list of leads to a new or existing list

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param accountId
  • @param campaignId
  • @param uploadLeadsRequest

@return UploadLeadsResponse

type UploadLeadsRequest

type UploadLeadsRequest struct {
	Description string `json:"description,omitempty"`
	// Setting this to `IMMEDIATE` allows you to insert a lead to the top of the dialer cache for immediate dialing if you want a normal insert then do not add this parameter.
	DialPriority      string `json:"dialPriority,omitempty"`
	DuplicateHandling string `json:"duplicateHandling,omitempty"`
	ListState         string `json:"listState,omitempty"`
	TimeZoneOption    string `json:"timeZoneOption,omitempty"`
	UploadLeads       []Lead `json:"uploadLeads,omitempty"`
}

type UploadLeadsResponse

type UploadLeadsResponse struct {
	DeletedCount     int32  `json:"deletedCount"`
	DncReturnedCount int32  `json:"dncReturnedCount"`
	DncUploadCount   int32  `json:"dncUploadCount"`
	HasDeletedLeads  bool   `json:"hasDeletedLeads"`
	InternalDncCount int32  `json:"internalDncCount"`
	LeadsAccepted    int32  `json:"leadsAccepted"`
	LeadsConverted   int32  `json:"leadsConverted"`
	LeadsInserted    int32  `json:"leadsInserted"`
	LeadsSupplied    int32  `json:"leadsSupplied"`
	ListState        string `json:"listState"`
	// Values can be `Your uploaded lead list has successfully completed processing` or `Your uploaded lead list file processing has failed`
	Message string `json:"message"`
	// Values can be `OK` or `Failed`
	ProcessingResult string `json:"processingResult"`
	// Values can be `DEFAULT_NOT_A_FAILURE` or `GENERAL_FAILURE`
	ProcessingStatus string `json:"processingStatus"`
	QuotaCount       int32  `json:"quotaCount"`
	TimeZoneOption   string `json:"timeZoneOption"`
	UploadFileName   string `json:"uploadFileName"`
	WhitelistCount   int32  `json:"whitelistCount"`
}

Jump to

Keyboard shortcuts

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