示例#1
0
 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));
 }
示例#2
0
 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)));
 }
示例#3
0
 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));
 }
示例#4
0
        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);
        }
示例#5
0
        public IEnumerable <T> ExportRecords <T>(string query, ZuoraExportOptions options = null) where T : ZObject
        {
            string exportId = PerformExportQuery(query, options);

            return(RetrieveExportRecords <T>(exportId));
        }
示例#6
0
        public Stream ExportStream(string query, ZuoraExportOptions options = null)
        {
            string exportId = PerformExportQuery(query, options);

            return(RetrieveExportStream(exportId));
        }
示例#7
0
        public IEnumerable <CsvRow> ExportData(string query, ZuoraExportOptions options = null)
        {
            string exportId = PerformExportQuery(query, options);

            return(RetrieveExportData(exportId));
        }
示例#8
0
        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);
        }
示例#9
0
        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");
        }