Sha256: 2916f02de8c53df92f0627257ba70bbf8be4c0f404fdf13913f0be5c226c246a

Contents?: true

Size: 843 Bytes

Versions: 2

Compression:

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

    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

2 entries across 2 versions & 1 rubygems

Version Path
braintree-2.46.0 lib/braintree/android_pay_card.rb
braintree-2.45.0 lib/braintree/android_pay_card.rb