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

Cant list/edit credit cards #208

Open
2 tasks done
Shafied opened this issue Nov 19, 2020 · 0 comments
Open
2 tasks done

Cant list/edit credit cards #208

Shafied opened this issue Nov 19, 2020 · 0 comments

Comments

@Shafied
Copy link

Shafied commented Nov 19, 2020

Steps to reproduce:

  1. Import all Cards (Debit & Credit cards)

  2. It will only return Debit Cards

  3. Use the endpoint to edit a Credit Card

  4. It will not return data

What should happen:

  1. Show a list of both Credit and Debit cards

What happens:

  1. You can only add/view Debit Cards

Traceback

In the function bunq\Model\Generated\Endpoint\Card::listing

return BunqResponseCardList::castFromBunqResponse(
static::fromJsonList($responseRaw, self::OBJECT_TYPE_GET)
);

And in the function bunq\Model\Generated\Endpoint\Card::get

return BunqResponseCard::castFromBunqResponse(
static::fromJson($responseRaw, self::OBJECT_TYPE_GET)
);

The const OBJECT_TYPE_GET is always CardCredit. So this is why all card are being mapped correctly. Since this is in generated code. I can't create a PR to fix it.

const OBJECT_TYPE_GET = 'CardDebit';

SDK version and environment

  • Tested on 1.14.18
  • Sandbox
  • Production

Response id

  • Response id:

Extra info:

The wrapper should be dynamic instead of hardcoded. Or the "Card" class should be made so that it can handle both Credit And Debit Cards. For the put endpoit you do have 2 different entities

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

1 participant