From 722561abe2641d1da39b7d252475ef3cf25d5175 Mon Sep 17 00:00:00 2001 From: Farah Aly Date: Thu, 11 Jul 2024 14:04:39 +0100 Subject: [PATCH 1/3] Add StatementDescriptor to Refund class --- mangopay/resources.py | 1 + 1 file changed, 1 insertion(+) diff --git a/mangopay/resources.py b/mangopay/resources.py index 9c1606d..b00088e 100644 --- a/mangopay/resources.py +++ b/mangopay/resources.py @@ -1487,6 +1487,7 @@ class Refund(BaseModel): initial_transaction_type = CharField(api_name='InitialTransactionType', choices=constants.TRANSACTION_TYPE_CHOICES, default=None) reference = CharField(api_name='Reference') + statement_descriptor = CharField(api_name='StatementDescriptor') class Meta: verbose_name = 'refund' From 3cd75cbee2c687bdaf45f65e65a330ea88124629 Mon Sep 17 00:00:00 2001 From: Farah Aly Date: Thu, 11 Jul 2024 14:14:12 +0100 Subject: [PATCH 2/3] Add StatementDescriptor for PayInRefund --- mangopay/resources.py | 1 + 1 file changed, 1 insertion(+) diff --git a/mangopay/resources.py b/mangopay/resources.py index b00088e..79f5da8 100644 --- a/mangopay/resources.py +++ b/mangopay/resources.py @@ -1524,6 +1524,7 @@ class PayInRefund(Refund): fees = MoneyField(api_name='Fees') payin = ForeignKeyField(PayIn) reference = CharField(api_name='Reference') + statement_descriptor = CharField(api_name='StatementDescriptor') class Meta: verbose_name = 'refund' From 64cc64802c8bdf85001d1d290023f25cc068ffeb Mon Sep 17 00:00:00 2001 From: Farah Aly Date: Thu, 11 Jul 2024 15:00:53 +0100 Subject: [PATCH 3/3] Update refund test --- tests/test_refunds.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/test_refunds.py b/tests/test_refunds.py index 0ebe066..f7951d7 100644 --- a/tests/test_refunds.py +++ b/tests/test_refunds.py @@ -403,7 +403,8 @@ def test_create_payin_refund(self): params = { "author": self.card.user, - "payin": direct_payin + "payin": direct_payin, + "statement_descriptor": "My descriptor" } payin_refund = PayInRefund(**params)