Module: BookingSync::API::Client::Reviews
- Included in:
- BookingSync::API::Client
- Defined in:
- lib/bookingsync/api/client/reviews.rb
Instance Method Summary collapse
-
#create_review(booking, options = {}) ⇒ BookingSync::API::Resource
Create a new review.
-
#dismiss_review(review, options = {}) ⇒ BookingSync::API::Resource
Dismiss a review.
-
#review(review, options = {}) ⇒ BookingSync::API::Resource
Get a single review.
-
#reviews(options = {}, &block) ⇒ Array<BookingSync::API::Resource>
List reviews.
Instance Method Details
#create_review(booking, options = {}) ⇒ BookingSync::API::Resource
Create a new review
38 39 40 |
# File 'lib/bookingsync/api/client/reviews.rb', line 38 def create_review(booking, = {}) post("bookings/#{booking}/reviews", reviews: []).pop end |
#dismiss_review(review, options = {}) ⇒ BookingSync::API::Resource
Dismiss a review
48 49 50 |
# File 'lib/bookingsync/api/client/reviews.rb', line 48 def dismiss_review(review, = {}) put("reviews/#{review}/dismiss", reviews: []).pop end |
#review(review, options = {}) ⇒ BookingSync::API::Resource
Get a single review
28 29 30 |
# File 'lib/bookingsync/api/client/reviews.rb', line 28 def review(review, = {}) get("reviews/#{review}", ).pop end |
#reviews(options = {}, &block) ⇒ Array<BookingSync::API::Resource>
List reviews
Returns reviews for the account user is authenticated with.
17 18 19 |
# File 'lib/bookingsync/api/client/reviews.rb', line 17 def reviews( = {}, &block) paginate :reviews, , &block end |