bookingsync-api 0.0.29 → 0.0.30

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 (93) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +4 -1
  3. data/README.md +44 -18
  4. data/lib/bookingsync/api/client.rb +0 -2
  5. data/lib/bookingsync/api/client/accounts.rb +11 -0
  6. data/lib/bookingsync/api/client/bathrooms.rb +11 -0
  7. data/lib/bookingsync/api/client/bedrooms.rb +11 -0
  8. data/lib/bookingsync/api/client/bookings_fees.rb +11 -0
  9. data/lib/bookingsync/api/client/bookings_payments.rb +11 -0
  10. data/lib/bookingsync/api/client/bookings_taxes.rb +11 -0
  11. data/lib/bookingsync/api/client/clients.rb +11 -0
  12. data/lib/bookingsync/api/client/destinations.rb +11 -0
  13. data/lib/bookingsync/api/client/fees.rb +11 -0
  14. data/lib/bookingsync/api/client/inquiries.rb +11 -0
  15. data/lib/bookingsync/api/client/payments.rb +11 -0
  16. data/lib/bookingsync/api/client/periods.rb +11 -0
  17. data/lib/bookingsync/api/client/photos.rb +11 -0
  18. data/lib/bookingsync/api/client/rates.rb +11 -0
  19. data/lib/bookingsync/api/client/rates_rules.rb +44 -0
  20. data/lib/bookingsync/api/client/rates_tables.rb +11 -0
  21. data/lib/bookingsync/api/client/rental_agreements.rb +11 -0
  22. data/lib/bookingsync/api/client/rentals_amenities.rb +23 -0
  23. data/lib/bookingsync/api/client/rentals_fees.rb +11 -0
  24. data/lib/bookingsync/api/client/reviews.rb +11 -0
  25. data/lib/bookingsync/api/client/seasons.rb +11 -0
  26. data/lib/bookingsync/api/client/sources.rb +11 -0
  27. data/lib/bookingsync/api/client/special_offers.rb +11 -0
  28. data/lib/bookingsync/api/client/taxes.rb +11 -0
  29. data/lib/bookingsync/api/version.rb +1 -1
  30. data/spec/bookingsync/api/client/accounts_spec.rb +7 -0
  31. data/spec/bookingsync/api/client/bathrooms_spec.rb +7 -0
  32. data/spec/bookingsync/api/client/bedrooms_spec.rb +7 -0
  33. data/spec/bookingsync/api/client/bookings_fees_spec.rb +9 -2
  34. data/spec/bookingsync/api/client/{billings_payments_spec.rb → bookings_payments_spec.rb} +7 -0
  35. data/spec/bookingsync/api/client/bookings_taxes_spec.rb +9 -2
  36. data/spec/bookingsync/api/client/clients_spec.rb +16 -13
  37. data/spec/bookingsync/api/client/destinations_spec.rb +7 -0
  38. data/spec/bookingsync/api/client/fees_spec.rb +9 -2
  39. data/spec/bookingsync/api/client/inquiries_spec.rb +7 -0
  40. data/spec/bookingsync/api/client/payments_spec.rb +7 -0
  41. data/spec/bookingsync/api/client/periods_spec.rb +7 -0
  42. data/spec/bookingsync/api/client/photos_spec.rb +7 -0
  43. data/spec/bookingsync/api/client/rates_rules_spec.rb +59 -0
  44. data/spec/bookingsync/api/client/rates_spec.rb +7 -0
  45. data/spec/bookingsync/api/client/rates_tables_spec.rb +7 -0
  46. data/spec/bookingsync/api/client/rental_agreements_spec.rb +7 -0
  47. data/spec/bookingsync/api/client/rentals_amenities_spec.rb +36 -8
  48. data/spec/bookingsync/api/client/rentals_fees_spec.rb +9 -2
  49. data/spec/bookingsync/api/client/reviews_spec.rb +7 -0
  50. data/spec/bookingsync/api/client/seasons_spec.rb +7 -0
  51. data/spec/bookingsync/api/client/sources_spec.rb +7 -0
  52. data/spec/bookingsync/api/client/special_offers_spec.rb +7 -0
  53. data/spec/bookingsync/api/client/taxes_spec.rb +9 -2
  54. data/spec/fixtures/cassettes/BookingSync_API_Client_Accounts/_account/returns_a_single_account.yml +80 -0
  55. data/spec/fixtures/cassettes/BookingSync_API_Client_Bathrooms/_bathroom/returns_a_single_bathroom.yml +81 -0
  56. data/spec/fixtures/cassettes/BookingSync_API_Client_Bedrooms/_bedroom/returns_a_single_bedroom.yml +81 -0
  57. data/spec/fixtures/cassettes/BookingSync_API_Client_BookingsFees/_bookings_fee/returns_a_single_bookings_fee.yml +81 -0
  58. data/spec/fixtures/cassettes/BookingSync_API_Client_BookingsPayments/_bookings_payment/returns_a_single_bookings_payment.yml +80 -0
  59. data/spec/fixtures/cassettes/BookingSync_API_Client_BookingsTaxes/_bookings_tax/returns_a_single_bookings_tax.yml +81 -0
  60. data/spec/fixtures/cassettes/BookingSync_API_Client_Clients/_client/returns_a_single_client.yml +81 -0
  61. data/spec/fixtures/cassettes/BookingSync_API_Client_Clients/_clients/returns_clients.yml +87 -0
  62. data/spec/fixtures/cassettes/BookingSync_API_Client_Clients/_create_client/creates_a_new_client.yml +76 -0
  63. data/spec/fixtures/cassettes/BookingSync_API_Client_Clients/_edit_client/updates_given_client_by_ID.yml +74 -0
  64. data/spec/fixtures/cassettes/BookingSync_API_Client_Destinations/_destination/returns_a_single_destination.yml +83 -0
  65. data/spec/fixtures/cassettes/BookingSync_API_Client_Fees/_fee/returns_a_single_fee.yml +81 -0
  66. data/spec/fixtures/cassettes/BookingSync_API_Client_Inquiries/_inquiry/returns_a_single_inquiry.yml +80 -0
  67. data/spec/fixtures/cassettes/BookingSync_API_Client_Payments/_payment/returns_a_single_payment.yml +80 -0
  68. data/spec/fixtures/cassettes/BookingSync_API_Client_Periods/_period/returns_a_single_period.yml +80 -0
  69. data/spec/fixtures/cassettes/BookingSync_API_Client_Photos/_photo/returns_a_single_photo.yml +80 -0
  70. data/spec/fixtures/cassettes/BookingSync_API_Client_Rates/_rate/returns_a_single_rate.yml +80 -0
  71. data/spec/fixtures/cassettes/BookingSync_API_Client_RatesRules/_create_rates_rule/creates_a_new_rates_rule.yml +75 -0
  72. data/spec/fixtures/cassettes/BookingSync_API_Client_RatesRules/_delete_rates_rule/deletes_given_rates_rule.yml +67 -0
  73. data/spec/fixtures/cassettes/BookingSync_API_Client_RatesRules/_edit_rates_rule/updates_given_rates_rule_by_ID.yml +73 -0
  74. data/spec/fixtures/cassettes/BookingSync_API_Client_RatesRules/_rates_rule/returns_a_single_rates_rule.yml +80 -0
  75. data/spec/fixtures/cassettes/BookingSync_API_Client_RatesRules/_rates_rules/returns_rates_rules.yml +38 -22
  76. data/spec/fixtures/cassettes/BookingSync_API_Client_RatesTables/_rates_table/returns_a_single_rates_table.yml +80 -0
  77. data/spec/fixtures/cassettes/BookingSync_API_Client_RentalAgreements/_rental_agreement/returns_a_single_rental_agreement.yml +80 -0
  78. data/spec/fixtures/cassettes/BookingSync_API_Client_RentalsAmenities/_create_rentals_amenity/{creates_a_new_rental_s_amenity.yml → creates_a_new_rentals_amenity.yml} +31 -23
  79. data/spec/fixtures/cassettes/BookingSync_API_Client_RentalsAmenities/_delete_rentals_amenity/deletes_given_rentals_amenity.yml +67 -0
  80. data/spec/fixtures/cassettes/BookingSync_API_Client_RentalsAmenities/{_create_rentals_amenity/returns_newly_created_rental_s_amenity.yml → _edit_rentals_amenity/updates_given_rentals_amenity_by_ID.yml} +34 -27
  81. data/spec/fixtures/cassettes/BookingSync_API_Client_RentalsFees/_rentals_fee/returns_a_single_rentals_fee.yml +81 -0
  82. data/spec/fixtures/cassettes/BookingSync_API_Client_Reviews/_review/returns_a_single_review.yml +81 -0
  83. data/spec/fixtures/cassettes/BookingSync_API_Client_Seasons/_season/returns_a_single_season.yml +81 -0
  84. data/spec/fixtures/cassettes/BookingSync_API_Client_Sources/_source/returns_a_single_source.yml +80 -0
  85. data/spec/fixtures/cassettes/BookingSync_API_Client_SpecialOffers/_special_offer/returns_a_single_special_offer.yml +81 -0
  86. data/spec/fixtures/cassettes/BookingSync_API_Client_Taxes/_tax/returns_a_single_tax.yml +81 -0
  87. metadata +68 -19
  88. data/lib/bookingsync/api/client/billing_addresses.rb +0 -22
  89. data/spec/bookingsync/api/client/billing_addresses_spec.rb +0 -12
  90. data/spec/fixtures/cassettes/BookingSync_API_Client_BillingAddresses/_billing_addresses/returns_billing_addresses.yml +0 -65
  91. data/spec/fixtures/cassettes/BookingSync_API_Client_Bookings/_clients/returns_clients.yml +0 -66
  92. data/spec/fixtures/cassettes/BookingSync_API_Client_Bookings/_create_client/creates_a_new_client.yml +0 -64
  93. data/spec/fixtures/cassettes/BookingSync_API_Client_Bookings/_edit_client/updates_given_client_by_ID.yml +0 -62
@@ -10,4 +10,63 @@ describe BookingSync::API::Client::RatesRules do
10
10
  assert_requested :get, bs_url("rates_rules")
11
11
  end
12
12
  end
13
+
14
+ describe ".rates_rule", :vcr do
15
+ it "returns a single rates_rule" do
16
+ rates_rule = client.rates_rule(252)
17
+ expect(rates_rule.id).to eq 252
18
+ end
19
+ end
20
+
21
+ describe ".create_rates_rule", :vcr do
22
+ let(:attributes) do
23
+ {
24
+ start_date: "2013-04-10",
25
+ end_date: "2013-04-22",
26
+ kind: "stay_at_least",
27
+ percentage: 10,
28
+ variables: { length: 1, unit: "days" }
29
+ }
30
+ end
31
+ let(:rates_table) { BookingSync::API::Resource.new(client, id: 274) }
32
+
33
+ it "creates a new rates_rule" do
34
+ client.create_rates_rule(rates_table, attributes)
35
+ assert_requested :post, bs_url("rates_tables/274/rates_rules"),
36
+ body: { rates_rules: [attributes] }.to_json
37
+ end
38
+
39
+ it "returns newly created rates_rule" do
40
+ VCR.use_cassette('BookingSync_API_Client_RatesRules/_create_rates_rule/creates_a_new_rates_rule') do
41
+ rates_rule = client.create_rates_rule(rates_table, attributes)
42
+ expect(rates_rule.start_date).to eql(Time.parse(attributes[:start_date]))
43
+ expect(rates_rule.end_date).to eql(Time.parse(attributes[:end_date]))
44
+ end
45
+ end
46
+ end
47
+
48
+ describe ".edit_rates_rule", :vcr do
49
+ let(:attributes) { { end_date: '2014-07-15' } }
50
+
51
+ it "updates given rates_rule by ID" do
52
+ client.edit_rates_rule(252, attributes)
53
+ assert_requested :put, bs_url("rates_rules/252"),
54
+ body: { rates_rules: [attributes] }.to_json
55
+ end
56
+
57
+ it "returns updated rates_rule" do
58
+ VCR.use_cassette('BookingSync_API_Client_RatesRules/_edit_rates_rule/updates_given_rates_rule_by_ID') do
59
+ rates_rule = client.edit_rates_rule(252, attributes)
60
+ expect(rates_rule).to be_kind_of(BookingSync::API::Resource)
61
+ expect(rates_rule.end_date).to eq(Time.parse(attributes[:end_date]))
62
+ end
63
+ end
64
+ end
65
+
66
+ describe ".delete_rates_rule", :vcr do
67
+ it "deletes given rates_rule" do
68
+ client.delete_rates_rule(250)
69
+ assert_requested :delete, bs_url("rates_rules/250")
70
+ end
71
+ end
13
72
  end
@@ -9,4 +9,11 @@ describe BookingSync::API::Client::Rates do
9
9
  assert_requested :get, bs_url("rates")
10
10
  end
11
11
  end
12
+
13
+ describe ".rate", :vcr do
14
+ it "returns a single rate" do
15
+ rate = client.rate(18577)
16
+ expect(rate.id).to eq 18577
17
+ end
18
+ end
12
19
  end
@@ -11,6 +11,13 @@ describe BookingSync::API::Client::RatesTables do
11
11
  end
12
12
  end
13
13
 
14
+ describe ".rates_table", :vcr do
15
+ it "returns a single rates_table" do
16
+ rates_table = client.rates_table(274)
17
+ expect(rates_table.id).to eq 274
18
+ end
19
+ end
20
+
14
21
  describe ".create_rates_table", :vcr do
15
22
  let(:attributes) {
16
23
  { name: 'New rate table' }
@@ -13,6 +13,13 @@ describe BookingSync::API::Client::RentalAgreements do
13
13
  end
14
14
  end
15
15
 
16
+ describe ".rental_agreement", :vcr do
17
+ it "returns a single rental_agreement" do
18
+ rental_agreement = client.rental_agreement(6905)
19
+ expect(rental_agreement.id).to eq 6905
20
+ end
21
+ end
22
+
16
23
  describe ".create_rental_agreement", :vcr do
17
24
  it "creates a new rental agreement" do
18
25
  client.create_rental_agreement(attributes)
@@ -30,17 +30,45 @@ describe BookingSync::API::Client::RentalsAmenities do
30
30
  end
31
31
 
32
32
  describe ".create_rentals_amenity", :vcr do
33
- let(:rental) { BookingSync::API::Resource.new(client, id: 38) }
33
+ let(:attributes) { { amenity_id: 44, details_en: "Details" } }
34
+ let(:rental) { BookingSync::API::Resource.new(client, id: 5116) }
34
35
 
35
- it "creates a new rental's amenity" do
36
- client.create_rentals_amenity(rental, { amenity_id: 50 })
37
- assert_requested :post, bs_url("rentals/38/rentals_amenities"),
38
- body: { rentals_amenities: [{ amenity_id: 50 }] }.to_json
36
+ it "creates a new rentals_amenity" do
37
+ client.create_rentals_amenity(rental, attributes)
38
+ assert_requested :post, bs_url("rentals/5116/rentals_amenities"),
39
+ body: { rentals_amenities: [attributes] }.to_json
39
40
  end
40
41
 
41
- it "returns newly created rental's amenity" do
42
- rentals_amenity = client.create_rentals_amenity(rental, { amenity_id: 51 })
43
- expect(rentals_amenity.links.amenity).to eql 51
42
+ it "returns newly created rentals_amenity" do
43
+ VCR.use_cassette('BookingSync_API_Client_RentalsAmenities/_create_rentals_amenity/creates_a_new_rentals_amenity') do
44
+ rentals_amenity = client.create_rentals_amenity(rental, attributes)
45
+ expect(rentals_amenity.details).to eq({ en: "Details" })
46
+ end
47
+ end
48
+ end
49
+
50
+ describe ".edit_rentals_amenity", :vcr do
51
+ let(:attributes) { { details_en: "New Details" } }
52
+
53
+ it "updates given rentals_amenity by ID" do
54
+ client.edit_rentals_amenity(6159, attributes)
55
+ assert_requested :put, bs_url("rentals_amenities/6159"),
56
+ body: { rentals_amenities: [attributes] }.to_json
57
+ end
58
+
59
+ it "returns updated rentals_amenity" do
60
+ VCR.use_cassette('BookingSync_API_Client_RentalsAmenities/_edit_rentals_amenity/updates_given_rentals_amenity_by_ID') do
61
+ rentals_amenity = client.edit_rentals_amenity(6159, attributes)
62
+ expect(rentals_amenity).to be_kind_of(BookingSync::API::Resource)
63
+ expect(rentals_amenity.details).to eq({ en: "New Details" })
64
+ end
65
+ end
66
+ end
67
+
68
+ describe ".delete_rentals_amenity", :vcr do
69
+ it "deletes given rentals_amenity" do
70
+ client.delete_rentals_amenity(32833)
71
+ assert_requested :delete, bs_url("rentals_amenities/32833")
44
72
  end
45
73
  end
46
74
  end
@@ -1,12 +1,19 @@
1
1
  require "spec_helper"
2
2
 
3
3
  describe BookingSync::API::Client::RentalsFees do
4
- let(:api) { BookingSync::API::Client.new(test_access_token) }
4
+ let(:client) { BookingSync::API::Client.new(test_access_token) }
5
5
 
6
6
  describe ".rentals_fees", :vcr do
7
7
  it "returns rentals fees" do
8
- expect(api.rentals_fees).not_to be_empty
8
+ expect(client.rentals_fees).not_to be_empty
9
9
  assert_requested :get, bs_url("rentals_fees")
10
10
  end
11
11
  end
12
+
13
+ describe ".rentals_fee", :vcr do
14
+ it "returns a single rentals_fee" do
15
+ rentals_fee = client.rentals_fee(3306)
16
+ expect(rentals_fee.id).to eq 3306
17
+ end
18
+ end
12
19
  end
@@ -10,6 +10,13 @@ describe BookingSync::API::Client::Reviews do
10
10
  end
11
11
  end
12
12
 
13
+ describe ".review", :vcr do
14
+ it "returns a single review" do
15
+ review = client.review(34562)
16
+ expect(review.id).to eq 34562
17
+ end
18
+ end
19
+
13
20
  describe ".create_review", :vcr do
14
21
  let(:attributes) {{
15
22
  comment: "Awesome place",
@@ -11,6 +11,13 @@ describe BookingSync::API::Client::Seasons do
11
11
  end
12
12
  end
13
13
 
14
+ describe ".season", :vcr do
15
+ it "returns a single season" do
16
+ season = client.season(1803)
17
+ expect(season.id).to eq 1803
18
+ end
19
+ end
20
+
14
21
  describe ".create_season", :vcr do
15
22
  let(:attributes) {{
16
23
  name: "New season",
@@ -11,6 +11,13 @@ describe BookingSync::API::Client::Sources do
11
11
  end
12
12
  end
13
13
 
14
+ describe ".source", :vcr do
15
+ it "returns a single source" do
16
+ source = client.source(1874)
17
+ expect(source.id).to eq 1874
18
+ end
19
+ end
20
+
14
21
  describe ".create_source", :vcr do
15
22
  let(:attributes) {
16
23
  { name: 'New source' }
@@ -10,6 +10,13 @@ describe BookingSync::API::Client::SpecialOffers do
10
10
  end
11
11
  end
12
12
 
13
+ describe ".special_offer", :vcr do
14
+ it "returns a single special_offer" do
15
+ special_offer = client.special_offer(86)
16
+ expect(special_offer.id).to eq 86
17
+ end
18
+ end
19
+
13
20
  describe ".create_special_offer", :vcr do
14
21
  let(:attributes) {
15
22
  {
@@ -1,12 +1,19 @@
1
1
  require "spec_helper"
2
2
 
3
3
  describe BookingSync::API::Client::Taxes do
4
- let(:api) { BookingSync::API::Client.new(test_access_token) }
4
+ let(:client) { BookingSync::API::Client.new(test_access_token) }
5
5
 
6
6
  describe ".taxes", :vcr do
7
7
  it "returns taxes" do
8
- expect(api.taxes).not_to be_empty
8
+ expect(client.taxes).not_to be_empty
9
9
  assert_requested :get, bs_url("taxes")
10
10
  end
11
11
  end
12
+
13
+ describe ".tax", :vcr do
14
+ it "returns a single tax" do
15
+ tax = client.tax(168)
16
+ expect(tax.id).to eq 168
17
+ end
18
+ end
12
19
  end
@@ -0,0 +1,80 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://www.bookingsync.com/api/v3/accounts/3837
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ User-Agent:
11
+ - BookingSync API gem v0.0.29
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
+ Server:
26
+ - nginx
27
+ Date:
28
+ - Wed, 09 Sep 2015 19:37:08 GMT
29
+ Content-Type:
30
+ - application/vnd.api+json; charset=utf-8
31
+ Transfer-Encoding:
32
+ - chunked
33
+ Connection:
34
+ - keep-alive
35
+ Status:
36
+ - 200 OK
37
+ Strict-Transport-Security:
38
+ - max-age=31536000
39
+ X-Frame-Options:
40
+ - SAMEORIGIN
41
+ X-Xss-Protection:
42
+ - 1; mode=block
43
+ X-Content-Type-Options:
44
+ - nosniff
45
+ X-Ratelimit-Limit:
46
+ - '1000'
47
+ X-Ratelimit-Reset:
48
+ - '1441828800'
49
+ X-Ratelimit-Remaining:
50
+ - '997'
51
+ Link:
52
+ - <https://www.bookingsync.com/api/v3/accounts/3837?page=1>; rel="first", <https://www.bookingsync.com/api/v3/accounts/3837?page=1>;
53
+ rel="last"
54
+ X-Total-Pages:
55
+ - '1'
56
+ X-Total-Count:
57
+ - '1'
58
+ Etag:
59
+ - '"254fcb1ac913a6c215dd91c8071d681b"'
60
+ Cache-Control:
61
+ - max-age=0, private, must-revalidate
62
+ P3p:
63
+ - CP="OTI DSP COR CUR ADMo DEVo TAI PSAi PSDi IVAi IVDi CONi HISi TELi OTPi
64
+ OUR SAMi OTRo UNRo PUBi IND UNI STA"
65
+ Set-Cookie:
66
+ - ahoy_track=true; path=/; secure
67
+ - ahoy_visit=d2f4d16e-e057-4332-a34b-f9ef8b4aa4a9; path=/; expires=Wed, 16 Sep
68
+ 2015 19:37:08 -0000; secure
69
+ - ahoy_visitor=3469e00e-6a02-48a4-856d-acd2f0f706e1; path=/; expires=Sat, 09
70
+ Sep 2017 19:37:08 -0000; secure
71
+ X-Request-Id:
72
+ - db635b47-df38-434e-96df-640168bd62a0
73
+ X-Runtime:
74
+ - '0.070139'
75
+ body:
76
+ encoding: UTF-8
77
+ string: '{"accounts":[{"business_name":"BSA-Website-Test","created_at":"2014-08-08T18:20:53Z","id":3837,"updated_at":"2015-09-09T18:09:40Z","status":"trial","preferences":{"bookings":{"default_arrival_time":16,"default_departure_time":10}},"email":"dev@bookingsync.com"}],"meta":{}}'
78
+ http_version:
79
+ recorded_at: Wed, 09 Sep 2015 19:37:09 GMT
80
+ recorded_with: VCR 2.9.2
@@ -0,0 +1,81 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://www.bookingsync.com/api/v3/bathrooms/730
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ User-Agent:
11
+ - BookingSync API gem v0.0.29
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
+ Server:
26
+ - nginx
27
+ Date:
28
+ - Wed, 09 Sep 2015 19:39:19 GMT
29
+ Content-Type:
30
+ - application/vnd.api+json; charset=utf-8
31
+ Transfer-Encoding:
32
+ - chunked
33
+ Connection:
34
+ - keep-alive
35
+ Status:
36
+ - 200 OK
37
+ Strict-Transport-Security:
38
+ - max-age=31536000
39
+ X-Frame-Options:
40
+ - SAMEORIGIN
41
+ X-Xss-Protection:
42
+ - 1; mode=block
43
+ X-Content-Type-Options:
44
+ - nosniff
45
+ X-Ratelimit-Limit:
46
+ - '1000'
47
+ X-Ratelimit-Reset:
48
+ - '1441828800'
49
+ X-Ratelimit-Remaining:
50
+ - '973'
51
+ Link:
52
+ - <https://www.bookingsync.com/api/v3/bathrooms/730?page=1>; rel="first", <https://www.bookingsync.com/api/v3/bathrooms/730?page=1>;
53
+ rel="last"
54
+ X-Total-Pages:
55
+ - '1'
56
+ X-Total-Count:
57
+ - '1'
58
+ Etag:
59
+ - '"cd45064290e7c035962bb17ea56dbc21"'
60
+ Cache-Control:
61
+ - max-age=0, private, must-revalidate
62
+ P3p:
63
+ - CP="OTI DSP COR CUR ADMo DEVo TAI PSAi PSDi IVAi IVDi CONi HISi TELi OTPi
64
+ OUR SAMi OTRo UNRo PUBi IND UNI STA"
65
+ Set-Cookie:
66
+ - ahoy_track=true; path=/; secure
67
+ - ahoy_visit=cd928190-4021-4b6c-8a5f-164e393caff3; path=/; expires=Wed, 16 Sep
68
+ 2015 19:39:19 -0000; secure
69
+ - ahoy_visitor=9e1fd6c0-8830-4dd8-8cd4-40f07d2fe7cd; path=/; expires=Sat, 09
70
+ Sep 2017 19:39:19 -0000; secure
71
+ X-Request-Id:
72
+ - 241031bc-ea44-4c1d-8fbe-ccfb3c2ff66a
73
+ X-Runtime:
74
+ - '0.086251'
75
+ body:
76
+ encoding: UTF-8
77
+ string: '{"links":{"bathrooms.rental":"https://www.bookingsync.com/api/v3/rentals/{bathrooms.rental}"},"bathrooms":[{"links":{"rental":5116},"id":730,"name":{"en":"Bathroom
78
+ 2","fr":"Salle de bain 2"},"wc":false,"shower":false,"bath":false,"created_at":"2015-08-31T19:52:34Z","updated_at":"2015-08-31T19:52:34Z"}]}'
79
+ http_version:
80
+ recorded_at: Wed, 09 Sep 2015 19:39:20 GMT
81
+ recorded_with: VCR 2.9.2
@@ -0,0 +1,81 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://www.bookingsync.com/api/v3/bedrooms/945
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ User-Agent:
11
+ - BookingSync API gem v0.0.29
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
+ Server:
26
+ - nginx
27
+ Date:
28
+ - Wed, 09 Sep 2015 19:39:50 GMT
29
+ Content-Type:
30
+ - application/vnd.api+json; charset=utf-8
31
+ Transfer-Encoding:
32
+ - chunked
33
+ Connection:
34
+ - keep-alive
35
+ Status:
36
+ - 200 OK
37
+ Strict-Transport-Security:
38
+ - max-age=31536000
39
+ X-Frame-Options:
40
+ - SAMEORIGIN
41
+ X-Xss-Protection:
42
+ - 1; mode=block
43
+ X-Content-Type-Options:
44
+ - nosniff
45
+ X-Ratelimit-Limit:
46
+ - '1000'
47
+ X-Ratelimit-Reset:
48
+ - '1441828800'
49
+ X-Ratelimit-Remaining:
50
+ - '972'
51
+ Link:
52
+ - <https://www.bookingsync.com/api/v3/bedrooms/945?page=1>; rel="first", <https://www.bookingsync.com/api/v3/bedrooms/945?page=1>;
53
+ rel="last"
54
+ X-Total-Pages:
55
+ - '1'
56
+ X-Total-Count:
57
+ - '1'
58
+ Etag:
59
+ - '"5d3983bdd4a4cb7cf46515c8c0d5a260"'
60
+ Cache-Control:
61
+ - max-age=0, private, must-revalidate
62
+ P3p:
63
+ - CP="OTI DSP COR CUR ADMo DEVo TAI PSAi PSDi IVAi IVDi CONi HISi TELi OTPi
64
+ OUR SAMi OTRo UNRo PUBi IND UNI STA"
65
+ Set-Cookie:
66
+ - ahoy_track=true; path=/; secure
67
+ - ahoy_visit=1b617644-5f33-4c15-be38-07a88d3c322a; path=/; expires=Wed, 16 Sep
68
+ 2015 19:39:50 -0000; secure
69
+ - ahoy_visitor=909a0306-caa8-4ad1-9881-dbb88ce05153; path=/; expires=Sat, 09
70
+ Sep 2017 19:39:50 -0000; secure
71
+ X-Request-Id:
72
+ - 5cc70bad-f404-4550-93b8-bac83c79c2bf
73
+ X-Runtime:
74
+ - '0.076462'
75
+ body:
76
+ encoding: UTF-8
77
+ string: '{"links":{"bedrooms.rental":"https://www.bookingsync.com/api/v3/rentals/{bedrooms.rental}"},"bedrooms":[{"links":{"rental":5116},"id":945,"name":{"en":"Bedroom
78
+ 2","fr":"Chambre 2"},"bunk_beds_count":0,"double_beds_count":0,"kingsize_beds_count":0,"queensize_beds_count":0,"single_beds_count":0,"sofa_beds_count":0,"created_at":"2015-08-12T22:23:31Z","updated_at":"2015-08-12T22:23:31Z"}]}'
79
+ http_version:
80
+ recorded_at: Wed, 09 Sep 2015 19:39:51 GMT
81
+ recorded_with: VCR 2.9.2