Sha256: a3b7dfd65f6f1bdc368cff9ca83dd1705ec9c9ddfe110b5ed867f4c27ccbbb3a

Contents?: true

Size: 945 Bytes

Versions: 4

Compression:

Stored size: 945 Bytes

Contents

class CreditCardData
  # Número mascardo do cartão de crédito
  attr_accessor :MaskedCreditCardNumber

  # Bandeira do cartão de crédito
  attr_accessor :CreditCardBrand

  @@CreditCardBrandEnum = {
      :Visa => '1',
      :MasterCard => '2',
      :HiperCard => '3',
      :Amex => '4',
      :Diners => '5',
      :Elo => '6',
      :Aura => '7',
      :Discover => '8',
      :CasaShow => '9',
      :Havan => '10',
      :HugCard => '11',
      :AndarAki => '12',
      :LeaderCard => '13',
      :Submarino => '14'
  }

  # Chave do cartão de crédito. Utilizada para identificar um cartão de crédito no gateway
  attr_accessor :InstantBuyerKey

  # Informa se o cartão de crédito expirou
  attr_accessor :IsExpiredCreditCard

  def initialize
    @CreditCardBrand = self.CreditCardBrandEnum
  end

  def to_json
    hash = {}
    instance_variables.each {|var| hash[var.to_s.delete('@')] = instance_variable_get(var) }
    hash
  end

end

Version data entries

4 entries across 4 versions & 2 rubygems

Version Path
stone_ecommerce-1.0.3 lib/gateway/InstantBuy/credit_card_data.rb
mundipagg_sdk-1.0.3 lib/gateway/InstantBuy/credit_card_data.rb
stone_ecommerce-1.0.2 lib/gateway/InstantBuy/credit_card_data.rb
stone_ecommerce-1.0.0 lib/gateway/InstantBuy/credit_card_data.rb