Sha256: dd5771811eff7b66effa27d0b43f7dd05b3d658a4da7dcd85d29184265a0231d

Contents?: true

Size: 760 Bytes

Versions: 3

Compression:

Stored size: 760 Bytes

Contents

require 'paysafe/result'

module Paysafe
  class Verification < Result
    attributes :id, :merchant_ref_num, :child_account_num,
      :auth_code, :customer_ip, :dup_check, :description, :txn_time,
      :currency_code, :avs_response, :cvv_verification, :status

    object_attribute :Profile, :profile
    object_attribute :Card, :card
    object_attribute :Address, :billing_details

    [:unknown, :not_processed, :no_match, :match, :match_address_only, :match_zip_only].each do |key|
      define_method("avs_#{key}?") do
        avs_response == key.to_s.upcase
      end
    end

    [:unknown, :match, :no_match, :not_processed].each do |key|
      define_method("cvv_#{key}?") do
        cvv_verification == key.to_s.upcase
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
paysafe-0.9.4 lib/paysafe/verification.rb
paysafe-0.9.3 lib/paysafe/verification.rb
paysafe-0.9.2 lib/paysafe/verification.rb