Make the Client parameter optional for requests

Make the Client parameter optional when creating auth token, customer or
order requests, and create a new Client instance within the abstract
request if one isn't passed in.
This commit is contained in:
Oliver Davies 2020-06-05 20:59:12 +01:00
parent 532dfd43a1
commit 2ba89e1c6a
10 changed files with 15 additions and 14 deletions

View file

@ -10,7 +10,7 @@ final class AuthTokenRequest extends AbstractRequest implements AuthTokenRequest
{
$response = $this->client->request(
'POST',
self::BASE_URL.self::ENDPOINT,
self::ENDPOINT,
[
'query' => [
'password' => $this->config->getPassword(),