Class: SixSaferpay::CardForm
- Inherits:
-
Object
- Object
- SixSaferpay::CardForm
- Defined in:
- lib/six_saferpay/models/card_form.rb
Instance Attribute Summary collapse
-
#holder_name ⇒ Object
Returns the value of attribute holder_name.
-
#verification_code ⇒ Object
Returns the value of attribute verification_code.
Instance Method Summary collapse
-
#initialize(holder_name: nil, verification_code: nil) ⇒ CardForm
constructor
A new instance of CardForm.
- #to_hash ⇒ Object (also: #to_h)
Constructor Details
#initialize(holder_name: nil, verification_code: nil) ⇒ CardForm
Returns a new instance of CardForm.
9 10 11 12 13 14 15 16 |
# File 'lib/six_saferpay/models/card_form.rb', line 9 def initialize( holder_name: nil, verification_code: nil ) @holder_name = holder_name @verification_code = verification_code end |
Instance Attribute Details
#holder_name ⇒ Object
Returns the value of attribute holder_name.
4 5 6 |
# File 'lib/six_saferpay/models/card_form.rb', line 4 def holder_name @holder_name end |
#verification_code ⇒ Object
Returns the value of attribute verification_code.
4 5 6 |
# File 'lib/six_saferpay/models/card_form.rb', line 4 def verification_code @verification_code end |
Instance Method Details
#to_hash ⇒ Object Also known as: to_h
18 19 20 21 22 23 |
# File 'lib/six_saferpay/models/card_form.rb', line 18 def to_hash hash = Hash.new hash.merge!(holder_name: @holder_name) if @holder_name hash.merge!(verification_code: @verification_code) if @verification_code hash end |