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, #to_hash, #to_json
Constructor Details
#initialize(payload) ⇒ CorrectionResult
Returns a new instance of CorrectionResult.
223 224 225 226 |
# File 'lib/orange_data/receipt.rb', line 223 def initialize(payload) @payload = payload || {} @content = CorrectionContent.new(@payload["content"] || {}) end |
Instance Attribute Details
#content ⇒ Object (readonly)
Returns the value of attribute content.
233 234 235 |
# File 'lib/orange_data/receipt.rb', line 233 def content @content end |
Class Method Details
.from_hash(hash) ⇒ Object
228 229 230 231 |
# File 'lib/orange_data/receipt.rb', line 228 def self.from_hash(hash) raise ArgumentError, 'Expect hash here' unless hash.is_a?(Hash) new(hash) end |