class Ingenico::Connect::SDK::Domain::Refund::RefundResult
@attr [Ingenico::Connect::SDK::Domain::Payment::RefundOutput] refund_output
@attr [String] status @attr [Ingenico::Connect::SDK::Domain::Definitions::OrderStatusOutput] status_output
Attributes
refund_output[RW]
status[RW]
status_output[RW]
Public Instance Methods
from_hash(hash)
click to toggle source
Calls superclass method
Ingenico::Connect::SDK::Domain::Definitions::AbstractOrderStatus#from_hash
# File lib/ingenico/connect/sdk/domain/refund/refund_result.rb, line 33 def from_hash(hash) super if hash.has_key? 'refundOutput' raise TypeError, "value '%s' is not a Hash" % [hash['refundOutput']] unless hash['refundOutput'].is_a? Hash @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' raise TypeError, "value '%s' is not a Hash" % [hash['statusOutput']] unless hash['statusOutput'].is_a? Hash @status_output = Ingenico::Connect::SDK::Domain::Definitions::OrderStatusOutput.new_from_hash(hash['statusOutput']) end end
to_h()
click to toggle source
@return (Hash)
Calls superclass method
Ingenico::Connect::SDK::Domain::Definitions::AbstractOrderStatus#to_h
# File lib/ingenico/connect/sdk/domain/refund/refund_result.rb, line 25 def to_h hash = super 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