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