Class: Worldline::Connect::SDK::V1::Domain::CardEssentials
- Inherits:
-
Domain::DataObject
- Object
- Domain::DataObject
- Worldline::Connect::SDK::V1::Domain::CardEssentials
- Defined in:
- lib/worldline/connect/sdk/v1/domain/card_essentials.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#card_number ⇒ String
The current value of card_number.
-
#cardholder_name ⇒ String
The current value of cardholder_name.
-
#expiry_date ⇒ String
The current value of expiry_date.
Instance Method Summary collapse
Methods inherited from Domain::DataObject
Instance Attribute Details
#card_number ⇒ String
Returns the current value of card_number.
15 16 17 |
# File 'lib/worldline/connect/sdk/v1/domain/card_essentials.rb', line 15 def card_number @card_number end |
#cardholder_name ⇒ String
Returns the current value of cardholder_name.
15 16 17 |
# File 'lib/worldline/connect/sdk/v1/domain/card_essentials.rb', line 15 def cardholder_name @cardholder_name end |
#expiry_date ⇒ String
Returns the current value of expiry_date.
15 16 17 |
# File 'lib/worldline/connect/sdk/v1/domain/card_essentials.rb', line 15 def expiry_date @expiry_date end |
Instance Method Details
#from_hash(hash) ⇒ Object
32 33 34 35 36 37 38 39 40 41 42 43 |
# File 'lib/worldline/connect/sdk/v1/domain/card_essentials.rb', line 32 def from_hash(hash) super if hash.has_key? 'cardNumber' @card_number = hash['cardNumber'] end if hash.has_key? 'cardholderName' @cardholder_name = hash['cardholderName'] end if hash.has_key? 'expiryDate' @expiry_date = hash['expiryDate'] end end |
#to_h ⇒ Hash
24 25 26 27 28 29 30 |
# File 'lib/worldline/connect/sdk/v1/domain/card_essentials.rb', line 24 def to_h hash = super hash['cardNumber'] = @card_number unless @card_number.nil? hash['cardholderName'] = @cardholder_name unless @cardholder_name.nil? hash['expiryDate'] = @expiry_date unless @expiry_date.nil? hash end |