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

Event object Payment.counterparty_alias is None #116

Open
1 of 2 tasks
wilmardo opened this issue Sep 1, 2019 · 2 comments
Open
1 of 2 tasks

Event object Payment.counterparty_alias is None #116

wilmardo opened this issue Sep 1, 2019 · 2 comments

Comments

@wilmardo
Copy link

wilmardo commented Sep 1, 2019

Steps to reproduce:

  1. Request events with the endpoint.Event.list()
  2. If an event has event.object_.Payment defined both the counterparty_alias.label_monetary_account and counterparty_alias.pointer are None

Quick test code:

        # Get payments
        payments = endpoint.Payment.list(
            monetary_account_id=monetary_account_id,
            params=params,
        ).value

        # Add parameters to only list for current monetary_account_id
        params['monetary_account_id'] = monetary_account_id      
        params['display_user_event'] = 'false'

        # Get events
        events = endpoint.Event.list(
            params=params,
        ).value

        for payment in payments:
            print(payment.counterparty_alias.label_monetary_account)
            
        for event in events:
            if event.object_.Payment:
                print(event.object_.Payment.counterparty_alias.label_monetary_account)

Output:

<bunq.sdk.model.generated.object_.LabelMonetaryAccount object at 0x7f3489f4ab70>
<bunq.sdk.model.generated.object_.LabelMonetaryAccount object at 0x7f3489f4d668>
<bunq.sdk.model.generated.object_.LabelMonetaryAccount object at 0x7f3489ed1160>
None
None
None

What should happen:

  1. The Payment object within Event.object_ should have the same attributes as the Payment object

What happens:

  1. the counterparty_alias variables are None

Traceback

SDK version and environment

  • Tested on 1.10.16
  • Sandbox
  • Production
@wilmardo
Copy link
Author

@OGKevin ping, don't want to be rude but the Bunq support is of no help in this case haha

@wilmardo
Copy link
Author

wilmardo commented Oct 18, 2019

payment._counterparty_alias._ERROR_COULD_NOT_INSTANTIATE: ''Could not directly instantiate MonetaryAccountReference. Please use the class factory methods.''

This is the error thrown :)

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