Class: Viewpoint::EWS::Types::Folder

Inherits:
Object
  • Object
show all
Includes:
Viewpoint::EWS, Viewpoint::EWS::Types, GenericFolder
Defined in:
lib/ews/types/folder.rb

Constant Summary collapse

FOLDER_KEY_PATHS =
{
  :unread_count       => [:unread_count, :text],
}
FOLDER_KEY_TYPES =
{
  :unread_count       => ->(str){str.to_i},
}
FOLDER_KEY_ALIAS =
{}

Constants included from GenericFolder

GenericFolder::GFOLDER_KEY_ALIAS, GenericFolder::GFOLDER_KEY_PATHS, GenericFolder::GFOLDER_KEY_TYPES

Constants included from StringUtils

StringUtils::DURATION_RE

Constants included from Viewpoint::EWS

ConnectingSID

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

#logger

Attributes included from Viewpoint::EWS::Types

#ews_item

Instance Method Summary collapse

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

included

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

#messages_with_attachmentsObject



25
26
27
28
29
30
31
32
33
# File 'lib/ews/types/folder.rb', line 25

def messages_with_attachments
  opts = {:restriction =>
    {:is_equal_to => [
      {:field_uRI => {:field_uRI=>'item:HasAttachments'}},
      {:field_uRI_or_constant => {:constant => {:value=> true}}}
    ]}
  }
  self.items opts
end

#read_messagesObject



21
22
23
# File 'lib/ews/types/folder.rb', line 21

def read_messages
  self.items read_unread_restriction(true)
end

#unread_messagesObject



17
18
19
# File 'lib/ews/types/folder.rb', line 17

def unread_messages
  self.items read_unread_restriction
end