class SixSaferpay::RequestCard
Attributes
exp_month[RW]
exp_year[RW]
holder_name[RW]
number[RW]
verification_code[RW]
Public Class Methods
new(number:, exp_year:, exp_month:, holder_name: nil, verification_code: nil )
click to toggle source
# 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
Public Instance Methods
to_hash()
click to toggle source
# 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
Also aliased as: to_h