Class: Zm::Client::Appointment
- Inherits:
-
Base::Object
- Object
- Base::Object
- Zm::Client::Appointment
- Includes:
- BelongsToFolder, BelongsToTag
- 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.
-
#id ⇒ Object
Returns the value of attribute id.
-
#invId ⇒ Object
Returns the value of attribute invId.
-
#l ⇒ Object
Returns the value of attribute l.
-
#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 inherited from Base::Object
Instance Method Summary collapse
- #busy! ⇒ Object
- #create! ⇒ Object
- #delete! ⇒ Object
- #download(dest_file_path, fmt = 'ics') ⇒ Object
- #free! ⇒ Object
-
#initialize(parent) {|_self| ... } ⇒ Appointment
constructor
A new instance of Appointment.
- #modify! ⇒ Object
- #must_confirm! ⇒ Object
- #out_of_office! ⇒ Object
- #reload! ⇒ Object
- #rename!(*args) ⇒ Object
- #update!(*args) ⇒ Object
Methods included from BelongsToTag
Methods included from BelongsToFolder
#folder, #folder!, #folder=, #folder_id, #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.
16 17 18 19 20 21 22 23 24 25 |
# File 'lib/zm/client/appointment/appointment.rb', line 16 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.
10 11 12 |
# File 'lib/zm/client/appointment/appointment.rb', line 10 def allDay @allDay end |
#apptId ⇒ Object
Returns the value of attribute apptId.
10 11 12 |
# File 'lib/zm/client/appointment/appointment.rb', line 10 def apptId @apptId end |
#attendees ⇒ Object (readonly)
Returns the value of attribute attendees.
12 13 14 |
# File 'lib/zm/client/appointment/appointment.rb', line 12 def attendees @attendees end |
#body ⇒ Object (readonly)
Returns the value of attribute body.
12 13 14 |
# File 'lib/zm/client/appointment/appointment.rb', line 12 def body @body end |
#calItemId ⇒ Object
Returns the value of attribute calItemId.
10 11 12 |
# File 'lib/zm/client/appointment/appointment.rb', line 10 def calItemId @calItemId end |
#desc ⇒ Object Also known as: description
Returns the value of attribute desc.
10 11 12 |
# File 'lib/zm/client/appointment/appointment.rb', line 10 def desc @desc end |
#dur ⇒ Object
Returns the value of attribute dur.
10 11 12 |
# File 'lib/zm/client/appointment/appointment.rb', line 10 def dur @dur end |
#end_at ⇒ Object
Returns the value of attribute end_at.
10 11 12 |
# File 'lib/zm/client/appointment/appointment.rb', line 10 def end_at @end_at end |
#fb ⇒ Object
Returns the value of attribute fb.
10 11 12 |
# File 'lib/zm/client/appointment/appointment.rb', line 10 def fb @fb end |
#id ⇒ Object
Returns the value of attribute id.
10 11 12 |
# File 'lib/zm/client/appointment/appointment.rb', line 10 def id @id end |
#invId ⇒ Object
Returns the value of attribute invId.
10 11 12 |
# File 'lib/zm/client/appointment/appointment.rb', line 10 def invId @invId end |
#l ⇒ Object
Returns the value of attribute l.
10 11 12 |
# File 'lib/zm/client/appointment/appointment.rb', line 10 def l @l end |
#name ⇒ Object
Returns the value of attribute name.
10 11 12 |
# File 'lib/zm/client/appointment/appointment.rb', line 10 def name @name end |
#organizer ⇒ Object
Returns the value of attribute organizer.
10 11 12 |
# File 'lib/zm/client/appointment/appointment.rb', line 10 def organizer @organizer end |
#recipients ⇒ Object (readonly)
Returns the value of attribute recipients.
12 13 14 |
# File 'lib/zm/client/appointment/appointment.rb', line 12 def recipients @recipients end |
#rev ⇒ Object
Returns the value of attribute rev.
10 11 12 |
# File 'lib/zm/client/appointment/appointment.rb', line 10 def rev @rev end |
#start_at ⇒ Object
Returns the value of attribute start_at.
10 11 12 |
# File 'lib/zm/client/appointment/appointment.rb', line 10 def start_at @start_at end |
#timezone ⇒ Object
Returns the value of attribute timezone.
10 11 12 |
# File 'lib/zm/client/appointment/appointment.rb', line 10 def timezone @timezone end |
#tn ⇒ Object
Returns the value of attribute tn.
10 11 12 |
# File 'lib/zm/client/appointment/appointment.rb', line 10 def tn @tn end |
#transp ⇒ Object
Returns the value of attribute transp.
10 11 12 |
# File 'lib/zm/client/appointment/appointment.rb', line 10 def transp @transp end |
#uid ⇒ Object
Returns the value of attribute uid.
10 11 12 |
# File 'lib/zm/client/appointment/appointment.rb', line 10 def uid @uid end |
Instance Method Details
#busy! ⇒ Object
80 81 82 83 |
# File 'lib/zm/client/appointment/appointment.rb', line 80 def busy! self.fb = 'B' self.transp = 'T' end |
#create! ⇒ Object
32 33 34 35 36 37 38 39 40 |
# File 'lib/zm/client/appointment/appointment.rb', line 32 def create! soap_request = SoapElement.mail(SoapMailConstants::CREATE_APPOINTMENT_REQUEST).add_attributes(jsns_builder.to_jsns) rep = @parent.sacc.invoke(soap_request) aji = AppointmentJsnsInitializer.new(@parent, rep[:CreateAppointmentResponse]) aji.appointment = self aji.update @id end |
#delete! ⇒ Object
56 57 58 59 60 61 |
# File 'lib/zm/client/appointment/appointment.rb', line 56 def delete! return false if @id.nil? @parent.sacc.invoke(jsns_builder.to_delete) @id = nil end |
#download(dest_file_path, fmt = 'ics') ⇒ Object
27 28 29 30 |
# File 'lib/zm/client/appointment/appointment.rb', line 27 def download(dest_file_path, fmt = 'ics') uploader = Upload.new(@parent, RestAccountConnector.new) uploader.download_file(Zm::Client::FolderDefault::ROOT[:path], fmt, [Zm::Client::FolderView::APPOINTMENT], [@id], dest_file_path) end |
#free! ⇒ Object
75 76 77 78 |
# File 'lib/zm/client/appointment/appointment.rb', line 75 def free! self.fb = 'F' self.transp = 'O' end |
#modify! ⇒ Object
42 43 44 45 46 |
# File 'lib/zm/client/appointment/appointment.rb', line 42 def modify! soap_request = SoapElement.mail(SoapMailConstants::MODIFY_APPOINTMENT_REQUEST).add_attributes(jsns_builder.to_update) @parent.sacc.invoke(soap_request) true end |
#must_confirm! ⇒ Object
85 86 87 88 |
# File 'lib/zm/client/appointment/appointment.rb', line 85 def must_confirm! self.fb = 'T' self.transp = 'T' end |
#out_of_office! ⇒ Object
90 91 92 93 |
# File 'lib/zm/client/appointment/appointment.rb', line 90 def out_of_office! self.fb = 'O' self.transp = 'O' end |
#reload! ⇒ Object
63 64 65 66 67 68 69 70 71 72 73 |
# File 'lib/zm/client/appointment/appointment.rb', line 63 def reload! jsns = { m: { id: @id, html: 1 } } soap_request = SoapElement.mail(SoapMailConstants::GET_MSG_REQUEST).add_attributes(jsns) rep = @parent.sacc.invoke(soap_request) entry = rep[:GetMsgResponse][:m].first aji = AppointmentJsnsInitializer.new(@parent, entry) aji.appointment = self aji.create end |
#rename!(*args) ⇒ Object
52 53 54 |
# File 'lib/zm/client/appointment/appointment.rb', line 52 def rename!(*args) raise NotImplementedError end |
#update!(*args) ⇒ Object
48 49 50 |
# File 'lib/zm/client/appointment/appointment.rb', line 48 def update!(*args) raise NotImplementedError end |