diff --git a/api/wallet/spec/definitions/CashLimitBound.yaml b/api/wallet/spec/definitions/CashLimitBound.yaml new file mode 100644 index 00000000..c0af627c --- /dev/null +++ b/api/wallet/spec/definitions/CashLimitBound.yaml @@ -0,0 +1,13 @@ +--- +description: Cash limit bound. +type: object +required: + - amount + - inclusive +properties: + amount: + type: integer + format: int64 + minimum: 0 + inclusive: + type: boolean diff --git a/api/wallet/spec/definitions/WalletCashLimit.yaml b/api/wallet/spec/definitions/WalletCashLimit.yaml new file mode 100644 index 00000000..5296bd76 --- /dev/null +++ b/api/wallet/spec/definitions/WalletCashLimit.yaml @@ -0,0 +1,16 @@ +--- +type: object +required: + - currency + - withdrawalMethod + - lowerBound + - upperBound +properties: + currency: + $ref: "#/definitions/CurrencyID" + withdrawalMethod: + $ref: "#/definitions/WithdrawalMethod" + lowerBound: + $ref: "#/definitions/CashLimitBound" + upperBound: + $ref: "#/definitions/CashLimitBound" diff --git a/api/wallet/spec/paths/wallets@{walletID}@cash-limits.yaml b/api/wallet/spec/paths/wallets@{walletID}@cash-limits.yaml new file mode 100644 index 00000000..8c5879c7 --- /dev/null +++ b/api/wallet/spec/paths/wallets@{walletID}@cash-limits.yaml @@ -0,0 +1,26 @@ +--- +get: + description: Get wallet cash limits + operationId: getWalletCashLimits + tags: + - Wallets + parameters: + - $ref: "#/parameters/requestID" + - $ref: "#/parameters/deadline" + - $ref: "#/parameters/walletID" + - $ref: "#/parameters/partyID" + responses: + "200": + description: | + Cash limits found. Each item is scoped to a specific withdrawal method. + If a withdrawal method is absent in the list, that method is not allowed for the wallet. + schema: + type: array + items: + $ref: "#/definitions/WalletCashLimit" + "404": + $ref: "#/responses/NotFound" + "401": + $ref: "#/responses/Unauthorized" + "400": + $ref: "#/responses/BadRequest"