bookingsync-api 0.1.3 → 0.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (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
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6915dfa213253a45f23f6ce051ac640ced0823b7
4
- data.tar.gz: a799e2b306a6adb73939bab9ea6aa2ab63693a9f
3
+ metadata.gz: 21ea86e95a6baf65805f5245e7122a19bee233b1
4
+ data.tar.gz: b28efa9f653d940025fd2c3634d28194db9d491e
5
5
  SHA512:
6
- metadata.gz: af88da09b10078bb703df8da722f11cac55cde73df7982400c84d1912642d1726717be0210a235048dc1a1d704d6533eb632daa35ca1d55484d0c2dafa45a084
7
- data.tar.gz: 2629e80e6e1461153041c3920d73ac6ae0b8f42eedad7ef4bbbd1645f4014182543e825c3de25c295a03d3af4030de00d1536f1e63e0dad3a5c5d134eb49f0ef
6
+ metadata.gz: fc6dd487a46aac96d5f79defb481e67e724ea4cc1888509b3838582bb06118a7bd03be5067951daf5aa6384fadea529a5c2edf94ed9fc91bcb0e095cd49a4de5
7
+ data.tar.gz: 290ef32d85ef0fe7b62d7bda949012e2dd2f4e59f83f46907c5363b5efd78375a71cf66b5b5335752ea76501c44dba4712d35ffa944adfbafca20403af6cef18
@@ -2,6 +2,12 @@
2
2
 
3
3
  ## master
4
4
 
5
+ ## 0.1.4
6
+
7
+ - Drop support for `preferences_payments`.
8
+ - Switch from `Net::HTTP` to `Net::HTTP::Persistent`.
9
+ - [bugfix] Fix bug when paginate with block didn't invoke it, if only one page of results was returned.
10
+
5
11
  ## 0.1.3
6
12
 
7
13
  - Expose pagination_first_request to easily retrieve right timestamps for updated since syncs.
@@ -18,6 +18,7 @@ Gem::Specification.new do |spec|
18
18
  spec.require_paths = ["lib"]
19
19
 
20
20
  spec.add_dependency "faraday", "~> 0.9"
21
+ spec.add_dependency "net-http-persistent", "~> 2"
21
22
  spec.add_dependency "hashie"
22
23
  spec.add_dependency "addressable"
23
24
  spec.add_development_dependency "bundler", "~> 1.5"
@@ -21,7 +21,6 @@ require "bookingsync/api/client/periods"
21
21
  require "bookingsync/api/client/payments"
22
22
  require "bookingsync/api/client/payment_gateways"
23
23
  require "bookingsync/api/client/preferences_general_settings"
24
- require "bookingsync/api/client/preferences_payments"
25
24
  require "bookingsync/api/client/photos"
26
25
  require "bookingsync/api/client/rates"
27
26
  require "bookingsync/api/client/rates_rules"
@@ -70,7 +69,6 @@ module BookingSync::API
70
69
  include BookingSync::API::Client::Payments
71
70
  include BookingSync::API::Client::PaymentGateways
72
71
  include BookingSync::API::Client::PreferencesGeneralSettings
73
- include BookingSync::API::Client::PreferencesPayments
74
72
  include BookingSync::API::Client::Photos
75
73
  include BookingSync::API::Client::Rates
76
74
  include BookingSync::API::Client::RatesRules
@@ -203,28 +201,15 @@ module BookingSync::API
203
201
  # @return [Array<BookingSync::API::Resource>] Batch of resources
204
202
  def paginate(path, options = {}, &block)
205
203
  instrument("paginate.bookingsync_api", path: path) do
206
- auto_paginate = options.delete(:auto_paginate)
207
- request_method = options.delete(:request_method) || :get
208
- if request_method == :get
209
- response = call(request_method, path, query: options)
204
+ request_settings = {
205
+ auto_paginate: options.delete(:auto_paginate),
206
+ request_method: options.delete(:request_method) || :get
207
+ }
208
+
209
+ if block_given?
210
+ data = fetch_with_block(path, options, request_settings, &block)
210
211
  else
211
- response = call(request_method, path, options)
212
- end
213
- @pagination_first_response = response
214
- data = response.resources.dup
215
-
216
- if (block_given? || auto_paginate) && response.relations[:next]
217
- first_request = true
218
- loop do
219
- if block_given?
220
- yield(response.resources)
221
- elsif auto_paginate
222
- data.concat(response.resources) unless first_request
223
- first_request = false
224
- end
225
- break unless response.relations[:next]
226
- response = response.relations[:next].call({}, { method: request_method })
227
- end
212
+ data = fetch_with_paginate(path, options, request_settings)
228
213
  end
229
214
 
230
215
  data
@@ -280,7 +265,7 @@ module BookingSync::API
280
265
  def middleware
281
266
  Faraday::RackBuilder.new do |builder|
282
267
  builder.use :logger, logger
283
- builder.adapter Faraday.default_adapter
268
+ builder.adapter :net_http_persistent
284
269
  end
285
270
  end
286
271
 
@@ -362,5 +347,37 @@ module BookingSync::API
362
347
  yield payload if block_given?
363
348
  end
364
349
  end
350
+
351
+ def fetch_with_paginate(path, options, request_settings, data = [], response = nil)
352
+ response = initial_call(path, options, request_settings) unless response
353
+ data.concat(response.resources)
354
+ if response.relations[:next] && request_settings[:auto_paginate]
355
+ fetch_with_paginate(path, options, request_settings, data, next_page(response, request_settings))
356
+ else
357
+ data
358
+ end
359
+ end
360
+
361
+ def fetch_with_block(path, options, request_settings, response = nil, &block)
362
+ response = initial_call(path, options, request_settings) unless response
363
+ block.call(response.resources)
364
+ if response.relations[:next]
365
+ fetch_with_block(path, options, request_settings, next_page(response, request_settings), &block)
366
+ end
367
+ end
368
+
369
+ def initial_call(path, options, request_settings)
370
+ request_method = request_settings[:request_method]
371
+ if request_method == :get
372
+ response = call(request_method, path, query: options)
373
+ else
374
+ response = call(request_method, path, options)
375
+ end
376
+ @pagination_first_response = response
377
+ end
378
+
379
+ def next_page(response, request_settings)
380
+ response.relations[:next].call({}, { method: request_settings[:request_method] })
381
+ end
365
382
  end
366
383
  end
@@ -35,7 +35,7 @@ module BookingSync::API
35
35
  # @param options [Hash] payment attributes
36
36
  # @return [BookingSync::API::Resource] Newly created payment
37
37
  def create_payment(booking_id, options = {})
38
- post(:payments, booking_id: booking_id, payments: [options]).pop
38
+ post("bookings/#{booking_id}/payments", payments: [options]).pop
39
39
  end
40
40
 
41
41
  # Edit a payment
@@ -40,8 +40,8 @@ module BookingSync::API
40
40
  # @param rental [BookingSync::API::Resource|Integer] Rental or ID
41
41
  # of the rental.
42
42
  # @return [BookingSync::API::Resource]
43
- def rental(rental)
44
- get("rentals/#{rental}").pop
43
+ def rental(rental, options = {})
44
+ get("rentals/#{rental}", options).pop
45
45
  end
46
46
 
47
47
  # Create a new rental
@@ -1,5 +1,5 @@
1
1
  module BookingSync
2
2
  module API
3
- VERSION = "0.1.3"
3
+ VERSION = "0.1.4"
4
4
  end
5
5
  end
@@ -3,6 +3,8 @@ require "spec_helper"
3
3
  describe BookingSync::API::Client::Accounts do
4
4
  let(:client) { BookingSync::API::Client.new(test_access_token) }
5
5
 
6
+ before { |ex| @casette_base_path = casette_path(casette_dir, ex.metadata) }
7
+
6
8
  describe ".accounts", :vcr do
7
9
  it "returns accounts" do
8
10
  expect(client.accounts).not_to be_empty
@@ -11,9 +13,13 @@ describe BookingSync::API::Client::Accounts do
11
13
  end
12
14
 
13
15
  describe ".account", :vcr do
16
+ let(:prefetched_account_id) {
17
+ find_resource("#{@casette_base_path}_accounts/returns_accounts.yml", "accounts")[:id]
18
+ }
19
+
14
20
  it "returns a single account" do
15
- account = client.account(3837)
16
- expect(account.id).to eq 3837
21
+ account = client.account(prefetched_account_id)
22
+ expect(account.id).to eq prefetched_account_id
17
23
  end
18
24
  end
19
25
  end
@@ -3,6 +3,8 @@ require "spec_helper"
3
3
  describe BookingSync::API::Client::Amenities do
4
4
  let(:client) { BookingSync::API::Client.new(test_access_token) }
5
5
 
6
+ before { |ex| @casette_base_path = casette_path(casette_dir, ex.metadata) }
7
+
6
8
  describe ".amenities", :vcr do
7
9
  it "returns amenities" do
8
10
  expect(client.amenities).not_to be_empty
@@ -11,9 +13,13 @@ describe BookingSync::API::Client::Amenities do
11
13
  end
12
14
 
13
15
  describe ".amenity", :vcr do
16
+ let(:prefetched_amenity) {
17
+ find_resource("#{@casette_base_path}_amenities/returns_amenities.yml", "amenities")
18
+ }
19
+
14
20
  it "returns amenity" do
15
- amenity = client.amenity(2)
16
- expect(amenity.title).to eql("tv")
21
+ amenity = client.amenity(prefetched_amenity[:id])
22
+ expect(amenity.title).to eq(prefetched_amenity[:title])
17
23
  end
18
24
  end
19
25
  end
@@ -3,6 +3,8 @@ require "spec_helper"
3
3
  describe BookingSync::API::Client::Availabilities do
4
4
  let(:client) { BookingSync::API::Client.new(test_access_token) }
5
5
 
6
+ before { |ex| @casette_base_path = casette_path(casette_dir, ex.metadata) }
7
+
6
8
  describe ".availabilities", :vcr do
7
9
  it "returns availabilities" do
8
10
  expect(client.availabilities).not_to be_empty
@@ -11,9 +13,13 @@ describe BookingSync::API::Client::Availabilities do
11
13
  end
12
14
 
13
15
  describe ".availability", :vcr do
16
+ let(:prefetched_availability_id) {
17
+ find_resource("#{@casette_base_path}_availabilities/returns_availabilities.yml", "availabilities")[:id]
18
+ }
19
+
14
20
  it "returns a single availability" do
15
- availability = client.availability(2)
16
- expect(availability.id).to eq 2
21
+ availability = client.availability(prefetched_availability_id)
22
+ expect(availability.id).to eq prefetched_availability_id
17
23
  end
18
24
  end
19
25
  end
@@ -3,6 +3,8 @@ require "spec_helper"
3
3
  describe BookingSync::API::Client::Bathrooms do
4
4
  let(:client) { BookingSync::API::Client.new(test_access_token) }
5
5
 
6
+ before { |ex| @casette_base_path = casette_path(casette_dir, ex.metadata) }
7
+
6
8
  describe ".bathrooms", :vcr do
7
9
  it "returns bathrooms" do
8
10
  expect(client.bathrooms).not_to be_empty
@@ -11,9 +13,13 @@ describe BookingSync::API::Client::Bathrooms do
11
13
  end
12
14
 
13
15
  describe ".bathroom", :vcr do
16
+ let(:prefetched_bathroom_id) {
17
+ find_resource("#{@casette_base_path}_bathrooms/returns_bathrooms.yml", "bathrooms")[:id]
18
+ }
19
+
14
20
  it "returns a single bathroom" do
15
- bathroom = client.bathroom(730)
16
- expect(bathroom.id).to eq 730
21
+ bathroom = client.bathroom(prefetched_bathroom_id)
22
+ expect(bathroom.id).to eq prefetched_bathroom_id
17
23
  end
18
24
  end
19
25
 
@@ -21,40 +27,43 @@ describe BookingSync::API::Client::Bathrooms do
21
27
  let(:attributes) do
22
28
  {
23
29
  name_en: "New bathroom",
24
- wc: true
30
+ wc_count: 2
25
31
  }
26
32
  end
27
33
  let(:rental) { BookingSync::API::Resource.new(client, id: 5116) }
28
34
 
29
35
  it "creates a new bathroom" do
30
36
  client.create_bathroom(rental, attributes)
31
- assert_requested :post, bs_url("rentals/5116/bathrooms"),
37
+ assert_requested :post, bs_url("rentals/#{rental}/bathrooms"),
32
38
  body: { bathrooms: [attributes] }.to_json
33
39
  end
34
40
 
35
41
  it "returns newly created bathroom" do
36
42
  VCR.use_cassette("BookingSync_API_Client_Bathrooms/_create_bathroom/creates_a_new_bathroom") do
37
43
  bathroom = client.create_bathroom(rental, attributes)
38
- expect(bathroom.name).to eql(en: "New bathroom")
39
- expect(bathroom.wc).to eql(attributes[:wc])
44
+ expect(bathroom.name).to eq(en: "New bathroom")
45
+ expect(bathroom.wc_count).to eq(attributes[:wc_count])
40
46
  end
41
47
  end
42
48
  end
43
49
 
44
50
  describe ".edit_bathroom", :vcr do
45
51
  let(:attributes) {
46
- { name_en: "Updated bathroom" }
52
+ { name_en: "Updated bathroom", name_fr: "Salle de bain 1" }
53
+ }
54
+ let(:created_bathroom_id) {
55
+ find_resource("#{@casette_base_path}_create_bathroom/creates_a_new_bathroom.yml", "bathrooms")[:id]
47
56
  }
48
57
 
49
58
  it "updates given bathroom by ID" do
50
- client.edit_bathroom(729, attributes)
51
- assert_requested :put, bs_url("bathrooms/729"),
59
+ client.edit_bathroom(created_bathroom_id, attributes)
60
+ assert_requested :put, bs_url("bathrooms/#{created_bathroom_id}"),
52
61
  body: { bathrooms: [attributes] }.to_json
53
62
  end
54
63
 
55
64
  it "returns updated bathroom" do
56
65
  VCR.use_cassette("BookingSync_API_Client_Bathrooms/_edit_bathroom/updates_given_bathroom_by_ID") do
57
- bathroom = client.edit_bathroom(729, attributes)
66
+ bathroom = client.edit_bathroom(created_bathroom_id, attributes)
58
67
  expect(bathroom).to be_kind_of(BookingSync::API::Resource)
59
68
  expect(bathroom.name).to eq(en: "Updated bathroom", fr: "Salle de bain 1")
60
69
  end
@@ -62,9 +71,13 @@ describe BookingSync::API::Client::Bathrooms do
62
71
  end
63
72
 
64
73
  describe ".cancel_bathroom", :vcr do
74
+ let(:created_bathroom_id) {
75
+ find_resource("#{@casette_base_path}_create_bathroom/creates_a_new_bathroom.yml", "bathrooms")[:id]
76
+ }
77
+
65
78
  it "cancels given bathroom" do
66
- client.cancel_bathroom(729)
67
- assert_requested :delete, bs_url("bathrooms/729")
79
+ client.cancel_bathroom(created_bathroom_id)
80
+ assert_requested :delete, bs_url("bathrooms/#{created_bathroom_id}")
68
81
  end
69
82
  end
70
83
  end
@@ -3,6 +3,8 @@ require "spec_helper"
3
3
  describe BookingSync::API::Client::Bedrooms do
4
4
  let(:client) { BookingSync::API::Client.new(test_access_token) }
5
5
 
6
+ before { |ex| @casette_base_path = casette_path(casette_dir, ex.metadata) }
7
+
6
8
  describe ".bedrooms", :vcr do
7
9
  it "returns bedrooms" do
8
10
  expect(client.bedrooms).not_to be_empty
@@ -11,9 +13,13 @@ describe BookingSync::API::Client::Bedrooms do
11
13
  end
12
14
 
13
15
  describe ".bedroom", :vcr do
16
+ let(:prefetched_bedroom_id) {
17
+ find_resource("#{@casette_base_path}_bedrooms/returns_bedrooms.yml", "bedrooms")[:id]
18
+ }
19
+
14
20
  it "returns a single bedroom" do
15
- bedroom = client.bedroom(945)
16
- expect(bedroom.id).to eq 945
21
+ bedroom = client.bedroom(prefetched_bedroom_id)
22
+ expect(bedroom.id).to eq prefetched_bedroom_id
17
23
  end
18
24
  end
19
25
 
@@ -28,33 +34,36 @@ describe BookingSync::API::Client::Bedrooms do
28
34
 
29
35
  it "creates a new bedroom" do
30
36
  client.create_bedroom(rental, attributes)
31
- assert_requested :post, bs_url("rentals/5116/bedrooms"),
37
+ assert_requested :post, bs_url("rentals/#{rental}/bedrooms"),
32
38
  body: { bedrooms: [attributes] }.to_json
33
39
  end
34
40
 
35
41
  it "returns newly created bedroom" do
36
42
  VCR.use_cassette("BookingSync_API_Client_Bedrooms/_create_bedroom/creates_a_new_bedroom") do
37
43
  bedroom = client.create_bedroom(rental, attributes)
38
- expect(bedroom.name).to eql(en: "New bedroom")
39
- expect(bedroom.sofa_beds_count).to eql(attributes[:sofa_beds_count])
44
+ expect(bedroom.name).to eq(en: "New bedroom")
45
+ expect(bedroom.sofa_beds_count).to eq(attributes[:sofa_beds_count])
40
46
  end
41
47
  end
42
48
  end
43
49
 
44
50
  describe ".edit_bedroom", :vcr do
45
51
  let(:attributes) {
46
- { name_en: "Updated bedroom" }
52
+ { name_en: "Updated bedroom", name_fr: "Chambre 1" }
53
+ }
54
+ let(:created_bedroom_id) {
55
+ find_resource("#{@casette_base_path}_create_bedroom/creates_a_new_bedroom.yml", "bedrooms")[:id]
47
56
  }
48
57
 
49
58
  it "updates given bedroom by ID" do
50
- client.edit_bedroom(944, attributes)
51
- assert_requested :put, bs_url("bedrooms/944"),
59
+ client.edit_bedroom(created_bedroom_id, attributes)
60
+ assert_requested :put, bs_url("bedrooms/#{created_bedroom_id}"),
52
61
  body: { bedrooms: [attributes] }.to_json
53
62
  end
54
63
 
55
64
  it "returns updated bedroom" do
56
65
  VCR.use_cassette("BookingSync_API_Client_Bedrooms/_edit_bedroom/updates_given_bedroom_by_ID") do
57
- bedroom = client.edit_bedroom(944, attributes)
66
+ bedroom = client.edit_bedroom(created_bedroom_id, attributes)
58
67
  expect(bedroom).to be_kind_of(BookingSync::API::Resource)
59
68
  expect(bedroom.name).to eq(en: "Updated bedroom", fr: "Chambre 1")
60
69
  end
@@ -62,9 +71,13 @@ describe BookingSync::API::Client::Bedrooms do
62
71
  end
63
72
 
64
73
  describe ".cancel_bedroom", :vcr do
74
+ let(:created_bedroom_id) {
75
+ find_resource("#{@casette_base_path}_create_bedroom/creates_a_new_bedroom.yml", "bedrooms")[:id]
76
+ }
77
+
65
78
  it "cancels given bedroom" do
66
- client.cancel_bedroom(944)
67
- assert_requested :delete, bs_url("bedrooms/944")
79
+ client.cancel_bedroom(created_bedroom_id)
80
+ assert_requested :delete, bs_url("bedrooms/#{created_bedroom_id}")
68
81
  end
69
82
  end
70
83
  end
@@ -3,6 +3,8 @@ require "spec_helper"
3
3
  describe BookingSync::API::Client::BookingComments do
4
4
  let(:client) { BookingSync::API::Client.new(test_access_token) }
5
5
 
6
+ before { |ex| @casette_base_path = casette_path(casette_dir, ex.metadata) }
7
+
6
8
  describe ".booking_comments", :vcr do
7
9
  it "returns booking_comments" do
8
10
  expect(client.booking_comments).not_to be_empty
@@ -11,20 +13,24 @@ describe BookingSync::API::Client::BookingComments do
11
13
  end
12
14
 
13
15
  describe ".booking_comment", :vcr do
16
+ let(:prefetched_booking_comment_id) {
17
+ find_resource("#{@casette_base_path}_booking_comments/returns_booking_comments.yml", "booking_comments")[:id]
18
+ }
19
+
14
20
  it "returns single booking_comment" do
15
- booking_comment = client.booking_comment(4)
16
- expect(booking_comment.id).to eq(4)
21
+ booking_comment = client.booking_comment(prefetched_booking_comment_id)
22
+ expect(booking_comment.id).to eq(prefetched_booking_comment_id)
17
23
  end
18
24
  end
19
25
 
20
26
  describe ".create_booking_comment", :vcr do
21
- let(:attributes) { { content: "Example conent" } }
22
- let(:booking) { BookingSync::API::Resource.new(client, id: 1) }
27
+ let(:attributes) { { content: "Example content" } }
28
+ let(:booking) { BookingSync::API::Resource.new(client, id: 817604) }
23
29
 
24
30
  it "creates booking_comment" do
25
31
  client.create_booking_comment(booking.id, attributes)
26
32
  assert_requested :post, bs_url("booking_comments"),
27
- body: { booking_id: 1, booking_comments: [attributes] }.to_json
33
+ body: { booking_id: booking.id, booking_comments: [attributes] }.to_json
28
34
  end
29
35
 
30
36
  it "returns newly created booking_comment" do
@@ -35,23 +41,30 @@ describe BookingSync::API::Client::BookingComments do
35
41
 
36
42
  describe ".edit_booking_comment", :vcr do
37
43
  let(:attributes) { { content: "Updated content" } }
44
+ let(:created_booking_comment_id) {
45
+ find_resource("#{@casette_base_path}_create_booking_comment/creates_booking_comment.yml", "booking_comments")[:id]
46
+ }
38
47
 
39
48
  it "updates booking_comment" do
40
- client.edit_booking_comment(9, attributes)
41
- assert_requested :put, bs_url("booking_comments/9"),
49
+ client.edit_booking_comment(created_booking_comment_id, attributes)
50
+ assert_requested :put, bs_url("booking_comments/#{created_booking_comment_id}"),
42
51
  body: { booking_comments: [attributes] }.to_json
43
52
  end
44
53
 
45
54
  it "returns updated booking_comment" do
46
- booking_comment = client.edit_booking_comment(9, attributes)
55
+ booking_comment = client.edit_booking_comment(created_booking_comment_id, attributes)
47
56
  expect(booking_comment.content).to eq(attributes[:content])
48
57
  end
49
58
  end
50
59
 
51
60
  describe ".delete_booking_comment", :vcr do
61
+ let(:created_booking_comment_id) {
62
+ find_resource("#{@casette_base_path}_create_booking_comment/creates_booking_comment.yml", "booking_comments")[:id]
63
+ }
64
+
52
65
  it "deletes given booking_comment" do
53
- client.delete_booking_comment(10)
54
- assert_requested :delete, bs_url("booking_comments/10")
66
+ client.delete_booking_comment(created_booking_comment_id)
67
+ assert_requested :delete, bs_url("booking_comments/#{created_booking_comment_id}")
55
68
  end
56
69
  end
57
70
  end