Class: Worldline::Connect::SDK::V1::Domain::RefundRequest
- Inherits:
-
Domain::DataObject
- Object
- Domain::DataObject
- Worldline::Connect::SDK::V1::Domain::RefundRequest
- Defined in:
- lib/worldline/connect/sdk/v1/domain/refund_request.rb
Instance Attribute Summary collapse
-
#amount_of_money ⇒ Worldline::Connect::SDK::V1::Domain::AmountOfMoney
The current value of amount_of_money.
-
#bank_refund_method_specific_input ⇒ Worldline::Connect::SDK::V1::Domain::BankRefundMethodSpecificInput
The current value of bank_refund_method_specific_input.
-
#customer ⇒ Worldline::Connect::SDK::V1::Domain::RefundCustomer
The current value of customer.
-
#refund_date ⇒ String
The current value of refund_date.
-
#refund_references ⇒ Worldline::Connect::SDK::V1::Domain::RefundReferences
The current value of refund_references.
Instance Method Summary collapse
Methods inherited from Domain::DataObject
Instance Attribute Details
#amount_of_money ⇒ Worldline::Connect::SDK::V1::Domain::AmountOfMoney
Returns the current value of amount_of_money.
21 22 23 |
# File 'lib/worldline/connect/sdk/v1/domain/refund_request.rb', line 21 def amount_of_money @amount_of_money end |
#bank_refund_method_specific_input ⇒ Worldline::Connect::SDK::V1::Domain::BankRefundMethodSpecificInput
Returns the current value of bank_refund_method_specific_input.
21 22 23 |
# File 'lib/worldline/connect/sdk/v1/domain/refund_request.rb', line 21 def bank_refund_method_specific_input @bank_refund_method_specific_input end |
#customer ⇒ Worldline::Connect::SDK::V1::Domain::RefundCustomer
Returns the current value of customer.
21 22 23 |
# File 'lib/worldline/connect/sdk/v1/domain/refund_request.rb', line 21 def customer @customer end |
#refund_date ⇒ String
Returns the current value of refund_date.
21 22 23 |
# File 'lib/worldline/connect/sdk/v1/domain/refund_request.rb', line 21 def refund_date @refund_date end |
#refund_references ⇒ Worldline::Connect::SDK::V1::Domain::RefundReferences
Returns the current value of refund_references.
21 22 23 |
# File 'lib/worldline/connect/sdk/v1/domain/refund_request.rb', line 21 def refund_references @refund_references end |
Instance Method Details
#from_hash(hash) ⇒ Object
44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 |
# File 'lib/worldline/connect/sdk/v1/domain/refund_request.rb', line 44 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 = Worldline::Connect::SDK::V1::Domain::AmountOfMoney.new_from_hash(hash['amountOfMoney']) end if hash.has_key? 'bankRefundMethodSpecificInput' raise TypeError, "value '%s' is not a Hash" % [hash['bankRefundMethodSpecificInput']] unless hash['bankRefundMethodSpecificInput'].is_a? Hash @bank_refund_method_specific_input = Worldline::Connect::SDK::V1::Domain::BankRefundMethodSpecificInput.new_from_hash(hash['bankRefundMethodSpecificInput']) end if hash.has_key? 'customer' raise TypeError, "value '%s' is not a Hash" % [hash['customer']] unless hash['customer'].is_a? Hash @customer = Worldline::Connect::SDK::V1::Domain::RefundCustomer.new_from_hash(hash['customer']) end if hash.has_key? 'refundDate' @refund_date = hash['refundDate'] end if hash.has_key? 'refundReferences' raise TypeError, "value '%s' is not a Hash" % [hash['refundReferences']] unless hash['refundReferences'].is_a? Hash @refund_references = Worldline::Connect::SDK::V1::Domain::RefundReferences.new_from_hash(hash['refundReferences']) end end |
#to_h ⇒ Hash
34 35 36 37 38 39 40 41 42 |
# File 'lib/worldline/connect/sdk/v1/domain/refund_request.rb', line 34 def to_h hash = super hash['amountOfMoney'] = @amount_of_money.to_h unless @amount_of_money.nil? hash['bankRefundMethodSpecificInput'] = @bank_refund_method_specific_input.to_h unless @bank_refund_method_specific_input.nil? hash['customer'] = @customer.to_h unless @customer.nil? hash['refundDate'] = @refund_date unless @refund_date.nil? hash['refundReferences'] = @refund_references.to_h unless @refund_references.nil? hash end |