Class: PaypalServerSdk::CardBrand
- Inherits:
-
Object
- Object
- PaypalServerSdk::CardBrand
- Defined in:
- lib/paypal_server_sdk/models/card_brand.rb
Overview
The card network or brand. Applies to credit, debit, gift, and payment cards.
Constant Summary collapse
- CARD_BRAND =
[ # Visa card. VISA = 'VISA'.freeze, # Mastercard card. MASTERCARD = 'MASTERCARD'.freeze, # Discover card. DISCOVER = 'DISCOVER'.freeze, # American Express card. AMEX = 'AMEX'.freeze, # Solo debit card. SOLO = 'SOLO'.freeze, # Japan Credit Bureau card. JCB = 'JCB'.freeze, # Military Star card. STAR = 'STAR'.freeze, # Delta Airlines card. DELTA = 'DELTA'.freeze, # Switch credit card. SWITCH = 'SWITCH'.freeze, # Maestro credit card. MAESTRO = 'MAESTRO'.freeze, # Carte Bancaire (CB) credit card. CB_NATIONALE = 'CB_NATIONALE'.freeze, # Configoga credit card. CONFIGOGA = 'CONFIGOGA'.freeze, # Confidis credit card. CONFIDIS = 'CONFIDIS'.freeze, # Visa Electron credit card. ELECTRON = 'ELECTRON'.freeze, # Cetelem credit card. CETELEM = 'CETELEM'.freeze, # China union pay credit card. CHINA_UNION_PAY = 'CHINA_UNION_PAY'.freeze, # The Diners Club International banking and payment services capability # network owned by Discover Financial Services (DFS), one of the most # recognized brands in US financial services. DINERS = 'DINERS'.freeze, # The Brazilian Elo card payment network. ELO = 'ELO'.freeze, # The Hiper - Ingenico ePayment network. HIPER = 'HIPER'.freeze, # The Brazilian Hipercard payment network that's widely accepted in the # retail market. HIPERCARD = 'HIPERCARD'.freeze, # The RuPay payment network. RUPAY = 'RUPAY'.freeze, # The GE Credit Union 3Point card payment network. GE = 'GE'.freeze, # The Synchrony Financial (SYF) payment network. SYNCHRONY = 'SYNCHRONY'.freeze, # The Electronic Fund Transfer At Point of Sale(EFTPOS) Debit card payment # network. EFTPOS = 'EFTPOS'.freeze, # The Carte Bancaire payment network. CARTE_BANCAIRE = 'CARTE_BANCAIRE'.freeze, # The Star Access payment network. STAR_ACCESS = 'STAR_ACCESS'.freeze, # The Pulse payment network. PULSE = 'PULSE'.freeze, # The NYCE payment network. NYCE = 'NYCE'.freeze, # The Accel payment network. ACCEL = 'ACCEL'.freeze, # UNKNOWN payment network. UNKNOWN = 'UNKNOWN'.freeze ].freeze
Class Method Summary collapse
Class Method Details
.from_value(value, default_value = VISA) ⇒ Object
112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 |
# File 'lib/paypal_server_sdk/models/card_brand.rb', line 112 def self.from_value(value, default_value = VISA) return default_value if value.nil? str = value.to_s.strip case str.downcase when 'visa' then VISA when 'mastercard' then MASTERCARD when 'discover' then DISCOVER when 'amex' then AMEX when 'solo' then SOLO when 'jcb' then JCB when 'star' then STAR when 'delta' then DELTA when 'switch' then SWITCH when 'maestro' then MAESTRO when 'cb_nationale' then CB_NATIONALE when 'configoga' then CONFIGOGA when 'confidis' then CONFIDIS when 'electron' then ELECTRON when 'cetelem' then CETELEM when 'china_union_pay' then CHINA_UNION_PAY when 'diners' then DINERS when 'elo' then ELO when 'hiper' then HIPER when 'hipercard' then HIPERCARD when 'rupay' then RUPAY when 'ge' then GE when 'synchrony' then SYNCHRONY when 'eftpos' then EFTPOS when 'carte_bancaire' then CARTE_BANCAIRE when 'star_access' then STAR_ACCESS when 'pulse' then PULSE when 'nyce' then NYCE when 'accel' then ACCEL when 'unknown' then UNKNOWN else default_value end end |
.validate(value) ⇒ Object
106 107 108 109 110 |
# File 'lib/paypal_server_sdk/models/card_brand.rb', line 106 def self.validate(value) return false if value.nil? true end |