mirror of
https://github.com/deesiigneer/pyspapi.git
synced 2026-04-20 12:35:26 +00:00
19 lines
448 B
Python
19 lines
448 B
Python
class Item:
|
|
def __init__(self, name: str, count: int, price: int, comment: str):
|
|
self._name = name
|
|
self._count = count
|
|
self._price = price
|
|
self._comment = comment
|
|
|
|
@property
|
|
def name(self):
|
|
return self._name
|
|
|
|
def to_json(self):
|
|
return {
|
|
"name": self._name,
|
|
"count": self._count,
|
|
"price": self._price,
|
|
"comment": self._comment
|
|
}
|