Class: DIDWW::ComplexObject::ExportFilters

Inherits:
Base
  • Object
show all
Defined in:
lib/didww/complex_objects/export_filters.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Base

#[], #[]=, #as_json_api, #attributes, cast, #initialize, property, schema, type, #type

Constructor Details

This class inherits a constructor from DIDWW::ComplexObject::Base

Class Method Details

.cast_single_object(hash) ⇒ Object

Type casting for JsonApiClient parser/setters



8
9
10
# File 'lib/didww/complex_objects/export_filters.rb', line 8

def self.cast_single_object(hash)
  new(hash)
end

Instance Method Details

#as_jsonObject



18
19
20
21
22
# File 'lib/didww/complex_objects/export_filters.rb', line 18

def as_json(*)
  result = attributes.as_json.with_indifferent_access
  result[:'voice_out_trunk.id'] = result.delete(:voice_out_trunk_id) if result.key?(:voice_out_trunk_id)
  result
end