SKU.php 1.6 KB

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