Class: AdvancedBilling::CardType

Inherits:
Object
  • Object
show all
Defined in:
lib/advanced_billing/models/card_type.rb

Overview

The type of card used.

Constant Summary collapse

CARD_TYPE =
[
  # TODO: Write general description for BOGUS

  BOGUS = 'bogus'.freeze,

  # TODO: Write general description for VISA

  VISA = 'visa'.freeze,

  # TODO: Write general description for MASTER

  MASTER = 'master'.freeze,

  # TODO: Write general description for DISCOVER

  DISCOVER = 'discover'.freeze,

  # TODO: Write general description for AMERICAN_EXPRESS

  AMERICAN_EXPRESS = 'american_express'.freeze,

  # TODO: Write general description for DINERS_CLUB

  DINERS_CLUB = 'diners_club'.freeze,

  # TODO: Write general description for JCB

  JCB = 'jcb'.freeze,

  # TODO: Write general description for SWITCH

  SWITCH = 'switch'.freeze,

  # TODO: Write general description for SOLO

  SOLO = 'solo'.freeze,

  # TODO: Write general description for DANKORT

  DANKORT = 'dankort'.freeze,

  # TODO: Write general description for MAESTRO

  MAESTRO = 'maestro'.freeze,

  # TODO: Write general description for LASER

  LASER = 'laser'.freeze,

  # TODO: Write general description for FORBRUGSFORENINGEN

  FORBRUGSFORENINGEN = 'forbrugsforeningen'.freeze
].freeze

Class Method Summary collapse

Class Method Details

.validate(value) ⇒ Object



50
51
52
53
54
# File 'lib/advanced_billing/models/card_type.rb', line 50

def self.validate(value)
  return false if value.nil?

  CARD_TYPE.include?(value)
end