lib/braintree/customer.rb in braintree-2.73.0 vs lib/braintree/customer.rb in braintree-2.74.0
- old
+ new
@@ -2,11 +2,12 @@
class Customer
include BaseModule
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
+ :android_pay_cards, :amex_express_checkout_cards, :venmo_accounts, :us_bank_accounts, :visa_checkout_cards,
+ :masterpass_cards
def self.all
Configuration.gateway.customer.all
end
@@ -93,10 +94,12 @@
@europe_bank_accounts = (@europe_bank_Accounts || []).map { |pm| EuropeBankAccount._new gateway, pm }
@android_pay_cards = (@android_pay_cards || []).map { |pm| AndroidPayCard._new gateway, pm }
@amex_express_checkout_cards = (@amex_express_checkout_cards || []).map { |pm| AmexExpressCheckoutCard._new gateway, pm }
@venmo_accounts = (@venmo_accounts || []).map { |pm| VenmoAccount._new gateway, pm }
@us_bank_accounts = (@us_bank_accounts || []).map { |pm| UsBankAccount._new gateway, pm }
+ @visa_checkout_cards = (@visa_checkout_cards|| []).map { |pm| VisaCheckoutCard._new gateway, pm }
+ @masterpass_cards = (@masterpass_cards|| []).map { |pm| MasterpassCard._new gateway, pm }
@addresses = (@addresses || []).map { |addr| Address._new gateway, addr }
@custom_fields = attributes[:custom_fields].is_a?(Hash) ? attributes[:custom_fields] : {}
end
def credit(transaction_attributes)
@@ -131,10 +134,11 @@
@apple_pay_cards +
@coinbase_accounts +
@android_pay_cards +
@amex_express_checkout_cards +
@venmo_accounts +
- @us_bank_accounts
+ @us_bank_accounts +
+ @visa_checkout_cards
end
def inspect # :nodoc:
first = [:id]
last = [:addresses, :credit_cards, :paypal_accounts]