exchanger 0.1.4 → 0.1.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0bda3ce5bbe28f9fd01929df4590e2cd04c75f2b
4
- data.tar.gz: baecb4bdabc3897d1b30d6302f936b877cee302a
3
+ metadata.gz: 61cefe7ad3264f95383c31d53c88fd4228f1324f
4
+ data.tar.gz: 81e2ae2bd8b22ac3a4d22a9bc1b37ec46eece033
5
5
  SHA512:
6
- metadata.gz: 7c4ea8792d5c1203a99022d32519ec95c1c01250aa2efa99b1b9da005c0030736374f4a3affd93804aea0d2d581a5b21cac36cd1e18c68f59ebbff7eedf6ceb5
7
- data.tar.gz: a77be9430dc2c2bbe01a22041bef5ac42b20c091b1e88db485f012bbc82bd70440b30f84caa1e6d3c580308f98af659bddaa44533550df6b6c189a0d99df041d
6
+ metadata.gz: 2e442e0b97855bda44ad6f5fd22f895534835dd508fe48dad26c1b57d8af0ecbb02f90967f520b489fda35f17b22ea72bdb006c24f3b6387600a9d7a04b85140
7
+ data.tar.gz: 12ab64412e1fac3955646bb807f7ef0f72c068635156c2be05094579b9b81806f208d270dc03e083effadb8f8d632f709c19313b0505dc9f01c46862d2b2e2c4
@@ -27,6 +27,7 @@ require "exchanger/elements/single_recipient"
27
27
  require "exchanger/elements/attendee"
28
28
  require "exchanger/elements/complete_name"
29
29
  require "exchanger/elements/calendar_view"
30
+ require "exchanger/elements/body"
30
31
  # Entry elements
31
32
  require "exchanger/elements/entry"
32
33
  require "exchanger/elements/email_address"
@@ -82,7 +83,7 @@ module Exchanger
82
83
  config = Config.instance
83
84
  block_given? ? yield(config) : config
84
85
  end
85
-
86
+
86
87
  alias :config :configure
87
88
  end
88
89
  end
@@ -0,0 +1,21 @@
1
+ module Exchanger
2
+ # The Body element represents the body of an item.
3
+ #
4
+ # Body: https://msdn.microsoft.com/en-us/library/office/jj219983(v=exchg.150).aspx
5
+ # BodyType: https://msdn.microsoft.com/en-us/library/office/aa565622(v=exchg.150).aspx
6
+ class Body < Element
7
+ element :body_type # "HTML" or "Text" (or "Best" during retrieval only)
8
+ element :is_truncated, type: Boolean
9
+
10
+ element :text
11
+
12
+ def to_xml(options = {})
13
+ doc = Nokogiri::XML::Document.new
14
+ body_attributes = { "BodyType" => body_type || "Text" }
15
+ body_attributes["IsTruncated"] = is_truncated if is_truncated
16
+ root = doc.create_element(tag_name, body_attributes)
17
+ root << doc.create_text_node(text.to_s)
18
+ root
19
+ end
20
+ end
21
+ end
@@ -1,6 +1,6 @@
1
1
  module Exchanger
2
2
  # The CalendarItem element represents an Exchanger calendar item.
3
- #
3
+ #
4
4
  # http://msdn.microsoft.com/en-us/library/aa564765.aspx
5
5
  class CalendarItem < Item
6
6
  self.field_uri_namespace = :calendar
@@ -56,9 +56,16 @@ module Exchanger
56
56
  element :meeting_workspace_url
57
57
  element :net_show_url
58
58
 
59
- def create
60
- CreateItem.run(:folder_id => parent_folder_id.id, :items => [self],
61
- :send_meeting_invitations => "SendToAllAndSaveCopy")
59
+ def create_additional_options
60
+ { send_meeting_invitations: "SendToAllAndSaveCopy" }
61
+ end
62
+
63
+ def update_additional_options
64
+ { send_meeting_invitations_or_cancellations: "SendToAllAndSaveCopy" }
65
+ end
66
+
67
+ def delete_additional_options
68
+ { send_meeting_cancellations: "SendToAllAndSaveCopy" }
62
69
  end
63
70
  end
64
71
  end
@@ -9,7 +9,7 @@ module Exchanger
9
9
  element :item_class
10
10
  element :subject
11
11
  element :sensitivity
12
- element :body
12
+ element :body, type: Body
13
13
  element :attachments, :type => [String]
14
14
  element :date_time_received, :type => Time
15
15
  element :size, :type => Integer
@@ -72,7 +72,8 @@ module Exchanger
72
72
 
73
73
  def create
74
74
  if parent_folder_id
75
- response = CreateItem.run(:folder_id => parent_folder_id.id, :items => [self])
75
+ options = { folder_id: parent_folder_id.id, items: [self] }.merge(create_additional_options)
76
+ response = CreateItem.run(options)
76
77
  self.item_id = response.item_ids[0]
77
78
  move_changes
78
79
  true
@@ -82,9 +83,14 @@ module Exchanger
82
83
  end
83
84
  end
84
85
 
86
+ def create_additional_options
87
+ {} # Implement in subclasses to add CreateItem options
88
+ end
89
+
85
90
  def update
86
91
  if changed?
87
- response = UpdateItem.run(:items => [self])
92
+ options = { items: [self] }.merge(update_additional_options)
93
+ response = UpdateItem.run(options)
88
94
  move_changes
89
95
  true
90
96
  else
@@ -92,12 +98,21 @@ module Exchanger
92
98
  end
93
99
  end
94
100
 
101
+ def update_additional_options
102
+ {} # Implement in subclasses to add UpdateItem options
103
+ end
104
+
95
105
  def delete
96
- if DeleteItem.run(:item_ids => [id])
106
+ options = { item_ids: [id] }.merge(delete_additional_options)
107
+ if DeleteItem.run(options)
97
108
  true
98
109
  else
99
110
  false
100
111
  end
101
112
  end
113
+
114
+ def delete_additional_options
115
+ {} # Implement in subclasses to add DeleteItem options
116
+ end
102
117
  end
103
118
  end
@@ -1,13 +1,13 @@
1
1
  module Exchanger
2
2
  # The CreateItem operation creates items in the Exchanger store.
3
- #
3
+ #
4
4
  # You can use the CreateItem operation to create the following:
5
5
  # * Calendar items
6
6
  # * E-mail messages
7
7
  # * Meeting requests
8
8
  # * Tasks
9
9
  # * Contacts
10
- #
10
+ #
11
11
  # http://msdn.microsoft.com/en-us/library/aa563797.aspx
12
12
  class CreateItem < Operation
13
13
  class Request < Operation::Request
@@ -25,8 +25,7 @@ module Exchanger
25
25
  Nokogiri::XML::Builder.new do |xml|
26
26
  xml.send("soap:Envelope", "xmlns:soap" => NS["soap"], "xmlns:t" => NS["t"], "xmlns:xsi" => NS["xsi"], "xmlns:xsd" => NS["xsd"]) do
27
27
  xml.send("soap:Body") do
28
- xml.CreateItem("xmlns" => NS["m"],
29
- 'SendMeetingInvitations' => send_meeting_invitations) do
28
+ xml.CreateItem(create_item_attributes) do
30
29
  xml.SavedItemFolderId do
31
30
  if folder_id.is_a?(Symbol)
32
31
  xml.send("t:DistinguishedFolderId", "Id" => folder_id) do
@@ -53,6 +52,14 @@ module Exchanger
53
52
  end
54
53
  end
55
54
  end
55
+
56
+ private
57
+
58
+ def create_item_attributes
59
+ create_item_attributes = { "xmlns" => NS["m"] }
60
+ create_item_attributes["SendMeetingInvitations"] = send_meeting_invitations if send_meeting_invitations
61
+ create_item_attributes
62
+ end
56
63
  end
57
64
 
58
65
  class Response < Operation::Response
@@ -1,17 +1,17 @@
1
1
  module Exchanger
2
2
  # The DeleteItem operation deletes items in the Exchanger store.
3
- #
3
+ #
4
4
  # You can use the DeleteItem operation to delete the following:
5
5
  # * Calendar items
6
6
  # * E-mail messages
7
7
  # * Meeting requests
8
8
  # * Tasks
9
9
  # * Contacts
10
- #
10
+ #
11
11
  # http://msdn.microsoft.com/en-us/library/aa580484.aspx
12
12
  class DeleteItem < Operation
13
13
  class Request < Operation::Request
14
- attr_accessor :item_ids
14
+ attr_accessor :item_ids, :send_meeting_cancellations
15
15
 
16
16
  # Reset request options to defaults.
17
17
  def reset
@@ -22,7 +22,7 @@ module Exchanger
22
22
  Nokogiri::XML::Builder.new do |xml|
23
23
  xml.send("soap:Envelope", "xmlns:soap" => NS["soap"], "xmlns:t" => NS["t"], "xmlns:xsi" => NS["xsi"], "xmlns:xsd" => NS["xsd"]) do
24
24
  xml.send("soap:Body") do
25
- xml.DeleteItem("xmlns" => NS["m"], "DeleteType" => "HardDelete") do
25
+ xml.DeleteItem(delete_item_attributes) do
26
26
  xml.ItemIds do
27
27
  item_ids.each do |item_id|
28
28
  xml["t"].ItemId("Id" => item_id)
@@ -33,6 +33,14 @@ module Exchanger
33
33
  end
34
34
  end
35
35
  end
36
+
37
+ private
38
+
39
+ def delete_item_attributes
40
+ delete_item_attributes = { "xmlns" => NS["m"], "DeleteType" => "HardDelete" }
41
+ delete_item_attributes["SendMeetingCancellations"] = send_meeting_cancellations if send_meeting_cancellations
42
+ delete_item_attributes
43
+ end
36
44
  end
37
45
 
38
46
  class Response < Operation::Response
@@ -1,11 +1,11 @@
1
1
  module Exchanger
2
2
  # The UpdateItem operation is used to modify the properties of an existing item in the Exchanger store.
3
- #
3
+ #
4
4
  # http://msdn.microsoft.com/en-us/library/aa581084.aspx
5
5
  # http://msdn.microsoft.com/en-us/library/aa579673.aspx
6
6
  class UpdateItem < Operation
7
7
  class Request < Operation::Request
8
- attr_accessor :items
8
+ attr_accessor :items, :send_meeting_invitations_or_cancellations
9
9
 
10
10
  # Reset request options to defaults.
11
11
  def reset
@@ -16,7 +16,7 @@ module Exchanger
16
16
  Nokogiri::XML::Builder.new do |xml|
17
17
  xml.send("soap:Envelope", "xmlns:soap" => NS["soap"], "xmlns:t" => NS["t"], "xmlns:xsi" => NS["xsi"], "xmlns:xsd" => NS["xsd"]) do
18
18
  xml.send("soap:Body") do
19
- xml.UpdateItem("xmlns" => NS["m"], "ConflictResolution" => "AlwaysOverwrite") do
19
+ xml.UpdateItem(update_item_attributes) do
20
20
  xml.ItemChanges do
21
21
  items.each do |item|
22
22
  item_change = item.to_xml_change
@@ -30,6 +30,14 @@ module Exchanger
30
30
  end
31
31
  end
32
32
  end
33
+
34
+ private
35
+
36
+ def update_item_attributes
37
+ update_item_attributes = { "xmlns" => NS["m"], "ConflictResolution" => "AlwaysOverwrite" }
38
+ update_item_attributes["SendMeetingInvitationsOrCancellations"] = send_meeting_invitations_or_cancellations if send_meeting_invitations_or_cancellations
39
+ update_item_attributes
40
+ end
33
41
  end
34
42
 
35
43
  class Response < Operation::Response
@@ -1,3 +1,3 @@
1
1
  module Exchanger
2
- VERSION = "0.1.4"
2
+ VERSION = "0.1.5"
3
3
  end
@@ -0,0 +1,388 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://FILTERED_USERNAME:FILTERED_PASSWORD@amsprd0710.outlook.com/EWS/Exchange.asmx
6
+ body:
7
+ encoding: UTF-8
8
+ string: |
9
+ <?xml version="1.0"?>
10
+ <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
11
+ <soap:Body>
12
+ <FindItem xmlns="http://schemas.microsoft.com/exchange/services/2006/messages" xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types" Traversal="Shallow">
13
+ <ItemShape>
14
+ <t:BaseShape>AllProperties</t:BaseShape>
15
+ </ItemShape>
16
+ <ParentFolderIds>
17
+ <t:FolderId Id="AQAhAGNoYWRfZXhjaGFuZ2VydGVzdGluZ0BvdXRsb28Aay5jb20ALgAABKlVK7wi0Um5a7NdGSAWsQEATutsxsDoLkiasjWoT1GLIQAAAgENAAAA"/>
18
+ </ParentFolderIds>
19
+ </FindItem>
20
+ </soap:Body>
21
+ </soap:Envelope>
22
+ headers:
23
+ Soapaction:
24
+ - http://schemas.microsoft.com/exchange/services/2006/messages/FindItem
25
+ Content-Type:
26
+ - text/xml; charset=utf-8
27
+ Authorization:
28
+ - Basic Y2hhZF9leGNoYW5nZXJ0ZXN0aW5nQG91dGxvb2suY29tOmV4Y2hhbmdlcl9zcGVjMzMzIQ==
29
+ response:
30
+ status:
31
+ code: 200
32
+ message: OK
33
+ headers:
34
+ Cache-Control:
35
+ - private
36
+ Transfer-Encoding:
37
+ - chunked
38
+ Content-Type:
39
+ - text/xml; charset=utf-8
40
+ Server:
41
+ - Microsoft-IIS/8.0
42
+ Request-Id:
43
+ - 78b66928-80a4-48f0-8ccd-403018a99bae
44
+ X-Calculatedbetarget:
45
+ - BY2PR08MB046.namprd08.prod.outlook.com
46
+ X-Backendhttpstatus:
47
+ - '200'
48
+ Set-Cookie:
49
+ - exchangecookie=484d62f46101483db34928b7525f50e6; expires=Tue, 09-May-2017
50
+ 16:00:05 GMT; path=/; HttpOnly
51
+ X-Ewshandler:
52
+ - FindItem
53
+ X-Aspnet-Version:
54
+ - 4.0.30319
55
+ X-Diaginfo:
56
+ - BY2PR08MB046
57
+ X-Beserver:
58
+ - BY2PR08MB046
59
+ X-Powered-By:
60
+ - ASP.NET
61
+ X-Feserver:
62
+ - BY2PR16CA0015
63
+ Date:
64
+ - Mon, 09 May 2016 16:00:04 GMT
65
+ body:
66
+ encoding: UTF-8
67
+ string: <?xml version="1.0" encoding="utf-8"?><s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"><s:Header><h:ServerVersionInfo
68
+ MajorVersion="15" MinorVersion="1" MajorBuildNumber="492" MinorBuildNumber="11"
69
+ xmlns:h="http://schemas.microsoft.com/exchange/services/2006/types" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
70
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/></s:Header><s:Body><m:FindItemResponse
71
+ xmlns:m="http://schemas.microsoft.com/exchange/services/2006/messages" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
72
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types"><m:ResponseMessages><m:FindItemResponseMessage
73
+ ResponseClass="Success"><m:ResponseCode>NoError</m:ResponseCode><m:RootFolder
74
+ TotalItemsInView="0" IncludesLastItemInRange="true"><t:Items/></m:RootFolder></m:FindItemResponseMessage></m:ResponseMessages></m:FindItemResponse></s:Body></s:Envelope>
75
+ http_version:
76
+ recorded_at: Mon, 09 May 2016 16:00:05 GMT
77
+ - request:
78
+ method: post
79
+ uri: https://FILTERED_USERNAME:FILTERED_PASSWORD@amsprd0710.outlook.com/EWS/Exchange.asmx
80
+ body:
81
+ encoding: UTF-8
82
+ string: |
83
+ <?xml version="1.0"?>
84
+ <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
85
+ <soap:Body>
86
+ <CreateItem xmlns="http://schemas.microsoft.com/exchange/services/2006/messages" SendMeetingInvitations="SendToAllAndSaveCopy">
87
+ <SavedItemFolderId>
88
+ <t:FolderId Id="AQAhAGNoYWRfZXhjaGFuZ2VydGVzdGluZ0BvdXRsb28Aay5jb20ALgAABKlVK7wi0Um5a7NdGSAWsQEATutsxsDoLkiasjWoT1GLIQAAAgENAAAA"/>
89
+ </SavedItemFolderId>
90
+ <Items>
91
+ <t:CalendarItem>
92
+ <t:Subject>Calendar Item Subject</t:Subject>
93
+ <t:Body BodyType="Text">Body line 1.
94
+ Body line 2.</t:Body>
95
+ <t:Start>2016-05-09T11:00:05-05:00</t:Start>
96
+ <t:End>2016-05-09T11:30:05-05:00</t:End>
97
+ </t:CalendarItem>
98
+ </Items>
99
+ </CreateItem>
100
+ </soap:Body>
101
+ </soap:Envelope>
102
+ headers:
103
+ Soapaction:
104
+ - http://schemas.microsoft.com/exchange/services/2006/messages/CreateItem
105
+ Content-Type:
106
+ - text/xml; charset=utf-8
107
+ Authorization:
108
+ - Basic Y2hhZF9leGNoYW5nZXJ0ZXN0aW5nQG91dGxvb2suY29tOmV4Y2hhbmdlcl9zcGVjMzMzIQ==
109
+ response:
110
+ status:
111
+ code: 200
112
+ message: OK
113
+ headers:
114
+ Cache-Control:
115
+ - private
116
+ Transfer-Encoding:
117
+ - chunked
118
+ Content-Type:
119
+ - text/xml; charset=utf-8
120
+ Server:
121
+ - Microsoft-IIS/8.0
122
+ Request-Id:
123
+ - 89c8e07e-05f2-4e45-902d-277f996d26ee
124
+ X-Calculatedbetarget:
125
+ - BY2PR08MB046.namprd08.prod.outlook.com
126
+ X-Backendhttpstatus:
127
+ - '200'
128
+ Set-Cookie:
129
+ - exchangecookie=00047aa713014d7eb7c0e8409ce35415; expires=Tue, 09-May-2017
130
+ 16:00:06 GMT; path=/; HttpOnly
131
+ X-Ewshandler:
132
+ - CreateItem
133
+ X-Aspnet-Version:
134
+ - 4.0.30319
135
+ X-Diaginfo:
136
+ - BY2PR08MB046
137
+ X-Beserver:
138
+ - BY2PR08MB046
139
+ X-Powered-By:
140
+ - ASP.NET
141
+ X-Feserver:
142
+ - CO2PR07CA0003
143
+ Date:
144
+ - Mon, 09 May 2016 16:00:05 GMT
145
+ body:
146
+ encoding: UTF-8
147
+ string: <?xml version="1.0" encoding="utf-8"?><s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"><s:Header><h:ServerVersionInfo
148
+ MajorVersion="15" MinorVersion="1" MajorBuildNumber="492" MinorBuildNumber="11"
149
+ xmlns:h="http://schemas.microsoft.com/exchange/services/2006/types" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
150
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/></s:Header><s:Body><m:CreateItemResponse
151
+ xmlns:m="http://schemas.microsoft.com/exchange/services/2006/messages" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
152
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types"><m:ResponseMessages><m:CreateItemResponseMessage
153
+ ResponseClass="Success"><m:ResponseCode>NoError</m:ResponseCode><m:Items><t:CalendarItem><t:ItemId
154
+ Id="AQAhAGNoYWRfZXhjaGFuZ2VydGVzdGluZ0BvdXRsb28Aay5jb20ARgAABKlVK7wi0Um5a7NdGSAWsQcATutsxsDoLkiasjWoT1GLIQAAAgENAAAATutsxsDoLkiasjWoT1GLIQAAAhj5AAAA"
155
+ ChangeKey="DwAAABYAAABO62zGwOguSJqyNahPUYshAAAAABnp"/></t:CalendarItem></m:Items></m:CreateItemResponseMessage></m:ResponseMessages></m:CreateItemResponse></s:Body></s:Envelope>
156
+ http_version:
157
+ recorded_at: Mon, 09 May 2016 16:00:06 GMT
158
+ - request:
159
+ method: post
160
+ uri: https://FILTERED_USERNAME:FILTERED_PASSWORD@amsprd0710.outlook.com/EWS/Exchange.asmx
161
+ body:
162
+ encoding: UTF-8
163
+ string: |
164
+ <?xml version="1.0"?>
165
+ <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
166
+ <soap:Body>
167
+ <GetItem xmlns="http://schemas.microsoft.com/exchange/services/2006/messages" xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types">
168
+ <ItemShape>
169
+ <t:BaseShape>AllProperties</t:BaseShape>
170
+ </ItemShape>
171
+ <ItemIds>
172
+ <t:ItemId Id="AQAhAGNoYWRfZXhjaGFuZ2VydGVzdGluZ0BvdXRsb28Aay5jb20ARgAABKlVK7wi0Um5a7NdGSAWsQcATutsxsDoLkiasjWoT1GLIQAAAgENAAAATutsxsDoLkiasjWoT1GLIQAAAhj5AAAA"/>
173
+ </ItemIds>
174
+ </GetItem>
175
+ </soap:Body>
176
+ </soap:Envelope>
177
+ headers:
178
+ Soapaction:
179
+ - http://schemas.microsoft.com/exchange/services/2006/messages/GetItem
180
+ Content-Type:
181
+ - text/xml; charset=utf-8
182
+ Authorization:
183
+ - Basic Y2hhZF9leGNoYW5nZXJ0ZXN0aW5nQG91dGxvb2suY29tOmV4Y2hhbmdlcl9zcGVjMzMzIQ==
184
+ response:
185
+ status:
186
+ code: 200
187
+ message: OK
188
+ headers:
189
+ Cache-Control:
190
+ - private
191
+ Transfer-Encoding:
192
+ - chunked
193
+ Content-Type:
194
+ - text/xml; charset=utf-8
195
+ Server:
196
+ - Microsoft-IIS/8.0
197
+ Request-Id:
198
+ - 996d9cc2-cd10-4358-b933-e9d745d9dbf8
199
+ X-Calculatedbetarget:
200
+ - BY2PR08MB046.namprd08.prod.outlook.com
201
+ X-Backendhttpstatus:
202
+ - '200'
203
+ Set-Cookie:
204
+ - exchangecookie=de130f3131f94c48a0ed6b538f3fa209; expires=Tue, 09-May-2017
205
+ 16:00:06 GMT; path=/; HttpOnly
206
+ X-Aspnet-Version:
207
+ - 4.0.30319
208
+ X-Diaginfo:
209
+ - BY2PR08MB046
210
+ X-Beserver:
211
+ - BY2PR08MB046
212
+ X-Powered-By:
213
+ - ASP.NET
214
+ X-Feserver:
215
+ - CO2PR07CA0006
216
+ Date:
217
+ - Mon, 09 May 2016 16:00:06 GMT
218
+ body:
219
+ encoding: UTF-8
220
+ string: |-
221
+ <?xml version="1.0" encoding="utf-8"?><s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"><s:Header><h:ServerVersionInfo MajorVersion="15" MinorVersion="1" MajorBuildNumber="492" MinorBuildNumber="11" xmlns:h="http://schemas.microsoft.com/exchange/services/2006/types" xmlns="http://schemas.microsoft.com/exchange/services/2006/types" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/></s:Header><s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><m:GetItemResponse xmlns:m="http://schemas.microsoft.com/exchange/services/2006/messages" xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types"><m:ResponseMessages><m:GetItemResponseMessage ResponseClass="Success"><m:ResponseCode>NoError</m:ResponseCode><m:Items><t:CalendarItem><t:ItemId Id="AQAhAGNoYWRfZXhjaGFuZ2VydGVzdGluZ0BvdXRsb28Aay5jb20ARgAABKlVK7wi0Um5a7NdGSAWsQcATutsxsDoLkiasjWoT1GLIQAAAgENAAAATutsxsDoLkiasjWoT1GLIQAAAhj5AAAA" ChangeKey="DwAAABYAAABO62zGwOguSJqyNahPUYshAAAAABnp"/><t:ParentFolderId Id="AQAhAGNoYWRfZXhjaGFuZ2VydGVzdGluZ0BvdXRsb28Aay5jb20ALgAABKlVK7wi0Um5a7NdGSAWsQEATutsxsDoLkiasjWoT1GLIQAAAgENAAAA" ChangeKey="AQAAAA=="/><t:ItemClass>IPM.Appointment</t:ItemClass><t:Subject>Calendar Item Subject</t:Subject><t:Sensitivity>Normal</t:Sensitivity><t:Body BodyType="Text">Body line 1.
222
+ Body line 2.</t:Body><t:DateTimeReceived>2016-05-09T16:00:06Z</t:DateTimeReceived><t:Size>3925</t:Size><t:Importance>Normal</t:Importance><t:IsSubmitted>false</t:IsSubmitted><t:IsDraft>false</t:IsDraft><t:IsFromMe>false</t:IsFromMe><t:IsResend>false</t:IsResend><t:IsUnmodified>false</t:IsUnmodified><t:DateTimeSent>2016-05-09T16:00:06Z</t:DateTimeSent><t:DateTimeCreated>2016-05-09T16:00:06Z</t:DateTimeCreated><t:ResponseObjects><t:CancelCalendarItem/><t:ForwardItem/></t:ResponseObjects><t:ReminderDueBy>2016-05-09T16:00:05Z</t:ReminderDueBy><t:ReminderIsSet>true</t:ReminderIsSet><t:ReminderMinutesBeforeStart>15</t:ReminderMinutesBeforeStart><t:DisplayCc/><t:DisplayTo/><t:HasAttachments>false</t:HasAttachments><t:Culture>en-US</t:Culture><t:Start>2016-05-09T16:00:05Z</t:Start><t:End>2016-05-09T16:30:05Z</t:End><t:IsAllDayEvent>false</t:IsAllDayEvent><t:LegacyFreeBusyStatus>Busy</t:LegacyFreeBusyStatus><t:IsMeeting>true</t:IsMeeting><t:IsCancelled>false</t:IsCancelled><t:IsRecurring>false</t:IsRecurring><t:MeetingRequestWasSent>false</t:MeetingRequestWasSent><t:IsResponseRequested>true</t:IsResponseRequested><t:CalendarItemType>Single</t:CalendarItemType><t:MyResponseType>Organizer</t:MyResponseType><t:Organizer><t:Mailbox><t:Name>Exchanger SpecTester</t:Name><t:EmailAddress>FILTERED_EMAIL_ADDRESS</t:EmailAddress><t:RoutingType>SMTP</t:RoutingType></t:Mailbox></t:Organizer><t:Duration>PT30M</t:Duration><t:TimeZone>(UTC) Monrovia, Reykjavik</t:TimeZone><t:AppointmentSequenceNumber>0</t:AppointmentSequenceNumber><t:AppointmentState>1</t:AppointmentState><t:IsOnlineMeeting>false</t:IsOnlineMeeting></t:CalendarItem></m:Items></m:GetItemResponseMessage></m:ResponseMessages></m:GetItemResponse></s:Body></s:Envelope>
223
+ http_version:
224
+ recorded_at: Mon, 09 May 2016 16:00:06 GMT
225
+ - request:
226
+ method: post
227
+ uri: https://FILTERED_USERNAME:FILTERED_PASSWORD@amsprd0710.outlook.com/EWS/Exchange.asmx
228
+ body:
229
+ encoding: UTF-8
230
+ string: |
231
+ <?xml version="1.0"?>
232
+ <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
233
+ <soap:Body>
234
+ <FindItem xmlns="http://schemas.microsoft.com/exchange/services/2006/messages" xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types" Traversal="Shallow">
235
+ <ItemShape>
236
+ <t:BaseShape>AllProperties</t:BaseShape>
237
+ </ItemShape>
238
+ <ParentFolderIds>
239
+ <t:FolderId Id="AQAhAGNoYWRfZXhjaGFuZ2VydGVzdGluZ0BvdXRsb28Aay5jb20ALgAABKlVK7wi0Um5a7NdGSAWsQEATutsxsDoLkiasjWoT1GLIQAAAgENAAAA"/>
240
+ </ParentFolderIds>
241
+ </FindItem>
242
+ </soap:Body>
243
+ </soap:Envelope>
244
+ headers:
245
+ Soapaction:
246
+ - http://schemas.microsoft.com/exchange/services/2006/messages/FindItem
247
+ Content-Type:
248
+ - text/xml; charset=utf-8
249
+ Authorization:
250
+ - Basic Y2hhZF9leGNoYW5nZXJ0ZXN0aW5nQG91dGxvb2suY29tOmV4Y2hhbmdlcl9zcGVjMzMzIQ==
251
+ response:
252
+ status:
253
+ code: 200
254
+ message: OK
255
+ headers:
256
+ Cache-Control:
257
+ - private
258
+ Transfer-Encoding:
259
+ - chunked
260
+ Content-Type:
261
+ - text/xml; charset=utf-8
262
+ Server:
263
+ - Microsoft-IIS/8.0
264
+ Request-Id:
265
+ - f61fc06d-7c71-474d-ad95-48c1007a4730
266
+ X-Calculatedbetarget:
267
+ - BY2PR08MB046.namprd08.prod.outlook.com
268
+ X-Backendhttpstatus:
269
+ - '200'
270
+ Set-Cookie:
271
+ - exchangecookie=dcc2b32cb962435c9ab071e44abf18a1; expires=Tue, 09-May-2017
272
+ 16:00:07 GMT; path=/; HttpOnly
273
+ X-Ewshandler:
274
+ - FindItem
275
+ X-Aspnet-Version:
276
+ - 4.0.30319
277
+ X-Diaginfo:
278
+ - BY2PR08MB046
279
+ X-Beserver:
280
+ - BY2PR08MB046
281
+ X-Powered-By:
282
+ - ASP.NET
283
+ X-Feserver:
284
+ - BY2PR13CA0003
285
+ Date:
286
+ - Mon, 09 May 2016 16:00:07 GMT
287
+ body:
288
+ encoding: UTF-8
289
+ string: <?xml version="1.0" encoding="utf-8"?><s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"><s:Header><h:ServerVersionInfo
290
+ MajorVersion="15" MinorVersion="1" MajorBuildNumber="492" MinorBuildNumber="11"
291
+ xmlns:h="http://schemas.microsoft.com/exchange/services/2006/types" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
292
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/></s:Header><s:Body><m:FindItemResponse
293
+ xmlns:m="http://schemas.microsoft.com/exchange/services/2006/messages" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
294
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types"><m:ResponseMessages><m:FindItemResponseMessage
295
+ ResponseClass="Success"><m:ResponseCode>NoError</m:ResponseCode><m:RootFolder
296
+ TotalItemsInView="1" IncludesLastItemInRange="true"><t:Items><t:CalendarItem><t:ItemId
297
+ Id="AQAhAGNoYWRfZXhjaGFuZ2VydGVzdGluZ0BvdXRsb28Aay5jb20ARgAABKlVK7wi0Um5a7NdGSAWsQcATutsxsDoLkiasjWoT1GLIQAAAgENAAAATutsxsDoLkiasjWoT1GLIQAAAhj5AAAA"
298
+ ChangeKey="DwAAABYAAABO62zGwOguSJqyNahPUYshAAAAABnp"/><t:ParentFolderId Id="AQAhAGNoYWRfZXhjaGFuZ2VydGVzdGluZ0BvdXRsb28Aay5jb20ALgAABKlVK7wi0Um5a7NdGSAWsQEATutsxsDoLkiasjWoT1GLIQAAAgENAAAA"
299
+ ChangeKey="AQAAAA=="/><t:ItemClass>IPM.Appointment</t:ItemClass><t:Subject>Calendar
300
+ Item Subject</t:Subject><t:Sensitivity>Normal</t:Sensitivity><t:DateTimeReceived>2016-05-09T16:00:06Z</t:DateTimeReceived><t:Size>3925</t:Size><t:Importance>Normal</t:Importance><t:IsSubmitted>false</t:IsSubmitted><t:IsDraft>false</t:IsDraft><t:IsFromMe>false</t:IsFromMe><t:IsResend>false</t:IsResend><t:IsUnmodified>false</t:IsUnmodified><t:DateTimeSent>2016-05-09T16:00:06Z</t:DateTimeSent><t:DateTimeCreated>2016-05-09T16:00:06Z</t:DateTimeCreated><t:ReminderDueBy>2016-05-09T16:00:05Z</t:ReminderDueBy><t:ReminderIsSet>true</t:ReminderIsSet><t:ReminderMinutesBeforeStart>15</t:ReminderMinutesBeforeStart><t:HasAttachments>false</t:HasAttachments><t:Culture>en-US</t:Culture><t:Start>2016-05-09T16:00:05Z</t:Start><t:End>2016-05-09T16:30:05Z</t:End><t:IsAllDayEvent>false</t:IsAllDayEvent><t:LegacyFreeBusyStatus>Busy</t:LegacyFreeBusyStatus><t:IsMeeting>true</t:IsMeeting><t:IsCancelled>false</t:IsCancelled><t:IsRecurring>false</t:IsRecurring><t:MeetingRequestWasSent>false</t:MeetingRequestWasSent><t:IsResponseRequested>true</t:IsResponseRequested><t:CalendarItemType>Single</t:CalendarItemType><t:MyResponseType>Organizer</t:MyResponseType><t:Organizer><t:Mailbox><t:Name>Exchanger
301
+ SpecTester</t:Name><t:EmailAddress>/O=FIRST ORGANIZATION/OU=EXCHANGE ADMINISTRATIVE
302
+ GROUP(FYDIBOHF23SPDLT)/CN=RECIPIENTS/CN=0003BFFDF431A754</t:EmailAddress><t:RoutingType>EX</t:RoutingType></t:Mailbox></t:Organizer><t:Duration>PT30M</t:Duration><t:TimeZone>(UTC)
303
+ Monrovia, Reykjavik</t:TimeZone><t:AppointmentSequenceNumber>0</t:AppointmentSequenceNumber><t:AppointmentState>1</t:AppointmentState><t:IsOnlineMeeting>false</t:IsOnlineMeeting></t:CalendarItem></t:Items></m:RootFolder></m:FindItemResponseMessage></m:ResponseMessages></m:FindItemResponse></s:Body></s:Envelope>
304
+ http_version:
305
+ recorded_at: Mon, 09 May 2016 16:00:07 GMT
306
+ - request:
307
+ method: post
308
+ uri: https://FILTERED_USERNAME:FILTERED_PASSWORD@amsprd0710.outlook.com/EWS/Exchange.asmx
309
+ body:
310
+ encoding: UTF-8
311
+ string: |
312
+ <?xml version="1.0"?>
313
+ <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
314
+ <soap:Body>
315
+ <UpdateItem xmlns="http://schemas.microsoft.com/exchange/services/2006/messages" ConflictResolution="AlwaysOverwrite" SendMeetingInvitationsOrCancellations="SendToAllAndSaveCopy">
316
+ <ItemChanges>
317
+ <t:ItemChange>
318
+ <t:ItemId Id="AQAhAGNoYWRfZXhjaGFuZ2VydGVzdGluZ0BvdXRsb28Aay5jb20ARgAABKlVK7wi0Um5a7NdGSAWsQcATutsxsDoLkiasjWoT1GLIQAAAgENAAAATutsxsDoLkiasjWoT1GLIQAAAhj5AAAA" ChangeKey="DwAAABYAAABO62zGwOguSJqyNahPUYshAAAAABnp"/>
319
+ <t:Updates>
320
+ <t:SetItemField>
321
+ <t:FieldURI FieldURI="item:Subject"/>
322
+ <t:CalendarItem>
323
+ <t:Subject>Calendar Item Subject - Updated</t:Subject>
324
+ </t:CalendarItem>
325
+ </t:SetItemField>
326
+ </t:Updates>
327
+ </t:ItemChange>
328
+ </ItemChanges>
329
+ </UpdateItem>
330
+ </soap:Body>
331
+ </soap:Envelope>
332
+ headers:
333
+ Soapaction:
334
+ - http://schemas.microsoft.com/exchange/services/2006/messages/UpdateItem
335
+ Content-Type:
336
+ - text/xml; charset=utf-8
337
+ Authorization:
338
+ - Basic Y2hhZF9leGNoYW5nZXJ0ZXN0aW5nQG91dGxvb2suY29tOmV4Y2hhbmdlcl9zcGVjMzMzIQ==
339
+ response:
340
+ status:
341
+ code: 200
342
+ message: OK
343
+ headers:
344
+ Cache-Control:
345
+ - private
346
+ Transfer-Encoding:
347
+ - chunked
348
+ Content-Type:
349
+ - text/xml; charset=utf-8
350
+ Server:
351
+ - Microsoft-IIS/8.0
352
+ Request-Id:
353
+ - 8bf1efd8-64fc-41fc-9eb8-931141846e64
354
+ X-Calculatedbetarget:
355
+ - BY2PR08MB046.namprd08.prod.outlook.com
356
+ X-Backendhttpstatus:
357
+ - '200'
358
+ Set-Cookie:
359
+ - exchangecookie=d1acd3cb14304f67b34e27caa30c26ca; expires=Tue, 09-May-2017
360
+ 16:00:07 GMT; path=/; HttpOnly
361
+ X-Ewshandler:
362
+ - UpdateItem
363
+ X-Aspnet-Version:
364
+ - 4.0.30319
365
+ X-Diaginfo:
366
+ - BY2PR08MB046
367
+ X-Beserver:
368
+ - BY2PR08MB046
369
+ X-Powered-By:
370
+ - ASP.NET
371
+ X-Feserver:
372
+ - CY1PR21CA0005
373
+ Date:
374
+ - Mon, 09 May 2016 16:00:07 GMT
375
+ body:
376
+ encoding: UTF-8
377
+ string: <?xml version="1.0" encoding="utf-8"?><s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"><s:Header><h:ServerVersionInfo
378
+ MajorVersion="15" MinorVersion="1" MajorBuildNumber="492" MinorBuildNumber="11"
379
+ xmlns:h="http://schemas.microsoft.com/exchange/services/2006/types" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
380
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/></s:Header><s:Body><m:UpdateItemResponse
381
+ xmlns:m="http://schemas.microsoft.com/exchange/services/2006/messages" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
382
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types"><m:ResponseMessages><m:UpdateItemResponseMessage
383
+ ResponseClass="Success"><m:ResponseCode>NoError</m:ResponseCode><m:Items><t:CalendarItem><t:ItemId
384
+ Id="AQAhAGNoYWRfZXhjaGFuZ2VydGVzdGluZ0BvdXRsb28Aay5jb20ARgAABKlVK7wi0Um5a7NdGSAWsQcATutsxsDoLkiasjWoT1GLIQAAAgENAAAATutsxsDoLkiasjWoT1GLIQAAAhj5AAAA"
385
+ ChangeKey="DwAAABYAAABO62zGwOguSJqyNahPUYshAAAAABnr"/></t:CalendarItem></m:Items></m:UpdateItemResponseMessage></m:ResponseMessages></m:UpdateItemResponse></s:Body></s:Envelope>
386
+ http_version:
387
+ recorded_at: Mon, 09 May 2016 16:00:08 GMT
388
+ recorded_with: VCR 3.0.1
@@ -0,0 +1,73 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://FILTERED_USERNAME:FILTERED_PASSWORD@amsprd0710.outlook.com/EWS/Exchange.asmx
6
+ body:
7
+ encoding: UTF-8
8
+ string: |
9
+ <?xml version="1.0"?>
10
+ <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
11
+ <soap:Body>
12
+ <DeleteItem xmlns="http://schemas.microsoft.com/exchange/services/2006/messages" DeleteType="HardDelete" SendMeetingCancellations="SendToAllAndSaveCopy">
13
+ <ItemIds>
14
+ <t:ItemId Id="AQAhAGNoYWRfZXhjaGFuZ2VydGVzdGluZ0BvdXRsb28Aay5jb20ARgAABKlVK7wi0Um5a7NdGSAWsQcATutsxsDoLkiasjWoT1GLIQAAAgENAAAATutsxsDoLkiasjWoT1GLIQAAAhj5AAAA"/>
15
+ </ItemIds>
16
+ </DeleteItem>
17
+ </soap:Body>
18
+ </soap:Envelope>
19
+ headers:
20
+ Soapaction:
21
+ - http://schemas.microsoft.com/exchange/services/2006/messages/DeleteItem
22
+ Content-Type:
23
+ - text/xml; charset=utf-8
24
+ Authorization:
25
+ - Basic Y2hhZF9leGNoYW5nZXJ0ZXN0aW5nQG91dGxvb2suY29tOmV4Y2hhbmdlcl9zcGVjMzMzIQ==
26
+ response:
27
+ status:
28
+ code: 200
29
+ message: OK
30
+ headers:
31
+ Cache-Control:
32
+ - private
33
+ Transfer-Encoding:
34
+ - chunked
35
+ Content-Type:
36
+ - text/xml; charset=utf-8
37
+ Server:
38
+ - Microsoft-IIS/8.0
39
+ Request-Id:
40
+ - 80fb0c16-e47d-494d-8539-1e3eb72a5e93
41
+ X-Calculatedbetarget:
42
+ - BY2PR08MB046.namprd08.prod.outlook.com
43
+ X-Backendhttpstatus:
44
+ - '200'
45
+ Set-Cookie:
46
+ - exchangecookie=0e77f478e2ff4d39955012a1f1b0fd75; expires=Tue, 09-May-2017
47
+ 16:00:08 GMT; path=/; HttpOnly
48
+ X-Ewshandler:
49
+ - DeleteItem
50
+ X-Aspnet-Version:
51
+ - 4.0.30319
52
+ X-Diaginfo:
53
+ - BY2PR08MB046
54
+ X-Beserver:
55
+ - BY2PR08MB046
56
+ X-Powered-By:
57
+ - ASP.NET
58
+ X-Feserver:
59
+ - CO2PR07CA0006
60
+ Date:
61
+ - Mon, 09 May 2016 16:00:08 GMT
62
+ body:
63
+ encoding: UTF-8
64
+ string: <?xml version="1.0" encoding="utf-8"?><s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"><s:Header><h:ServerVersionInfo
65
+ MajorVersion="15" MinorVersion="1" MajorBuildNumber="492" MinorBuildNumber="11"
66
+ xmlns:h="http://schemas.microsoft.com/exchange/services/2006/types" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
67
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/></s:Header><s:Body><m:DeleteItemResponse
68
+ xmlns:m="http://schemas.microsoft.com/exchange/services/2006/messages" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
69
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types"><m:ResponseMessages><m:DeleteItemResponseMessage
70
+ ResponseClass="Success"><m:ResponseCode>NoError</m:ResponseCode></m:DeleteItemResponseMessage></m:ResponseMessages></m:DeleteItemResponse></s:Body></s:Envelope>
71
+ http_version:
72
+ recorded_at: Mon, 09 May 2016 16:00:08 GMT
73
+ recorded_with: VCR 3.0.1
@@ -4,20 +4,28 @@ http_interactions:
4
4
  method: post
5
5
  uri: https://FILTERED_USERNAME:FILTERED_PASSWORD@amsprd0710.outlook.com/EWS/Exchange.asmx
6
6
  body:
7
- encoding: US-ASCII
8
- string: ! "<?xml version=\"1.0\"?>\n<soap:Envelope xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\">\n
9
- \ <soap:Body>\n <GetFolder xmlns=\"http://schemas.microsoft.com/exchange/services/2006/messages\"
10
- xmlns:t=\"http://schemas.microsoft.com/exchange/services/2006/types\">\n <FolderShape>\n
11
- \ <t:BaseShape>Default</t:BaseShape>\n </FolderShape>\n <FolderIds>\n
12
- \ <t:DistinguishedFolderId Id=\"calendar\"/>\n </FolderIds>\n </GetFolder>\n
13
- \ </soap:Body>\n</soap:Envelope>\n"
7
+ encoding: UTF-8
8
+ string: |
9
+ <?xml version="1.0"?>
10
+ <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
11
+ <soap:Body>
12
+ <GetFolder xmlns="http://schemas.microsoft.com/exchange/services/2006/messages" xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types">
13
+ <FolderShape>
14
+ <t:BaseShape>Default</t:BaseShape>
15
+ </FolderShape>
16
+ <FolderIds>
17
+ <t:DistinguishedFolderId Id="calendar"/>
18
+ </FolderIds>
19
+ </GetFolder>
20
+ </soap:Body>
21
+ </soap:Envelope>
14
22
  headers:
15
23
  Soapaction:
16
24
  - http://schemas.microsoft.com/exchange/services/2006/messages/GetFolder
17
25
  Content-Type:
18
26
  - text/xml; charset=utf-8
19
27
  Authorization:
20
- - Basic ZWJlaWdhcnRzQGViZWlnYXJ0cy5vbm1pY3Jvc29mdC5jb206S3k1a2ltUDZTNmlIQQ==
28
+ - Basic Y2hhZF9leGNoYW5nZXJ0ZXN0aW5nQG91dGxvb2suY29tOmV4Y2hhbmdlcl9zcGVjMzMzIQ==
21
29
  response:
22
30
  status:
23
31
  code: 200
@@ -30,31 +38,41 @@ http_interactions:
30
38
  Content-Type:
31
39
  - text/xml; charset=utf-8
32
40
  Server:
33
- - Microsoft-IIS/7.5
34
- Requestid:
35
- - 56ded872-6c51-47fa-acfa-b3aa88c55c52
41
+ - Microsoft-IIS/8.0
42
+ Request-Id:
43
+ - 561afca4-233e-4d3e-8d46-9c3b98f7bb42
44
+ X-Calculatedbetarget:
45
+ - BY2PR08MB046.namprd08.prod.outlook.com
46
+ X-Backendhttpstatus:
47
+ - '200'
36
48
  Set-Cookie:
37
- - exchangecookie=a294c6d2503b4af2acab2ab6195297e4; expires=Fri, 11-Oct-2013
38
- 19:33:54 GMT; path=/; HttpOnly
49
+ - exchangecookie=7336c677cc004b11afaab1766f45de6c; expires=Tue, 09-May-2017
50
+ 16:00:04 GMT; path=/; HttpOnly
51
+ X-Ewshandler:
52
+ - GetFolder
39
53
  X-Aspnet-Version:
40
- - 2.0.50727
54
+ - 4.0.30319
55
+ X-Diaginfo:
56
+ - BY2PR08MB046
57
+ X-Beserver:
58
+ - BY2PR08MB046
41
59
  X-Powered-By:
42
60
  - ASP.NET
43
- X-Diaginfo:
44
- - AMSPRD0710CA014
61
+ X-Feserver:
62
+ - BY2PR13CA0012
45
63
  Date:
46
- - Thu, 11 Oct 2012 19:33:54 GMT
64
+ - Mon, 09 May 2016 16:00:04 GMT
47
65
  body:
48
- encoding: US-ASCII
66
+ encoding: UTF-8
49
67
  string: <?xml version="1.0" encoding="utf-8"?><s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"><s:Header><h:ServerVersionInfo
50
- MajorVersion="14" MinorVersion="16" MajorBuildNumber="207" MinorBuildNumber="9"
51
- xmlns:h="http://schemas.microsoft.com/exchange/services/2006/types" xmlns="http://schemas.microsoft.com/exchange/services/2006/types"
52
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"/></s:Header><s:Body
53
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><m:GetFolderResponse
54
- xmlns:m="http://schemas.microsoft.com/exchange/services/2006/messages" xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types"><m:ResponseMessages><m:GetFolderResponseMessage
68
+ MajorVersion="15" MinorVersion="1" MajorBuildNumber="492" MinorBuildNumber="11"
69
+ xmlns:h="http://schemas.microsoft.com/exchange/services/2006/types" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
70
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/></s:Header><s:Body><m:GetFolderResponse
71
+ xmlns:m="http://schemas.microsoft.com/exchange/services/2006/messages" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
72
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types"><m:ResponseMessages><m:GetFolderResponseMessage
55
73
  ResponseClass="Success"><m:ResponseCode>NoError</m:ResponseCode><m:Folders><t:CalendarFolder><t:FolderId
56
- Id="AQAjAGViZWlnYXJ0c0BlYmVpZ2FydHMub25taWNyb3NvZnQuY29tAC4AAANQgkWQLjirSqRjoV/OICNYAQCaGrVTJjzWS7YVO+ElnoG4AAABRe2hAAAA"
57
- ChangeKey="AgAAABYAAACaGrVTJjzWS7YVO+ElnoG4AAAARe3B"/><t:DisplayName>Calendar</t:DisplayName><t:ChildFolderCount>0</t:ChildFolderCount></t:CalendarFolder></m:Folders></m:GetFolderResponseMessage></m:ResponseMessages></m:GetFolderResponse></s:Body></s:Envelope>
74
+ Id="AQAhAGNoYWRfZXhjaGFuZ2VydGVzdGluZ0BvdXRsb28Aay5jb20ALgAABKlVK7wi0Um5a7NdGSAWsQEATutsxsDoLkiasjWoT1GLIQAAAgENAAAA"
75
+ ChangeKey="AgAAABYAAABO62zGwOguSJqyNahPUYshAAAAAAA3"/><t:DisplayName>Calendar</t:DisplayName><t:TotalCount>0</t:TotalCount><t:ChildFolderCount>2</t:ChildFolderCount></t:CalendarFolder></m:Folders></m:GetFolderResponseMessage></m:ResponseMessages></m:GetFolderResponse></s:Body></s:Envelope>
58
76
  http_version:
59
- recorded_at: Thu, 11 Oct 2012 19:33:54 GMT
60
- recorded_with: VCR 2.2.5
77
+ recorded_at: Mon, 09 May 2016 16:00:05 GMT
78
+ recorded_with: VCR 3.0.1
@@ -1,9 +1,4 @@
1
- # endpoint: https://email.tieto.com/EWS/Exchange.asmx
2
- # username: rails_tests
3
- # password: Latvia567
4
- # debug: false
5
-
6
1
  endpoint: https://amsprd0710.outlook.com/EWS/Exchange.asmx
7
2
  username: ebeigarts@ebeigarts.onmicrosoft.com
8
- password: Ky5kimP6S6iHA
3
+ password: hidden
9
4
  debug: true
@@ -0,0 +1,9 @@
1
+ # endpoint: https://email.tieto.com/EWS/Exchange.asmx
2
+ # username: rails_tests
3
+ # password: Latvia567
4
+ # debug: false
5
+ #
6
+ # endpoint: https://amsprd0710.outlook.com/EWS/Exchange.asmx
7
+ # username: ebeigarts@ebeigarts.onmicrosoft.com
8
+ # password: Ky5kimP6S6iHA
9
+ # debug: true
@@ -5,9 +5,37 @@ describe Exchanger::CalendarItem do
5
5
  @folder = VCR.use_cassette('folder/find_calendar') do
6
6
  Exchanger::Folder.find(:calendar)
7
7
  end
8
+ @calendar_item = @folder.new_calendar_item
8
9
  end
9
10
 
10
- describe ".find" do
11
- it "should find by id"
11
+ describe "#save" do
12
+ after do
13
+ if @calendar_item.persisted?
14
+ VCR.use_cassette("calendar_item/save_cleanup") do
15
+ @calendar_item.destroy
16
+ end
17
+ end
18
+ end
19
+
20
+ it "should create and update calendar item" do
21
+ VCR.use_cassette("calendar_item/save") do
22
+ prev_items_size = @folder.items.size
23
+ @calendar_item.subject = "Calendar Item Subject"
24
+ @calendar_item.body = Exchanger::Body.new(text: "Body line 1.\nBody line 2.")
25
+ @calendar_item.start = Time.now
26
+ @calendar_item.end = Time.now + 30.minutes
27
+ @calendar_item.should be_changed
28
+ @calendar_item.save
29
+ @calendar_item.should_not be_new_record
30
+ @calendar_item.should_not be_changed
31
+ @calendar_item.reload
32
+ @calendar_item.subject.should == "Calendar Item Subject"
33
+ @folder.items.size.should == prev_items_size + 1
34
+ @calendar_item.subject = "Calendar Item Subject - Updated"
35
+ @calendar_item.should be_changed
36
+ @calendar_item.save
37
+ @calendar_item.should_not be_changed
38
+ end
39
+ end
12
40
  end
13
41
  end
@@ -19,6 +19,13 @@ VCR.configure do |c|
19
19
  c.hook_into :webmock
20
20
  c.ignore_localhost = true
21
21
  c.default_cassette_options = { :record => :new_episodes }
22
- c.filter_sensitive_data('FILTERED_USERNAME') { Exchanger.config.username.gsub("@", "%40") }
23
- c.filter_sensitive_data('FILTERED_PASSWORD') { Exchanger.config.password }
22
+ c.filter_sensitive_data('FILTERED_USERNAME') { CGI::escape(Exchanger.config.username) } # Filter escaped version from request > uri
23
+ c.filter_sensitive_data('FILTERED_EMAIL_ADDRESS') { Exchanger.config.username } # Filter unescaped version from request > body > string
24
+ c.filter_sensitive_data('FILTERED_PASSWORD') { CGI::escape(Exchanger.config.password) }
25
+
26
+ # Record an endpoint that matches the Travis CI configuration to ensure that the cassette files are used when CI tests run
27
+ ci_endpoint = YAML.load_file("#{File.dirname(__FILE__)}/config.yml.example")["endpoint"]
28
+ ci_endpoint = URI.parse(ci_endpoint).host
29
+ dev_endpoint = URI.parse(Exchanger.config.endpoint).host
30
+ c.filter_sensitive_data(ci_endpoint) { dev_endpoint }
24
31
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: exchanger
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Edgars Beigarts
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-03-14 00:00:00.000000000 Z
11
+ date: 2016-05-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -170,14 +170,14 @@ dependencies:
170
170
  requirements:
171
171
  - - "~>"
172
172
  - !ruby/object:Gem::Version
173
- version: 2.2.5
173
+ version: 3.0.1
174
174
  type: :development
175
175
  prerelease: false
176
176
  version_requirements: !ruby/object:Gem::Requirement
177
177
  requirements:
178
178
  - - "~>"
179
179
  - !ruby/object:Gem::Version
180
- version: 2.2.5
180
+ version: 3.0.1
181
181
  - !ruby/object:Gem::Dependency
182
182
  name: webmock
183
183
  requirement: !ruby/object:Gem::Requirement
@@ -209,6 +209,7 @@ files:
209
209
  - lib/exchanger/element.rb
210
210
  - lib/exchanger/elements/attendee.rb
211
211
  - lib/exchanger/elements/base_folder.rb
212
+ - lib/exchanger/elements/body.rb
212
213
  - lib/exchanger/elements/calendar_event.rb
213
214
  - lib/exchanger/elements/calendar_event_details.rb
214
215
  - lib/exchanger/elements/calendar_folder.rb
@@ -250,6 +251,8 @@ files:
250
251
  - lib/exchanger/operations/update_item.rb
251
252
  - lib/exchanger/persistence.rb
252
253
  - lib/exchanger/version.rb
254
+ - spec/cassettes/calendar_item/save.yml
255
+ - spec/cassettes/calendar_item/save_cleanup.yml
253
256
  - spec/cassettes/contact/destroy.yml
254
257
  - spec/cassettes/contact/destroy_setup.yml
255
258
  - spec/cassettes/contact/find.yml
@@ -266,6 +269,7 @@ files:
266
269
  - spec/cassettes/mailbox/search_test_members.yml
267
270
  - spec/config.yml
268
271
  - spec/config.yml.example
272
+ - spec/config.yml~
269
273
  - spec/exchanger/calendar_folder_spec.rb
270
274
  - spec/exchanger/calendar_item_spec.rb
271
275
  - spec/exchanger/client_spec.rb