Class: OrangeData::CorrectionResult
- Inherits:
-
PayloadContent
- Object
- PayloadContent
- OrangeData::CorrectionResult
- Defined in:
- lib/orange_data/receipt.rb
Instance Attribute Summary collapse
-
#content ⇒ Object
readonly
Returns the value of attribute content.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(payload) ⇒ CorrectionResult
constructor
A new instance of CorrectionResult.
Methods inherited from PayloadContent
#==, #assign_attributes, #attributes, #to_hash, #to_json
Constructor Details
#initialize(payload) ⇒ CorrectionResult
Returns a new instance of CorrectionResult.
228 229 230 231 |
# File 'lib/orange_data/receipt.rb', line 228 def initialize(payload) @payload = payload || {} @content = CorrectionContent.new(@payload["content"] || {}) end |
Instance Attribute Details
#content ⇒ Object (readonly)
Returns the value of attribute content.
238 239 240 |
# File 'lib/orange_data/receipt.rb', line 238 def content @content end |
Class Method Details
.from_hash(hash) ⇒ Object
233 234 235 236 |
# File 'lib/orange_data/receipt.rb', line 233 def self.from_hash(hash) raise ArgumentError, 'Expect hash here' unless hash.is_a?(Hash) new(hash) end |