Class: SixSaferpay::Check

Inherits:
Object
  • Object
show all
Defined in:
lib/six_saferpay/models/check.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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_idObject

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

#typeObject

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_hashObject 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