Class: CorePro::Models::Envelope
- Defined in:
- lib/corepro/models/envelope.rb
Instance Attribute Summary collapse
-
#data ⇒ Object
Returns the value of attribute data.
-
#errors ⇒ Object
Returns the value of attribute errors.
-
#rawRequestBody ⇒ Object
Returns the value of attribute rawRequestBody.
-
#rawResponseBody ⇒ Object
Returns the value of attribute rawResponseBody.
-
#status ⇒ Object
Returns the value of attribute status.
Attributes inherited from ModelBase
Instance Method Summary collapse
Methods inherited from ModelBase
Methods inherited from JsonBase
Instance Attribute Details
#data ⇒ Object
Returns the value of attribute data.
7 8 9 |
# File 'lib/corepro/models/envelope.rb', line 7 def data @data end |
#errors ⇒ Object
Returns the value of attribute errors.
8 9 10 |
# File 'lib/corepro/models/envelope.rb', line 8 def errors @errors end |
#rawRequestBody ⇒ Object
Returns the value of attribute rawRequestBody.
10 11 12 |
# File 'lib/corepro/models/envelope.rb', line 10 def rawRequestBody @rawRequestBody end |
#rawResponseBody ⇒ Object
Returns the value of attribute rawResponseBody.
11 12 13 |
# File 'lib/corepro/models/envelope.rb', line 11 def rawResponseBody @rawResponseBody end |
#status ⇒ Object
Returns the value of attribute status.
9 10 11 |
# File 'lib/corepro/models/envelope.rb', line 9 def status @status end |
Instance Method Details
#from_json!(json, classDefs = {}) ⇒ Object
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
# File 'lib/corepro/models/envelope.rb', line 13 def from_json! json, classDefs = {} classDefs = classDefs || {} classDefs['errors'] = ApiError super json, classDefs if classDefs.has_key?('data') if @data.kind_of?(Array) @data.each {|item| if item.instance_variable_defined?('@requestId') item.requestId = @requestId end } else if @data.instance_variable_defined?('@requestId') @data.requestId = @requestId end end end self end |