winofy-backend/utils/clients/gooyal_accounts_client/models/change_password.py
Ali Asadi 52adc732fa Initial Winofy backend: marketplace core (no payment integration)
Django 6 + DRF resource server against the Gooyal accounts OAuth2 service,
matching the Winsoo ecosystem's conventions. Covers locations, stores,
catalog, cart, checkout/orders (with the multi-store-cart split and the
status stepper), reviews, and notifications, plus a demo-data seed command.

Payment integration (wallet debits, online gateway, seller payouts) is
intentionally left out here — see feature/payment.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-10 14:03:15 +03:30

78 lines
2.1 KiB
Python

from collections.abc import Mapping
from typing import Any, TypeVar, Union
from attrs import define as _attrs_define
from attrs import field as _attrs_field
from ..types import UNSET, Unset
T = TypeVar("T", bound="ChangePassword")
@_attrs_define
class ChangePassword:
"""
Attributes:
old_password (str):
new_password (str):
old_password_field (Union[Unset, str]): Default: 'password'.
"""
old_password: str
new_password: str
old_password_field: Union[Unset, str] = "password"
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
def to_dict(self) -> dict[str, Any]:
old_password = self.old_password
new_password = self.new_password
old_password_field = self.old_password_field
field_dict: dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update(
{
"old_password": old_password,
"new_password": new_password,
}
)
if old_password_field is not UNSET:
field_dict["old_password_field"] = old_password_field
return field_dict
@classmethod
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
d = dict(src_dict)
old_password = d.pop("old_password")
new_password = d.pop("new_password")
old_password_field = d.pop("old_password_field", UNSET)
change_password = cls(
old_password=old_password,
new_password=new_password,
old_password_field=old_password_field,
)
change_password.additional_properties = d
return change_password
@property
def additional_keys(self) -> list[str]:
return list(self.additional_properties.keys())
def __getitem__(self, key: str) -> Any:
return self.additional_properties[key]
def __setitem__(self, key: str, value: Any) -> None:
self.additional_properties[key] = value
def __delitem__(self, key: str) -> None:
del self.additional_properties[key]
def __contains__(self, key: str) -> bool:
return key in self.additional_properties