Class EbicsProtocolEntry
Stores the details of a single customer protocol entry obtained via order type HAC or PTK (deprecated).
public class EbicsProtocolEntry : EbicsElement, IEbicsJsonConverter
- Inheritance
-
EbicsProtocolEntry
- Implements
- Inherited Members
- Extension Methods
Remarks
The properties of this object match the elements found in the XML element Originator / Identification / OrganisationIdentification / Other from the pain.002 document returned by the HAC download order. There are additional legacy properties for fields of the PTK text entry.
The following example illustrates how the various properties are set from a given PTK protocol text. Let's assume the following protocol text:
26.11.09 11:48:14 Datei zur Bank uebertragen
Hostname : CBKEBIX1
Auftrag : Inlandszahlungsverkehr IZV DQOD
Teilnehmer : L4190030 SELLEAND Andreas Selle
Ergebnis : Uebertragung in Ordnung [01]
Datenuebertragung verschluesselt [04]
Datenuebertragung komprimiert [05]
The individual properties will be set with the following values.
| TimeStamp | 2009-11-26 11:48:14 |
| ActionText | Datei zur Bank uebertragen |
| ActionCode | -1 Protocol entry sample contains no action ID in square brackets such as e.g. [21]. |
| OrderText | Inlandszahlungsverkehr |
| OrderType | IZV |
| OrderID | DQOD |
| ResultText | Uebertragung in Ordnung |
| ResultCode | 1 |
| Text | The complete protocol entry text as shown above. |
| DisplayFile | Only set if a display file was included (not in the example above) |
Properties
ActionCode
PTK legacy: The value of the action code found in square brackets.
public int ActionCode { get; set; }
Property Value
Remarks
This property is only used for a PTK protocol entry. It shall be ignore for a HAC protocol entry.
If no action code is included in the PTK protocol entry text, then this is -1. Otherwise the action code can range from 0 to 99.
ActionDescription
Provides a human readable description for the ActionText.
public string ActionDescription { get; }
Property Value
Remarks
If the ActionText is null or an empty string, then the
property value will also be null or an empty string.
If the ActionText is not one of the well known HAC protocol type of action strings (e.g. "FILE_UPLOAD", "VEU_FORWARDING", or such), then this property just returns the ActionText itself.
In all other cases, the property provides a human readable description for the well known ActionType.
ActionText
Type of action recorded in this protocol entry.
public string ActionText { get; set; }
Property Value
Remarks
For a HAC protocol entry, this is the value from the OrgnlPmtInfId element, which should be one of the action type texts, such as "FILE_UPLOAD", or "ORDER_HAC_FINAL_POS".
For a legacy PTK protocol entry, this is some free unstructured text.
- See Also
ActionType
This is derived from the ActionText.
public EbicsProtocolActionType ActionType { get; set; }
Property Value
Remarks
If the ActionText is null, then this property is
None. Otherwise, if the
ActionText does not contain a well konwn HAC protocol type of action
string, then this property will be Unknown.
Setting this property will set the ActionText to the corresponding well known HAC protocol type of action string.
AdminOrderType
The EBICS 3.x AdminOrderType of the original order.
public string AdminOrderType { get; set; }
Property Value
Remarks
If this protocol entry was obtained via EBICS 2.x, then this property will be
null.
AdminOrderTypeRef
The EBICS 3.x AdminOrderType of the order referenced by the order that this protocol entry refers to.
public string AdminOrderTypeRef { get; set; }
Property Value
Remarks
If this protocol entry was obtained via EBICS 2.x, then this property will be
null.
DisplayFile
Optional display file text.
public string DisplayFile { get; set; }
Property Value
Remarks
If a display file or other additional information text was included in the protocol entry, then it is stored in this property.
ExternalReasonCode
The External Reason Code from a HAC protocol entry.
public string ExternalReasonCode { get; set; }
Property Value
Remarks
This is a four character reason code such as "DS01" or "TD01".
ExternalReasonCodeDescription
Provides a human readable description for the ExternalReasonCode.
public string ExternalReasonCodeDescription { get; }
Property Value
Remarks
If there is no ExternalReasonCode, then this property is null.
If there is no known description for the ExternalReasonCode, then a
placeholder text that contains the original ExternalReasonCode is
provided. In any other case a descriptive, readable text for the
ExternalReasonCode is provided.
OrderID
Order ID that was assigned to the original order that this protocol entry refers to.
public string OrderID { get; set; }
Property Value
Remarks
In EBICS every transmission from a customer to the bank (or vice versa) is called an order (upload order / download order). An unambiguous Order ID is assigned to every upload order. This implicates that not only payment orders but also the upload of other files to the bank get an Order ID. The EBICS system must ensure that an unambiguous Order ID is allocated per Partner ID and per Order Type (BTF identifier). The main purpose of the Order ID is to associate protocol entries with the original order.
OrderIDRef
If this was an order that referred to another order, e.g. a VEU signature for
another order, then this contains the OrderID of the other, original order.
public string OrderIDRef { get; set; }
Property Value
OrderText
PTK legacy: Content text from the "Auftrag" line.
public string OrderText { get; set; }
Property Value
Remarks
This property is only used for a PTK protocol entry. It shall be ignore for a HAC protocol entry.
OrderType
The EBICS 2.x OrderType of the original order.
public string OrderType { get; set; }
Property Value
Remarks
If this protocol entry was obtained via EBICS 3.x, then this property will be
null. Use GetOrderType(EbicsContact) in order to derive a
legacy Order Type from the Service element.
OrderTypeRef
The EBICS 2.x OrderType of the order referenced by the order that this protocol entry refers to.
public string OrderTypeRef { get; set; }
Property Value
Remarks
If this protocol entry was obtained via EBICS 3.x, then this property will be
null. Use GetOrderTypeRef(EbicsContact) in order to derive a
legacy Order Type from the ServiceRef element.
PartnerID
Identification of the partner (customer) for which the original order, that this protocol entry refers to, was submitted.
public string PartnerID { get; set; }
Property Value
PartnerIDRef
If the action refers to another order and another partner, then the Partner ID of that other partner is provided here.
public string PartnerIDRef { get; set; }
Property Value
ResultCode
PTK legacy: The value of the result code found in square brackets.
public int ResultCode { get; set; }
Property Value
- int
If no result code is included in the protocol entry text, then this is -1. Otherwise the result code can range from 0 to 99.
Remarks
This only exists for a PTK protocol entry.
ResultText
PTK legacy: See class description.
public string ResultText { get; set; }
Property Value
Remarks
This only exists for a PTK protocol entry.
Service
The EBICS 3.x Service of the original order.
public EbicsService Service { get; set; }
Property Value
Remarks
If this protocol entry was obtained via EBICS 2.x, then this property will be
null.
ServiceRef
The EBICS 3.x Service of the order referenced by the order that this protocol entry refers to.
public EbicsService ServiceRef { get; set; }
Property Value
Remarks
If this protocol entry was obtained via EBICS 2.x, then this property will be
null.
Text
PTK legacy: The complete, raw text of this protocol entry.
public string Text { get; set; }
Property Value
Remarks
This only exists for a PTK protocol entry, for a HAC protocol entry this is
null.
TimeStamp
UTC time stamp of this protocol entry.
public DateTime TimeStamp { get; set; }
Property Value
UserID
Identification of the user responsible for the ActionType.
public string UserID { get; set; }
Property Value
Methods
BuildXml(XmlDocument, EbicsVersion)
Builds an XML that contains all property values. This does not build a pain.002
OrgnlPmtInfAndSts element.
public override XmlElement BuildXml(XmlDocument xmlDocument, EbicsVersion nVersion)
Parameters
xmlDocumentXmlDocumentnVersionEbicsVersion
Returns
Clear()
public void Clear()
Create(SepaOriginalPaymentInformation)
Creates a new EbicsProtocolEntry from a HAC protocol entry.
public static EbicsProtocolEntry Create(SepaOriginalPaymentInformation aOrgnlPmtInfAndSts)
Parameters
aOrgnlPmtInfAndStsSepaOriginalPaymentInformationAn Original Payment Information and Status element from a HAC pain.002 protocol. This must not be
null
Returns
CreateProtocolEntry(JsonObject)
public static EbicsProtocolEntry CreateProtocolEntry(JsonObject jsonObject)
Parameters
jsonObjectJsonObject
Returns
FromJson(JsonObject)
Initializes an EbicsProtocolEntry from its json representation. FromJson(JsonObject).
public void FromJson(JsonObject jsonObject)
Parameters
jsonObjectJsonObject
GetOrderType(EbicsContact)
Provides a legacy three letter order type that this protocol entry is about.
public string GetOrderType(EbicsContact aContact)
Parameters
aContactEbicsContactThe EbicsContact to which this EbicsProtocolEntry belongs to. This is needed to properly derive the order type from the Service when needed. If this is
null, then the Default mapping is used.
Returns
- string
If a order type could be determined, then it is returned. If no OrderType was present, and it was not possible to derive a legacy order type from the Service, then
nullis returned.
GetOrderTypeRef(EbicsContact)
Provides a legacy three letter order type of the order referenced by the order that this protocol entry refers to.
public string GetOrderTypeRef(EbicsContact aContact)
Parameters
aContactEbicsContactThe EbicsContact to which this EbicsProtocolEntry belongs to. This is needed to properly derive the order type from the ServiceRef when needed. If this is
null, then the Default mapping is used.
Returns
- string
If a order type could be determined, then it is returned. If no OrderTypeRef was present, and it was not possible to derive a legacy order type from the ServiceRef, then
nullis returned.
ParseXml(XmlElement, EbicsVersion)
public override void ParseXml(XmlElement xmlElement, EbicsVersion nVersion)
Parameters
xmlElementXmlElementnVersionEbicsVersion
ToJson(JsonObject)
Converts an EbicsProtocolEntry to its json representation. ToJson(JsonObject).
public JsonObject ToJson(JsonObject jsonObject)
Parameters
jsonObjectJsonObject
Returns
ToString()
public override string ToString()