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.
-
#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.
51 52 53 54 55 56 57 58 |
# File 'lib/braintree/credit_card_verification.rb', line 51 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 |
#avs_error_response_code ⇒ Object (readonly)
Returns the value of attribute avs_error_response_code.
29 30 31 |
# File 'lib/braintree/credit_card_verification.rb', line 29 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.
30 31 32 |
# File 'lib/braintree/credit_card_verification.rb', line 30 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.
31 32 33 |
# File 'lib/braintree/credit_card_verification.rb', line 31 def avs_street_address_response_code @avs_street_address_response_code end |
#billing ⇒ Object (readonly)
Returns the value of attribute billing.
32 33 34 |
# File 'lib/braintree/credit_card_verification.rb', line 32 def billing @billing end |
#created_at ⇒ Object (readonly)
Returns the value of attribute created_at.
33 34 35 |
# File 'lib/braintree/credit_card_verification.rb', line 33 def created_at @created_at end |
#credit_card ⇒ Object (readonly)
Returns the value of attribute credit_card.
34 35 36 |
# File 'lib/braintree/credit_card_verification.rb', line 34 def credit_card @credit_card end |
#currency_iso_code ⇒ Object (readonly)
Returns the value of attribute currency_iso_code.
35 36 37 |
# File 'lib/braintree/credit_card_verification.rb', line 35 def currency_iso_code @currency_iso_code end |
#cvv_response_code ⇒ Object (readonly)
Returns the value of attribute cvv_response_code.
36 37 38 |
# File 'lib/braintree/credit_card_verification.rb', line 36 def cvv_response_code @cvv_response_code end |
#gateway_rejection_reason ⇒ Object (readonly)
Returns the value of attribute gateway_rejection_reason.
37 38 39 |
# File 'lib/braintree/credit_card_verification.rb', line 37 def gateway_rejection_reason @gateway_rejection_reason end |
#graphql_id ⇒ Object (readonly)
Returns the value of attribute graphql_id.
38 39 40 |
# File 'lib/braintree/credit_card_verification.rb', line 38 def graphql_id @graphql_id end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
39 40 41 |
# File 'lib/braintree/credit_card_verification.rb', line 39 def id @id end |
#merchant_account_id ⇒ Object (readonly)
Returns the value of attribute merchant_account_id.
40 41 42 |
# File 'lib/braintree/credit_card_verification.rb', line 40 def merchant_account_id @merchant_account_id end |
#network_response_code ⇒ Object (readonly)
Returns the value of attribute network_response_code.
41 42 43 |
# File 'lib/braintree/credit_card_verification.rb', line 41 def network_response_code @network_response_code end |
#network_response_text ⇒ Object (readonly)
Returns the value of attribute network_response_text.
42 43 44 |
# File 'lib/braintree/credit_card_verification.rb', line 42 def network_response_text @network_response_text end |
#network_transaction_id ⇒ Object (readonly)
Returns the value of attribute network_transaction_id.
43 44 45 |
# File 'lib/braintree/credit_card_verification.rb', line 43 def network_transaction_id @network_transaction_id end |
#processor_response_code ⇒ Object (readonly)
Returns the value of attribute processor_response_code.
44 45 46 |
# File 'lib/braintree/credit_card_verification.rb', line 44 def processor_response_code @processor_response_code end |
#processor_response_text ⇒ Object (readonly)
Returns the value of attribute processor_response_text.
45 46 47 |
# File 'lib/braintree/credit_card_verification.rb', line 45 def processor_response_text @processor_response_text end |
#processor_response_type ⇒ Object (readonly)
Returns the value of attribute processor_response_type.
46 47 48 |
# File 'lib/braintree/credit_card_verification.rb', line 46 def processor_response_type @processor_response_type end |
#risk_data ⇒ Object (readonly)
Returns the value of attribute risk_data.
47 48 49 |
# File 'lib/braintree/credit_card_verification.rb', line 47 def risk_data @risk_data end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
49 50 51 |
# File 'lib/braintree/credit_card_verification.rb', line 49 def status @status end |
#three_d_secure_info ⇒ Object (readonly)
Returns the value of attribute three_d_secure_info.
48 49 50 |
# File 'lib/braintree/credit_card_verification.rb', line 48 def three_d_secure_info @three_d_secure_info end |
Class Method Details
._new(*args) ⇒ Object
94 95 96 |
# File 'lib/braintree/credit_card_verification.rb', line 94 def self._new(*args) self.new(*args) end |
.create(attributes) ⇒ Object
106 107 108 109 |
# File 'lib/braintree/credit_card_verification.rb', line 106 def self.create(attributes) Util.verify_keys(CreditCardVerificationGateway._create_signature, attributes) Configuration.gateway.verification.create(attributes) end |
.find(*args) ⇒ Object
98 99 100 |
# File 'lib/braintree/credit_card_verification.rb', line 98 def self.find(*args) Configuration.gateway.verification.find(*args) end |
.search(&block) ⇒ Object
102 103 104 |
# File 'lib/braintree/credit_card_verification.rb', line 102 def self.search(&block) Configuration.gateway.verification.search(&block) end |
Instance Method Details
#inspect ⇒ Object
60 61 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 |
# File 'lib/braintree/credit_card_verification.rb', line 60 def inspect attr_order = [ :status, :processor_response_code, :processor_response_text, :amount, :currency_iso_code, :cvv_response_code, :avs_error_response_code, :avs_postal_code_response_code, :avs_street_address_response_code, :network_response_code, :network_response_text, :merchant_account_id, :gateway_rejection_reason, :id, :credit_card, :billing, :created_at ] 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 |