Class: SixSaferpay::ResponseCard
- Inherits:
-
Object
- Object
- SixSaferpay::ResponseCard
- Defined in:
- lib/six_saferpay/models/response_card.rb
Instance Attribute Summary collapse
-
#country_code ⇒ Object
Returns the value of attribute country_code.
-
#exp_month ⇒ Object
Returns the value of attribute exp_month.
-
#exp_year ⇒ Object
Returns the value of attribute exp_year.
-
#hash_value ⇒ Object
Returns the value of attribute hash_value.
-
#holder_name ⇒ Object
Returns the value of attribute holder_name.
-
#holder_segment ⇒ Object
Returns the value of attribute holder_segment.
-
#masked_number ⇒ Object
Returns the value of attribute masked_number.
Instance Method Summary collapse
-
#initialize(masked_number:, exp_year:, exp_month:, holder_name: nil, holder_segment: nil, country_code: nil, hash_value: nil) ⇒ ResponseCard
constructor
A new instance of ResponseCard.
- #to_hash ⇒ Object (also: #to_h)
Constructor Details
#initialize(masked_number:, exp_year:, exp_month:, holder_name: nil, holder_segment: nil, country_code: nil, hash_value: nil) ⇒ ResponseCard
Returns a new instance of ResponseCard.
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/six_saferpay/models/response_card.rb', line 13 def initialize(masked_number:, exp_year:, exp_month:, holder_name: nil, holder_segment: nil, country_code: nil, hash_value: nil ) @masked_number = masked_number @exp_year = exp_year @exp_month = exp_month @holder_name = holder_name @holder_segment = holder_segment @country_code = country_code @hash_value = hash_value end |
Instance Attribute Details
#country_code ⇒ Object
Returns the value of attribute country_code.
4 5 6 |
# File 'lib/six_saferpay/models/response_card.rb', line 4 def country_code @country_code end |
#exp_month ⇒ Object
Returns the value of attribute exp_month.
4 5 6 |
# File 'lib/six_saferpay/models/response_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/response_card.rb', line 4 def exp_year @exp_year end |
#hash_value ⇒ Object
Returns the value of attribute hash_value.
4 5 6 |
# File 'lib/six_saferpay/models/response_card.rb', line 4 def hash_value @hash_value end |
#holder_name ⇒ Object
Returns the value of attribute holder_name.
4 5 6 |
# File 'lib/six_saferpay/models/response_card.rb', line 4 def holder_name @holder_name end |
#holder_segment ⇒ Object
Returns the value of attribute holder_segment.
4 5 6 |
# File 'lib/six_saferpay/models/response_card.rb', line 4 def holder_segment @holder_segment end |
#masked_number ⇒ Object
Returns the value of attribute masked_number.
4 5 6 |
# File 'lib/six_saferpay/models/response_card.rb', line 4 def masked_number @masked_number end |
Instance Method Details
#to_hash ⇒ Object Also known as: to_h
30 31 32 33 34 35 36 37 38 39 40 |
# File 'lib/six_saferpay/models/response_card.rb', line 30 def to_hash hash = Hash.new hash.merge!(masked_number: @masked_number) hash.merge!(exp_year: @exp_year) hash.merge!(exp_month: @exp_month) hash.merge!(holder_name: @holder_name) if @holder_name hash.merge!(holder_segment: @holder_segment) if @holder_segment hash.merge!(country_code: @country_code) if @country_code hash.merge!(hash_value: @hash_value) if @hash_value hash end |