Skip to content

Commit

Permalink
Merge pull request #365 from farahalymangopay/master
Browse files Browse the repository at this point in the history
Add StatementDescriptor to Refund
  • Loading branch information
iulian03 authored Jul 25, 2024
2 parents 4faf156 + 64cc648 commit da03274
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions mangopay/resources.py
Original file line number Diff line number Diff line change
Expand Up @@ -1488,6 +1488,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'
Expand Down Expand Up @@ -1524,6 +1525,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'
Expand Down
3 changes: 2 additions & 1 deletion tests/test_refunds.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit da03274

Please sign in to comment.