Module: BookingSync::API::Client::HostReviews
- Included in:
- BookingSync::API::Client
- Defined in:
- lib/bookingsync/api/client/host_reviews.rb
Instance Method Summary collapse
-
#create_draft_host_review(booking, options = {}) ⇒ BookingSync::API::Resource
Create a new non-submitted host review.
-
#create_submitted_host_review(booking, options = {}) ⇒ BookingSync::API::Resource
Create a new submitted host review.
-
#dismiss_host_review(host_review, options = {}) ⇒ BookingSync::API::Resource
Dismiss a host review.
-
#edit_draft_host_review(host_review, options = {}) ⇒ BookingSync::API::Resource
Edit a draft host review.
-
#host_review(host_review, options = {}) ⇒ BookingSync::API::Resource
Get a single host review.
-
#host_reviews(options = {}, &block) ⇒ Array<BookingSync::API::Resource>
List host reviews.
-
#submit_draft_host_review(host_review, options = {}) ⇒ BookingSync::API::Resource
Submit a draft host review.
Instance Method Details
#create_draft_host_review(booking, options = {}) ⇒ BookingSync::API::Resource
Create a new non-submitted host review
38 39 40 |
# File 'lib/bookingsync/api/client/host_reviews.rb', line 38 def create_draft_host_review(booking, = {}) post("bookings/#{booking}/host_reviews/draft", host_reviews: []).pop end |
#create_submitted_host_review(booking, options = {}) ⇒ BookingSync::API::Resource
Create a new submitted host review
48 49 50 |
# File 'lib/bookingsync/api/client/host_reviews.rb', line 48 def create_submitted_host_review(booking, = {}) post("bookings/#{booking}/host_reviews", host_reviews: []).pop end |
#dismiss_host_review(host_review, options = {}) ⇒ BookingSync::API::Resource
Dismiss a host review
90 91 92 |
# File 'lib/bookingsync/api/client/host_reviews.rb', line 90 def dismiss_host_review(host_review, = {}) put("host_reviews/#{host_review}/dismiss", host_reviews: []).pop end |
#edit_draft_host_review(host_review, options = {}) ⇒ BookingSync::API::Resource
Edit a draft host review
62 63 64 |
# File 'lib/bookingsync/api/client/host_reviews.rb', line 62 def edit_draft_host_review(host_review, = {}) put("host_reviews/draft/#{host_review}", host_reviews: []).pop end |
#host_review(host_review, options = {}) ⇒ BookingSync::API::Resource
Get a single host review
28 29 30 |
# File 'lib/bookingsync/api/client/host_reviews.rb', line 28 def host_review(host_review, = {}) get("host_reviews/#{host_review}", ).pop end |
#host_reviews(options = {}, &block) ⇒ Array<BookingSync::API::Resource>
List host reviews
Returns host reviews for the account user is authenticated with.
17 18 19 |
# File 'lib/bookingsync/api/client/host_reviews.rb', line 17 def host_reviews( = {}, &block) paginate :host_reviews, , &block end |
#submit_draft_host_review(host_review, options = {}) ⇒ BookingSync::API::Resource
Submit a draft host review
76 77 78 |
# File 'lib/bookingsync/api/client/host_reviews.rb', line 76 def submit_draft_host_review(host_review, = {}) put("host_reviews/draft/#{host_review}/submit", host_reviews: []).pop end |