From 4d91a077e6e159381a1dd3c0e60f100831634c1c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Romain=20Semp=C3=A9?= Date: Wed, 15 May 2024 11:39:06 +0200 Subject: [PATCH] feat(wallet): Rename wallet rule_type into trigger --- lago_python_client/models/wallet.py | 4 ++-- tests/fixtures/wallet.json | 2 +- tests/fixtures/wallet_index.json | 2 +- tests/test_wallet_client.py | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lago_python_client/models/wallet.py b/lago_python_client/models/wallet.py index 639e8955..a1b2d50c 100644 --- a/lago_python_client/models/wallet.py +++ b/lago_python_client/models/wallet.py @@ -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] diff --git a/tests/fixtures/wallet.json b/tests/fixtures/wallet.json index 673168ee..c1049c59 100644 --- a/tests/fixtures/wallet.json +++ b/tests/fixtures/wallet.json @@ -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" diff --git a/tests/fixtures/wallet_index.json b/tests/fixtures/wallet_index.json index 255343e5..2ece2615 100644 --- a/tests/fixtures/wallet_index.json +++ b/tests/fixtures/wallet_index.json @@ -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" diff --git a/tests/test_wallet_client.py b/tests/test_wallet_client.py index d5399589..8893acf3 100644 --- a/tests/test_wallet_client.py +++ b/tests/test_wallet_client.py @@ -10,7 +10,7 @@ def wallet_object(): rule = RecurringTransactionRule( - rule_type='interval', + trigger='interval', interval='monthly', paid_credits='105.0', granted_credits='105.0', @@ -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'