Class: Stripe::ReviewService
- Inherits:
-
StripeService
- Object
- StripeService
- Stripe::ReviewService
- Defined in:
- lib/stripe/services/review_service.rb
Instance Method Summary collapse
-
#approve(review, params = {}, opts = {}) ⇒ Object
Approves a Review object, closing it and removing it from the list of reviews.
-
#list(params = {}, opts = {}) ⇒ Object
Returns a list of Review objects that have open set to true.
-
#retrieve(review, params = {}, opts = {}) ⇒ Object
Retrieves a Review object.
Methods inherited from StripeService
#initialize, #request, #request_stream
Constructor Details
This class inherits a constructor from Stripe::StripeService
Instance Method Details
#approve(review, params = {}, opts = {}) ⇒ Object
Approves a Review object, closing it and removing it from the list of reviews.
7 8 9 10 11 12 13 14 15 |
# File 'lib/stripe/services/review_service.rb', line 7 def approve(review, params = {}, opts = {}) request( method: :post, path: format("/v1/reviews/%<review>s/approve", { review: CGI.escape(review) }), params: params, opts: opts, base_address: :api ) end |
#list(params = {}, opts = {}) ⇒ Object
Returns a list of Review objects that have open set to true. The objects are sorted in descending order by creation date, with the most recently created object appearing first.
18 19 20 |
# File 'lib/stripe/services/review_service.rb', line 18 def list(params = {}, opts = {}) request(method: :get, path: "/v1/reviews", params: params, opts: opts, base_address: :api) end |
#retrieve(review, params = {}, opts = {}) ⇒ Object
Retrieves a Review object.
23 24 25 26 27 28 29 30 31 |
# File 'lib/stripe/services/review_service.rb', line 23 def retrieve(review, params = {}, opts = {}) request( method: :get, path: format("/v1/reviews/%<review>s", { review: CGI.escape(review) }), params: params, opts: opts, base_address: :api ) end |