Class: Ingenico::Connect::SDK::Domain::Refund::RefundResult
- Inherits:
-
Definitions::AbstractOrderStatus
- Object
- Ingenico::Connect::SDK::DataObject
- Definitions::AbstractOrderStatus
- Ingenico::Connect::SDK::Domain::Refund::RefundResult
- Defined in:
- lib/ingenico/connect/sdk/domain/refund/refund_result.rb
Direct Known Subclasses
Instance Attribute Summary collapse
Attributes inherited from Definitions::AbstractOrderStatus
Instance Method Summary collapse
Methods inherited from Ingenico::Connect::SDK::DataObject
Instance Attribute Details
#refund_output ⇒ Object
16 17 18 |
# File 'lib/ingenico/connect/sdk/domain/refund/refund_result.rb', line 16 def refund_output @refund_output end |
#status ⇒ Object
String
19 20 21 |
# File 'lib/ingenico/connect/sdk/domain/refund/refund_result.rb', line 19 def status @status end |
#status_output ⇒ Object
22 23 24 |
# File 'lib/ingenico/connect/sdk/domain/refund/refund_result.rb', line 22 def status_output @status_output end |
Instance Method Details
#from_hash(hash) ⇒ Object
32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 |
# File 'lib/ingenico/connect/sdk/domain/refund/refund_result.rb', line 32 def from_hash(hash) super if hash.has_key?('refundOutput') if !(hash['refundOutput'].is_a? Hash) raise TypeError, "value '%s' is not a Hash" % [hash['refundOutput']] end @refund_output = Ingenico::Connect::SDK::Domain::Payment::RefundOutput.new_from_hash(hash['refundOutput']) end if hash.has_key?('status') @status = hash['status'] end if hash.has_key?('statusOutput') if !(hash['statusOutput'].is_a? Hash) raise TypeError, "value '%s' is not a Hash" % [hash['statusOutput']] end @status_output = Ingenico::Connect::SDK::Domain::Definitions::OrderStatusOutput.new_from_hash(hash['statusOutput']) end end |
#to_h ⇒ Object
24 25 26 27 28 29 30 |
# File 'lib/ingenico/connect/sdk/domain/refund/refund_result.rb', line 24 def to_h hash = super add_to_hash(hash, 'refundOutput', @refund_output) add_to_hash(hash, 'status', @status) add_to_hash(hash, 'statusOutput', @status_output) hash end |