Class: Zm::Client::Appointment
- Inherits:
-
Base::Object
- Object
- Base::Object
- Zm::Client::Appointment
- Defined in:
- lib/zm/client/appointment/appointment.rb
Overview
class for account appointment
Defined Under Namespace
Classes: Attendee, Attendees, Organizer
Instance Attribute Summary collapse
-
#allDay ⇒ Object
Returns the value of attribute allDay.
-
#apptId ⇒ Object
Returns the value of attribute apptId.
-
#attendees ⇒ Object
readonly
Returns the value of attribute attendees.
-
#body ⇒ Object
readonly
Returns the value of attribute body.
-
#calItemId ⇒ Object
Returns the value of attribute calItemId.
-
#desc ⇒ Object
(also: #description)
Returns the value of attribute desc.
-
#dur ⇒ Object
Returns the value of attribute dur.
-
#end_at ⇒ Object
Returns the value of attribute end_at.
-
#fb ⇒ Object
Returns the value of attribute fb.
-
#invId ⇒ Object
Returns the value of attribute invId.
-
#name ⇒ Object
Returns the value of attribute name.
-
#organizer ⇒ Object
Returns the value of attribute organizer.
-
#recipients ⇒ Object
readonly
Returns the value of attribute recipients.
-
#rev ⇒ Object
Returns the value of attribute rev.
-
#start_at ⇒ Object
Returns the value of attribute start_at.
-
#timezone ⇒ Object
Returns the value of attribute timezone.
-
#tn ⇒ Object
Returns the value of attribute tn.
-
#transp ⇒ Object
Returns the value of attribute transp.
-
#uid ⇒ Object
Returns the value of attribute uid.
Attributes included from MailboxItemConcern
Attributes inherited from Base::Object
Instance Method Summary collapse
- #build_create ⇒ Object
- #build_modify ⇒ Object
- #build_rename(*args) ⇒ Object
- #busy! ⇒ Object
- #create! ⇒ Object
- #download(dest_file_path, fmt: 'ics') ⇒ Object
- #free! ⇒ Object
-
#initialize(parent) {|_self| ... } ⇒ Appointment
constructor
A new instance of Appointment.
- #jsns_builder ⇒ Object
- #must_confirm! ⇒ Object
- #out_of_office! ⇒ Object
- #reload! ⇒ Object
- #rename!(*args) ⇒ Object
- #update!(*args) ⇒ Object
Methods included from MailboxItemConcern
Methods included from RequestMethodsMailbox
#build_delete, #delete!, #modify!
Methods included from BelongsToTag
Methods included from BelongsToFolder
#folder, #folder!, #folder=, #move!, #trash!
Methods inherited from Base::Object
#clone, #inspect, #instance_variables_map, #logger, #recorded?, #save!, #to_h, #to_s, #update_attribute
Constructor Details
#initialize(parent) {|_self| ... } ⇒ Appointment
Returns a new instance of Appointment.
18 19 20 21 22 23 24 25 26 27 |
# File 'lib/zm/client/appointment/appointment.rb', line 18 def initialize(parent) @parent = parent @recipients = Recipients.new @body = BodyMail.new @attendees = Attendees.new @allDay = false @timezone = 'Europe/Berlin' yield(self) if block_given? end |
Instance Attribute Details
#allDay ⇒ Object
Returns the value of attribute allDay.
12 13 14 |
# File 'lib/zm/client/appointment/appointment.rb', line 12 def allDay @allDay end |
#apptId ⇒ Object
Returns the value of attribute apptId.
12 13 14 |
# File 'lib/zm/client/appointment/appointment.rb', line 12 def apptId @apptId end |
#attendees ⇒ Object (readonly)
Returns the value of attribute attendees.
14 15 16 |
# File 'lib/zm/client/appointment/appointment.rb', line 14 def attendees @attendees end |
#body ⇒ Object (readonly)
Returns the value of attribute body.
14 15 16 |
# File 'lib/zm/client/appointment/appointment.rb', line 14 def body @body end |
#calItemId ⇒ Object
Returns the value of attribute calItemId.
12 13 14 |
# File 'lib/zm/client/appointment/appointment.rb', line 12 def calItemId @calItemId end |
#desc ⇒ Object Also known as: description
Returns the value of attribute desc.
12 13 14 |
# File 'lib/zm/client/appointment/appointment.rb', line 12 def desc @desc end |
#dur ⇒ Object
Returns the value of attribute dur.
12 13 14 |
# File 'lib/zm/client/appointment/appointment.rb', line 12 def dur @dur end |
#end_at ⇒ Object
Returns the value of attribute end_at.
12 13 14 |
# File 'lib/zm/client/appointment/appointment.rb', line 12 def end_at @end_at end |
#fb ⇒ Object
Returns the value of attribute fb.
12 13 14 |
# File 'lib/zm/client/appointment/appointment.rb', line 12 def fb @fb end |
#invId ⇒ Object
Returns the value of attribute invId.
12 13 14 |
# File 'lib/zm/client/appointment/appointment.rb', line 12 def invId @invId end |
#name ⇒ Object
Returns the value of attribute name.
12 13 14 |
# File 'lib/zm/client/appointment/appointment.rb', line 12 def name @name end |
#organizer ⇒ Object
Returns the value of attribute organizer.
12 13 14 |
# File 'lib/zm/client/appointment/appointment.rb', line 12 def organizer @organizer end |
#recipients ⇒ Object (readonly)
Returns the value of attribute recipients.
14 15 16 |
# File 'lib/zm/client/appointment/appointment.rb', line 14 def recipients @recipients end |
#rev ⇒ Object
Returns the value of attribute rev.
12 13 14 |
# File 'lib/zm/client/appointment/appointment.rb', line 12 def rev @rev end |
#start_at ⇒ Object
Returns the value of attribute start_at.
12 13 14 |
# File 'lib/zm/client/appointment/appointment.rb', line 12 def start_at @start_at end |
#timezone ⇒ Object
Returns the value of attribute timezone.
12 13 14 |
# File 'lib/zm/client/appointment/appointment.rb', line 12 def timezone @timezone end |
#tn ⇒ Object
Returns the value of attribute tn.
12 13 14 |
# File 'lib/zm/client/appointment/appointment.rb', line 12 def tn @tn end |
#transp ⇒ Object
Returns the value of attribute transp.
12 13 14 |
# File 'lib/zm/client/appointment/appointment.rb', line 12 def transp @transp end |
#uid ⇒ Object
Returns the value of attribute uid.
12 13 14 |
# File 'lib/zm/client/appointment/appointment.rb', line 12 def uid @uid end |
Instance Method Details
#build_create ⇒ Object
43 44 45 46 |
# File 'lib/zm/client/appointment/appointment.rb', line 43 def build_create SoapElement.mail(SoapMailConstants::CREATE_APPOINTMENT_REQUEST) .add_attributes(jsns_builder.to_jsns) end |
#build_modify ⇒ Object
48 49 50 51 |
# File 'lib/zm/client/appointment/appointment.rb', line 48 def build_modify SoapElement.mail(SoapMailConstants::MODIFY_APPOINTMENT_REQUEST) .add_attributes(jsns_builder.to_update) end |
#build_rename(*args) ⇒ Object
61 62 63 |
# File 'lib/zm/client/appointment/appointment.rb', line 61 def build_rename(*args) raise NotImplementedError end |
#busy! ⇒ Object
83 84 85 86 |
# File 'lib/zm/client/appointment/appointment.rb', line 83 def busy! self.fb = 'B' self.transp = 'T' end |
#create! ⇒ Object
34 35 36 37 38 39 40 41 |
# File 'lib/zm/client/appointment/appointment.rb', line 34 def create! rep = @parent.soap_connector.invoke(build_create) aji = AppointmentJsnsInitializer.new(@parent, rep[:CreateAppointmentResponse]) aji.appointment = self aji.update id end |
#download(dest_file_path, fmt: 'ics') ⇒ Object
29 30 31 32 |
# File 'lib/zm/client/appointment/appointment.rb', line 29 def download(dest_file_path, fmt: 'ics') uploader = @parent.build_uploader uploader.download_file(dest_file_path, id, FolderView::APPOINTMENT, fmt:) end |
#free! ⇒ Object
78 79 80 81 |
# File 'lib/zm/client/appointment/appointment.rb', line 78 def free! self.fb = 'F' self.transp = 'O' end |
#jsns_builder ⇒ Object
150 151 152 153 154 |
# File 'lib/zm/client/appointment/appointment.rb', line 150 def jsns_builder return @jsns_builder if defined? @jsns_builder @jsns_builder = AppointmentJsnsBuilder.new(self) end |
#must_confirm! ⇒ Object
88 89 90 91 |
# File 'lib/zm/client/appointment/appointment.rb', line 88 def must_confirm! self.fb = 'T' self.transp = 'T' end |
#out_of_office! ⇒ Object
93 94 95 96 |
# File 'lib/zm/client/appointment/appointment.rb', line 93 def out_of_office! self.fb = 'O' self.transp = 'O' end |
#reload! ⇒ Object
65 66 67 68 69 70 71 72 73 74 75 76 |
# File 'lib/zm/client/appointment/appointment.rb', line 65 def reload! jsns = { m: { id: id, html: SoapUtils::ON } } soap_request = SoapElement.mail(SoapMailConstants::GET_MSG_REQUEST) .add_attributes(jsns) rep = @parent.soap_connector.invoke(soap_request) entry = rep[:GetMsgResponse][:m].first aji = AppointmentJsnsInitializer.new(@parent, entry) aji.appointment = self aji.create end |
#rename!(*args) ⇒ Object
57 58 59 |
# File 'lib/zm/client/appointment/appointment.rb', line 57 def rename!(*args) raise NotImplementedError end |
#update!(*args) ⇒ Object
53 54 55 |
# File 'lib/zm/client/appointment/appointment.rb', line 53 def update!(*args) raise NotImplementedError end |