Class: SixSaferpay::Alias
- Inherits:
-
Object
- Object
- SixSaferpay::Alias
- Defined in:
- lib/six_saferpay/models/alias.rb
Instance Attribute Summary collapse
-
#id ⇒ Object
Returns the value of attribute id.
-
#lifetime ⇒ Object
Returns the value of attribute lifetime.
Instance Method Summary collapse
-
#initialize(id:, lifetime:) ⇒ Alias
constructor
A new instance of Alias.
- #to_hash ⇒ Object (also: #to_h)
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
#id ⇒ Object
Returns the value of attribute id.
4 5 6 |
# File 'lib/six_saferpay/models/alias.rb', line 4 def id @id end |
#lifetime ⇒ Object
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_hash ⇒ Object 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 |