Class: Ingenico::Direct::SDK::Domain::CardEssentials
- Inherits:
-
Ingenico::Direct::SDK::DataObject
- Object
- Ingenico::Direct::SDK::DataObject
- Ingenico::Direct::SDK::Domain::CardEssentials
- Defined in:
- lib/ingenico/direct/sdk/domain/card_essentials.rb
Instance Attribute Summary collapse
-
#bin ⇒ String
The current value of bin.
-
#card_number ⇒ String
The current value of card_number.
-
#expiry_date ⇒ String
The current value of expiry_date.
Instance Method Summary collapse
Methods inherited from Ingenico::Direct::SDK::DataObject
Instance Attribute Details
#bin ⇒ String
Returns the current value of bin.
13 14 15 |
# File 'lib/ingenico/direct/sdk/domain/card_essentials.rb', line 13 def bin @bin end |
#card_number ⇒ String
Returns the current value of card_number.
13 14 15 |
# File 'lib/ingenico/direct/sdk/domain/card_essentials.rb', line 13 def card_number @card_number end |
#expiry_date ⇒ String
Returns the current value of expiry_date.
13 14 15 |
# File 'lib/ingenico/direct/sdk/domain/card_essentials.rb', line 13 def expiry_date @expiry_date end |
Instance Method Details
#from_hash(hash) ⇒ Object
27 28 29 30 31 32 |
# 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 ⇒ Hash
19 20 21 22 23 24 25 |
# 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 |