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
#==, #as_json, #assign_attributes, #attributes, #to_hash, #to_json
Constructor Details
#initialize(payload) ⇒ CorrectionResult
Returns a new instance of CorrectionResult.
250 251 252 253 |
# File 'lib/orange_data/receipt.rb', line 250 def initialize(payload) super(payload || {}) @content = CorrectionContent.new(@payload["content"] || {}) end |
Instance Attribute Details
#content ⇒ Object (readonly)
Returns the value of attribute content.
262 263 264 |
# File 'lib/orange_data/receipt.rb', line 262 def content @content end |
Class Method Details
.from_hash(hash) ⇒ Object
255 256 257 258 259 260 |
# File 'lib/orange_data/receipt.rb', line 255 def self.from_hash(hash) return if hash.nil? raise ArgumentError, 'Expect hash here' unless hash.is_a?(Hash) new(hash) end |