bookingsync-api 0.1.12 → 0.1.13

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 (32) hide show
  1. checksums.yaml +5 -5
  2. data/.gitignore +1 -0
  3. data/.travis.yml +3 -1
  4. data/CHANGELOG.md +3 -0
  5. data/lib/bookingsync/api/client.rb +10 -0
  6. data/lib/bookingsync/api/client/applications.rb +43 -0
  7. data/lib/bookingsync/api/client/applications_periods_rentals.rb +49 -0
  8. data/lib/bookingsync/api/client/booking_comments.rb +1 -1
  9. data/lib/bookingsync/api/client/contacts.rb +63 -0
  10. data/lib/bookingsync/api/client/rentals.rb +3 -2
  11. data/lib/bookingsync/api/version.rb +1 -1
  12. data/spec/bookingsync/api/client/applications_periods_rentals_spec.rb +70 -0
  13. data/spec/bookingsync/api/client/applications_spec.rb +44 -0
  14. data/spec/bookingsync/api/client/contacts_spec.rb +116 -0
  15. data/spec/fixtures/cassettes/BookingSync_API_Client_Applications/_application/returns_a_single_application.yml +84 -0
  16. data/spec/fixtures/cassettes/BookingSync_API_Client_Applications/_applications/returns_applications.yml +85 -0
  17. data/spec/fixtures/cassettes/BookingSync_API_Client_Applications/_edit_application/returns_updated_application.yml +73 -0
  18. data/spec/fixtures/cassettes/BookingSync_API_Client_Applications/_edit_application/updates_given_application_by_ID.yml +73 -0
  19. data/spec/fixtures/cassettes/BookingSync_API_Client_ApplicationsPeriodsRentals/_applications_periods_rental/returns_applications_periods_rental.yml +80 -0
  20. data/spec/fixtures/cassettes/BookingSync_API_Client_ApplicationsPeriodsRentals/_applications_periods_rentals/returns_applications_periods_rentals.yml +80 -0
  21. data/spec/fixtures/cassettes/BookingSync_API_Client_ApplicationsPeriodsRentals/_create_applications_periods_rental/creates_a_applications_periods_rental.yml +71 -0
  22. data/spec/fixtures/cassettes/BookingSync_API_Client_ApplicationsPeriodsRentals/_edit_applications_periods_rental/returns_updated_applications_periods_rental.yml +69 -0
  23. data/spec/fixtures/cassettes/BookingSync_API_Client_ApplicationsPeriodsRentals/_edit_applications_periods_rental/updates_given_applications_periods_rental_by_ID.yml +69 -0
  24. data/spec/fixtures/cassettes/BookingSync_API_Client_Bookings/_create_applications_periods_rental/creates_an_applications_periods_rental.yml +71 -0
  25. data/spec/fixtures/cassettes/BookingSync_API_Client_Contacts/_contact/returns_a_single_contact.yml +99 -0
  26. data/spec/fixtures/cassettes/BookingSync_API_Client_Contacts/_contact/returns_contact.yml +99 -0
  27. data/spec/fixtures/cassettes/BookingSync_API_Client_Contacts/_contacts/returns_contacts.yml +99 -0
  28. data/spec/fixtures/cassettes/BookingSync_API_Client_Contacts/_contacts/returns_contacts_by_ids.yml +99 -0
  29. data/spec/fixtures/cassettes/BookingSync_API_Client_Contacts/_create_contact/creates_a_new_contact.yml +74 -0
  30. data/spec/fixtures/cassettes/BookingSync_API_Client_Contacts/_delete_contact/deletes_given_contact.yml +63 -0
  31. data/spec/fixtures/cassettes/BookingSync_API_Client_Contacts/_edit_contact/updates_given_contact_by_ID.yml +71 -0
  32. metadata +46 -4
@@ -0,0 +1,84 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://www.bookingsync.com/api/v3/applications/17
6
+ body:
7
+ encoding: UTF-8
8
+ string: "{}"
9
+ headers:
10
+ User-Agent:
11
+ - BookingSync API gem v0.1.12
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
+ Server:
30
+ - nginx/1.13.4
31
+ Date:
32
+ - Mon, 28 Jan 2019 06:51:43 GMT
33
+ Content-Type:
34
+ - application/vnd.api+json; charset=utf-8
35
+ Transfer-Encoding:
36
+ - chunked
37
+ X-Frame-Options:
38
+ - SAMEORIGIN
39
+ X-Xss-Protection:
40
+ - 1; mode=block
41
+ X-Content-Type-Options:
42
+ - nosniff
43
+ X-Updated-Since-Request-Synced-At:
44
+ - 2019-01-28 06:51:43 UTC
45
+ X-Ratelimit-Limit:
46
+ - '1000'
47
+ X-Ratelimit-Reset:
48
+ - '1548658800'
49
+ X-Ratelimit-Remaining:
50
+ - '996'
51
+ Link:
52
+ - <https://www.bookingsync.com/api/v3/applications/17?page=1>; rel="first",
53
+ <https://www.bookingsync.com/api/v3/applications/17?page=1>; rel="last"
54
+ X-Total-Pages:
55
+ - '1'
56
+ X-Total-Count:
57
+ - '1'
58
+ X-Per-Page:
59
+ - '100'
60
+ X-Current-Page:
61
+ - '1'
62
+ Etag:
63
+ - W/"12fe43cbe24d70d282ed7485bca60003"
64
+ Cache-Control:
65
+ - max-age=0, private, must-revalidate
66
+ Set-Cookie:
67
+ - ahoy_visit=14d915aa-3f24-4021-a1d2-92adf5515150; path=/; expires=Mon, 04 Feb
68
+ 2019 06:51:43 -0000; secure
69
+ - ahoy_visitor=d5632d8c-8edb-45e8-a3d3-3c023e08b041; path=/; expires=Thu, 28
70
+ Jan 2021 06:51:43 -0000; secure
71
+ X-Request-Id:
72
+ - 15522b34-dbb2-4f31-a007-16ee518c1046
73
+ X-Runtime:
74
+ - '0.039903'
75
+ Vary:
76
+ - Origin
77
+ Strict-Transport-Security:
78
+ - max-age=15552000
79
+ body:
80
+ encoding: UTF-8
81
+ string: '{"applications":[{"id":17,"name":"BSA Website DEV","default_price_increase":"0.0"}],"meta":{"Link":{"first":"https://www.bookingsync.com/api/v3/applications/17?page=1","last":"https://www.bookingsync.com/api/v3/applications/17?page=1"},"X-Total-Pages":"1","X-Total-Count":"1","X-Per-Page":"100"}}'
82
+ http_version:
83
+ recorded_at: Mon, 28 Jan 2019 06:51:43 GMT
84
+ recorded_with: VCR 4.0.0
@@ -0,0 +1,85 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://www.bookingsync.com/api/v3/applications
6
+ body:
7
+ encoding: UTF-8
8
+ string: "{}"
9
+ headers:
10
+ User-Agent:
11
+ - BookingSync API gem v0.1.12
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
+ Server:
30
+ - nginx/1.13.4
31
+ Date:
32
+ - Mon, 28 Jan 2019 06:51:00 GMT
33
+ Content-Type:
34
+ - application/vnd.api+json; charset=utf-8
35
+ Transfer-Encoding:
36
+ - chunked
37
+ X-Frame-Options:
38
+ - SAMEORIGIN
39
+ X-Xss-Protection:
40
+ - 1; mode=block
41
+ X-Content-Type-Options:
42
+ - nosniff
43
+ X-Updated-Since-Request-Synced-At:
44
+ - 2019-01-28 06:51:00 UTC
45
+ X-Ratelimit-Limit:
46
+ - '1000'
47
+ X-Ratelimit-Reset:
48
+ - '1548658800'
49
+ X-Ratelimit-Remaining:
50
+ - '997'
51
+ Link:
52
+ - <https://www.bookingsync.com/api/v3/applications?page=1>; rel="first", <https://www.bookingsync.com/api/v3/applications?page=1>;
53
+ rel="last"
54
+ X-Total-Pages:
55
+ - '1'
56
+ X-Total-Count:
57
+ - '7'
58
+ X-Per-Page:
59
+ - '100'
60
+ X-Current-Page:
61
+ - '1'
62
+ Etag:
63
+ - W/"42e01960a6efc9143f7fbb79e6c3d8cf"
64
+ Cache-Control:
65
+ - max-age=0, private, must-revalidate
66
+ Set-Cookie:
67
+ - ahoy_visit=161d7a18-614d-4097-b3e7-02442ce63677; path=/; expires=Mon, 04 Feb
68
+ 2019 06:51:00 -0000; secure
69
+ - ahoy_visitor=964715b9-e8cc-473b-b7f3-24a7dec755ad; path=/; expires=Thu, 28
70
+ Jan 2021 06:51:00 -0000; secure
71
+ X-Request-Id:
72
+ - a8968162-e761-4743-8fae-fdef93a90f38
73
+ X-Runtime:
74
+ - '0.074883'
75
+ Vary:
76
+ - Origin
77
+ Strict-Transport-Security:
78
+ - max-age=15552000
79
+ body:
80
+ encoding: UTF-8
81
+ string: '{"applications":[{"id":17,"name":"BSA Website DEV","default_price_increase":"0.0"},{"id":65,"name":"Airbnb","default_price_increase":"0.0"},{"id":95,"name":"bsa-secure","default_price_increase":"0.0"},{"id":453,"name":"bsa-booking-staging","default_price_increase":"0.0"},{"id":455,"name":"airConnect","default_price_increase":"0.0"},{"id":560,"name":"Admin
82
+ UI","default_price_increase":"0.0"},{"id":609,"name":"Channel Manager","default_price_increase":"0.0"}],"meta":{"Link":{"first":"https://www.bookingsync.com/api/v3/applications?page=1","last":"https://www.bookingsync.com/api/v3/applications?page=1"},"X-Total-Pages":"1","X-Total-Count":"7","X-Per-Page":"100"}}'
83
+ http_version:
84
+ recorded_at: Mon, 28 Jan 2019 06:51:00 GMT
85
+ recorded_with: VCR 4.0.0
@@ -0,0 +1,73 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: put
5
+ uri: https://www.bookingsync.com/api/v3/applications/17
6
+ body:
7
+ encoding: UTF-8
8
+ string: '{"applications":[{"default_price_increase":1.1}]}'
9
+ headers:
10
+ User-Agent:
11
+ - BookingSync API gem v0.1.12
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
+ Server:
30
+ - nginx/1.13.4
31
+ Date:
32
+ - Tue, 29 Jan 2019 11:29:34 GMT
33
+ Content-Type:
34
+ - application/vnd.api+json; charset=utf-8
35
+ Transfer-Encoding:
36
+ - chunked
37
+ X-Frame-Options:
38
+ - SAMEORIGIN
39
+ X-Xss-Protection:
40
+ - 1; mode=block
41
+ X-Content-Type-Options:
42
+ - nosniff
43
+ X-Updated-Since-Request-Synced-At:
44
+ - 2019-01-29 11:29:34 UTC
45
+ X-Ratelimit-Limit:
46
+ - '1000'
47
+ X-Ratelimit-Reset:
48
+ - '1548763200'
49
+ X-Ratelimit-Remaining:
50
+ - '998'
51
+ Etag:
52
+ - W/"fdce7369a2708523045bf15864871fb8"
53
+ Cache-Control:
54
+ - max-age=0, private, must-revalidate
55
+ Set-Cookie:
56
+ - ahoy_visit=46943574-f6a6-4c9b-8747-2c78c37d0b74; path=/; expires=Tue, 05 Feb
57
+ 2019 11:29:34 -0000; secure
58
+ - ahoy_visitor=b210b427-032e-4a22-830b-3b5bcb4de265; path=/; expires=Fri, 29
59
+ Jan 2021 11:29:34 -0000; secure
60
+ X-Request-Id:
61
+ - 208e0410-3a7a-4b0e-8cb2-ffe0e724a01d
62
+ X-Runtime:
63
+ - '0.568793'
64
+ Vary:
65
+ - Origin
66
+ Strict-Transport-Security:
67
+ - max-age=15552000
68
+ body:
69
+ encoding: UTF-8
70
+ string: '{"applications":[{"id":17,"name":"BSA Website DEV","default_price_increase":"1.1"}],"meta":{}}'
71
+ http_version:
72
+ recorded_at: Tue, 29 Jan 2019 11:29:34 GMT
73
+ recorded_with: VCR 4.0.0
@@ -0,0 +1,73 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: put
5
+ uri: https://www.bookingsync.com/api/v3/applications/17
6
+ body:
7
+ encoding: UTF-8
8
+ string: '{"applications":[{"default_price_increase":1.1}]}'
9
+ headers:
10
+ User-Agent:
11
+ - BookingSync API gem v0.1.12
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
+ Server:
30
+ - nginx/1.13.4
31
+ Date:
32
+ - Tue, 29 Jan 2019 11:33:26 GMT
33
+ Content-Type:
34
+ - application/vnd.api+json; charset=utf-8
35
+ Transfer-Encoding:
36
+ - chunked
37
+ X-Frame-Options:
38
+ - SAMEORIGIN
39
+ X-Xss-Protection:
40
+ - 1; mode=block
41
+ X-Content-Type-Options:
42
+ - nosniff
43
+ X-Updated-Since-Request-Synced-At:
44
+ - 2019-01-29 11:33:25 UTC
45
+ X-Ratelimit-Limit:
46
+ - '1000'
47
+ X-Ratelimit-Reset:
48
+ - '1548763200'
49
+ X-Ratelimit-Remaining:
50
+ - '997'
51
+ Etag:
52
+ - W/"fdce7369a2708523045bf15864871fb8"
53
+ Cache-Control:
54
+ - max-age=0, private, must-revalidate
55
+ Set-Cookie:
56
+ - ahoy_visit=d289e0aa-b815-4afe-905f-793303de635f; path=/; expires=Tue, 05 Feb
57
+ 2019 11:33:25 -0000; secure
58
+ - ahoy_visitor=c8da2971-4a43-4201-8040-2f63f31db44c; path=/; expires=Fri, 29
59
+ Jan 2021 11:33:25 -0000; secure
60
+ X-Request-Id:
61
+ - 327fe1c5-4f29-4dea-8054-c5d4e9750f36
62
+ X-Runtime:
63
+ - '0.863601'
64
+ Vary:
65
+ - Origin
66
+ Strict-Transport-Security:
67
+ - max-age=15552000
68
+ body:
69
+ encoding: UTF-8
70
+ string: '{"applications":[{"id":17,"name":"BSA Website DEV","default_price_increase":"1.1"}],"meta":{}}'
71
+ http_version:
72
+ recorded_at: Tue, 29 Jan 2019 11:33:26 GMT
73
+ recorded_with: VCR 4.0.0
@@ -0,0 +1,80 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://bookingsync.test/api/v3/applications_periods_rentals/2
6
+ body:
7
+ encoding: UTF-8
8
+ string: "{}"
9
+ headers:
10
+ User-Agent:
11
+ - BookingSync API gem v0.1.12
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/"4f16e1fadf19018a8e568c8eccace925"
35
+ Link:
36
+ - <https://bookingsync.test/api/v3/applications_periods_rentals/2?page=1>; rel="first",
37
+ <https://bookingsync.test/api/v3/applications_periods_rentals/2?page=1>; rel="last"
38
+ Set-Cookie:
39
+ - ahoy_visit=2d8fdbfb-1554-4133-9dee-7595b92d0d3b; path=/; expires=Tue, 19 Feb
40
+ 2019 13:17:09 -0000
41
+ - ahoy_visitor=01bc6be4-c17c-4b78-aa7d-7697333689a3; path=/; expires=Fri, 12
42
+ Feb 2021 13:17:09 -0000
43
+ Vary:
44
+ - Origin
45
+ X-Content-Type-Options:
46
+ - nosniff
47
+ X-Current-Page:
48
+ - '1'
49
+ X-Frame-Options:
50
+ - SAMEORIGIN
51
+ X-Per-Page:
52
+ - '100'
53
+ X-Ratelimit-Limit:
54
+ - '1000'
55
+ X-Ratelimit-Remaining:
56
+ - '997'
57
+ X-Ratelimit-Reset:
58
+ - '1549980000'
59
+ X-Request-Id:
60
+ - a8cd0926-d3c9-4c84-bf54-3812d4ad9529
61
+ X-Runtime:
62
+ - '0.377347'
63
+ X-Total-Count:
64
+ - '1'
65
+ X-Total-Pages:
66
+ - '1'
67
+ X-Updated-Since-Request-Synced-At:
68
+ - 2019-02-12 13:17:09 UTC
69
+ X-Xss-Protection:
70
+ - 1; mode=block
71
+ Date:
72
+ - Tue, 12 Feb 2019 13:17:09 GMT
73
+ Content-Length:
74
+ - '353'
75
+ body:
76
+ encoding: UTF-8
77
+ string: '{"applications_periods_rentals":[{"id":2,"price_increase":"15.0","start_date":"2019-01-01","end_date":"2100-01-01"}],"meta":{"Link":{"first":"https://bookingsync.test/api/v3/applications_periods_rentals/2?page=1","last":"https://bookingsync.test/api/v3/applications_periods_rentals/2?page=1"},"X-Total-Pages":"1","X-Total-Count":"1","X-Per-Page":"100"}}'
78
+ http_version:
79
+ recorded_at: Tue, 12 Feb 2019 13:17:09 GMT
80
+ recorded_with: VCR 4.0.0
@@ -0,0 +1,80 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://bookingsync.test/api/v3/applications_periods_rentals
6
+ body:
7
+ encoding: UTF-8
8
+ string: "{}"
9
+ headers:
10
+ User-Agent:
11
+ - BookingSync API gem v0.1.12
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/"73df67a8f30027c62974163194dc023c"
35
+ Link:
36
+ - <https://bookingsync.test/api/v3/applications_periods_rentals?page=1>; rel="first",
37
+ <https://bookingsync.test/api/v3/applications_periods_rentals?page=1>; rel="last"
38
+ Set-Cookie:
39
+ - ahoy_visit=9d96a1b7-8d2b-4eac-81a2-cbab3a49d139; path=/; expires=Tue, 19 Feb
40
+ 2019 13:16:28 -0000
41
+ - ahoy_visitor=7df69672-3d06-42bb-ae5a-fb383e3ad4c6; path=/; expires=Fri, 12
42
+ Feb 2021 13:16:28 -0000
43
+ Vary:
44
+ - Origin
45
+ X-Content-Type-Options:
46
+ - nosniff
47
+ X-Current-Page:
48
+ - '1'
49
+ X-Frame-Options:
50
+ - SAMEORIGIN
51
+ X-Per-Page:
52
+ - '100'
53
+ X-Ratelimit-Limit:
54
+ - '1000'
55
+ X-Ratelimit-Remaining:
56
+ - '998'
57
+ X-Ratelimit-Reset:
58
+ - '1549980000'
59
+ X-Request-Id:
60
+ - 5f45035f-9cb8-4199-a84a-0d0ff18a741c
61
+ X-Runtime:
62
+ - '0.428332'
63
+ X-Total-Count:
64
+ - '1'
65
+ X-Total-Pages:
66
+ - '1'
67
+ X-Updated-Since-Request-Synced-At:
68
+ - 2019-02-12 13:16:28 UTC
69
+ X-Xss-Protection:
70
+ - 1; mode=block
71
+ Date:
72
+ - Tue, 12 Feb 2019 13:16:29 GMT
73
+ Content-Length:
74
+ - '349'
75
+ body:
76
+ encoding: UTF-8
77
+ string: '{"applications_periods_rentals":[{"id":2,"price_increase":"15.0","start_date":"2019-01-01","end_date":"2100-01-01"}],"meta":{"Link":{"first":"https://bookingsync.test/api/v3/applications_periods_rentals?page=1","last":"https://bookingsync.test/api/v3/applications_periods_rentals?page=1"},"X-Total-Pages":"1","X-Total-Count":"1","X-Per-Page":"100"}}'
78
+ http_version:
79
+ recorded_at: Tue, 12 Feb 2019 13:16:29 GMT
80
+ recorded_with: VCR 4.0.0