lib/braintree/customer.rb in braintree-2.80.1 vs lib/braintree/customer.rb in braintree-2.81.0
- old
+ new
@@ -1,13 +1,32 @@
module Braintree
class Customer
include BaseModule
+ include Braintree::Util::IdEquality
- attr_reader :addresses, :company, :created_at, :credit_cards, :email, :fax, :first_name, :id, :last_name,
- :phone, :updated_at, :website, :custom_fields, :paypal_accounts, :apple_pay_cards, :coinbase_accounts,
- :android_pay_cards, :amex_express_checkout_cards, :venmo_accounts, :us_bank_accounts, :visa_checkout_cards,
- :masterpass_cards
+ attr_reader :addresses
+ attr_reader :amex_express_checkout_cards
+ attr_reader :android_pay_cards
+ attr_reader :apple_pay_cards
+ attr_reader :coinbase_accounts
+ attr_reader :company
+ attr_reader :created_at
+ attr_reader :credit_cards
+ attr_reader :custom_fields
+ attr_reader :email
+ attr_reader :fax
+ attr_reader :first_name
+ attr_reader :id
+ attr_reader :last_name
+ attr_reader :masterpass_cards
+ attr_reader :paypal_accounts
+ attr_reader :phone
+ attr_reader :updated_at
+ attr_reader :us_bank_accounts
+ attr_reader :venmo_accounts
+ attr_reader :visa_checkout_cards
+ attr_reader :website
def self.all
Configuration.gateway.customer.all
end
@@ -179,15 +198,9 @@
# Deprecated. Use Braintree::Customer.update!
def update!(attributes)
warn "[DEPRECATED] update! as an instance method is deprecated. Please use Customer.update!"
return_object_or_raise(:customer) { update(attributes) }
- end
-
- # Returns true if +other+ is a Customer with the same id
- def ==(other)
- return false unless other.is_a?(Customer)
- id == other.id
end
class << self
protected :new
end