From 92b36152ad7f59685545aac13c59239bbef29067 Mon Sep 17 00:00:00 2001 From: Angelo Melonas Date: Fri, 11 Sep 2020 17:59:36 +0200 Subject: [PATCH 1/2] feature/sdk_php#202 Deprecated /sandbox-user --- src/Http/ApiClient.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Http/ApiClient.php b/src/Http/ApiClient.php index 66c2aa6..006a17b 100644 --- a/src/Http/ApiClient.php +++ b/src/Http/ApiClient.php @@ -40,7 +40,7 @@ class ApiClient self::SESSION_SERVER_URL => true, self::PAYMENT_SERVICE_PROVIDER_CREDENTIAL_URL => true, ]; - const SANDBOX_USER_URL = 'sandbox-user'; + const SANDBOX_USER_URL = 'sandbox-user-person'; const DEVICE_SERVER_URL = 'device-server'; const INSTALLATION_URL = 'installation'; const SESSION_SERVER_URL = 'session-server'; From e48471350fc8db2aca2cbb333ea2a7f0af64ca77 Mon Sep 17 00:00:00 2001 From: Angelo Melonas Date: Fri, 11 Sep 2020 18:15:46 +0200 Subject: [PATCH 2/2] feature/sdk_php#202 Deprecated /sandbox-user --- src/Model/Core/SandboxUserInternal.php | 12 ++++++------ tests/Context/Psd2ApiContextTest.php | 1 - 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/src/Model/Core/SandboxUserInternal.php b/src/Model/Core/SandboxUserInternal.php index 6c39b39..15bee5c 100644 --- a/src/Model/Core/SandboxUserInternal.php +++ b/src/Model/Core/SandboxUserInternal.php @@ -4,12 +4,12 @@ use bunq\Context\ApiContext; use bunq\Exception\BunqException; use bunq\Http\ApiClient; -use bunq\Model\Generated\Endpoint\BunqResponseSandboxUser; -use bunq\Model\Generated\Endpoint\SandboxUser; +use bunq\Model\Generated\Endpoint\BunqResponseSandboxUserPerson; +use bunq\Model\Generated\Endpoint\SandboxUserPerson; /** */ -class SandboxUserInternal extends SandboxUser +class SandboxUserInternal extends SandboxUserPerson { /** * Error constants. @@ -20,13 +20,13 @@ class SandboxUserInternal extends SandboxUser * @param string[] $customHeaders * @param ApiContext|null $apiContext * - * @return BunqResponseSandboxUser + * @return BunqResponseSandboxUserPerson * @throws BunqException */ public static function create( array $customHeaders = [], ApiContext $apiContext = null - ): BunqResponseSandboxUser { + ): BunqResponseSandboxUserPerson { if (is_null($apiContext)) { throw new BunqException(self::ERROR_API_CONTEXT_IS_NULL); } @@ -41,7 +41,7 @@ public static function create( $customHeaders ); - return BunqResponseSandboxUser::castFromBunqResponse( + return BunqResponseSandboxUserPerson::castFromBunqResponse( static::fromJson($responseRaw, self::OBJECT_TYPE_POST) ); } diff --git a/tests/Context/Psd2ApiContextTest.php b/tests/Context/Psd2ApiContextTest.php index 497bc95..33b1525 100644 --- a/tests/Context/Psd2ApiContextTest.php +++ b/tests/Context/Psd2ApiContextTest.php @@ -22,7 +22,6 @@ class Psd2ApiContextTest extends TestCase */ const FILE_TEST_CONFIGURATION = __DIR__ . '/PSD2/bunq-psd2-test.conf'; const FILE_TEST_OAUTH = __DIR__ . '/PSD2/bunq-oauth-test.conf'; - const FILE_TEST_CERTIFICATE = __DIR__ . '/PSD2/certificate.cert'; const FILE_TEST_CERTIFICATE_CHAIN = __DIR__ . '/PSD2/certificate.cert'; const FILE_TEST_PRIVATE_KEY = __DIR__ . '/PSD2/private.pem';