Sha256: 5436eed1743ee97cdeb5780b0a3b12affbee0172a04d5752e5b2b087f2a23c08

Contents?: true

Size: 878 Bytes

Versions: 34

Compression:

Stored size: 878 Bytes

Contents

module Braintree
  class AndroidPayCard
    include BaseModule # :nodoc:

    attr_reader :token, :virtual_card_type, :virtual_card_last_4, :source_card_type, :source_card_last_4,
      :expiration_month, :expiration_year, :created_at, :updated_at, :image_url, :subscriptions, :bin,
      :google_transaction_id, :default, :source_description, :customer_id

    def initialize(gateway, attributes) # :nodoc:
      @gateway = gateway
      set_instance_variables_from_hash(attributes)
      @subscriptions = (@subscriptions || []).map { |subscription_hash| Subscription._new(@gateway, subscription_hash) }
    end

    def default?
      @default
    end

    def card_type
      virtual_card_type
    end

    def last_4
      virtual_card_last_4
    end

    class << self
      protected :new
    end

    def self._new(*args) # :nodoc:
      self.new *args
    end
  end
end

Version data entries

34 entries across 34 versions & 1 rubygems

Version Path
braintree-2.80.1 lib/braintree/android_pay_card.rb
braintree-2.80.0 lib/braintree/android_pay_card.rb
braintree-2.79.0 lib/braintree/android_pay_card.rb
braintree-2.78.0 lib/braintree/android_pay_card.rb
braintree-2.77.0 lib/braintree/android_pay_card.rb
braintree-2.76.0 lib/braintree/android_pay_card.rb
braintree-2.75.0 lib/braintree/android_pay_card.rb
braintree-2.74.0 lib/braintree/android_pay_card.rb
braintree-2.73.0 lib/braintree/android_pay_card.rb
braintree-2.72.0 lib/braintree/android_pay_card.rb
braintree-2.71.0 lib/braintree/android_pay_card.rb
braintree-2.70.0 lib/braintree/android_pay_card.rb
braintree-2.69.1 lib/braintree/android_pay_card.rb
braintree-2.69.0 lib/braintree/android_pay_card.rb
braintree-2.68.2 lib/braintree/android_pay_card.rb
braintree-2.68.1 lib/braintree/android_pay_card.rb
braintree-2.68.0 lib/braintree/android_pay_card.rb
braintree-2.67.0 lib/braintree/android_pay_card.rb
braintree-2.66.0 lib/braintree/android_pay_card.rb
braintree-2.65.0 lib/braintree/android_pay_card.rb