lib/braintree/visa_checkout_card.rb in braintree-2.80.1 vs lib/braintree/visa_checkout_card.rb in braintree-2.81.0
- old
+ new
@@ -1,15 +1,36 @@
module Braintree
class VisaCheckoutCard
include BaseModule # :nodoc:
+ include Braintree::Util::TokenEquality
- attr_reader :billing_address, :bin, :card_type, :cardholder_name,
- :commercial, :country_of_issuance, :created_at, :customer_id,
- :customer_location, :debit, :durbin_regulated, :expiration_month,
- :expiration_year, :healthcare, :issuing_bank, :last_4, :payroll,
- :prepaid, :product_id, :subscriptions, :token, :unique_number_identifier,
- :updated_at, :image_url, :verification, :call_id
+ attr_reader :billing_address
+ attr_reader :bin
+ attr_reader :call_id
+ attr_reader :card_type
+ attr_reader :cardholder_name
+ attr_reader :commercial
+ attr_reader :country_of_issuance
+ attr_reader :created_at
+ attr_reader :customer_id
+ attr_reader :customer_location
+ attr_reader :debit
+ attr_reader :durbin_regulated
+ attr_reader :expiration_month
+ attr_reader :expiration_year
+ attr_reader :healthcare
+ attr_reader :image_url
+ attr_reader :issuing_bank
+ attr_reader :last_4
+ attr_reader :payroll
+ attr_reader :prepaid
+ attr_reader :product_id
+ attr_reader :subscriptions
+ attr_reader :token
+ attr_reader :unique_number_identifier
+ attr_reader :updated_at
+ attr_reader :verification
def initialize(gateway, attributes) # :nodoc:
@gateway = gateway
set_instance_variables_from_hash(attributes)
@billing_address = attributes[:billing_address] ? Address._new(@gateway, attributes[:billing_address]) : nil
@@ -44,14 +65,9 @@
"#<#{self.class} #{nice_attributes.join(', ')}>"
end
def masked_number
"#{bin}******#{last_4}"
- end
-
- def ==(other)
- return false unless other.is_a?(VisaCheckoutCard)
- token == other.token
end
class << self
protected :new
end