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