Class: WavixApi::V1::Cdrs::AdvancedSearch

Inherits:
Object
  • Object
show all
Includes:
BaseMethods, CommonVars
Defined in:
lib/wavix_api/v1/cdrs/advanced_search.rb

Constant Summary collapse

TRANSCRIPTION_SPEAKER_SCHEMA =
{
  type: 'object',
  properties: {
    must: {
      type: 'array',
      items: { type: 'string' }.freeze
    }.freeze,
    match: {
      type: 'array',
      items: { type: 'string' }.freeze
    }.freeze,
    exclude: {
      type: 'array',
      items: { type: 'string' }.freeze
    }.freeze
  }.freeze
}.freeze

Constants included from BaseMethods

BaseMethods::AVAILABLE_TRANSCRIPTION_LANGUAGES, BaseMethods::BASE_DATE_FORMAT, BaseMethods::DEFAULT_HEADERS, BaseMethods::IP_REGEXP, BaseMethods::LIST_OF_DIGITS_REGEXP, BaseMethods::ONLY_DIGITS_REGEXP, BaseMethods::ONLY_ID_SCHEMA, BaseMethods::ONLY_UUID_SCHEMA, BaseMethods::PAGINATION_SCHEMA

Constants included from CommonVars

CommonVars::CDR_FIELDS_SCHEMA, CommonVars::CDR_REQUIRED_FIELDS, CommonVars::DATE_FIELDS

Instance Attribute Summary

Attributes included from BaseMethods

#client, #id, #params

Class Method Summary collapse

Methods included from BaseMethods

#call, #delete, #download, #file_extention, #format_file, #get, #initialize, #patch, #post, #put, #raise_error, #stringify_dates!, #validate!, #validate_dates!

Class Method Details

.call(params = {}) ⇒ Object



53
54
55
56
57
58
59
60
61
62
# File 'lib/wavix_api/v1/cdrs/advanced_search.rb', line 53

def call(params = {})
  instance = new(params)

  instance.validate!
  instance.validate_dates!(::WavixApi::V1::Cdrs::CommonVars::DATE_FIELDS)

  instance.stringify_dates!(instance.params,
                            fields: ::WavixApi::V1::Cdrs::CommonVars::DATE_FIELDS)
  instance.post('v1/cdr')
end