Class: Braintree::CreditCardVerification
- Inherits:
-
Object
- Object
- Braintree::CreditCardVerification
- Includes:
- BaseModule, Util::IdEquality
- Defined in:
- lib/braintree/credit_card_verification.rb
Defined Under Namespace
Modules: GatewayRejectionReason, Status
Instance Attribute Summary collapse
-
#amount ⇒ Object
readonly
Returns the value of attribute amount.
-
#ani_first_name_response_code ⇒ Object
readonly
Returns the value of attribute ani_first_name_response_code.
-
#ani_last_name_response_code ⇒ Object
readonly
Returns the value of attribute ani_last_name_response_code.
-
#avs_error_response_code ⇒ Object
readonly
Returns the value of attribute avs_error_response_code.
-
#avs_postal_code_response_code ⇒ Object
readonly
Returns the value of attribute avs_postal_code_response_code.
-
#avs_street_address_response_code ⇒ Object
readonly
Returns the value of attribute avs_street_address_response_code.
-
#billing ⇒ Object
readonly
Returns the value of attribute billing.
-
#created_at ⇒ Object
readonly
Returns the value of attribute created_at.
-
#credit_card ⇒ Object
readonly
Returns the value of attribute credit_card.
-
#currency_iso_code ⇒ Object
readonly
Returns the value of attribute currency_iso_code.
-
#cvv_response_code ⇒ Object
readonly
Returns the value of attribute cvv_response_code.
-
#gateway_rejection_reason ⇒ Object
readonly
Returns the value of attribute gateway_rejection_reason.
-
#graphql_id ⇒ Object
readonly
Returns the value of attribute graphql_id.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#merchant_account_id ⇒ Object
readonly
Returns the value of attribute merchant_account_id.
-
#network_response_code ⇒ Object
readonly
Returns the value of attribute network_response_code.
-
#network_response_text ⇒ Object
readonly
Returns the value of attribute network_response_text.
-
#network_transaction_id ⇒ Object
readonly
Returns the value of attribute network_transaction_id.
-
#processor_response_code ⇒ Object
readonly
Returns the value of attribute processor_response_code.
-
#processor_response_text ⇒ Object
readonly
Returns the value of attribute processor_response_text.
-
#processor_response_type ⇒ Object
readonly
Returns the value of attribute processor_response_type.
-
#risk_data ⇒ Object
readonly
Returns the value of attribute risk_data.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
-
#three_d_secure_info ⇒ Object
readonly
Returns the value of attribute three_d_secure_info.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(attributes) ⇒ CreditCardVerification
constructor
A new instance of CreditCardVerification.
- #inspect ⇒ Object
Methods included from Util::IdEquality
Methods included from BaseModule
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
Returns a new instance of CreditCardVerification.
53 54 55 56 57 58 59 60 |
# File 'lib/braintree/credit_card_verification.rb', line 53 def initialize(attributes) set_instance_variables_from_hash(attributes) @amount = Util.to_big_decimal(amount) @risk_data = RiskData.new(attributes[:risk_data]) if attributes[:risk_data] @three_d_secure_info = ThreeDSecureInfo.new(attributes[:three_d_secure_info]) if attributes[:three_d_secure_info] end |
Instance Attribute Details
#amount ⇒ Object (readonly)
Returns the value of attribute amount.
28 29 30 |
# File 'lib/braintree/credit_card_verification.rb', line 28 def amount @amount end |
#ani_first_name_response_code ⇒ Object (readonly)
Returns the value of attribute ani_first_name_response_code.
29 30 31 |
# File 'lib/braintree/credit_card_verification.rb', line 29 def ani_first_name_response_code @ani_first_name_response_code end |
#ani_last_name_response_code ⇒ Object (readonly)
Returns the value of attribute ani_last_name_response_code.
30 31 32 |
# File 'lib/braintree/credit_card_verification.rb', line 30 def ani_last_name_response_code @ani_last_name_response_code end |
#avs_error_response_code ⇒ Object (readonly)
Returns the value of attribute avs_error_response_code.
31 32 33 |
# File 'lib/braintree/credit_card_verification.rb', line 31 def avs_error_response_code @avs_error_response_code end |
#avs_postal_code_response_code ⇒ Object (readonly)
Returns the value of attribute avs_postal_code_response_code.
32 33 34 |
# File 'lib/braintree/credit_card_verification.rb', line 32 def avs_postal_code_response_code @avs_postal_code_response_code end |
#avs_street_address_response_code ⇒ Object (readonly)
Returns the value of attribute avs_street_address_response_code.
33 34 35 |
# File 'lib/braintree/credit_card_verification.rb', line 33 def avs_street_address_response_code @avs_street_address_response_code end |
#billing ⇒ Object (readonly)
Returns the value of attribute billing.
34 35 36 |
# File 'lib/braintree/credit_card_verification.rb', line 34 def billing @billing end |
#created_at ⇒ Object (readonly)
Returns the value of attribute created_at.
35 36 37 |
# File 'lib/braintree/credit_card_verification.rb', line 35 def created_at @created_at end |
#credit_card ⇒ Object (readonly)
Returns the value of attribute credit_card.
36 37 38 |
# File 'lib/braintree/credit_card_verification.rb', line 36 def credit_card @credit_card end |
#currency_iso_code ⇒ Object (readonly)
Returns the value of attribute currency_iso_code.
37 38 39 |
# File 'lib/braintree/credit_card_verification.rb', line 37 def currency_iso_code @currency_iso_code end |
#cvv_response_code ⇒ Object (readonly)
Returns the value of attribute cvv_response_code.
38 39 40 |
# File 'lib/braintree/credit_card_verification.rb', line 38 def cvv_response_code @cvv_response_code end |
#gateway_rejection_reason ⇒ Object (readonly)
Returns the value of attribute gateway_rejection_reason.
39 40 41 |
# File 'lib/braintree/credit_card_verification.rb', line 39 def gateway_rejection_reason @gateway_rejection_reason end |
#graphql_id ⇒ Object (readonly)
Returns the value of attribute graphql_id.
40 41 42 |
# File 'lib/braintree/credit_card_verification.rb', line 40 def graphql_id @graphql_id end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
41 42 43 |
# File 'lib/braintree/credit_card_verification.rb', line 41 def id @id end |
#merchant_account_id ⇒ Object (readonly)
Returns the value of attribute merchant_account_id.
42 43 44 |
# File 'lib/braintree/credit_card_verification.rb', line 42 def merchant_account_id @merchant_account_id end |
#network_response_code ⇒ Object (readonly)
Returns the value of attribute network_response_code.
43 44 45 |
# File 'lib/braintree/credit_card_verification.rb', line 43 def network_response_code @network_response_code end |
#network_response_text ⇒ Object (readonly)
Returns the value of attribute network_response_text.
44 45 46 |
# File 'lib/braintree/credit_card_verification.rb', line 44 def network_response_text @network_response_text end |
#network_transaction_id ⇒ Object (readonly)
Returns the value of attribute network_transaction_id.
45 46 47 |
# File 'lib/braintree/credit_card_verification.rb', line 45 def network_transaction_id @network_transaction_id end |
#processor_response_code ⇒ Object (readonly)
Returns the value of attribute processor_response_code.
46 47 48 |
# File 'lib/braintree/credit_card_verification.rb', line 46 def processor_response_code @processor_response_code end |
#processor_response_text ⇒ Object (readonly)
Returns the value of attribute processor_response_text.
47 48 49 |
# File 'lib/braintree/credit_card_verification.rb', line 47 def processor_response_text @processor_response_text end |
#processor_response_type ⇒ Object (readonly)
Returns the value of attribute processor_response_type.
48 49 50 |
# File 'lib/braintree/credit_card_verification.rb', line 48 def processor_response_type @processor_response_type end |
#risk_data ⇒ Object (readonly)
Returns the value of attribute risk_data.
49 50 51 |
# File 'lib/braintree/credit_card_verification.rb', line 49 def risk_data @risk_data end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
50 51 52 |
# File 'lib/braintree/credit_card_verification.rb', line 50 def status @status end |
#three_d_secure_info ⇒ Object (readonly)
Returns the value of attribute three_d_secure_info.
51 52 53 |
# File 'lib/braintree/credit_card_verification.rb', line 51 def three_d_secure_info @three_d_secure_info end |
Class Method Details
._new(*args) ⇒ Object
98 99 100 |
# File 'lib/braintree/credit_card_verification.rb', line 98 def self._new(*args) self.new(*args) end |
.create(attributes) ⇒ Object
110 111 112 113 |
# File 'lib/braintree/credit_card_verification.rb', line 110 def self.create(attributes) Util.verify_keys(CreditCardVerificationGateway._create_signature, attributes) Configuration.gateway.verification.create(attributes) end |
.find(*args) ⇒ Object
102 103 104 |
# File 'lib/braintree/credit_card_verification.rb', line 102 def self.find(*args) Configuration.gateway.verification.find(*args) end |
.search(&block) ⇒ Object
106 107 108 |
# File 'lib/braintree/credit_card_verification.rb', line 106 def self.search(&block) Configuration.gateway.verification.search(&block) end |
Instance Method Details
#inspect ⇒ Object
62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 |
# File 'lib/braintree/credit_card_verification.rb', line 62 def inspect attr_order = [ :amount, :ani_first_name_response_code, :ani_last_name_response_code, :avs_error_response_code, :avs_postal_code_response_code, :avs_street_address_response_code, :billing, :created_at, :credit_card, :currency_iso_code, :cvv_response_code, :gateway_rejection_reason, :id, :merchant_account_id, :network_response_code, :network_response_text, :processor_response_code, :processor_response_text, :status ] formatted_attrs = attr_order.map do |attr| if attr == :amount Util.inspect_amount(self.amount) else "#{attr}: #{send(attr).inspect}" end end "#<#{self.class} #{formatted_attrs.join(", ")}>" end |