Class: InfobipApi::ObjectFieldConverter
- Inherits:
-
FieldConversionRule
- Object
- FieldConversionRule
- InfobipApi::ObjectFieldConverter
- Defined in:
- lib/infobipapi/objects.rb
Instance Attribute Summary
Attributes inherited from FieldConversionRule
#json_field_name, #object_field_name
Instance Method Summary collapse
- #from_json(value) ⇒ Object
-
#initialize(classs, json_field_name = nil) ⇒ ObjectFieldConverter
constructor
A new instance of ObjectFieldConverter.
- #to_json(value) ⇒ Object
Constructor Details
#initialize(classs, json_field_name = nil) ⇒ ObjectFieldConverter
Returns a new instance of ObjectFieldConverter.
35 36 37 38 |
# File 'lib/infobipapi/objects.rb', line 35 def initialize(classs, json_field_name=nil) super(json_field_name) @classs = classs end |
Instance Method Details
#from_json(value) ⇒ Object
40 41 42 43 44 45 46 |
# File 'lib/infobipapi/objects.rb', line 40 def from_json(value) if value == nil return nil end return Conversions.from_json(@classs, value, nil) end |
#to_json(value) ⇒ Object
48 49 50 51 |
# File 'lib/infobipapi/objects.rb', line 48 def to_json(value) # TODO end |