bookingsync-api 0.0.6 → 0.0.7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (106) hide show
  1. checksums.yaml +4 -4
  2. data/.travis.yml +1 -1
  3. data/Gemfile +2 -1
  4. data/Guardfile +3 -6
  5. data/README.md +11 -3
  6. data/bookingsync-api.gemspec +2 -2
  7. data/lib/bookingsync/api.rb +0 -2
  8. data/lib/bookingsync/api/client.rb +151 -54
  9. data/lib/bookingsync/api/client/amenities.rb +22 -0
  10. data/lib/bookingsync/api/client/billing_addresses.rb +22 -0
  11. data/lib/bookingsync/api/client/bookings.rb +7 -9
  12. data/lib/bookingsync/api/client/bookings_payments.rb +22 -0
  13. data/lib/bookingsync/api/client/clients.rb +43 -0
  14. data/lib/bookingsync/api/client/destinations.rb +22 -0
  15. data/lib/bookingsync/api/client/inquiries.rb +2 -2
  16. data/lib/bookingsync/api/client/payments.rb +53 -0
  17. data/lib/bookingsync/api/client/periods.rb +54 -0
  18. data/lib/bookingsync/api/client/photos.rb +22 -0
  19. data/lib/bookingsync/api/client/rates.rb +23 -0
  20. data/lib/bookingsync/api/client/rates_rules.rb +22 -0
  21. data/lib/bookingsync/api/client/rates_tables.rb +53 -0
  22. data/lib/bookingsync/api/client/rental_agreements.rb +50 -0
  23. data/lib/bookingsync/api/client/rentals.rb +39 -1
  24. data/lib/bookingsync/api/client/reviews.rb +31 -0
  25. data/lib/bookingsync/api/client/seasons.rb +53 -0
  26. data/lib/bookingsync/api/client/special_offers.rb +54 -0
  27. data/lib/bookingsync/api/relation.rb +87 -0
  28. data/lib/bookingsync/api/resource.rb +58 -0
  29. data/lib/bookingsync/api/response.rb +79 -0
  30. data/lib/bookingsync/api/serializer.rb +100 -0
  31. data/lib/bookingsync/api/version.rb +1 -1
  32. data/spec/bookingsync/api/client/amenities_spec.rb +12 -0
  33. data/spec/bookingsync/api/client/billing_addresses_spec.rb +12 -0
  34. data/spec/bookingsync/api/client/billings_payments_spec.rb +12 -0
  35. data/spec/bookingsync/api/client/bookings_spec.rb +10 -8
  36. data/spec/bookingsync/api/client/clients_spec.rb +55 -0
  37. data/spec/bookingsync/api/client/destinations_spec.rb +12 -0
  38. data/spec/bookingsync/api/client/inquiries_spec.rb +1 -1
  39. data/spec/bookingsync/api/client/payments_spec.rb +56 -0
  40. data/spec/bookingsync/api/client/periods_spec.rb +61 -0
  41. data/spec/bookingsync/api/client/photos_spec.rb +12 -0
  42. data/spec/bookingsync/api/client/rates_rules_spec.rb +13 -0
  43. data/spec/bookingsync/api/client/rates_spec.rb +12 -0
  44. data/spec/bookingsync/api/client/rates_tables_spec.rb +59 -0
  45. data/spec/bookingsync/api/client/rental_agreements_spec.rb +64 -0
  46. data/spec/bookingsync/api/client/rentals_spec.rb +56 -6
  47. data/spec/bookingsync/api/client/reviews_spec.rb +33 -0
  48. data/spec/bookingsync/api/client/seasons_spec.rb +61 -0
  49. data/spec/bookingsync/api/client/special_offers_spec.rb +63 -0
  50. data/spec/bookingsync/api/client_spec.rb +31 -10
  51. data/spec/bookingsync/api/relation_spec.rb +72 -0
  52. data/spec/bookingsync/api/resource_spec.rb +79 -0
  53. data/spec/bookingsync/api/response_spec.rb +66 -0
  54. data/spec/cassettes/BookingSync_API_Client_Amenities/_amenities/returns_amenities.yml +72 -0
  55. data/spec/cassettes/BookingSync_API_Client_BillingAddresses/_billing_addresses/returns_billing_addresses.yml +65 -0
  56. data/spec/cassettes/BookingSync_API_Client_Bookings/_bookings/pagination/with_a_block/yields_block_with_batch_of_bookings.yml +12 -12
  57. data/spec/cassettes/BookingSync_API_Client_Bookings/_bookings/pagination/with_auto_paginate_true/returns_all_bookings_joined_from_many_requests.yml +12 -12
  58. data/spec/cassettes/BookingSync_API_Client_Bookings/_bookings/pagination/with_per_page_setting/returns_limited_number_of_bookings.yml +3 -3
  59. data/spec/cassettes/BookingSync_API_Client_Bookings/_clients/returns_clients.yml +66 -0
  60. data/spec/cassettes/BookingSync_API_Client_Bookings/_create_booking/creates_a_booking.yml +1 -1
  61. data/spec/cassettes/BookingSync_API_Client_Bookings/_create_client/creates_a_new_client.yml +64 -0
  62. data/spec/cassettes/BookingSync_API_Client_Bookings/_edit_booking/updates_given_booking_by_ID.yml +18 -14
  63. data/spec/cassettes/BookingSync_API_Client_Bookings/_edit_client/updates_given_client_by_ID.yml +62 -0
  64. data/spec/cassettes/BookingSync_API_Client_BookingsPayments/_bookings_payments/returns_bookings_payments.yml +65 -0
  65. data/spec/cassettes/BookingSync_API_Client_Destinations/_destinations/returns_destinations.yml +64 -0
  66. data/spec/cassettes/BookingSync_API_Client_Inquiries/_create_inquiry/creates_a_new_inquiry.yml +1 -1
  67. data/spec/cassettes/BookingSync_API_Client_Inquiries/_inquiries/returns_inquiries.yml +1 -1
  68. data/spec/cassettes/BookingSync_API_Client_Payments/_cancel_payment/cancels_given_payment.yml +57 -0
  69. data/spec/cassettes/BookingSync_API_Client_Payments/_create_payment/creates_a_new_payment.yml +63 -0
  70. data/spec/cassettes/BookingSync_API_Client_Payments/_edit_payment/updates_given_payment_by_ID.yml +61 -0
  71. data/spec/cassettes/BookingSync_API_Client_Payments/_payments/returns_payments.yml +64 -0
  72. data/spec/cassettes/BookingSync_API_Client_Periods/_create_period/creates_a_new_period.yml +63 -0
  73. data/spec/cassettes/BookingSync_API_Client_Periods/_delete_period/deletes_given_period.yml +70 -0
  74. data/spec/cassettes/BookingSync_API_Client_Periods/_edit_period/updates_given_period_by_ID.yml +61 -0
  75. data/spec/cassettes/BookingSync_API_Client_Periods/_periods/returns_periods.yml +64 -0
  76. data/spec/cassettes/BookingSync_API_Client_Photos/_photos/returns_photos.yml +72 -0
  77. data/spec/cassettes/BookingSync_API_Client_Rates/_rates/returns_rates.yml +64 -0
  78. data/spec/cassettes/BookingSync_API_Client_RatesRules/_rates_rules/returns_rates_rules.yml +64 -0
  79. data/spec/cassettes/BookingSync_API_Client_RatesTables/_create_rates_table/creates_a_new_rates_table.yml +64 -0
  80. data/spec/cassettes/BookingSync_API_Client_RatesTables/_delete_rates_table/deletes_given_rates_table.yml +57 -0
  81. data/spec/cassettes/BookingSync_API_Client_RatesTables/_edit_rates_table/updates_given_rates_table_by_ID.yml +62 -0
  82. data/spec/cassettes/BookingSync_API_Client_RatesTables/_rates_tables/returns_rates_tables.yml +74 -0
  83. data/spec/cassettes/BookingSync_API_Client_RentalAgreements/_create_rental_agreement/creates_a_new_rental_agreement.yml +63 -0
  84. data/spec/cassettes/BookingSync_API_Client_RentalAgreements/_create_rental_agreement_for_booking/creates_a_new_rental_agreement.yml +63 -0
  85. data/spec/cassettes/BookingSync_API_Client_RentalAgreements/_create_rental_agreement_for_rental/creates_a_new_rental_agreement.yml +63 -0
  86. data/spec/cassettes/BookingSync_API_Client_RentalAgreements/_rental_agreements/returns_rental_agreements.yml +64 -0
  87. data/spec/cassettes/BookingSync_API_Client_Rentals/_cancel_rental/cancels_given_rental.yml +57 -0
  88. data/spec/cassettes/BookingSync_API_Client_Rentals/_create_rental/creates_a_new_rental.yml +64 -0
  89. data/spec/cassettes/BookingSync_API_Client_Rentals/_edit_rental/updates_given_rental_by_ID.yml +64 -0
  90. data/spec/cassettes/BookingSync_API_Client_Rentals/_rental/returns_a_single_rental.yml +67 -0
  91. data/spec/cassettes/BookingSync_API_Client_Rentals/_rentals/links/returns_associated_photos.yml +152 -0
  92. data/spec/cassettes/BookingSync_API_Client_Rentals/_rentals/links/returns_links_to_associated_resources.yml +91 -0
  93. data/spec/cassettes/BookingSync_API_Client_Rentals/_rentals/returns_rentals.yml +45 -20
  94. data/spec/cassettes/BookingSync_API_Client_Reviews/_create_review/creates_a_new_review.yml +64 -0
  95. data/spec/cassettes/BookingSync_API_Client_Reviews/_reviews/returns_reviews.yml +83 -0
  96. data/spec/cassettes/BookingSync_API_Client_Seasons/_create_season/creates_a_new_season.yml +64 -0
  97. data/spec/cassettes/BookingSync_API_Client_Seasons/_delete_season/deletes_given_season.yml +57 -0
  98. data/spec/cassettes/BookingSync_API_Client_Seasons/_edit_season/updates_given_season_by_ID.yml +62 -0
  99. data/spec/cassettes/BookingSync_API_Client_Seasons/_seasons/returns_seasons.yml +74 -0
  100. data/spec/cassettes/BookingSync_API_Client_SpecialOffers/_create_special_offer/creates_a_new_special_offer.yml +63 -0
  101. data/spec/cassettes/BookingSync_API_Client_SpecialOffers/_delete_special_offer/deletes_given_special_offer.yml +57 -0
  102. data/spec/cassettes/BookingSync_API_Client_SpecialOffers/_edit_special_offer/updates_given_special_offer_by_ID.yml +61 -0
  103. data/spec/cassettes/{BookingSync_API_Client_Rentals/_rentals/with_specified_fields_in_options/returns_rentals_with_filtered_fields.yml → BookingSync_API_Client_SpecialOffers/_special_offers/returns_special_offers.yml} +17 -10
  104. data/spec/spec_helper.rb +1 -0
  105. metadata +143 -7
  106. data/lib/bookingsync/ext/resource.rb +0 -9
@@ -1,9 +0,0 @@
1
- module Sawyer
2
- class Resource
3
- # With below alias it's possible to pass ID or Sawyer::Resource
4
- # to edit/destroy methods
5
- def to_s
6
- id
7
- end
8
- end
9
- end