Topup.php 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. <?php
  2. namespace Stripe;
  3. /**
  4. * Class Topup
  5. *
  6. * @property string $id
  7. * @property string $object
  8. * @property int $amount
  9. * @property string $balance_transaction
  10. * @property int $created
  11. * @property string $currency
  12. * @property string $description
  13. * @property int $expected_availability_date
  14. * @property string $failure_code
  15. * @property string $failure_message
  16. * @property bool $livemode
  17. * @property StripeObject $metadata
  18. * @property mixed $source
  19. * @property string $statement_descriptor
  20. * @property string $status
  21. *
  22. * @package Stripe
  23. */
  24. class Topup extends ApiResource
  25. {
  26. const OBJECT_NAME = "topup";
  27. use ApiOperations\All;
  28. use ApiOperations\Create;
  29. use ApiOperations\Retrieve;
  30. use ApiOperations\Update;
  31. /**
  32. * @param array|null $params
  33. * @param array|string|null $options
  34. *
  35. * @return Topup The canceled topup.
  36. */
  37. public function cancel($params = null, $options = null)
  38. {
  39. $url = $this->instanceUrl() . '/cancel';
  40. list($response, $opts) = $this->_request('post', $url, $params, $options);
  41. $this->refreshFrom($response, $opts);
  42. return $this;
  43. }
  44. }