Class: OnlinePayments::SDK::Domain::RefundResponse
- Inherits:
-
DataObject
- Object
- DataObject
- OnlinePayments::SDK::Domain::RefundResponse
- Defined in:
- lib/onlinepayments/sdk/domain/refund_response.rb
Instance Attribute Summary collapse
-
#id ⇒ String
The current value of id.
-
#refund_output ⇒ OnlinePayments::SDK::Domain::RefundOutput
The current value of refund_output.
-
#status ⇒ String
The current value of status.
-
#status_output ⇒ OnlinePayments::SDK::Domain::OrderStatusOutput
The current value of status_output.
Instance Method Summary collapse
Methods inherited from DataObject
Instance Attribute Details
#id ⇒ String
Returns the current value of id.
15 16 17 |
# File 'lib/onlinepayments/sdk/domain/refund_response.rb', line 15 def id @id end |
#refund_output ⇒ OnlinePayments::SDK::Domain::RefundOutput
Returns the current value of refund_output.
15 16 17 |
# File 'lib/onlinepayments/sdk/domain/refund_response.rb', line 15 def refund_output @refund_output end |
#status ⇒ String
Returns the current value of status.
15 16 17 |
# File 'lib/onlinepayments/sdk/domain/refund_response.rb', line 15 def status @status end |
#status_output ⇒ OnlinePayments::SDK::Domain::OrderStatusOutput
Returns the current value of status_output.
15 16 17 |
# File 'lib/onlinepayments/sdk/domain/refund_response.rb', line 15 def status_output @status_output end |
Instance Method Details
#from_hash(hash) ⇒ Object
35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 |
# File 'lib/onlinepayments/sdk/domain/refund_response.rb', line 35 def from_hash(hash) super if hash.has_key? 'id' @id = hash['id'] end if hash.has_key? 'refundOutput' raise TypeError, "value '%s' is not a Hash" % [hash['refundOutput']] unless hash['refundOutput'].is_a? Hash @refund_output = OnlinePayments::SDK::Domain::RefundOutput.new_from_hash(hash['refundOutput']) end if hash.has_key? 'status' @status = hash['status'] end if hash.has_key? 'statusOutput' raise TypeError, "value '%s' is not a Hash" % [hash['statusOutput']] unless hash['statusOutput'].is_a? Hash @status_output = OnlinePayments::SDK::Domain::OrderStatusOutput.new_from_hash(hash['statusOutput']) end end |
#to_h ⇒ Hash
26 27 28 29 30 31 32 33 |
# File 'lib/onlinepayments/sdk/domain/refund_response.rb', line 26 def to_h hash = super hash['id'] = @id unless @id.nil? hash['refundOutput'] = @refund_output.to_h unless @refund_output.nil? hash['status'] = @status unless @status.nil? hash['statusOutput'] = @status_output.to_h unless @status_output.nil? hash end |