swagger_client

SwaggerClient – the Ruby gem for the <PBXDom API>

This SDK is automatically generated by the Swagger Codegen project:

Installation

Build a gem

To build the Ruby code into a gem:

gem build swagger_client.gemspec

Then either install the gem locally:

gem install ./swagger_client-1.0.0.gem

(for development, run gem install --dev ./swagger_client-1.0.0.gem to install the development dependencies)

or publish the gem to a gem hosting service, e.g. RubyGems.

Finally add this to the Gemfile:

gem 'swagger_client', '~> 1.0.0'

Install from Git

If the Ruby gem is hosted at a git repository: https://github.com/YOUR_GIT_USERNAME/YOUR_GIT_REPO, then add the following in the Gemfile:

gem 'swagger_client', :git => 'https://github.com/YOUR_GIT_USERNAME/YOUR_GIT_REPO.git'

Include the Ruby code directly

Include the Ruby code directly using -I as follows:

ruby -Ilib script.rb

Getting Started

Please follow the installation procedure and then run the following code:

# Load the gem
require 'swagger_client'

api_instance = SwaggerClient::DefaultApi.new

rpt_type = 1.2 # Float | Report type. (0 report, 1 widget, 2 chart).

rpt_id = 1.2 # Float | Report id.

opts = { 
  start: 3.4, # Float | Start offset.
  limit: 3.4, # Float | Number of results to return. Max 10K.
  sort_by: "sort_by_example", # String | Sort column.
  sort_type: "sort_type_example", # String | Sort mode asc/desc.
  from_date: "from_date_example", # String | Start date time.
  to_date: "to_date_example", # String | End date time.
  duration: 3.4, # Float | Duration range.
  phone: "phone_example", # String | List of caller phone.
  phone1: "phone1_example", # String | List of dialled phones.
  co: "co_example", # String | List of trunk/co.
  ext: "ext_example", # String | list of extensions.
  pbx_id: 3.4, # Float | list of PBX Ids.
  call_source: 3.4, # Float | list of callsource.
  call_type: 3.4, # Float | list of call type signatures.(5 Unanswered Calls, 7 Transfered Calls, 8 Forwarded Calls)
  direction: 3.4, # Float | list of direction.(0 incoming, 1 outgoing, 2 internal)
  caller_name: "caller_name_example", # String | list of caller name.
  did: "did_example", # String | list of did.
  dnis: "dnis_example", # String | list of dnis.
  acc: "acc_example", # String | list of account code.
  ring: 3.4, # Float | Ring range.Seconds unit.
  cost: 3.4, # Float | Cost range.
  group: 3.4 # Float | Department/Group id.
}

begin
  result = api_instance.calls_get(rpt_type, rpt_id, opts)
  p result
rescue SwaggerClient::ApiError => e
  puts "Exception when calling DefaultApi->calls_get: #{e}"
end

Documentation for API Endpoints

All URIs are relative to https://api.pbxdom.com

ClassMethodHTTP requestDescription
SwaggerClient::DefaultApicalls_getGET /Calls
SwaggerClient::DefaultApifeatures_charts_getGET /Features/charts
SwaggerClient::DefaultApifeatures_reports_getGET /Features/reports
SwaggerClient::DefaultApifeatures_widget_getGET /Features/widget

Download Ruby Sample Code