Skip to content

Commit

Permalink
feat(wallet): Rename wallet rule_type into trigger
Browse files Browse the repository at this point in the history
  • Loading branch information
rsempe committed May 16, 2024
1 parent 18455f2 commit 4d91a07
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions lago_python_client/models/wallet.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,18 @@

class RecurringTransactionRule(BaseModel):
lago_id: Optional[str]
rule_type: Optional[str]
interval: Optional[str]
threshold_credits: Optional[str]
trigger: Optional[str]
paid_credits: Optional[str]
granted_credits: Optional[str]


class RecurringTransactionRuleResponse(BaseModel):
lago_id: Optional[str]
rule_type: Optional[str]
interval: Optional[str]
threshold_credits: Optional[str]
trigger: Optional[str]
paid_credits: Optional[str]
granted_credits: Optional[str]
created_at: Optional[str]
Expand Down
2 changes: 1 addition & 1 deletion tests/fixtures/wallet.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"recurring_transaction_rules": [
{
"lago_id": "12345",
"rule_type": "interval",
"trigger": "interval",
"interval": "monthly",
"paid_credits": "105.0",
"granted_credits": "105.0"
Expand Down
2 changes: 1 addition & 1 deletion tests/fixtures/wallet_index.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"recurring_transaction_rules": [
{
"lago_id": "12345",
"rule_type": "interval",
"trigger": "interval",
"interval": "monthly",
"paid_credits": "105.0",
"granted_credits": "105.0"
Expand Down
4 changes: 2 additions & 2 deletions tests/test_wallet_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

def wallet_object():
rule = RecurringTransactionRule(
rule_type='interval',
trigger='interval',
interval='monthly',
paid_credits='105.0',
granted_credits='105.0',
Expand Down Expand Up @@ -50,7 +50,7 @@ def test_valid_create_wallet_request(httpx_mock: HTTPXMock):

assert response.lago_id == 'b7ab2926-1de8-4428-9bcd-779314ac129b'
assert response.recurring_transaction_rules.__root__[0].lago_id == '12345'
assert response.recurring_transaction_rules.__root__[0].rule_type == 'interval'
assert response.recurring_transaction_rules.__root__[0].trigger == 'interval'
assert response.recurring_transaction_rules.__root__[0].interval == 'monthly'


Expand Down

0 comments on commit 4d91a07

Please sign in to comment.