bookingsync-api 0.0.35 → 0.0.36

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9d2e50d31a5abaa08bb9d9e801ef634a8bafa785
4
- data.tar.gz: d7b21a025efe71856e8be1d40540436f8fff3e9e
3
+ metadata.gz: f78c9f39fe600e7812b5829fb2379b11085ea364
4
+ data.tar.gz: 19939d495c4e3930ea13e057d74dbf0df4cc4106
5
5
  SHA512:
6
- metadata.gz: 987a3a2f52d85f257832d3a140e91afbcb34e9fa2dec70d37a8d7922e98a93fc3f7ea7d2472c250dd6c0d4e64e0941da4f75d5953b6eb5544062e164f5d76c10
7
- data.tar.gz: a307b7b927185016a71cc9403aea23938c96bfb88dc76989ae478d9433a7b058aa493f576689caf8cd99a2057648e7d3aad0faf057a5fbf3cf6ab311fb417b08
6
+ metadata.gz: 509be945f0bccf83b01a1e3d6d71ef65c4a127092d6e845788eaf2884201d8c5e4ddafb614f57747420897aabf4144aba2f72fb0031a72cdf9d92a43f6fa61ad
7
+ data.tar.gz: 6fcf622f86b47954ac6e3bd42082ea844d67d73cdb038f21fcbbd466e7b1cdea2a7fd84701d71475950292083497be509fa1130892e43d614003405bd2bc061b
@@ -2,6 +2,10 @@
2
2
 
3
3
  ## master
4
4
 
5
+ ## 0.0.36
6
+
7
+ - Add support for `booking_comments`.
8
+
5
9
  ## 0.0.35
6
10
 
7
11
  - Add support for preferences_general_settings reading and updating.
@@ -5,6 +5,7 @@ require "bookingsync/api/client/availabilities"
5
5
  require "bookingsync/api/client/bathrooms"
6
6
  require "bookingsync/api/client/bedrooms"
7
7
  require "bookingsync/api/client/bookings"
8
+ require "bookingsync/api/client/booking_comments"
8
9
  require "bookingsync/api/client/bookings_fees"
9
10
  require "bookingsync/api/client/bookings_payments"
10
11
  require "bookingsync/api/client/bookings_taxes"
@@ -49,6 +50,7 @@ module BookingSync::API
49
50
  include BookingSync::API::Client::Bathrooms
50
51
  include BookingSync::API::Client::Bedrooms
51
52
  include BookingSync::API::Client::Bookings
53
+ include BookingSync::API::Client::BookingComments
52
54
  include BookingSync::API::Client::BookingsFees
53
55
  include BookingSync::API::Client::BookingsPayments
54
56
  include BookingSync::API::Client::BookingsTaxes
@@ -0,0 +1,72 @@
1
+ module BookingSync::API
2
+ class Client
3
+ module BookingComments
4
+ # List booking comments
5
+
6
+ # Returns booking comments for the account and rentals user is authenticated with.
7
+ # @param options [Hash] A customizable set of options.
8
+ # @option options [Integer] rental_id: Rental ID that booking is assiociated with.
9
+ # @return [Array<BookingSync::API::Resource>] Array of comments.
10
+ #
11
+ # @example Get the list of comments for the current account
12
+ # @api.booking_comments
13
+ # => [{:links=>{:booking=>10}, :id=>1, :content=>"comment 1", :editable=>true, :created_at=>2016-04-18 12:06:15 UTC, :updated_at=>2016-04-18 12:06:15 UTC},
14
+ # {:links=>{:booking=>11}, :id=>2, :content=>"comment 2", :editable=>true, :created_at=>2016-04-18 12:06:25 UTC, :updated_at=>2016-04-18 12:06:25 UTC}]
15
+ # @example Get the list of comments only for specific rental
16
+ # @api.booking_comments(rental_id: 1)
17
+ # => [{:links=>{:booking=>10}, :id=>1, :content=>"comment 1", :editable=>true, :created_at=>2016-04-18 12:06:15 UTC, :updated_at=>2016-04-18 12:06:15 UTC}]
18
+ def booking_comments(options = {}, &block)
19
+ paginate :booking_comments, options, &block
20
+ end
21
+
22
+ # Get a single booking_comment
23
+ #
24
+ # @param booking_comment [BookingSync::API::Resource|Integer] BookingComment or ID of the booking_comment.
25
+ # @return [BookingSync::API::Resource]
26
+ #
27
+ # @example Get single booking_comment
28
+ # @api.booking_comment(1)
29
+ # => {:links=>{:booking=>10}, :id=>1, :content=>"comment 1", :editable=>true, :created_at=>2016-04-18 12:06:15 UTC, :updated_at=>2016-04-18 12:06:15 UTC}
30
+ def booking_comment(booking_comment, options = {})
31
+ get("booking_comments/#{booking_comment}", options).pop
32
+ end
33
+
34
+ # Create new booking_comment for a booking
35
+ #
36
+ # @param booking [BookingSync::API::Resource|Integer] Booking or
37
+ # ID of the Booking for which booking_comment will be created
38
+ # @param options [Hash] BookingComment attributes.
39
+ # @return [BookingSync::API::Resource] Newly created bookings comment.
40
+ # @example Create bookings comment
41
+ # @api.create_booking_comment(1, content: "Hello!")
42
+ # => {:links=>{:booking=>1}, :id=>8, :content=>"Hello!", :editable=>true, :created_at=>2016-04-18 13:31:40 UTC, :updated_at=>2016-04-18 13:46:06 UTC}
43
+ def create_booking_comment(booking, options = {})
44
+ post("booking_comments", { booking_id: booking, booking_comments: [options] }).pop
45
+ end
46
+
47
+ # Edit a booking_comment
48
+ #
49
+ # @param booking_comment [BookingSync::API::Resource|Integer] BookingComment
50
+ # or ID of the BookingComment to be updated.
51
+ # @param options [Hash] BookingComment attributes to be updated.
52
+ # @return [BookingSync::API::Resource] Updated BookingComment on success,
53
+ # exception is raised otherwise.
54
+ # @example
55
+ # booking_comment = @api.booking_comments.first
56
+ # @api.edit_booking_comment(8, {conent: "New conent"})
57
+ # => {:links=>{:booking=>1}, :id=>8, :content=>"New content", :editable=>true, :created_at=>2016-04-18 13:31:40 UTC, :updated_at=>2016-04-18 13:46:06 UTC}
58
+ def edit_booking_comment(booking_comment, options = {})
59
+ put("booking_comments/#{booking_comment}", booking_comments: [options]).pop
60
+ end
61
+
62
+ # Delete booking_comment
63
+ #
64
+ # @param booking_comment [BookingSync::API::Resource|Integer] BookingComment
65
+ # or ID of the BookingComment to be deleted.
66
+ # @return [NilClass] Returns nil on success.
67
+ def delete_booking_comment(booking_comment)
68
+ delete "booking_comments/#{booking_comment}"
69
+ end
70
+ end
71
+ end
72
+ end
@@ -1,5 +1,5 @@
1
1
  module BookingSync
2
2
  module API
3
- VERSION = "0.0.35"
3
+ VERSION = "0.0.36"
4
4
  end
5
5
  end
@@ -0,0 +1,57 @@
1
+ require "spec_helper"
2
+
3
+ describe BookingSync::API::Client::BookingComments do
4
+ let(:client) { BookingSync::API::Client.new(test_access_token) }
5
+
6
+ describe ".booking_comments", :vcr do
7
+ it "returns booking_comments" do
8
+ expect(client.booking_comments).not_to be_empty
9
+ assert_requested :get, bs_url("booking_comments")
10
+ end
11
+ end
12
+
13
+ describe ".booking_comment", :vcr do
14
+ it "returns single booking_comment" do
15
+ booking_comment = client.booking_comment(4)
16
+ expect(booking_comment.id).to eq(4)
17
+ end
18
+ end
19
+
20
+ describe ".create_booking_comment", :vcr do
21
+ let(:attributes) { { content: "Example conent" } }
22
+ let(:booking) { BookingSync::API::Resource.new(client, id: 1) }
23
+
24
+ it "creates booking_comment" do
25
+ client.create_booking_comment(booking.id, attributes)
26
+ assert_requested :post, bs_url("booking_comments"),
27
+ body: { booking_id: 1, booking_comments: [attributes] }.to_json
28
+ end
29
+
30
+ it "returns newly created booking_comment" do
31
+ booking_comment = client.create_booking_comment(booking.id, attributes)
32
+ expect(booking_comment.content).to eq(attributes[:content])
33
+ end
34
+ end
35
+
36
+ describe ".edit_booking_comment", :vcr do
37
+ let(:attributes) { { content: "Updated content" } }
38
+
39
+ it "updates booking_comment" do
40
+ client.edit_booking_comment(9, attributes)
41
+ assert_requested :put, bs_url("booking_comments/9"),
42
+ body: { booking_comments: [attributes] }.to_json
43
+ end
44
+
45
+ it "returns updated booking_comment" do
46
+ booking_comment = client.edit_booking_comment(9, attributes)
47
+ expect(booking_comment.content).to eq(attributes[:content])
48
+ end
49
+ end
50
+
51
+ describe ".delete_booking_comment", :vcr do
52
+ it "deletes given booking_comment" do
53
+ client.delete_booking_comment(10)
54
+ assert_requested :delete, bs_url("booking_comments/10")
55
+ end
56
+ end
57
+ end
@@ -0,0 +1,73 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: http://bookingsync.dev/api/v3/booking_comments/4
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ User-Agent:
11
+ - BookingSync API gem v0.0.35
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
+ response:
21
+ status:
22
+ code: 200
23
+ message: OK
24
+ headers:
25
+ X-Frame-Options:
26
+ - SAMEORIGIN
27
+ X-Xss-Protection:
28
+ - 1; mode=block
29
+ X-Content-Type-Options:
30
+ - nosniff
31
+ X-Ratelimit-Limit:
32
+ - '1000'
33
+ X-Ratelimit-Reset:
34
+ - '1461074400'
35
+ X-Ratelimit-Remaining:
36
+ - '986'
37
+ Link:
38
+ - <http://bookingsync.dev/api/v3/booking_comments/4?page=1>; rel="first", <http://bookingsync.dev/api/v3/booking_comments/4?page=1>;
39
+ rel="last"
40
+ X-Total-Pages:
41
+ - '1'
42
+ X-Total-Count:
43
+ - '1'
44
+ Content-Type:
45
+ - application/vnd.api+json; charset=utf-8
46
+ Etag:
47
+ - '"51fbf37d3903b736ce54b24c63ae20de"'
48
+ Cache-Control:
49
+ - max-age=0, private, must-revalidate
50
+ P3p:
51
+ - CP="OTI DSP COR CUR ADMo DEVo TAI PSAi PSDi IVAi IVDi CONi HISi TELi OTPi
52
+ OUR SAMi OTRo UNRo PUBi IND UNI STA"
53
+ Set-Cookie:
54
+ - ahoy_track=true; path=/
55
+ - ahoy_visit=c66afc3d-22f7-478a-a587-27230cc32544; path=/; expires=Tue, 26 Apr
56
+ 2016 13:53:12 -0000
57
+ - ahoy_visitor=ff36d9ab-e7e5-49ac-a325-196f345301e9; path=/; expires=Thu, 19
58
+ Apr 2018 13:53:12 -0000
59
+ X-Request-Id:
60
+ - 234e65f6-9311-4ce5-a7ab-d52b7657de2b
61
+ X-Runtime:
62
+ - '0.113756'
63
+ Date:
64
+ - Tue, 19 Apr 2016 13:53:12 GMT
65
+ Connection:
66
+ - close
67
+ body:
68
+ encoding: UTF-8
69
+ string: '{"links":{"booking_comments.booking":"http://bookingsync.dev/api/v3/bookings/{booking_comments.booking}"},"booking_comments":[{"links":{"booking":1},"id":4,"content":"comment
70
+ 4","editable":true,"created_at":"2016-04-18T12:06:36Z","updated_at":"2016-04-18T12:06:36Z"}],"meta":{}}'
71
+ http_version:
72
+ recorded_at: Tue, 19 Apr 2016 13:53:12 GMT
73
+ recorded_with: VCR 3.0.1
@@ -0,0 +1,79 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: http://bookingsync.dev/api/v3/booking_comments
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ User-Agent:
11
+ - BookingSync API gem v0.0.35
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
+ response:
21
+ status:
22
+ code: 200
23
+ message: OK
24
+ headers:
25
+ X-Frame-Options:
26
+ - SAMEORIGIN
27
+ X-Xss-Protection:
28
+ - 1; mode=block
29
+ X-Content-Type-Options:
30
+ - nosniff
31
+ X-Ratelimit-Limit:
32
+ - '1000'
33
+ X-Ratelimit-Reset:
34
+ - '1461074400'
35
+ X-Ratelimit-Remaining:
36
+ - '987'
37
+ Link:
38
+ - <http://bookingsync.dev/api/v3/booking_comments?page=1>; rel="first", <http://bookingsync.dev/api/v3/booking_comments?page=1>;
39
+ rel="last"
40
+ X-Total-Pages:
41
+ - '1'
42
+ X-Total-Count:
43
+ - '7'
44
+ Content-Type:
45
+ - application/vnd.api+json; charset=utf-8
46
+ Etag:
47
+ - '"dd19e4d0f0ec353d7161790aa2f379ce"'
48
+ Cache-Control:
49
+ - max-age=0, private, must-revalidate
50
+ P3p:
51
+ - CP="OTI DSP COR CUR ADMo DEVo TAI PSAi PSDi IVAi IVDi CONi HISi TELi OTPi
52
+ OUR SAMi OTRo UNRo PUBi IND UNI STA"
53
+ Set-Cookie:
54
+ - ahoy_track=true; path=/
55
+ - ahoy_visit=a9db08a9-8b77-4546-88ba-aef491e3ed37; path=/; expires=Tue, 26 Apr
56
+ 2016 13:53:12 -0000
57
+ - ahoy_visitor=ddcd2a96-4b7c-460a-909b-8afccb800909; path=/; expires=Thu, 19
58
+ Apr 2018 13:53:12 -0000
59
+ X-Request-Id:
60
+ - f48e8a7b-28b8-4006-af55-c33da0880ab7
61
+ X-Runtime:
62
+ - '0.120298'
63
+ Date:
64
+ - Tue, 19 Apr 2016 13:53:12 GMT
65
+ Connection:
66
+ - close
67
+ body:
68
+ encoding: UTF-8
69
+ string: '{"links":{"booking_comments.booking":"http://bookingsync.dev/api/v3/bookings/{booking_comments.booking}"},"booking_comments":[{"links":{"booking":10},"id":1,"content":"comment
70
+ 1","editable":true,"created_at":"2016-04-18T12:06:15Z","updated_at":"2016-04-18T12:06:15Z"},{"links":{"booking":10},"id":2,"content":"comment
71
+ 2","editable":true,"created_at":"2016-04-18T12:06:25Z","updated_at":"2016-04-18T12:06:25Z"},{"links":{"booking":1},"id":3,"content":"comment
72
+ 3","editable":true,"created_at":"2016-04-18T12:06:33Z","updated_at":"2016-04-18T12:06:33Z"},{"links":{"booking":1},"id":4,"content":"comment
73
+ 4","editable":true,"created_at":"2016-04-18T12:06:36Z","updated_at":"2016-04-18T12:06:36Z"},{"links":{"booking":1},"id":9,"content":"Updated
74
+ content","editable":true,"created_at":"2016-04-19T12:47:00Z","updated_at":"2016-04-19T12:56:41Z"},{"links":{"booking":1},"id":11,"content":"Example
75
+ conent","editable":true,"created_at":"2016-04-19T13:51:39Z","updated_at":"2016-04-19T13:51:39Z"},{"links":{"booking":1},"id":12,"content":"Example
76
+ conent","editable":true,"created_at":"2016-04-19T13:51:39Z","updated_at":"2016-04-19T13:51:39Z"}],"meta":{}}'
77
+ http_version:
78
+ recorded_at: Tue, 19 Apr 2016 13:53:12 GMT
79
+ recorded_with: VCR 3.0.1
@@ -0,0 +1,68 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: http://bookingsync.dev/api/v3/booking_comments
6
+ body:
7
+ encoding: UTF-8
8
+ string: '{"booking_id":1,"booking_comments":[{"content":"Example conent"}]}'
9
+ headers:
10
+ User-Agent:
11
+ - BookingSync API gem v0.0.35
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
+ response:
21
+ status:
22
+ code: 201
23
+ message: Created
24
+ headers:
25
+ X-Frame-Options:
26
+ - SAMEORIGIN
27
+ X-Xss-Protection:
28
+ - 1; mode=block
29
+ X-Content-Type-Options:
30
+ - nosniff
31
+ X-Ratelimit-Limit:
32
+ - '1000'
33
+ X-Ratelimit-Reset:
34
+ - '1461074400'
35
+ X-Ratelimit-Remaining:
36
+ - '985'
37
+ Location:
38
+ - http://bookingsync.dev/api/v3/booking_comments/13
39
+ Content-Type:
40
+ - application/vnd.api+json; charset=utf-8
41
+ Etag:
42
+ - '"9c9fdfa10dfb3f4836183523ad1c72be"'
43
+ Cache-Control:
44
+ - max-age=0, private, must-revalidate
45
+ P3p:
46
+ - CP="OTI DSP COR CUR ADMo DEVo TAI PSAi PSDi IVAi IVDi CONi HISi TELi OTPi
47
+ OUR SAMi OTRo UNRo PUBi IND UNI STA"
48
+ Set-Cookie:
49
+ - ahoy_track=true; path=/
50
+ - ahoy_visit=9246e5f3-533a-4dba-afb7-38e5f450a91e; path=/; expires=Tue, 26 Apr
51
+ 2016 13:53:13 -0000
52
+ - ahoy_visitor=5766b6d1-79fa-4c4c-905e-62fc5d09392d; path=/; expires=Thu, 19
53
+ Apr 2018 13:53:13 -0000
54
+ X-Request-Id:
55
+ - 5775f305-40a4-4218-815d-b8988410e932
56
+ X-Runtime:
57
+ - '0.070028'
58
+ Date:
59
+ - Tue, 19 Apr 2016 13:53:13 GMT
60
+ Connection:
61
+ - close
62
+ body:
63
+ encoding: UTF-8
64
+ string: '{"links":{"booking_comments.booking":"http://bookingsync.dev/api/v3/bookings/{booking_comments.booking}"},"booking_comments":[{"links":{"booking":1},"id":13,"content":"Example
65
+ conent","editable":true,"created_at":"2016-04-19T13:53:13Z","updated_at":"2016-04-19T13:53:13Z"}],"meta":{}}'
66
+ http_version:
67
+ recorded_at: Tue, 19 Apr 2016 13:53:13 GMT
68
+ recorded_with: VCR 3.0.1
@@ -0,0 +1,68 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: http://bookingsync.dev/api/v3/booking_comments
6
+ body:
7
+ encoding: UTF-8
8
+ string: '{"booking_id":1,"booking_comments":[{"content":"Example conent"}]}'
9
+ headers:
10
+ User-Agent:
11
+ - BookingSync API gem v0.0.35
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
+ response:
21
+ status:
22
+ code: 201
23
+ message: Created
24
+ headers:
25
+ X-Frame-Options:
26
+ - SAMEORIGIN
27
+ X-Xss-Protection:
28
+ - 1; mode=block
29
+ X-Content-Type-Options:
30
+ - nosniff
31
+ X-Ratelimit-Limit:
32
+ - '1000'
33
+ X-Ratelimit-Reset:
34
+ - '1461074400'
35
+ X-Ratelimit-Remaining:
36
+ - '984'
37
+ Location:
38
+ - http://bookingsync.dev/api/v3/booking_comments/14
39
+ Content-Type:
40
+ - application/vnd.api+json; charset=utf-8
41
+ Etag:
42
+ - '"edb232ad4b3b70600d8eb833e5224653"'
43
+ Cache-Control:
44
+ - max-age=0, private, must-revalidate
45
+ P3p:
46
+ - CP="OTI DSP COR CUR ADMo DEVo TAI PSAi PSDi IVAi IVDi CONi HISi TELi OTPi
47
+ OUR SAMi OTRo UNRo PUBi IND UNI STA"
48
+ Set-Cookie:
49
+ - ahoy_track=true; path=/
50
+ - ahoy_visit=e228e349-faa3-4a1f-bd6a-676c34f31321; path=/; expires=Tue, 26 Apr
51
+ 2016 13:53:13 -0000
52
+ - ahoy_visitor=e72a12e0-df0a-469a-9989-e569f8385c8d; path=/; expires=Thu, 19
53
+ Apr 2018 13:53:13 -0000
54
+ X-Request-Id:
55
+ - 7bebccb7-e580-4324-9e47-3dc7baeb1424
56
+ X-Runtime:
57
+ - '0.075471'
58
+ Date:
59
+ - Tue, 19 Apr 2016 13:53:13 GMT
60
+ Connection:
61
+ - close
62
+ body:
63
+ encoding: UTF-8
64
+ string: '{"links":{"booking_comments.booking":"http://bookingsync.dev/api/v3/bookings/{booking_comments.booking}"},"booking_comments":[{"links":{"booking":1},"id":14,"content":"Example
65
+ conent","editable":true,"created_at":"2016-04-19T13:53:13Z","updated_at":"2016-04-19T13:53:13Z"}],"meta":{}}'
66
+ http_version:
67
+ recorded_at: Tue, 19 Apr 2016 13:53:13 GMT
68
+ recorded_with: VCR 3.0.1
@@ -0,0 +1,61 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: delete
5
+ uri: http://bookingsync.dev/api/v3/booking_comments/10
6
+ body:
7
+ encoding: UTF-8
8
+ string: "{}"
9
+ headers:
10
+ User-Agent:
11
+ - BookingSync API gem v0.0.35
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
+ response:
21
+ status:
22
+ code: 204
23
+ message: No Content
24
+ headers:
25
+ X-Frame-Options:
26
+ - SAMEORIGIN
27
+ X-Xss-Protection:
28
+ - 1; mode=block
29
+ X-Content-Type-Options:
30
+ - nosniff
31
+ X-Ratelimit-Limit:
32
+ - '1000'
33
+ X-Ratelimit-Reset:
34
+ - '1461074400'
35
+ X-Ratelimit-Remaining:
36
+ - '981'
37
+ Cache-Control:
38
+ - no-cache
39
+ P3p:
40
+ - CP="OTI DSP COR CUR ADMo DEVo TAI PSAi PSDi IVAi IVDi CONi HISi TELi OTPi
41
+ OUR SAMi OTRo UNRo PUBi IND UNI STA"
42
+ Set-Cookie:
43
+ - ahoy_track=true; path=/
44
+ - ahoy_visit=e467b64d-1077-4739-8c3f-d097b4dd59dd; path=/; expires=Tue, 26 Apr
45
+ 2016 13:53:13 -0000
46
+ - ahoy_visitor=d72224cd-b856-42de-9e07-c8dd8e77d50d; path=/; expires=Thu, 19
47
+ Apr 2018 13:53:13 -0000
48
+ X-Request-Id:
49
+ - 70310294-19fe-4f2f-abf7-78158f72d2fb
50
+ X-Runtime:
51
+ - '0.074822'
52
+ Date:
53
+ - Tue, 19 Apr 2016 13:53:13 GMT
54
+ Connection:
55
+ - close
56
+ body:
57
+ encoding: UTF-8
58
+ string: ''
59
+ http_version:
60
+ recorded_at: Tue, 19 Apr 2016 13:53:13 GMT
61
+ recorded_with: VCR 3.0.1
@@ -0,0 +1,66 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: put
5
+ uri: http://bookingsync.dev/api/v3/booking_comments/9
6
+ body:
7
+ encoding: UTF-8
8
+ string: '{"booking_comments":[{"content":"Updated content"}]}'
9
+ headers:
10
+ User-Agent:
11
+ - BookingSync API gem v0.0.35
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
+ response:
21
+ status:
22
+ code: 200
23
+ message: OK
24
+ headers:
25
+ X-Frame-Options:
26
+ - SAMEORIGIN
27
+ X-Xss-Protection:
28
+ - 1; mode=block
29
+ X-Content-Type-Options:
30
+ - nosniff
31
+ X-Ratelimit-Limit:
32
+ - '1000'
33
+ X-Ratelimit-Reset:
34
+ - '1461074400'
35
+ X-Ratelimit-Remaining:
36
+ - '982'
37
+ Content-Type:
38
+ - application/vnd.api+json; charset=utf-8
39
+ Etag:
40
+ - '"613bddb49fc447319c814e9b838fb24c"'
41
+ Cache-Control:
42
+ - max-age=0, private, must-revalidate
43
+ P3p:
44
+ - CP="OTI DSP COR CUR ADMo DEVo TAI PSAi PSDi IVAi IVDi CONi HISi TELi OTPi
45
+ OUR SAMi OTRo UNRo PUBi IND UNI STA"
46
+ Set-Cookie:
47
+ - ahoy_track=true; path=/
48
+ - ahoy_visit=8431e959-d6cd-4032-92bf-8991e5200a66; path=/; expires=Tue, 26 Apr
49
+ 2016 13:53:13 -0000
50
+ - ahoy_visitor=0d86cac3-9996-4442-80b3-c491cb7c6d1c; path=/; expires=Thu, 19
51
+ Apr 2018 13:53:13 -0000
52
+ X-Request-Id:
53
+ - 89b7e784-2c36-4fb4-a0fc-e43076005940
54
+ X-Runtime:
55
+ - '0.073797'
56
+ Date:
57
+ - Tue, 19 Apr 2016 13:53:13 GMT
58
+ Connection:
59
+ - close
60
+ body:
61
+ encoding: UTF-8
62
+ string: '{"links":{"booking_comments.booking":"http://bookingsync.dev/api/v3/bookings/{booking_comments.booking}"},"booking_comments":[{"links":{"booking":1},"id":9,"content":"Updated
63
+ content","editable":true,"created_at":"2016-04-19T12:47:00Z","updated_at":"2016-04-19T12:56:41Z"}],"meta":{}}'
64
+ http_version:
65
+ recorded_at: Tue, 19 Apr 2016 13:53:13 GMT
66
+ recorded_with: VCR 3.0.1
@@ -0,0 +1,66 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: put
5
+ uri: http://bookingsync.dev/api/v3/booking_comments/9
6
+ body:
7
+ encoding: UTF-8
8
+ string: '{"booking_comments":[{"content":"Updated content"}]}'
9
+ headers:
10
+ User-Agent:
11
+ - BookingSync API gem v0.0.35
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
+ response:
21
+ status:
22
+ code: 200
23
+ message: OK
24
+ headers:
25
+ X-Frame-Options:
26
+ - SAMEORIGIN
27
+ X-Xss-Protection:
28
+ - 1; mode=block
29
+ X-Content-Type-Options:
30
+ - nosniff
31
+ X-Ratelimit-Limit:
32
+ - '1000'
33
+ X-Ratelimit-Reset:
34
+ - '1461074400'
35
+ X-Ratelimit-Remaining:
36
+ - '983'
37
+ Content-Type:
38
+ - application/vnd.api+json; charset=utf-8
39
+ Etag:
40
+ - '"613bddb49fc447319c814e9b838fb24c"'
41
+ Cache-Control:
42
+ - max-age=0, private, must-revalidate
43
+ P3p:
44
+ - CP="OTI DSP COR CUR ADMo DEVo TAI PSAi PSDi IVAi IVDi CONi HISi TELi OTPi
45
+ OUR SAMi OTRo UNRo PUBi IND UNI STA"
46
+ Set-Cookie:
47
+ - ahoy_track=true; path=/
48
+ - ahoy_visit=eb09b08b-70b7-4d7b-bcbc-ad10292c02e1; path=/; expires=Tue, 26 Apr
49
+ 2016 13:53:13 -0000
50
+ - ahoy_visitor=eecbb08e-a1e4-404b-bcc1-8344939fa2c1; path=/; expires=Thu, 19
51
+ Apr 2018 13:53:13 -0000
52
+ X-Request-Id:
53
+ - 6107351e-1f00-4147-bc94-fc5ae5075f00
54
+ X-Runtime:
55
+ - '0.072631'
56
+ Date:
57
+ - Tue, 19 Apr 2016 13:53:13 GMT
58
+ Connection:
59
+ - close
60
+ body:
61
+ encoding: UTF-8
62
+ string: '{"links":{"booking_comments.booking":"http://bookingsync.dev/api/v3/bookings/{booking_comments.booking}"},"booking_comments":[{"links":{"booking":1},"id":9,"content":"Updated
63
+ content","editable":true,"created_at":"2016-04-19T12:47:00Z","updated_at":"2016-04-19T12:56:41Z"}],"meta":{}}'
64
+ http_version:
65
+ recorded_at: Tue, 19 Apr 2016 13:53:13 GMT
66
+ recorded_with: VCR 3.0.1
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bookingsync-api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.35
4
+ version: 0.0.36
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sébastien Grosjean
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-02-25 00:00:00.000000000 Z
11
+ date: 2016-04-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -105,6 +105,7 @@ files:
105
105
  - lib/bookingsync/api/client/availabilities.rb
106
106
  - lib/bookingsync/api/client/bathrooms.rb
107
107
  - lib/bookingsync/api/client/bedrooms.rb
108
+ - lib/bookingsync/api/client/booking_comments.rb
108
109
  - lib/bookingsync/api/client/bookings.rb
109
110
  - lib/bookingsync/api/client/bookings_fees.rb
110
111
  - lib/bookingsync/api/client/bookings_payments.rb
@@ -145,6 +146,7 @@ files:
145
146
  - spec/bookingsync/api/client/availabilities_spec.rb
146
147
  - spec/bookingsync/api/client/bathrooms_spec.rb
147
148
  - spec/bookingsync/api/client/bedrooms_spec.rb
149
+ - spec/bookingsync/api/client/booking_comments_spec.rb
148
150
  - spec/bookingsync/api/client/bookings_fees_spec.rb
149
151
  - spec/bookingsync/api/client/bookings_payments_spec.rb
150
152
  - spec/bookingsync/api/client/bookings_spec.rb
@@ -195,6 +197,13 @@ files:
195
197
  - spec/fixtures/cassettes/BookingSync_API_Client_Bedrooms/_cancel_bedroom/cancels_given_bedroom.yml
196
198
  - spec/fixtures/cassettes/BookingSync_API_Client_Bedrooms/_create_bedroom/creates_a_new_bedroom.yml
197
199
  - spec/fixtures/cassettes/BookingSync_API_Client_Bedrooms/_edit_bedroom/updates_given_bedroom_by_ID.yml
200
+ - spec/fixtures/cassettes/BookingSync_API_Client_BookingComments/_booking_comment/returns_single_booking_comment.yml
201
+ - spec/fixtures/cassettes/BookingSync_API_Client_BookingComments/_booking_comments/returns_booking_comments.yml
202
+ - spec/fixtures/cassettes/BookingSync_API_Client_BookingComments/_create_booking_comment/creates_booking_comment.yml
203
+ - spec/fixtures/cassettes/BookingSync_API_Client_BookingComments/_create_booking_comment/returns_newly_created_booking_comment.yml
204
+ - spec/fixtures/cassettes/BookingSync_API_Client_BookingComments/_delete_booking_comment/deletes_given_booking_comment.yml
205
+ - spec/fixtures/cassettes/BookingSync_API_Client_BookingComments/_edit_booking_comment/returns_updated_booking_comment.yml
206
+ - spec/fixtures/cassettes/BookingSync_API_Client_BookingComments/_edit_booking_comment/updates_booking_comment.yml
198
207
  - spec/fixtures/cassettes/BookingSync_API_Client_Bookings/_booking/returns_a_single_booking.yml
199
208
  - spec/fixtures/cassettes/BookingSync_API_Client_Bookings/_booking/returns_a_single_canceled_booking.yml
200
209
  - spec/fixtures/cassettes/BookingSync_API_Client_Bookings/_bookings/pagination/with_a_block/yields_block_with_batch_of_bookings.yml
@@ -330,7 +339,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
330
339
  version: '0'
331
340
  requirements: []
332
341
  rubyforge_project:
333
- rubygems_version: 2.4.8
342
+ rubygems_version: 2.4.5.1
334
343
  signing_key:
335
344
  specification_version: 4
336
345
  summary: Ruby interface for accessing https://www.bookingsync.com
@@ -340,6 +349,7 @@ test_files:
340
349
  - spec/bookingsync/api/client/availabilities_spec.rb
341
350
  - spec/bookingsync/api/client/bathrooms_spec.rb
342
351
  - spec/bookingsync/api/client/bedrooms_spec.rb
352
+ - spec/bookingsync/api/client/booking_comments_spec.rb
343
353
  - spec/bookingsync/api/client/bookings_fees_spec.rb
344
354
  - spec/bookingsync/api/client/bookings_payments_spec.rb
345
355
  - spec/bookingsync/api/client/bookings_spec.rb
@@ -390,6 +400,13 @@ test_files:
390
400
  - spec/fixtures/cassettes/BookingSync_API_Client_Bedrooms/_cancel_bedroom/cancels_given_bedroom.yml
391
401
  - spec/fixtures/cassettes/BookingSync_API_Client_Bedrooms/_create_bedroom/creates_a_new_bedroom.yml
392
402
  - spec/fixtures/cassettes/BookingSync_API_Client_Bedrooms/_edit_bedroom/updates_given_bedroom_by_ID.yml
403
+ - spec/fixtures/cassettes/BookingSync_API_Client_BookingComments/_booking_comment/returns_single_booking_comment.yml
404
+ - spec/fixtures/cassettes/BookingSync_API_Client_BookingComments/_booking_comments/returns_booking_comments.yml
405
+ - spec/fixtures/cassettes/BookingSync_API_Client_BookingComments/_create_booking_comment/creates_booking_comment.yml
406
+ - spec/fixtures/cassettes/BookingSync_API_Client_BookingComments/_create_booking_comment/returns_newly_created_booking_comment.yml
407
+ - spec/fixtures/cassettes/BookingSync_API_Client_BookingComments/_delete_booking_comment/deletes_given_booking_comment.yml
408
+ - spec/fixtures/cassettes/BookingSync_API_Client_BookingComments/_edit_booking_comment/returns_updated_booking_comment.yml
409
+ - spec/fixtures/cassettes/BookingSync_API_Client_BookingComments/_edit_booking_comment/updates_booking_comment.yml
393
410
  - spec/fixtures/cassettes/BookingSync_API_Client_Bookings/_booking/returns_a_single_booking.yml
394
411
  - spec/fixtures/cassettes/BookingSync_API_Client_Bookings/_booking/returns_a_single_canceled_booking.yml
395
412
  - spec/fixtures/cassettes/BookingSync_API_Client_Bookings/_bookings/pagination/with_a_block/yields_block_with_batch_of_bookings.yml