Skip to content

Commit

Permalink
Rename VehicleDetails models (#143)
Browse files Browse the repository at this point in the history
  • Loading branch information
epenet authored Jan 8, 2021
1 parent c89dd2c commit 10054f2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
12 changes: 6 additions & 6 deletions src/renault_api/kamereon/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ class KamereonPersonResponse(KamereonResponse):


@dataclass
class KamereonVehiclesDetailsGroup(BaseModel):
class KamereonVehicleDetailsGroup(BaseModel):
"""Kamereon vehicle details group data."""

code: Optional[str]
Expand All @@ -123,15 +123,15 @@ class KamereonVehiclesDetailsGroup(BaseModel):


@dataclass
class KamereonVehiclesDetails(BaseModel):
class KamereonVehicleDetails(BaseModel):
"""Kamereon vehicle details."""

vin: Optional[str]
registrationNumber: Optional[str] # noqa: N815
radioCode: Optional[str] # noqa: N815
brand: Optional[KamereonVehiclesDetailsGroup]
model: Optional[KamereonVehiclesDetailsGroup]
energy: Optional[KamereonVehiclesDetailsGroup]
brand: Optional[KamereonVehicleDetailsGroup]
model: Optional[KamereonVehicleDetailsGroup]
energy: Optional[KamereonVehicleDetailsGroup]

def get_energy_code(self) -> Optional[str]:
"""Return vehicle energy code."""
Expand Down Expand Up @@ -181,7 +181,7 @@ class KamereonVehiclesLink(BaseModel):
"""Kamereon vehicles link data."""

vin: Optional[str]
vehicleDetails: Optional[KamereonVehiclesDetails] # noqa: N815
vehicleDetails: Optional[KamereonVehicleDetails] # noqa: N815


@dataclass
Expand Down
2 changes: 1 addition & 1 deletion src/renault_api/renault_vehicle.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def __init__(
country: Optional[str] = None,
locale_details: Optional[Dict[str, str]] = None,
credential_store: Optional[CredentialStore] = None,
vehicle_details: Optional[models.KamereonVehiclesDetails] = None,
vehicle_details: Optional[models.KamereonVehicleDetails] = None,
) -> None:
"""Initialise Renault vehicle."""
self._account_id = account_id
Expand Down

0 comments on commit 10054f2

Please sign in to comment.