Sha256: 115edc25e7e2ac1710856938a009e3e1d113778f3ecee183f85a63c0f739bb8c

Contents?: true

Size: 907 Bytes

Versions: 9

Compression:

Stored size: 907 Bytes

Contents

module Braintree
  class CreditCardVerification
    include BaseModule

    attr_reader :avs_error_response_code, :avs_postal_code_response_code, :avs_street_address_response_code,
      :cvv_response_code, :processor_response_code, :processor_response_text, :status

    def initialize(attributes) # :nodoc:
      set_instance_variables_from_hash(attributes)
    end

    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
      ]
      formatted_attrs = attr_order.map do |attr|
        "#{attr}: #{send(attr).inspect}"
      end
      "#<#{self.class} #{formatted_attrs.join(", ")}>"
    end

    class << self
      protected :new
    end

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

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
braintree-2.2.0 lib/braintree/credit_card_verification.rb
braintree-2.1.0 lib/braintree/credit_card_verification.rb
braintree-2.0.0 lib/braintree/credit_card_verification.rb
braintree-1.2.1 lib/braintree/credit_card_verification.rb
braintree-1.2.0 lib/braintree/credit_card_verification.rb
braintree-1.1.3 lib/braintree/credit_card_verification.rb
braintree-1.1.2 lib/braintree/credit_card_verification.rb
braintree-1.1.1 lib/braintree/credit_card_verification.rb
braintree-1.1.0 lib/braintree/credit_card_verification.rb