コード例 #1
0
 def fields_from_json(self, data: dict) -> None:
     self.date = parse_date(data["date"])
     self.vendor = data["vendor"]
     self.category_id = data["category"]
     self.amount = parse_decimal(data["amount"])
     self.description = data["description"]
     self.is_bill = data["is_bill"]
コード例 #2
0
 def fields_from_json(self, data: dict) -> None:
     self.name = data["name"]
     self.vendor = data["vendor"]
     self.category_id = data["category_id"]
     self.type = data["type"]
     self.amount = parse_decimal(data["amount"])
     self.description = data["description"]
     self.comment = data["comment"]
コード例 #3
0
 def fields_from_json(self, data: dict) -> None:
     self.bill_id = data["bill"]
     self.product = data["product"]
     self.serving = parse_decimal(data["serving"])
     self.count = parse_decimal(data["count"])
     self.unit_price = parse_decimal(data["unit_price"])