| 1 |
<?php |
| 2 |
|
| 3 |
// File generated from our OpenAPI spec |
| 4 |
|
| 5 |
namespace Stripe\Service; |
| 6 |
|
| 7 |
class ReviewService extends \Stripe\Service\AbstractService |
| 8 |
{ |
| 9 |
/** |
| 10 |
* Returns a list of <code>Review</code> objects that have <code>open</code> set to |
| 11 |
* <code>true</code>. The objects are sorted in descending order by creation date, |
| 12 |
* with the most recently created object appearing first. |
| 13 |
* |
| 14 |
* @param null|array $params |
| 15 |
* @param null|array|\Stripe\Util\RequestOptions $opts |
| 16 |
* |
| 17 |
* @throws \Stripe\Exception\ApiErrorException if the request fails |
| 18 |
* |
| 19 |
* @return \Stripe\Collection<\Stripe\Review> |
| 20 |
*/ |
| 21 |
public function all($params = null, $opts = null) |
| 22 |
{ |
| 23 |
return $this->requestCollection('get', '/v1/reviews', $params, $opts); |
| 24 |
} |
| 25 |
|
| 26 |
/** |
| 27 |
* Approves a <code>Review</code> object, closing it and removing it from the list |
| 28 |
* of reviews. |
| 29 |
* |
| 30 |
* @param string $id |
| 31 |
* @param null|array $params |
| 32 |
* @param null|array|\Stripe\Util\RequestOptions $opts |
| 33 |
* |
| 34 |
* @throws \Stripe\Exception\ApiErrorException if the request fails |
| 35 |
* |
| 36 |
* @return \Stripe\Review |
| 37 |
*/ |
| 38 |
public function approve($id, $params = null, $opts = null) |
| 39 |
{ |
| 40 |
return $this->request('post', $this->buildPath('/v1/reviews/%s/approve', $id), $params, $opts); |
| 41 |
} |
| 42 |
|
| 43 |
/** |
| 44 |
* Retrieves a <code>Review</code> object. |
| 45 |
* |
| 46 |
* @param string $id |
| 47 |
* @param null|array $params |
| 48 |
* @param null|array|\Stripe\Util\RequestOptions $opts |
| 49 |
* |
| 50 |
* @throws \Stripe\Exception\ApiErrorException if the request fails |
| 51 |
* |
| 52 |
* @return \Stripe\Review |
| 53 |
*/ |
| 54 |
public function retrieve($id, $params = null, $opts = null) |
| 55 |
{ |
| 56 |
return $this->request('get', $this->buildPath('/v1/reviews/%s', $id), $params, $opts); |
| 57 |
} |
| 58 |
} |
| 59 |
|