Sha256: ca44ef1b47c25cb302c54ce0b0c9dca54cfdbbb8c5109db1431b88077779605d

Contents?: true

Size: 825 Bytes

Versions: 25

Compression:

Stored size: 825 Bytes

Contents

module Braintree
  class CoinbaseAccount
    include BaseModule # :nodoc:

    attr_reader :created_at
    attr_reader :customer_id
    attr_reader :default
    attr_reader :subscriptions
    attr_reader :token
    attr_reader :updated_at
    attr_reader :user_email
    attr_reader :user_id
    attr_reader :user_name

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

    class << self
      protected :new
    end

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

    # Returns true if this coinbase account is the customer's default payment method.
    def default?
      @default
    end
  end
end

Version data entries

25 entries across 25 versions & 1 rubygems

Version Path
braintree-2.85.0 lib/braintree/coinbase_account.rb
braintree-2.84.0 lib/braintree/coinbase_account.rb
braintree-2.83.0 lib/braintree/coinbase_account.rb
braintree-2.82.0 lib/braintree/coinbase_account.rb
braintree-2.81.0 lib/braintree/coinbase_account.rb