Class: SixSaferpay::RequestCard
- Inherits:
-
Object
- Object
- SixSaferpay::RequestCard
- Defined in:
- lib/six_saferpay/models/request_card.rb
Instance Attribute Summary collapse
-
#exp_month ⇒ Object
Returns the value of attribute exp_month.
-
#exp_year ⇒ Object
Returns the value of attribute exp_year.
-
#holder_name ⇒ Object
Returns the value of attribute holder_name.
-
#number ⇒ Object
Returns the value of attribute number.
-
#verification_code ⇒ Object
Returns the value of attribute verification_code.
Instance Method Summary collapse
-
#initialize(number:, exp_year:, exp_month:, holder_name: nil, verification_code: nil) ⇒ RequestCard
constructor
A new instance of RequestCard.
- #to_hash ⇒ Object (also: #to_h)
Constructor Details
#initialize(number:, exp_year:, exp_month:, holder_name: nil, verification_code: nil) ⇒ RequestCard
Returns a new instance of RequestCard.
11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/six_saferpay/models/request_card.rb', line 11 def initialize(number:, exp_year:, exp_month:, holder_name: nil, verification_code: nil ) @number = number @exp_year = exp_year @exp_month = exp_month @holder_name = holder_name @verification_code = verification_code end |
Instance Attribute Details
#exp_month ⇒ Object
Returns the value of attribute exp_month.
4 5 6 |
# File 'lib/six_saferpay/models/request_card.rb', line 4 def exp_month @exp_month end |
#exp_year ⇒ Object
Returns the value of attribute exp_year.
4 5 6 |
# File 'lib/six_saferpay/models/request_card.rb', line 4 def exp_year @exp_year end |
#holder_name ⇒ Object
Returns the value of attribute holder_name.
4 5 6 |
# File 'lib/six_saferpay/models/request_card.rb', line 4 def holder_name @holder_name end |
#number ⇒ Object
Returns the value of attribute number.
4 5 6 |
# File 'lib/six_saferpay/models/request_card.rb', line 4 def number @number end |
#verification_code ⇒ Object
Returns the value of attribute verification_code.
4 5 6 |
# File 'lib/six_saferpay/models/request_card.rb', line 4 def verification_code @verification_code end |
Instance Method Details
#to_hash ⇒ Object Also known as: to_h
24 25 26 27 28 29 30 31 32 |
# File 'lib/six_saferpay/models/request_card.rb', line 24 def to_hash hash = Hash.new hash.merge!(number: @number) hash.merge!(exp_year: @exp_year) hash.merge!(exp_month: @exp_month) hash.merge!(holder_name: @holder_name) if @holder_name hash.merge!(verification_code: @verification_code) if @verification_code hash end |