exchanger 0.1.3 → 0.1.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (47) hide show
  1. checksums.yaml +7 -0
  2. data/README.md +53 -0
  3. data/lib/exchanger.rb +2 -0
  4. data/lib/exchanger/elements/attendee.rb +4 -0
  5. data/lib/exchanger/elements/base_folder.rb +9 -0
  6. data/lib/exchanger/elements/calendar_item.rb +5 -0
  7. data/lib/exchanger/elements/calendar_view.rb +12 -0
  8. data/lib/exchanger/elements/item.rb +9 -0
  9. data/lib/exchanger/operations/create_item.rb +4 -2
  10. data/lib/exchanger/operations/find_item.rb +5 -1
  11. data/lib/exchanger/persistence.rb +4 -0
  12. data/lib/exchanger/version.rb +1 -1
  13. data/spec/cassettes/contact/destroy.yml +58 -0
  14. data/spec/cassettes/contact/destroy_setup.yml +61 -0
  15. data/spec/cassettes/contact/find.yml +119 -0
  16. data/spec/cassettes/contact/find_setup.yml +61 -0
  17. data/spec/cassettes/contact/save.yml +399 -0
  18. data/spec/cassettes/contact/save_cleanup.yml +58 -0
  19. data/spec/cassettes/folder/find_calendar.yml +60 -0
  20. data/spec/cassettes/folder/find_contacts.yml +60 -0
  21. data/spec/cassettes/folder/find_root.yml +60 -0
  22. data/spec/cassettes/folder/find_root_folders.yml +108 -0
  23. data/spec/cassettes/get_user_availability.yml +75 -0
  24. data/spec/cassettes/get_user_availability_default.yml +78 -0
  25. data/spec/cassettes/mailbox/search_test.yml +58 -0
  26. data/spec/cassettes/mailbox/search_test_members.yml +58 -0
  27. data/spec/config.yml +9 -6
  28. data/spec/config.yml.example +3 -3
  29. data/spec/exchanger/calendar_folder_spec.rb +13 -0
  30. data/spec/exchanger/calendar_item_spec.rb +13 -0
  31. data/spec/{client_spec.rb → exchanger/client_spec.rb} +1 -1
  32. data/spec/exchanger/contact_spec.rb +102 -0
  33. data/spec/exchanger/element_spec.rb +4 -0
  34. data/spec/{field_spec.rb → exchanger/field_spec.rb} +1 -1
  35. data/spec/exchanger/folder_spec.rb +17 -0
  36. data/spec/exchanger/get_user_availability_spec.rb +46 -0
  37. data/spec/exchanger/mailbox_spec.rb +18 -0
  38. data/spec/fixtures/get_user_availability.yml +4 -0
  39. data/spec/fixtures/get_user_availability.yml.example +3 -3
  40. data/spec/spec_helper.rb +18 -1
  41. metadata +91 -69
  42. data/spec/calendar_item_spec.rb +0 -26
  43. data/spec/contact_spec.rb +0 -67
  44. data/spec/element_spec.rb +0 -4
  45. data/spec/folder_spec.rb +0 -13
  46. data/spec/get_user_availability_spec.rb +0 -44
  47. data/spec/mailbox_spec.rb +0 -9
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 0bda3ce5bbe28f9fd01929df4590e2cd04c75f2b
4
+ data.tar.gz: baecb4bdabc3897d1b30d6302f936b877cee302a
5
+ SHA512:
6
+ metadata.gz: 7c4ea8792d5c1203a99022d32519ec95c1c01250aa2efa99b1b9da005c0030736374f4a3affd93804aea0d2d581a5b21cac36cd1e18c68f59ebbff7eedf6ceb5
7
+ data.tar.gz: a77be9430dc2c2bbe01a22041bef5ac42b20c091b1e88db485f012bbc82bd70440b30f84caa1e6d3c580308f98af659bddaa44533550df6b6c189a0d99df041d
data/README.md CHANGED
@@ -1,6 +1,8 @@
1
1
  Exchanger
2
2
  =========
3
3
 
4
+ [![Continuous Integration status](https://secure.travis-ci.org/ebeigarts/exchanger.png)](http://travis-ci.org/ebeigarts/exchanger)
5
+
4
6
  Ruby library for accessing Microsoft Exchange using Exchange Web Services.
5
7
  This library tries to make creating and updating items as easy as possible.
6
8
  It will keep track of changed properties and will update only them.
@@ -28,6 +30,7 @@ Exchanger.configure do |config|
28
30
  config.endpoint = "https://domain.com/EWS/Exchanger.asmx"
29
31
  config.username = "username"
30
32
  config.password = "password"
33
+ config.debug = true # show Exchange request/response info
31
34
  end
32
35
  ```
33
36
 
@@ -63,6 +66,56 @@ Searching in Global Address Book
63
66
  mailboxes = Exchanger::Mailbox.search("John")
64
67
  ```
65
68
 
69
+ Searching for Calendar items
70
+ ----------------------------
71
+ More specific Exchange calendar documentation can be found
72
+ [here](https://msdn.microsoft.com/en-us/library/office/dn495614(v=exchg.150).aspx).
73
+
74
+ 1) Return all Calendar items with recurring **master** appointments (without recurring).
75
+ Also called as non-expanded view.
76
+
77
+ ```ruby
78
+ folder = Exchanger::Folder.find(:calendar, "email@example.com")
79
+ folder.items # return Exchanger::CalendarItem items
80
+ ```
81
+
82
+ 2) Return Calendar items providing
83
+ [CalendarView](https://msdn.microsoft.com/en-us/library/microsoft.exchange.webservices.data.calendarview(v=exchg.80).aspx) (with recurring).
84
+
85
+ Supported `CalendarView` options/attributes:
86
+ * max_entries_returned
87
+ * start_date
88
+ * end_date
89
+
90
+ ```ruby
91
+ folder = Exchanger::Folder.find(:calendar, "email@example.com")
92
+ calendar_view_options = {
93
+ start_date: (DateTime.now - 1.week),
94
+ end_date: DateTime.now,
95
+ }
96
+ folder.expanded_items(calendar_view_options) # return Exchanger::CalendarItem items
97
+ ```
98
+
99
+ Running specs with Exchange Server
100
+ ==================================
101
+
102
+ The easiest way is to sign up for a Microsoft Office 365 free trial.
103
+
104
+ 1. Create a random calendar entry in July 2016
105
+ 2. Create a distribution list named 'Test'
106
+ 3. Create `spec/config.yml` with your Exchange credentials
107
+ 4. Create `spec/fixtures/get_user_availability.yml` with your Exchange email address
108
+ 5. Clear the recorded VCR cassettes by removing `spec/cassettes`
109
+ 6. Run the specs `rake spec`
110
+
111
+ It looks like Office 365 trial has some rate limits,
112
+ so you may have to record the VCR cassettes for each spec separately.
113
+
114
+ ```
115
+ Exchanger::Operation::ResponseError:
116
+ An internal server error occurred. Try again later.
117
+ ```
118
+
66
119
  Alternatives
67
120
  ============
68
121
 
@@ -4,6 +4,7 @@ require "base64"
4
4
  require 'kconv' # Need for rubyntlm on Ruby 1.9
5
5
  require 'tzinfo'
6
6
 
7
+ require "active_support"
7
8
  require "active_support/core_ext"
8
9
  require "nokogiri"
9
10
  require "httpclient"
@@ -25,6 +26,7 @@ require "exchanger/elements/mailbox"
25
26
  require "exchanger/elements/single_recipient"
26
27
  require "exchanger/elements/attendee"
27
28
  require "exchanger/elements/complete_name"
29
+ require "exchanger/elements/calendar_view"
28
30
  # Entry elements
29
31
  require "exchanger/elements/entry"
30
32
  require "exchanger/elements/email_address"
@@ -6,5 +6,9 @@ module Exchanger
6
6
  element :mailbox, :type => Mailbox
7
7
  element :response_type # Unknown Organizer Tentative Accept Decline NoResponseReceived
8
8
  element :last_response_time, :type => Time
9
+
10
+ def tag_name
11
+ "Attendee"
12
+ end
9
13
  end
10
14
  end
@@ -57,5 +57,14 @@ module Exchanger
57
57
  item.parent_folder = self
58
58
  end
59
59
  end
60
+
61
+ # Return items (also recurring calendar items) based on
62
+ # provided CalendarView options
63
+ def expanded_items(calendar_view_options)
64
+ calendar_view = CalendarView.new(calendar_view_options)
65
+ items = Item.find_calendar_view_set_by_folder_id(id, calendar_view)
66
+
67
+ items.each { |item| item.parent_folder = self }
68
+ end
60
69
  end
61
70
  end
@@ -55,5 +55,10 @@ module Exchanger
55
55
  element :is_online_meeting, :type => Boolean
56
56
  element :meeting_workspace_url
57
57
  element :net_show_url
58
+
59
+ def create
60
+ CreateItem.run(:folder_id => parent_folder_id.id, :items => [self],
61
+ :send_meeting_invitations => "SendToAllAndSaveCopy")
62
+ end
58
63
  end
59
64
  end
@@ -0,0 +1,12 @@
1
+ module Exchanger
2
+ # The CalendarView element defines a FindItem operation
3
+ # as returning calendar items in a set as they appear in a calendar.
4
+ # <CalendarView MaxEntriesReturned="" StartDate="" EndDate="" />
5
+
6
+ # https://msdn.microsoft.com/en-us/library/aa564515.aspx
7
+ class CalendarView < Element
8
+ key :max_entries_returned
9
+ key :start_date, type: Time
10
+ key :end_date, type: Time
11
+ end
12
+ end
@@ -51,6 +51,15 @@ module Exchanger
51
51
  response.items
52
52
  end
53
53
 
54
+ def self.find_calendar_view_set_by_folder_id(folder_id, calendar_view)
55
+ response = FindItem.run(
56
+ folder_id: folder_id,
57
+ calendar_view: calendar_view,
58
+ )
59
+
60
+ response.items
61
+ end
62
+
54
63
  attr_writer :parent_folder
55
64
 
56
65
  def parent_folder
@@ -11,7 +11,8 @@ module Exchanger
11
11
  # http://msdn.microsoft.com/en-us/library/aa563797.aspx
12
12
  class CreateItem < Operation
13
13
  class Request < Operation::Request
14
- attr_accessor :folder_id, :email_address, :items
14
+ attr_accessor :folder_id, :email_address, :items,
15
+ :send_meeting_invitations
15
16
 
16
17
  # Reset request options to defaults.
17
18
  def reset
@@ -24,7 +25,8 @@ module Exchanger
24
25
  Nokogiri::XML::Builder.new do |xml|
25
26
  xml.send("soap:Envelope", "xmlns:soap" => NS["soap"], "xmlns:t" => NS["t"], "xmlns:xsi" => NS["xsi"], "xmlns:xsd" => NS["xsd"]) do
26
27
  xml.send("soap:Body") do
27
- xml.CreateItem("xmlns" => NS["m"]) do
28
+ xml.CreateItem("xmlns" => NS["m"],
29
+ 'SendMeetingInvitations' => send_meeting_invitations) do
28
30
  xml.SavedItemFolderId do
29
31
  if folder_id.is_a?(Symbol)
30
32
  xml.send("t:DistinguishedFolderId", "Id" => folder_id) do
@@ -4,7 +4,7 @@ module Exchanger
4
4
  # http://msdn.microsoft.com/en-us/library/aa566107.aspx
5
5
  class FindItem < Operation
6
6
  class Request < Operation::Request
7
- attr_accessor :folder_id, :traversal, :base_shape, :email_address
7
+ attr_accessor :folder_id, :traversal, :base_shape, :email_address, :calendar_view
8
8
 
9
9
  # Reset request options to defaults.
10
10
  def reset
@@ -12,6 +12,7 @@ module Exchanger
12
12
  @traversal = :shallow
13
13
  @base_shape = :all_properties
14
14
  @email_address = nil
15
+ @calendar_view = nil
15
16
  end
16
17
 
17
18
  def to_xml
@@ -22,6 +23,9 @@ module Exchanger
22
23
  xml.ItemShape do
23
24
  xml.send "t:BaseShape", base_shape.to_s.camelize
24
25
  end
26
+ if calendar_view
27
+ xml.CalendarView(calendar_view.to_xml.attributes)
28
+ end
25
29
  xml.ParentFolderIds do
26
30
  if folder_id.is_a?(Symbol)
27
31
  xml.send("t:DistinguishedFolderId", "Id" => folder_id) do
@@ -1,5 +1,9 @@
1
1
  module Exchanger
2
2
  module Persistence
3
+ def persisted?
4
+ not new_record?
5
+ end
6
+
3
7
  def new_record?
4
8
  not id
5
9
  end
@@ -1,3 +1,3 @@
1
1
  module Exchanger
2
- VERSION = "0.1.3"
2
+ VERSION = "0.1.4"
3
3
  end
@@ -0,0 +1,58 @@
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: US-ASCII
8
+ string: ! "<?xml version=\"1.0\"?>\n<soap:Envelope xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\"
9
+ xmlns:t=\"http://schemas.microsoft.com/exchange/services/2006/types\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"
10
+ xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\">\n <soap:Body>\n <DeleteItem
11
+ xmlns=\"http://schemas.microsoft.com/exchange/services/2006/messages\" DeleteType=\"HardDelete\">\n
12
+ \ <ItemIds>\n <t:ItemId Id=\"AAAjAGViZWlnYXJ0c0BlYmVpZ2FydHMub25taWNyb3NvZnQuY29tAEYAAAAAAFCCRZAuOKtKpGOhX84gI1gHAJoatVMmPNZLthU74SWegbgAAABF7aIAAJoatVMmPNZLthU74SWegbgAAABGa4QAAA==\"/>\n
13
+ \ </ItemIds>\n </DeleteItem>\n </soap:Body>\n</soap:Envelope>\n"
14
+ headers:
15
+ Soapaction:
16
+ - http://schemas.microsoft.com/exchange/services/2006/messages/DeleteItem
17
+ Content-Type:
18
+ - text/xml; charset=utf-8
19
+ Authorization:
20
+ - Basic ZWJlaWdhcnRzQGViZWlnYXJ0cy5vbm1pY3Jvc29mdC5jb206S3k1a2ltUDZTNmlIQQ==
21
+ response:
22
+ status:
23
+ code: 200
24
+ message: OK
25
+ headers:
26
+ Cache-Control:
27
+ - private
28
+ Transfer-Encoding:
29
+ - chunked
30
+ Content-Type:
31
+ - text/xml; charset=utf-8
32
+ Server:
33
+ - Microsoft-IIS/7.5
34
+ Requestid:
35
+ - 071b403f-65af-4951-84a1-86bedecb925a
36
+ Set-Cookie:
37
+ - exchangecookie=e376048b1e0346b7a76245c10898841a; expires=Fri, 11-Oct-2013
38
+ 19:19:23 GMT; path=/; HttpOnly
39
+ X-Aspnet-Version:
40
+ - 2.0.50727
41
+ X-Powered-By:
42
+ - ASP.NET
43
+ X-Diaginfo:
44
+ - AMSPRD0710CA021
45
+ Date:
46
+ - Thu, 11 Oct 2012 19:19:23 GMT
47
+ body:
48
+ encoding: US-ASCII
49
+ 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:DeleteItemResponse
54
+ xmlns:m="http://schemas.microsoft.com/exchange/services/2006/messages" xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types"><m:ResponseMessages><m:DeleteItemResponseMessage
55
+ ResponseClass="Success"><m:ResponseCode>NoError</m:ResponseCode></m:DeleteItemResponseMessage></m:ResponseMessages></m:DeleteItemResponse></s:Body></s:Envelope>
56
+ http_version:
57
+ recorded_at: Thu, 11 Oct 2012 19:19:23 GMT
58
+ recorded_with: VCR 2.2.5
@@ -0,0 +1,61 @@
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: US-ASCII
8
+ string: ! "<?xml version=\"1.0\"?>\n<soap:Envelope xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\"
9
+ xmlns:t=\"http://schemas.microsoft.com/exchange/services/2006/types\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"
10
+ xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\">\n <soap:Body>\n <CreateItem
11
+ xmlns=\"http://schemas.microsoft.com/exchange/services/2006/messages\">\n
12
+ \ <SavedItemFolderId>\n <t:FolderId Id=\"AQAjAGViZWlnYXJ0c0BlYmVpZ2FydHMub25taWNyb3NvZnQuY29tAC4AAANQgkWQLjirSqRjoV/OICNYAQCaGrVTJjzWS7YVO+ElnoG4AAABRe2iAAAA\"/>\n
13
+ \ </SavedItemFolderId>\n <Items>\n <t:Contact/>\n </Items>\n
14
+ \ </CreateItem>\n </soap:Body>\n</soap:Envelope>\n"
15
+ headers:
16
+ Soapaction:
17
+ - http://schemas.microsoft.com/exchange/services/2006/messages/CreateItem
18
+ Content-Type:
19
+ - text/xml; charset=utf-8
20
+ Authorization:
21
+ - Basic ZWJlaWdhcnRzQGViZWlnYXJ0cy5vbm1pY3Jvc29mdC5jb206S3k1a2ltUDZTNmlIQQ==
22
+ response:
23
+ status:
24
+ code: 200
25
+ message: OK
26
+ headers:
27
+ Cache-Control:
28
+ - private
29
+ Transfer-Encoding:
30
+ - chunked
31
+ Content-Type:
32
+ - text/xml; charset=utf-8
33
+ Server:
34
+ - Microsoft-IIS/7.5
35
+ Requestid:
36
+ - 07fa3a7f-6a09-4770-b26f-c0e066196b74
37
+ Set-Cookie:
38
+ - exchangecookie=5c2328ab96444ff1a4d39c1e0ea7239b; expires=Fri, 11-Oct-2013
39
+ 19:19:23 GMT; path=/; HttpOnly
40
+ X-Aspnet-Version:
41
+ - 2.0.50727
42
+ X-Powered-By:
43
+ - ASP.NET
44
+ X-Diaginfo:
45
+ - AMSPRD0710CA006
46
+ Date:
47
+ - Thu, 11 Oct 2012 19:19:22 GMT
48
+ body:
49
+ encoding: US-ASCII
50
+ string: <?xml version="1.0" encoding="utf-8"?><s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"><s:Header><h:ServerVersionInfo
51
+ MajorVersion="14" MinorVersion="16" MajorBuildNumber="207" MinorBuildNumber="9"
52
+ xmlns:h="http://schemas.microsoft.com/exchange/services/2006/types" xmlns="http://schemas.microsoft.com/exchange/services/2006/types"
53
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"/></s:Header><s:Body
54
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><m:CreateItemResponse
55
+ xmlns:m="http://schemas.microsoft.com/exchange/services/2006/messages" xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types"><m:ResponseMessages><m:CreateItemResponseMessage
56
+ ResponseClass="Success"><m:ResponseCode>NoError</m:ResponseCode><m:Items><t:Contact><t:ItemId
57
+ Id="AAAjAGViZWlnYXJ0c0BlYmVpZ2FydHMub25taWNyb3NvZnQuY29tAEYAAAAAAFCCRZAuOKtKpGOhX84gI1gHAJoatVMmPNZLthU74SWegbgAAABF7aIAAJoatVMmPNZLthU74SWegbgAAABGa4QAAA=="
58
+ ChangeKey="EQAAABYAAACaGrVTJjzWS7YVO+ElnoG4AAAARm+v"/></t:Contact></m:Items></m:CreateItemResponseMessage></m:ResponseMessages></m:CreateItemResponse></s:Body></s:Envelope>
59
+ http_version:
60
+ recorded_at: Thu, 11 Oct 2012 19:19:23 GMT
61
+ recorded_with: VCR 2.2.5
@@ -0,0 +1,119 @@
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: US-ASCII
8
+ string: ! "<?xml version=\"1.0\"?>\n<soap:Envelope xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\">\n
9
+ \ <soap:Body>\n <GetItem xmlns=\"http://schemas.microsoft.com/exchange/services/2006/messages\"
10
+ xmlns:t=\"http://schemas.microsoft.com/exchange/services/2006/types\">\n <ItemShape>\n
11
+ \ <t:BaseShape>AllProperties</t:BaseShape>\n </ItemShape>\n <ItemIds>\n
12
+ \ <t:ItemId Id=\"AAAjAGViZWlnYXJ0c0BlYmVpZ2FydHMub25taWNyb3NvZnQuY29tAEYAAAAAAFCCRZAuOKtKpGOhX84gI1gHAJoatVMmPNZLthU74SWegbgAAABF7aIAAJoatVMmPNZLthU74SWegbgAAABGa4UAAA==\"/>\n
13
+ \ </ItemIds>\n </GetItem>\n </soap:Body>\n</soap:Envelope>\n"
14
+ headers:
15
+ Soapaction:
16
+ - http://schemas.microsoft.com/exchange/services/2006/messages/GetItem
17
+ Content-Type:
18
+ - text/xml; charset=utf-8
19
+ Authorization:
20
+ - Basic ZWJlaWdhcnRzQGViZWlnYXJ0cy5vbm1pY3Jvc29mdC5jb206S3k1a2ltUDZTNmlIQQ==
21
+ response:
22
+ status:
23
+ code: 200
24
+ message: OK
25
+ headers:
26
+ Cache-Control:
27
+ - private
28
+ Transfer-Encoding:
29
+ - chunked
30
+ Content-Type:
31
+ - text/xml; charset=utf-8
32
+ Server:
33
+ - Microsoft-IIS/7.5
34
+ Requestid:
35
+ - 8ec07db1-033c-4813-ba49-83b9bc554c22
36
+ Set-Cookie:
37
+ - exchangecookie=039a3702ca6b4db89806e742c4a8cec8; expires=Fri, 11-Oct-2013
38
+ 19:19:34 GMT; path=/; HttpOnly
39
+ X-Aspnet-Version:
40
+ - 2.0.50727
41
+ X-Powered-By:
42
+ - ASP.NET
43
+ X-Diaginfo:
44
+ - AMSPRD0710CA022
45
+ Date:
46
+ - Thu, 11 Oct 2012 19:19:33 GMT
47
+ body:
48
+ encoding: US-ASCII
49
+ 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:GetItemResponse
54
+ xmlns:m="http://schemas.microsoft.com/exchange/services/2006/messages" xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types"><m:ResponseMessages><m:GetItemResponseMessage
55
+ ResponseClass="Success"><m:ResponseCode>NoError</m:ResponseCode><m:Items><t:Contact><t:ItemId
56
+ Id="AAAjAGViZWlnYXJ0c0BlYmVpZ2FydHMub25taWNyb3NvZnQuY29tAEYAAAAAAFCCRZAuOKtKpGOhX84gI1gHAJoatVMmPNZLthU74SWegbgAAABF7aIAAJoatVMmPNZLthU74SWegbgAAABGa4UAAA=="
57
+ ChangeKey="EQAAABYAAACaGrVTJjzWS7YVO+ElnoG4AAAARm+z"/><t:ParentFolderId Id="AQAjAGViZWlnYXJ0c0BlYmVpZ2FydHMub25taWNyb3NvZnQuY29tAC4AAANQgkWQLjirSqRjoV/OICNYAQCaGrVTJjzWS7YVO+ElnoG4AAABRe2iAAAA"
58
+ ChangeKey="AQAAAA=="/><t:ItemClass>IPM.Contact</t:ItemClass><t:Subject/><t:Sensitivity>Normal</t:Sensitivity><t:Body
59
+ BodyType="Text"/><t:DateTimeReceived>2012-10-11T19:19:33Z</t:DateTimeReceived><t:Size>147</t:Size><t:Importance>Normal</t:Importance><t:IsSubmitted>false</t:IsSubmitted><t:IsDraft>true</t:IsDraft><t:IsFromMe>false</t:IsFromMe><t:IsResend>false</t:IsResend><t:IsUnmodified>false</t:IsUnmodified><t:DateTimeSent>2012-10-11T19:19:33Z</t:DateTimeSent><t:DateTimeCreated>2012-10-11T19:19:33Z</t:DateTimeCreated><t:DisplayCc/><t:DisplayTo/><t:HasAttachments>false</t:HasAttachments><t:Culture>en-US</t:Culture><t:FileAs/><t:FileAsMapping>None</t:FileAsMapping><t:DisplayName/></t:Contact></m:Items></m:GetItemResponseMessage></m:ResponseMessages></m:GetItemResponse></s:Body></s:Envelope>
60
+ http_version:
61
+ recorded_at: Thu, 11 Oct 2012 19:19:33 GMT
62
+ - request:
63
+ method: post
64
+ uri: https://FILTERED_USERNAME:FILTERED_PASSWORD@amsprd0710.outlook.com/EWS/Exchange.asmx
65
+ body:
66
+ encoding: US-ASCII
67
+ string: ! "<?xml version=\"1.0\"?>\n<soap:Envelope xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\">\n
68
+ \ <soap:Body>\n <GetFolder xmlns=\"http://schemas.microsoft.com/exchange/services/2006/messages\"
69
+ xmlns:t=\"http://schemas.microsoft.com/exchange/services/2006/types\">\n <FolderShape>\n
70
+ \ <t:BaseShape>Default</t:BaseShape>\n </FolderShape>\n <FolderIds>\n
71
+ \ <t:FolderId Id=\"AQAjAGViZWlnYXJ0c0BlYmVpZ2FydHMub25taWNyb3NvZnQuY29tAC4AAANQgkWQLjirSqRjoV/OICNYAQCaGrVTJjzWS7YVO+ElnoG4AAABRe2iAAAA\"/>\n
72
+ \ </FolderIds>\n </GetFolder>\n </soap:Body>\n</soap:Envelope>\n"
73
+ headers:
74
+ Soapaction:
75
+ - http://schemas.microsoft.com/exchange/services/2006/messages/GetFolder
76
+ Content-Type:
77
+ - text/xml; charset=utf-8
78
+ Authorization:
79
+ - Basic ZWJlaWdhcnRzQGViZWlnYXJ0cy5vbm1pY3Jvc29mdC5jb206S3k1a2ltUDZTNmlIQQ==
80
+ response:
81
+ status:
82
+ code: 200
83
+ message: OK
84
+ headers:
85
+ Cache-Control:
86
+ - private
87
+ Transfer-Encoding:
88
+ - chunked
89
+ Content-Type:
90
+ - text/xml; charset=utf-8
91
+ Server:
92
+ - Microsoft-IIS/7.5
93
+ Requestid:
94
+ - e5ab9ace-fd46-4b92-a9a2-3eb003bc0e5f
95
+ Set-Cookie:
96
+ - exchangecookie=ab3d13823795478fbd1ea7156aaaca84; expires=Fri, 11-Oct-2013
97
+ 19:19:34 GMT; path=/; HttpOnly
98
+ X-Aspnet-Version:
99
+ - 2.0.50727
100
+ X-Powered-By:
101
+ - ASP.NET
102
+ X-Diaginfo:
103
+ - AMSPRD0710CA008
104
+ Date:
105
+ - Thu, 11 Oct 2012 19:19:34 GMT
106
+ body:
107
+ encoding: US-ASCII
108
+ string: <?xml version="1.0" encoding="utf-8"?><s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"><s:Header><h:ServerVersionInfo
109
+ MajorVersion="14" MinorVersion="16" MajorBuildNumber="207" MinorBuildNumber="9"
110
+ xmlns:h="http://schemas.microsoft.com/exchange/services/2006/types" xmlns="http://schemas.microsoft.com/exchange/services/2006/types"
111
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"/></s:Header><s:Body
112
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><m:GetFolderResponse
113
+ xmlns:m="http://schemas.microsoft.com/exchange/services/2006/messages" xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types"><m:ResponseMessages><m:GetFolderResponseMessage
114
+ ResponseClass="Success"><m:ResponseCode>NoError</m:ResponseCode><m:Folders><t:ContactsFolder><t:FolderId
115
+ Id="AQAjAGViZWlnYXJ0c0BlYmVpZ2FydHMub25taWNyb3NvZnQuY29tAC4AAANQgkWQLjirSqRjoV/OICNYAQCaGrVTJjzWS7YVO+ElnoG4AAABRe2iAAAA"
116
+ ChangeKey="AwAAABYAAACaGrVTJjzWS7YVO+ElnoG4AAAARe3C"/><t:DisplayName>Contacts</t:DisplayName><t:TotalCount>7</t:TotalCount><t:ChildFolderCount>0</t:ChildFolderCount></t:ContactsFolder></m:Folders></m:GetFolderResponseMessage></m:ResponseMessages></m:GetFolderResponse></s:Body></s:Envelope>
117
+ http_version:
118
+ recorded_at: Thu, 11 Oct 2012 19:19:34 GMT
119
+ recorded_with: VCR 2.2.5