| 1 |
<?php |
| 2 |
|
| 3 |
declare(strict_types=1); |
| 4 |
|
| 5 |
namespace Square\Legacy; |
| 6 |
|
| 7 |
use CoreInterfaces\Http\HttpConfigurations; |
| 8 |
use Square\Legacy\Authentication\BearerAuthCredentialsBuilder; |
| 9 |
|
| 10 |
/** |
| 11 |
* An interface for all configuration parameters required by the SDK. |
| 12 |
*/ |
| 13 |
interface ConfigurationInterface extends HttpConfigurations |
| 14 |
{ |
| 15 |
/** |
| 16 |
* Get square Connect API versions |
| 17 |
*/ |
| 18 |
public function getSquareVersion(): string; |
| 19 |
|
| 20 |
/** |
| 21 |
* Get additional headers to add to each API call |
| 22 |
*/ |
| 23 |
public function getAdditionalHeaders(): array; |
| 24 |
|
| 25 |
/** |
| 26 |
* Get user agent detail, to be appended with user-agent header. |
| 27 |
*/ |
| 28 |
public function getUserAgentDetail(): string; |
| 29 |
|
| 30 |
/** |
| 31 |
* Get current API environment |
| 32 |
*/ |
| 33 |
public function getEnvironment(): string; |
| 34 |
|
| 35 |
/** |
| 36 |
* Get sets the base URL requests are made to. Defaults to `https://connect.squareup.com` |
| 37 |
*/ |
| 38 |
public function getCustomUrl(): string; |
| 39 |
|
| 40 |
/** |
| 41 |
* Get the credentials to use with BearerAuth |
| 42 |
*/ |
| 43 |
public function getBearerAuthCredentials(): BearerAuthCredentials; |
| 44 |
|
| 45 |
/** |
| 46 |
* Get the credentials builder instance to update credentials for BearerAuth |
| 47 |
*/ |
| 48 |
public function getBearerAuthCredentialsBuilder(): ?BearerAuthCredentialsBuilder; |
| 49 |
|
| 50 |
/** |
| 51 |
* Get the base uri for a given server in the current environment. |
| 52 |
* |
| 53 |
* @param string $server Server name |
| 54 |
* |
| 55 |
* @return string Base URI |
| 56 |
*/ |
| 57 |
public function getBaseUri(string $server = Server::DEFAULT_): string; |
| 58 |
} |
| 59 |
|