Refund.php 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. <?php
  2. namespace Stripe;
  3. /**
  4. * Class Refund
  5. *
  6. * @property string $id
  7. * @property string $object
  8. * @property int $amount
  9. * @property mixed $balance_transaction
  10. * @property string $charge
  11. * @property int $created
  12. * @property string $currency
  13. * @property mixed $metadata
  14. * @property mixed $reason
  15. * @property mixed $receipt_number
  16. * @property string $status
  17. *
  18. * @package Stripe
  19. */
  20. class Refund extends ApiResource
  21. {
  22. /**
  23. * @param string $id The ID of the refund to retrieve.
  24. * @param array|string|null $options
  25. *
  26. * @return Refund
  27. */
  28. public static function retrieve($id, $options = null)
  29. {
  30. return self::_retrieve($id, $options);
  31. }
  32. /**
  33. * @param string $id The ID of the refund to update.
  34. * @param array|null $params
  35. * @param array|string|null $options
  36. *
  37. * @return Refund The updated refund.
  38. */
  39. public static function update($id, $params = null, $options = null)
  40. {
  41. return self::_update($id, $params, $options);
  42. }
  43. /**
  44. * @param array|null $params
  45. * @param array|string|null $options
  46. *
  47. * @return Collection of Refunds
  48. */
  49. public static function all($params = null, $options = null)
  50. {
  51. return self::_all($params, $options);
  52. }
  53. /**
  54. * @param array|null $params
  55. * @param array|string|null $options
  56. *
  57. * @return Refund The created refund.
  58. */
  59. public static function create($params = null, $options = null)
  60. {
  61. return self::_create($params, $options);
  62. }
  63. /**
  64. * @param array|string|null $opts
  65. *
  66. * @return Refund The saved refund.
  67. */
  68. public function save($opts = null)
  69. {
  70. return $this->_save($opts);
  71. }
  72. }