Class SupaConverter
Methods for conversion between SEPA objects and SUPA records.
Inheritance
System.Object
SupaConverter
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Assembly: Subsembly.Sepa.dll
Syntax
public static class SupaConverter
Methods
ConvertToSupa(SepaAccount, SepaBalance, SepaBalance, SupaRecord)
Fills SupaRecord with account and balance information according to
the SUPA specification for an object of type AcctBal
.
Declaration
public static void ConvertToSupa(SepaAccount aAccount, SepaBalance aBookedBalance, SepaBalance aExpectedBalance, SupaRecord aSupaRecord)
Parameters
Type |
Name |
Description |
SepaAccount |
aAccount |
Provides the account information for the Acct fields. Must be fully valid
and not be null .
|
SepaBalance |
aBookedBalance |
Provides the booked balance information for the fields BalAmt ,
BalCdtDbtInd , and BalDt . May also include credit line
information which will be set as CdtLineAmt . Must be fully valid
and not be null .
|
SepaBalance |
aExpectedBalance |
Provides optional current balance information for the fields CurBalAmt ,
CurBalCdtDbtInd , and CurBalDt . May also include credit line
information which will be set as CdtLineAmt . May be null if no
current balance is provided. Must be fully valid, if provided.
|
SupaRecord |
aSupaRecord |
The SupaRecord where the fields shall be set. Must not be
null .
|
ConvertToSupa(SepaAccount, SupaRecord)
Declaration
public static void ConvertToSupa(SepaAccount aAccount, SupaRecord aSupaRecord)
Parameters
Type |
Name |
Description |
SepaAccount |
aAccount |
The SepaAccount to convert from. Must not be null .
|
SupaRecord |
aSupaRecord |
The target record that shall receive the SUPA data fields for the given
account. Must not be null .
|
Exceptions
Type |
Condition |
System.ArgumentNullException |
|
ConvertToSupa(SepaBalance, SupaRecord)
Fills SupaRecord with balance information according to
the SUPA specification for an object of type Bal
.
Declaration
public static void ConvertToSupa(SepaBalance aBalance, SupaRecord aSupaRecord)
Parameters
Type |
Name |
Description |
SepaBalance |
aBalance |
The SepaBalance to be converted to SUPA fields. This must be a fully
valid balance object and must not be null .
|
SupaRecord |
aSupaRecord |
The SupaRecord where the balance fields shall be set. Must not be
null .
|
ConvertToSupa(SepaStatementEntry, SepaTransactionDetails, SupaRecord)
Declaration
public static void ConvertToSupa(SepaStatementEntry aEntry, SepaTransactionDetails aTxn, SupaRecord aSupaRecord)
Parameters
ProduceAccount(JsonObject)
Declaration
public static SepaAccount ProduceAccount(JsonObject jsAcct)
Parameters
Returns
ProduceAccount(SupaRecord)
Declaration
public static SepaAccount ProduceAccount(SupaRecord aSupaRecord)
Parameters
Returns
ProduceAccountBalance(JsonObject, out SepaAccount, out SepaBalance, out SepaBalance)
Declaration
public static void ProduceAccountBalance(JsonObject jsAcctBal, out SepaAccount aAccount, out SepaBalance aBookedBalance, out SepaBalance aExpectedBalance)
Parameters
See Also
ProduceAccountBalance(SupaRecord, out SepaAccount, out SepaBalance, out SepaBalance)
Declaration
public static void ProduceAccountBalance(SupaRecord aSupaRecord, out SepaAccount aAccount, out SepaBalance aBookedBalance, out SepaBalance aExpectedBalance)
Parameters
Type |
Name |
Description |
SupaRecord |
aSupaRecord |
|
SepaAccount |
aAccount |
Will receive the result from ProduceAccount(SupaRecord).
|
SepaBalance |
aBookedBalance |
The booked balance will be created from the SUPA fields BalAmt ,
BalCdtDbtInd , BalDt , AcctCcy , and optional
CdtLineAmt . The balance type will always be set to
ClosingBooked.
|
SepaBalance |
aExpectedBalance |
If the SUPA record contains a field CurBalAmt , then this balance will
be created from the fields CurBalAmt , CurBalCdtDbtInd ,
CurBalDt , and AcctCcy . The balance type will always be set to
Expected. The
CreditLineAmount will not be set. If no CurBalAmt
is present, then this will be set to null .
|
ProduceBalance(JsonObject)
Declaration
public static SepaBalance ProduceBalance(JsonObject jsBal)
Parameters
Type |
Name |
Description |
JsonObject |
jsBal |
The SUPA JSON balance object to convert. This must not be null .
|
Returns
See Also
ProduceBalance(SupaRecord)
Declaration
public static SepaBalance ProduceBalance(SupaRecord aSupaRecord)
Parameters
Returns
ProduceBatchEntry(SupaRecord, IList<SupaRecord>)
Declaration
public static SepaStatementEntry ProduceBatchEntry(SupaRecord aSupaEntryRecord, IList<SupaRecord> vSupaTransactionRecords)
Parameters
Type |
Name |
Description |
SupaRecord |
aSupaEntryRecord |
|
System.Collections.Generic.IList<SupaRecord> |
vSupaTransactionRecords |
|
Returns
ProduceEntry(JsonObject)
Declaration
public static SepaStatementEntry ProduceEntry(JsonObject jsEntry)
Parameters
Returns
ProduceEntry(SupaRecord)
Declaration
public static SepaStatementEntry ProduceEntry(SupaRecord aSupaRecord)
Parameters
Returns
ProduceJson(SepaAccount)
Declaration
public static JsonObject ProduceJson(SepaAccount aAccount)
Parameters
Returns
ProduceJson(SepaAccount, SepaBalance, SepaBalance)
Creates a SUPA JSON object with account and balance information according to
the SUPA specification for an object of type AcctBal
.
Declaration
public static JsonObject ProduceJson(SepaAccount aAccount, SepaBalance aBookedBalance, SepaBalance aExpectedBalance)
Parameters
Type |
Name |
Description |
SepaAccount |
aAccount |
Provides the account information for the Acct fields. Must be fully valid
and not be null .
|
SepaBalance |
aBookedBalance |
Provides the booked balance information for the fields BalAmt ,
BalCdtDbtInd , and BalDt . May also include credit line
information which will be set as CdtLineAmt . Must be fully valid
and not be null .
|
SepaBalance |
aExpectedBalance |
Provides optional current balance information for the fields CurBalAmt ,
CurBalCdtDbtInd , and CurBalDt . May also include credit line
information which will be set as CdtLineAmt . May be null if no
current balance is provided. Must be fully valid, if provided.
|
Returns
See Also
ProduceJson(SepaBalance)
Creates a SUPA JSON object with balance information according to
the SUPA specification for an object of type Bal
.
Declaration
public static JsonObject ProduceJson(SepaBalance aBalance)
Parameters
Type |
Name |
Description |
SepaBalance |
aBalance |
The SepaBalance to be converted to SUPA. This must be a fully
valid balance object and must not be null .
|
Returns
See Also
ProduceJson(SepaDocument)
Converts a CAMT document into JSON representation.
Declaration
public static JsonObject ProduceJson(SepaDocument aDoc)
Parameters
Returns
Exceptions
Type |
Condition |
System.ArgumentNullException |
The parameter was null .
|
System.ArgumentException |
The given document was not CAMT document.
|
System.NotSupportedException |
The CAMT document contains no stmt at all.
|
ProduceJson(SepaStatement)
Converts a SepaStatement instance into JSON representation.
Declaration
public static JsonObject ProduceJson(SepaStatement aStmt)
Parameters
Returns
ProduceJson(SepaStatementEntry)
Declaration
public static JsonObject ProduceJson(SepaStatementEntry aEntry)
Parameters
Returns
ProduceJson(SepaStatementEntry, SepaTransactionDetails)
Declaration
public static JsonObject ProduceJson(SepaStatementEntry aEntry, SepaTransactionDetails aTxn)
Parameters
Returns
ProduceJson(IEnumerable<SepaStatementEntry>)
Declaration
public static JsonArray ProduceJson(IEnumerable<SepaStatementEntry> vEntries)
Parameters
Returns
ProducePaymentInitiation(JsonObject)
Declaration
public static SepaPaymentInitiation ProducePaymentInitiation(JsonObject jsRemitt)
Parameters
Returns
ProducePaymentInitiation(SupaRecord)
Declaration
public static SepaPaymentInitiation ProducePaymentInitiation(SupaRecord aSupaRecord)
Parameters
Returns