From 7696b7b2222a84c73ab16f2add098d5b4f87eef7 Mon Sep 17 00:00:00 2001 From: Vincent Pochet Date: Tue, 10 Dec 2024 09:48:12 +0100 Subject: [PATCH] misc: Remove *_count fields (#290) --- lago_python_client/models/billable_metric.py | 3 --- lago_python_client/models/plan.py | 2 -- lago_python_client/models/tax.py | 4 ---- tests/fixtures/billable_metric.json | 5 +---- tests/fixtures/billable_metric_index.json | 10 ++-------- tests/fixtures/plan.json | 10 ---------- tests/fixtures/plan_index.json | 12 +----------- tests/fixtures/tax.json | 4 ---- tests/fixtures/tax_index.json | 7 ------- 9 files changed, 4 insertions(+), 53 deletions(-) diff --git a/lago_python_client/models/billable_metric.py b/lago_python_client/models/billable_metric.py index fa647436..688eef69 100644 --- a/lago_python_client/models/billable_metric.py +++ b/lago_python_client/models/billable_metric.py @@ -42,9 +42,6 @@ class BillableMetricResponse(BaseResponseModel): field_name: Optional[str] created_at: str filters: BillableMetricFilters - active_subscriptions_count: int - draft_invoices_count: int - plans_count: int class BillableMetricEvaluateExpressionEvent(BaseModel): diff --git a/lago_python_client/models/plan.py b/lago_python_client/models/plan.py index 10a8dafd..51bfbd65 100644 --- a/lago_python_client/models/plan.py +++ b/lago_python_client/models/plan.py @@ -51,8 +51,6 @@ class PlanResponse(BaseResponseModel): charges: Optional[ChargesResponse] minimum_commitment: Optional[MinimumCommitmentResponse] usage_thresholds: Optional[UsageThresholdsResponse] - active_subscriptions_count: Optional[int] - draft_invoices_count: Optional[int] taxes: Optional[TaxesResponse] diff --git a/lago_python_client/models/tax.py b/lago_python_client/models/tax.py index e47a670b..03c49a3f 100644 --- a/lago_python_client/models/tax.py +++ b/lago_python_client/models/tax.py @@ -23,10 +23,6 @@ class TaxResponse(BaseResponseModel): code: str rate: float description: Optional[str] - add_ons_count: Optional[int] - customers_count: Optional[int] - plans_count: Optional[int] - charges_count: Optional[int] applied_to_organization: bool created_at: str diff --git a/tests/fixtures/billable_metric.json b/tests/fixtures/billable_metric.json index c37af8fd..2e7fd58a 100644 --- a/tests/fixtures/billable_metric.json +++ b/tests/fixtures/billable_metric.json @@ -17,9 +17,6 @@ "key": "country", "values": ["france", "italy", "spain"] } - ], - "active_subscriptions_count": 0, - "draft_invoices_count": 0, - "plans_count": 0 + ] } } diff --git a/tests/fixtures/billable_metric_index.json b/tests/fixtures/billable_metric_index.json index b9eb15fb..6f51a17c 100644 --- a/tests/fixtures/billable_metric_index.json +++ b/tests/fixtures/billable_metric_index.json @@ -13,10 +13,7 @@ "expression": "1 + 2", "field_name": "amount_sum", "created_at": "2022-04-29T08:59:51Z", - "filters": [], - "active_subscriptions_count": 0, - "draft_invoices_count": 0, - "plans_count": 0 + "filters": [] }, { "lago_id": "b7ab2926-1de8-4428-9bcd-779314a11111", @@ -31,10 +28,7 @@ "expression": "1 + 2", "field_name": "amount_sum", "created_at": "2022-04-30T08:59:51Z", - "filters": [], - "active_subscriptions_count": 0, - "draft_invoices_count": 0, - "plans_count": 0 + "filters": [] } ], "meta": { diff --git a/tests/fixtures/plan.json b/tests/fixtures/plan.json index 60e73e9d..a746732d 100644 --- a/tests/fixtures/plan.json +++ b/tests/fixtures/plan.json @@ -12,8 +12,6 @@ "trial_period": 3.0, "pay_in_advance": true, "bill_charges_monthly": null, - "active_subscriptions_count": 0, - "draft_invoices_count": 0, "charges": [ { "lago_id": "51c1e851-5be6-4343-a0ee-39a81d8b4ee1", @@ -49,10 +47,6 @@ "code": "tax_code", "rate": 15.0, "description": "tax_desc", - "add_ons_count": 0, - "customers_count": 0, - "plans_count": 0, - "charges_count": 0, "applied_to_organization": false, "created_at": "2022-04-29T08:59:51Z" } @@ -80,10 +74,6 @@ "code": "tax_code", "rate": 15.0, "description": "tax_desc", - "add_ons_count": 0, - "customers_count": 0, - "plans_count": 0, - "charges_count": 0, "applied_to_organization": false, "created_at": "2022-04-29T08:59:51Z" } diff --git a/tests/fixtures/plan_index.json b/tests/fixtures/plan_index.json index 4eb75191..3198f0bc 100644 --- a/tests/fixtures/plan_index.json +++ b/tests/fixtures/plan_index.json @@ -13,8 +13,6 @@ "trial_period": 3.0, "pay_in_advance": true, "bill_charges_monthly": null, - "active_subscriptions_count": 0, - "draft_invoices_count": 0, "charges": [ { "lago_id": "51c1e851-5be6-4343-a0ee-39a81d8b4ee1", @@ -32,11 +30,7 @@ "amount": "0.22" }, "values": { - "country": [ - "france", - "italy", - "spain" - ] + "country": ["france", "italy", "spain"] }, "invoice_display_name": "Europe" } @@ -62,8 +56,6 @@ "trial_period": 2.0, "pay_in_advance": true, "bill_charges_monthly": null, - "active_subscriptions_count": 0, - "draft_invoices_count": 0, "charges": [ { "lago_id": "dfdc725d-6341-4d61-831e-4ac9ccd509c0", @@ -93,8 +85,6 @@ "trial_period": 0.0, "pay_in_advance": true, "bill_charges_monthly": null, - "active_subscriptions_count": 0, - "draft_invoices_count": 0, "charges": [] } ], diff --git a/tests/fixtures/tax.json b/tests/fixtures/tax.json index a2aa6ce6..9ad663d9 100644 --- a/tests/fixtures/tax.json +++ b/tests/fixtures/tax.json @@ -5,10 +5,6 @@ "code": "tax_code", "rate": 15.0, "description": "tax_desc", - "add_ons_count": 0, - "customers_count": 0, - "plans_count": 0, - "charges_count": 0, "applied_to_organization": false, "created_at": "2022-04-29T08:59:51Z" } diff --git a/tests/fixtures/tax_index.json b/tests/fixtures/tax_index.json index 66b7d895..13a25e78 100644 --- a/tests/fixtures/tax_index.json +++ b/tests/fixtures/tax_index.json @@ -5,9 +5,6 @@ "name": "tax_name_1", "code": "tax_code_1", "rate": 15.0, - "add_ons_count": 0, - "customers_count": 0, - "plans_count": 0, "description": "tax_desc_1", "applied_to_organization": false, "created_at": "2022-04-29T08:59:51Z" @@ -17,10 +14,6 @@ "name": "tax_name_2", "code": "tax_code_2", "rate": 20.0, - "add_ons_count": 0, - "customers_count": 0, - "plans_count": 0, - "charges_count": 0, "description": "tax_desc_2", "applied_to_organization": false, "created_at": "2022-04-29T08:59:51Z"