bookingsync-api 0.1.8 → 0.1.9

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 (33) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +7 -0
  3. data/README.md +13 -0
  4. data/lib/bookingsync/api/client.rb +21 -0
  5. data/lib/bookingsync/api/client/conversations.rb +75 -0
  6. data/lib/bookingsync/api/client/hosts.rb +51 -0
  7. data/lib/bookingsync/api/client/messages.rb +51 -0
  8. data/lib/bookingsync/api/client/participants.rb +51 -0
  9. data/lib/bookingsync/api/version.rb +1 -1
  10. data/spec/bookingsync/api/client/conversations_spec.rb +124 -0
  11. data/spec/bookingsync/api/client/hosts_spec.rb +79 -0
  12. data/spec/bookingsync/api/client/messages_spec.rb +77 -0
  13. data/spec/bookingsync/api/client/participants_spec.rb +77 -0
  14. data/spec/bookingsync/api/client_spec.rb +42 -0
  15. data/spec/fixtures/cassettes/BookingSync_API_Client_Conversations/_connect_booking_to_conversation/connects_given_conversation_with_booking.yml +154 -0
  16. data/spec/fixtures/cassettes/BookingSync_API_Client_Conversations/_conversation/returns_a_single_conversation.yml +82 -0
  17. data/spec/fixtures/cassettes/BookingSync_API_Client_Conversations/_conversations/returns_conversations.yml +83 -0
  18. data/spec/fixtures/cassettes/BookingSync_API_Client_Conversations/_create_conversation/creates_a_new_conversation.yml +81 -0
  19. data/spec/fixtures/cassettes/BookingSync_API_Client_Conversations/_disconnect_booking_from_conversation/disconnects_given_conversation_from_booking.yml +154 -0
  20. data/spec/fixtures/cassettes/BookingSync_API_Client_Conversations/_edit_conversation/updates_given_conversation_by_ID.yml +74 -0
  21. data/spec/fixtures/cassettes/BookingSync_API_Client_Hosts/_create_host/creates_a_new_host.yml +80 -0
  22. data/spec/fixtures/cassettes/BookingSync_API_Client_Hosts/_edit_host/updates_given_host_by_ID.yml +73 -0
  23. data/spec/fixtures/cassettes/BookingSync_API_Client_Hosts/_host/returns_a_single_host.yml +82 -0
  24. data/spec/fixtures/cassettes/BookingSync_API_Client_Hosts/_hosts/returns_hosts.yml +82 -0
  25. data/spec/fixtures/cassettes/BookingSync_API_Client_Messages/_create_message/creates_a_new_message.yml +81 -0
  26. data/spec/fixtures/cassettes/BookingSync_API_Client_Messages/_edit_message/updates_given_message_by_ID.yml +74 -0
  27. data/spec/fixtures/cassettes/BookingSync_API_Client_Messages/_message/returns_a_single_message.yml +82 -0
  28. data/spec/fixtures/cassettes/BookingSync_API_Client_Messages/_messages/returns_messages.yml +82 -0
  29. data/spec/fixtures/cassettes/BookingSync_API_Client_Participants/_create_participant/creates_a_new_participant.yml +80 -0
  30. data/spec/fixtures/cassettes/BookingSync_API_Client_Participants/_edit_participant/updates_given_participant_by_ID.yml +73 -0
  31. data/spec/fixtures/cassettes/BookingSync_API_Client_Participants/_participant/returns_a_single_participant.yml +82 -0
  32. data/spec/fixtures/cassettes/BookingSync_API_Client_Participants/_participants/returns_participants.yml +82 -0
  33. metadata +50 -2
@@ -0,0 +1,79 @@
1
+ require "spec_helper"
2
+
3
+ describe BookingSync::API::Client::Hosts do
4
+ let(:client) { BookingSync::API::Client.new(test_access_token) }
5
+
6
+ before { |ex| @casette_base_path = casette_path(casette_dir, ex.metadata) }
7
+
8
+ describe ".hosts", :vcr do
9
+ it "returns hosts" do
10
+ expect(client.hosts).not_to be_empty
11
+ assert_requested :get, bs_url("hosts")
12
+ end
13
+ end
14
+
15
+ describe ".host", :vcr do
16
+ let(:prefetched_host_id) {
17
+ find_resource("#{@casette_base_path}_hosts/returns_hosts.yml", "hosts")[:id]
18
+ }
19
+
20
+ it "returns a single host" do
21
+ host = client.host(prefetched_host_id)
22
+ expect(host.id).to eq prefetched_host_id
23
+ end
24
+ end
25
+
26
+ describe ".create_host", :vcr do
27
+ let(:user) { BookingSync::API::Resource.new(client, id: 1) }
28
+ let(:source) { BookingSync::API::Resource.new(client, id: 1) }
29
+ let(:attributes) do
30
+ {
31
+ email: "host_email@example.com",
32
+ firstname: "John",
33
+ lastname: "Doe",
34
+ user_id: user.id,
35
+ source_id: source.id
36
+ }
37
+ end
38
+
39
+ it "creates a new host" do
40
+ client.create_host(attributes)
41
+ assert_requested :post, bs_url("hosts"),
42
+ body: { hosts: [attributes] }.to_json
43
+ end
44
+
45
+ it "returns newly created host" do
46
+ VCR.use_cassette("BookingSync_API_Client_Hosts/_create_host/creates_a_new_host") do
47
+ host = client.create_host(attributes)
48
+ expect(host.email).to eq("host_email@example.com")
49
+ expect(host.lastname).to eq("Doe")
50
+ expect(host.firstname).to eq("John")
51
+ expect(host.links.user).to eq(user.id)
52
+ expect(host.links.source).to eq(source.id)
53
+ end
54
+ end
55
+ end
56
+
57
+ describe ".edit_host", :vcr do
58
+ let(:attributes) {
59
+ { firstname: "Johnny" }
60
+ }
61
+ let(:created_host_id) {
62
+ find_resource("#{@casette_base_path}_create_host/creates_a_new_host.yml", "hosts")[:id]
63
+ }
64
+
65
+ it "updates given host by ID" do
66
+ client.edit_host(created_host_id, attributes)
67
+ assert_requested :put, bs_url("hosts/#{created_host_id}"),
68
+ body: { hosts: [attributes] }.to_json
69
+ end
70
+
71
+ it "returns updated host" do
72
+ VCR.use_cassette("BookingSync_API_Client_Hosts/_edit_host/updates_given_host_by_ID") do
73
+ host = client.edit_host(created_host_id, attributes)
74
+ expect(host).to be_kind_of(BookingSync::API::Resource)
75
+ expect(host.firstname).to eq("Johnny")
76
+ end
77
+ end
78
+ end
79
+ end
@@ -0,0 +1,77 @@
1
+ require "spec_helper"
2
+
3
+ describe BookingSync::API::Client::Messages do
4
+ let(:client) { BookingSync::API::Client.new(test_access_token) }
5
+
6
+ before { |ex| @casette_base_path = casette_path(casette_dir, ex.metadata) }
7
+
8
+ describe ".messages", :vcr do
9
+ it "returns messages" do
10
+ expect(client.messages).not_to be_empty
11
+ assert_requested :get, bs_url("inbox/messages")
12
+ end
13
+ end
14
+
15
+ describe ".message", :vcr do
16
+ let(:prefetched_message_id) {
17
+ find_resource("#{@casette_base_path}_messages/returns_messages.yml", "messages")[:id]
18
+ }
19
+
20
+ it "returns a single message" do
21
+ message = client.message(prefetched_message_id)
22
+ expect(message.id).to eq prefetched_message_id
23
+ end
24
+ end
25
+
26
+ describe ".create_message", :vcr do
27
+ let(:conversation) { BookingSync::API::Resource.new(client, id: 1) }
28
+ let(:participant) { BookingSync::API::Resource.new(client, id: 1) }
29
+ let(:attributes) do
30
+ {
31
+ content: "Message content",
32
+ origin: "homeaway",
33
+ visibility: "all",
34
+ conversation_id: conversation.id,
35
+ sender_id: participant.id
36
+ }
37
+ end
38
+
39
+ it "creates a new message" do
40
+ client.create_message(attributes)
41
+ assert_requested :post, bs_url("inbox/messages"),
42
+ body: { messages: [attributes] }.to_json
43
+ end
44
+
45
+ it "returns newly created message" do
46
+ VCR.use_cassette("BookingSync_API_Client_Messages/_create_message/creates_a_new_message") do
47
+ message = client.create_message(attributes)
48
+ expect(message.content).to eq("Message content")
49
+ expect(message.origin).to eq("homeaway")
50
+ expect(message.visibility).to eq("all")
51
+ end
52
+ end
53
+ end
54
+
55
+ describe ".edit_message", :vcr do
56
+ let(:attributes) {
57
+ { content: "Updated message content" }
58
+ }
59
+ let(:created_message_id) {
60
+ find_resource("#{@casette_base_path}_create_message/creates_a_new_message.yml", "messages")[:id]
61
+ }
62
+
63
+ it "updates given message by ID" do
64
+ client.edit_message(created_message_id, attributes)
65
+ assert_requested :put, bs_url("inbox/messages/#{created_message_id}"),
66
+ body: { messages: [attributes] }.to_json
67
+ end
68
+
69
+ it "returns updated message" do
70
+ VCR.use_cassette("BookingSync_API_Client_Messages/_edit_message/updates_given_message_by_ID") do
71
+ message = client.edit_message(created_message_id, attributes)
72
+ expect(message).to be_kind_of(BookingSync::API::Resource)
73
+ expect(message.content).to eq("Updated message content")
74
+ end
75
+ end
76
+ end
77
+ end
@@ -0,0 +1,77 @@
1
+ require "spec_helper"
2
+
3
+ describe BookingSync::API::Client::Participants do
4
+ let(:client) { BookingSync::API::Client.new(test_access_token) }
5
+
6
+ before { |ex| @casette_base_path = casette_path(casette_dir, ex.metadata) }
7
+
8
+ describe ".participants", :vcr do
9
+ it "returns participants" do
10
+ expect(client.participants).not_to be_empty
11
+ assert_requested :get, bs_url("inbox/participants")
12
+ end
13
+ end
14
+
15
+ describe ".participant", :vcr do
16
+ let(:prefetched_participant_id) {
17
+ find_resource("#{@casette_base_path}_participants/returns_participants.yml", "participants")[:id]
18
+ }
19
+
20
+ it "returns a single participant" do
21
+ participant = client.participant(prefetched_participant_id)
22
+ expect(participant.id).to eq prefetched_participant_id
23
+ end
24
+ end
25
+
26
+ describe ".create_participant", :vcr do
27
+ let(:conversation) { BookingSync::API::Resource.new(client, id: 1) }
28
+ let(:member) { BookingSync::API::Resource.new(client, id: 1, type: "Client") }
29
+ let(:attributes) do
30
+ {
31
+ read: false,
32
+ conversation_id: conversation.id,
33
+ member_id: member.id,
34
+ member_type: member.type
35
+ }
36
+ end
37
+
38
+ it "creates a new participant" do
39
+ client.create_participant(attributes)
40
+ assert_requested :post, bs_url("inbox/participants"),
41
+ body: { participants: [attributes] }.to_json
42
+ end
43
+
44
+ it "returns newly created participant" do
45
+ VCR.use_cassette("BookingSync_API_Client_Participants/_create_participant/creates_a_new_participant") do
46
+ participant = client.create_participant(attributes)
47
+ expect(participant[:links][:conversation]).to eq(conversation.id)
48
+ expect(participant[:links][:member][:id]).to eq(member.id)
49
+ expect(participant[:links][:member][:type]).to eq(member.type)
50
+ expect(participant.read_at).to be_nil
51
+ end
52
+ end
53
+ end
54
+
55
+ describe ".edit_participant", :vcr do
56
+ let(:attributes) do
57
+ { read: true }
58
+ end
59
+ let(:created_participant_id) {
60
+ find_resource("#{@casette_base_path}_create_participant/creates_a_new_participant.yml", "participants")[:id]
61
+ }
62
+
63
+ it "updates given participant by ID" do
64
+ client.edit_participant(created_participant_id, attributes)
65
+ assert_requested :put, bs_url("inbox/participants/#{created_participant_id}"),
66
+ body: { participants: [attributes] }.to_json
67
+ end
68
+
69
+ it "returns updated participant" do
70
+ VCR.use_cassette("BookingSync_API_Client_Participants/_edit_participant/updates_given_participant_by_ID") do
71
+ participant = client.edit_participant(created_participant_id, attributes)
72
+ expect(participant).to be_kind_of(BookingSync::API::Resource)
73
+ expect(participant.read_at.to_s).not_to be_empty
74
+ end
75
+ end
76
+ end
77
+ end
@@ -308,4 +308,46 @@ describe BookingSync::API::Client do
308
308
  end
309
309
  end
310
310
  end
311
+
312
+ describe "with_headers" do
313
+ it "makes request with modified headers but resets to original headers at the end" do
314
+ stub_get("resource")
315
+ client.with_headers("x-awesome-header" => "you-bet-i-am") do |adjusted_api_client|
316
+ adjusted_api_client.get("resource")
317
+ end
318
+ assert_requested(:get, bs_url("resource")) do |request|
319
+ request.headers["X-Awesome-Header"] == "you-bet-i-am"
320
+ end
321
+
322
+ client.get("resource")
323
+ assert_requested(:get, bs_url("resource")) do |request|
324
+ !request.headers.key?("X-Awesome-Header")
325
+ end
326
+ end
327
+
328
+ it "properly brings back original headers even if it was overriden" do
329
+ stub_get("resource")
330
+ client.with_headers("Content-Type" => "another-content-type") do |adjusted_api_client|
331
+ adjusted_api_client.get("resource")
332
+ end
333
+ assert_requested(:get, bs_url("resource")) do |request|
334
+ request.headers["Content-Type"] == "another-content-type"
335
+ end
336
+
337
+ client.get("resource")
338
+ assert_requested(:get, bs_url("resource")) do |request|
339
+ request.headers["Content-Type"] == BookingSync::API::Client::MEDIA_TYPE
340
+ end
341
+ end
342
+
343
+ it "returns result of method called on adjusted client" do
344
+ stub_get("resource", body: { resources: [{ name: "Megan" }] }.to_json)
345
+ resources = client.with_headers("x-awesome-header" => "you-bet-i-am") do |adjusted_api_client|
346
+ adjusted_api_client.get("resource")
347
+ end
348
+ expect(resources).to be_kind_of(Array)
349
+ expect(resources.first).to be_a BookingSync::API::Resource
350
+ expect(resources.first.name).to eq("Megan")
351
+ end
352
+ end
311
353
  end
@@ -0,0 +1,154 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://www.bookingsync.com/api/v3/inbox/conversations/1
6
+ body:
7
+ encoding: UTF-8
8
+ string: "{}"
9
+ headers:
10
+ User-Agent:
11
+ - BookingSync API gem v0.1.8
12
+ Accept:
13
+ - application/vnd.api+json
14
+ Content-Type:
15
+ - application/vnd.api+json
16
+ Authorization:
17
+ - Bearer <<ACCESS_TOKEN>>
18
+ Accept-Encoding:
19
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
20
+ Connection:
21
+ - keep-alive
22
+ Keep-Alive:
23
+ - 30
24
+ response:
25
+ status:
26
+ code: 200
27
+ message: OK
28
+ headers:
29
+ Cache-Control:
30
+ - max-age=0, private, must-revalidate
31
+ Content-Type:
32
+ - application/vnd.api+json; charset=utf-8
33
+ Etag:
34
+ - W/"1aa40533aa8efe41130569a9fe0ece01"
35
+ Link:
36
+ - <https://www.bookingsync.com/api/v3/inbox/conversations/1?page=1>; rel="first",
37
+ <https://www.bookingsync.com/api/v3/inbox/conversations/1?page=1>; rel="last"
38
+ P3p:
39
+ - CP="OTI DSP COR CUR ADMo DEVo TAI PSAi PSDi IVAi IVDi CONi HISi TELi OTPi
40
+ OUR SAMi OTRo UNRo PUBi IND UNI STA"
41
+ Set-Cookie:
42
+ - ahoy_track=true; path=/
43
+ - ahoy_visit=b2442041-4695-4cfb-8a7d-7f3313432b94; path=/; expires=Mon, 02 Apr
44
+ 2018 19:27:29 -0000
45
+ - ahoy_visitor=686a80d0-2ee7-4a2e-8c22-71641773b7a7; path=/; expires=Thu, 26
46
+ Mar 2020 19:27:29 -0000
47
+ Vary:
48
+ - Origin
49
+ X-Content-Type-Options:
50
+ - nosniff
51
+ X-Frame-Options:
52
+ - SAMEORIGIN
53
+ X-Per-Page:
54
+ - '100'
55
+ X-Ratelimit-Limit:
56
+ - '1000'
57
+ X-Ratelimit-Remaining:
58
+ - '987'
59
+ X-Ratelimit-Reset:
60
+ - '1522094400'
61
+ X-Request-Id:
62
+ - 14551de3-b427-4949-b595-c0b3c82a007b
63
+ X-Runtime:
64
+ - '0.274481'
65
+ X-Total-Count:
66
+ - '1'
67
+ X-Total-Pages:
68
+ - '1'
69
+ X-Updated-Since-Request-Synced-At:
70
+ - 2018-03-26 19:27:29 UTC
71
+ X-Xss-Protection:
72
+ - 1; mode=block
73
+ Date:
74
+ - Mon, 26 Mar 2018 19:27:30 GMT
75
+ Content-Length:
76
+ - '987'
77
+ body:
78
+ encoding: UTF-8
79
+ string: '{"links":{"conversations.account":"https://www.bookingsync.com/api/v3/accounts/{conversations.account}","conversations.assignee":"https://www.bookingsync.com/api/v3/users/{conversations.assignee}","conversations.source":"https://www.bookingsync.com/api/v3/sources/{conversations.source}","conversations.bookings":"https://www.bookingsync.com/api/v3/bookings/{conversations.bookings}","conversations.inquiries":"https://www.bookingsync.com/api/v3/inquiries/{conversations.inquiries}"},"conversations":[{"links":{"account":3,"assignee":null,"bookings":[],"inquiries":[],"source":null},"closed_at":null,"created_at":"2018-03-25T22:01:11Z","deadline_response_at":null,"id":1,"last_message_at":null,"marked_as_spam_at":null,"subject":"super
80
+ important convo","updated_at":"2018-03-26T18:21:37Z"}],"meta":{"Link":{"first":"https://www.bookingsync.com/api/v3/inbox/conversations/1?page=1","last":"https://www.bookingsync.com/api/v3/inbox/conversations/1?page=1"},"X-Total-Pages":"1","X-Total-Count":"1","X-Per-Page":"100"}}'
81
+ http_version:
82
+ recorded_at: Mon, 26 Mar 2018 19:27:30 GMT
83
+ - request:
84
+ method: put
85
+ uri: https://www.bookingsync.com/api/v3/inbox/conversations/1/connect_booking
86
+ body:
87
+ encoding: UTF-8
88
+ string: '{"bookings":[{"id":40}]}'
89
+ headers:
90
+ User-Agent:
91
+ - BookingSync API gem v0.1.8
92
+ Accept:
93
+ - application/vnd.api+json
94
+ Content-Type:
95
+ - application/vnd.api+json
96
+ Authorization:
97
+ - Bearer <<ACCESS_TOKEN>>
98
+ Accept-Encoding:
99
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
100
+ Connection:
101
+ - keep-alive
102
+ Keep-Alive:
103
+ - 30
104
+ response:
105
+ status:
106
+ code: 200
107
+ message: OK
108
+ headers:
109
+ Cache-Control:
110
+ - max-age=0, private, must-revalidate
111
+ Content-Type:
112
+ - application/vnd.api+json; charset=utf-8
113
+ Etag:
114
+ - W/"12bfe4010f5f44629df73dbd7fb5fbb8"
115
+ P3p:
116
+ - CP="OTI DSP COR CUR ADMo DEVo TAI PSAi PSDi IVAi IVDi CONi HISi TELi OTPi
117
+ OUR SAMi OTRo UNRo PUBi IND UNI STA"
118
+ Set-Cookie:
119
+ - ahoy_track=true; path=/
120
+ - ahoy_visit=d19a9ccd-4cf2-4382-8eab-790fa04b680a; path=/; expires=Mon, 02 Apr
121
+ 2018 19:27:30 -0000
122
+ - ahoy_visitor=cee3b7d8-9662-4aee-a569-75ce739c39f5; path=/; expires=Thu, 26
123
+ Mar 2020 19:27:30 -0000
124
+ Vary:
125
+ - Origin
126
+ X-Content-Type-Options:
127
+ - nosniff
128
+ X-Frame-Options:
129
+ - SAMEORIGIN
130
+ X-Ratelimit-Limit:
131
+ - '1000'
132
+ X-Ratelimit-Remaining:
133
+ - '986'
134
+ X-Ratelimit-Reset:
135
+ - '1522094400'
136
+ X-Request-Id:
137
+ - 4e1de53f-34ed-4cf4-98cd-5c291d114531
138
+ X-Runtime:
139
+ - '0.291914'
140
+ X-Updated-Since-Request-Synced-At:
141
+ - 2018-03-26 19:27:30 UTC
142
+ X-Xss-Protection:
143
+ - 1; mode=block
144
+ Date:
145
+ - Mon, 26 Mar 2018 19:27:30 GMT
146
+ Content-Length:
147
+ - '783'
148
+ body:
149
+ encoding: UTF-8
150
+ string: '{"links":{"conversations.account":"https://www.bookingsync.com/api/v3/accounts/{conversations.account}","conversations.assignee":"https://www.bookingsync.com/api/v3/users/{conversations.assignee}","conversations.source":"https://www.bookingsync.com/api/v3/sources/{conversations.source}","conversations.bookings":"https://www.bookingsync.com/api/v3/bookings/{conversations.bookings}","conversations.inquiries":"https://www.bookingsync.com/api/v3/inquiries/{conversations.inquiries}"},"conversations":[{"links":{"account":3,"assignee":null,"bookings":[40],"inquiries":[],"source":null},"closed_at":null,"created_at":"2018-03-25T22:01:11Z","deadline_response_at":null,"id":1,"last_message_at":null,"marked_as_spam_at":null,"subject":"super
151
+ important convo","updated_at":"2018-03-26T18:21:37Z"}],"meta":{}}'
152
+ http_version:
153
+ recorded_at: Mon, 26 Mar 2018 19:27:30 GMT
154
+ recorded_with: VCR 3.0.3
@@ -0,0 +1,82 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://www.bookingsync.com/api/v3/inbox/conversations/1
6
+ body:
7
+ encoding: UTF-8
8
+ string: "{}"
9
+ headers:
10
+ User-Agent:
11
+ - BookingSync API gem v0.1.8
12
+ Accept:
13
+ - application/vnd.api+json
14
+ Content-Type:
15
+ - application/vnd.api+json
16
+ Authorization:
17
+ - Bearer <<ACCESS_TOKEN>>
18
+ Accept-Encoding:
19
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
20
+ Connection:
21
+ - keep-alive
22
+ Keep-Alive:
23
+ - '30'
24
+ response:
25
+ status:
26
+ code: 200
27
+ message: OK
28
+ headers:
29
+ Cache-Control:
30
+ - max-age=0, private, must-revalidate
31
+ Content-Type:
32
+ - application/vnd.api+json; charset=utf-8
33
+ Etag:
34
+ - W/"879f28db484e52f23872a2d1f8783126"
35
+ Link:
36
+ - <https://www.bookingsync.com/api/v3/inbox/conversations/1?page=1>; rel="first",
37
+ <https://www.bookingsync.com/api/v3/inbox/conversations/1?page=1>; rel="last"
38
+ P3p:
39
+ - CP="OTI DSP COR CUR ADMo DEVo TAI PSAi PSDi IVAi IVDi CONi HISi TELi OTPi
40
+ OUR SAMi OTRo UNRo PUBi IND UNI STA"
41
+ Set-Cookie:
42
+ - ahoy_track=true; path=/
43
+ - ahoy_visit=563c3c61-5201-43b0-a08f-618b8839e67e; path=/; expires=Fri, 30 Mar
44
+ 2018 19:00:42 -0000
45
+ - ahoy_visitor=e108871e-16b0-44c9-a285-4c30bab2e4e9; path=/; expires=Mon, 23
46
+ Mar 2020 19:00:42 -0000
47
+ Vary:
48
+ - Origin
49
+ X-Content-Type-Options:
50
+ - nosniff
51
+ X-Frame-Options:
52
+ - SAMEORIGIN
53
+ X-Per-Page:
54
+ - '100'
55
+ X-Ratelimit-Limit:
56
+ - '1000'
57
+ X-Ratelimit-Remaining:
58
+ - '999'
59
+ X-Ratelimit-Reset:
60
+ - '1521835200'
61
+ X-Request-Id:
62
+ - 7b2ccbae-2056-4b79-b6ca-555cbf986b25
63
+ X-Runtime:
64
+ - '0.159087'
65
+ X-Total-Count:
66
+ - '1'
67
+ X-Total-Pages:
68
+ - '1'
69
+ X-Updated-Since-Request-Synced-At:
70
+ - 2018-03-23 19:00:42 UTC
71
+ X-Xss-Protection:
72
+ - 1; mode=block
73
+ Date:
74
+ - Fri, 23 Mar 2018 19:00:42 GMT
75
+ Content-Length:
76
+ - '996'
77
+ body:
78
+ encoding: UTF-8
79
+ string: '{"links":{"conversations.account":"https://www.bookingsync.com/api/v3/accounts/{conversations.account}","conversations.assignee":"https://www.bookingsync.com/api/v3/users/{conversations.assignee}","conversations.source":"https://www.bookingsync.com/api/v3/sources/{conversations.source}","conversations.bookings":"https://www.bookingsync.com/api/v3/bookings/{conversations.bookings}","conversations.inquiries":"https://www.bookingsync.com/api/v3/inquiries/{conversations.inquiries}"},"conversations":[{"links":{"account":1,"assignee":null,"bookings":[],"inquiries":[],"source":null},"closed_at":null,"created_at":"2018-03-20T13:45:55Z","deadline_response_at":null,"id":1,"last_message_at":null,"marked_as_spam_at":null,"subject":null,"updated_at":"2018-03-20T13:45:55Z"}],"meta":{"Link":{"first":"https://www.bookingsync.com/api/v3/inbox/conversations/1?page=1","last":"https://www.bookingsync.com/api/v3/inbox/conversations/1?page=1"},"X-Total-Pages":"1","X-Total-Count":"1","X-Per-Page":"100"}}'
80
+ http_version:
81
+ recorded_at: Fri, 23 Mar 2018 19:00:42 GMT
82
+ recorded_with: VCR 4.0.0