Class: PaypalServerSdk::SubscriptionsCardBrand

Inherits:
Object
  • Object
show all
Defined in:
lib/paypal_server_sdk/models/subscriptions_card_brand.rb

Overview

The card network or brand. Applies to credit, debit, gift, and payment cards.

Constant Summary collapse

SUBSCRIPTIONS_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,

  # UNKNOWN payment network.
  UNKNOWN = 'UNKNOWN'.freeze
].freeze

Class Method Summary collapse

Class Method Details

.from_value(value, default_value = VISA) ⇒ Object



97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
# File 'lib/paypal_server_sdk/models/subscriptions_card_brand.rb', line 97

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 'unknown' then UNKNOWN
  else
    default_value
  end
end

.validate(value) ⇒ Object



91
92
93
94
95
# File 'lib/paypal_server_sdk/models/subscriptions_card_brand.rb', line 91

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

  true
end