Committing work. Build is still broken.

This commit is contained in:
Rick Falkvinge
2014-08-08 18:19:54 +00:00
parent 71313a638d
commit d3d2e8bb22
8 changed files with 75 additions and 1 deletions
@@ -0,0 +1,13 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Swarmops.Logic.Financial.BankDataReaders
{
// ReSharper disable once InconsistentNaming
class SEPaymentsBankgiroReader: IBankDataPaymentsReader
{
}
}
@@ -0,0 +1,11 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Swarmops.Logic.Financial.BankDataReaders
{
public class TabSeparatedValuesReader: IBankDataAccountReader
{
}
}
+9 -1
View File
@@ -56,6 +56,9 @@ namespace Swarmops.Logic.Financial
result.FeeSignage = FeeSignage.Unknown; // no inline fees
result.Precision = ExternalBankDateTimePrecision.Day;
result.BankDataAccountReader = StockBankDataReaders.TabSeparatedValuesAccountReader;
result.BankDataPaymentsReader = StockBankDataReaders.SEPaymentsBankgiroReader;
return result;
}
@@ -63,7 +66,7 @@ namespace Swarmops.Logic.Financial
{
result.Name = "Paypal";
result.Country = null;
result.Culture = "sv-SE"; // what the actual fuck? Paypal's giving me sv-SE culture
result.Culture = "sv-SE"; // what the actual fuck? Paypal's giving me sv-SE culture in export file
result.FieldNames[ExternalBankDataFieldName.Date] = "Date";
result.FieldNames[ExternalBankDataFieldName.Time] = "Time";
@@ -80,6 +83,9 @@ namespace Swarmops.Logic.Financial
result.FeeSignage = FeeSignage.Negative;
result.Precision = ExternalBankDateTimePrecision.Second;
result.BankDataAccountReader = StockBankDataReaders.TabSeparatedValuesAccountReader;
result.BankDataPaymentsReader = null; // No aggregated payments with Paypal
return result;
}
@@ -96,6 +102,8 @@ namespace Swarmops.Logic.Financial
public LatestTransactionLocation LatestTransactionLocation;
public ExternalBankDateTimePrecision Precision;
public FeeSignage FeeSignage;
public string BankDataAccountReader { get; set; }
public string BankDataPaymentsReader { get; set; }
public Dictionary<ExternalBankDataFieldName, string> FieldNames { get; private set; }
}
+1
View File
@@ -189,6 +189,7 @@ namespace Swarmops.Logic.Financial
}
#region ITreeNode Members
+10
View File
@@ -0,0 +1,10 @@
using System.IO;
using Swarmops.Logic.Financial.BankDataReaders;
namespace Swarmops.Logic.Financial
{
interface IBankDataAccountReader
{
ImportedBankData ReadData(TextReader data, IBankDataPaymentsReader paymentsReader);
}
}
@@ -0,0 +1,11 @@
namespace Swarmops.Logic.Financial
{
interface IBankDataPaymentsReader
{
void GetParameterList(); // TODO - need to find types of params and return for this guy
void SetParameters(); // TODO - ditto
string GetDescriptionRegex();
string GenerateUniquePaymentGroupId(); // parameters here?
void ImportPaymentsFile(); // Input parameter(s)?
}
}
+15
View File
@@ -0,0 +1,15 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Swarmops.Logic.Financial
{
// ReSharper disable InconsistentNaming
class StockBankDataReaders
{
public static string TabSeparatedValuesAccountReader { get { return "TabSeparatedValuesReader"; }}
public static string SEPaymentsBankgiroReader { get { return "SEPaymentsBankgiroReader"; }}
}
// ReSharper restore InconsistentNaming
}
+5
View File
@@ -95,6 +95,10 @@
<Compile Include="Communications\Transmission\PayloadEnvelope.cs" />
<Compile Include="Communications\Transmission\NotificationPayload.cs" />
<Compile Include="Communications\Transmission\PayloadBase.cs" />
<Compile Include="Financial\BankDataReaders\SEPaymentsBankgiroReader.cs" />
<Compile Include="Financial\IBankDataAccountReader.cs" />
<Compile Include="Financial\IBankDataPaymentsReader.cs" />
<Compile Include="Financial\BankDataReaders\TabSeparatedValuesReader.cs" />
<Compile Include="Financial\CashAdvance.cs" />
<Compile Include="Financial\CashAdvances.cs" />
<Compile Include="Financial\ExternalBankData.cs" />
@@ -108,6 +112,7 @@
<Compile Include="Financial\FinancialTransactionTagTypes.cs" />
<Compile Include="Financial\ImportedBankData.cs" />
<Compile Include="Financial\ISummable.cs" />
<Compile Include="Financial\StockBankDataReaders.cs" />
<Compile Include="Financial\YearlyReport.cs" />
<Compile Include="Security\Accesses.cs" />
<Compile Include="AssemblyInfo.cs" />