Class: SixSaferpay::Alias

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(id:, lifetime:) ⇒ Alias

Returns a new instance of Alias.



7
8
9
10
11
# File 'lib/six_saferpay/models/alias.rb', line 7

def initialize(id:,
               lifetime: )
  @id = id
  @lifetime = lifetime
end

Instance Attribute Details

#idObject

Returns the value of attribute id.



4
5
6
# File 'lib/six_saferpay/models/alias.rb', line 4

def id
  @id
end

#lifetimeObject

Returns the value of attribute lifetime.



4
5
6
# File 'lib/six_saferpay/models/alias.rb', line 4

def lifetime
  @lifetime
end

Instance Method Details

#to_hashObject Also known as: to_h



13
14
15
16
17
18
# File 'lib/six_saferpay/models/alias.rb', line 13

def to_hash
  hash = Hash.new
  hash.merge!(id: @id) if @id
  hash.merge!(lifetime: @lifetime) if @lifetime
  hash
end