Class: Viewpoint::EWS::Types::TasksFolder
- Inherits:
-
Object
- Object
- Viewpoint::EWS::Types::TasksFolder
- Includes:
- Viewpoint::EWS, Viewpoint::EWS::Types, GenericFolder
- Defined in:
- lib/ews/types/tasks_folder.rb
Constant Summary
Constants included from GenericFolder
GenericFolder::GFOLDER_KEY_ALIAS, GenericFolder::GFOLDER_KEY_PATHS, GenericFolder::GFOLDER_KEY_TYPES
Constants included from StringUtils
Constants included from Viewpoint::EWS
Constants included from Viewpoint::EWS::Types
KEY_ALIAS, KEY_PATHS, KEY_TYPES, OOF_KEY_ALIAS, OOF_KEY_PATHS, OOF_KEY_TYPES
Instance Attribute Summary
Attributes included from GenericFolder
#subscription_id, #sync_state, #watermark
Attributes included from Viewpoint::EWS
Attributes included from Viewpoint::EWS::Types
Instance Method Summary collapse
-
#create_item(attributes) ⇒ Task
Creates a new task.
Methods included from GenericFolder
#available_categories, #delete!, #get_all_properties!, #get_events, #initialize, #items, #items_between, #items_since, #push_subscribe, #search_by_subject, #subscribe, #subscribed?, #sync_items!, #synced?, #todays_items, #unsubscribe
Methods included from StringUtils
Methods included from ItemAccessors
#copy_items, #export_items, #find_items, #get_item, #get_items, #move_items
Methods included from Viewpoint::EWS
#remove_impersonation, root_logger, #set_impersonation
Methods included from Viewpoint::EWS::Types
#auto_deepen?, #deepen!, #ews_methods, #freeze!, #frozen?, #initialize, #mark_deep!, #method_missing, #methods, #respond_to?, #shallow?, #to_s, #unfreeze!
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Viewpoint::EWS::Types
Instance Method Details
#create_item(attributes) ⇒ Task
Creates a new task
16 17 18 19 20 21 22 23 24 25 |
# File 'lib/ews/types/tasks_folder.rb', line 16 def create_item(attributes) template = Viewpoint::EWS::Template::Task.new attributes template.saved_item_folder_id = {id: self.id, change_key: self.change_key} rm = ews.create_item(template.to_ews_create)..first if rm && rm.success? Task.new ews, rm.items.first[:task][:elems].first else raise EwsCreateItemError, "Could not create item in folder. #{rm.code}: #{rm.}" unless rm end end |