Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature/sdk_php#202 Deprecated /sandbox-user #203

Merged
merged 2 commits into from
Sep 11, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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