Refunds.php 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. <?php
  2. namespace Culqi;
  3. /**
  4. * Class Plans
  5. *
  6. * @package Culqi
  7. */
  8. class Refunds extends Resource {
  9. const URL_REFUNDS = "/refunds/";
  10. /**
  11. * @param array|null $options
  12. *
  13. * @return all Refunds.
  14. */
  15. public function all($options = NULL) {
  16. return $this->request("GET", self::URL_REFUNDS, $api_key = $this->culqi->api_key, $options);
  17. }
  18. /**
  19. * @param array|null $options
  20. *
  21. * @return create Refund response.
  22. */
  23. public function create($options = NULL) {
  24. return $this->request("POST", self::URL_REFUNDS, $api_key = $this->culqi->api_key, $options);
  25. }
  26. /**
  27. * @param string|null $id
  28. *
  29. * @return get a Refund.
  30. */
  31. public function get($id = NULL) {
  32. return $this->request("GET", self::URL_REFUNDS . $id . "/", $api_key = $this->culqi->api_key);
  33. }
  34. /**
  35. * @param string|null $id
  36. * @param array|null $options
  37. *
  38. * @return update Refund response.
  39. */
  40. public function update($id = NULL, $options = NULL) {
  41. return $this->request("PATCH", self::URL_REFUNDS . $id . "/", $api_key = $this->culqi->api_key, $options);
  42. }
  43. }