public XElement GenerateAddRq(decimal?TotalValue = null, DateTime?InventoryDate = null) { XElement Add = new XElement(typeof(ItemInventory).Name + "Add"); Add.Add(Name?.ToQBXML(nameof(Name))); Add.Add(BarCode?.ToQBXML(nameof(BarCode))); Add.Add(IsActive.ToQBXML(nameof(IsActive))); Add.Add(ClassRef?.ToQBXML(nameof(ClassRef))); Add.Add(ParentRef?.ToQBXML(nameof(ParentRef))); Add.Add(ManufacturerPartNumber?.ToQBXML(nameof(ManufacturerPartNumber))); Add.Add(UnitOfMeasureSetRef?.ToQBXML(nameof(UnitOfMeasureSetRef))); Add.Add(SalesTaxCodeRef?.ToQBXML(nameof(SalesTaxCodeRef))); Add.Add(SalesDesc?.ToQBXML(nameof(SalesDesc))); Add.Add(SalesPrice?.ToQBXML(nameof(SalesPrice))); Add.Add(IncomeAccountRef?.ToQBXML(nameof(IncomeAccountRef))); Add.Add(PurchaseDesc?.ToQBXML(nameof(PurchaseDesc))); Add.Add(PurchaseCost?.ToQBXML(nameof(PurchaseCost))); Add.Add(COGSAccountRef?.ToQBXML(nameof(COGSAccountRef))); Add.Add(PrefVendorRef?.ToQBXML(nameof(PrefVendorRef))); Add.Add(AssetAccountRef?.ToQBXML(nameof(AssetAccountRef))); Add.Add(ReorderPoint?.ToQBXML(nameof(ReorderPoint))); Add.Add(Max?.ToQBXML(nameof(Max))); Add.Add(QuantityOnHand?.ToQBXML(nameof(QuantityOnHand))); Add.Add(TotalValue?.ToQBXML(nameof(TotalValue))); Add.Add(InventoryDate?.ToQBXML(nameof(InventoryDate))); Add.Add(ExternalGUID?.ToQBXML(nameof(ExternalGUID))); XElement AddRq = new XElement(typeof(ItemInventory).Name + "AddRq", Add); foreach (var value in IncludeRetElement) { AddRq.Add(value.ToQBXML(nameof(IncludeRetElement))); } return(AddRq); }
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 GenerateModRq(bool?ForceUOMChange = null, bool?ApplyIncomeAccountRefToExistingTxns = null, bool?ApplyCOGSAccountRefToExistingTxns = null) { XElement Mod = new XElement(typeof(ItemInventory).Name + "Mod"); Mod.Add(ListID?.ToQBXML(nameof(ListID))); Mod.Add(EditSequence?.ToQBXML(nameof(EditSequence))); Mod.Add(Name?.ToQBXML(nameof(Name))); Mod.Add(BarCode?.ToQBXML(nameof(BarCode))); Mod.Add(IsActive.ToQBXML(nameof(IsActive))); Mod.Add(ClassRef?.ToQBXML(nameof(ClassRef))); Mod.Add(ParentRef?.ToQBXML(nameof(ParentRef))); Mod.Add(ManufacturerPartNumber?.ToQBXML(nameof(ManufacturerPartNumber))); Mod.Add(UnitOfMeasureSetRef?.ToQBXML(nameof(UnitOfMeasureSetRef))); Mod.Add(ForceUOMChange?.ToQBXML(nameof(ForceUOMChange))); Mod.Add(SalesTaxCodeRef?.ToQBXML(nameof(SalesTaxCodeRef))); Mod.Add(SalesDesc?.ToQBXML(nameof(SalesDesc))); Mod.Add(SalesPrice?.ToQBXML(nameof(SalesPrice))); Mod.Add(IncomeAccountRef?.ToQBXML(nameof(IncomeAccountRef))); Mod.Add(ApplyIncomeAccountRefToExistingTxns?.ToQBXML(nameof(ApplyIncomeAccountRefToExistingTxns))); Mod.Add(PurchaseDesc?.ToQBXML(nameof(PurchaseDesc))); Mod.Add(PurchaseCost?.ToQBXML(nameof(PurchaseCost))); Mod.Add(COGSAccountRef?.ToQBXML(nameof(COGSAccountRef))); Mod.Add(ApplyCOGSAccountRefToExistingTxns?.ToQBXML(nameof(ApplyCOGSAccountRefToExistingTxns))); Mod.Add(PrefVendorRef?.ToQBXML(nameof(PrefVendorRef))); Mod.Add(AssetAccountRef?.ToQBXML(nameof(AssetAccountRef))); Mod.Add(ReorderPoint?.ToQBXML(nameof(ReorderPoint))); Mod.Add(Max?.ToQBXML(nameof(Max))); XElement ModRq = new XElement(typeof(ItemInventory).Name + "ModRq", Mod); foreach (var value in IncludeRetElement) { ModRq.Add(value.ToQBXML(nameof(IncludeRetElement))); } return(ModRq); }