lib/braintree/samsung_pay_card.rb in braintree-4.15.0 vs lib/braintree/samsung_pay_card.rb in braintree-4.16.0

- old
+ new

@@ -1,8 +1,8 @@ module Braintree class SamsungPayCard - include BaseModule # :nodoc: + include BaseModule include Braintree::Util::TokenEquality attr_reader :billing_address attr_reader :bin attr_reader :cardholder_name @@ -27,11 +27,11 @@ attr_reader :subscriptions attr_reader :token attr_reader :unique_number_identifier attr_reader :updated_at - def initialize(gateway, attributes) # :nodoc: + def initialize(gateway, attributes) @gateway = gateway set_instance_variables_from_hash(attributes) @billing_address = attributes[:billing_address] ? Address._new(@gateway, attributes[:billing_address]) : nil @subscriptions = (@subscriptions || []).map { |subscription_hash| Subscription._new(@gateway, subscription_hash) } end @@ -47,11 +47,11 @@ def expired? @expired end - def inspect # :nodoc: + def inspect first = [:token] order = first + (self.class._attributes - first) nice_attributes = order.map do |attr| "#{attr}: #{send(attr).inspect}" end @@ -64,20 +64,20 @@ class << self protected :new end - def self._attributes # :nodoc: + def self._attributes [ :billing_address, :bin, :cardholder_name, :card_type, :created_at, :customer_id, :customer_location, :expiration_month, :expiration_year, :last_4, :source_card_last_4, :token, :updated_at, :prepaid, :payroll, :product_id, :commercial, :debit, :durbin_regulated, :healthcare, :country_of_issuance, :issuing_bank, :image_url ] end - def self._new(*args) # :nodoc: + def self._new(*args) self.new(*args) end end end