class Braintree::CreditCardVerification

Attributes

amount[R]
ani_first_name_response_code[R]
ani_last_name_response_code[R]
avs_error_response_code[R]
avs_postal_code_response_code[R]
avs_street_address_response_code[R]
billing[R]
created_at[R]
credit_card[R]
currency_iso_code[R]
cvv_response_code[R]
gateway_rejection_reason[R]
graphql_id[R]
id[R]
merchant_account_id[R]
network_response_code[R]
network_response_text[R]
network_transaction_id[R]
processor_response_code[R]
processor_response_text[R]
processor_response_type[R]
risk_data[R]
status[R]
three_d_secure_info[R]

Public Class Methods

_new(*args) click to toggle source
# File lib/braintree/credit_card_verification.rb, line 98
def self._new(*args)
  self.new(*args)
end
create(attributes) click to toggle source
# 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) click to toggle source
# File lib/braintree/credit_card_verification.rb, line 102
def self.find(*args)
  Configuration.gateway.verification.find(*args)
end

Protected Class Methods

new(attributes) click to toggle source
# 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

Public Instance Methods

inspect() click to toggle source
# 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