lib/braintree/credit_card.rb in braintree-2.80.1 vs lib/braintree/credit_card.rb in braintree-2.81.0

- old
+ new

@@ -1,8 +1,9 @@ module Braintree class CreditCard include BaseModule # :nodoc: + include Braintree::Util::TokenEquality module CardType AmEx = "American Express" CarteBlanche = "Carte Blanche" ChinaUnionPay = "China UnionPay" @@ -33,14 +34,34 @@ end Commercial = Debit = DurbinRegulated = Healthcare = Payroll = Prepaid = ProductId = IssuingBank = CountryOfIssuance = CardTypeIndicator - attr_reader :billing_address, :bin, :card_type, :cardholder_name, :commercial, :country_of_issuance, - :created_at, :customer_id, :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 + attr_reader :billing_address + attr_reader :bin + 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 :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 self.create(attributes) Configuration.gateway.credit_card.create(attributes) end @@ -213,15 +234,9 @@ end # Returns true if the card is associated with Venmo SDK def venmo_sdk? @venmo_sdk - end - - # Returns true if +other+ is a +CreditCard+ with the same token. - def ==(other) - return false unless other.is_a?(CreditCard) - token == other.token end class << self protected :new end