Class: Citrix::Training::Serializer::Registrant
- Inherits:
-
Object
- Object
- Citrix::Training::Serializer::Registrant
- Includes:
- Helpers::Initializer
- Defined in:
- lib/citrix/training/serializer/registrant.rb
Instance Attribute Summary collapse
-
#attributes ⇒ Object
Set attributes that can be (de)serialized.
Instance Method Summary collapse
Methods included from Helpers::Initializer
Instance Attribute Details
#attributes ⇒ Object
Set attributes that can be (de)serialized.
8 9 10 |
# File 'lib/citrix/training/serializer/registrant.rb', line 8 def attributes @attributes end |
Instance Method Details
#deserialize ⇒ Object
18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/citrix/training/serializer/registrant.rb', line 18 def deserialize { first_name: attributes["givenName"], last_name: attributes["surname"], email: attributes["email"], join_url: attributes["joinUrl"], confirmation_url: attributes["confirmationUrl"], key: attributes["registrantKey"], status: attributes["status"] ? attributes["status"].downcase : nil } end |
#serialize ⇒ Object
10 11 12 13 14 15 16 |
# File 'lib/citrix/training/serializer/registrant.rb', line 10 def serialize { givenName: attributes[:first_name], surname: attributes[:last_name], email: attributes[:email] } end |