SettingsService.php 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. <?php
  2. // File generated from our OpenAPI spec
  3. namespace Stripe\Service\Tax;
  4. /**
  5. * @phpstan-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
  6. * @psalm-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
  7. */
  8. class SettingsService extends \Stripe\Service\AbstractService
  9. {
  10. /**
  11. * Retrieves Tax <code>Settings</code> for a merchant.
  12. *
  13. * @param null|array $params
  14. * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
  15. *
  16. * @throws \Stripe\Exception\ApiErrorException if the request fails
  17. *
  18. * @return \Stripe\Tax\Settings
  19. */
  20. public function retrieve($params = null, $opts = null)
  21. {
  22. return $this->request('get', '/v1/tax/settings', $params, $opts);
  23. }
  24. /**
  25. * Updates Tax <code>Settings</code> parameters used in tax calculations. All
  26. * parameters are editable but none can be removed once set.
  27. *
  28. * @param null|array $params
  29. * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
  30. *
  31. * @throws \Stripe\Exception\ApiErrorException if the request fails
  32. *
  33. * @return \Stripe\Tax\Settings
  34. */
  35. public function update($params = null, $opts = null)
  36. {
  37. return $this->request('post', '/v1/tax/settings', $params, $opts);
  38. }
  39. }