Class: Braintree::CoinbaseAccount

Inherits:
Object
  • Object
show all
Includes:
BaseModule
Defined in:
lib/braintree/coinbase_account.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods included from BaseModule

included

Methods included from BaseModule::Methods

#copy_instance_variables_from_object, #return_object_or_raise, #set_instance_variables_from_hash, #singleton_class

Constructor Details

#initialize(gateway, attributes) ⇒ CoinbaseAccount

:nodoc:



6
7
8
9
10
# File 'lib/braintree/coinbase_account.rb', line 6

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

Instance Attribute Details

#created_atObject (readonly)

Returns the value of attribute created_at.



5
6
7
# File 'lib/braintree/coinbase_account.rb', line 5

def created_at
  @created_at
end

#customer_idObject (readonly)

Returns the value of attribute customer_id.



5
6
7
# File 'lib/braintree/coinbase_account.rb', line 5

def customer_id
  @customer_id
end

#defaultObject (readonly)

Returns the value of attribute default.



5
6
7
# File 'lib/braintree/coinbase_account.rb', line 5

def default
  @default
end

#subscriptionsObject (readonly)

Returns the value of attribute subscriptions.



5
6
7
# File 'lib/braintree/coinbase_account.rb', line 5

def subscriptions
  @subscriptions
end

#tokenObject (readonly)

Returns the value of attribute token.



5
6
7
# File 'lib/braintree/coinbase_account.rb', line 5

def token
  @token
end

#updated_atObject (readonly)

Returns the value of attribute updated_at.



5
6
7
# File 'lib/braintree/coinbase_account.rb', line 5

def updated_at
  @updated_at
end

#user_emailObject (readonly)

Returns the value of attribute user_email.



5
6
7
# File 'lib/braintree/coinbase_account.rb', line 5

def user_email
  @user_email
end

#user_idObject (readonly)

Returns the value of attribute user_id.



5
6
7
# File 'lib/braintree/coinbase_account.rb', line 5

def user_id
  @user_id
end

#user_nameObject (readonly)

Returns the value of attribute user_name.



5
6
7
# File 'lib/braintree/coinbase_account.rb', line 5

def user_name
  @user_name
end

Class Method Details

._new(*args) ⇒ Object

:nodoc:



16
17
18
# File 'lib/braintree/coinbase_account.rb', line 16

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

Instance Method Details

#default?Boolean

Returns true if this coinbase account is the customer’s default payment method.

Returns:

  • (Boolean)


21
22
23
# File 'lib/braintree/coinbase_account.rb', line 21

def default?
  @default
end