class Ingenico::Direct::SDK::Domain::CardEssentials
@attr [String] bin @attr [String] card_number
@attr [String] expiry_date
Attributes
bin[RW]
card_number[RW]
expiry_date[RW]
Public Instance Methods
from_hash(hash)
click to toggle source
Calls superclass method
Ingenico::Direct::SDK::DataObject#from_hash
# File lib/ingenico/direct/sdk/domain/card_essentials.rb, line 27 def from_hash(hash) super @bin = hash['bin'] if hash.key? 'bin' @card_number = hash['cardNumber'] if hash.key? 'cardNumber' @expiry_date = hash['expiryDate'] if hash.key? 'expiryDate' end
to_h()
click to toggle source
@return (Hash)
Calls superclass method
Ingenico::Direct::SDK::DataObject#to_h
# File lib/ingenico/direct/sdk/domain/card_essentials.rb, line 19 def to_h hash = super hash['bin'] = @bin unless @bin.nil? hash['cardNumber'] = @card_number unless @card_number.nil? hash['expiryDate'] = @expiry_date unless @expiry_date.nil? hash end