Skip to content

Commit

Permalink
Merge pull request #203 from bunq/feature/sdk_php#202_deprecate_sandb…
Browse files Browse the repository at this point in the history
…ox_user

feature/sdk_php#202 Deprecated /sandbox-user
  • Loading branch information
angelomelonas authored Sep 11, 2020
2 parents dc29732 + e484713 commit a2f9a80
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/Http/ApiClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down
12 changes: 6 additions & 6 deletions src/Model/Core/SandboxUserInternal.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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);
}
Expand All @@ -41,7 +41,7 @@ public static function create(
$customHeaders
);

return BunqResponseSandboxUser::castFromBunqResponse(
return BunqResponseSandboxUserPerson::castFromBunqResponse(
static::fromJson($responseRaw, self::OBJECT_TYPE_POST)
);
}
Expand Down
1 change: 0 additions & 1 deletion tests/Context/Psd2ApiContextTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down

0 comments on commit a2f9a80

Please sign in to comment.