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

toJson() fails on ApiContext of an user person due to session context #56

Closed
OGKevin opened this issue Oct 11, 2017 · 1 comment · Fixed by #57
Closed

toJson() fails on ApiContext of an user person due to session context #56

OGKevin opened this issue Oct 11, 2017 · 1 comment · Fixed by #57

Comments

@OGKevin
Copy link
Contributor

OGKevin commented Oct 11, 2017

Steps to reproduce:

  1. Make an ApiContext with an UserPerson API key
  2. Call the toJson() method on this context

What should happen:

  1. The user will get a JSON representation of the ApiContext

What happens:

  1. You will get the following error:
Return value of bunq\Model\Core\SessionServer::getUserCompany() must be an instance of bunq\Model\Generated\Endpoint\UserCompany, null returned
 /Users/khellemun/GitHub/bunq/sdk_php/src/Model/Core/SessionServer.php:79
 /Users/khellemun/GitHub/bunq/sdk_php/src/Context/SessionContext.php:76
 /Users/khellemun/GitHub/bunq/sdk_php/src/Context/SessionContext.php:64
 /Users/khellemun/GitHub/bunq/sdk_php/src/Context/SessionContext.php:52
 /Users/khellemun/GitHub/bunq/sdk_php/src/Context/ApiContext.php:164
 /Users/khellemun/GitHub/bunq/sdk_php/src/Context/ApiContext.php:123
 /Users/khellemun/GitHub/bunq/sdk_php/src/Context/ApiContext.php:110
 /Users/khellemun/GitHub/bunq/sdk_php/tests/BunqSdkTestBase.php:64
 /Users/khellemun/GitHub/bunq/sdk_php/tests/Context/ApiContextTest.php:22
 

Extra info:

@basst85
Copy link

basst85 commented Oct 11, 2017

Thanks for writing this issue 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants