public override XElement GenerateAddRq() { XElement Add = new XElement("CustomerAdd"); Add.Add(Name?.ToQBXML(nameof(Name))); Add.Add(IsActive.ToQBXML(nameof(IsActive))); Add.Add(ClassRef?.ToQBXML(nameof(ClassRef))); Add.Add(ParentRef?.ToQBXML(nameof(ParentRef))); Add.Add(CompanyName?.ToQBXML(nameof(CompanyName))); Add.Add(Salutation?.ToQBXML(nameof(Salutation))); Add.Add(FirstName?.ToQBXML(nameof(FirstName))); Add.Add(MiddleName?.ToQBXML(nameof(MiddleName))); Add.Add(LastName?.ToQBXML(nameof(LastName))); Add.Add(JobTitle?.ToQBXML(nameof(JobTitle))); Add.Add(BillAddress?.ToQBXML(nameof(BillAddress))); Add.Add(ShipAddress?.ToQBXML(nameof(ShipAddress))); Add.Add(ShipToAddress?.ToQBXML(nameof(ShipToAddress))); Add.Add(Phone?.ToQBXML(nameof(Phone))); Add.Add(AltPhone?.ToQBXML(nameof(AltPhone))); Add.Add(Fax?.ToQBXML(nameof(Fax))); Add.Add(Email?.ToQBXML(nameof(Email))); Add.Add(Cc?.ToQBXML(nameof(Cc))); Add.Add(Contact?.ToQBXML(nameof(Contact))); Add.Add(AltContact?.ToQBXML(nameof(AltContact))); Add.Add(AdditionalContactRef?.ToQBXML(nameof(AdditionalContactRef))); Add.Add(Contacts?.ToQBXML <Contacts>(nameof(Contacts))); Add.Add(CustomerTypeRef?.ToQBXML(nameof(CustomerTypeRef))); Add.Add(TermsRef?.ToQBXML(nameof(TermsRef))); Add.Add(SalesRepRef?.ToQBXML(nameof(SalesRepRef))); Add.Add(OpenBalance?.ToQBXML(nameof(OpenBalance))); Add.Add(OpenBalanceDate?.ToQBXML(nameof(OpenBalanceDate))); Add.Add(SalesTaxCodeRef?.ToQBXML(nameof(SalesTaxCodeRef))); Add.Add(ItemSalesTaxRef?.ToQBXML(nameof(ItemSalesTaxRef))); Add.Add(ResaleNumber?.ToQBXML(nameof(ResaleNumber))); Add.Add(AccountNumber?.ToQBXML(nameof(AccountNumber))); Add.Add(CreditLimit?.ToQBXML(nameof(CreditLimit))); Add.Add(PreferredPaymentMethodRef?.ToQBXML(nameof(PreferredPaymentMethodRef))); Add.Add(CreditCardInfo?.ToQBXML(nameof(CreditCardInfo))); Add.Add(JobStatus.ToQBXML(nameof(JobStatus))); Add.Add(JobStartDate?.ToQBXML(nameof(JobStartDate))); Add.Add(JobProjectedEndDate?.ToQBXML(nameof(JobProjectedEndDate))); Add.Add(JobEndDate?.ToQBXML(nameof(JobEndDate))); Add.Add(JobDesc?.ToQBXML(nameof(JobDesc))); Add.Add(JobTypeRef?.ToQBXML(nameof(JobTypeRef))); Add.Add(Notes?.ToQBXML(nameof(Notes))); Add.Add(AdditionalNotes?.ToQBXML(nameof(AdditionalNotes))); Add.Add(PreferredDeliveryMethod.ToQBXML(nameof(PreferredDeliveryMethod))); Add.Add(PriceLevelRef?.ToQBXML(nameof(PriceLevelRef))); Add.Add(ExternalGUID?.ToQBXML(nameof(ExternalGUID))); Add.Add(CurrencyRef?.ToQBXML(nameof(CurrencyRef))); XElement AddRq = new XElement("CustomerAddRq"); AddRq.Add(Add); AddRq.Add(IncludeRetElement?.ToQBXML(nameof(IncludeRetElement))); return(AddRq); }
public XElement ToQBXML(string name) { XElement xElement = new XElement(name); xElement.Add(ListID.ToQBXML(nameof(ListID))); xElement.Add(TimeCreated.ToQBXML(nameof(TimeCreated))); xElement.Add(TimeModified.ToQBXML(nameof(TimeModified))); xElement.Add(EditSequence.ToQBXML(nameof(EditSequence))); xElement.Add(Contact.ToQBXML(nameof(Contact))); xElement.Add(Salutation.ToQBXML(nameof(Salutation))); xElement.Add(FirstName.ToQBXML(nameof(FirstName))); xElement.Add(MiddleName.ToQBXML(nameof(MiddleName))); xElement.Add(LastName.ToQBXML(nameof(LastName))); xElement.Add(JobTitle.ToQBXML(nameof(JobTitle))); xElement.Add(AdditionalContactRef?.ToQBXML(nameof(AdditionalContactRef))); return(xElement); }