Class: Braintree::UnknownPaymentMethod

Inherits:
Object
  • Object
show all
Includes:
BaseModule
Defined in:
lib/braintree/unknown_payment_method.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) ⇒ UnknownPaymentMethod

Returns a new instance of UnknownPaymentMethod.



8
9
10
11
12
# File 'lib/braintree/unknown_payment_method.rb', line 8

def initialize(gateway, attributes)
  @gateway = gateway
  nested_attributes = attributes[attributes.keys.first]
  set_instance_variables_from_hash(nested_attributes)
end

Instance Attribute Details

#customer_idObject (readonly)

Returns the value of attribute customer_id.



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

def customer_id
  @customer_id
end

#tokenObject (readonly)

Returns the value of attribute token.



6
7
8
# File 'lib/braintree/unknown_payment_method.rb', line 6

def token
  @token
end

Class Method Details

._new(*args) ⇒ Object



22
23
24
# File 'lib/braintree/unknown_payment_method.rb', line 22

def self._new(*args)
  self.new(*args)
end

Instance Method Details

#default?Boolean

Returns:

  • (Boolean)


14
15
16
# File 'lib/braintree/unknown_payment_method.rb', line 14

def default?
  @default
end

#image_urlObject



18
19
20
# File 'lib/braintree/unknown_payment_method.rb', line 18

def image_url
  "https://assets.braintreegateway.com/payment_method_logo/unknown.png"
end