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

Can't use public functions in endpoints #172

Closed
1 of 2 tasks
nouce opened this issue Jan 24, 2019 · 2 comments
Closed
1 of 2 tasks

Can't use public functions in endpoints #172

nouce opened this issue Jan 24, 2019 · 2 comments

Comments

@nouce
Copy link

nouce commented Jan 24, 2019

Steps to reproduce:

  1. If i want to display the user persons public nick name i need to do it like this:
use bunq\Model\Generated\Endpoint\UserPerson;
use bunq\Model\Generated\Endpoint\Payment;

$apiContext = ApiContext::restore(storage_path('bunq/bunq.conf'));
$bunqContext = BunqContext::loadApiContext($apiContext);

$userPerson = UserPerson::get();
dd($userPerson->getPublicNickName());

According to the bunq sdk_php documantation.

What should happen:

  1. It should output the public nick name

What happens:

  1. I get this error
    Call to undefined method bunq\Model\Generated\Endpoint\BunqResponseUserPerson::getPublicNickName()

SDK version and environment

  • Tested on 0.12.4
  • Sandbox
  • Production

Extra info:

@basst85
Copy link

basst85 commented Jan 24, 2019

Hello @nouce , i think you forget to use "getValue()" first 🙂

This works:

$userPerson = UserPerson::get();
echo $userPerson->getValue()->getPublicNickName();

@nouce
Copy link
Author

nouce commented Jan 24, 2019

Jup, that works! Thanks for the help men 👍🏻

@nouce nouce closed this as completed Jan 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants