Sha256: feb8dd1419a4f2c10361d988e40aafdae8a70e976169f784d0cfca3a7348f576

Contents?: true

Size: 972 Bytes

Versions: 1

Compression:

Stored size: 972 Bytes

Contents

module MyMoip
  class CreditCard
    attr_accessor :logo, :card_number, :expiration_date, :security_code,
                :owner_name, :owner_birthday, :owner_phone, :owner_rg

    AVAILABLE_LOGOS = [
      :american_express, :diners, :hipercard, :mastercard, :visa
    ]

    def initialize(params)
      @logo            = params[:logo]            if params.has_key? :logo
      @card_number     = params[:card_number]     if params.has_key? :card_number
      @expiration_date = params[:expiration_date] if params.has_key? :expiration_date
      @security_code   = params[:security_code]   if params.has_key? :security_code
      @owner_name      = params[:owner_name]      if params.has_key? :owner_name
      @owner_birthday  = params[:owner_birthday]  if params.has_key? :owner_birthday
      @owner_phone     = params[:owner_phone]     if params.has_key? :owner_phone
      @owner_rg        = params[:owner_rg]        if params.has_key? :owner_rg
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
mymoip-0.2.5 lib/mymoip/credit_card.rb