Sha256: 022069cdc0a7d810b4b3252ce1a081c93b20395bed81daa36e7fa214eaba838c

Contents?: true

Size: 985 Bytes

Versions: 9

Compression:

Stored size: 985 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

9 entries across 9 versions & 2 rubygems

Version Path
mundipagg_sdk-1.0.2 lib/gateway/InstantBuy/credit_card_data.rb
mundipagg_sdk-1.0.1 lib/gateway/InstantBuy/credit_card_data.rb
mundipagg_sdk-1.0.0 lib/gateway/InstantBuy/credit_card_data.rb
mundipagg_api-1.3.1 lib/mundipagg/InstantBuy/credit_card_data.rb
mundipagg_api-1.3.0 lib/mundipagg/InstantBuy/credit_card_data.rb
mundipagg_api-1.1.1 lib/mundipagg/InstantBuy/credit_card_data.rb
mundipagg_api-1.1.0 lib/mundipagg/InstantBuy/credit_card_data.rb
mundipagg_api-1.0.1 lib/mundipagg/InstantBuy/credit_card_data.rb
mundipagg_api-1.0.0 lib/mundipagg/InstantBuy/credit_card_data.rb