from ..cw_model import CWModel


class ProductItem(CWModel):

    def __init__(self, json_dict=None):
        # With: id(Integer)
        # Search: ^(\s*)(\*?)([_a-z0-9]*)\s?(\(.*$)
        # Replace: $1self.$3 = None  # $2$4
        # To get: self.id = None  # (Integer)
        self.id = None  # (Integer)
        self.catalogItem = None  # *(CatalogItemReference)
        self.chargeToId = None  # *(Integer)
        self.chargeToType = None  # *(Enum)
        self.description = None  # (String(2000))
        self.sequenceNumber = None  # (Number)
        self.quantity = None  # (Number)
        self.price = None  # (Number)
        self.cost = None  # (Number)
        self.discount = None  # (Number)
        self.priceMethod = None  # (Enum)
        self.billableOption = None  # *(Enum)
        self.agreement = None  # (AgreementReference)
        self.locationId = None  # (Integer)
        self.businessUnitId = None  # (Integer)
        self.vendor = None  # (CompanyReference)
        self.vendorSku = None  # (String(50))
        self.taxableFlag = None  # (Boolean)
        self.dropshipFlag = None  # (Boolean)
        self.specialOrderFlag = None  # (Boolean)
        self.phaseProductFlag = None  # (Boolean)
        self.cancelledFlag = None  # (Boolean)
        self.quantityCancelled = None  # (Number)
        self.cancelledReason = None  # (String(100))
        self.customerDescription = None  # (String(6000))
        self.internalNotes = None  # (String(1000))
        self.productSuppliedFlag = None  # (Boolean)
        self.subContractorShipToId = None  # (Integer)
        self.subContractorAmountLimit = None  # (Number)
        self.recurring = None  # (ProductRecurring)
        self.sla = None  # (SLAReference)
        self.entityType = None  # (EntityTypeReference)
        self.forecastDetailId = None  # (Integer)
        self.cancelledBy = None  # (Integer)
        self.cancelledDate = None  # (String)
        self.warehouse = None  # (String)
        self.warehouseBin = None  # (String)
        self.purchaseDate = None  # (String)
        self.integrationXRef = None  # (String)
        self.listPrice = None  # (Number)
        self.serialNumberIds = None  # (Integer[])
        self.company = None  # (CompanyReference)
        self.forecastStatus = None  # (OpportunityStatusReference)
        self._info = None  # (Metadata)
        self.bypassForecastUpdate = None  # (Boolean)
        self.customFields = None  # (CustomFieldValue[])

        # initialize object with json dict
        super().__init__(json_dict)
