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

FatalThrowableError when using linkCardToBankAccount #158

Closed
1 of 2 tasks
svenpopping opened this issue Sep 1, 2018 · 1 comment
Closed
1 of 2 tasks

FatalThrowableError when using linkCardToBankAccount #158

svenpopping opened this issue Sep 1, 2018 · 1 comment

Comments

@svenpopping
Copy link

Steps to reproduce:

  1. Call function linkCardToBankAccount in BunqLib with Card and MonetaryAccountBank

What should happen:

  1. Card should be linked to the given MonetaryAccountBank

What happens:

  1. ype error: Argument 2 passed to bunq\\Model\\Generated\\Object\\CardPinAssignment::__construct() must be of the type string, null given

Traceback

Type error: Argument 2 passed to bunq\Model\Generated\Object\CardPinAssignment::__construct() must be of the type string, null given, called in /bunq/src/BunqLib.php on line 411

SDK version and environment

  • Tested on 0.12.4
  • Sandbox
  • Production
@OGKevin
Copy link
Contributor

OGKevin commented Sep 1, 2018

🤔 I think this is the wrong repo. Please open this issue in bunq/tinker_php.

Second, this error seems really weird

/**
* @param string $type PIN type. Can be PRIMARY, SECONDARY or TERTIARY
* @param string|null $pinCode The 4 digit PIN to be assigned to this
* account.
* @param int|null $monetaryAccountId The ID of the monetary account to
* assign to this pin for the card.
*/
public function __construct(string $type, string $pinCode = null, int $monetaryAccountId = null)
{
$this->typeFieldForRequest = $type;
$this->pinCodeFieldForRequest = $pinCode;
$this->monetaryAccountIdFieldForRequest = $monetaryAccountId;
}

as it can be null 🤔

@OGKevin OGKevin closed this as completed Sep 1, 2018
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