class SixSaferpay::ResponseCard

Attributes

country_code[RW]
exp_month[RW]
exp_year[RW]
hash_value[RW]
holder_name[RW]
holder_segment[RW]
masked_number[RW]

Public Class Methods

new(masked_number:, exp_year:, exp_month:, holder_name: nil, holder_segment: nil, country_code: nil, hash_value: nil ) click to toggle source
# 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

Public Instance Methods

to_h()
Alias for: to_hash
to_hash() click to toggle source
# 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
Also aliased as: to_h