bunq / sdk_php

PHP SDK for bunq API
MIT License
84 stars 54 forks source link

FatalThrowableError when using linkCardToBankAccount #158

Closed svenpopping closed 6 years ago

svenpopping commented 6 years ago

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

OGKevin commented 6 years ago

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

Second, this error seems really weird

https://github.com/bunq/sdk_php/blob/e8024cf633593dbec11d67fa806456111d2a80fb/src/Model/Generated/Object/CardPinAssignment.php#L46-L58

as it can be null 🤔