StripeClientInterface.php 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. <?php
  2. namespace Stripe;
  3. /**
  4. * Interface for a Stripe client.
  5. */
  6. interface StripeClientInterface
  7. {
  8. /**
  9. * Gets the API key used by the client to send requests.
  10. *
  11. * @return null|string the API key used by the client to send requests
  12. */
  13. public function getApiKey();
  14. /**
  15. * Gets the client ID used by the client in OAuth requests.
  16. *
  17. * @return null|string the client ID used by the client in OAuth requests
  18. */
  19. public function getClientId();
  20. /**
  21. * Gets the base URL for Stripe's API.
  22. *
  23. * @return string the base URL for Stripe's API
  24. */
  25. public function getApiBase();
  26. /**
  27. * Gets the base URL for Stripe's OAuth API.
  28. *
  29. * @return string the base URL for Stripe's OAuth API
  30. */
  31. public function getConnectBase();
  32. /**
  33. * Gets the base URL for Stripe's Files API.
  34. *
  35. * @return string the base URL for Stripe's Files API
  36. */
  37. public function getFilesBase();
  38. /**
  39. * Sends a request to Stripe's API.
  40. *
  41. * @param string $method the HTTP method
  42. * @param string $path the path of the request
  43. * @param array $params the parameters of the request
  44. * @param array|\Stripe\Util\RequestOptions $opts the special modifiers of the request
  45. *
  46. * @return \Stripe\StripeObject the object returned by Stripe's API
  47. */
  48. public function request($method, $path, $params, $opts);
  49. }