Class: EwayRapid::InternalModels::Verification
- Inherits:
-
Object
- Object
- EwayRapid::InternalModels::Verification
- Defined in:
- lib/eway_rapid/models/internal_models.rb
Instance Attribute Summary collapse
-
#address ⇒ Object
Returns the value of attribute address.
-
#cvn ⇒ Object
Returns the value of attribute cvn.
-
#email ⇒ Object
Returns the value of attribute email.
-
#mobile ⇒ Object
Returns the value of attribute mobile.
-
#phone ⇒ Object
Returns the value of attribute phone.
Class Method Summary collapse
Instance Method Summary collapse
Instance Attribute Details
#address ⇒ Object
Returns the value of attribute address.
420 421 422 |
# File 'lib/eway_rapid/models/internal_models.rb', line 420 def address @address end |
#cvn ⇒ Object
Returns the value of attribute cvn.
419 420 421 |
# File 'lib/eway_rapid/models/internal_models.rb', line 419 def cvn @cvn end |
#email ⇒ Object
Returns the value of attribute email.
421 422 423 |
# File 'lib/eway_rapid/models/internal_models.rb', line 421 def email @email end |
#mobile ⇒ Object
Returns the value of attribute mobile.
422 423 424 |
# File 'lib/eway_rapid/models/internal_models.rb', line 422 def mobile @mobile end |
#phone ⇒ Object
Returns the value of attribute phone.
423 424 425 |
# File 'lib/eway_rapid/models/internal_models.rb', line 423 def phone @phone end |
Class Method Details
.from_hash(hash) ⇒ Object
440 441 442 443 444 445 446 447 448 |
# File 'lib/eway_rapid/models/internal_models.rb', line 440 def self.from_hash(hash) verification = Verification.new verification.cvn = hash[Constants::CVN] verification.address = hash[Constants::ADDRESS] verification.email = hash[Constants::EMAIL] verification.mobile = hash[Constants::MOBILE] verification.phone = hash[Constants::PHONE] verification end |
.from_json(json) ⇒ Object
435 436 437 438 |
# File 'lib/eway_rapid/models/internal_models.rb', line 435 def self.from_json(json) hash = JSON.parse(json) from_hash(hash) end |
Instance Method Details
#to_json(options = {}) ⇒ Object
425 426 427 428 429 430 431 432 433 |
# File 'lib/eway_rapid/models/internal_models.rb', line 425 def to_json(={}) hash = {} hash[Constants::CVN] = cvn if cvn hash[Constants::ADDRESS] = address if address hash[Constants::EMAIL] = email if email hash[Constants::MOBILE] = mobile if mobile hash[Constants::PHONE] = phone if phone hash.to_json end |