• API Overview
  • EBICS API
  • FinTS API
  • XS2A API
  • SEPA API
Search Results for

    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()
    Namespace: Subsembly.Supa
    Assembly: Subsembly.Sepa.dll
    Syntax
    public static class SupaConverter
    Remarks

    The field names of the JSON objects are based on the XML tag names defined in the Subsembly SUPA specification based on ISO 20022. Hence, it should be straightforward to understand and apply.

    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.

    Remarks

    If both balances include a CreditLineAmount, then both must have the same value, otherwise an exception will be thrown.

    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.

    Remarks

    This will set the SUPA balance fields BalTpCd, BalAmt, BalCdtDbtInd, and BalDt from the given aBalance. The SepaBalanceType will be copied to the BalTpCd field without any validation.

    The Currency from the balance will be set to the SUPA field AcctCcy.

    If the given balance includes a non-empty CreditLineAmount, then the SUPA field CdtLineAmt is set with that amount.

    ConvertToSupa(SepaStatementEntry, SepaTransactionDetails, SupaRecord)

    Declaration
    public static void ConvertToSupa(SepaStatementEntry aEntry, SepaTransactionDetails aTxn, SupaRecord aSupaRecord)
    Parameters
    Type Name Description
    SepaStatementEntry aEntry
    SepaTransactionDetails aTxn

    optional

    SupaRecord aSupaRecord

    ProduceAccount(JsonObject)

    Declaration
    public static SepaAccount ProduceAccount(JsonObject jsAcct)
    Parameters
    Type Name Description
    JsonObject jsAcct
    Returns
    Type Description
    SepaAccount

    ProduceAccount(SupaRecord)

    Declaration
    public static SepaAccount ProduceAccount(SupaRecord aSupaRecord)
    Parameters
    Type Name Description
    SupaRecord aSupaRecord
    Returns
    Type Description
    SepaAccount

    ProduceAccountBalance(JsonObject, out SepaAccount, out SepaBalance, out SepaBalance)

    Produce a SepaAccount and SepaBalance objects from a single SUPA AcctBal JSON object.

    Declaration
    public static void ProduceAccountBalance(JsonObject jsAcctBal, out SepaAccount aAccount, out SepaBalance aBookedBalance, out SepaBalance aExpectedBalance)
    Parameters
    Type Name Description
    JsonObject jsAcctBal

    The SUPA JSON AcctBal object to convert. This must not be null.

    SepaAccount aAccount
    SepaBalance aBookedBalance
    SepaBalance aExpectedBalance
    See Also
    ProduceAccountBalance(SupaRecord, out SepaAccount, out SepaBalance, out SepaBalance)

    ProduceAccountBalance(SupaRecord, out SepaAccount, out SepaBalance, out SepaBalance)

    Produce a SepaAccount and SepaBalance objects from a single SUPA AcctBal record.

    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)

    Produce a SepaBalance from SUPA JSON object.

    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
    Type Description
    SepaBalance
    See Also
    ProduceBalance(SupaRecord)

    ProduceBalance(SupaRecord)

    Produce a SepaBalance from SUPA data.

    Declaration
    public static SepaBalance ProduceBalance(SupaRecord aSupaRecord)
    Parameters
    Type Name Description
    SupaRecord aSupaRecord
    Returns
    Type Description
    SepaBalance
    Remarks

    This will create a SepaBalance from the SUPA fields BalTpCd, BalAmt, BalCdtDbtInd, BalDt, AcctCcy, and optional CdtLineAmt.

    ProduceBatchEntry(SupaRecord, IList<SupaRecord>)

    Produces a SepaStatementEntry containing multiple SepaTransactionDetails from the given list of SUPA statement entries.

    Declaration
    public static SepaStatementEntry ProduceBatchEntry(SupaRecord aSupaEntryRecord, IList<SupaRecord> vSupaTransactionRecords)
    Parameters
    Type Name Description
    SupaRecord aSupaEntryRecord
    System.Collections.Generic.IList<SupaRecord> vSupaTransactionRecords
    Returns
    Type Description
    SepaStatementEntry

    ProduceEntry(JsonObject)

    Declaration
    public static SepaStatementEntry ProduceEntry(JsonObject jsEntry)
    Parameters
    Type Name Description
    JsonObject jsEntry
    Returns
    Type Description
    SepaStatementEntry

    ProduceEntry(SupaRecord)

    Produces a SepaStatementEntry containing a single SepaTransactionDetails from the given SUPA statement entry.

    Declaration
    public static SepaStatementEntry ProduceEntry(SupaRecord aSupaRecord)
    Parameters
    Type Name Description
    SupaRecord aSupaRecord
    Returns
    Type Description
    SepaStatementEntry

    ProduceJson(SepaAccount)

    Declaration
    public static JsonObject ProduceJson(SepaAccount aAccount)
    Parameters
    Type Name Description
    SepaAccount aAccount
    Returns
    Type Description
    JsonObject

    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
    Type Description
    JsonObject
    See Also
    ConvertToSupa(SepaAccount, SepaBalance, SepaBalance, SupaRecord)

    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
    Type Description
    JsonObject
    See Also
    ConvertToSupa(SepaBalance, SupaRecord)

    ProduceJson(SepaDocument)

    Converts a CAMT document into JSON representation.

    Declaration
    public static JsonObject ProduceJson(SepaDocument aDoc)
    Parameters
    Type Name Description
    SepaDocument aDoc
    Returns
    Type Description
    JsonObject
    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
    Type Name Description
    SepaStatement aStmt
    Returns
    Type Description
    JsonObject

    ProduceJson(SepaStatementEntry)

    Declaration
    public static JsonObject ProduceJson(SepaStatementEntry aEntry)
    Parameters
    Type Name Description
    SepaStatementEntry aEntry
    Returns
    Type Description
    JsonObject

    ProduceJson(SepaStatementEntry, SepaTransactionDetails)

    Declaration
    public static JsonObject ProduceJson(SepaStatementEntry aEntry, SepaTransactionDetails aTxn)
    Parameters
    Type Name Description
    SepaStatementEntry aEntry
    SepaTransactionDetails aTxn

    optional

    Returns
    Type Description
    JsonObject

    ProduceJson(IEnumerable<SepaStatementEntry>)

    Declaration
    public static JsonArray ProduceJson(IEnumerable<SepaStatementEntry> vEntries)
    Parameters
    Type Name Description
    System.Collections.Generic.IEnumerable<SepaStatementEntry> vEntries
    Returns
    Type Description
    JsonArray

    ProducePaymentInitiation(JsonObject)

    Declaration
    public static SepaPaymentInitiation ProducePaymentInitiation(JsonObject jsRemitt)
    Parameters
    Type Name Description
    JsonObject jsRemitt
    Returns
    Type Description
    SepaPaymentInitiation

    ProducePaymentInitiation(SupaRecord)

    Declaration
    public static SepaPaymentInitiation ProducePaymentInitiation(SupaRecord aSupaRecord)
    Parameters
    Type Name Description
    SupaRecord aSupaRecord
    Returns
    Type Description
    SepaPaymentInitiation
    In This Article
    Back to top Copyright 2009-2025 Subsembly GmbH