Class: Paysafe::Card

Inherits:
Result show all
Defined in:
lib/paysafe/card.rb

Constant Summary collapse

BRANDS =
{
  'AM' => 'american_express',
  'DC' => 'diners_club',
  'DI' => 'discover',
  'JC' => 'jcb',
  'MC' => 'master',
  'MD' => 'maestro',
  'SF' => 'swiff',
  'SO' => 'solo',
  'VI' => 'visa',
  'VD' => 'visa_debit',
  'VE' => 'visa_electron',
}

Instance Attribute Summary

Attributes inherited from Result

#attributes

Instance Method Summary collapse

Methods inherited from Result

attributes, define_attribute_method, define_predicate_method, #empty?, #initialize, object_attribute

Constructor Details

This class inherits a constructor from Paysafe::Result

Instance Method Details

#brandObject



28
29
30
# File 'lib/paysafe/card.rb', line 28

def brand
  @brand ||= BRANDS[card_type] || BRANDS[type]
end