Record Class EbicsDownloadParams

java.lang.Object
java.lang.Record
org.kopi.ebics.client.EbicsDownloadParams

public record EbicsDownloadParams(String serviceName, String scope, String option, String messageName, String messageVersion, String containerType, LocalDate startDate, LocalDate endDate) extends Record
Service parameters for an EBICS 3.0 (H005) BTD download order.

With a serviceName set, the request is sent as AdminOrderType=BTD with a BTDOrderParams/Service block. With serviceName left null, only the optional date range is applied and the legacy EBICS 2.x order type is kept, so existing callers keep their behaviour.

The report period is a pair of calendar days (LocalDate), not instants: EBICS sends it as xs:date, and a timezone in that position only creates off-by-one-day bugs.

The constructor rejects a partial or reversed range. Both would otherwise travel silently: a half range is dropped when the request is built, and a reversed one is schema-valid and comes back as "no data available", which is indistinguishable from a period that really was empty. This is the single place every caller passes through, so the check lives here rather than in each caller.

  • Constructor Details

    • EbicsDownloadParams

      public EbicsDownloadParams(String serviceName, String scope, String option, String messageName, String messageVersion, String containerType, LocalDate startDate, LocalDate endDate)
      Creates an instance of a EbicsDownloadParams record class.
      Parameters:
      serviceName - the value for the serviceName record component
      scope - the value for the scope record component
      option - the value for the option record component
      messageName - the value for the messageName record component
      messageVersion - the value for the messageVersion record component
      containerType - the value for the containerType record component
      startDate - the value for the startDate record component
      endDate - the value for the endDate record component
  • Method Details

    • dateRangeOnly

      public static EbicsDownloadParams dateRangeOnly(LocalDate startDate, LocalDate endDate)
      Date-range-only parameters for the legacy (non-BTD) download path.
    • isBtd

      public boolean isBtd()
      Whether these parameters describe an EBICS 3.0 BTD business transaction format order.
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • serviceName

      public String serviceName()
      Returns the value of the serviceName record component.
      Returns:
      the value of the serviceName record component
    • scope

      public String scope()
      Returns the value of the scope record component.
      Returns:
      the value of the scope record component
    • option

      public String option()
      Returns the value of the option record component.
      Returns:
      the value of the option record component
    • messageName

      public String messageName()
      Returns the value of the messageName record component.
      Returns:
      the value of the messageName record component
    • messageVersion

      public String messageVersion()
      Returns the value of the messageVersion record component.
      Returns:
      the value of the messageVersion record component
    • containerType

      public String containerType()
      Returns the value of the containerType record component.
      Returns:
      the value of the containerType record component
    • startDate

      public LocalDate startDate()
      Returns the value of the startDate record component.
      Returns:
      the value of the startDate record component
    • endDate

      public LocalDate endDate()
      Returns the value of the endDate record component.
      Returns:
      the value of the endDate record component