Skip to content

Commit 99b1e86

Browse files
authored
feat(wallet-transaction): Add transaction_name to wallet transaction rules (#339)
## Roadmap Task 👉 https://getlago.canny.io/feature-requests/p/define-the-name-of-a-wallet-transaction-at-top-up ## Context Follow up of getlago/lago-api@38261ba. ## Description This adds a `transaction_name` to the wallet transaction recurring rule types that are then used to populate the name of the triggered wallet transactions.
1 parent 55fb454 commit 99b1e86

3 files changed

Lines changed: 5 additions & 1 deletion

File tree

lago_python_client/models/wallet.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ class RecurringTransactionRule(BaseModel):
1717
expiration_at: Optional[str]
1818
target_ongoing_balance: Optional[str]
1919
transaction_metadata: Optional[List[Dict[str, str]]]
20+
transaction_name: Optional[str]
2021

2122

2223
class RecurringTransactionRuleResponse(BaseModel):
@@ -33,6 +34,7 @@ class RecurringTransactionRuleResponse(BaseModel):
3334
target_ongoing_balance: Optional[str]
3435
created_at: Optional[str]
3536
transaction_metadata: Optional[List[Dict[str, str]]]
37+
transaction_name: Optional[str]
3638

3739

3840
class RecurringTransactionRuleList(BaseModel):

tests/fixtures/wallet.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@
2323
"paid_credits": "105.0",
2424
"granted_credits": "105.0",
2525
"started_at": null,
26-
"target_ongoing_balance": "200.0"
26+
"target_ongoing_balance": "200.0",
27+
"transaction_name": "Recurring Transaction Rule"
2728
}
2829
],
2930
"ongoing_balance_cents": 800,

tests/test_wallet_client.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ def wallet_object():
2121
granted_credits="105.0",
2222
method="target",
2323
target_ongoing_balance="105.0",
24+
transaction_name="Recurring Transaction Rule",
2425
)
2526
rules_list = RecurringTransactionRuleList(__root__=[rule])
2627
applies_to = AppliesTo(

0 commit comments

Comments
 (0)