-
Notifications
You must be signed in to change notification settings - Fork 117
Open
Labels
Description
General information
- SDK/Library version: 3.59.0
- Environment: Local testing
- Language, language version, and OS: Python 3.8.6 (
python:3.8-buster
Docker image)
Issue description
Test disbursement webhook notifications are missing the disbursement_type
attribute, causing the is_credit()
and is_debit()
methods to throw AttributeErrors
:
>>> webhook_notification = self.gateway.webhook_testing.sample_notification(
>>> braintree.WebhookNotification.Kind.Disbursement,
>>> "test_disbursement_id",
>>> )
>>> webhook_notification.disbursement.is_credit()
Traceback (most recent call last):
File "<pudb command line>", line 1, in <module>
File "/usr/local/lib/python3.8/site-packages/braintree/disbursement.py", line 27, in is_credit
return self.disbursement_type == Disbursement.Type.Credit
AttributeError: 'Disbursement' object has no attribute 'disbursement_type'