Skip to content

Commit 7e5e271

Browse files
committed
Feature update function to Deposit resource
1 parent 92efb29 commit 7e5e271

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

starkbank/deposit/__deposit.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,9 +125,9 @@ def update(id, amount=None, user=None):
125125
"""# Update Deposit entity
126126
Update the Deposit by passing its id to be partially or fully reversed.
127127
## Parameters (required):
128-
- id [string]: Deposit id. ex: '5656565656565656'
128+
- id [string]: Deposit id. ex: "5656565656565656"
129129
## Parameters (optional):
130-
- amount [string]: The new amount of the Deposit. If the amount = 0 the Deposit will be fully reversed
130+
- amount [string, default None]: The new amount of the Deposit. If the amount = 0 the Deposit will be fully reversed
131131
- user [Organization/Project object, default None]: Organization or Project object. Not necessary if starkbank.user was set before function call
132132
## Return:
133133
- target Deposit with updated attributes

tests/sdk/test_deposit.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,21 +47,22 @@ def test_success(self):
4747
print(deposit)
4848

4949

50-
if __name__ == '__main__':
51-
main()
52-
53-
5450
class TestDepositInfoPatch(TestCase):
5551

5652
def test_success_amount(self):
5753
deposits = starkbank.deposit.query(status="created", limit=1)
5854
deposit_amount = 0
5955
for deposit in deposits:
6056
self.assertIsNotNone(deposit.id)
61-
print(deposit)
6257
updated_deposit = starkbank.deposit.update(
6358
deposit.id,
6459
amount=deposit_amount,
6560
)
6661
print(updated_deposit)
6762
self.assertEqual(updated_deposit.amount, deposit_amount)
63+
64+
65+
if __name__ == '__main__':
66+
main()
67+
68+

0 commit comments

Comments
 (0)