Dispute.php 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. <?php
  2. // File generated from our OpenAPI spec
  3. namespace Stripe\Issuing;
  4. /**
  5. * As a <a href="https://stripe.com/docs/issuing">card issuer</a>, you can dispute
  6. * transactions that the cardholder does not recognize, suspects to be fraudulent,
  7. * or has other issues with.
  8. *
  9. * Related guide: <a
  10. * href="https://stripe.com/docs/issuing/purchases/disputes">Disputing
  11. * Transactions</a>
  12. *
  13. * @property string $id Unique identifier for the object.
  14. * @property string $object String representing the object's type. Objects of the same type share the same value.
  15. * @property int $amount Disputed amount. Usually the amount of the <code>disputed_transaction</code>, but can differ (usually because of currency fluctuation).
  16. * @property null|\Stripe\BalanceTransaction[] $balance_transactions List of balance transactions associated with the dispute.
  17. * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
  18. * @property string $currency The currency the <code>disputed_transaction</code> was made in.
  19. * @property \Stripe\StripeObject $evidence
  20. * @property bool $livemode Has the value <code>true</code> if the object exists in live mode or the value <code>false</code> if the object exists in test mode.
  21. * @property \Stripe\StripeObject $metadata Set of <a href="https://stripe.com/docs/api/metadata">key-value pairs</a> that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
  22. * @property string $status Current status of the dispute.
  23. * @property string|\Stripe\Issuing\Transaction $transaction The transaction being disputed.
  24. */
  25. class Dispute extends \Stripe\ApiResource
  26. {
  27. const OBJECT_NAME = 'issuing.dispute';
  28. use \Stripe\ApiOperations\All;
  29. use \Stripe\ApiOperations\Create;
  30. use \Stripe\ApiOperations\Retrieve;
  31. use \Stripe\ApiOperations\Update;
  32. /**
  33. * @param null|array $params
  34. * @param null|array|string $opts
  35. *
  36. * @throws \Stripe\Exception\ApiErrorException if the request fails
  37. *
  38. * @return Dispute the submited dispute
  39. */
  40. public function submit($params = null, $opts = null)
  41. {
  42. $url = $this->instanceUrl() . '/submit';
  43. list($response, $opts) = $this->_request('post', $url, $params, $opts);
  44. $this->refreshFrom($response, $opts);
  45. return $this;
  46. }
  47. }