Class: Citrix::Training::Resource::Registrant
- Inherits:
-
Object
- Object
- Citrix::Training::Resource::Registrant
- Includes:
- Helpers::Initializer
- Defined in:
- lib/citrix/training/resource/registrant.rb
Constant Summary collapse
- ATTRIBUTES =
%i[ first_name last_name email ]
Instance Attribute Summary collapse
-
#confirmation_url ⇒ Object
Set the confirmation url.
-
#email ⇒ Object
Set the e-mail.
-
#first_name ⇒ Object
Set the first name of the user.
-
#join_url ⇒ Object
Set the join url.
-
#key ⇒ Object
Set the registrant key.
-
#last_name ⇒ Object
Set the last name of the user.
-
#status ⇒ Object
Set the status.
Class Method Summary collapse
-
.deserialize(attributes) ⇒ Object
Convert ‘attributes` into parameters that Citrix::Training::Resource::Registrant can understand.
-
.serialize(attributes) ⇒ Object
Convert ‘attributes` into parameters that Citrix API can understand.
Instance Method Summary collapse
-
#attributes ⇒ Object
Return a hash containing all attributes.
-
#serialize ⇒ Object
Serialize the attributes.
Methods included from Helpers::Initializer
Instance Attribute Details
#confirmation_url ⇒ Object
Set the confirmation url.
20 21 22 |
# File 'lib/citrix/training/resource/registrant.rb', line 20 def confirmation_url @confirmation_url end |
#email ⇒ Object
Set the e-mail.
14 15 16 |
# File 'lib/citrix/training/resource/registrant.rb', line 14 def email @email end |
#first_name ⇒ Object
Set the first name of the user.
8 9 10 |
# File 'lib/citrix/training/resource/registrant.rb', line 8 def first_name @first_name end |
#join_url ⇒ Object
Set the join url.
17 18 19 |
# File 'lib/citrix/training/resource/registrant.rb', line 17 def join_url @join_url end |
#key ⇒ Object
Set the registrant key.
23 24 25 |
# File 'lib/citrix/training/resource/registrant.rb', line 23 def key @key end |
#last_name ⇒ Object
Set the last name of the user.
11 12 13 |
# File 'lib/citrix/training/resource/registrant.rb', line 11 def last_name @last_name end |
#status ⇒ Object
Set the status.
26 27 28 |
# File 'lib/citrix/training/resource/registrant.rb', line 26 def status @status end |
Class Method Details
.deserialize(attributes) ⇒ Object
Convert ‘attributes` into parameters that Citrix::Training::Resource::Registrant can understand.
42 43 44 |
# File 'lib/citrix/training/resource/registrant.rb', line 42 def self.deserialize(attributes) Serializer::Registrant.new(attributes: attributes).deserialize end |
.serialize(attributes) ⇒ Object
Convert ‘attributes` into parameters that Citrix API can understand.
36 37 38 |
# File 'lib/citrix/training/resource/registrant.rb', line 36 def self.serialize(attributes) Serializer::Registrant.new(attributes: attributes).serialize end |
Instance Method Details
#attributes ⇒ Object
Return a hash containing all attributes.
47 48 49 50 51 |
# File 'lib/citrix/training/resource/registrant.rb', line 47 def attributes ATTRIBUTES.each_with_object({}) do |name, buffer| buffer[name] = public_send(name) end end |
#serialize ⇒ Object
Serialize the attributes.
54 55 56 |
# File 'lib/citrix/training/resource/registrant.rb', line 54 def serialize self.class.serialize(attributes) end |