bookingsync-api 0.1.3 → 0.1.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (202) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +6 -0
  3. data/bookingsync-api.gemspec +1 -0
  4. data/lib/bookingsync/api/client.rb +41 -24
  5. data/lib/bookingsync/api/client/payments.rb +1 -1
  6. data/lib/bookingsync/api/client/rentals.rb +2 -2
  7. data/lib/bookingsync/api/version.rb +1 -1
  8. data/spec/bookingsync/api/client/accounts_spec.rb +8 -2
  9. data/spec/bookingsync/api/client/amenities_spec.rb +8 -2
  10. data/spec/bookingsync/api/client/availabilities_spec.rb +8 -2
  11. data/spec/bookingsync/api/client/bathrooms_spec.rb +25 -12
  12. data/spec/bookingsync/api/client/bedrooms_spec.rb +24 -11
  13. data/spec/bookingsync/api/client/booking_comments_spec.rb +23 -10
  14. data/spec/bookingsync/api/client/bookings_fees_spec.rb +8 -2
  15. data/spec/bookingsync/api/client/bookings_payments_spec.rb +8 -2
  16. data/spec/bookingsync/api/client/bookings_spec.rb +36 -20
  17. data/spec/bookingsync/api/client/bookings_taxes_spec.rb +8 -2
  18. data/spec/bookingsync/api/client/change_overs_spec.rb +8 -2
  19. data/spec/bookingsync/api/client/clients_spec.rb +23 -13
  20. data/spec/bookingsync/api/client/destinations_spec.rb +8 -2
  21. data/spec/bookingsync/api/client/fees_spec.rb +8 -2
  22. data/spec/bookingsync/api/client/inquiries_spec.rb +13 -7
  23. data/spec/bookingsync/api/client/living_rooms_spec.rb +22 -9
  24. data/spec/bookingsync/api/client/nightly_rate_maps_spec.rb +15 -6
  25. data/spec/bookingsync/api/client/payment_gateways_spec.rb +8 -2
  26. data/spec/bookingsync/api/client/payments_spec.rb +34 -16
  27. data/spec/bookingsync/api/client/periods_spec.rb +29 -14
  28. data/spec/bookingsync/api/client/photos_spec.rb +23 -9
  29. data/spec/bookingsync/api/client/preferences_general_settings_spec.rb +11 -4
  30. data/spec/bookingsync/api/client/rates_rules_spec.rb +25 -12
  31. data/spec/bookingsync/api/client/rates_spec.rb +8 -2
  32. data/spec/bookingsync/api/client/rates_tables_spec.rb +23 -10
  33. data/spec/bookingsync/api/client/rental_agreements_spec.rb +18 -8
  34. data/spec/bookingsync/api/client/rental_cancelation_policies_spec.rb +8 -1
  35. data/spec/bookingsync/api/client/rental_cancelation_policy_items_spec.rb +8 -1
  36. data/spec/bookingsync/api/client/rentals_amenities_spec.rb +22 -9
  37. data/spec/bookingsync/api/client/rentals_fees_spec.rb +14 -5
  38. data/spec/bookingsync/api/client/rentals_spec.rb +53 -19
  39. data/spec/bookingsync/api/client/reviews_spec.rb +12 -6
  40. data/spec/bookingsync/api/client/seasons_spec.rb +30 -14
  41. data/spec/bookingsync/api/client/sources_spec.rb +17 -8
  42. data/spec/bookingsync/api/client/special_offers_spec.rb +30 -15
  43. data/spec/bookingsync/api/client/strict_bookings_spec.rb +10 -14
  44. data/spec/bookingsync/api/client/taxes_spec.rb +8 -2
  45. data/spec/bookingsync/api/client_spec.rb +23 -7
  46. data/spec/bookingsync/api/relation_spec.rb +1 -1
  47. data/spec/bookingsync/api/resource_spec.rb +8 -8
  48. data/spec/bookingsync/api/response_spec.rb +8 -8
  49. data/spec/fixtures/cassettes/BookingSync_API_Client_Accounts/_account/returns_a_single_account.yml +26 -18
  50. data/spec/fixtures/cassettes/BookingSync_API_Client_Accounts/_accounts/returns_accounts.yml +26 -18
  51. data/spec/fixtures/cassettes/BookingSync_API_Client_Amenities/_amenities/returns_amenities.yml +220 -26
  52. data/spec/fixtures/cassettes/BookingSync_API_Client_Amenities/_amenity/returns_amenity.yml +50 -26
  53. data/spec/fixtures/cassettes/BookingSync_API_Client_Availabilities/_availabilities/returns_availabilities.yml +37 -21
  54. data/spec/fixtures/cassettes/BookingSync_API_Client_Availabilities/_availability/returns_a_single_availability.yml +33 -25
  55. data/spec/fixtures/cassettes/BookingSync_API_Client_Bathrooms/_bathroom/returns_a_single_bathroom.yml +26 -18
  56. data/spec/fixtures/cassettes/BookingSync_API_Client_Bathrooms/_bathrooms/returns_bathrooms.yml +33 -22
  57. data/spec/fixtures/cassettes/BookingSync_API_Client_Bathrooms/_cancel_bathroom/cancels_given_bathroom.yml +21 -15
  58. data/spec/fixtures/cassettes/BookingSync_API_Client_Bathrooms/_create_bathroom/creates_a_new_bathroom.yml +30 -19
  59. data/spec/fixtures/cassettes/BookingSync_API_Client_Bathrooms/_edit_bathroom/updates_given_bathroom_by_ID.yml +26 -19
  60. data/spec/fixtures/cassettes/BookingSync_API_Client_Bedrooms/_bedroom/returns_a_single_bedroom.yml +26 -18
  61. data/spec/fixtures/cassettes/BookingSync_API_Client_Bedrooms/_bedrooms/returns_bedrooms.yml +32 -24
  62. data/spec/fixtures/cassettes/BookingSync_API_Client_Bedrooms/_cancel_bedroom/cancels_given_bedroom.yml +21 -15
  63. data/spec/fixtures/cassettes/BookingSync_API_Client_Bedrooms/_create_bedroom/creates_a_new_bedroom.yml +29 -18
  64. data/spec/fixtures/cassettes/BookingSync_API_Client_Bedrooms/_edit_bedroom/updates_given_bedroom_by_ID.yml +25 -19
  65. data/spec/fixtures/cassettes/BookingSync_API_Client_BookingComments/_booking_comment/returns_single_booking_comment.yml +42 -26
  66. data/spec/fixtures/cassettes/BookingSync_API_Client_BookingComments/_booking_comments/returns_booking_comments.yml +45 -33
  67. data/spec/fixtures/cassettes/BookingSync_API_Client_BookingComments/_create_booking_comment/creates_booking_comment.yml +43 -24
  68. data/spec/fixtures/cassettes/BookingSync_API_Client_BookingComments/_create_booking_comment/returns_newly_created_booking_comment.yml +43 -24
  69. data/spec/fixtures/cassettes/BookingSync_API_Client_BookingComments/_delete_booking_comment/deletes_given_booking_comment.yml +29 -17
  70. data/spec/fixtures/cassettes/BookingSync_API_Client_BookingComments/_edit_booking_comment/returns_updated_booking_comment.yml +36 -22
  71. data/spec/fixtures/cassettes/BookingSync_API_Client_BookingComments/_edit_booking_comment/updates_booking_comment.yml +36 -22
  72. data/spec/fixtures/cassettes/BookingSync_API_Client_Bookings/_booking/returns_a_single_booking.yml +44 -26
  73. data/spec/fixtures/cassettes/BookingSync_API_Client_Bookings/_booking/returns_a_single_canceled_booking.yml +30 -23
  74. data/spec/fixtures/cassettes/BookingSync_API_Client_Bookings/_bookings/pagination/with_a_block/yields_block_with_batch_of_bookings.yml +100 -115
  75. data/spec/fixtures/cassettes/BookingSync_API_Client_Bookings/_bookings/pagination/with_auto_paginate_true/returns_all_bookings_joined_from_many_requests.yml +100 -115
  76. data/spec/fixtures/cassettes/BookingSync_API_Client_Bookings/_bookings/pagination/with_per_page_setting/returns_limited_number_of_bookings.yml +52 -28
  77. data/spec/fixtures/cassettes/BookingSync_API_Client_Bookings/_bookings/returns_bookings.yml +57 -25
  78. data/spec/fixtures/cassettes/BookingSync_API_Client_Bookings/_cancel_booking/cancels_given_booking.yml +36 -20
  79. data/spec/fixtures/cassettes/BookingSync_API_Client_Bookings/_create_booking/creates_a_booking.yml +49 -26
  80. data/spec/fixtures/cassettes/BookingSync_API_Client_Bookings/_edit_booking/updates_given_booking_by_ID.yml +44 -24
  81. data/spec/fixtures/cassettes/BookingSync_API_Client_BookingsFees/_bookings_fee/returns_a_single_bookings_fee.yml +26 -18
  82. data/spec/fixtures/cassettes/BookingSync_API_Client_BookingsFees/_bookings_fees/returns_bookings_fees.yml +27 -19
  83. data/spec/fixtures/cassettes/BookingSync_API_Client_BookingsPayments/_bookings_payment/returns_a_single_bookings_payment.yml +26 -18
  84. data/spec/fixtures/cassettes/BookingSync_API_Client_BookingsPayments/_bookings_payments/returns_bookings_payments.yml +51 -28
  85. data/spec/fixtures/cassettes/BookingSync_API_Client_BookingsTaxes/_bookings_tax/returns_a_single_bookings_tax.yml +26 -18
  86. data/spec/fixtures/cassettes/BookingSync_API_Client_BookingsTaxes/_bookings_taxes/returns_bookings_taxes.yml +28 -20
  87. data/spec/fixtures/cassettes/BookingSync_API_Client_ChangeOvers/_change_over/returns_a_single_change_over.yml +44 -38
  88. data/spec/fixtures/cassettes/BookingSync_API_Client_ChangeOvers/_change_overs/returns_change_overs.yml +43 -37
  89. data/spec/fixtures/cassettes/BookingSync_API_Client_Clients/_client/returns_a_single_client.yml +27 -19
  90. data/spec/fixtures/cassettes/BookingSync_API_Client_Clients/_clients/returns_clients.yml +32 -26
  91. data/spec/fixtures/cassettes/BookingSync_API_Client_Clients/_create_client/creates_a_new_client.yml +30 -19
  92. data/spec/fixtures/cassettes/BookingSync_API_Client_Clients/_edit_client/updates_given_client_by_ID.yml +25 -19
  93. data/spec/fixtures/cassettes/BookingSync_API_Client_Destinations/_destination/returns_a_single_destination.yml +29 -24
  94. data/spec/fixtures/cassettes/BookingSync_API_Client_Destinations/_destinations/returns_destinations.yml +59 -25
  95. data/spec/fixtures/cassettes/BookingSync_API_Client_Fees/_create_fee/creates_a_new_fee.yml +25 -18
  96. data/spec/fixtures/cassettes/BookingSync_API_Client_Fees/_fee/returns_a_single_fee.yml +26 -18
  97. data/spec/fixtures/cassettes/BookingSync_API_Client_Fees/_fees/returns_fees.yml +31 -19
  98. data/spec/fixtures/cassettes/BookingSync_API_Client_Inquiries/_create_inquiry/creates_a_new_inquiry.yml +50 -27
  99. data/spec/fixtures/cassettes/BookingSync_API_Client_Inquiries/_inquiries/returns_inquiries.yml +50 -26
  100. data/spec/fixtures/cassettes/BookingSync_API_Client_Inquiries/_inquiry/returns_a_single_inquiry.yml +29 -21
  101. data/spec/fixtures/cassettes/BookingSync_API_Client_LivingRooms/_cancel_living_room/cancels_given_living_room.yml +35 -31
  102. data/spec/fixtures/cassettes/BookingSync_API_Client_LivingRooms/_create_living_room/creates_a_new_living_room.yml +41 -37
  103. data/spec/fixtures/cassettes/BookingSync_API_Client_LivingRooms/_edit_living_room/updates_given_living_room_by_ID.yml +38 -34
  104. data/spec/fixtures/cassettes/BookingSync_API_Client_LivingRooms/_living_room/returns_a_single_living_room.yml +44 -40
  105. data/spec/fixtures/cassettes/BookingSync_API_Client_LivingRooms/_living_rooms/returns_living_rooms.yml +43 -39
  106. data/spec/fixtures/cassettes/BookingSync_API_Client_NightlyRateMaps/_edit_nightly_rate_map/updates_given_nightly_rate_map_by_ID.yml +39 -33
  107. data/spec/fixtures/cassettes/BookingSync_API_Client_NightlyRateMaps/_nightly_rate_map/returns_a_single_nightly_rate_map.yml +44 -38
  108. data/spec/fixtures/cassettes/BookingSync_API_Client_NightlyRateMaps/_nightly_rate_maps/returns_nightly_rate_maps.yml +44 -38
  109. data/spec/fixtures/cassettes/BookingSync_API_Client_PaymentGateways/_payment_gateway/returns_a_single_payment_gateway.yml +38 -24
  110. data/spec/fixtures/cassettes/BookingSync_API_Client_PaymentGateways/_payment_gateways/returns_payment_gateways.yml +37 -23
  111. data/spec/fixtures/cassettes/BookingSync_API_Client_Payments/_cancel_payment/cancels_given_payment.yml +36 -20
  112. data/spec/fixtures/cassettes/BookingSync_API_Client_Payments/_create_payment/creates_a_new_payment.yml +50 -26
  113. data/spec/fixtures/cassettes/BookingSync_API_Client_Payments/_edit_payment/updates_given_payment_by_ID.yml +44 -25
  114. data/spec/fixtures/cassettes/BookingSync_API_Client_Payments/_payment/returns_a_single_payment.yml +26 -18
  115. data/spec/fixtures/cassettes/BookingSync_API_Client_Payments/_payments/returns_payments.yml +55 -27
  116. data/spec/fixtures/cassettes/BookingSync_API_Client_Periods/_create_period/creates_a_new_period.yml +49 -26
  117. data/spec/fixtures/cassettes/BookingSync_API_Client_Periods/_delete_period/deletes_given_period.yml +35 -19
  118. data/spec/fixtures/cassettes/BookingSync_API_Client_Periods/_edit_period/updates_given_period_by_ID.yml +43 -25
  119. data/spec/fixtures/cassettes/BookingSync_API_Client_Periods/_period/returns_a_single_period.yml +28 -20
  120. data/spec/fixtures/cassettes/BookingSync_API_Client_Periods/_periods/returns_periods.yml +49 -25
  121. data/spec/fixtures/cassettes/BookingSync_API_Client_Photos/_create_photo/creates_a_photo.yml +47 -24
  122. data/spec/fixtures/cassettes/BookingSync_API_Client_Photos/_create_photo/creates_a_photo_with_encoded_photo_file.yml +47 -24
  123. data/spec/fixtures/cassettes/BookingSync_API_Client_Photos/_create_photo/creates_a_photo_with_photo_path.yml +47 -24
  124. data/spec/fixtures/cassettes/BookingSync_API_Client_Photos/_create_photo/creates_a_photo_with_remote_URL.yml +47 -24
  125. data/spec/fixtures/cassettes/BookingSync_API_Client_Photos/_delete_photo/delete_given_photo.yml +37 -21
  126. data/spec/fixtures/cassettes/BookingSync_API_Client_Photos/_edit_photo/updates_photo_s_description.yml +42 -23
  127. data/spec/fixtures/cassettes/BookingSync_API_Client_Photos/_edit_photo/updates_photo_s_image_file.yml +42 -23
  128. data/spec/fixtures/cassettes/BookingSync_API_Client_Photos/_photo/returns_a_single_photo.yml +28 -20
  129. data/spec/fixtures/cassettes/BookingSync_API_Client_Photos/_photos/returns_photos.yml +38 -22
  130. data/spec/fixtures/cassettes/BookingSync_API_Client_PreferencesGeneralSettings/_edit_preferences_general_setting/updates_given_preferences_general_setting_by_ID.yml +39 -34
  131. data/spec/fixtures/cassettes/BookingSync_API_Client_PreferencesGeneralSettings/_preferences_general_settings/returns_preferences_general_settings.yml +50 -42
  132. data/spec/fixtures/cassettes/BookingSync_API_Client_Rates/_rate/returns_a_single_rate.yml +28 -20
  133. data/spec/fixtures/cassettes/BookingSync_API_Client_Rates/_rates/returns_rates.yml +48 -24
  134. data/spec/fixtures/cassettes/BookingSync_API_Client_RatesRules/_create_rates_rule/creates_a_new_rates_rule.yml +29 -18
  135. data/spec/fixtures/cassettes/BookingSync_API_Client_RatesRules/_delete_rates_rule/deletes_given_rates_rule.yml +21 -15
  136. data/spec/fixtures/cassettes/BookingSync_API_Client_RatesRules/_edit_rates_rule/updates_given_rates_rule_by_ID.yml +24 -18
  137. data/spec/fixtures/cassettes/BookingSync_API_Client_RatesRules/_rates_rule/returns_a_single_rates_rule.yml +26 -18
  138. data/spec/fixtures/cassettes/BookingSync_API_Client_RatesRules/_rates_rules/returns_rates_rules.yml +27 -19
  139. data/spec/fixtures/cassettes/BookingSync_API_Client_RatesTables/_create_rates_table/creates_a_new_rates_table.yml +49 -26
  140. data/spec/fixtures/cassettes/BookingSync_API_Client_RatesTables/_delete_rates_table/deletes_given_rates_table.yml +36 -20
  141. data/spec/fixtures/cassettes/BookingSync_API_Client_RatesTables/_edit_rates_table/updates_given_rates_table_by_ID.yml +43 -25
  142. data/spec/fixtures/cassettes/BookingSync_API_Client_RatesTables/_rates_table/returns_a_single_rates_table.yml +26 -18
  143. data/spec/fixtures/cassettes/BookingSync_API_Client_RatesTables/_rates_tables/returns_rates_tables.yml +54 -36
  144. data/spec/fixtures/cassettes/BookingSync_API_Client_RentalAgreements/_create_rental_agreement/creates_a_new_rental_agreement.yml +50 -26
  145. data/spec/fixtures/cassettes/BookingSync_API_Client_RentalAgreements/_create_rental_agreement_for_booking/creates_a_new_rental_agreement.yml +50 -26
  146. data/spec/fixtures/cassettes/BookingSync_API_Client_RentalAgreements/_create_rental_agreement_for_rental/creates_a_new_rental_agreement.yml +50 -26
  147. data/spec/fixtures/cassettes/BookingSync_API_Client_RentalAgreements/_rental_agreement/returns_a_single_rental_agreement.yml +30 -21
  148. data/spec/fixtures/cassettes/BookingSync_API_Client_RentalAgreements/_rental_agreements/returns_rental_agreements.yml +52 -26
  149. data/spec/fixtures/cassettes/BookingSync_API_Client_RentalCancelationPolicies/_rental_cancelation_policies/returns_rental_cancelation_policies.yml +48 -27
  150. data/spec/fixtures/cassettes/BookingSync_API_Client_RentalCancelationPolicies/_rental_cancelation_policy/returns_a_single_rental_cancelation_policy.yml +42 -26
  151. data/spec/fixtures/cassettes/BookingSync_API_Client_RentalCancelationPolicyItems/_rental_cancelation_policy_item/returns_a_single_rental_cancelation_policy_item.yml +41 -25
  152. data/spec/fixtures/cassettes/BookingSync_API_Client_RentalCancelationPolicyItems/_rental_cancelation_policy_items/returns_rental_cancelation_policy_items.yml +43 -26
  153. data/spec/fixtures/cassettes/BookingSync_API_Client_Rentals/_create_rental/creates_a_new_rental.yml +49 -26
  154. data/spec/fixtures/cassettes/BookingSync_API_Client_Rentals/_delete_rental/deletes_given_rental.yml +36 -20
  155. data/spec/fixtures/cassettes/BookingSync_API_Client_Rentals/_edit_rental/updates_given_rental_by_ID.yml +44 -28
  156. data/spec/fixtures/cassettes/BookingSync_API_Client_Rentals/_rental/returns_a_single_rental.yml +234 -31
  157. data/spec/fixtures/cassettes/BookingSync_API_Client_Rentals/_rental/with_additional_query_params/returns_a_single_rental_with_defined_params.yml +322 -0
  158. data/spec/fixtures/cassettes/BookingSync_API_Client_Rentals/_rentals/links/returns_associated_photos.yml +453 -77
  159. data/spec/fixtures/cassettes/BookingSync_API_Client_Rentals/_rentals/returns_rentals.yml +405 -54
  160. data/spec/fixtures/cassettes/BookingSync_API_Client_Rentals/_rentals/returns_rentals_by_ids.yml +336 -32
  161. data/spec/fixtures/cassettes/BookingSync_API_Client_Rentals/_rentals_meta/returns_meta_information_about_all_rentals.yml +53 -25
  162. data/spec/fixtures/cassettes/BookingSync_API_Client_Rentals/_rentals_meta/returns_meta_information_about_requested_rentals.yml +55 -26
  163. data/spec/fixtures/cassettes/BookingSync_API_Client_Rentals/_rentals_search/performs_autopagination_using_POST.yml +121 -81
  164. data/spec/fixtures/cassettes/BookingSync_API_Client_Rentals/_rentals_search/rentals_ids_given/makes_a_search_within_given_rentals.yml +42 -28
  165. data/spec/fixtures/cassettes/BookingSync_API_Client_Rentals/_rentals_search/returns_rentals.yml +42 -28
  166. data/spec/fixtures/cassettes/BookingSync_API_Client_RentalsAmenities/_create_rentals_amenity/creates_a_new_rentals_amenity.yml +29 -18
  167. data/spec/fixtures/cassettes/BookingSync_API_Client_RentalsAmenities/_delete_rentals_amenity/deletes_given_rentals_amenity.yml +21 -15
  168. data/spec/fixtures/cassettes/BookingSync_API_Client_RentalsAmenities/_edit_rentals_amenity/updates_given_rentals_amenity_by_ID.yml +24 -18
  169. data/spec/fixtures/cassettes/BookingSync_API_Client_RentalsAmenities/_rentals_amenities/links/returns_associated_amenity.yml +104 -52
  170. data/spec/fixtures/cassettes/BookingSync_API_Client_RentalsAmenities/_rentals_amenities/links/returns_associated_rental.yml +283 -53
  171. data/spec/fixtures/cassettes/BookingSync_API_Client_RentalsAmenities/_rentals_amenities/returns_rentals_amenities.yml +51 -26
  172. data/spec/fixtures/cassettes/BookingSync_API_Client_RentalsAmenities/_rentals_amenity/returns_rentals_amenity.yml +50 -26
  173. data/spec/fixtures/cassettes/BookingSync_API_Client_RentalsFees/_create_rentals_fee/creates_a_new_rentals_fee.yml +30 -19
  174. data/spec/fixtures/cassettes/BookingSync_API_Client_RentalsFees/_rentals_fee/returns_a_single_rentals_fee.yml +30 -22
  175. data/spec/fixtures/cassettes/BookingSync_API_Client_RentalsFees/_rentals_fees/returns_rentals_fees.yml +27 -18
  176. data/spec/fixtures/cassettes/BookingSync_API_Client_Reviews/_create_review/creates_a_new_review.yml +49 -26
  177. data/spec/fixtures/cassettes/BookingSync_API_Client_Reviews/_review/returns_a_single_review.yml +26 -18
  178. data/spec/fixtures/cassettes/BookingSync_API_Client_Reviews/_reviews/returns_reviews.yml +41 -33
  179. data/spec/fixtures/cassettes/BookingSync_API_Client_Seasons/_create_season/creates_a_new_season.yml +50 -27
  180. data/spec/fixtures/cassettes/BookingSync_API_Client_Seasons/_delete_season/deletes_given_season.yml +36 -20
  181. data/spec/fixtures/cassettes/BookingSync_API_Client_Seasons/_edit_season/updates_given_season_by_ID.yml +44 -26
  182. data/spec/fixtures/cassettes/BookingSync_API_Client_Seasons/_season/returns_a_single_season.yml +29 -21
  183. data/spec/fixtures/cassettes/BookingSync_API_Client_Seasons/_seasons/returns_seasons.yml +55 -36
  184. data/spec/fixtures/cassettes/BookingSync_API_Client_Sources/_create_source/creates_a_new_source.yml +40 -25
  185. data/spec/fixtures/cassettes/BookingSync_API_Client_Sources/_edit_source/updates_given_source_by_ID.yml +36 -25
  186. data/spec/fixtures/cassettes/BookingSync_API_Client_Sources/_source/returns_a_single_source.yml +26 -18
  187. data/spec/fixtures/cassettes/BookingSync_API_Client_Sources/_sources/returns_sources.yml +42 -24
  188. data/spec/fixtures/cassettes/BookingSync_API_Client_SpecialOffers/_create_special_offer/creates_a_new_special_offer.yml +50 -26
  189. data/spec/fixtures/cassettes/BookingSync_API_Client_SpecialOffers/_delete_special_offer/deletes_given_special_offer.yml +36 -20
  190. data/spec/fixtures/cassettes/BookingSync_API_Client_SpecialOffers/_edit_special_offer/updates_given_special_offer_by_ID.yml +44 -25
  191. data/spec/fixtures/cassettes/BookingSync_API_Client_SpecialOffers/_special_offer/returns_a_single_special_offer.yml +29 -22
  192. data/spec/fixtures/cassettes/BookingSync_API_Client_SpecialOffers/_special_offers/returns_special_offers.yml +48 -24
  193. data/spec/fixtures/cassettes/BookingSync_API_Client_StrictBookings/_create_strict_booking/creates_a_booking.yml +43 -24
  194. data/spec/fixtures/cassettes/BookingSync_API_Client_Taxes/_tax/returns_a_single_tax.yml +26 -18
  195. data/spec/fixtures/cassettes/BookingSync_API_Client_Taxes/_taxes/returns_taxes.yml +28 -19
  196. data/spec/spec_helper.rb +6 -0
  197. data/spec/support/vcr_helper.rb +29 -0
  198. metadata +21 -10
  199. data/lib/bookingsync/api/client/preferences_payments.rb +0 -22
  200. data/spec/bookingsync/api/client/preferences_payments_spec.rb +0 -12
  201. data/spec/fixtures/cassettes/BookingSync_API_Client_PreferencesPayments/_preferences_payments/returns_preferences_payments.yml +0 -80
  202. data/spec/fixtures/cassettes/BookingSync_API_Client_Rentals/_rentals/links/returns_links_to_associated_resources.yml +0 -91
@@ -2,13 +2,13 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: get
5
- uri: https://www.bookingsync.com/api/v3/bookings/20
5
+ uri: https://www.bookingsync.com/api/v3/bookings/829165
6
6
  body:
7
- encoding: US-ASCII
8
- string: ''
7
+ encoding: UTF-8
8
+ string: "{}"
9
9
  headers:
10
10
  User-Agent:
11
- - BookingSync API gem v0.0.20
11
+ - BookingSync API gem v0.1.3
12
12
  Accept:
13
13
  - application/vnd.api+json
14
14
  Content-Type:
@@ -17,54 +17,72 @@ http_interactions:
17
17
  - Bearer <<ACCESS_TOKEN>>
18
18
  Accept-Encoding:
19
19
  - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
20
+ Connection:
21
+ - keep-alive
22
+ Keep-Alive:
23
+ - 30
20
24
  response:
21
25
  status:
22
26
  code: 200
23
27
  message: OK
24
28
  headers:
29
+ Server:
30
+ - nginx
31
+ Date:
32
+ - Mon, 12 Dec 2016 11:43:47 GMT
33
+ Content-Type:
34
+ - application/vnd.api+json; charset=utf-8
35
+ Transfer-Encoding:
36
+ - chunked
37
+ Connection:
38
+ - keep-alive
39
+ Status:
40
+ - 200 OK
25
41
  X-Frame-Options:
26
42
  - SAMEORIGIN
27
43
  X-Xss-Protection:
28
44
  - 1; mode=block
29
45
  X-Content-Type-Options:
30
46
  - nosniff
31
- X-Ua-Compatible:
32
- - chrome=1
47
+ X-Updated-Since-Request-Synced-At:
48
+ - 2016-12-12 11:43:47 UTC
33
49
  X-Ratelimit-Limit:
34
50
  - '1000'
35
51
  X-Ratelimit-Reset:
36
- - '1410710400'
52
+ - '1481544000'
37
53
  X-Ratelimit-Remaining:
38
- - '996'
54
+ - '943'
39
55
  Link:
40
- - <https://www.bookingsync.com/api/v3/bookings/20?page=1>; rel="first", <https://www.bookingsync.com/api/v3/bookings/20?page=1>;
41
- rel="last"
56
+ - <https://www.bookingsync.com/api/v3/bookings/829165?page=1>; rel="first",
57
+ <https://www.bookingsync.com/api/v3/bookings/829165?page=1>; rel="last"
42
58
  X-Total-Pages:
43
59
  - '1'
44
- Access-Control-Allow-Origin:
45
- - "*"
46
- Access-Control-Request-Method:
47
- - "*"
48
- Content-Type:
49
- - application/vnd.api+json; charset=utf-8
60
+ X-Total-Count:
61
+ - '1'
62
+ X-Per-Page:
63
+ - '100'
50
64
  Etag:
51
- - '"90e551291052efcb67155a7388ec2377"'
65
+ - W/"7dd2a70a38ba39b2e4447bdf6793cd8d"
52
66
  Cache-Control:
53
67
  - max-age=0, private, must-revalidate
54
68
  P3p:
55
69
  - CP="OTI DSP COR CUR ADMo DEVo TAI PSAi PSDi IVAi IVDi CONi HISi TELi OTPi
56
70
  OUR SAMi OTRo UNRo PUBi IND UNI STA"
71
+ Set-Cookie:
72
+ - ahoy_track=true; path=/; secure
73
+ - ahoy_visit=c3d10f2a-a07d-4b8c-8fcf-daeda1262def; path=/; expires=Mon, 19 Dec
74
+ 2016 11:43:47 -0000; secure
75
+ - ahoy_visitor=88b963ed-3352-4151-b368-337c03d7f1dd; path=/; expires=Wed, 12
76
+ Dec 2018 11:43:47 -0000; secure
57
77
  X-Request-Id:
58
- - d7277cf4-544a-4324-9bef-7552098e01b2
78
+ - cbfdc889-83c2-43f7-b9af-35874798ae29
59
79
  X-Runtime:
60
- - '0.050735'
61
- Date:
62
- - Sun, 14 Sep 2014 15:08:06 GMT
63
- Connection:
64
- - close
80
+ - '0.042275'
81
+ Strict-Transport-Security:
82
+ - max-age=31536000
65
83
  body:
66
84
  encoding: UTF-8
67
- string: '{"links":{"bookings.account":"http:\/\/www.bookingsync.com\/api\/v3\/accounts\/{bookings.account}","bookings.rental":"http:\/\/www.bookingsync.com\/api\/v3\/rentals\/{bookings.rental}","bookings.client":"http:\/\/www.bookingsync.com\/api\/v3\/clients\/{bookings.client}","bookings.rental_agreement":"http:\/\/www.bookingsync.com\/api\/v3\/rental_agreements\/{bookings.rental_agreement}","bookings.source":"http:\/\/www.bookingsync.com\/api\/v3\/sources\/{bookings.source}"},"bookings":[{"links":{"account":1,"rental":1,"client":15,"rental_agreement":null,"source":null},"id":20,"start_at":"2014-09-14T16:00:00Z","end_at":"2014-09-28T10:00:00Z","status":"Booked","updated_at":"2014-06-12T22:25:02Z","booked":true,"unavailable":false,"tentative_expires_at":null,"initial_price":"3000.0","discount":null,"final_price":"3000.0","deposit":null,"currency":"USD","notes":"","adults":5,"children":null,"bookings_payments_count":0,"review_requests_count":0,"locked":null,"created_at":"2014-06-12T22:25:02Z","canceled_at":null}],"meta":{}}'
85
+ string: '{"links":{"bookings.account":"https://www.bookingsync.com/api/v3/accounts/{bookings.account}","bookings.rental":"https://www.bookingsync.com/api/v3/rentals/{bookings.rental}","bookings.client":"https://www.bookingsync.com/api/v3/clients/{bookings.client}","bookings.rental_agreement":"https://www.bookingsync.com/api/v3/rental_agreements/{bookings.rental_agreement}","bookings.source":"https://www.bookingsync.com/api/v3/sources/{bookings.source}","bookings.inquiry":"https://www.bookingsync.com/api/v3/inquiries/{bookings.inquiry}","bookings.booking_comments":"https://www.bookingsync.com/api/v3/booking_comments/{bookings.booking_comments}","bookings.bookings_fees":"https://www.bookingsync.com/api/v3/bookings_fees/{bookings.bookings_fees}","bookings.bookings_taxes":"https://www.bookingsync.com/api/v3/bookings_taxes/{bookings.bookings_taxes}","bookings.payments":"https://www.bookingsync.com/api/v3/payments/{bookings.payments}","bookings.bookings_payments":"https://www.bookingsync.com/api/v3/bookings_payments/{bookings.bookings_payments}","bookings.bookings_tags":"https://www.bookingsync.com/api/v3/bookings_tags/{bookings.bookings_tags}"},"bookings":[{"links":{"account":3837,"rental":5117,"client":77703,"rental_agreement":29773,"source":1874,"inquiry":null,"booking_comments":[],"bookings_fees":[],"bookings_taxes":[],"payments":[],"bookings_payments":[],"bookings_tags":[]},"id":829165,"start_at":"2016-12-14T16:00:00Z","end_at":"2016-12-24T10:00:00Z","status":"Booked","updated_at":"2016-12-09T10:31:03Z","reference":"00HRSD","booked":true,"unavailable":false,"tentative_expires_at":null,"initial_price":"3615.94","initial_rental_price":"3615.94","channel_price":null,"discount":"","final_rental_price":"3615.94","final_price":"3615.94","downpayment":"1084.78","paid_amount":"0.0","currency":"EUR","notes":"","damage_deposit":"0.0","charge_damage_deposit_on_arrival":true,"adults":1,"children":null,"bookings_payments_count":0,"review_requests_count":0,"locked":null,"created_at":"2016-12-09T10:31:03Z","canceled_at":null,"expected_checkin_time":"14:30","expected_checkout_time":"06:45","payment_url":null,"balance_due_at":"2016-12-09T10:31:03Z","payback_to_owner":null,"commission":null,"contract_updated_at":null,"owned_by_app":false}],"meta":{}}'
68
86
  http_version:
69
- recorded_at: Sun, 14 Sep 2014 15:08:06 GMT
70
- recorded_with: VCR 2.9.0
87
+ recorded_at: Mon, 12 Dec 2016 11:43:47 GMT
88
+ recorded_with: VCR 3.0.3
@@ -2,13 +2,13 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: get
5
- uri: https://www.bookingsync.com/api/v3/bookings/114760?include_canceled=true
5
+ uri: https://www.bookingsync.com/api/v3/bookings/817798?include_canceled=true
6
6
  body:
7
- encoding: US-ASCII
8
- string: ''
7
+ encoding: UTF-8
8
+ string: "{}"
9
9
  headers:
10
10
  User-Agent:
11
- - BookingSync API gem v0.0.26
11
+ - BookingSync API gem v0.1.3
12
12
  Accept:
13
13
  - application/vnd.api+json
14
14
  Content-Type:
@@ -17,6 +17,10 @@ http_interactions:
17
17
  - Bearer <<ACCESS_TOKEN>>
18
18
  Accept-Encoding:
19
19
  - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
20
+ Connection:
21
+ - keep-alive
22
+ Keep-Alive:
23
+ - 30
20
24
  response:
21
25
  status:
22
26
  code: 200
@@ -25,7 +29,7 @@ http_interactions:
25
29
  Server:
26
30
  - nginx
27
31
  Date:
28
- - Sun, 26 Jul 2015 14:41:39 GMT
32
+ - Mon, 12 Dec 2016 11:43:48 GMT
29
33
  Content-Type:
30
34
  - application/vnd.api+json; charset=utf-8
31
35
  Transfer-Encoding:
@@ -34,30 +38,32 @@ http_interactions:
34
38
  - keep-alive
35
39
  Status:
36
40
  - 200 OK
37
- Strict-Transport-Security:
38
- - max-age=31536000
39
41
  X-Frame-Options:
40
42
  - SAMEORIGIN
41
43
  X-Xss-Protection:
42
44
  - 1; mode=block
43
45
  X-Content-Type-Options:
44
46
  - nosniff
47
+ X-Updated-Since-Request-Synced-At:
48
+ - 2016-12-12 11:43:48 UTC
45
49
  X-Ratelimit-Limit:
46
- - '5000'
50
+ - '1000'
47
51
  X-Ratelimit-Reset:
48
- - '1437922800'
52
+ - '1481544000'
49
53
  X-Ratelimit-Remaining:
50
- - '4991'
54
+ - '942'
51
55
  Link:
52
- - <https://www.bookingsync.com/api/v3/bookings/114760?include_canceled=true&page=1>;
53
- rel="first", <https://www.bookingsync.com/api/v3/bookings/114760?include_canceled=true&page=1>;
56
+ - <https://www.bookingsync.com/api/v3/bookings/817798?include_canceled=true&page=1>;
57
+ rel="first", <https://www.bookingsync.com/api/v3/bookings/817798?include_canceled=true&page=1>;
54
58
  rel="last"
55
59
  X-Total-Pages:
56
60
  - '1'
57
61
  X-Total-Count:
58
62
  - '1'
63
+ X-Per-Page:
64
+ - '100'
59
65
  Etag:
60
- - '"6580e5cc4becab5179a97144480cd2a8"'
66
+ - W/"b28659ab106fbe2c6bb8dc53ed18f38f"
61
67
  Cache-Control:
62
68
  - max-age=0, private, must-revalidate
63
69
  P3p:
@@ -65,18 +71,19 @@ http_interactions:
65
71
  OUR SAMi OTRo UNRo PUBi IND UNI STA"
66
72
  Set-Cookie:
67
73
  - ahoy_track=true; path=/; secure
68
- - ahoy_visit=4d25535b-4282-48d5-8d0e-e4e0c89ae456; path=/; expires=Sun, 02 Aug
69
- 2015 14:41:39 -0000; secure
70
- - ahoy_visitor=61b23df6-ce60-4fd6-9483-93d2b1b7de52; path=/; expires=Wed, 26
71
- Jul 2017 14:41:39 -0000; secure
74
+ - ahoy_visit=1a858df9-0cfd-47ed-9c92-2619714cb8cc; path=/; expires=Mon, 19 Dec
75
+ 2016 11:43:48 -0000; secure
76
+ - ahoy_visitor=61014523-3a27-48c9-b803-58eecb69ed26; path=/; expires=Wed, 12
77
+ Dec 2018 11:43:48 -0000; secure
72
78
  X-Request-Id:
73
- - ad1ae3ef-a18e-4c15-a7d0-9f2b322b1e5f
79
+ - 5f8c2ede-e105-4814-ac96-3a11c28f2e79
74
80
  X-Runtime:
75
- - '0.107455'
81
+ - '0.059286'
82
+ Strict-Transport-Security:
83
+ - max-age=31536000
76
84
  body:
77
85
  encoding: UTF-8
78
- string: '{"links":{"bookings.account":"https://www.bookingsync.com/api/v3/accounts/{bookings.account}","bookings.rental":"https://www.bookingsync.com/api/v3/rentals/{bookings.rental}","bookings.client":"https://www.bookingsync.com/api/v3/clients/{bookings.client}","bookings.rental_agreement":"https://www.bookingsync.com/api/v3/rental_agreements/{bookings.rental_agreement}","bookings.source":"https://www.bookingsync.com/api/v3/sources/{bookings.source}","bookings.bookings_fees":"https://www.bookingsync.com/api/v3/bookings_fees/{bookings.bookings_fees}","bookings.bookings_taxes":"https://www.bookingsync.com/api/v3/bookings_taxes/{bookings.bookings_taxes}"},"bookings":[{"links":{"account":4516,"rental":7314,"client":61311,"rental_agreement":null,"source":null,"bookings_fees":[],"bookings_taxes":[]},"id":114760,"start_at":"2015-07-19T16:00:00Z","end_at":"2015-07-31T10:00:00Z","status":"Canceled","updated_at":"2015-06-12T12:58:00Z","booked":false,"unavailable":false,"tentative_expires_at":null,"initial_price":"5000.0","initial_rental_price":"5000.0","discount":null,"final_rental_price":"5000.0","final_price":"5000.0","downpayment":null,"paid_amount":"0.0","currency":"EUR","notes":"Birthday
79
- celebration","adults":1,"children":null,"bookings_payments_count":0,"review_requests_count":0,"locked":null,"created_at":"2015-03-08T00:31:56Z","canceled_at":"2015-03-12T00:31:56Z","expected_checkin_time":null,"expected_checkout_time":null,"owned_by_app":false}],"meta":{}}'
86
+ string: '{"links":{"bookings.account":"https://www.bookingsync.com/api/v3/accounts/{bookings.account}","bookings.rental":"https://www.bookingsync.com/api/v3/rentals/{bookings.rental}","bookings.client":"https://www.bookingsync.com/api/v3/clients/{bookings.client}","bookings.rental_agreement":"https://www.bookingsync.com/api/v3/rental_agreements/{bookings.rental_agreement}","bookings.source":"https://www.bookingsync.com/api/v3/sources/{bookings.source}","bookings.inquiry":"https://www.bookingsync.com/api/v3/inquiries/{bookings.inquiry}","bookings.booking_comments":"https://www.bookingsync.com/api/v3/booking_comments/{bookings.booking_comments}","bookings.bookings_fees":"https://www.bookingsync.com/api/v3/bookings_fees/{bookings.bookings_fees}","bookings.bookings_taxes":"https://www.bookingsync.com/api/v3/bookings_taxes/{bookings.bookings_taxes}","bookings.payments":"https://www.bookingsync.com/api/v3/payments/{bookings.payments}","bookings.bookings_payments":"https://www.bookingsync.com/api/v3/bookings_payments/{bookings.bookings_payments}","bookings.bookings_tags":"https://www.bookingsync.com/api/v3/bookings_tags/{bookings.bookings_tags}"},"bookings":[{"links":{"account":3837,"rental":5116,"client":null,"rental_agreement":6905,"source":null,"inquiry":null,"booking_comments":[],"bookings_fees":[],"bookings_taxes":[],"payments":[],"bookings_payments":[],"bookings_tags":[]},"id":817798,"start_at":"2017-01-03T00:00:00Z","end_at":"2019-03-25T21:45:00Z","status":"Canceled","updated_at":"2016-12-06T12:55:59Z","reference":"00HJ0M","booked":true,"unavailable":false,"tentative_expires_at":null,"initial_price":null,"initial_rental_price":null,"channel_price":null,"discount":"","final_rental_price":"0.0","final_price":null,"downpayment":null,"paid_amount":"0.0","currency":"USD","notes":null,"damage_deposit":"0.0","charge_damage_deposit_on_arrival":true,"adults":null,"children":null,"bookings_payments_count":0,"review_requests_count":0,"locked":"doorkeeper/application-17","created_at":"2016-12-06T12:47:11Z","canceled_at":"2016-12-06T12:55:59Z","expected_checkin_time":null,"expected_checkout_time":null,"payment_url":null,"balance_due_at":"2016-12-06T12:47:11Z","payback_to_owner":null,"commission":null,"contract_updated_at":null,"owned_by_app":true}],"meta":{}}'
80
87
  http_version:
81
- recorded_at: Sun, 26 Jul 2015 14:41:40 GMT
82
- recorded_with: VCR 2.9.3
88
+ recorded_at: Mon, 12 Dec 2016 11:43:48 GMT
89
+ recorded_with: VCR 3.0.3
@@ -4,11 +4,11 @@ http_interactions:
4
4
  method: get
5
5
  uri: https://www.bookingsync.com/api/v3/bookings?per_page=2
6
6
  body:
7
- encoding: US-ASCII
8
- string: ''
7
+ encoding: UTF-8
8
+ string: "{}"
9
9
  headers:
10
10
  User-Agent:
11
- - Faraday v0.9.0
11
+ - BookingSync API gem v0.1.3
12
12
  Accept:
13
13
  - application/vnd.api+json
14
14
  Content-Type:
@@ -17,60 +17,84 @@ http_interactions:
17
17
  - Bearer <<ACCESS_TOKEN>>
18
18
  Accept-Encoding:
19
19
  - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
20
+ Connection:
21
+ - keep-alive
22
+ Keep-Alive:
23
+ - 30
20
24
  response:
21
25
  status:
22
26
  code: 200
23
27
  message: OK
24
28
  headers:
29
+ Server:
30
+ - nginx
31
+ Date:
32
+ - Mon, 12 Dec 2016 11:32:38 GMT
33
+ Content-Type:
34
+ - application/vnd.api+json; charset=utf-8
35
+ Transfer-Encoding:
36
+ - chunked
37
+ Connection:
38
+ - keep-alive
39
+ Status:
40
+ - 200 OK
41
+ X-Frame-Options:
42
+ - SAMEORIGIN
43
+ X-Xss-Protection:
44
+ - 1; mode=block
45
+ X-Content-Type-Options:
46
+ - nosniff
47
+ X-Updated-Since-Request-Synced-At:
48
+ - 2016-12-12 11:32:38 UTC
25
49
  X-Ratelimit-Limit:
26
50
  - '1000'
27
51
  X-Ratelimit-Reset:
28
- - '1395410400'
52
+ - '1481544000'
29
53
  X-Ratelimit-Remaining:
30
- - '959'
54
+ - '989'
31
55
  Link:
32
- - "<https://www.bookingsync.com/api/v3/bookings?page=1&per_page=2>; rel=\"first\",
33
- <https://www.bookingsync.com/api/v3/bookings?page=2&per_page=2>; rel=\"next\",
34
- <https://www.bookingsync.com/api/v3/bookings?page=3&per_page=2>; rel=\"last\""
56
+ - <https://www.bookingsync.com/api/v3/bookings?page=1&per_page=2>; rel="first",
57
+ <https://www.bookingsync.com/api/v3/bookings?page=2&per_page=2>; rel="next",
58
+ <https://www.bookingsync.com/api/v3/bookings?page=2&per_page=2>; rel="last"
35
59
  X-Total-Pages:
36
- - '3'
37
- Access-Control-Allow-Origin:
38
- - "*"
39
- Access-Control-Request-Method:
40
- - "*"
41
- Content-Type:
42
- - application/vnd.api+json; charset=utf-8
43
- X-Ua-Compatible:
44
- - IE=Edge
60
+ - '2'
61
+ X-Total-Count:
62
+ - '4'
63
+ X-Per-Page:
64
+ - '2'
45
65
  Etag:
46
- - "\"25e36b48fa66e5428431111d81877e3f\""
66
+ - W/"e590e0d6f5c07a6c71f9541f0e4f9d63"
47
67
  Cache-Control:
48
68
  - max-age=0, private, must-revalidate
49
69
  P3p:
50
70
  - CP="OTI DSP COR CUR ADMo DEVo TAI PSAi PSDi IVAi IVDi CONi HISi TELi OTPi
51
71
  OUR SAMi OTRo UNRo PUBi IND UNI STA"
72
+ Set-Cookie:
73
+ - ahoy_track=true; path=/; secure
74
+ - ahoy_visit=c76e9325-bc51-41b3-8bdc-393cf28eee11; path=/; expires=Mon, 19 Dec
75
+ 2016 11:32:38 -0000; secure
76
+ - ahoy_visitor=1e649d25-f584-461c-8312-eaa8826ea7a6; path=/; expires=Wed, 12
77
+ Dec 2018 11:32:38 -0000; secure
52
78
  X-Request-Id:
53
- - eb5b3e3bc1bf4672c1fdf78bfe5894d2
79
+ - 36fc4e7e-58da-41e1-8a06-a90b436164af
54
80
  X-Runtime:
55
- - '0.163098'
56
- Date:
57
- - Fri, 21 Mar 2014 13:46:18 GMT
58
- Connection:
59
- - close
81
+ - '0.078111'
82
+ Strict-Transport-Security:
83
+ - max-age=31536000
60
84
  body:
61
85
  encoding: UTF-8
62
- string: "{\"bookings\":[{\"id\":1,\"account_id\":1,\"rental_id\":2,\"start_at\":\"2014-04-28T10:55:13Z\",\"end_at\":\"2014-12-28T10:55:34Z\"},{\"id\":4,\"account_id\":1,\"rental_id\":2,\"start_at\":\"2014-04-28T10:55:13Z\",\"end_at\":\"2014-12-28T10:55:34Z\"}]}"
63
- http_version:
64
- recorded_at: Fri, 21 Mar 2014 13:46:18 GMT
86
+ string: '{"links":{"bookings.account":"https://www.bookingsync.com/api/v3/accounts/{bookings.account}","bookings.rental":"https://www.bookingsync.com/api/v3/rentals/{bookings.rental}","bookings.client":"https://www.bookingsync.com/api/v3/clients/{bookings.client}","bookings.rental_agreement":"https://www.bookingsync.com/api/v3/rental_agreements/{bookings.rental_agreement}","bookings.source":"https://www.bookingsync.com/api/v3/sources/{bookings.source}","bookings.inquiry":"https://www.bookingsync.com/api/v3/inquiries/{bookings.inquiry}","bookings.booking_comments":"https://www.bookingsync.com/api/v3/booking_comments/{bookings.booking_comments}","bookings.bookings_fees":"https://www.bookingsync.com/api/v3/bookings_fees/{bookings.bookings_fees}","bookings.bookings_taxes":"https://www.bookingsync.com/api/v3/bookings_taxes/{bookings.bookings_taxes}","bookings.payments":"https://www.bookingsync.com/api/v3/payments/{bookings.payments}","bookings.bookings_payments":"https://www.bookingsync.com/api/v3/bookings_payments/{bookings.bookings_payments}","bookings.bookings_tags":"https://www.bookingsync.com/api/v3/bookings_tags/{bookings.bookings_tags}"},"bookings":[{"links":{"account":3837,"rental":5117,"client":77703,"rental_agreement":29773,"source":1874,"inquiry":null,"booking_comments":[],"bookings_fees":[],"bookings_taxes":[],"payments":[],"bookings_payments":[],"bookings_tags":[]},"id":829165,"start_at":"2016-12-14T16:00:00Z","end_at":"2016-12-24T10:00:00Z","status":"Booked","updated_at":"2016-12-09T10:31:03Z","reference":"00HRSD","booked":true,"unavailable":false,"tentative_expires_at":null,"initial_price":"3615.94","initial_rental_price":"3615.94","channel_price":null,"discount":"","final_rental_price":"3615.94","final_price":"3615.94","downpayment":"1084.78","paid_amount":"0.0","currency":"EUR","notes":"","damage_deposit":"0.0","charge_damage_deposit_on_arrival":true,"adults":1,"children":null,"bookings_payments_count":0,"review_requests_count":0,"locked":null,"created_at":"2016-12-09T10:31:03Z","canceled_at":null,"expected_checkin_time":"14:30","expected_checkout_time":"06:45","payment_url":null,"balance_due_at":"2016-12-09T10:31:03Z","payback_to_owner":null,"commission":null,"contract_updated_at":null,"owned_by_app":false},{"links":{"account":3837,"rental":5117,"client":77710,"rental_agreement":29774,"source":null,"inquiry":null,"booking_comments":[92650,91667,91641],"bookings_fees":[],"bookings_taxes":[],"payments":[268198],"bookings_payments":[268231],"bookings_tags":[]},"id":817604,"start_at":"2017-01-09T16:00:00Z","end_at":"2017-01-14T10:00:00Z","status":"Booked","updated_at":"2016-12-09T09:42:19Z","reference":"00HIV8","booked":true,"unavailable":false,"tentative_expires_at":null,"initial_price":"1500.0","initial_rental_price":"1500.0","channel_price":null,"discount":"","final_rental_price":"1500.0","final_price":"1500.0","downpayment":"450.0","paid_amount":"2.0","currency":"EUR","notes":"","damage_deposit":"0.0","charge_damage_deposit_on_arrival":true,"adults":8,"children":null,"bookings_payments_count":3,"review_requests_count":0,"locked":null,"created_at":"2016-12-06T11:28:41Z","canceled_at":null,"expected_checkin_time":"16:15","expected_checkout_time":"04:30","payment_url":null,"balance_due_at":"2016-12-10T16:00:00Z","payback_to_owner":null,"commission":null,"contract_updated_at":"2016-12-09T09:42:19Z","owned_by_app":false}],"meta":{}}'
87
+ http_version:
88
+ recorded_at: Mon, 12 Dec 2016 11:32:38 GMT
65
89
  - request:
66
90
  method: get
67
91
  uri: https://www.bookingsync.com/api/v3/bookings?page=2&per_page=2
68
92
  body:
69
- encoding: US-ASCII
70
- string: ''
93
+ encoding: UTF-8
94
+ string: "{}"
71
95
  headers:
72
96
  User-Agent:
73
- - Faraday v0.9.0
97
+ - BookingSync API gem v0.1.3
74
98
  Accept:
75
99
  - application/vnd.api+json
76
100
  Content-Type:
@@ -79,112 +103,73 @@ http_interactions:
79
103
  - Bearer <<ACCESS_TOKEN>>
80
104
  Accept-Encoding:
81
105
  - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
106
+ Connection:
107
+ - keep-alive
108
+ Keep-Alive:
109
+ - 30
82
110
  response:
83
111
  status:
84
112
  code: 200
85
113
  message: OK
86
114
  headers:
87
- X-Ratelimit-Limit:
88
- - '1000'
89
- X-Ratelimit-Reset:
90
- - '1395410400'
91
- X-Ratelimit-Remaining:
92
- - '958'
93
- Link:
94
- - "<https://www.bookingsync.com/api/v3/bookings?page=1&per_page=2>; rel=\"first\",
95
- <https://www.bookingsync.com/api/v3/bookings?page=1&per_page=2>; rel=\"prev\",
96
- <https://www.bookingsync.com/api/v3/bookings?page=3&per_page=2>; rel=\"next\",
97
- <https://www.bookingsync.com/api/v3/bookings?page=3&per_page=2>; rel=\"last\""
98
- X-Total-Pages:
99
- - '3'
100
- Access-Control-Allow-Origin:
101
- - "*"
102
- Access-Control-Request-Method:
103
- - "*"
115
+ Server:
116
+ - nginx
117
+ Date:
118
+ - Mon, 12 Dec 2016 11:32:38 GMT
104
119
  Content-Type:
105
120
  - application/vnd.api+json; charset=utf-8
106
- X-Ua-Compatible:
107
- - IE=Edge
108
- Etag:
109
- - "\"d7959f3dd105d79d2d434b608074ad7f\""
110
- Cache-Control:
111
- - max-age=0, private, must-revalidate
112
- P3p:
113
- - CP="OTI DSP COR CUR ADMo DEVo TAI PSAi PSDi IVAi IVDi CONi HISi TELi OTPi
114
- OUR SAMi OTRo UNRo PUBi IND UNI STA"
115
- X-Request-Id:
116
- - 6878a84fcb8c6f4a4ba5129845805d2b
117
- X-Runtime:
118
- - '0.057656'
119
- Date:
120
- - Fri, 21 Mar 2014 13:46:18 GMT
121
+ Transfer-Encoding:
122
+ - chunked
121
123
  Connection:
122
- - close
123
- body:
124
- encoding: UTF-8
125
- string: "{\"bookings\":[{\"id\":5,\"account_id\":1,\"rental_id\":2,\"start_at\":\"2014-04-28T10:55:13Z\",\"end_at\":\"2014-12-28T10:55:34Z\"},{\"id\":6,\"account_id\":1,\"rental_id\":4,\"start_at\":\"2014-04-28T10:55:13Z\",\"end_at\":\"2014-12-28T10:55:34Z\"}]}"
126
- http_version:
127
- recorded_at: Fri, 21 Mar 2014 13:46:18 GMT
128
- - request:
129
- method: get
130
- uri: https://www.bookingsync.com/api/v3/bookings?page=3&per_page=2
131
- body:
132
- encoding: US-ASCII
133
- string: ''
134
- headers:
135
- User-Agent:
136
- - Faraday v0.9.0
137
- Accept:
138
- - application/vnd.api+json
139
- Content-Type:
140
- - application/vnd.api+json
141
- Authorization:
142
- - Bearer <<ACCESS_TOKEN>>
143
- Accept-Encoding:
144
- - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
145
- response:
146
- status:
147
- code: 200
148
- message: OK
149
- headers:
124
+ - keep-alive
125
+ Status:
126
+ - 200 OK
127
+ X-Frame-Options:
128
+ - SAMEORIGIN
129
+ X-Xss-Protection:
130
+ - 1; mode=block
131
+ X-Content-Type-Options:
132
+ - nosniff
133
+ X-Updated-Since-Request-Synced-At:
134
+ - 2016-12-12 11:32:38 UTC
150
135
  X-Ratelimit-Limit:
151
136
  - '1000'
152
137
  X-Ratelimit-Reset:
153
- - '1395410400'
138
+ - '1481544000'
154
139
  X-Ratelimit-Remaining:
155
- - '957'
140
+ - '988'
156
141
  Link:
157
- - "<https://www.bookingsync.com/api/v3/bookings?page=1&per_page=2>; rel=\"first\",
158
- <https://www.bookingsync.com/api/v3/bookings?page=2&per_page=2>; rel=\"prev\",
159
- <https://www.bookingsync.com/api/v3/bookings?page=3&per_page=2>; rel=\"last\""
142
+ - <https://www.bookingsync.com/api/v3/bookings?page=1&per_page=2>; rel="first",
143
+ <https://www.bookingsync.com/api/v3/bookings?page=1&per_page=2>; rel="prev",
144
+ <https://www.bookingsync.com/api/v3/bookings?page=2&per_page=2>; rel="last"
160
145
  X-Total-Pages:
161
- - '3'
162
- Access-Control-Allow-Origin:
163
- - "*"
164
- Access-Control-Request-Method:
165
- - "*"
166
- Content-Type:
167
- - application/vnd.api+json; charset=utf-8
168
- X-Ua-Compatible:
169
- - IE=Edge
146
+ - '2'
147
+ X-Total-Count:
148
+ - '4'
149
+ X-Per-Page:
150
+ - '2'
170
151
  Etag:
171
- - "\"b22b194138694e3995e5dce56ab4d648\""
152
+ - W/"4ece5a902809e187da4047fcd02fa0b1"
172
153
  Cache-Control:
173
154
  - max-age=0, private, must-revalidate
174
155
  P3p:
175
156
  - CP="OTI DSP COR CUR ADMo DEVo TAI PSAi PSDi IVAi IVDi CONi HISi TELi OTPi
176
157
  OUR SAMi OTRo UNRo PUBi IND UNI STA"
158
+ Set-Cookie:
159
+ - ahoy_track=true; path=/; secure
160
+ - ahoy_visit=5d8efa61-4c53-45d5-9919-556f36b53ea0; path=/; expires=Mon, 19 Dec
161
+ 2016 11:32:38 -0000; secure
162
+ - ahoy_visitor=90c1b337-ea02-407b-a2ea-77f88db30e04; path=/; expires=Wed, 12
163
+ Dec 2018 11:32:38 -0000; secure
177
164
  X-Request-Id:
178
- - 7156d0610d945ed7b5aedf6f11137781
165
+ - 2fc35ce7-68b6-4611-89da-c98bc12afab1
179
166
  X-Runtime:
180
- - '0.056853'
181
- Date:
182
- - Fri, 21 Mar 2014 13:46:18 GMT
183
- Connection:
184
- - close
167
+ - '0.082102'
168
+ Strict-Transport-Security:
169
+ - max-age=31536000
185
170
  body:
186
171
  encoding: UTF-8
187
- string: "{\"bookings\":[{\"id\":7,\"account_id\":1,\"rental_id\":4,\"start_at\":\"2014-04-28T10:55:13Z\",\"end_at\":\"2014-12-28T10:55:34Z\"}]}"
188
- http_version:
189
- recorded_at: Fri, 21 Mar 2014 13:46:18 GMT
190
- recorded_with: VCR 2.8.0
172
+ string: '{"links":{"bookings.account":"https://www.bookingsync.com/api/v3/accounts/{bookings.account}","bookings.rental":"https://www.bookingsync.com/api/v3/rentals/{bookings.rental}","bookings.client":"https://www.bookingsync.com/api/v3/clients/{bookings.client}","bookings.rental_agreement":"https://www.bookingsync.com/api/v3/rental_agreements/{bookings.rental_agreement}","bookings.source":"https://www.bookingsync.com/api/v3/sources/{bookings.source}","bookings.inquiry":"https://www.bookingsync.com/api/v3/inquiries/{bookings.inquiry}","bookings.booking_comments":"https://www.bookingsync.com/api/v3/booking_comments/{bookings.booking_comments}","bookings.bookings_fees":"https://www.bookingsync.com/api/v3/bookings_fees/{bookings.bookings_fees}","bookings.bookings_taxes":"https://www.bookingsync.com/api/v3/bookings_taxes/{bookings.bookings_taxes}","bookings.payments":"https://www.bookingsync.com/api/v3/payments/{bookings.payments}","bookings.bookings_payments":"https://www.bookingsync.com/api/v3/bookings_payments/{bookings.bookings_payments}","bookings.bookings_tags":"https://www.bookingsync.com/api/v3/bookings_tags/{bookings.bookings_tags}"},"bookings":[{"links":{"account":3837,"rental":5117,"client":77703,"rental_agreement":null,"source":null,"inquiry":null,"booking_comments":[],"bookings_fees":[],"bookings_taxes":[],"payments":[],"bookings_payments":[],"bookings_tags":[]},"id":817605,"start_at":"2017-01-15T16:00:00Z","end_at":"2017-01-20T10:00:00Z","status":"Booked","updated_at":"2016-12-09T10:31:03Z","reference":"00HIV9","booked":true,"unavailable":false,"tentative_expires_at":null,"initial_price":"1000.0","initial_rental_price":"1000.0","channel_price":null,"discount":"","final_rental_price":"1000.0","final_price":"1000.0","downpayment":"0.0","paid_amount":"0.0","currency":"EUR","notes":"","damage_deposit":"0.0","charge_damage_deposit_on_arrival":true,"adults":4,"children":null,"bookings_payments_count":0,"review_requests_count":0,"locked":null,"created_at":"2016-12-06T11:29:17Z","canceled_at":null,"expected_checkin_time":"18:00","expected_checkout_time":"04:30","payment_url":null,"balance_due_at":"2016-12-16T16:00:00Z","payback_to_owner":null,"commission":null,"contract_updated_at":null,"owned_by_app":false},{"links":{"account":3837,"rental":5117,"client":77703,"rental_agreement":null,"source":null,"inquiry":null,"booking_comments":[],"bookings_fees":[],"bookings_taxes":[],"payments":[],"bookings_payments":[],"bookings_tags":[]},"id":817602,"start_at":"2017-02-07T16:00:00Z","end_at":"2017-02-12T10:00:00Z","status":"Booked","updated_at":"2016-12-09T10:31:03Z","reference":"00HIV6","booked":true,"unavailable":false,"tentative_expires_at":null,"initial_price":"500.0","initial_rental_price":"500.0","channel_price":null,"discount":"","final_rental_price":"500.0","final_price":"500.0","downpayment":"150.0","paid_amount":"0.0","currency":"EUR","notes":"","damage_deposit":"0.0","charge_damage_deposit_on_arrival":true,"adults":2,"children":null,"bookings_payments_count":0,"review_requests_count":0,"locked":null,"created_at":"2016-12-06T11:25:50Z","canceled_at":null,"expected_checkin_time":"17:00","expected_checkout_time":"09:00","payment_url":null,"balance_due_at":"2017-01-08T16:00:00Z","payback_to_owner":null,"commission":null,"contract_updated_at":null,"owned_by_app":false}],"meta":{}}'
173
+ http_version:
174
+ recorded_at: Mon, 12 Dec 2016 11:32:38 GMT
175
+ recorded_with: VCR 3.0.3