Class: OnlinePayments::SDK::Domain::SepaDirectDebitPaymentProduct771SpecificInput
- Inherits:
-
OnlinePayments::SDK::DataObject
- Object
- OnlinePayments::SDK::DataObject
- OnlinePayments::SDK::Domain::SepaDirectDebitPaymentProduct771SpecificInput
- Defined in:
- lib/onlinepayments/sdk/domain/sepa_direct_debit_payment_product771_specific_input.rb
Instance Attribute Summary collapse
-
#existing_unique_mandate_reference ⇒ String
The current value of existing_unique_mandate_reference.
-
#mandate ⇒ OnlinePayments::SDK::Domain::CreateMandateWithReturnUrl
The current value of mandate.
Instance Method Summary collapse
Methods inherited from OnlinePayments::SDK::DataObject
Instance Attribute Details
#existing_unique_mandate_reference ⇒ String
Returns the current value of existing_unique_mandate_reference.
12 13 14 |
# File 'lib/onlinepayments/sdk/domain/sepa_direct_debit_payment_product771_specific_input.rb', line 12 def existing_unique_mandate_reference @existing_unique_mandate_reference end |
#mandate ⇒ OnlinePayments::SDK::Domain::CreateMandateWithReturnUrl
Returns the current value of mandate.
12 13 14 |
# File 'lib/onlinepayments/sdk/domain/sepa_direct_debit_payment_product771_specific_input.rb', line 12 def mandate @mandate end |
Instance Method Details
#from_hash(hash) ⇒ Object
24 25 26 27 28 29 30 31 |
# File 'lib/onlinepayments/sdk/domain/sepa_direct_debit_payment_product771_specific_input.rb', line 24 def from_hash(hash) super @existing_unique_mandate_reference = hash['existingUniqueMandateReference'] if hash.key? 'existingUniqueMandateReference' if hash.key? 'mandate' raise TypeError, "value '%s' is not a Hash" % [hash['mandate']] unless hash['mandate'].is_a? Hash @mandate = OnlinePayments::SDK::Domain::CreateMandateWithReturnUrl.new_from_hash(hash['mandate']) end end |
#to_h ⇒ Hash
17 18 19 20 21 22 |
# File 'lib/onlinepayments/sdk/domain/sepa_direct_debit_payment_product771_specific_input.rb', line 17 def to_h hash = super hash['existingUniqueMandateReference'] = @existing_unique_mandate_reference unless @existing_unique_mandate_reference.nil? hash['mandate'] = @mandate.to_h if @mandate hash end |