Class: OnlinePayments::SDK::Domain::RefundOutput
- Inherits:
-
DataObject
- Object
- DataObject
- OnlinePayments::SDK::Domain::RefundOutput
- Defined in:
- lib/onlinepayments/sdk/domain/refund_output.rb
Instance Attribute Summary collapse
-
#amount_of_money ⇒ OnlinePayments::SDK::Domain::AmountOfMoney
The current value of amount_of_money.
-
#amount_paid ⇒ Integer
The current value of amount_paid.
-
#card_refund_method_specific_output ⇒ OnlinePayments::SDK::Domain::RefundCardMethodSpecificOutput
The current value of card_refund_method_specific_output.
-
#e_wallet_refund_method_specific_output ⇒ OnlinePayments::SDK::Domain::RefundEWalletMethodSpecificOutput
The current value of e_wallet_refund_method_specific_output.
-
#merchant_parameters ⇒ String
The current value of merchant_parameters.
-
#mobile_refund_method_specific_output ⇒ OnlinePayments::SDK::Domain::RefundMobileMethodSpecificOutput
The current value of mobile_refund_method_specific_output.
-
#operation_references ⇒ OnlinePayments::SDK::Domain::OperationPaymentReferences
The current value of operation_references.
-
#payment_method ⇒ String
The current value of payment_method.
-
#redirect_refund_method_specific_output ⇒ OnlinePayments::SDK::Domain::RefundRedirectMethodSpecificOutput
The current value of redirect_refund_method_specific_output.
-
#references ⇒ OnlinePayments::SDK::Domain::PaymentReferences
The current value of references.
Instance Method Summary collapse
Methods inherited from DataObject
Instance Attribute Details
#amount_of_money ⇒ OnlinePayments::SDK::Domain::AmountOfMoney
Returns the current value of amount_of_money.
26 27 28 |
# File 'lib/onlinepayments/sdk/domain/refund_output.rb', line 26 def amount_of_money @amount_of_money end |
#amount_paid ⇒ Integer
Returns the current value of amount_paid.
26 27 28 |
# File 'lib/onlinepayments/sdk/domain/refund_output.rb', line 26 def amount_paid @amount_paid end |
#card_refund_method_specific_output ⇒ OnlinePayments::SDK::Domain::RefundCardMethodSpecificOutput
Returns the current value of card_refund_method_specific_output.
26 27 28 |
# File 'lib/onlinepayments/sdk/domain/refund_output.rb', line 26 def card_refund_method_specific_output @card_refund_method_specific_output end |
#e_wallet_refund_method_specific_output ⇒ OnlinePayments::SDK::Domain::RefundEWalletMethodSpecificOutput
Returns the current value of e_wallet_refund_method_specific_output.
26 27 28 |
# File 'lib/onlinepayments/sdk/domain/refund_output.rb', line 26 def e_wallet_refund_method_specific_output @e_wallet_refund_method_specific_output end |
#merchant_parameters ⇒ String
Returns the current value of merchant_parameters.
26 27 28 |
# File 'lib/onlinepayments/sdk/domain/refund_output.rb', line 26 def merchant_parameters @merchant_parameters end |
#mobile_refund_method_specific_output ⇒ OnlinePayments::SDK::Domain::RefundMobileMethodSpecificOutput
Returns the current value of mobile_refund_method_specific_output.
26 27 28 |
# File 'lib/onlinepayments/sdk/domain/refund_output.rb', line 26 def mobile_refund_method_specific_output @mobile_refund_method_specific_output end |
#operation_references ⇒ OnlinePayments::SDK::Domain::OperationPaymentReferences
Returns the current value of operation_references.
26 27 28 |
# File 'lib/onlinepayments/sdk/domain/refund_output.rb', line 26 def operation_references @operation_references end |
#payment_method ⇒ String
Returns the current value of payment_method.
26 27 28 |
# File 'lib/onlinepayments/sdk/domain/refund_output.rb', line 26 def payment_method @payment_method end |
#redirect_refund_method_specific_output ⇒ OnlinePayments::SDK::Domain::RefundRedirectMethodSpecificOutput
Returns the current value of redirect_refund_method_specific_output.
26 27 28 |
# File 'lib/onlinepayments/sdk/domain/refund_output.rb', line 26 def redirect_refund_method_specific_output @redirect_refund_method_specific_output end |
#references ⇒ OnlinePayments::SDK::Domain::PaymentReferences
Returns the current value of references.
26 27 28 |
# File 'lib/onlinepayments/sdk/domain/refund_output.rb', line 26 def references @references end |
Instance Method Details
#from_hash(hash) ⇒ Object
64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 |
# File 'lib/onlinepayments/sdk/domain/refund_output.rb', line 64 def from_hash(hash) super if hash.has_key? 'amountOfMoney' raise TypeError, "value '%s' is not a Hash" % [hash['amountOfMoney']] unless hash['amountOfMoney'].is_a? Hash @amount_of_money = OnlinePayments::SDK::Domain::AmountOfMoney.new_from_hash(hash['amountOfMoney']) end if hash.has_key? 'amountPaid' @amount_paid = hash['amountPaid'] 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 = OnlinePayments::SDK::Domain::RefundCardMethodSpecificOutput.new_from_hash(hash['cardRefundMethodSpecificOutput']) 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 = OnlinePayments::SDK::Domain::RefundEWalletMethodSpecificOutput.new_from_hash(hash['eWalletRefundMethodSpecificOutput']) end if hash.has_key? 'merchantParameters' @merchant_parameters = hash['merchantParameters'] 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 = OnlinePayments::SDK::Domain::RefundMobileMethodSpecificOutput.new_from_hash(hash['mobileRefundMethodSpecificOutput']) end if hash.has_key? 'operationReferences' raise TypeError, "value '%s' is not a Hash" % [hash['operationReferences']] unless hash['operationReferences'].is_a? Hash @operation_references = OnlinePayments::SDK::Domain::OperationPaymentReferences.new_from_hash(hash['operationReferences']) end if hash.has_key? 'paymentMethod' @payment_method = hash['paymentMethod'] end if hash.has_key? 'redirectRefundMethodSpecificOutput' raise TypeError, "value '%s' is not a Hash" % [hash['redirectRefundMethodSpecificOutput']] unless hash['redirectRefundMethodSpecificOutput'].is_a? Hash @redirect_refund_method_specific_output = OnlinePayments::SDK::Domain::RefundRedirectMethodSpecificOutput.new_from_hash(hash['redirectRefundMethodSpecificOutput']) end if hash.has_key? 'references' raise TypeError, "value '%s' is not a Hash" % [hash['references']] unless hash['references'].is_a? Hash @references = OnlinePayments::SDK::Domain::PaymentReferences.new_from_hash(hash['references']) end end |
#to_h ⇒ Hash
49 50 51 52 53 54 55 56 57 58 59 60 61 62 |
# File 'lib/onlinepayments/sdk/domain/refund_output.rb', line 49 def to_h hash = super hash['amountOfMoney'] = @amount_of_money.to_h unless @amount_of_money.nil? hash['amountPaid'] = @amount_paid unless @amount_paid.nil? hash['cardRefundMethodSpecificOutput'] = @card_refund_method_specific_output.to_h unless @card_refund_method_specific_output.nil? hash['eWalletRefundMethodSpecificOutput'] = @e_wallet_refund_method_specific_output.to_h unless @e_wallet_refund_method_specific_output.nil? hash['merchantParameters'] = @merchant_parameters unless @merchant_parameters.nil? hash['mobileRefundMethodSpecificOutput'] = @mobile_refund_method_specific_output.to_h unless @mobile_refund_method_specific_output.nil? hash['operationReferences'] = @operation_references.to_h unless @operation_references.nil? hash['paymentMethod'] = @payment_method unless @payment_method.nil? hash['redirectRefundMethodSpecificOutput'] = @redirect_refund_method_specific_output.to_h unless @redirect_refund_method_specific_output.nil? hash['references'] = @references.to_h unless @references.nil? hash end |