viewpoint 0.1.9 → 0.1.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -26,7 +26,8 @@ module Viewpoint
26
26
 
27
27
  # @param [String] attachment_id The unique ID for the attachment.
28
28
  def initialize(attachment_id)
29
- raise EwsNotImplemented, "ItemAttachments are not yet implemented in Viewpoint"
29
+ #raise EwsNotImplemented, "ItemAttachments are not yet implemented in Viewpoint"
30
+ warn "ItemAttachments are not yet implemented in Viewpoint"
30
31
  end
31
32
 
32
33
  end # ItemAttachment
@@ -0,0 +1,206 @@
1
+ module Viewpoint
2
+ module EWS
3
+ module ItemFieldUriMap
4
+
5
+ FIELD_URIS= {:folder_id => {:text => 'older:FolderId', :writable => true},
6
+ :parent_folder_id => {:text => 'folder:ParentFolderId', :writable => true},
7
+ :display_name => {:text => 'folder:DisplayName', :writable => true},
8
+ :unread_count => {:text => 'folder:UnreadCount', :writable => true},
9
+ :total_count => {:text => 'folder:TotalCount', :writable => true},
10
+ :child_folder_count => {:text => 'folder:ChildFolderCount', :writable => true},
11
+ :folder_class => {:text => 'folder:FolderClass', :writable => true},
12
+ :search_parameters => {:text => 'folder:SearchParameters', :writable => true},
13
+ :managed_folder_information => {:text => 'folder:ManagedFolderInformation', :writable => true},
14
+ :permission_set => {:text => 'folder:PermissionSet', :writable => true},
15
+ :effective_rights => {:text => 'folder:EffectiveRights', :writable => true},
16
+ :sharing_effective_rights => {:text => 'folder:SharingEffectiveRights', :writable => true},
17
+ :item_id => {:text => 'item:ItemId', :writable => true},
18
+ :parent_folder_id => {:text => 'item:ParentFolderId', :writable => true},
19
+ :item_class => {:text => 'item:ItemClass', :writable => true},
20
+ :mime_content => {:text => 'item:MimeContent', :writable => true},
21
+ :attachments => {:text => 'item:Attachments', :writable => true},
22
+ :subject => {:text => 'item:Subject', :writable => true},
23
+ :date_time_received => {:text => 'item:DateTimeReceived', :writable => true},
24
+ :size => {:text => 'item:Size', :writable => true},
25
+ :categories => {:text => 'item:Categories', :writable => true},
26
+ :has_attachments => {:text => 'item:HasAttachments', :writable => true},
27
+ :importance => {:text => 'item:Importance', :writable => true},
28
+ :in_reply_to => {:text => 'item:InReplyTo', :writable => true},
29
+ :internet_message_headers => {:text => 'item:InternetMessageHeaders', :writable => true},
30
+ :is_associated => {:text => 'item:IsAssociated', :writable => true},
31
+ :is_draft => {:text => 'item:IsDraft', :writable => true},
32
+ :is_from_me => {:text => 'item:IsFromMe', :writable => true},
33
+ :is_resend => {:text => 'item:IsResend', :writable => true},
34
+ :is_submitted => {:text => 'item:IsSubmitted', :writable => true},
35
+ :is_unmodified => {:text => 'item:IsUnmodified', :writable => true},
36
+ :date_time_sent => {:text => 'item:DateTimeSent', :writable => true},
37
+ :date_time_created => {:text => 'item:DateTimeCreated', :writable => true},
38
+ :body => {:text => 'item:Body', :writable => true},
39
+ :response_objects => {:text => 'item:ResponseObjects', :writable => true},
40
+ :sensitivity => {:text => 'item:Sensitivity', :writable => true},
41
+ :reminder_due_by => {:text => 'item:ReminderDueBy', :writable => true},
42
+ :reminder_is_set => {:text => 'item:ReminderIsSet', :writable => true},
43
+ :reminder_minutes_before_start => {:text => 'item:ReminderMinutesBeforeStart', :writable => true},
44
+ :display_to => {:text => 'item:DisplayTo', :writable => true},
45
+ :display_cc => {:text => 'item:DisplayCc', :writable => true},
46
+ :culture => {:text => 'item:Culture', :writable => true},
47
+ :effective_rights => {:text => 'item:EffectiveRights', :writable => true},
48
+ :last_modified_name => {:text => 'item:LastModifiedName', :writable => true},
49
+ :last_modified_time => {:text => 'item:LastModifiedTime', :writable => true},
50
+ :conversation_id => {:text => 'item:ConversationId', :writable => true},
51
+ :unique_body => {:text => 'item:UniqueBody', :writable => true},
52
+ :web_client_read_form_query_string => {:text => 'item:WebClientReadFormQueryString', :writable => true},
53
+ :web_client_edit_form_query_string => {:text => 'item:WebClientEditFormQueryString', :writable => true},
54
+ :conversation_index => {:text => 'message:ConversationIndex', :writable => true},
55
+ :conversation_topic => {:text => 'message:ConversationTopic', :writable => true},
56
+ :internet_message_id => {:text => 'message:InternetMessageId', :writable => true},
57
+ :is_read => {:text => 'message:IsRead', :writable => true},
58
+ :is_response_requested => {:text => 'message:IsResponseRequested', :writable => true},
59
+ :is_read_receipt_requested => {:text => 'message:IsReadReceiptRequested', :writable => true},
60
+ :is_delivery_receipt_requested => {:text => 'message:IsDeliveryReceiptRequested', :writable => true},
61
+ :references => {:text => 'message:References', :writable => true},
62
+ :reply_to => {:text => 'message:ReplyTo', :writable => true},
63
+ :from => {:text => 'message:From', :writable => true},
64
+ :sender => {:text => 'message:Sender', :writable => true},
65
+ :to_recipients => {:text => 'message:ToRecipients', :writable => true},
66
+ :cc_recipients => {:text => 'message:CcRecipients', :writable => true},
67
+ :bcc_recipients => {:text => 'message:BccRecipients', :writable => true},
68
+ :associated_calendar_item_id => {:text => 'meeting:AssociatedCalendarItemId', :writable => true},
69
+ :is_delegated => {:text => 'meeting:IsDelegated', :writable => true},
70
+ :is_out_of_date => {:text => 'meeting:IsOutOfDate', :writable => true},
71
+ :has_been_processed => {:text => 'meeting:HasBeenProcessed', :writable => true},
72
+ :response_type => {:text => 'meeting:ResponseType', :writable => true},
73
+ :meeting_request_type => {:text => 'meetingRequest:MeetingRequestType', :writable => true},
74
+ :intended_free_busy_status => {:text => 'meetingRequest:IntendedFreeBusyStatus', :writable => true},
75
+ :start => {:text => 'calendar:Start', :writable => true},
76
+ :end => {:text => 'calendar:End', :writable => true},
77
+ :original_start => {:text => 'calendar:OriginalStart', :writable => true},
78
+ :is_all_day_event => {:text => 'calendar:IsAllDayEvent', :writable => true},
79
+ :legacy_free_busy_status => {:text => 'calendar:LegacyFreeBusyStatus', :writable => true},
80
+ :location => {:text => 'calendar:Location', :writable => true},
81
+ :when => {:text => 'calendar:When', :writable => true},
82
+ :is_meeting => {:text => 'calendar:IsMeeting', :writable => true},
83
+ :is_cancelled => {:text => 'calendar:IsCancelled', :writable => true},
84
+ :is_recurring => {:text => 'calendar:IsRecurring', :writable => true},
85
+ :meeting_request_was_sent => {:text => 'calendar:MeetingRequestWasSent', :writable => true},
86
+ :is_response_requested => {:text => 'calendar:IsResponseRequested', :writable => true},
87
+ :calendar_item_type => {:text => 'calendar:CalendarItemType', :writable => true},
88
+ :my_response_type => {:text => 'calendar:MyResponseType', :writable => true},
89
+ :organizer => {:text => 'calendar:Organizer', :writable => true},
90
+ :required_attendees => {:text => 'calendar:RequiredAttendees', :writable => true},
91
+ :optional_attendees => {:text => 'calendar:OptionalAttendees', :writable => true},
92
+ :resources => {:text => 'calendar:Resources', :writable => true},
93
+ :conflicting_meeting_count => {:text => 'calendar:ConflictingMeetingCount', :writable => true},
94
+ :adjacent_meeting_count => {:text => 'calendar:AdjacentMeetingCount', :writable => true},
95
+ :conflicting_meetings => {:text => 'calendar:ConflictingMeetings', :writable => true},
96
+ :adjacent_meetings => {:text => 'calendar:AdjacentMeetings', :writable => true},
97
+ :duration => {:text => 'calendar:Duration', :writable => true},
98
+ :time_zone => {:text => 'calendar:TimeZone', :writable => true},
99
+ :appointment_reply_time => {:text => 'calendar:AppointmentReplyTime', :writable => true},
100
+ :appointment_sequence_number => {:text => 'calendar:AppointmentSequenceNumber', :writable => true},
101
+ :appointment_state => {:text => 'calendar:AppointmentState', :writable => true},
102
+ :recurrence => {:text => 'calendar:Recurrence', :writable => true},
103
+ :first_occurrence => {:text => 'calendar:FirstOccurrence', :writable => true},
104
+ :last_occurrence => {:text => 'calendar:LastOccurrence', :writable => true},
105
+ :modified_occurrences => {:text => 'calendar:ModifiedOccurrences', :writable => true},
106
+ :deleted_occurrences => {:text => 'calendar:DeletedOccurrences', :writable => true},
107
+ :meeting_time_zone => {:text => 'calendar:MeetingTimeZone', :writable => true},
108
+ :conference_type => {:text => 'calendar:ConferenceType', :writable => true},
109
+ :allow_new_time_proposal => {:text => 'calendar:AllowNewTimeProposal', :writable => true},
110
+ :is_online_meeting => {:text => 'calendar:IsOnlineMeeting', :writable => true},
111
+ :meeting_workspace_url => {:text => 'calendar:MeetingWorkspaceUrl', :writable => true},
112
+ :net_show_url => {:text => 'calendar:NetShowUrl', :writable => true},
113
+ :u_i_d => {:text => 'calendar:UID', :writable => true},
114
+ :recurrence_id => {:text => 'calendar:RecurrenceId', :writable => true},
115
+ :date_time_stamp => {:text => 'calendar:DateTimeStamp', :writable => true},
116
+ :start_time_zone => {:text => 'calendar:StartTimeZone', :writable => true},
117
+ :end_time_zone => {:text => 'calendar:EndTimeZone', :writable => true},
118
+ :actual_work => {:text => 'task:ActualWork', :writable => true},
119
+ :assigned_time => {:text => 'task:AssignedTime', :writable => true},
120
+ :billing_information => {:text => 'task:BillingInformation', :writable => true},
121
+ :change_count => {:text => 'task:ChangeCount', :writable => true},
122
+ :companies => {:text => 'task:Companies', :writable => true},
123
+ :complete_date => {:text => 'task:CompleteDate', :writable => true},
124
+ :contacts => {:text => 'task:Contacts', :writable => true},
125
+ :delegation_state => {:text => 'task:DelegationState', :writable => true},
126
+ :delegator => {:text => 'task:Delegator', :writable => true},
127
+ :due_date => {:text => 'task:DueDate', :writable => true},
128
+ :is_assignment_editable => {:text => 'task:IsAssignmentEditable', :writable => true},
129
+ :is_complete => {:text => 'task:IsComplete', :writable => true},
130
+ :is_recurring => {:text => 'task:IsRecurring', :writable => true},
131
+ :is_team_task => {:text => 'task:IsTeamTask', :writable => true},
132
+ :mileage => {:text => 'task:Mileage', :writable => true},
133
+ :owner => {:text => 'task:Owner', :writable => true},
134
+ :percent_complete => {:text => 'task:PercentComplete', :writable => true},
135
+ :recurrence => {:text => 'task:Recurrence', :writable => true},
136
+ :start_date => {:text => 'task:StartDate', :writable => true},
137
+ :status => {:text => 'task:Status', :writable => true},
138
+ :status_description => {:text => 'task:StatusDescription', :writable => true},
139
+ :total_work => {:text => 'task:TotalWork', :writable => true},
140
+ :assistant_name => {:text => 'contacts:AssistantName', :writable => true},
141
+ :birthday => {:text => 'contacts:Birthday', :writable => true},
142
+ :business_home_page => {:text => 'contacts:BusinessHomePage', :writable => true},
143
+ :children => {:text => 'contacts:Children', :writable => true},
144
+ :companies => {:text => 'contacts:Companies', :writable => true},
145
+ :company_name => {:text => 'contacts:CompanyName', :writable => true},
146
+ :complete_name => {:text => 'contacts:CompleteName', :writable => true},
147
+ :contact_source => {:text => 'contacts:ContactSource', :writable => true},
148
+ :culture => {:text => 'contacts:Culture', :writable => true},
149
+ :department => {:text => 'contacts:Department', :writable => true},
150
+ :display_name => {:text => 'contacts:DisplayName', :writable => true},
151
+ :email_addresses => {:text => 'contacts:EmailAddresses', :writable => true},
152
+ :file_as => {:text => 'contacts:FileAs', :writable => true},
153
+ :file_as_mapping => {:text => 'contacts:FileAsMapping', :writable => true},
154
+ :generation => {:text => 'contacts:Generation', :writable => true},
155
+ :given_name => {:text => 'contacts:GivenName', :writable => true},
156
+ :has_picture => {:text => 'contacts:HasPicture', :writable => true},
157
+ :im_addresses => {:text => 'contacts:ImAddresses', :writable => true},
158
+ :initials => {:text => 'contacts:Initials', :writable => true},
159
+ :job_title => {:text => 'contacts:JobTitle', :writable => true},
160
+ :manager => {:text => 'contacts:Manager', :writable => true},
161
+ :middle_name => {:text => 'contacts:MiddleName', :writable => true},
162
+ :mileage => {:text => 'contacts:Mileage', :writable => true},
163
+ :nickname => {:text => 'contacts:Nickname', :writable => true},
164
+ :office_location => {:text => 'contacts:OfficeLocation', :writable => true},
165
+ :phone_numbers => {:text => 'contacts:PhoneNumbers', :writable => true},
166
+ :physical_addresses => {:text => 'contacts:PhysicalAddresses', :writable => true},
167
+ :postal_address_index => {:text => 'contacts:PostalAddressIndex', :writable => true},
168
+ :profession => {:text => 'contacts:Profession', :writable => true},
169
+ :spouse_name => {:text => 'contacts:SpouseName', :writable => true},
170
+ :surname => {:text => 'contacts:Surname', :writable => true},
171
+ :wedding_anniversary => {:text => 'contacts:WeddingAnniversary', :writable => true},
172
+ :members => {:text => 'distributionlist:Members', :writable => true},
173
+ :posted_time => {:text => 'postitem:PostedTime', :writable => true},
174
+ :conversation_id => {:text => 'conversation:ConversationId', :writable => true},
175
+ :conversation_topic => {:text => 'conversation:ConversationTopic', :writable => true},
176
+ :unique_recipients => {:text => 'conversation:UniqueRecipients', :writable => true},
177
+ :global_unique_recipients => {:text => 'conversation:GlobalUniqueRecipients', :writable => true},
178
+ :unique_unread_senders => {:text => 'conversation:UniqueUnreadSenders', :writable => true},
179
+ :global_unique_unread_senders => {:text => 'conversation:GlobalUniqueUnreadSenders', :writable => true},
180
+ :unique_senders => {:text => 'conversation:UniqueSenders', :writable => true},
181
+ :global_unique_senders => {:text => 'conversation:GlobalUniqueSenders', :writable => true},
182
+ :last_delivery_time => {:text => 'conversation:LastDeliveryTime', :writable => true},
183
+ :global_last_delivery_time => {:text => 'conversation:GlobalLastDeliveryTime', :writable => true},
184
+ :categories => {:text => 'conversation:Categories', :writable => true},
185
+ :global_categories => {:text => 'conversation:GlobalCategories', :writable => true},
186
+ :flag_status => {:text => 'conversation:FlagStatus', :writable => true},
187
+ :global_flag_status => {:text => 'conversation:GlobalFlagStatus', :writable => true},
188
+ :has_attachments => {:text => 'conversation:HasAttachments', :writable => true},
189
+ :global_has_attachments => {:text => 'conversation:GlobalHasAttachments', :writable => true},
190
+ :message_count => {:text => 'conversation:MessageCount', :writable => true},
191
+ :global_message_count => {:text => 'conversation:GlobalMessageCount', :writable => true},
192
+ :unread_count => {:text => 'conversation:UnreadCount', :writable => true},
193
+ :global_unread_count => {:text => 'conversation:GlobalUnreadCount', :writable => true},
194
+ :size => {:text => 'conversation:Size', :writable => true},
195
+ :global_size => {:text => 'conversation:GlobalSize', :writable => true},
196
+ :item_classes => {:text => 'conversation:ItemClasses', :writable => true},
197
+ :global_item_classes => {:text => 'conversation:GlobalItemClasses', :writable => true},
198
+ :importance => {:text => 'conversation:Importance', :writable => true},
199
+ :global_importance => {:text => 'conversation:GlobalImportance', :writable => true},
200
+ :item_ids => {:text => 'conversation:ItemIds', :writable => true},
201
+ :global_item_ids => {:text => 'conversation:GlobalItemIds', :writable => true}
202
+ }
203
+
204
+ end
205
+ end
206
+ end
@@ -97,10 +97,10 @@ module Viewpoint
97
97
  mail.in_reply_to in_reply_to unless in_reply_to.nil?
98
98
  mail.references references unless references.nil?
99
99
  mail.subject subject unless subject.nil?
100
- mail.return_path = sender.email_address unless sender.nil?
101
- mail.to to_recipients.map {|r| r.email_address} unless to_recipients.nil?
102
- mail.cc cc_recipients.map {|r| r.email_address} unless cc_recipients.nil?
103
- mail.from from.email_address unless from.nil?
100
+ mail.return_path = sender.email_address unless(sender.nil? || ! sender.respond_to?(:email_address))
101
+ mail.to to_recipients.map {|r| r.email_address if r.respond_to?(:email_address) } unless to_recipients.nil?
102
+ mail.cc cc_recipients.map {|r| r.email_address if r.respond_to?(:email_address) } unless cc_recipients.nil?
103
+ mail.from from.email_address unless(from.nil? || ! from.respond_to?(:email_address))
104
104
  # Because the mail gem does not pass an object to the block there are some issues with using self
105
105
  msg = self
106
106
  if(body_type == "HTML")
@@ -65,6 +65,14 @@ module Viewpoint
65
65
  @ews_item[:#{var}][:text]
66
66
  end
67
67
  EOF
68
+ if(Item::FIELD_URIS.has_key?(var.to_sym) && Item::FIELD_URIS[var.to_sym][:writable])
69
+ self.instance_eval <<-EOF
70
+ def #{mname}=(newtext)
71
+ @ews_item[:#{var}][:text] = newtext
72
+ @updates[:#{var}] = @ews_item[:#{var}]
73
+ end
74
+ EOF
75
+ end
68
76
  else
69
77
  @ews_methods_undef << var
70
78
  end
@@ -81,8 +89,14 @@ module Viewpoint
81
89
  def define_attr_str_var(parent, *vars)
82
90
  return unless @ews_item[parent]
83
91
  vars.each do |var|
84
- if(@ews_item[parent][var])
85
- @ews_methods << var
92
+ @ews_methods << var
93
+ if(@ews_item[parent][var].is_a?(Hash) && @ews_item[parent][var].has_key?(:text))
94
+ self.instance_eval <<-EOF
95
+ def #{var}
96
+ @ews_item[:#{parent}][:#{var}][:text]
97
+ end
98
+ EOF
99
+ elsif(@ews_item[parent][var])
86
100
  self.instance_eval <<-EOF
87
101
  def #{var}
88
102
  @ews_item[:#{parent}][:#{var}]
@@ -104,6 +118,14 @@ module Viewpoint
104
118
  @#{var} ||= @ews_item[:#{var}][:text].to_i
105
119
  end
106
120
  EOF
121
+ if(Item::FIELD_URIS.has_key?(var.to_sym) && Item::FIELD_URIS[var.to_sym][:writable])
122
+ self.instance_eval <<-EOF
123
+ def #{var}=(newint)
124
+ @ews_item[:#{var}][:text] = newint.to_s
125
+ @updates[:#{var}] = @ews_item[:#{var}]
126
+ end
127
+ EOF
128
+ end
107
129
  else
108
130
  @ews_methods_undef << var
109
131
  end
@@ -119,6 +141,15 @@ module Viewpoint
119
141
  @#{var} ||= (@ews_item[:#{var}][:text] == 'true') ? true : false
120
142
  end
121
143
  EOF
144
+ if(Item::FIELD_URIS.has_key?(var.to_sym) && Item::FIELD_URIS[var.to_sym][:writable])
145
+ self.instance_eval <<-EOF
146
+ def #{var}=(newbool)
147
+ raise EwsError, "Value not boolean for method #{var}=" unless(newbool.is_a?(TrueClass) || newbool.is_a?(FalseClass))
148
+ @ews_item[:#{var}][:text] = newbool.to_s
149
+ @updates[:#{var}] = @ews_item[:#{var}]
150
+ end
151
+ EOF
152
+ end
122
153
  else
123
154
  @ews_methods_undef << "#{var}?".to_sym
124
155
  end
@@ -134,6 +165,14 @@ module Viewpoint
134
165
  @#{var} ||= DateTime.parse(@ews_item[:#{var}][:text])
135
166
  end
136
167
  EOF
168
+ if(Item::FIELD_URIS.has_key?(var.to_sym) && Item::FIELD_URIS[var.to_sym][:writable])
169
+ self.instance_eval <<-EOF
170
+ def #{var}=(newdate)
171
+ @ews_item[:#{var}][:text] = newdate.to_s
172
+ @updates[:#{var}] = @ews_item[:#{var}]
173
+ end
174
+ EOF
175
+ end
137
176
  else
138
177
  @ews_methods_undef << var
139
178
  end
@@ -211,7 +250,6 @@ module Viewpoint
211
250
  end
212
251
  end
213
252
 
214
-
215
253
  # After a delete is called on an object this method will clear
216
254
  # out all of the defined EWS methods so they can't be called on the
217
255
  # instantiated object.
@@ -65,14 +65,7 @@ module Viewpoint
65
65
  item[:start_date] = {:text => v_start.to_s} unless v_start.nil?
66
66
  item[:due_date] = {:text => v_end.to_s} unless v_end.nil?
67
67
 
68
- conn = Viewpoint::EWS::EWS.instance
69
- resp = conn.ews.create_task_item(folder, item, 'SaveOnly')
70
- if(resp.status == 'Success')
71
- resp = resp.items.shift
72
- self.new(resp[resp.keys.first])
73
- else
74
- raise EwsError, "Could not create task. #{resp.code}: #{resp.message}"
75
- end
68
+ self.create_item_from_hash(item, folder)
76
69
  end
77
70
 
78
71
 
@@ -115,7 +108,12 @@ module Viewpoint
115
108
  private
116
109
 
117
110
  def init_methods
118
- super()
111
+ super
112
+
113
+ define_str_var :status, :owner
114
+ define_bool_var :is_complete, :is_recurring, :is_team_task
115
+ define_int_var :percent_complete, :actual_work, :change_count
116
+ define_datetime_var :start_date, :due_date, :complete_date
119
117
  end
120
118
 
121
119
  end # Task
@@ -544,12 +544,15 @@ module Viewpoint
544
544
  # Used to modify the properties of an existing item in the Exchange store
545
545
  # @see http://msdn.microsoft.com/en-us/library/aa581084.aspx
546
546
  # @param [Array] item_ids An Array of item ids
547
- def update_item(item_ids, changes)
547
+ # @param [Hash] changes a Hash of changes to be fed to auto_hierarchy!
548
+ # @param [Hash] opts various attributes to set for this update. See the Technet docs for more info
549
+ def update_item(item_ids, changes, opts = {:message_disposition => 'SaveOnly', :conflict_resolution => 'AutoResolve'})
548
550
  action = "#{SOAP_ACTION_PREFIX}/UpdateItem"
549
551
  resp = invoke("#{NS_EWS_MESSAGES}:UpdateItem", action) do |root|
550
552
  build!(root) do
551
- root.set_attr('MessageDisposition', 'SaveOnly')
552
- root.set_attr('ConflictResolution', 'AutoResolve')
553
+ root.set_attr('MessageDisposition', opts[:message_disposition]) if opts.has_key?(:message_disposition)
554
+ root.set_attr('ConflictResolution', opts[:conflict_resolution]) if opts.has_key?(:message_disposition)
555
+ root.set_attr('SendMeetingInvitationsOrCancellations', opts[:send_meeting_invitations_or_cancellations]) if opts.has_key?(:send_meeting_invitations_or_cancellations)
553
556
  item_changes!(root, item_ids, changes)
554
557
  end
555
558
  end
@@ -771,6 +774,7 @@ module Viewpoint
771
774
 
772
775
  # Override the superclasses' invoke so we can add http_options to each request
773
776
  def invoke(msg, action)
777
+ raise EwsError, "EWS Endpoint not set." if uri.nil?
774
778
  begin
775
779
  super(msg, {:soap_action => action, :http_options => @@http_options})
776
780
  rescue SocketError
@@ -127,6 +127,10 @@ module Viewpoint
127
127
  raise EwsError, "#{@response_message.code}: #{@response_message.message}"
128
128
  end
129
129
  end
130
+
131
+ def update_item_response(opts)
132
+ create_item_response(opts)
133
+ end
130
134
 
131
135
  def send_item_response(opts)
132
136
  if(@response_message.status == 'Success')
@@ -153,7 +157,6 @@ module Viewpoint
153
157
  end
154
158
  end
155
159
 
156
-
157
160
  def create_attachment_response(opts)
158
161
  if(@response_message.status == 'Success')
159
162
  att_id = (@response/"//#{NS_EWS_TYPES}:FileAttachment/*").last
@@ -22,6 +22,8 @@
22
22
  require 'singleton'
23
23
  require 'date'
24
24
  require 'base64'
25
+ require 'kconv' if(RUBY_VERSION.start_with? '1.9') # bug in rubyntlm with ruby 1.9.x
26
+
25
27
 
26
28
  # Class Extensions
27
29
  require 'extensions/string'
@@ -35,6 +37,7 @@ require 'model/model'
35
37
  require 'model/mailbox_user'
36
38
  require 'model/attendee'
37
39
  require 'model/generic_folder'
40
+ require 'model/item_field_uri_map' # supports Item
38
41
  require 'model/item'
39
42
  # Specific Models
40
43
  # Folders
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 1
8
- - 9
9
- version: 0.1.9
8
+ - 10
9
+ version: 0.1.10
10
10
  platform: ruby
11
11
  authors:
12
12
  - Dan Wanek
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2010-11-28 00:00:00 -06:00
17
+ date: 2010-12-16 00:00:00 -06:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
@@ -99,7 +99,7 @@ dependencies:
99
99
  version: 2.2.5
100
100
  type: :runtime
101
101
  version_requirements: *id006
102
- description: " \tA Ruby client access library for Microsoft Exchange Web Services (EWS). Examples can be found here: http://distributed-frostbite.blogspot.com\n"
102
+ description: "A Ruby client access library for Microsoft Exchange Web Services (EWS). Examples can be found here: http://distributed-frostbite.blogspot.com"
103
103
  email: dan.wanek@gmail.com
104
104
  executables: []
105
105
 
@@ -109,52 +109,46 @@ extra_rdoc_files:
109
109
  - README
110
110
  - COPYING.txt
111
111
  files:
112
- - COPYING.txt
113
112
  - Changelog.txt
114
113
  - README
115
- - Rakefile
114
+ - COPYING.txt
116
115
  - TODO
117
- - VERSION
118
116
  - lib/exceptions/exceptions.rb
119
- - lib/extensions/string.rb
120
- - lib/model/attachment.rb
121
- - lib/model/attendee.rb
122
- - lib/model/calendar_folder.rb
117
+ - lib/field_hash2.txt
118
+ - lib/field_hash.txt
119
+ - lib/soap/soap_provider.rb
120
+ - lib/soap/handsoap/builder.rb
121
+ - lib/soap/handsoap/ews_service.rb
122
+ - lib/soap/handsoap/builders/ews_builder.rb
123
+ - lib/soap/handsoap/builders/ews_build_helpers.rb
124
+ - lib/soap/handsoap/parsers/ews_parser.rb
125
+ - lib/soap/handsoap/parser.rb
126
+ - lib/viewpoint.rb
127
+ - lib/model/distribution_list.rb
123
128
  - lib/model/calendar_item.rb
124
- - lib/model/contact.rb
129
+ - lib/model/attendee.rb
130
+ - lib/model/meeting_request.rb
131
+ - lib/model/search_folder.rb
132
+ - lib/model/model.rb
125
133
  - lib/model/contacts_folder.rb
126
- - lib/model/distribution_list.rb
127
- - lib/model/event.rb
128
- - lib/model/file_attachment.rb
129
134
  - lib/model/folder.rb
130
- - lib/model/generic_folder.rb
131
135
  - lib/model/item.rb
132
- - lib/model/item_attachment.rb
133
- - lib/model/mailbox_user.rb
134
136
  - lib/model/meeting_cancellation.rb
135
- - lib/model/meeting_message.rb
136
- - lib/model/meeting_request.rb
137
+ - lib/model/event.rb
138
+ - lib/model/item_field_uri_map.rb
139
+ - lib/model/task.rb
140
+ - lib/model/calendar_folder.rb
141
+ - lib/model/generic_folder.rb
142
+ - lib/model/file_attachment.rb
137
143
  - lib/model/meeting_response.rb
138
144
  - lib/model/message.rb
139
- - lib/model/model.rb
140
- - lib/model/search_folder.rb
141
- - lib/model/task.rb
145
+ - lib/model/contact.rb
146
+ - lib/model/attachment.rb
147
+ - lib/model/item_attachment.rb
142
148
  - lib/model/tasks_folder.rb
143
- - lib/soap/handsoap/builder.rb
144
- - lib/soap/handsoap/builders/ews_build_helpers.rb
145
- - lib/soap/handsoap/builders/ews_builder.rb
146
- - lib/soap/handsoap/ews_service.rb
147
- - lib/soap/handsoap/parser.rb
148
- - lib/soap/handsoap/parsers/ews_parser.rb
149
- - lib/soap/soap_provider.rb
150
- - lib/viewpoint.rb
151
- - preamble
152
- - test/.rspec
153
- - test/spec/basic_functions.spec
154
- - test/spec/folder_subscriptions.spec
155
- - test/spec/folder_synchronization.spec
156
- - test/spec/item_tests.spec
157
- - utils/ewsWSDL2rb.rb
149
+ - lib/model/mailbox_user.rb
150
+ - lib/model/meeting_message.rb
151
+ - lib/extensions/string.rb
158
152
  has_rdoc: true
159
153
  homepage: http://github.com/zenchild/Viewpoint
160
154
  licenses: []