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
@@ -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
- - '956'
54
+ - '987'
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=9234c899-5048-46c4-868a-b34df04a9384; path=/; expires=Mon, 19 Dec
75
+ 2016 11:32:38 -0000; secure
76
+ - ahoy_visitor=f77f714f-29ec-4054-9e83-1ede9e25671c; path=/; expires=Wed, 12
77
+ Dec 2018 11:32:38 -0000; secure
52
78
  X-Request-Id:
53
- - 4de62276b706b2c79349974f626d48bf
79
+ - 326ff247-3737-47e1-b460-9649131926c3
54
80
  X-Runtime:
55
- - '0.072189'
56
- Date:
57
- - Fri, 21 Mar 2014 13:46:18 GMT
58
- Connection:
59
- - close
81
+ - '0.070291'
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:19 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
- - '955'
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:39 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
- - 09a37168809795061c802c3bf48d8cdc
117
- X-Runtime:
118
- - '0.072361'
119
- Date:
120
- - Fri, 21 Mar 2014 13:46:19 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:19 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:39 UTC
150
135
  X-Ratelimit-Limit:
151
136
  - '1000'
152
137
  X-Ratelimit-Reset:
153
- - '1395410400'
138
+ - '1481544000'
154
139
  X-Ratelimit-Remaining:
155
- - '954'
140
+ - '986'
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=bf6c8c12-dc6c-4c0f-9614-4b6253f50c32; path=/; expires=Mon, 19 Dec
161
+ 2016 11:32:39 -0000; secure
162
+ - ahoy_visitor=d58a4ccf-49cc-4618-8201-75639225a53c; path=/; expires=Wed, 12
163
+ Dec 2018 11:32:39 -0000; secure
177
164
  X-Request-Id:
178
- - 00e89cc874e87c8a3cd7cc0b6a8d5787
165
+ - a07a6e02-218f-4015-95e6-a7368493f5da
179
166
  X-Runtime:
180
- - '0.054231'
181
- Date:
182
- - Fri, 21 Mar 2014 13:46:19 GMT
183
- Connection:
184
- - close
167
+ - '0.062128'
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:19 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:39 GMT
175
+ 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,49 +17,73 @@ 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:37 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:37 UTC
25
49
  X-Ratelimit-Limit:
26
50
  - '1000'
27
51
  X-Ratelimit-Reset:
28
- - '1395410400'
52
+ - '1481544000'
29
53
  X-Ratelimit-Remaining:
30
- - '953'
54
+ - '990'
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=fea94e37-1b2a-45f1-bf0b-ebd9b4c975f2; path=/; expires=Mon, 19 Dec
75
+ 2016 11:32:37 -0000; secure
76
+ - ahoy_visitor=b4faa3b2-b4e0-4144-b2a2-094c2fc8e806; path=/; expires=Wed, 12
77
+ Dec 2018 11:32:37 -0000; secure
52
78
  X-Request-Id:
53
- - 4b262384ef6d6f38de8dcbd0802f838f
79
+ - f59bf2db-7e2a-4907-9132-493e24df92e8
54
80
  X-Runtime:
55
- - '0.053473'
56
- Date:
57
- - Fri, 21 Mar 2014 13:48:49 GMT
58
- Connection:
59
- - close
81
+ - '0.098039'
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:48:49 GMT
65
- recorded_with: VCR 2.8.0
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:37 GMT
89
+ recorded_with: VCR 3.0.3
@@ -2,56 +2,88 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: get
5
- uri: https://www.bookingsync.com/api/v3/bookings
5
+ uri: https://www.bookingsync.com/api/v3/bookings?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
- - Faraday v0.9.0
11
+ - BookingSync API gem v0.1.3
12
12
  Accept:
13
13
  - application/vnd.api+json
14
+ Content-Type:
15
+ - application/vnd.api+json
14
16
  Authorization:
15
17
  - Bearer <<ACCESS_TOKEN>>
16
18
  Accept-Encoding:
17
19
  - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
20
+ Connection:
21
+ - keep-alive
22
+ Keep-Alive:
23
+ - 30
18
24
  response:
19
25
  status:
20
26
  code: 200
21
27
  message: OK
22
28
  headers:
29
+ Server:
30
+ - nginx
31
+ Date:
32
+ - Mon, 12 Dec 2016 11:32:37 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:37 UTC
23
49
  X-Ratelimit-Limit:
24
50
  - '1000'
25
51
  X-Ratelimit-Reset:
26
- - '1394193600'
52
+ - '1481544000'
27
53
  X-Ratelimit-Remaining:
28
- - '995'
29
- Access-Control-Allow-Origin:
30
- - "*"
31
- Access-Control-Request-Method:
32
- - "*"
33
- Content-Type:
34
- - application/vnd.api+json; charset=utf-8
35
- X-Ua-Compatible:
36
- - IE=Edge
54
+ - '991'
55
+ Link:
56
+ - <https://www.bookingsync.com/api/v3/bookings?include_canceled=true&page=1>;
57
+ rel="first", <https://www.bookingsync.com/api/v3/bookings?include_canceled=true&page=1>;
58
+ rel="last"
59
+ X-Total-Pages:
60
+ - '1'
61
+ X-Total-Count:
62
+ - '7'
63
+ X-Per-Page:
64
+ - '100'
37
65
  Etag:
38
- - "\"435e6e3ac9649b612515cf4bc58d6643\""
66
+ - W/"831e84e311176b6bb28c14ad49925791"
39
67
  Cache-Control:
40
68
  - max-age=0, private, must-revalidate
41
69
  P3p:
42
70
  - CP="OTI DSP COR CUR ADMo DEVo TAI PSAi PSDi IVAi IVDi CONi HISi TELi OTPi
43
71
  OUR SAMi OTRo UNRo PUBi IND UNI STA"
72
+ Set-Cookie:
73
+ - ahoy_track=true; path=/; secure
74
+ - ahoy_visit=9493efba-9b3b-47f6-8823-4f14df3e1615; path=/; expires=Mon, 19 Dec
75
+ 2016 11:32:37 -0000; secure
76
+ - ahoy_visitor=e88709b1-ce8a-4af1-846e-22c2c712922d; path=/; expires=Wed, 12
77
+ Dec 2018 11:32:37 -0000; secure
44
78
  X-Request-Id:
45
- - 8ceb28412ce6b54c63adfeb683e05ad3
79
+ - 05bf6442-0d62-43bb-bb7d-893ce5331189
46
80
  X-Runtime:
47
- - '0.161117'
48
- Date:
49
- - Fri, 07 Mar 2014 11:28:17 GMT
50
- Connection:
51
- - close
81
+ - '0.209932'
82
+ Strict-Transport-Security:
83
+ - max-age=31536000
52
84
  body:
53
85
  encoding: UTF-8
54
- 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\"}]}"
55
- http_version:
56
- recorded_at: Fri, 07 Mar 2014 11:28:17 GMT
57
- recorded_with: VCR 2.8.0
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},{"links":{"account":3837,"rental":5116,"client":null,"rental_agreement":27862,"source":null,"inquiry":null,"booking_comments":[],"bookings_fees":[],"bookings_taxes":[],"payments":[],"bookings_payments":[],"bookings_tags":[]},"id":826549,"start_at":"2017-01-03T00:00:00Z","end_at":"2019-03-25T21:45:00Z","status":"Canceled","updated_at":"2016-12-08T16:31:18Z","reference":"00HPRP","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-08T16:30:49Z","canceled_at":"2016-12-08T16:31:18Z","expected_checkin_time":null,"expected_checkout_time":null,"payment_url":null,"balance_due_at":"2016-12-08T16:30:49Z","payback_to_owner":null,"commission":null,"contract_updated_at":null,"owned_by_app":true},{"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},{"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},{"links":{"account":3837,"rental":5117,"client":77710,"rental_agreement":null,"source":null,"inquiry":null,"booking_comments":[],"bookings_fees":[],"bookings_taxes":[],"payments":[],"bookings_payments":[],"bookings_tags":[]},"id":817603,"start_at":"2017-02-13T16:00:00Z","end_at":"2017-02-17T10:00:00Z","status":"Canceled","updated_at":"2016-12-06T11:28:41Z","reference":"00HIV7","booked":true,"unavailable":false,"tentative_expires_at":null,"initial_price":"100.0","initial_rental_price":"100.0","channel_price":null,"discount":"","final_rental_price":"100.0","final_price":"100.0","downpayment":"30.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:27:33Z","canceled_at":"2016-12-06T11:27:34Z","expected_checkin_time":"14:45","expected_checkout_time":"08:00","payment_url":null,"balance_due_at":"2017-01-14T16:00:00Z","payback_to_owner":null,"commission":null,"contract_updated_at":null,"owned_by_app":false}],"meta":{}}'
87
+ http_version:
88
+ recorded_at: Mon, 12 Dec 2016 11:32:37 GMT
89
+ recorded_with: VCR 3.0.3