class Braintree::SamsungPayCard
NEXT_MAJOR_VERSION remove this class SamsungPayCard
has been deprecated
Attributes
Public Class Methods
Source
# File lib/braintree/samsung_pay_card.rb, line 71 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
Source
# File lib/braintree/samsung_pay_card.rb, line 81 def self._new(*args) self.new(*args) end
Protected Class Methods
Source
# File lib/braintree/samsung_pay_card.rb, line 34 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
Public Instance Methods
Source
# File lib/braintree/samsung_pay_card.rb, line 46 def expiration_date "#{expiration_month}/#{expiration_year}" end
Expiration date formatted as MM/YYYY
Source
# File lib/braintree/samsung_pay_card.rb, line 54 def inspect first = [:token] order = first + (self.class._attributes - first) nice_attributes = order.map do |attr| "#{attr}: #{send(attr).inspect}" end "#<#{self.class} #{nice_attributes.join(', ')}>" end
Source
# File lib/braintree/samsung_pay_card.rb, line 63 def masked_number "#{bin}******#{last_4}" end