from typing import Union
from typing import Optional

from pricewars.models.PricewarsObject import PricewarsObject
from pricewars.models import Product


class Order(PricewarsObject):
    def __init__(self, price: float, stock: int, product: Union[Product, dict], left_in_stock: Optional[int] = None):
        self.price = price
        self.stock = stock
        self.left_in_stock = left_in_stock
        if type(product) == dict:
            self.product = Product.from_dict(product)
        else:
            self.product = product

@@ -200,21 +200,30 @@
 _(self, 
-price
+billing_amount
 : float,
@@ -265,16 +265,33 @@
 , dict%5D,
+%0A                
  left_in
@@ -338,21 +338,39 @@
 elf.
-price = price
+billing_amount = billing_amount
 %0A   

rename order entry from price to billing_amount