viewpoint 1.2.0 → 2.0.0

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.
Files changed (90) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +11 -6
  3. data/lib/ews/calendar_accessors.rb +37 -33
  4. data/lib/ews/connection.rb +152 -125
  5. data/lib/ews/connection_helper.rb +36 -33
  6. data/lib/ews/convert_accessors.rb +58 -54
  7. data/lib/ews/errors.rb +59 -53
  8. data/lib/ews/ews_client.rb +92 -79
  9. data/lib/ews/exceptions/exceptions.rb +61 -61
  10. data/lib/ews/folder_accessors.rb +235 -234
  11. data/lib/ews/impersonation.rb +29 -23
  12. data/lib/ews/item_accessors.rb +215 -213
  13. data/lib/ews/mailbox_accessors.rb +82 -79
  14. data/lib/ews/meeting_accessors.rb +38 -31
  15. data/lib/ews/message_accessors.rb +83 -81
  16. data/lib/ews/push_subscription_accessors.rb +29 -27
  17. data/lib/ews/room_accessors.rb +48 -46
  18. data/lib/ews/roomlist_accessors.rb +47 -45
  19. data/lib/ews/soap/builders/ews_builder.rb +1191 -1176
  20. data/lib/ews/soap/ews_response.rb +68 -73
  21. data/lib/ews/soap/ews_soap_availability_response.rb +57 -57
  22. data/lib/ews/soap/ews_soap_free_busy_response.rb +115 -117
  23. data/lib/ews/soap/ews_soap_response.rb +99 -101
  24. data/lib/ews/soap/ews_soap_room_response.rb +45 -45
  25. data/lib/ews/soap/ews_soap_roomlist_response.rb +45 -46
  26. data/lib/ews/soap/exchange_availability.rb +54 -52
  27. data/lib/ews/soap/exchange_data_services.rb +693 -711
  28. data/lib/ews/soap/exchange_notification.rb +123 -128
  29. data/lib/ews/soap/exchange_synchronization.rb +82 -82
  30. data/lib/ews/soap/exchange_time_zones.rb +41 -44
  31. data/lib/ews/soap/exchange_user_configuration.rb +30 -27
  32. data/lib/ews/soap/exchange_web_service.rb +237 -233
  33. data/lib/ews/soap/parsers/ews_parser.rb +46 -42
  34. data/lib/ews/soap/parsers/ews_sax_document.rb +63 -58
  35. data/lib/ews/soap/response_message.rb +69 -68
  36. data/lib/ews/soap/responses/create_attachment_response_message.rb +45 -45
  37. data/lib/ews/soap/responses/create_item_response_message.rb +26 -25
  38. data/lib/ews/soap/responses/find_item_response_message.rb +76 -78
  39. data/lib/ews/soap/responses/get_events_response_message.rb +52 -51
  40. data/lib/ews/soap/responses/send_notification_response_message.rb +53 -51
  41. data/lib/ews/soap/responses/subscribe_response_message.rb +37 -34
  42. data/lib/ews/soap/responses/sync_folder_hierarchy_response_message.rb +38 -35
  43. data/lib/ews/soap/responses/sync_folder_items_response_message.rb +38 -35
  44. data/lib/ews/soap.rb +27 -26
  45. data/lib/ews/templates/calendar_item.rb +64 -60
  46. data/lib/ews/templates/forward_item.rb +19 -17
  47. data/lib/ews/templates/message.rb +61 -58
  48. data/lib/ews/templates/reply_to_item.rb +20 -18
  49. data/lib/ews/templates/task.rb +55 -55
  50. data/lib/ews/types/attachment.rb +75 -74
  51. data/lib/ews/types/attendee.rb +27 -25
  52. data/lib/ews/types/calendar_folder.rb +58 -59
  53. data/lib/ews/types/calendar_item.rb +133 -131
  54. data/lib/ews/types/contact.rb +11 -5
  55. data/lib/ews/types/contacts_folder.rb +10 -5
  56. data/lib/ews/types/copied_event.rb +47 -48
  57. data/lib/ews/types/created_event.rb +22 -20
  58. data/lib/ews/types/deleted_event.rb +22 -20
  59. data/lib/ews/types/distribution_list.rb +11 -5
  60. data/lib/ews/types/event.rb +60 -59
  61. data/lib/ews/types/export_items_response_message.rb +54 -50
  62. data/lib/ews/types/file_attachment.rb +63 -61
  63. data/lib/ews/types/folder.rb +58 -57
  64. data/lib/ews/types/free_busy_changed_event.rb +22 -20
  65. data/lib/ews/types/generic_folder.rb +348 -372
  66. data/lib/ews/types/item.rb +401 -397
  67. data/lib/ews/types/item_attachment.rb +87 -80
  68. data/lib/ews/types/item_field_uri_map.rb +201 -200
  69. data/lib/ews/types/mailbox_user.rb +146 -154
  70. data/lib/ews/types/meeting_cancellation.rb +11 -5
  71. data/lib/ews/types/meeting_message.rb +11 -5
  72. data/lib/ews/types/meeting_request.rb +11 -5
  73. data/lib/ews/types/meeting_response.rb +11 -5
  74. data/lib/ews/types/message.rb +11 -5
  75. data/lib/ews/types/modified_event.rb +43 -45
  76. data/lib/ews/types/moved_event.rb +47 -48
  77. data/lib/ews/types/new_mail_event.rb +22 -20
  78. data/lib/ews/types/out_of_office.rb +145 -144
  79. data/lib/ews/types/post_item.rb +11 -5
  80. data/lib/ews/types/search_folder.rb +10 -5
  81. data/lib/ews/types/status_event.rb +37 -36
  82. data/lib/ews/types/task.rb +39 -33
  83. data/lib/ews/types/tasks_folder.rb +31 -25
  84. data/lib/ews/types.rb +134 -139
  85. data/lib/viewpoint/logging/config.rb +19 -19
  86. data/lib/viewpoint/logging.rb +23 -17
  87. data/lib/viewpoint/string_utils.rb +31 -32
  88. data/lib/viewpoint.rb +18 -18
  89. metadata +50 -25
  90. data/Changelog.txt +0 -1004
@@ -1,156 +1,148 @@
1
- =begin
2
- This file is part of Viewpoint; the Ruby library for Microsoft Exchange Web Services.
3
-
4
- Copyright © 2011 Dan Wanek <dan.wanek@gmail.com>
5
-
6
- Licensed under the Apache License, Version 2.0 (the "License");
7
- you may not use this file except in compliance with the License.
8
- You may obtain a copy of the License at
9
-
10
- http://www.apache.org/licenses/LICENSE-2.0
11
-
12
- Unless required by applicable law or agreed to in writing, software
13
- distributed under the License is distributed on an "AS IS" BASIS,
14
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
- See the License for the specific language governing permissions and
16
- limitations under the License.
17
- =end
18
-
19
- module Viewpoint::EWS::Types
20
-
21
- # This represents a Mailbox object in the Exchange data store
22
- # @see http://msdn.microsoft.com/en-us/library/aa565036.aspx MSDN docs
23
- # @todo Design a Class method that resolves to an Array of MailboxUsers
24
- class MailboxUser
25
- include Viewpoint::EWS
26
- include Viewpoint::EWS::Types
27
-
28
- MAILBOX_KEY_PATHS = {
29
- name: [:name],
30
- email_address: [:email_address],
31
- }
32
- MAILBOX_KEY_TYPES = {}
33
- MAILBOX_KEY_ALIAS = {
34
- email: :email_address,
35
- }
36
-
37
- def initialize(ews, mbox_user)
38
- @ews = ews
39
- @ews_item = mbox_user
40
- simplify!
41
- end
42
-
43
- def out_of_office_settings
44
- mailbox = {:address => self.email_address}
45
- resp = @ews.get_user_oof_settings(mailbox)
46
- ewsi = resp.response.clone
47
- ewsi.delete(:response_message)
48
- return OutOfOffice.new(self,ewsi)
49
- s = resp[:oof_settings]
50
- @oof_state = s[:oof_state][:text]
51
- @oof_ext_audience = s[:external_audience][:text]
52
- @oof_start = DateTime.parse(s[:duration][:start_time][:text])
53
- @oof_end = DateTime.parse(s[:duration][:end_time][:text])
54
- @oof_internal_reply = s[:internal_reply][:message][:text]
55
- @oof_external_reply = s[:internal_reply][:message][:text]
56
- true
57
- end
58
-
59
- # Get information about when the user with the given email address is available.
60
- # @param [String] email_address The email address of the person to find availability for.
61
- # @param [DateTime] start_time The start of the time range to check as an xs:dateTime.
62
- # @param [DateTime] end_time The end of the time range to check as an xs:dateTime.
63
- # @see http://msdn.microsoft.com/en-us/library/aa563800(v=exchg.140)
64
- def get_user_availability(email_address, start_time, end_time)
65
- opts = {
66
- mailbox_data: [ :email =>{:address => email_address} ],
67
- free_busy_view_options: {
68
- time_window: {start_time: start_time, end_time: end_time},
69
- }
70
- }
71
- resp = (Viewpoint::EWS::EWS.instance).ews.get_user_availability(opts)
72
- if(resp.status == 'Success')
73
- return resp.items
74
- else
75
- raise EwsError, "GetUserAvailability produced an error: #{resp.code}: #{resp.message}"
76
- end
77
- end
78
-
79
- # Adds one or more delegates to a principal's mailbox and sets specific access permissions
80
- # @see http://msdn.microsoft.com/en-us/library/bb856527.aspx
81
- #
82
- # @param [String,MailboxUser] delegate_email The user you would like to give delegate access to.
83
- # This can either be a simple String e-mail address or you can pass in a MailboxUser object.
84
- # @param [Hash] permissions A hash of folder type keys and permission type values. An example
85
- # would be {:calendar_folder_permission_level => 'Editor'}. Possible keys are:
86
- # :calendar_folder_permission_level, :tasks_folder_permission_level, :inbox_folder_permission_level
87
- # :contacts_folder_permission_level, :notes_folder_permission_level, :journal_folder_permission_level
88
- # and possible values are: None/Editor/Reviewer/Author/Custom
89
- # @return [true] This method either returns true or raises an error with the message
90
- # as to why this operation did not succeed.
91
- def add_delegate!(delegate_email, permissions)
92
- # Use a new hash so the passed hash is not modified in case we are in a loop.
93
- # Thanks to Markus Roberts for pointing this out.
94
- formatted_perms = {}
95
- # Modify permissions so we can pass it to the builders
96
- permissions.each_pair do |k,v|
97
- formatted_perms[k] = {:text => v}
98
- end
99
-
100
- resp = (Viewpoint::EWS::EWS.instance).ews.add_delegate(self.email_address, delegate_email, formatted_perms)
101
- if(resp.status == 'Success')
102
- return true
103
- else
104
- raise EwsError, "Could not add delegate access for user #{delegate_email}: #{resp.code}, #{resp.message}"
105
- end
106
- end
107
-
108
- def update_delegate!(delegate_email, permissions)
109
- # Modify permissions so we can pass it to the builders
110
- formatted_perms = {}
111
- permissions.each_pair do |k,v|
112
- formatted_perms[k] = {:text => v}
113
- end
114
-
115
- resp = (Viewpoint::EWS::EWS.instance).ews.update_delegate(self.email_address, delegate_email, formatted_perms)
116
- if(resp.status == 'Success')
117
- return true
118
- else
119
- raise EwsError, "Could not update delegate access for user #{delegate_email}: #{resp.code}, #{resp.message}"
1
+ # frozen_string_literal: true
2
+
3
+ # This file is part of Viewpoint; the Ruby library for Microsoft Exchange Web Services.
4
+ #
5
+ # Copyright © 2011 Dan Wanek <dan.wanek@gmail.com>
6
+ #
7
+ # Licensed under the Apache License, Version 2.0 (the "License");
8
+ # you may not use this file except in compliance with the License.
9
+ # You may obtain a copy of the License at
10
+ #
11
+ # http://www.apache.org/licenses/LICENSE-2.0
12
+ #
13
+ # Unless required by applicable law or agreed to in writing, software
14
+ # distributed under the License is distributed on an "AS IS" BASIS,
15
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
+ # See the License for the specific language governing permissions and
17
+ # limitations under the License.
18
+
19
+ module Viewpoint
20
+ module EWS
21
+ module Types
22
+ # This represents a Mailbox object in the Exchange data store
23
+ # @see http://msdn.microsoft.com/en-us/library/aa565036.aspx MSDN docs
24
+ # @todo Design a Class method that resolves to an Array of MailboxUsers
25
+ class MailboxUser
26
+ include Viewpoint::EWS
27
+ include Viewpoint::EWS::Types
28
+
29
+ MAILBOX_KEY_PATHS = {
30
+ name: [:name],
31
+ email_address: [:email_address]
32
+ }.freeze
33
+ MAILBOX_KEY_TYPES = {}.freeze
34
+ MAILBOX_KEY_ALIAS = {
35
+ email: :email_address
36
+ }.freeze
37
+
38
+ def initialize(ews, mbox_user)
39
+ @ews = ews
40
+ @ews_item = mbox_user
41
+ simplify!
42
+ end
43
+
44
+ def out_of_office_settings
45
+ mailbox = { address: email_address }
46
+ resp = @ews.get_user_oof_settings(mailbox)
47
+ ewsi = resp.response.clone
48
+ ewsi.delete(:response_message)
49
+ OutOfOffice.new(self, ewsi)
50
+ end
51
+
52
+ # Get information about when the user with the given email address is available.
53
+ # @param [String] email_address The email address of the person to find availability for.
54
+ # @param [DateTime] start_time The start of the time range to check as an xs:dateTime.
55
+ # @param [DateTime] end_time The end of the time range to check as an xs:dateTime.
56
+ # @see http://msdn.microsoft.com/en-us/library/aa563800(v=exchg.140)
57
+ def get_user_availability(email_address, start_time, end_time)
58
+ opts = {
59
+ mailbox_data: [{ email: { address: email_address } }],
60
+ free_busy_view_options: {
61
+ time_window: { start_time: start_time, end_time: end_time }
62
+ }
63
+ }
64
+ resp = Viewpoint::EWS::EWS.instance.ews.get_user_availability(opts)
65
+ unless resp.status == 'Success'
66
+ raise EwsError, "GetUserAvailability produced an error: #{resp.code}: #{resp.message}"
67
+ end
68
+
69
+ resp.items
70
+ end
71
+
72
+ # Adds one or more delegates to a principal's mailbox and sets specific access permissions
73
+ # @see http://msdn.microsoft.com/en-us/library/bb856527.aspx
74
+ #
75
+ # @param [String,MailboxUser] delegate_email The user you would like to give delegate access to.
76
+ # This can either be a simple String e-mail address or you can pass in a MailboxUser object.
77
+ # @param [Hash] permissions A hash of folder type keys and permission type values. An example
78
+ # would be {:calendar_folder_permission_level => 'Editor'}. Possible keys are:
79
+ # :calendar_folder_permission_level, :tasks_folder_permission_level, :inbox_folder_permission_level
80
+ # :contacts_folder_permission_level, :notes_folder_permission_level, :journal_folder_permission_level
81
+ # and possible values are: None/Editor/Reviewer/Author/Custom
82
+ # @return [true] This method either returns true or raises an error with the message
83
+ # as to why this operation did not succeed.
84
+ def add_delegate!(delegate_email, permissions)
85
+ # Use a new hash so the passed hash is not modified in case we are in a loop.
86
+ # Thanks to Markus Roberts for pointing this out.
87
+ formatted_perms = {}
88
+ # Modify permissions so we can pass it to the builders
89
+ permissions.each_pair do |k, v|
90
+ formatted_perms[k] = { text: v }
91
+ end
92
+
93
+ resp = Viewpoint::EWS::EWS.instance.ews.add_delegate(email_address, delegate_email, formatted_perms)
94
+ unless resp.status == 'Success'
95
+ raise EwsError, "Could not add delegate access for user #{delegate_email}: #{resp.code}, #{resp.message}"
96
+ end
97
+
98
+ true
99
+ end
100
+
101
+ def update_delegate!(delegate_email, permissions)
102
+ # Modify permissions so we can pass it to the builders
103
+ formatted_perms = {}
104
+ permissions.each_pair do |k, v|
105
+ formatted_perms[k] = { text: v }
106
+ end
107
+
108
+ resp = Viewpoint::EWS::EWS.instance.ews.update_delegate(email_address, delegate_email, formatted_perms)
109
+ unless resp.status == 'Success'
110
+ raise EwsError, "Could not update delegate access for user #{delegate_email}: #{resp.code}, #{resp.message}"
111
+ end
112
+
113
+ true
114
+ end
115
+
116
+ def get_delegate_info # rubocop:disable Naming/AccessorMethodName -- public API name
117
+ Viewpoint::EWS::EWS.instance.ews.get_delegate(email_address)
118
+ # if(resp.status == 'Success')
119
+ # return true
120
+ # else
121
+ # raise EwsError, "Could not update delegate access for user #{delegate_email}: " \
122
+ # "#{resp.code}, #{resp.message}"
123
+ # end
124
+ end
125
+
126
+ private
127
+
128
+ def simplify!
129
+ @ews_item = @ews_item.each_with_object({}) { |o, m|
130
+ m[o.keys.first] = o.values.first[:text]
131
+ }
132
+ end
133
+
134
+ def key_paths
135
+ @key_paths ||= super.merge(MAILBOX_KEY_PATHS)
136
+ end
137
+
138
+ def key_types
139
+ @key_types ||= super.merge(MAILBOX_KEY_TYPES)
140
+ end
141
+
142
+ def key_alias
143
+ @key_alias ||= super.merge(MAILBOX_KEY_ALIAS)
144
+ end
120
145
  end
121
146
  end
122
-
123
- def get_delegate_info()
124
- resp = (Viewpoint::EWS::EWS.instance).ews.get_delegate(self.email_address)
125
- # if(resp.status == 'Success')
126
- # return true
127
- # else
128
- # raise EwsError, "Could not update delegate access for user #{delegate_email}: #{resp.code}, #{resp.message}"
129
- # end
130
- end
131
-
132
-
133
- private
134
-
135
-
136
- def simplify!
137
- @ews_item = @ews_item.inject({}){|m,o|
138
- m[o.keys.first] = o.values.first[:text];
139
- m
140
- }
141
- end
142
-
143
- def key_paths
144
- @key_paths ||= super.merge(MAILBOX_KEY_PATHS)
145
- end
146
-
147
- def key_types
148
- @key_types ||= super.merge(MAILBOX_KEY_TYPES)
149
- end
150
-
151
- def key_alias
152
- @key_alias ||= super.merge(MAILBOX_KEY_ALIAS)
153
- end
154
-
155
- end # MailboxUser
156
- end # Viewpoint::EWS::Types
147
+ end
148
+ end
@@ -1,7 +1,13 @@
1
- module Viewpoint::EWS::Types
2
- class MeetingCancellation
3
- include Viewpoint::EWS
4
- include Viewpoint::EWS::Types
5
- include Viewpoint::EWS::Types::Item
1
+ # frozen_string_literal: true
2
+
3
+ module Viewpoint
4
+ module EWS
5
+ module Types
6
+ class MeetingCancellation
7
+ include Viewpoint::EWS
8
+ include Viewpoint::EWS::Types
9
+ include Viewpoint::EWS::Types::Item
10
+ end
11
+ end
6
12
  end
7
13
  end
@@ -1,7 +1,13 @@
1
- module Viewpoint::EWS::Types
2
- class MeetingMessage
3
- include Viewpoint::EWS
4
- include Viewpoint::EWS::Types
5
- include Viewpoint::EWS::Types::Item
1
+ # frozen_string_literal: true
2
+
3
+ module Viewpoint
4
+ module EWS
5
+ module Types
6
+ class MeetingMessage
7
+ include Viewpoint::EWS
8
+ include Viewpoint::EWS::Types
9
+ include Viewpoint::EWS::Types::Item
10
+ end
11
+ end
6
12
  end
7
13
  end
@@ -1,7 +1,13 @@
1
- module Viewpoint::EWS::Types
2
- class MeetingRequest
3
- include Viewpoint::EWS
4
- include Viewpoint::EWS::Types
5
- include Viewpoint::EWS::Types::Item
1
+ # frozen_string_literal: true
2
+
3
+ module Viewpoint
4
+ module EWS
5
+ module Types
6
+ class MeetingRequest
7
+ include Viewpoint::EWS
8
+ include Viewpoint::EWS::Types
9
+ include Viewpoint::EWS::Types::Item
10
+ end
11
+ end
6
12
  end
7
13
  end
@@ -1,7 +1,13 @@
1
- module Viewpoint::EWS::Types
2
- class MeetingResponse
3
- include Viewpoint::EWS
4
- include Viewpoint::EWS::Types
5
- include Viewpoint::EWS::Types::Item
1
+ # frozen_string_literal: true
2
+
3
+ module Viewpoint
4
+ module EWS
5
+ module Types
6
+ class MeetingResponse
7
+ include Viewpoint::EWS
8
+ include Viewpoint::EWS::Types
9
+ include Viewpoint::EWS::Types::Item
10
+ end
11
+ end
6
12
  end
7
13
  end
@@ -1,7 +1,13 @@
1
- module Viewpoint::EWS::Types
2
- class Message
3
- include Viewpoint::EWS
4
- include Viewpoint::EWS::Types
5
- include Viewpoint::EWS::Types::Item
1
+ # frozen_string_literal: true
2
+
3
+ module Viewpoint
4
+ module EWS
5
+ module Types
6
+ class Message
7
+ include Viewpoint::EWS
8
+ include Viewpoint::EWS::Types
9
+ include Viewpoint::EWS::Types::Item
10
+ end
11
+ end
6
12
  end
7
13
  end
@@ -1,48 +1,46 @@
1
- =begin
2
- This file is part of Viewpoint; the Ruby library for Microsoft Exchange Web Services.
3
-
4
- Copyright © 2011 Dan Wanek <dan.wanek@gmail.com>
5
-
6
- Licensed under the Apache License, Version 2.0 (the "License");
7
- you may not use this file except in compliance with the License.
8
- You may obtain a copy of the License at
9
-
10
- http://www.apache.org/licenses/LICENSE-2.0
11
-
12
- Unless required by applicable law or agreed to in writing, software
13
- distributed under the License is distributed on an "AS IS" BASIS,
14
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
- See the License for the specific language governing permissions and
16
- limitations under the License.
17
- =end
18
-
19
- module Viewpoint::EWS::Types
20
-
21
- class ModifiedEvent < Event
22
-
23
- MODIFIED_EVENT_KEY_PATHS = {
24
- }
25
-
26
- MODIFIED_EVENT_KEY_TYPES = {
27
- }
28
-
29
- MODIFIED_EVENT_KEY_ALIAS = { }
30
-
31
-
32
- private
33
-
34
-
35
- def key_paths
36
- @key_paths ||= super.merge MODIFIED_EVENT_KEY_PATHS
1
+ # frozen_string_literal: true
2
+
3
+ # This file is part of Viewpoint; the Ruby library for Microsoft Exchange Web Services.
4
+ #
5
+ # Copyright © 2011 Dan Wanek <dan.wanek@gmail.com>
6
+ #
7
+ # Licensed under the Apache License, Version 2.0 (the "License");
8
+ # you may not use this file except in compliance with the License.
9
+ # You may obtain a copy of the License at
10
+ #
11
+ # http://www.apache.org/licenses/LICENSE-2.0
12
+ #
13
+ # Unless required by applicable law or agreed to in writing, software
14
+ # distributed under the License is distributed on an "AS IS" BASIS,
15
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
+ # See the License for the specific language governing permissions and
17
+ # limitations under the License.
18
+
19
+ module Viewpoint
20
+ module EWS
21
+ module Types
22
+ # Modified Event EWS data type.
23
+ class ModifiedEvent < Event
24
+ MODIFIED_EVENT_KEY_PATHS = {}.freeze
25
+
26
+ MODIFIED_EVENT_KEY_TYPES = {}.freeze
27
+
28
+ MODIFIED_EVENT_KEY_ALIAS = {}.freeze
29
+
30
+ private
31
+
32
+ def key_paths
33
+ @key_paths ||= super.merge MODIFIED_EVENT_KEY_PATHS
34
+ end
35
+
36
+ def key_types
37
+ @key_types ||= super.merge MODIFIED_EVENT_KEY_TYPES
38
+ end
39
+
40
+ def key_alias
41
+ @key_alias ||= super.merge MODIFIED_EVENT_KEY_ALIAS
42
+ end
43
+ end
37
44
  end
38
-
39
- def key_types
40
- @key_types ||= super.merge MODIFIED_EVENT_KEY_TYPES
41
- end
42
-
43
- def key_alias
44
- @key_alias ||= super.merge MODIFIED_EVENT_KEY_ALIAS
45
- end
46
-
47
45
  end
48
46
  end
@@ -1,51 +1,50 @@
1
- =begin
2
- This file is part of Viewpoint; the Ruby library for Microsoft Exchange Web Services.
3
-
4
- Copyright © 2011 Dan Wanek <dan.wanek@gmail.com>
5
-
6
- Licensed under the Apache License, Version 2.0 (the "License");
7
- you may not use this file except in compliance with the License.
8
- You may obtain a copy of the License at
9
-
10
- http://www.apache.org/licenses/LICENSE-2.0
11
-
12
- Unless required by applicable law or agreed to in writing, software
13
- distributed under the License is distributed on an "AS IS" BASIS,
14
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
- See the License for the specific language governing permissions and
16
- limitations under the License.
17
- =end
18
-
19
- module Viewpoint::EWS::Types
20
-
21
- class MovedEvent < Event
22
-
23
- MOVED_EVENT_KEY_PATHS = {
24
- :old_item_id => [:old_item_id, :attribs],
25
- :old_folder_id => [:old_folder_id, :attribs],
26
- :old_parent_folder_id => [:old_parent_folder_id, :attribs],
27
- }
28
-
29
- MOVED_EVENT_KEY_TYPES = {
30
- }
31
-
32
- MOVED_EVENT_KEY_ALIAS = { }
33
-
34
-
35
- private
36
-
37
-
38
- def key_paths
39
- @key_paths ||= super.merge MOVED_EVENT_KEY_PATHS
1
+ # frozen_string_literal: true
2
+
3
+ # This file is part of Viewpoint; the Ruby library for Microsoft Exchange Web Services.
4
+ #
5
+ # Copyright © 2011 Dan Wanek <dan.wanek@gmail.com>
6
+ #
7
+ # Licensed under the Apache License, Version 2.0 (the "License");
8
+ # you may not use this file except in compliance with the License.
9
+ # You may obtain a copy of the License at
10
+ #
11
+ # http://www.apache.org/licenses/LICENSE-2.0
12
+ #
13
+ # Unless required by applicable law or agreed to in writing, software
14
+ # distributed under the License is distributed on an "AS IS" BASIS,
15
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
+ # See the License for the specific language governing permissions and
17
+ # limitations under the License.
18
+
19
+ module Viewpoint
20
+ module EWS
21
+ module Types
22
+ # Moved Event EWS data type.
23
+ class MovedEvent < Event
24
+ MOVED_EVENT_KEY_PATHS = {
25
+ old_item_id: %i[old_item_id attribs],
26
+ old_folder_id: %i[old_folder_id attribs],
27
+ old_parent_folder_id: %i[old_parent_folder_id attribs]
28
+ }.freeze
29
+
30
+ MOVED_EVENT_KEY_TYPES = {}.freeze
31
+
32
+ MOVED_EVENT_KEY_ALIAS = {}.freeze
33
+
34
+ private
35
+
36
+ def key_paths
37
+ @key_paths ||= super.merge MOVED_EVENT_KEY_PATHS
38
+ end
39
+
40
+ def key_types
41
+ @key_types ||= super.merge MOVED_EVENT_KEY_TYPES
42
+ end
43
+
44
+ def key_alias
45
+ @key_alias ||= super.merge MOVED_EVENT_KEY_ALIAS
46
+ end
47
+ end
40
48
  end
41
-
42
- def key_types
43
- @key_types ||= super.merge MOVED_EVENT_KEY_TYPES
44
- end
45
-
46
- def key_alias
47
- @key_alias ||= super.merge MOVED_EVENT_KEY_ALIAS
48
- end
49
-
50
49
  end
51
50
  end
@@ -1,24 +1,26 @@
1
- =begin
2
- This file is part of Viewpoint; the Ruby library for Microsoft Exchange Web Services.
1
+ # frozen_string_literal: true
3
2
 
4
- Copyright © 2011 Dan Wanek <dan.wanek@gmail.com>
5
-
6
- Licensed under the Apache License, Version 2.0 (the "License");
7
- you may not use this file except in compliance with the License.
8
- You may obtain a copy of the License at
9
-
10
- http://www.apache.org/licenses/LICENSE-2.0
11
-
12
- Unless required by applicable law or agreed to in writing, software
13
- distributed under the License is distributed on an "AS IS" BASIS,
14
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
- See the License for the specific language governing permissions and
16
- limitations under the License.
17
- =end
18
-
19
- module Viewpoint::EWS::Types
20
-
21
- class NewMailEvent < Event
3
+ # This file is part of Viewpoint; the Ruby library for Microsoft Exchange Web Services.
4
+ #
5
+ # Copyright © 2011 Dan Wanek <dan.wanek@gmail.com>
6
+ #
7
+ # Licensed under the Apache License, Version 2.0 (the "License");
8
+ # you may not use this file except in compliance with the License.
9
+ # You may obtain a copy of the License at
10
+ #
11
+ # http://www.apache.org/licenses/LICENSE-2.0
12
+ #
13
+ # Unless required by applicable law or agreed to in writing, software
14
+ # distributed under the License is distributed on an "AS IS" BASIS,
15
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
+ # See the License for the specific language governing permissions and
17
+ # limitations under the License.
22
18
 
19
+ module Viewpoint
20
+ module EWS
21
+ module Types
22
+ class NewMailEvent < Event
23
+ end
24
+ end
23
25
  end
24
26
  end