Class: Worldline::Acquiring::SDK::V1::Domain::PlainCardData
- Inherits:
-
Domain::DataObject
- Object
- Domain::DataObject
- Worldline::Acquiring::SDK::V1::Domain::PlainCardData
- Defined in:
- lib/worldline/acquiring/sdk/v1/domain/plain_card_data.rb
Instance Attribute Summary collapse
-
#card_number ⇒ String
The current value of card_number.
-
#card_security_code ⇒ String
The current value of card_security_code.
-
#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.
14 15 16 |
# File 'lib/worldline/acquiring/sdk/v1/domain/plain_card_data.rb', line 14 def card_number @card_number end |
#card_security_code ⇒ String
Returns the current value of card_security_code.
14 15 16 |
# File 'lib/worldline/acquiring/sdk/v1/domain/plain_card_data.rb', line 14 def card_security_code @card_security_code end |
#expiry_date ⇒ String
Returns the current value of expiry_date.
14 15 16 |
# File 'lib/worldline/acquiring/sdk/v1/domain/plain_card_data.rb', line 14 def expiry_date @expiry_date end |
Instance Method Details
#from_hash(hash) ⇒ Object
31 32 33 34 35 36 37 38 39 40 41 42 |
# File 'lib/worldline/acquiring/sdk/v1/domain/plain_card_data.rb', line 31 def from_hash(hash) super if hash.has_key? 'cardNumber' @card_number = hash['cardNumber'] end if hash.has_key? 'cardSecurityCode' @card_security_code = hash['cardSecurityCode'] end if hash.has_key? 'expiryDate' @expiry_date = hash['expiryDate'] end end |
#to_h ⇒ Hash
23 24 25 26 27 28 29 |
# File 'lib/worldline/acquiring/sdk/v1/domain/plain_card_data.rb', line 23 def to_h hash = super hash['cardNumber'] = @card_number unless @card_number.nil? hash['cardSecurityCode'] = @card_security_code unless @card_security_code.nil? hash['expiryDate'] = @expiry_date unless @expiry_date.nil? hash end |