public IEnumerable <T> ExportRecords <T>(Expression <Func <T, bool> > predicate, ZuoraExportOptions options = null) where T : ZObject { if (options == null) { options = new ZuoraExportOptions(); } return(ExportRecords <T>(QueryBuilder.GenerateExportQuery(predicate, options), options)); }
public virtual ExportResult CreateExport <T>(Expression <Func <T, bool> > predicate, ZuoraExportOptions options = null) where T : ZObject { if (options == null) { options = new ZuoraExportOptions(); } return(CreateExport(QueryBuilder.GenerateExportQuery(predicate, options))); }
public Stream ExportStream <T>(Expression <Func <T, bool> > predicate, ZuoraExportOptions options = null) where T : ZObject { if (options == null) { options = new ZuoraExportOptions(); } return(ExportStream(QueryBuilder.GenerateExportQuery(predicate, options), options)); }
private string PerformExportQuery(string query, ZuoraExportOptions options) { if (options == null) { options = new ZuoraExportOptions(); } int expiredTime = 0; ExportResult export = CreateExport(query); do { if (options.Timeout != null && expiredTime >= options.Timeout) { if (options.ReRunOnTimeout) { return(PerformExportQuery(query, options)); } throw new ZuoraRequestException("Timeout"); } export = CheckExportStatus(export.Id); if (export.Status == "Failed") { if (options.ReRunOnFailure) { return(PerformExportQuery(query, options)); } throw new ZuoraRequestException("The export failed."); } Thread.Sleep(options.WaitTime); expiredTime += options.WaitTime; } while (export.Status != "Completed"); return(export.FileId); }
public IEnumerable <T> ExportRecords <T>(string query, ZuoraExportOptions options = null) where T : ZObject { string exportId = PerformExportQuery(query, options); return(RetrieveExportRecords <T>(exportId)); }
public Stream ExportStream(string query, ZuoraExportOptions options = null) { string exportId = PerformExportQuery(query, options); return(RetrieveExportStream(exportId)); }
public IEnumerable <CsvRow> ExportData(string query, ZuoraExportOptions options = null) { string exportId = PerformExportQuery(query, options); return(RetrieveExportData(exportId)); }
internal static string GenerateExportQuery <T>(Expression <Func <T, bool> > predicate, ZuoraExportOptions options) where T : ZObject { Type type = typeof(T); string query = CompileExportSelectStatements(type, options.RetrieveRelated, options.RetrieveSpecificData); if (predicate != null) { AddConditionsSet(ref query, predicate); } if (options.Index != null && options.Limit > 0) { AddOffsetLimit(ref query, (int)options.Index, options.Limit); } else if (options.Limit > 0) { AddLimit(ref query, options.Limit); } return(query); }
internal static string GenerateExportQuery <T>(Expression <Func <T, bool> > predicate, ZuoraExportOptions options) where T : ZObject { Type type = typeof(T); string query = CompileExportSelectStatements(type, options.RetrieveRelated, options.RetrieveSpecificData); if (predicate != null) { AddConditionsSet(ref query, predicate); } if (options.Index != null && options.Limit > 0) { AddOffsetLimit(ref query, (int)options.Index, options.Limit); } else if (options.Limit > 0) { AddLimit(ref query, options.Limit); } return("SELECT Account.Id, Invoice.AdjustmentAmount, Invoice.Amount, Invoice.Balance, Invoice.DueDate, Invoice.InvoiceDate, Invoice.InvoiceNumber, Invoice.PaymentAmount, Invoice.RefundAmount, Invoice.SourceId, Invoice.Status, Invoice.TaxAmount, Invoice.Id, Account.AccountNumber, Account.Balance, BillToContact.Id, Account.CreditBalance, Account.Currency, Account.PaymentGateway, SoldToContact.Id, Account.InvoiceDeliveryPrefsEmail, Account.InvoiceDeliveryPrefsPrint, Contact.AccountId, Contact.Address1, Contact.Address2, Contact.City, Contact.Country, Contact.FirstName, Contact.LastName, Contact.PersonalEmail, Contact.PostalCode, Contact.State, Contact.WorkEmail, Contact.Id, Account.Id, Invoice.AdjustmentAmount, Invoice.Amount, Invoice.Balance, Invoice.DueDate, Invoice.InvoiceDate, Invoice.InvoiceNumber, Invoice.PaymentAmount, Invoice.RefundAmount, Invoice.SourceId, Invoice.Status, Invoice.TaxAmount, Invoice.Id, Account.AccountNumber, Account.Balance, BillToContact.Id, Account.CreditBalance, Account.Currency, Account.PaymentGateway, SoldToContact.Id, Account.InvoiceDeliveryPrefsEmail, Account.InvoiceDeliveryPrefsPrint, Contact.AccountId, Contact.Address1, Contact.Address2, Contact.City, Contact.Country, Contact.FirstName, Contact.LastName, Contact.PersonalEmail, Contact.PostalCode, Contact.State, Contact.WorkEmail, Contact.Id, Account.Id, Invoice.AdjustmentAmount, Invoice.Amount, Invoice.Balance, Invoice.DueDate, Invoice.InvoiceDate, Invoice.InvoiceNumber, Invoice.PaymentAmount, Invoice.RefundAmount, Invoice.SourceId, Invoice.Status, Invoice.TaxAmount, Invoice.Id, Account.AccountNumber, Account.Balance, BillToContact.Id, Account.CreditBalance, Account.Currency, Account.PaymentGateway, SoldToContact.Id, Account.InvoiceDeliveryPrefsEmail, Account.InvoiceDeliveryPrefsPrint, Contact.AccountId, Contact.Address1, Contact.Address2, Contact.City, Contact.Country, Contact.FirstName, Contact.LastName, Contact.PersonalEmail, Contact.PostalCode, Contact.State, Contact.WorkEmail, Contact.Id, Account.Id, Invoice.AdjustmentAmount, Invoice.Amount, Invoice.Balance, Invoice.DueDate, Invoice.InvoiceDate, Invoice.InvoiceNumber, Invoice.PaymentAmount, Invoice.RefundAmount, Invoice.SourceId, Invoice.Status, Invoice.TaxAmount, Invoice.Id, Account.AccountNumber, Account.Balance, BillToContact.Id, Account.CreditBalance, Account.Currency, Account.PaymentGateway, SoldToContact.Id, Account.InvoiceDeliveryPrefsEmail, Account.InvoiceDeliveryPrefsPrint, Contact.AccountId, Contact.Address1, Contact.Address2, Contact.City, Contact.Country, Contact.FirstName, Contact.LastName, Contact.PersonalEmail, Contact.PostalCode, Contact.State, Contact.WorkEmail, Contact.Id, Account.Id, Invoice.AdjustmentAmount, Invoice.Amount, Invoice.Balance, Invoice.DueDate, Invoice.InvoiceDate, Invoice.InvoiceNumber, Invoice.PaymentAmount, Invoice.RefundAmount, Invoice.SourceId, Invoice.Status, Invoice.TaxAmount, Invoice.Id, Account.AccountNumber, Account.Balance, BillToContact.Id, Account.CreditBalance, Account.Currency, Account.PaymentGateway, SoldToContact.Id, Account.InvoiceDeliveryPrefsEmail, Account.InvoiceDeliveryPrefsPrint, Contact.AccountId, Contact.Address1, Contact.Address2, Contact.City, Contact.Country, Contact.FirstName, Contact.LastName, Contact.PersonalEmail, Contact.PostalCode, Contact.State, Contact.WorkEmail, Contact.Id, Account.Id, Invoice.AdjustmentAmount, Invoice.Amount, Invoice.Balance, Invoice.DueDate, Invoice.InvoiceDate, Invoice.InvoiceNumber, Invoice.PaymentAmount, Invoice.RefundAmount, Invoice.SourceId, Invoice.Status, Invoice.TaxAmount, Invoice.Id, Account.AccountNumber, Account.Balance, BillToContact.Id, Account.CreditBalance, Account.Currency, Account.PaymentGateway, SoldToContact.Id, Account.InvoiceDeliveryPrefsEmail, Account.InvoiceDeliveryPrefsPrint, Contact.AccountId, Contact.Address1, Contact.Address2, Contact.City, Contact.Country, Contact.FirstName, Contact.LastName, Contact.PersonalEmail, Contact.PostalCode, Contact.State, Contact.WorkEmail, Contact.Id, Account.Id, Invoice.AdjustmentAmount, Invoice.Amount, Invoice.Balance, Invoice.DueDate, Invoice.InvoiceDate, Invoice.InvoiceNumber, Invoice.PaymentAmount, Invoice.RefundAmount, Invoice.SourceId, Invoice.Status, Invoice.TaxAmount, Invoice.Id, Account.AccountNumber, Account.Balance, BillToContact.Id, Account.CreditBalance, Account.Currency, Account.PaymentGateway, SoldToContact.Id, Account.InvoiceDeliveryPrefsEmail, Account.InvoiceDeliveryPrefsPrint, Contact.AccountId, Contact.Address1, Contact.Address2, Contact.City, Contact.Country, Contact.FirstName, Contact.LastName, Contact.PersonalEmail, Contact.PostalCode, Contact.State, Contact.WorkEmail, Contact.Id, Account.Id, Invoice.AdjustmentAmount, Invoice.Amount, Invoice.Balance, Invoice.DueDate, Invoice.InvoiceDate, Invoice.InvoiceNumber, Invoice.PaymentAmount, Invoice.RefundAmount, Invoice.SourceId, Invoice.Status, Invoice.TaxAmount, Invoice.Id, Account.AccountNumber, Account.Balance, BillToContact.Id, Account.CreditBalance, Account.Currency, Account.PaymentGateway, SoldToContact.Id, Account.InvoiceDeliveryPrefsEmail, Account.InvoiceDeliveryPrefsPrint, Contact.AccountId, Contact.Address1, Contact.Address2, Contact.City, Contact.Country, Contact.FirstName, Contact.LastName, Contact.PersonalEmail, Contact.PostalCode, Contact.State, Contact.WorkEmail, Contact.Id, InvoiceItem.ChargeAmount, InvoiceItem.ChargeName, Product.Name, InvoiceItem.Quantity, InvoiceItem.ServiceEndDate, InvoiceItem.ServiceStartDate, InvoiceItem.UnitPrice, InvoiceItem.UOM, Product.BusinessLine__c, ProductRatePlanCharge.ChargeType, InvoiceItem.Id, Account.Id, Invoice.AdjustmentAmount, Invoice.Amount, Invoice.Balance, Invoice.DueDate, Invoice.InvoiceDate, Invoice.InvoiceNumber, Invoice.PaymentAmount, Invoice.RefundAmount, Invoice.SourceId, Invoice.Status, Invoice.TaxAmount, Invoice.Id, Account.AccountNumber, Account.Balance, BillToContact.Id, Account.CreditBalance, Account.Currency, Account.PaymentGateway, SoldToContact.Id, Account.InvoiceDeliveryPrefsEmail, Account.InvoiceDeliveryPrefsPrint, Contact.AccountId, Contact.Address1, Contact.Address2, Contact.City, Contact.Country, Contact.FirstName, Contact.LastName, Contact.PersonalEmail, Contact.PostalCode, Contact.State, Contact.WorkEmail, Contact.Id, Account.Id, Invoice.AdjustmentAmount, Invoice.Amount, Invoice.Balance, Invoice.DueDate, Invoice.InvoiceDate, Invoice.InvoiceNumber, Invoice.PaymentAmount, Invoice.RefundAmount, Invoice.SourceId, Invoice.Status, Invoice.TaxAmount, Invoice.Id, Account.AccountNumber, Account.Balance, BillToContact.Id, Account.CreditBalance, Account.Currency, Account.PaymentGateway, SoldToContact.Id, Account.InvoiceDeliveryPrefsEmail, Account.InvoiceDeliveryPrefsPrint, Contact.AccountId, Contact.Address1, Contact.Address2, Contact.City, Contact.Country, Contact.FirstName, Contact.LastName, Contact.PersonalEmail, Contact.PostalCode, Contact.State, Contact.WorkEmail, Contact.Id, Account.Id, Invoice.AdjustmentAmount, Invoice.Amount, Invoice.Balance, Invoice.DueDate, Invoice.InvoiceDate, Invoice.InvoiceNumber, Invoice.PaymentAmount, Invoice.RefundAmount, Invoice.SourceId, Invoice.Status, Invoice.TaxAmount, Invoice.Id, Account.AccountNumber, Account.Balance, BillToContact.Id, Account.CreditBalance, Account.Currency, Account.PaymentGateway, SoldToContact.Id, Account.InvoiceDeliveryPrefsEmail, Account.InvoiceDeliveryPrefsPrint, Contact.AccountId, Contact.Address1, Contact.Address2, Contact.City, Contact.Country, Contact.FirstName, Contact.LastName, Contact.PersonalEmail, Contact.PostalCode, Contact.State, Contact.WorkEmail, Contact.Id, Account.Id, Invoice.AdjustmentAmount, Invoice.Amount, Invoice.Balance, Invoice.DueDate, Invoice.InvoiceDate, Invoice.InvoiceNumber, Invoice.PaymentAmount, Invoice.RefundAmount, Invoice.SourceId, Invoice.Status, Invoice.TaxAmount, Invoice.Id, Account.AccountNumber, Account.Balance, BillToContact.Id, Account.CreditBalance, Account.Currency, Account.PaymentGateway, SoldToContact.Id, Account.InvoiceDeliveryPrefsEmail, Account.InvoiceDeliveryPrefsPrint, Contact.AccountId, Contact.Address1, Contact.Address2, Contact.City, Contact.Country, Contact.FirstName, Contact.LastName, Contact.PersonalEmail, Contact.PostalCode, Contact.State, Contact.WorkEmail, Contact.Id, Account.Id, Invoice.AdjustmentAmount, Invoice.Amount, Invoice.Balance, Invoice.DueDate, Invoice.InvoiceDate, Invoice.InvoiceNumber, Invoice.PaymentAmount, Invoice.RefundAmount, Invoice.SourceId, Invoice.Status, Invoice.TaxAmount, Invoice.Id, Account.AccountNumber, Account.Balance, BillToContact.Id, Account.CreditBalance, Account.Currency, Account.PaymentGateway, SoldToContact.Id, Account.InvoiceDeliveryPrefsEmail, Account.InvoiceDeliveryPrefsPrint, Contact.AccountId, Contact.Address1, Contact.Address2, Contact.City, Contact.Country, Contact.FirstName, Contact.LastName, Contact.PersonalEmail, Contact.PostalCode, Contact.State, Contact.WorkEmail, Contact.Id, Account.Id, Invoice.AdjustmentAmount, Invoice.Amount, Invoice.Balance, Invoice.DueDate, Invoice.InvoiceDate, Invoice.InvoiceNumber, Invoice.PaymentAmount, Invoice.RefundAmount, Invoice.SourceId, Invoice.Status, Invoice.TaxAmount, Invoice.Id, Account.AccountNumber, Account.Balance, BillToContact.Id, Account.CreditBalance, Account.Currency, Account.PaymentGateway, SoldToContact.Id, Account.InvoiceDeliveryPrefsEmail, Account.InvoiceDeliveryPrefsPrint, Contact.AccountId, Contact.Address1, Contact.Address2, Contact.City, Contact.Country, Contact.FirstName, Contact.LastName, Contact.PersonalEmail, Contact.PostalCode, Contact.State, Contact.WorkEmail, Contact.Id, Account.Id, Invoice.AdjustmentAmount, Invoice.Amount, Invoice.Balance, Invoice.DueDate, Invoice.InvoiceDate, Invoice.InvoiceNumber, Invoice.PaymentAmount, Invoice.RefundAmount, Invoice.SourceId, Invoice.Status, Invoice.TaxAmount, Invoice.Id, Account.AccountNumber, Account.Balance, BillToContact.Id, Account.CreditBalance, Account.Currency, Account.PaymentGateway, SoldToContact.Id, Account.InvoiceDeliveryPrefsEmail, Account.InvoiceDeliveryPrefsPrint, Contact.AccountId, Contact.Address1, Contact.Address2, Contact.City, Contact.Country, Contact.FirstName, Contact.LastName, Contact.PersonalEmail, Contact.PostalCode, Contact.State, Contact.WorkEmail, Contact.Id, Account.Id, Invoice.AdjustmentAmount, Invoice.Amount, Invoice.Balance, Invoice.DueDate, Invoice.InvoiceDate, Invoice.InvoiceNumber, Invoice.PaymentAmount, Invoice.RefundAmount, Invoice.SourceId, Invoice.Status, Invoice.TaxAmount, Invoice.Id, Account.AccountNumber, Account.Balance, BillToContact.Id, Account.CreditBalance, Account.Currency, Account.PaymentGateway, SoldToContact.Id, Account.InvoiceDeliveryPrefsEmail, Account.InvoiceDeliveryPrefsPrint, Contact.AccountId, Contact.Address1, Contact.Address2, Contact.City, Contact.Country, Contact.FirstName, Contact.LastName, Contact.PersonalEmail, Contact.PostalCode, Contact.State, Contact.WorkEmail, Contact.Id, InvoiceItem.ChargeAmount, InvoiceItem.ChargeName, Product.Name, InvoiceItem.Quantity, InvoiceItem.ServiceEndDate, InvoiceItem.ServiceStartDate, InvoiceItem.UnitPrice, InvoiceItem.UOM, Product.BusinessLine__c, ProductRatePlanCharge.ChargeType, InvoiceItem.Id, TaxationItem.Name, TaxationItem.TaxAmount, TaxationItem.Id, Account.Id, Invoice.AdjustmentAmount, Invoice.Amount, Invoice.Balance, Invoice.DueDate, Invoice.InvoiceDate, Invoice.InvoiceNumber, Invoice.PaymentAmount, Invoice.RefundAmount, Invoice.SourceId, Invoice.Status, Invoice.TaxAmount, Invoice.Id, Account.AccountNumber, Account.Balance, BillToContact.Id, Account.CreditBalance, Account.Currency, Account.PaymentGateway, SoldToContact.Id, Account.InvoiceDeliveryPrefsEmail, Account.InvoiceDeliveryPrefsPrint, Contact.AccountId, Contact.Address1, Contact.Address2, Contact.City, Contact.Country, Contact.FirstName, Contact.LastName, Contact.PersonalEmail, Contact.PostalCode, Contact.State, Contact.WorkEmail, Contact.Id, Account.Id, Invoice.AdjustmentAmount, Invoice.Amount, Invoice.Balance, Invoice.DueDate, Invoice.InvoiceDate, Invoice.InvoiceNumber, Invoice.PaymentAmount, Invoice.RefundAmount, Invoice.SourceId, Invoice.Status, Invoice.TaxAmount, Invoice.Id, Account.AccountNumber, Account.Balance, BillToContact.Id, Account.CreditBalance, Account.Currency, Account.PaymentGateway, SoldToContact.Id, Account.InvoiceDeliveryPrefsEmail, Account.InvoiceDeliveryPrefsPrint, Contact.AccountId, Contact.Address1, Contact.Address2, Contact.City, Contact.Country, Contact.FirstName, Contact.LastName, Contact.PersonalEmail, Contact.PostalCode, Contact.State, Contact.WorkEmail, Contact.Id, Account.Id, Invoice.AdjustmentAmount, Invoice.Amount, Invoice.Balance, Invoice.DueDate, Invoice.InvoiceDate, Invoice.InvoiceNumber, Invoice.PaymentAmount, Invoice.RefundAmount, Invoice.SourceId, Invoice.Status, Invoice.TaxAmount, Invoice.Id, Account.AccountNumber, Account.Balance, BillToContact.Id, Account.CreditBalance, Account.Currency, Account.PaymentGateway, SoldToContact.Id, Account.InvoiceDeliveryPrefsEmail, Account.InvoiceDeliveryPrefsPrint, Contact.AccountId, Contact.Address1, Contact.Address2, Contact.City, Contact.Country, Contact.FirstName, Contact.LastName, Contact.PersonalEmail, Contact.PostalCode, Contact.State, Contact.WorkEmail, Contact.Id, Account.Id, Invoice.AdjustmentAmount, Invoice.Amount, Invoice.Balance, Invoice.DueDate, Invoice.InvoiceDate, Invoice.InvoiceNumber, Invoice.PaymentAmount, Invoice.RefundAmount, Invoice.SourceId, Invoice.Status, Invoice.TaxAmount, Invoice.Id, Account.AccountNumber, Account.Balance, BillToContact.Id, Account.CreditBalance, Account.Currency, Account.PaymentGateway, SoldToContact.Id, Account.InvoiceDeliveryPrefsEmail, Account.InvoiceDeliveryPrefsPrint, Contact.AccountId, Contact.Address1, Contact.Address2, Contact.City, Contact.Country, Contact.FirstName, Contact.LastName, Contact.PersonalEmail, Contact.PostalCode, Contact.State, Contact.WorkEmail, Contact.Id, Account.Id, Invoice.AdjustmentAmount, Invoice.Amount, Invoice.Balance, Invoice.DueDate, Invoice.InvoiceDate, Invoice.InvoiceNumber, Invoice.PaymentAmount, Invoice.RefundAmount, Invoice.SourceId, Invoice.Status, Invoice.TaxAmount, Invoice.Id, Account.AccountNumber, Account.Balance, BillToContact.Id, Account.CreditBalance, Account.Currency, Account.PaymentGateway, SoldToContact.Id, Account.InvoiceDeliveryPrefsEmail, Account.InvoiceDeliveryPrefsPrint, Contact.AccountId, Contact.Address1, Contact.Address2, Contact.City, Contact.Country, Contact.FirstName, Contact.LastName, Contact.PersonalEmail, Contact.PostalCode, Contact.State, Contact.WorkEmail, Contact.Id, Account.Id, Invoice.AdjustmentAmount, Invoice.Amount, Invoice.Balance, Invoice.DueDate, Invoice.InvoiceDate, Invoice.InvoiceNumber, Invoice.PaymentAmount, Invoice.RefundAmount, Invoice.SourceId, Invoice.Status, Invoice.TaxAmount, Invoice.Id, Account.AccountNumber, Account.Balance, BillToContact.Id, Account.CreditBalance, Account.Currency, Account.PaymentGateway, SoldToContact.Id, Account.InvoiceDeliveryPrefsEmail, Account.InvoiceDeliveryPrefsPrint, Contact.AccountId, Contact.Address1, Contact.Address2, Contact.City, Contact.Country, Contact.FirstName, Contact.LastName, Contact.PersonalEmail, Contact.PostalCode, Contact.State, Contact.WorkEmail, Contact.Id, Account.Id, Invoice.AdjustmentAmount, Invoice.Amount, Invoice.Balance, Invoice.DueDate, Invoice.InvoiceDate, Invoice.InvoiceNumber, Invoice.PaymentAmount, Invoice.RefundAmount, Invoice.SourceId, Invoice.Status, Invoice.TaxAmount, Invoice.Id, Account.AccountNumber, Account.Balance, BillToContact.Id, Account.CreditBalance, Account.Currency, Account.PaymentGateway, SoldToContact.Id, Account.InvoiceDeliveryPrefsEmail, Account.InvoiceDeliveryPrefsPrint, Contact.AccountId, Contact.Address1, Contact.Address2, Contact.City, Contact.Country, Contact.FirstName, Contact.LastName, Contact.PersonalEmail, Contact.PostalCode, Contact.State, Contact.WorkEmail, Contact.Id, Account.Id, Invoice.AdjustmentAmount, Invoice.Amount, Invoice.Balance, Invoice.DueDate, Invoice.InvoiceDate, Invoice.InvoiceNumber, Invoice.PaymentAmount, Invoice.RefundAmount, Invoice.SourceId, Invoice.Status, Invoice.TaxAmount, Invoice.Id, Account.AccountNumber, Account.Balance, BillToContact.Id, Account.CreditBalance, Account.Currency, Account.PaymentGateway, SoldToContact.Id, Account.InvoiceDeliveryPrefsEmail, Account.InvoiceDeliveryPrefsPrint, Contact.AccountId, Contact.Address1, Contact.Address2, Contact.City, Contact.Country, Contact.FirstName, Contact.LastName, Contact.PersonalEmail, Contact.PostalCode, Contact.State, Contact.WorkEmail, Contact.Id, InvoiceItem.ChargeAmount, InvoiceItem.ChargeName, Product.Name, InvoiceItem.Quantity, InvoiceItem.ServiceEndDate, InvoiceItem.ServiceStartDate, InvoiceItem.UnitPrice, InvoiceItem.UOM, Product.BusinessLine__c, ProductRatePlanCharge.ChargeType, InvoiceItem.Id, Account.Id, Invoice.AdjustmentAmount, Invoice.Amount, Invoice.Balance, Invoice.DueDate, Invoice.InvoiceDate, Invoice.InvoiceNumber, Invoice.PaymentAmount, Invoice.RefundAmount, Invoice.SourceId, Invoice.Status, Invoice.TaxAmount, Invoice.Id, Account.AccountNumber, Account.Balance, BillToContact.Id, Account.CreditBalance, Account.Currency, Account.PaymentGateway, SoldToContact.Id, Account.InvoiceDeliveryPrefsEmail, Account.InvoiceDeliveryPrefsPrint, Contact.AccountId, Contact.Address1, Contact.Address2, Contact.City, Contact.Country, Contact.FirstName, Contact.LastName, Contact.PersonalEmail, Contact.PostalCode, Contact.State, Contact.WorkEmail, Contact.Id, Account.Id, Invoice.AdjustmentAmount, Invoice.Amount, Invoice.Balance, Invoice.DueDate, Invoice.InvoiceDate, Invoice.InvoiceNumber, Invoice.PaymentAmount, Invoice.RefundAmount, Invoice.SourceId, Invoice.Status, Invoice.TaxAmount, Invoice.Id, Account.AccountNumber, Account.Balance, BillToContact.Id, Account.CreditBalance, Account.Currency, Account.PaymentGateway, SoldToContact.Id, Account.InvoiceDeliveryPrefsEmail, Account.InvoiceDeliveryPrefsPrint, Contact.AccountId, Contact.Address1, Contact.Address2, Contact.City, Contact.Country, Contact.FirstName, Contact.LastName, Contact.PersonalEmail, Contact.PostalCode, Contact.State, Contact.WorkEmail, Contact.Id, Account.Id, Invoice.AdjustmentAmount, Invoice.Amount, Invoice.Balance, Invoice.DueDate, Invoice.InvoiceDate, Invoice.InvoiceNumber, Invoice.PaymentAmount, Invoice.RefundAmount, Invoice.SourceId, Invoice.Status, Invoice.TaxAmount, Invoice.Id, Account.AccountNumber, Account.Balance, BillToContact.Id, Account.CreditBalance, Account.Currency, Account.PaymentGateway, SoldToContact.Id, Account.InvoiceDeliveryPrefsEmail, Account.InvoiceDeliveryPrefsPrint, Contact.AccountId, Contact.Address1, Contact.Address2, Contact.City, Contact.Country, Contact.FirstName, Contact.LastName, Contact.PersonalEmail, Contact.PostalCode, Contact.State, Contact.WorkEmail, Contact.Id, Account.Id, Invoice.AdjustmentAmount, Invoice.Amount, Invoice.Balance, Invoice.DueDate, Invoice.InvoiceDate, Invoice.InvoiceNumber, Invoice.PaymentAmount, Invoice.RefundAmount, Invoice.SourceId, Invoice.Status, Invoice.TaxAmount, Invoice.Id, Account.AccountNumber, Account.Balance, BillToContact.Id, Account.CreditBalance, Account.Currency, Account.PaymentGateway, SoldToContact.Id, Account.InvoiceDeliveryPrefsEmail, Account.InvoiceDeliveryPrefsPrint, Contact.AccountId, Contact.Address1, Contact.Address2, Contact.City, Contact.Country, Contact.FirstName, Contact.LastName, Contact.PersonalEmail, Contact.PostalCode, Contact.State, Contact.WorkEmail, Contact.Id, Account.Id, Invoice.AdjustmentAmount, Invoice.Amount, Invoice.Balance, Invoice.DueDate, Invoice.InvoiceDate, Invoice.InvoiceNumber, Invoice.PaymentAmount, Invoice.RefundAmount, Invoice.SourceId, Invoice.Status, Invoice.TaxAmount, Invoice.Id, Account.AccountNumber, Account.Balance, BillToContact.Id, Account.CreditBalance, Account.Currency, Account.PaymentGateway, SoldToContact.Id, Account.InvoiceDeliveryPrefsEmail, Account.InvoiceDeliveryPrefsPrint, Contact.AccountId, Contact.Address1, Contact.Address2, Contact.City, Contact.Country, Contact.FirstName, Contact.LastName, Contact.PersonalEmail, Contact.PostalCode, Contact.State, Contact.WorkEmail, Contact.Id, Account.Id, Invoice.AdjustmentAmount, Invoice.Amount, Invoice.Balance, Invoice.DueDate, Invoice.InvoiceDate, Invoice.InvoiceNumber, Invoice.PaymentAmount, Invoice.RefundAmount, Invoice.SourceId, Invoice.Status, Invoice.TaxAmount, Invoice.Id, Account.AccountNumber, Account.Balance, BillToContact.Id, Account.CreditBalance, Account.Currency, Account.PaymentGateway, SoldToContact.Id, Account.InvoiceDeliveryPrefsEmail, Account.InvoiceDeliveryPrefsPrint, Contact.AccountId, Contact.Address1, Contact.Address2, Contact.City, Contact.Country, Contact.FirstName, Contact.LastName, Contact.PersonalEmail, Contact.PostalCode, Contact.State, Contact.WorkEmail, Contact.Id, Account.Id, Invoice.AdjustmentAmount, Invoice.Amount, Invoice.Balance, Invoice.DueDate, Invoice.InvoiceDate, Invoice.InvoiceNumber, Invoice.PaymentAmount, Invoice.RefundAmount, Invoice.SourceId, Invoice.Status, Invoice.TaxAmount, Invoice.Id, Account.AccountNumber, Account.Balance, BillToContact.Id, Account.CreditBalance, Account.Currency, Account.PaymentGateway, SoldToContact.Id, Account.InvoiceDeliveryPrefsEmail, Account.InvoiceDeliveryPrefsPrint, Contact.AccountId, Contact.Address1, Contact.Address2, Contact.City, Contact.Country, Contact.FirstName, Contact.LastName, Contact.PersonalEmail, Contact.PostalCode, Contact.State, Contact.WorkEmail, Contact.Id, Account.Id, Invoice.AdjustmentAmount, Invoice.Amount, Invoice.Balance, Invoice.DueDate, Invoice.InvoiceDate, Invoice.InvoiceNumber, Invoice.PaymentAmount, Invoice.RefundAmount, Invoice.SourceId, Invoice.Status, Invoice.TaxAmount, Invoice.Id, Account.AccountNumber, Account.Balance, BillToContact.Id, Account.CreditBalance, Account.Currency, Account.PaymentGateway, SoldToContact.Id, Account.InvoiceDeliveryPrefsEmail, Account.InvoiceDeliveryPrefsPrint, Contact.AccountId, Contact.Address1, Contact.Address2, Contact.City, Contact.Country, Contact.FirstName, Contact.LastName, Contact.PersonalEmail, Contact.PostalCode, Contact.State, Contact.WorkEmail, Contact.Id, InvoiceItem.ChargeAmount, InvoiceItem.ChargeName, Product.Name, InvoiceItem.Quantity, InvoiceItem.ServiceEndDate, InvoiceItem.ServiceStartDate, InvoiceItem.UnitPrice, InvoiceItem.UOM, Product.BusinessLine__c, ProductRatePlanCharge.ChargeType, InvoiceItem.Id, TaxationItem.Name, TaxationItem.TaxAmount, TaxationItem.Id FROM Invoice WHERE SourceId = 'BR-00000176' AND Status = 'Posted' LIMIT 0,10000"); }