Obligation.Terms
Keywords: net.corda.finance.contracts.asset.Obligation.Terms class
Date: 2023-09-18

net.corda.finance.contracts.asset

## Class Obligation.Terms<P>

- net.corda.finance.contracts.asset.Obligation.Terms<P>

- Type Parameters:
    `P` -

    the product the obligation is for payment of.

  Enclosing class:
    Obligation<P>

      public static class Obligation.Terms<P>

  Subset of state, containing the elements specified when issuing a new settlement contract.

- - ### Constructor Detail

    - #### Terms

          public Terms(@NotNull
                       NonEmptySet<net.corda.core.crypto.SecureHash> acceptableContracts,
                       @NotNull
                       NonEmptySet<net.corda.core.contracts.Issued> acceptableIssuedProducts,
                       @NotNull
                       java.time.Instant dueBefore,
                       @NotNull
                       java.time.Duration timeTolerance)

      Subset of state, containing the elements specified when issuing a new settlement contract.

      Parameters:
        `acceptableContracts` - The hash of the asset contract we're willing to accept in payment for this debt.
        `acceptableIssuedProducts` - The parties whose assets we are willing to accept in payment for this debt.
        `dueBefore` - When the contract must be settled by.
        `timeTolerance` - tolerance value on dueBefore, to handle clock skew between distributed systems. Generallythis would be about 30 seconds.

  - ### Method Detail

    - #### getProduct

          @NotNull
          public P getProduct()

    - #### getAcceptableContracts

          @NotNull
          public NonEmptySet<net.corda.core.crypto.SecureHash> getAcceptableContracts()

      The hash of the asset contract we

      're willing to accept in payment for this debt.

    - #### getAcceptableIssuedProducts

          @NotNull
          public NonEmptySet<net.corda.core.contracts.Issued> getAcceptableIssuedProducts()

      The parties whose assets we are willing to accept in payment for this debt.

    - #### getDueBefore

          @NotNull
          public java.time.Instant getDueBefore()

      When the contract must be settled by.

    - #### getTimeTolerance

          @NotNull
          public java.time.Duration getTimeTolerance()

      tolerance value on

      dueBefore, to handle clock skew between distributed systems. Generallythis would be about 30 seconds.

    - #### component1

          @NotNull
          public NonEmptySet<net.corda.core.crypto.SecureHash> component1()

      The hash of the asset contract we

      're willing to accept in payment for this debt.

    - #### component2

          @NotNull
          public NonEmptySet<net.corda.core.contracts.Issued> component2()

      The parties whose assets we are willing to accept in payment for this debt.

    - #### component3

          @NotNull
          public java.time.Instant component3()

      When the contract must be settled by.

    - #### component4

          @NotNull
          public java.time.Duration component4()

      tolerance value on

      dueBefore, to handle clock skew between distributed systems. Generallythis would be about 30 seconds.

    - #### copy

          @NotNull
          public net.corda.finance.contracts.asset.Obligation.Terms<P> copy(@NotNull
                                                                                     NonEmptySet<net.corda.core.crypto.SecureHash> acceptableContracts,
                                                                                     @NotNull
                                                                                     NonEmptySet<net.corda.core.contracts.Issued> acceptableIssuedProducts,
                                                                                     @NotNull
                                                                                     java.time.Instant dueBefore,
                                                                                     @NotNull
                                                                                     java.time.Duration timeTolerance)

      Subset of state, containing the elements specified when issuing a new settlement contract.

      Parameters:
        `acceptableContracts` - is the contract types that can be accepted, such as cash.
        `acceptableIssuedProducts` - is the assets which are acceptable forms of payment (i.e. GBP issued by the Bank of England).
        `dueBefore` - when payment is due by.
        `timeTolerance` - tolerance value on dueBefore, to handle clock skew between distributed systems. Generally this would be about 30 seconds.

    - #### toString

          @NotNull
          public java.lang.String toString()

      Subset of state, containing the elements specified when issuing a new settlement contract.

    - #### hashCode

          public int hashCode()

      Subset of state, containing the elements specified when issuing a new settlement contract.

    - #### equals

          public boolean equals(@Nullable
                                java.lang.Object p)

      Subset of state, containing the elements specified when issuing a new settlement contract.