From 15805c74d8f0d3ecbe7c71ef45c5cd99bbe7c1a5 Mon Sep 17 00:00:00 2001 From: Guy Khmelnitsky <3136012+GuyKh@users.noreply.github.com> Date: Sun, 10 Nov 2024 12:21:18 +0200 Subject: [PATCH] fix: API Change: CustomerAccount.name+last_name don't return on API (#156) --- iec_api/models/customer.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/iec_api/models/customer.py b/iec_api/models/customer.py index b720479..272af93 100644 --- a/iec_api/models/customer.py +++ b/iec_api/models/customer.py @@ -31,6 +31,7 @@ # } from dataclasses import dataclass, field +from typing import Optional from mashumaro import DataClassDictMixin, field_options @@ -40,13 +41,13 @@ class CustomerAccount(DataClassDictMixin): main_contract_id: str = field(metadata=field_options(alias="mainContractId")) main_contract_id_type: int = field(metadata=field_options(alias="mainContractIdType")) company_id: str = field(metadata=field_options(alias="companyId")) - name: str - last_name: str = field(metadata=field_options(alias="lastName")) bp_number: str = field(metadata=field_options(alias="bpNumber")) bp_type: int = field(metadata=field_options(alias="bpType")) is_active_account: bool = field(metadata=field_options(alias="isActiveAccount")) customer_role: int = field(metadata=field_options(alias="customerRole")) account_type: int = field(metadata=field_options(alias="accountType")) + name: Optional[str] = field(default=None, metadata=field_options(alias="name")) + last_name: Optional[str] = field(default=None, metadata=field_options(alias="lastName")) @dataclass