Class: SixSaferpay::DirectDebit
- Inherits:
-
Object
- Object
- SixSaferpay::DirectDebit
- Defined in:
- lib/six_saferpay/models/direct_debit.rb
Instance Attribute Summary collapse
-
#creditor_id ⇒ Object
Returns the value of attribute creditor_id.
-
#mandate_id ⇒ Object
Returns the value of attribute mandate_id.
Instance Method Summary collapse
-
#initialize(mandate_id:, creditor_id:) ⇒ DirectDebit
constructor
A new instance of DirectDebit.
- #to_hash ⇒ Object (also: #to_h)
Constructor Details
#initialize(mandate_id:, creditor_id:) ⇒ DirectDebit
Returns a new instance of DirectDebit.
6 7 8 9 |
# File 'lib/six_saferpay/models/direct_debit.rb', line 6 def initialize(mandate_id:, creditor_id:) @mandate_id = mandate_id @creditor_id = creditor_id end |
Instance Attribute Details
#creditor_id ⇒ Object
Returns the value of attribute creditor_id.
4 5 6 |
# File 'lib/six_saferpay/models/direct_debit.rb', line 4 def creditor_id @creditor_id end |
#mandate_id ⇒ Object
Returns the value of attribute mandate_id.
4 5 6 |
# File 'lib/six_saferpay/models/direct_debit.rb', line 4 def mandate_id @mandate_id end |
Instance Method Details
#to_hash ⇒ Object Also known as: to_h
11 12 13 14 15 16 |
# File 'lib/six_saferpay/models/direct_debit.rb', line 11 def to_hash hash = Hash.new hash.merge!(mandate_id: @mandate_id) if @mandate_id hash.merge!(creditor_id: @creditor_id) if @creditor_id hash end |