Class: Ingenico::Connect::SDK::Domain::Payment::RefundOutput
- Inherits:
-
OrderOutput
- Object
- Ingenico::Connect::SDK::DataObject
- OrderOutput
- Ingenico::Connect::SDK::Domain::Payment::RefundOutput
- Defined in:
- lib/ingenico/connect/sdk/domain/payment/refund_output.rb
Instance Attribute Summary collapse
-
#amount_paid ⇒ Integer
The current value of amount_paid.
-
#bank_refund_method_specific_output ⇒ Ingenico::Connect::SDK::Domain::Payment::RefundBankMethodSpecificOutput
The current value of bank_refund_method_specific_output.
-
#card_refund_method_specific_output ⇒ Ingenico::Connect::SDK::Domain::Payment::RefundCardMethodSpecificOutput
The current value of card_refund_method_specific_output.
-
#e_invoice_refund_method_specific_output ⇒ Ingenico::Connect::SDK::Domain::Payment::RefundEInvoiceMethodSpecificOutput
The current value of e_invoice_refund_method_specific_output.
-
#e_wallet_refund_method_specific_output ⇒ Ingenico::Connect::SDK::Domain::Payment::RefundEWalletMethodSpecificOutput
The current value of e_wallet_refund_method_specific_output.
-
#mobile_refund_method_specific_output ⇒ Ingenico::Connect::SDK::Domain::Payment::RefundMobileMethodSpecificOutput
The current value of mobile_refund_method_specific_output.
-
#payment_method ⇒ String
The current value of payment_method.
Attributes inherited from OrderOutput
Instance Method Summary collapse
Methods inherited from Ingenico::Connect::SDK::DataObject
Instance Attribute Details
#amount_paid ⇒ Integer
Returns the current value of amount_paid.
23 24 25 |
# File 'lib/ingenico/connect/sdk/domain/payment/refund_output.rb', line 23 def amount_paid @amount_paid end |
#bank_refund_method_specific_output ⇒ Ingenico::Connect::SDK::Domain::Payment::RefundBankMethodSpecificOutput
Returns the current value of bank_refund_method_specific_output.
23 24 25 |
# File 'lib/ingenico/connect/sdk/domain/payment/refund_output.rb', line 23 def bank_refund_method_specific_output @bank_refund_method_specific_output end |
#card_refund_method_specific_output ⇒ Ingenico::Connect::SDK::Domain::Payment::RefundCardMethodSpecificOutput
Returns the current value of card_refund_method_specific_output.
23 24 25 |
# File 'lib/ingenico/connect/sdk/domain/payment/refund_output.rb', line 23 def card_refund_method_specific_output @card_refund_method_specific_output end |
#e_invoice_refund_method_specific_output ⇒ Ingenico::Connect::SDK::Domain::Payment::RefundEInvoiceMethodSpecificOutput
Returns the current value of e_invoice_refund_method_specific_output.
23 24 25 |
# File 'lib/ingenico/connect/sdk/domain/payment/refund_output.rb', line 23 def e_invoice_refund_method_specific_output @e_invoice_refund_method_specific_output end |
#e_wallet_refund_method_specific_output ⇒ Ingenico::Connect::SDK::Domain::Payment::RefundEWalletMethodSpecificOutput
Returns the current value of e_wallet_refund_method_specific_output.
23 24 25 |
# File 'lib/ingenico/connect/sdk/domain/payment/refund_output.rb', line 23 def e_wallet_refund_method_specific_output @e_wallet_refund_method_specific_output end |
#mobile_refund_method_specific_output ⇒ Ingenico::Connect::SDK::Domain::Payment::RefundMobileMethodSpecificOutput
Returns the current value of mobile_refund_method_specific_output.
23 24 25 |
# File 'lib/ingenico/connect/sdk/domain/payment/refund_output.rb', line 23 def mobile_refund_method_specific_output @mobile_refund_method_specific_output end |
#payment_method ⇒ String
Returns the current value of payment_method.
23 24 25 |
# File 'lib/ingenico/connect/sdk/domain/payment/refund_output.rb', line 23 def payment_method @payment_method end |
Instance Method Details
#from_hash(hash) ⇒ Object
52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 |
# File 'lib/ingenico/connect/sdk/domain/payment/refund_output.rb', line 52 def from_hash(hash) super if hash.has_key? 'amountPaid' @amount_paid = hash['amountPaid'] end if hash.has_key? 'bankRefundMethodSpecificOutput' raise TypeError, "value '%s' is not a Hash" % [hash['bankRefundMethodSpecificOutput']] unless hash['bankRefundMethodSpecificOutput'].is_a? Hash @bank_refund_method_specific_output = Ingenico::Connect::SDK::Domain::Payment::RefundBankMethodSpecificOutput.new_from_hash(hash['bankRefundMethodSpecificOutput']) end if hash.has_key? 'cardRefundMethodSpecificOutput' raise TypeError, "value '%s' is not a Hash" % [hash['cardRefundMethodSpecificOutput']] unless hash['cardRefundMethodSpecificOutput'].is_a? Hash @card_refund_method_specific_output = Ingenico::Connect::SDK::Domain::Payment::RefundCardMethodSpecificOutput.new_from_hash(hash['cardRefundMethodSpecificOutput']) end if hash.has_key? 'eInvoiceRefundMethodSpecificOutput' raise TypeError, "value '%s' is not a Hash" % [hash['eInvoiceRefundMethodSpecificOutput']] unless hash['eInvoiceRefundMethodSpecificOutput'].is_a? Hash @e_invoice_refund_method_specific_output = Ingenico::Connect::SDK::Domain::Payment::RefundEInvoiceMethodSpecificOutput.new_from_hash(hash['eInvoiceRefundMethodSpecificOutput']) end if hash.has_key? 'eWalletRefundMethodSpecificOutput' raise TypeError, "value '%s' is not a Hash" % [hash['eWalletRefundMethodSpecificOutput']] unless hash['eWalletRefundMethodSpecificOutput'].is_a? Hash @e_wallet_refund_method_specific_output = Ingenico::Connect::SDK::Domain::Payment::RefundEWalletMethodSpecificOutput.new_from_hash(hash['eWalletRefundMethodSpecificOutput']) end if hash.has_key? 'mobileRefundMethodSpecificOutput' raise TypeError, "value '%s' is not a Hash" % [hash['mobileRefundMethodSpecificOutput']] unless hash['mobileRefundMethodSpecificOutput'].is_a? Hash @mobile_refund_method_specific_output = Ingenico::Connect::SDK::Domain::Payment::RefundMobileMethodSpecificOutput.new_from_hash(hash['mobileRefundMethodSpecificOutput']) end if hash.has_key? 'paymentMethod' @payment_method = hash['paymentMethod'] end end |
#to_h ⇒ Hash
40 41 42 43 44 45 46 47 48 49 50 |
# File 'lib/ingenico/connect/sdk/domain/payment/refund_output.rb', line 40 def to_h hash = super hash['amountPaid'] = @amount_paid unless @amount_paid.nil? hash['bankRefundMethodSpecificOutput'] = @bank_refund_method_specific_output.to_h unless @bank_refund_method_specific_output.nil? hash['cardRefundMethodSpecificOutput'] = @card_refund_method_specific_output.to_h unless @card_refund_method_specific_output.nil? hash['eInvoiceRefundMethodSpecificOutput'] = @e_invoice_refund_method_specific_output.to_h unless @e_invoice_refund_method_specific_output.nil? hash['eWalletRefundMethodSpecificOutput'] = @e_wallet_refund_method_specific_output.to_h unless @e_wallet_refund_method_specific_output.nil? hash['mobileRefundMethodSpecificOutput'] = @mobile_refund_method_specific_output.to_h unless @mobile_refund_method_specific_output.nil? hash['paymentMethod'] = @payment_method unless @payment_method.nil? hash end |