From 9a938cf12527a018b4a49ed1e5a73e8f135c773b Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Sun, 19 Apr 2020 14:04:18 +0200 Subject: update spec --- core/api-merchant.rst | 58 ++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 57 insertions(+), 1 deletion(-) (limited to 'core/api-merchant.rst') diff --git a/core/api-merchant.rst b/core/api-merchant.rst index 09de8b2d..b7f81e73 100644 --- a/core/api-merchant.rst +++ b/core/api-merchant.rst @@ -180,7 +180,7 @@ Dynamic Merchant Instances **Request** - The request must be a `InstanceConfigurationMessage`. + The request must be a `InstanceReconfigurationMessage`. Removing an existing payto_uri deactivates the account (it will no longer be used for future contracts). @@ -191,6 +191,48 @@ Dynamic Merchant Instances :status 404 Not found: This instance is unknown and thus cannot be reconfigured. + .. ts:def:: InstanceReconfigurationMessage + + interface InstanceReconfigurationMessage { + // The URI where the wallet will send coins. A merchant may have + // multiple accounts, thus this is an array. Note that by + // removing URIs from this list + payto_uris: string[]; + + // Merchant name corresponding to this instance. + name: string; + + // The merchant's physical address (to be put into contracts). + address: Location; + + // The jurisdiction under which the merchant conducts its business + // (to be put into contracts). + jurisdiction: Location; + + // Maximum wire fee this instance is willing to pay. + // Can be overridden by the frontend on a per-order basis. + default_max_wire_fee: Amount; + + // Default factor for wire fee amortization calculations. + // Can be overriden by the frontend on a per-order basis. + default_wire_fee_amortization: integer; + + // Maximum deposit fee (sum over all coins) this instance is willing to pay. + // Can be overridden by the frontend on a per-order basis. + default_max_deposit_fee: Amount; + + // If the frontend does NOT specify an execution date, how long should + // we tell the exchange to wait to aggregate transactions before + // executing the wire transfer? This delay is added to the current + // time when we generate the advisory execution time for the exchange. + default_wire_transfer_delay: RelativeTime; + + // If the frontend does NOT specify a payment deadline, how long should + // offers we make be valid by default? + default_pay_deadline: RelativeTime; + + } + .. http:get:: /instances/$INSTANCE @@ -487,6 +529,7 @@ management. :status 204 No content: The backend has successfully expanded the inventory. + .. ts:def:: ProductPatchDetail interface ProductPatchDetail { @@ -578,6 +621,19 @@ management. } +.. http:delete:: /products/$PRODUCT_ID + + Delete information about a product. Fails if the product is locked by + anyone. + + **Response:** + + :status 204 No content: + The backend has successfully deleted the product. + :status 404 Not found: + The backend does not know the instance or the product. + :status 409 Conflict: + The backend refuses to delete the product because it is locked. ------------------ -- cgit v1.2.3