Class: Braintree::PaymentMethodNonce

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

Returns a new instance of PaymentMethodNonce.



25
26
27
28
29
30
31
# File 'lib/braintree/payment_method_nonce.rb', line 25

def initialize(gateway, attributes)
  @gateway = gateway
  set_instance_variables_from_hash(attributes)
  @details = PaymentMethodNonceDetails.new(attributes[:details]) if attributes[:details]
  @three_d_secure_info = ThreeDSecureInfo.new(attributes[:three_d_secure_info]) if attributes[:three_d_secure_info]
  @bin_data = BinData.new(attributes[:bin_data]) if attributes[:bin_data]
end

Instance Attribute Details

#authentication_insightObject (readonly)

Returns the value of attribute authentication_insight.



23
24
25
# File 'lib/braintree/payment_method_nonce.rb', line 23

def authentication_insight
  @authentication_insight
end

#bin_dataObject (readonly)

Returns the value of attribute bin_data.



17
18
19
# File 'lib/braintree/payment_method_nonce.rb', line 17

def bin_data
  @bin_data
end

#defaultObject (readonly)

Returns the value of attribute default.



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

def default
  @default
end

#detailsObject (readonly)

Returns the value of attribute details.



19
20
21
# File 'lib/braintree/payment_method_nonce.rb', line 19

def details
  @details
end

#nonceObject (readonly)

Returns the value of attribute nonce.



20
21
22
# File 'lib/braintree/payment_method_nonce.rb', line 20

def nonce
  @nonce
end

#three_d_secure_infoObject (readonly)

Returns the value of attribute three_d_secure_info.



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

def three_d_secure_info
  @three_d_secure_info
end

#typeObject (readonly)

Returns the value of attribute type.



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

def type
  @type
end

Class Method Details

._new(gateway, attributes) ⇒ Object



45
46
47
# File 'lib/braintree/payment_method_nonce.rb', line 45

def self._new(gateway, attributes)
  new(gateway, attributes)
end

.create(*args) ⇒ Object



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

def self.create(*args)
  Configuration.gateway.payment_method_nonce.create(*args)
end

.create!(*args) ⇒ Object



9
10
11
# File 'lib/braintree/payment_method_nonce.rb', line 9

def self.create!(*args)
  Configuration.gateway.payment_method_nonce.create!(*args)
end

.find(*args) ⇒ Object



13
14
15
# File 'lib/braintree/payment_method_nonce.rb', line 13

def self.find(*args)
  Configuration.gateway.payment_method_nonce.find(*args)
end

Instance Method Details

#default?Boolean

Returns:

  • (Boolean)


33
34
35
# File 'lib/braintree/payment_method_nonce.rb', line 33

def default?
  @default
end

#to_sObject



37
38
39
# File 'lib/braintree/payment_method_nonce.rb', line 37

def to_s
  nonce
end