from ..cw_model import CWModel


class Invoice(CWModel):

    def __init__(self, json_dict=None):
        self.id = None  # (Integer)
        self.invoiceNumber = None  # (String(15))
        self.type = None  # *(Enum)
        self.status = None  # (BillingStatusReference)
        self.company = None  # *(CompanyReference)
        self.billToCompany = None  # (CompanyReference)
        self.shipToCompany = None  # (CompanyReference)
        self.applyToType = None  # (Enum)
        self.applyToId = None  # (Integer)
        self.attention = None  # (String(60))
        self.billingSite = None  # (SiteReference)
        self.shippingSite = None  # (SiteReference)
        self.billingTerms = None  # (BillingTermsReference)
        self.reference = None  # (String(50))
        self.customerPO = None  # (String(50))
        self.templateSetupId = None  # (Integer)
        self.emailTemplateId = None  # (Integer)
        self.addToBatchEmailList = None  # (Boolean)
        self.date = None  # (String)
        self.restrictDownpaymentFlag = None  # (Boolean)
        self.locationId = None  # (Integer)
        self.departmentId = None  # (Integer)
        self.territoryId = None  # (Integer)
        self.topComment = None  # (String)
        self.bottomComment = None  # (String)
        self.taxableFlag = None  # (Boolean)
        self.taxCode = None  # (TaxCodeReference)
        self.internalNotes = None  # (String)
        self.downpaymentPreviouslyTaxedFlag = None  # (Boolean)
        self.serviceTotal = None  # (Number)
        self.dueDate = None  # (String)
        self.expenseTotal = None  # (Number)
        self.productTotal = None  # (Number)
        self.previousProgressApplied = None  # (Number)
        self.serviceAdjustmentAmount = None  # (Number)
        self.agreementAmount = None  # (Number)
        self.downpaymentApplied = None  # (Number)
        self.subtotal = None  # (Number)
        self.total = None  # (Number)
        self.remainingDownpayment = None  # (Number)
        self.salesTax = None  # (Number)
        self.adjustmentReason = None  # (String)
        self.adjustedBy = None  # (String)
        self.payments = None  # (Number)
        self.credits = None  # (Number)
        self.balance = None  # (Number)
        self.specialInvoiceFlag = None  # (Boolean)

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