public FinancialTransactionsExport Export( int page = 1, int pageSize = 1000, string sortBy = null, System.Web.UI.WebControls.SortDirection sortDirection = System.Web.UI.WebControls.SortDirection.Ascending, int?dataViewId = null, DateTime?modifiedSince = null, DateTime?startDateTime = null, DateTime?endDateTime = null, string attributeKeys = null, AttributeReturnType attributeReturnType = AttributeReturnType.Raw ) { // limit to 'API Max Items Per Page' global attribute int maxPageSize = GlobalAttributesCache.Get().GetValue("core_ExportAPIsMaxItemsPerPage").AsIntegerOrNull() ?? 1000; var actualPageSize = Math.Min(pageSize, maxPageSize); FinancialTransactionExportOptions exportOptions = new FinancialTransactionExportOptions { SortBy = sortBy, SortDirection = sortDirection, DataViewId = dataViewId, ModifiedSince = modifiedSince, AttributeList = AttributesExport.GetAttributesFromAttributeKeys <FinancialTransaction>(attributeKeys), AttributeReturnType = attributeReturnType, StartDateTime = startDateTime, EndDateTime = endDateTime }; var rockContext = new RockContext(); var financialTransactionService = new FinancialTransactionService(rockContext); return(financialTransactionService.GetFinancialTransactionExport(page, actualPageSize, exportOptions)); }