Class: Citrix::Training::Resource::Training
- Inherits:
-
Object
- Object
- Citrix::Training::Resource::Training
- Includes:
- Helpers::Initializer
- Defined in:
- lib/citrix/training/resource/training.rb
Constant Summary collapse
- ATTRIBUTES =
%i[ name description timezone web_registration confirmation_email organizers dates ]
Instance Attribute Summary collapse
-
#confirmation_email ⇒ Object
Set confirmation e-mail delivery.
-
#dates ⇒ Object
Set the dates.
-
#description ⇒ Object
Set the description of the training.
-
#key ⇒ Object
Set the training key.
-
#name ⇒ Object
Set the name of the training.
-
#organizers ⇒ Object
Set the organizers.
-
#timezone ⇒ Object
Set the timezone.
-
#web_registration ⇒ Object
Set web registration.
Class Method Summary collapse
-
.deserialize(attributes) ⇒ Object
Convert ‘attributes` into parameters that Citrix::Training::Resource::Training 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_email ⇒ Object
Set confirmation e-mail delivery.
23 24 25 |
# File 'lib/citrix/training/resource/training.rb', line 23 def confirmation_email @confirmation_email end |
#dates ⇒ Object
Set the dates.
17 18 19 |
# File 'lib/citrix/training/resource/training.rb', line 17 def dates @dates end |
#description ⇒ Object
Set the description of the training.
11 12 13 |
# File 'lib/citrix/training/resource/training.rb', line 11 def description @description end |
#key ⇒ Object
Set the training key.
29 30 31 |
# File 'lib/citrix/training/resource/training.rb', line 29 def key @key end |
#name ⇒ Object
Set the name of the training.
8 9 10 |
# File 'lib/citrix/training/resource/training.rb', line 8 def name @name end |
#organizers ⇒ Object
Set the organizers.
20 21 22 |
# File 'lib/citrix/training/resource/training.rb', line 20 def organizers @organizers end |
#timezone ⇒ Object
Set the timezone.
14 15 16 |
# File 'lib/citrix/training/resource/training.rb', line 14 def timezone @timezone end |
#web_registration ⇒ Object
Set web registration.
26 27 28 |
# File 'lib/citrix/training/resource/training.rb', line 26 def web_registration @web_registration end |
Class Method Details
.deserialize(attributes) ⇒ Object
Convert ‘attributes` into parameters that Citrix::Training::Resource::Training can understand.
49 50 51 |
# File 'lib/citrix/training/resource/training.rb', line 49 def self.deserialize(attributes) Serializer::Training.new(attributes: attributes).deserialize end |
.serialize(attributes) ⇒ Object
Convert ‘attributes` into parameters that Citrix API can understand.
43 44 45 |
# File 'lib/citrix/training/resource/training.rb', line 43 def self.serialize(attributes) Serializer::Training.new(attributes: attributes).serialize end |
Instance Method Details
#attributes ⇒ Object
Return a hash containing all attributes.
54 55 56 57 58 |
# File 'lib/citrix/training/resource/training.rb', line 54 def attributes ATTRIBUTES.each_with_object({}) do |name, buffer| buffer[name] = public_send(name) end end |
#serialize ⇒ Object
Serialize the attributes.
61 62 63 |
# File 'lib/citrix/training/resource/training.rb', line 61 def serialize self.class.serialize(attributes) end |