| 1 |
<?php |
| 2 |
|
| 3 |
// File generated from our OpenAPI spec |
| 4 |
|
| 5 |
namespace Stripe\Service; |
| 6 |
|
| 7 |
class DisputeService extends \Stripe\Service\AbstractService |
| 8 |
{ |
| 9 |
/** |
| 10 |
* Returns a list of your disputes. |
| 11 |
* |
| 12 |
* @param null|array $params |
| 13 |
* @param null|array|\Stripe\Util\RequestOptions $opts |
| 14 |
* |
| 15 |
* @throws \Stripe\Exception\ApiErrorException if the request fails |
| 16 |
* |
| 17 |
* @return \Stripe\Collection<\Stripe\Dispute> |
| 18 |
*/ |
| 19 |
public function all($params = null, $opts = null) |
| 20 |
{ |
| 21 |
return $this->requestCollection('get', '/v1/disputes', $params, $opts); |
| 22 |
} |
| 23 |
|
| 24 |
/** |
| 25 |
* Closing the dispute for a charge indicates that you do not have any evidence to |
| 26 |
* submit and are essentially dismissing the dispute, acknowledging it as lost. |
| 27 |
* |
| 28 |
* The status of the dispute will change from <code>needs_response</code> to |
| 29 |
* <code>lost</code>. <em>Closing a dispute is irreversible</em>. |
| 30 |
* |
| 31 |
* @param string $id |
| 32 |
* @param null|array $params |
| 33 |
* @param null|array|\Stripe\Util\RequestOptions $opts |
| 34 |
* |
| 35 |
* @throws \Stripe\Exception\ApiErrorException if the request fails |
| 36 |
* |
| 37 |
* @return \Stripe\Dispute |
| 38 |
*/ |
| 39 |
public function close($id, $params = null, $opts = null) |
| 40 |
{ |
| 41 |
return $this->request('post', $this->buildPath('/v1/disputes/%s/close', $id), $params, $opts); |
| 42 |
} |
| 43 |
|
| 44 |
/** |
| 45 |
* Retrieves the dispute with the given ID. |
| 46 |
* |
| 47 |
* @param string $id |
| 48 |
* @param null|array $params |
| 49 |
* @param null|array|\Stripe\Util\RequestOptions $opts |
| 50 |
* |
| 51 |
* @throws \Stripe\Exception\ApiErrorException if the request fails |
| 52 |
* |
| 53 |
* @return \Stripe\Dispute |
| 54 |
*/ |
| 55 |
public function retrieve($id, $params = null, $opts = null) |
| 56 |
{ |
| 57 |
return $this->request('get', $this->buildPath('/v1/disputes/%s', $id), $params, $opts); |
| 58 |
} |
| 59 |
|
| 60 |
/** |
| 61 |
* When you get a dispute, contacting your customer is always the best first step. |
| 62 |
* If that doesn’t work, you can submit evidence to help us resolve the dispute in |
| 63 |
* your favor. You can do this in your <a |
| 64 |
* href="https://dashboard.stripe.com/disputes">dashboard</a>, but if you prefer, |
| 65 |
* you can use the API to submit evidence programmatically. |
| 66 |
* |
| 67 |
* Depending on your dispute type, different evidence fields will give you a better |
| 68 |
* chance of winning your dispute. To figure out which evidence fields to provide, |
| 69 |
* see our <a href="/docs/disputes/categories">guide to dispute types</a>. |
| 70 |
* |
| 71 |
* @param string $id |
| 72 |
* @param null|array $params |
| 73 |
* @param null|array|\Stripe\Util\RequestOptions $opts |
| 74 |
* |
| 75 |
* @throws \Stripe\Exception\ApiErrorException if the request fails |
| 76 |
* |
| 77 |
* @return \Stripe\Dispute |
| 78 |
*/ |
| 79 |
public function update($id, $params = null, $opts = null) |
| 80 |
{ |
| 81 |
return $this->request('post', $this->buildPath('/v1/disputes/%s', $id), $params, $opts); |
| 82 |
} |
| 83 |
} |
| 84 |
|