bookingsync-api 0.1.8 → 0.1.9

Sign up to get free protection for your applications and to get access to all the features.
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,83 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://www.bookingsync.com/api/v3/inbox/conversations
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/"a452ed97fa7d6d52fbedd6f76227cd68"
35
+ Link:
36
+ - <https://www.bookingsync.com/api/v3/inbox/conversations?page=1>; rel="first",
37
+ <https://www.bookingsync.com/api/v3/inbox/conversations?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=f68d25a7-cd93-4e2a-a414-050c721a8c5e; path=/; expires=Fri, 30 Mar
44
+ 2018 19:00:41 -0000
45
+ - ahoy_visitor=431ebf50-87bd-4403-9326-8d66c9600890; path=/; expires=Mon, 23
46
+ Mar 2020 19:00:41 -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
+ - e68a525f-e005-4398-8311-8e57a9956760
63
+ X-Runtime:
64
+ - '1.366364'
65
+ X-Total-Count:
66
+ - '2'
67
+ X-Total-Pages:
68
+ - '1'
69
+ X-Updated-Since-Request-Synced-At:
70
+ - 2018-03-23 19:00:41 UTC
71
+ X-Xss-Protection:
72
+ - 1; mode=block
73
+ Date:
74
+ - Fri, 23 Mar 2018 19:00:41 GMT
75
+ Content-Length:
76
+ - '1284'
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"},{"links":{"account":1,"assignee":2,"bookings":[],"inquiries":[],"source":1},"closed_at":"2018-03-23T18:09:09Z","created_at":"2018-03-23T18:09:09Z","deadline_response_at":null,"id":2,"last_message_at":null,"marked_as_spam_at":null,"subject":"New
80
+ Question","updated_at":"2018-03-23T18:09:09Z"}],"meta":{"Link":{"first":"https://www.bookingsync.com/api/v3/inbox/conversations?page=1","last":"https://www.bookingsync.com/api/v3/inbox/conversations?page=1"},"X-Total-Pages":"1","X-Total-Count":"2","X-Per-Page":"100"}}'
81
+ http_version:
82
+ recorded_at: Fri, 23 Mar 2018 19:00:41 GMT
83
+ recorded_with: VCR 4.0.0
@@ -0,0 +1,81 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://www.bookingsync.com/api/v3/inbox/conversations
6
+ body:
7
+ encoding: UTF-8
8
+ string: '{"conversations":[{"subject":"New Question","assignee_id":1,"source_id":1}]}'
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: 201
27
+ message: Created
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/"7da1e568b19dc9ac23157812af0dd80f"
35
+ Link:
36
+ - <https://www.bookingsync.com/api/v3/inbox/conversations?conversations%5B%5D%5Bassignee_id%5D=1&conversations%5B%5D%5Bsource_id%5D=1&conversations%5B%5D%5Bsubject%5D=New+Question&page=1>;
37
+ rel="first"
38
+ Location:
39
+ - https://www.bookingsync.com/api/v3/inbox/conversations/3
40
+ P3p:
41
+ - CP="OTI DSP COR CUR ADMo DEVo TAI PSAi PSDi IVAi IVDi CONi HISi TELi OTPi
42
+ OUR SAMi OTRo UNRo PUBi IND UNI STA"
43
+ Set-Cookie:
44
+ - ahoy_track=true; path=/
45
+ - ahoy_visit=fab2cfa1-8051-41ce-9285-791bb8c4aa2f; path=/; expires=Fri, 30 Mar
46
+ 2018 19:00:42 -0000
47
+ - ahoy_visitor=178b15f5-2341-4b79-8cd6-e5184c446ba2; path=/; expires=Mon, 23
48
+ Mar 2020 19:00:42 -0000
49
+ Vary:
50
+ - Origin
51
+ X-Content-Type-Options:
52
+ - nosniff
53
+ X-Frame-Options:
54
+ - SAMEORIGIN
55
+ X-Per-Page:
56
+ - '100'
57
+ X-Ratelimit-Limit:
58
+ - '1000'
59
+ X-Ratelimit-Remaining:
60
+ - '999'
61
+ X-Ratelimit-Reset:
62
+ - '1521835200'
63
+ X-Request-Id:
64
+ - 48c8b644-e799-42cf-a8ad-e87b15c8402a
65
+ X-Runtime:
66
+ - '0.210125'
67
+ X-Updated-Since-Request-Synced-At:
68
+ - 2018-03-23 19:00:42 UTC
69
+ X-Xss-Protection:
70
+ - 1; mode=block
71
+ Date:
72
+ - Fri, 23 Mar 2018 19:00:42 GMT
73
+ Content-Length:
74
+ - '1049'
75
+ body:
76
+ encoding: UTF-8
77
+ 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":1,"bookings":[],"inquiries":[],"source":1},"closed_at":null,"created_at":"2018-03-23T19:00:42Z","deadline_response_at":null,"id":3,"last_message_at":null,"marked_as_spam_at":null,"subject":"New
78
+ Question","updated_at":"2018-03-23T19:00:42Z"}],"meta":{"Link":{"first":"https://www.bookingsync.com/api/v3/inbox/conversations?conversations%5B%5D%5Bassignee_id%5D=1&conversations%5B%5D%5Bsource_id%5D=1&conversations%5B%5D%5Bsubject%5D=New+Question&page=1"},"X-Total-Pages":null,"X-Total-Count":null,"X-Per-Page":"100"}}'
79
+ http_version:
80
+ recorded_at: Fri, 23 Mar 2018 19:00:42 GMT
81
+ recorded_with: VCR 4.0.0
@@ -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/"8758ac4bda5dd714a32e187117d78f1e"
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=79d0dc0c-e6b8-447a-a952-a7efb18a608c; path=/; expires=Mon, 02 Apr
44
+ 2018 19:28:44 -0000
45
+ - ahoy_visitor=dfa83bbd-c9cf-44e4-abd5-1d83e151ea21; path=/; expires=Thu, 26
46
+ Mar 2020 19:28:44 -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
+ - '985'
59
+ X-Ratelimit-Reset:
60
+ - '1522094400'
61
+ X-Request-Id:
62
+ - 7a3d488e-3986-4ccb-a049-39699b1d7dbf
63
+ X-Runtime:
64
+ - '0.078942'
65
+ X-Total-Count:
66
+ - '1'
67
+ X-Total-Pages:
68
+ - '1'
69
+ X-Updated-Since-Request-Synced-At:
70
+ - 2018-03-26 19:28:44 UTC
71
+ X-Xss-Protection:
72
+ - 1; mode=block
73
+ Date:
74
+ - Mon, 26 Mar 2018 19:28:44 GMT
75
+ Content-Length:
76
+ - '989'
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":[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
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:28:44 GMT
83
+ - request:
84
+ method: put
85
+ uri: https://www.bookingsync.com/api/v3/inbox/conversations/1/disconnect_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/"4367581ec3eb9a0c83ef1dabe68ccf71"
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=70178634-b500-464d-a26d-ffbf28c65bc3; path=/; expires=Mon, 02 Apr
121
+ 2018 19:28:44 -0000
122
+ - ahoy_visitor=76b276b5-95aa-4926-ade5-31fa4ff9827c; path=/; expires=Thu, 26
123
+ Mar 2020 19:28:44 -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
+ - '984'
134
+ X-Ratelimit-Reset:
135
+ - '1522094400'
136
+ X-Request-Id:
137
+ - e4695816-37b0-4a48-a0b2-9534c940b21e
138
+ X-Runtime:
139
+ - '0.056172'
140
+ X-Updated-Since-Request-Synced-At:
141
+ - 2018-03-26 19:28:44 UTC
142
+ X-Xss-Protection:
143
+ - 1; mode=block
144
+ Date:
145
+ - Mon, 26 Mar 2018 19:28:44 GMT
146
+ Content-Length:
147
+ - '781'
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":[],"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:28:44 GMT
154
+ recorded_with: VCR 3.0.3
@@ -0,0 +1,74 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: put
5
+ uri: https://www.bookingsync.com/api/v3/inbox/conversations/3
6
+ body:
7
+ encoding: UTF-8
8
+ string: '{"conversations":[{"closed":true,"assignee_id":2}]}'
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/"84556874d6db3ad4b4d9a277ccbf01f3"
35
+ P3p:
36
+ - CP="OTI DSP COR CUR ADMo DEVo TAI PSAi PSDi IVAi IVDi CONi HISi TELi OTPi
37
+ OUR SAMi OTRo UNRo PUBi IND UNI STA"
38
+ Set-Cookie:
39
+ - ahoy_track=true; path=/
40
+ - ahoy_visit=542ad181-12f4-4d52-8911-527dc8125b09; path=/; expires=Fri, 30 Mar
41
+ 2018 19:00:42 -0000
42
+ - ahoy_visitor=d3a94d63-b923-4690-8808-a31ca40847bf; path=/; expires=Mon, 23
43
+ Mar 2020 19:00:42 -0000
44
+ Vary:
45
+ - Origin
46
+ X-Content-Type-Options:
47
+ - nosniff
48
+ X-Frame-Options:
49
+ - SAMEORIGIN
50
+ X-Ratelimit-Limit:
51
+ - '1000'
52
+ X-Ratelimit-Remaining:
53
+ - '999'
54
+ X-Ratelimit-Reset:
55
+ - '1521835200'
56
+ X-Request-Id:
57
+ - 1f813ea9-05c3-4102-b6ac-e0f2d5ae9d7c
58
+ X-Runtime:
59
+ - '0.118657'
60
+ X-Updated-Since-Request-Synced-At:
61
+ - 2018-03-23 19:00:42 UTC
62
+ X-Xss-Protection:
63
+ - 1; mode=block
64
+ Date:
65
+ - Fri, 23 Mar 2018 19:00:42 GMT
66
+ Content-Length:
67
+ - '804'
68
+ body:
69
+ encoding: UTF-8
70
+ 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":2,"bookings":[],"inquiries":[],"source":1},"closed_at":"2018-03-23T19:00:42Z","created_at":"2018-03-23T19:00:42Z","deadline_response_at":null,"id":3,"last_message_at":null,"marked_as_spam_at":null,"subject":"New
71
+ Question","updated_at":"2018-03-23T19:00:42Z"}],"meta":{}}'
72
+ http_version:
73
+ recorded_at: Fri, 23 Mar 2018 19:00:42 GMT
74
+ recorded_with: VCR 4.0.0
@@ -0,0 +1,80 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://www.bookingsync.com/api/v3/hosts
6
+ body:
7
+ encoding: UTF-8
8
+ string: '{"hosts":[{"email":"host_email@example.com","firstname":"John","lastname":"Doe","user_id":1,"source_id":1}]}'
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: 201
27
+ message: Created
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/"e340da248fbf941958c1d7781350033f"
35
+ Link:
36
+ - <https://www.bookingsync.com/api/v3/hosts?hosts%5B%5D%5Bemail%5D=host_email%40example.com&hosts%5B%5D%5Bfirstname%5D=John&hosts%5B%5D%5Blastname%5D=Doe&hosts%5B%5D%5Bsource_id%5D=1&hosts%5B%5D%5Buser_id%5D=1&page=1>;
37
+ rel="first"
38
+ Location:
39
+ - https://www.bookingsync.com/api/v3/hosts/2
40
+ P3p:
41
+ - CP="OTI DSP COR CUR ADMo DEVo TAI PSAi PSDi IVAi IVDi CONi HISi TELi OTPi
42
+ OUR SAMi OTRo UNRo PUBi IND UNI STA"
43
+ Set-Cookie:
44
+ - ahoy_track=true; path=/
45
+ - ahoy_visit=30351469-2f01-4751-be08-825a65d20ada; path=/; expires=Fri, 30 Mar
46
+ 2018 20:40:36 -0000
47
+ - ahoy_visitor=4c549e8a-7a0c-4557-a4e6-45752949a1b5; path=/; expires=Mon, 23
48
+ Mar 2020 20:40:36 -0000
49
+ Vary:
50
+ - Origin
51
+ X-Content-Type-Options:
52
+ - nosniff
53
+ X-Frame-Options:
54
+ - SAMEORIGIN
55
+ X-Per-Page:
56
+ - '100'
57
+ X-Ratelimit-Limit:
58
+ - '1000'
59
+ X-Ratelimit-Remaining:
60
+ - '999'
61
+ X-Ratelimit-Reset:
62
+ - '1521838800'
63
+ X-Request-Id:
64
+ - b6d4076b-88ab-48f2-8552-f2063bd26a20
65
+ X-Runtime:
66
+ - '0.223410'
67
+ X-Updated-Since-Request-Synced-At:
68
+ - 2018-03-23 20:40:36 UTC
69
+ X-Xss-Protection:
70
+ - 1; mode=block
71
+ Date:
72
+ - Fri, 23 Mar 2018 20:40:36 GMT
73
+ Content-Length:
74
+ - '854'
75
+ body:
76
+ encoding: UTF-8
77
+ string: '{"links":{"hosts.user":"https://www.bookingsync.com/api/v3/users/{hosts.user}","hosts.source":"https://www.bookingsync.com/api/v3/sources/{hosts.source}","hosts.account":"https://www.bookingsync.com/api/v3/accounts/{hosts.account}","hosts.participants":"https://www.bookingsync.com/api/v3/inbox/participants/{hosts.participants}"},"hosts":[{"links":{"account":1,"participants":[],"source":1,"user":1},"id":2,"firstname":"John","lastname":"Doe","email":"host_email@example.com","created_at":"2018-03-23T20:40:36Z","updated_at":"2018-03-23T20:40:36Z"}],"meta":{"Link":{"first":"https://www.bookingsync.com/api/v3/hosts?hosts%5B%5D%5Bemail%5D=host_email%40example.com&hosts%5B%5D%5Bfirstname%5D=John&hosts%5B%5D%5Blastname%5D=Doe&hosts%5B%5D%5Bsource_id%5D=1&hosts%5B%5D%5Buser_id%5D=1&page=1"},"X-Total-Pages":null,"X-Total-Count":null,"X-Per-Page":"100"}}'
78
+ http_version:
79
+ recorded_at: Fri, 23 Mar 2018 20:40:36 GMT
80
+ recorded_with: VCR 4.0.0