Class: Braintree::CreditCardVerification

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

Overview

Defined Under Namespace

Modules: Status

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(attributes) ⇒ CreditCardVerification

:nodoc:



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

def initialize(attributes) # :nodoc:
  set_instance_variables_from_hash(attributes)
  @risk_data = RiskData.new(attributes[:risk_data]) if attributes[:risk_data]
end

Instance Attribute Details

#avs_error_response_codeObject (readonly)

Returns the value of attribute avs_error_response_code



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

def avs_error_response_code
  @avs_error_response_code
end

#avs_postal_code_response_codeObject (readonly)

Returns the value of attribute avs_postal_code_response_code



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

def avs_postal_code_response_code
  @avs_postal_code_response_code
end

#avs_street_address_response_codeObject (readonly)

Returns the value of attribute avs_street_address_response_code



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

def avs_street_address_response_code
  @avs_street_address_response_code
end

#billingObject (readonly)

Returns the value of attribute billing



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

def billing
  @billing
end

#created_atObject (readonly)

Returns the value of attribute created_at



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

def created_at
  @created_at
end

#credit_cardObject (readonly)

Returns the value of attribute credit_card



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

def credit_card
  @credit_card
end

#cvv_response_codeObject (readonly)

Returns the value of attribute cvv_response_code



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

def cvv_response_code
  @cvv_response_code
end

#gateway_rejection_reasonObject (readonly)

Returns the value of attribute gateway_rejection_reason



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

def gateway_rejection_reason
  @gateway_rejection_reason
end

#idObject (readonly)

Returns the value of attribute id



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

def id
  @id
end

#merchant_account_idObject (readonly)

Returns the value of attribute merchant_account_id



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

def 
  @merchant_account_id
end

#processor_response_codeObject (readonly)

Returns the value of attribute processor_response_code



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

def processor_response_code
  @processor_response_code
end

#processor_response_textObject (readonly)

Returns the value of attribute processor_response_text



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

def processor_response_text
  @processor_response_text
end

#risk_dataObject (readonly)

Returns the value of attribute risk_data



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

def risk_data
  @risk_data
end

#statusObject (readonly)

Returns the value of attribute status



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

def status
  @status
end

Class Method Details

._new(*args) ⇒ Object

:nodoc:



39
40
41
# File 'lib/braintree/credit_card_verification.rb', line 39

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

.find(id) ⇒ Object



43
44
45
# File 'lib/braintree/credit_card_verification.rb', line 43

def self.find(id)
  Configuration.gateway.verification.find(id)
end

.search(&block) ⇒ Object



47
48
49
# File 'lib/braintree/credit_card_verification.rb', line 47

def self.search(&block)
  Configuration.gateway.verification.search(&block)
end

Instance Method Details

#==(other) ⇒ Object



51
52
53
54
# File 'lib/braintree/credit_card_verification.rb', line 51

def ==(other)
  return false unless other.is_a?(CreditCardVerification)
  id == other.id
end

#inspectObject

:nodoc:



22
23
24
25
26
27
28
29
30
31
32
33
# File 'lib/braintree/credit_card_verification.rb', line 22

def inspect # :nodoc:
  attr_order = [
    :status, :processor_response_code, :processor_response_text,
    :cvv_response_code, :avs_error_response_code,
    :avs_postal_code_response_code, :avs_street_address_response_code,
    :merchant_account_id, :gateway_rejection_reason, :id, :credit_card, :billing, :created_at
  ]
  formatted_attrs = attr_order.map do |attr|
    "#{attr}: #{send(attr).inspect}"
  end
  "#<#{self.class} #{formatted_attrs.join(", ")}>"
end