class Braintree::SamsungPayCard

Attributes

billing_address[R]
bin[R]
card_type[R]
cardholder_name[R]
commercial[R]
country_of_issuance[R]
created_at[R]
customer_id[R]
customer_location[R]
debit[R]
durbin_regulated[R]
expiration_month[R]
expiration_year[R]
healthcare[R]
image_url[R]
issuing_bank[R]
last_4[R]
payroll[R]
prepaid[R]
product_id[R]
source_card_last_4[R]
subscriptions[R]
token[R]
unique_number_identifier[R]
updated_at[R]

Public Class Methods

_attributes() click to toggle source
# File lib/braintree/samsung_pay_card.rb, line 69
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
_new(*args) click to toggle source
# File lib/braintree/samsung_pay_card.rb, line 79
def self._new(*args)
  self.new(*args)
end

Protected Class Methods

new(gateway, attributes) click to toggle source
# File lib/braintree/samsung_pay_card.rb, line 32
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

default?() click to toggle source
# File lib/braintree/samsung_pay_card.rb, line 39
def default?
  @default
end
expiration_date() click to toggle source

Expiration date formatted as MM/YYYY

# File lib/braintree/samsung_pay_card.rb, line 44
def expiration_date
  "#{expiration_month}/#{expiration_year}"
end
expired?() click to toggle source
# File lib/braintree/samsung_pay_card.rb, line 48
def expired?
  @expired
end
inspect() click to toggle source
# File lib/braintree/samsung_pay_card.rb, line 52
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
masked_number() click to toggle source
# File lib/braintree/samsung_pay_card.rb, line 61
def masked_number
  "#{bin}******#{last_4}"
end