commit ea54375ab9194a9b95691aacad4e42a631dda67c
parent 7f1d2cbe81f6dfc551c4645264379c11af37b774
Author: Christian Blättler <blatc2@bfh.ch>
Date: Sat, 1 Jun 2024 15:58:30 +0200
add version, move price and max_feed to choices for v1 orders
Diffstat:
1 file changed, 16 insertions(+), 3 deletions(-)
diff --git a/core/api-merchant.rst b/core/api-merchant.rst
@@ -2399,9 +2399,13 @@ Creating orders
.. ts:def:: Order
interface Order {
- // Total price for the transaction.
- // The exchange will subtract deposit fees from that amount
- // before transferring it to the merchant.
+ // If this field is omitted, version 0 is assumed.
+ // Version 1 orders support the ``choices`` array.
+ version?: "1" | "0";
+
+ // Only available in v0 orders.
+ // Total price for the transaction. The exchange will subtract deposit
+ // fees from that amount before transferring it to the merchant.
amount: Amount;
// Human-readable description of the whole purchase.
@@ -2443,6 +2447,7 @@ Creating orders
// messages.
fulfillment_message_i18n?: { [lang_tag: string]: string };
+ // Only available in v0 orders.
// Maximum total deposit fee accepted by the merchant for this contract.
// Overrides defaults of the merchant instance.
max_fee?: Amount;
@@ -2506,11 +2511,19 @@ protocol **vSUBSCRIBE**.
.. ts:def:: OrderChoice
interface OrderChoice {
+ // Total price for the choice. The exchange will subtract deposit
+ // fees from that amount before transferring it to the merchant.
+ amount: Amount;
+
// Inputs that must be provided by the customer, if this choice is selected.
inputs: OrderInput[];
// Outputs provided by the merchant, if this choice is selected.
outputs: OrderOutput[];
+
+ // Maximum total deposit fee accepted by the merchant for this contract.
+ // Overrides defaults of the merchant instance.
+ max_fee?: Amount;
}
.. ts:def:: OrderInput