Document the meaning of Option in Contract#agreementText (#1319)

* Documenting `agreementText`

* Code review suggestion

Co-Authored-By: Francesco Mazzoli <f@mazzo.li>
This commit is contained in:
Leonid Shlyapnikov 2019-05-23 08:00:42 -04:00 committed by GitHub
parent 9834451f37
commit 67da43cff5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -5,6 +5,17 @@ package com.digitalasset.ledger.client.binding
import com.digitalasset.ledger.api.v1.{value => rpcvalue}
/**
* A class representing a DAML contract of specific type (DAML template) with assigned contract ID and agreement text.
*
* @param contractId Contract ID.
* @param value Contract instance as defined in DAML template (without `contractId` and `agreementText`).
* @param agreementText Agreement text. `None` means that we did not receive the `agreementText` from the server.
* `Some("")` is a valid case, this means that the contract has `agreementText` set to an empty string
* or agreement was not defined in DAML, which defaults to an empty string.
*
* @tparam T Contract template type parameter.
*/
final case class Contract[+T](
contractId: Primitive.ContractId[T],
value: T with Template[T],