diff options
author | Christian Grothoff <grothoff@gnunet.org> | 2023-09-03 15:37:44 +0200 |
---|---|---|
committer | Christian Grothoff <grothoff@gnunet.org> | 2023-09-03 15:37:44 +0200 |
commit | 8df41796f811da622416055e92b6ad5552cfb835 (patch) | |
tree | df1ebb20a81f9e259e4db268b94a596ccc869456 | |
parent | 898e01993f2401bd1737d791229ecbc35433428d (diff) | |
download | docs-8df41796f811da622416055e92b6ad5552cfb835.tar.gz docs-8df41796f811da622416055e92b6ad5552cfb835.tar.bz2 docs-8df41796f811da622416055e92b6ad5552cfb835.zip |
fix API spec for #7300
-rw-r--r-- | core/api-bank-access.rst | 20 | ||||
-rw-r--r-- | core/api-bank-sandbox.rst | 132 | ||||
-rw-r--r-- | libeufin/nexus-tutorial.rst | 110 | ||||
-rw-r--r-- | manpages/libeufin-cli.1.rst | 64 |
4 files changed, 163 insertions, 163 deletions
diff --git a/core/api-bank-access.rst b/core/api-bank-access.rst index 62c99fd4..06ee980a 100644 --- a/core/api-bank-access.rst +++ b/core/api-bank-access.rst @@ -52,7 +52,7 @@ Accounts and Withdrawals balance: string; // The account name _and_ the username of the // Sandbox customer that owns such a bank account. - accountLabel: string; + account_label: string; } The following endpoints require HTTP "Basic" authentication with the account @@ -216,13 +216,13 @@ Transactions interface BankAccountTransactionInfo { - creditorIban: string; - creditorBic: string; // Optional - creditorName: string; + creditor_iban: string; + creditor_bic: string; // Optional + creditor_name: string; - debtorIban: string; - debtorBic: string; - debtorName: string; + debtor_iban: string; + debtor_bic: string; + debtor_name: string; amount: number; currency: string; @@ -232,7 +232,7 @@ Transactions // $transaction_id from the URI. uid: string; direction: "DBIT" | "CRDT"; - date: string; // milliseconds since the Unix epoch + date: Timestamp; } @@ -248,7 +248,7 @@ Transactions // Address in the Payto format of the wire transfer receiver. // It needs at least the 'message' query string parameter. - paytoUri: string; + payto_uri: string; // Transaction amount (in the $currency:x.y format), optional. // However, when not given, its value must occupy the 'amount' @@ -293,7 +293,7 @@ Registration (Testing) // Name of the person who owns the account being made. name?: string; // Indicates whether the account is public or not. Defaults to false - isPublic?: boolean; + is_public?: boolean; } diff --git a/core/api-bank-sandbox.rst b/core/api-bank-sandbox.rst index 0c8ba190..d76ca2c4 100644 --- a/core/api-bank-sandbox.rst +++ b/core/api-bank-sandbox.rst @@ -72,7 +72,7 @@ Accounts **Request:** .. ts:def:: CircuitAccountRequest - + interface CircuitAccountRequest { // Username username: string; @@ -159,14 +159,14 @@ Accounts the account data of ``$username``. .. note:: - + Only the administrator has the rights to change the user legal name. **Request:** .. ts:def:: CircuitAccountReconfiguration - + interface CircuitAccountReconfiguration { // Addresses where to send the TAN. @@ -212,7 +212,7 @@ Accounts **Request:** .. ts:def:: AccountPasswordChange - + interface AccountPasswordChange { // New password. @@ -251,7 +251,7 @@ Accounts .. ts:def:: CircuitAccounts interfaces CircuitAccounts { - customers: CircuitAccountMinimalData[]; + customers: CircuitAccountMinimalData[]; } .. ts:def:: Balance @@ -274,7 +274,7 @@ Accounts balance: Balance; // Number indicating the max debit allowed for the requesting user. - debitThreshold: string; + debit_threshold: string; } :http:statuscode:`200 OK`: @@ -298,7 +298,7 @@ Accounts **Response:** .. ts:def:: CircuitAccountData - + interface CircuitAccountData { // Username username: string; @@ -339,7 +339,7 @@ Cashouts to the administrator. .. note:: - + Consult the `cashout rates call <cashout-rates_>`_ to learn about any applicable fee or exchange rate. @@ -380,7 +380,7 @@ Cashouts // That is the plain amount that the user specified // to cashout. Its $currency is the circuit currency. - amount_debit: Amount; + amount_debit: Amount; // That is the amount that will effectively be // transferred by the bank to the user's bank @@ -388,7 +388,7 @@ Cashouts // It is expressed in the fiat currency and // is calculated after the cashout fee and the // exchange rate. See the /cashout-rates call. - amount_credit: Amount; + amount_credit: Amount; // Which channel the TAN should be sent to. If // this field is missing, it defaults to SMS. @@ -400,11 +400,11 @@ Cashouts **Response:** .. ts:def:: CashoutPending - + interface CashoutPending { // UUID identifying the operation being created // and now waiting for the TAN confirmation. - uuid: string; + uuid: string; } :http:statuscode:`202 Accepted`: @@ -452,7 +452,7 @@ Cashouts **Request:** .. ts:def:: CashoutConfirm - + interface CashoutConfirm { // the TAN that confirms $cashoutId. @@ -460,7 +460,7 @@ Cashouts } **Response:** - + :http:statuscode:`204 No content`: ``$cashoutId`` was found in the *pending* state and got successfully confirmed. @@ -503,10 +503,10 @@ Cashouts interface CashoutEstimate { // Amount that the user will get deducted from their regional // bank account, according to the 'amount_credit' value. - amount_debit: Amount; + amount_debit: Amount; // Amount that the user will receive in their fiat // bank account, according to 'amount_debit'. - amount_credit: Amount; + amount_credit: Amount; } @@ -543,7 +543,7 @@ Cashouts // Exchange rate to buy the circuit currency from fiat. buy_at_ratio: LibeufinNumber; // Exchange rate to sell the circuit currency for fiat. - sell_at_ratio: LibeufinNumber; + sell_at_ratio: LibeufinNumber; // Fee to subtract after applying the buy ratio. buy_in_fee: LibeufinNumber; // Fee to subtract after applying the sell ratio. @@ -573,7 +573,7 @@ Cashouts operations. **Request:** - + :query account: *Optional.* Filters the request to only get the cash-out operations related to the account specified in this parameter. Ordinary users must use @@ -585,7 +585,7 @@ Cashouts interface Cashouts { // Every string represents a cash-out operation UUID. - cashouts: string[]; + cashouts: string[]; } :http:statuscode:`200 OK`: @@ -632,14 +632,14 @@ Cashouts // when the operation was created. ratios_and_fees: RatiosAndFees; // Time when the cash-out was created. - creation_time: number; // milliseconds since the Unix epoch + creation_time: number; // milliseconds since the Unix epoch // Time when the cash-out was confirmed via its TAN. // Missing or null, when the operation wasn't confirmed yet. - confirmation_time?: number | null; // milliseconds since the Unix epoch + confirmation_time?: number | null; // milliseconds since the Unix epoch } .. ts:def:: CashoutStatus - + enum CashoutStatus { // The payment was initiated after a valid @@ -698,20 +698,20 @@ EBICS API interface SubscriberRequest { // hostID - hostID: string; + host_id: string; // userID - userID: string; + user_id: string; // partnerID - partnerID: string; + partner_id: string; // systemID, optional. - systemID: string; + system_id: string; // Label of the bank account to associate with // this subscriber. - demobankAccountLabel: string; + demobank_account_label: string; } .. note:: @@ -743,10 +743,10 @@ EBICS Hosts interface EbicsHostRequest { // Ebics version. - hostID: string; + host_id: string; // Name of the host. - ebicsVersion: string; + ebics_version: string; } @@ -763,7 +763,7 @@ EBICS Hosts // shows the host IDs that are active in the system. // The Ebics version *is* missing, but it's still available // via the HEV message. - ebicsHosts: string[]; + ebics_hosts: string[]; } .. http:post:: /admin/ebics/hosts/$hostID/rotate-keys @@ -780,7 +780,7 @@ EBICS Subscribers Associates a new bank account to an existing subscriber. .. note:: - + This call allows to create a bank account without any associated user profile! That makes the basic auth access to the financial data **only** possible for the @@ -794,9 +794,9 @@ EBICS Subscribers // Ebics subscriber subscriber: { - userID: string; - partnerID: string; - systemID: string; + user_id: string; + partner_id: string; + system_id: string; }; // IBAN @@ -830,17 +830,17 @@ EBICS Subscribers interface Subscriber { // userID - userID: string; + user_id: string; // partnerID - partnerID: string; + partner_id: string; // hostID - hostID: string; + host_id: string; // Label of the bank account // associated with this Ebics subscriber. - demobankAccountLabel: string; + demobank_account_label: string; } .. http:post:: /admin/ebics/subscribers @@ -856,17 +856,17 @@ EBICS Subscribers interface SubscriberRequestDeprecated { - // hostID - hostID: string; + // host ID + host_id: string; - // userID - userID: string; + // user ID + user_id: string; - // partnerID - partnerID: string; + // partner ID + partner_id: string; - // systemID, optional. - systemID: string; + // system ID, optional. + system_id: string; } @@ -918,11 +918,11 @@ registration of customers is offered via the :doc:`/core/api-bank-access`. interface AdminBankAccountBalance { // Balance in the $currency:$amount format. - balance: Amount; + balance: Amount; // IBAN of the bank account identified by $accountLabel - iban: string; + iban: string; // BIC of the bank account identified by $accountLabel - bic: string; + bic: string; // Mentions $accountLabel label: string; } @@ -944,31 +944,31 @@ Transactions **Response:** .. ts:def:: AdminTransactions - + interface AdminTransactions { payments: AdminTransaction[]; } .. ts:def:: AdminTransaction - + interface AdminTransaction { // Label of the bank account involved in this payment. - accountLabel: string; + account_label: string; // Creditor IBAN - creditorIban: string; + creditor_iban: string; // Debtor IBAN - debtorIban: string; + debtor_iban: string; // UID given by one financial institute to this payment. // FIXME: clarify whether that can be also assigned by // the other party's institution. - accountServicerReference: string; + account_servicer_reference: string; // ID of the Pain.001 that initiated this payment. - paymentInformationId: string; + payment_information_id: string; // Unstructured remittance information. subject: string; @@ -980,23 +980,23 @@ Transactions amount: string; // BIC of the creditor IBAN. - creditorBic: string; + creditor_bic: string; // Legal name of the creditor. - creditorName: string; + creditor_name: string; // BIC of the debtor IBAN. - debtorBic: string; + debtor_bic: string; // Legal name of the debtor. - debtorName: string; + debtor_name: string; // Payment's currency currency: string; // Have values 'credit' or 'debit' relative // to the requesting user. - creditDebitIndicator: string; + credit_debit_indicator: string; } .. http:post:: /admin/bank-accounts/$accountLabel/generate-transactions @@ -1011,19 +1011,19 @@ Transactions information is taken from the request. Only admin allowed. **Request:** - + .. ts:def:: AdminSimulateTransaction interface AdminSimulateTransaction { // Debtor IBAN. - debtorIban: string; + debtor_iban: string; // Debtor BIC. - debtorBic: string; + debtor_bic: string; // Debtor name. - debtorName: string; + debtor_name: string; // Amount number (without currency) as a string. amount: string; @@ -1075,7 +1075,7 @@ The JSON type coming along a non 2xx response is the following: interface SandboxErrorDetail { - // String enum classifying the error. + // String enum classifying the error. type: ErrorType; // Human-readable error description. diff --git a/libeufin/nexus-tutorial.rst b/libeufin/nexus-tutorial.rst index af142821..ef2fb562 100644 --- a/libeufin/nexus-tutorial.rst +++ b/libeufin/nexus-tutorial.rst @@ -283,11 +283,11 @@ are reset back to ``admin`` and ``secret``, respectively. $ libeufin-cli sandbox ebicssubscriber list { "subscribers" : [ { - "hostID" : "testhost", - "partnerID" : "partner01", - "userID" : "user02", - "systemID" : null, - "demobankAccountLabel" : "jrluser" + "host_id" : "testhost", + "partner_id" : "partner01", + "user_id" : "user02", + "system_id" : null, + "demobank_account_label" : "jrluser" } ] } @@ -322,20 +322,20 @@ subcommand, because there is no need to rely on EBICS: $ libeufin-cli sandbox bankaccount transactions jrluser { "payments" : [ { - "accountLabel" : "jrluser", - "creditorIban" : "DE724881", - "creditorBic" : "SANDBOXX", - "creditorName" : "Unknown", - "debtorIban" : "DE895351", - "debtorBic" : "SANDBOXX", - "debtorName" : "The Bank", + "account_label" : "jrluser", + "creditor_iban" : "DE724881", + "creditor_bic" : "SANDBOXX", + "creditor_name" : "Unknown", + "debtor_iban" : "DE895351", + "debtor_bic" : "SANDBOXX", + "debtor_name" : "The Bank", "amount" : "100", "currency" : "EUR", "subject" : "Sign-up bonus", "date" : "Tue, 22 Feb 2022 00:04:15 GMT", - "creditDebitIndicator" : "credit", - "accountServicerReference" : "2NG75I0O", - "paymentInformationId" : null + "credit_debit_indicator" : "credit", + "account_servicer_reference" : "2NG75I0O", + "payment_information_id" : null } ] } @@ -361,65 +361,65 @@ Now the list of transactions has grown by several entries: $ libeufin-cli sandbox bankaccount transactions jrluser { "payments" : [ { - "accountLabel" : "jrluser", - "creditorIban" : "DE724881", - "creditorBic" : "SANDBOXX", - "creditorName" : "Unknown", - "debtorIban" : "DE895351", - "debtorBic" : "SANDBOXX", - "debtorName" : "The Bank", + "account_label" : "jrluser", + "creditor_iban" : "DE724881", + "creditor_bic" : "SANDBOXX", + "creditor_name" : "Unknown", + "debtor_iban" : "DE895351", + "debtor_bic" : "SANDBOXX", + "debtor_name" : "The Bank", "amount" : "100", "currency" : "EUR", "subject" : "Sign-up bonus", "date" : "Tue, 22 Feb 2022 00:04:15 GMT", - "creditDebitIndicator" : "credit", - "accountServicerReference" : "2NG75I0O", - "paymentInformationId" : null + "credit_debit_indicator" : "credit", + "account_servicer_reference" : "2NG75I0O", + "payment_information_id" : null }, { - "accountLabel" : "jrluser", - "creditorIban" : "DE724881", - "creditorBic" : "SANDBOXX", - "creditorName" : "Creditor Name", - "debtorIban" : "DE64500105178797276788", - "debtorBic" : "DEUTDEBB101", - "debtorName" : "Max Mustermann", + "account_label" : "jrluser", + "creditor_iban" : "DE724881", + "creditor_bic" : "SANDBOXX", + "creditor_name" : "Creditor Name", + "debtor_iban" : "DE64500105178797276788", + "debtor_bic" : "DEUTDEBB101", + "debtor_name" : "Max Mustermann", "amount" : "22", "currency" : "EUR", "subject" : "sample transaction GSF7S5LC", "date" : "Tue, 22 Feb 2022 01:26:18 GMT", - "creditDebitIndicator" : "credit", - "accountServicerReference" : "GSF7S5LC", - "paymentInformationId" : null + "credit_debit_indicator" : "credit", + "account_servicer_reference" : "GSF7S5LC", + "payment_information_id" : null }, { - "accountLabel" : "jrluser", - "creditorIban" : "DE64500105178797276788", - "creditorBic" : "DEUTDEBB101", - "creditorName" : "Max Mustermann", - "debtorIban" : "DE724881", - "debtorBic" : "SANDBOXX", - "debtorName" : "Debitor Name", + "account_label" : "jrluser", + "creditor_iban" : "DE64500105178797276788", + "creditor_bic" : "DEUTDEBB101", + "creditor_name" : "Max Mustermann", + "debtor_iban" : "DE724881", + "debtor_bic" : "SANDBOXX", + "debtor_name" : "Debitor Name", "amount" : "10", "currency" : "EUR", "subject" : "sample transaction 1WUP303Q", "date" : "Tue, 22 Feb 2022 01:26:18 GMT", - "creditDebitIndicator" : "debit", - "accountServicerReference" : "1WUP303Q", - "paymentInformationId" : null + "credit_debit_indicator" : "debit", + "account_servicer_reference" : "1WUP303Q", + "payment_information_id" : null }, { - "accountLabel" : "jrluser", - "creditorIban" : "DE724881", - "creditorBic" : "SANDBOXX", - "creditorName" : "Creditor Name", - "debtorIban" : "DE06500105174526623718", - "debtorBic" : "INGDDEFFXXX", - "debtorName" : "Joe Foo", + "account_label" : "jrluser", + "creditor_iban" : "DE724881", + "creditor_bic" : "SANDBOXX", + "creditor_name" : "Creditor Name", + "debtor_iban" : "DE06500105174526623718", + "debtor_bic" : "INGDDEFFXXX", + "debtor_name" : "Joe Foo", "amount" : "10.50", "currency" : "EUR", "subject" : "Hello World", "date" : "Tue, 22 Feb 2022 01:26:41 GMT", - "creditDebitIndicator" : "credit", - "accountServicerReference" : "sandbox-ALQP8TXKJWRVKMAH", - "paymentInformationId" : null + "credit_debit_indicator" : "credit", + "account_servicer_reference" : "sandbox-ALQP8TXKJWRVKMAH", + "payment_information_id" : null } ] } diff --git a/manpages/libeufin-cli.1.rst b/manpages/libeufin-cli.1.rst index 548f2ac6..755c8b45 100644 --- a/manpages/libeufin-cli.1.rst +++ b/manpages/libeufin-cli.1.rst @@ -347,49 +347,49 @@ For example: $ libeufin-cli sandbox bankaccount transactions testacct01 { "payments" : [ { - "accountLabel" : "testacct01", - "creditorIban" : "DE18500105172929531888", - "creditorBic" : "INGDDEFFXXX", - "creditorName" : "Creditor Name", - "debtorIban" : "DE64500105178797276788", - "debtorBic" : "DEUTDEBB101", - "debtorName" : "Max Mustermann", + "account_label" : "testacct01", + "creditor_iban" : "DE18500105172929531888", + "creditor_bic" : "INGDDEFFXXX", + "creditor_name" : "Creditor Name", + "debtor_iban" : "DE64500105178797276788", + "debtor_bic" : "DEUTDEBB101", + "debtor_name" : "Max Mustermann", "amount" : "5", "currency" : "EUR", "subject" : "sample transaction DILWBJHL", "date" : "Wed, 26 Jan 2022 09:03:44 GMT", - "creditDebitIndicator" : "credit", - "accountServicerReference" : "DILWBJHL", + "credit_debit_indicator" : "credit", + "account_servicer_reference" : "DILWBJHL", "paymentInformationId" : null }, { - "accountLabel" : "testacct01", - "creditorIban" : "DE64500105178797276788", - "creditorBic" : "DEUTDEBB101", - "creditorName" : "Max Mustermann", - "debtorIban" : "DE18500105172929531888", - "debtorBic" : "INGDDEFFXXX", - "debtorName" : "Debitor Name", + "account_label" : "testacct01", + "creditor_iban" : "DE64500105178797276788", + "creditor_bic" : "DEUTDEBB101", + "creditor_name" : "Max Mustermann", + "debtor_iban" : "DE18500105172929531888", + "debtor_bic" : "INGDDEFFXXX", + "debtor_name" : "Debitor Name", "amount" : "12", "currency" : "EUR", "subject" : "sample transaction N7JSY17B", "date" : "Wed, 26 Jan 2022 09:03:44 GMT", - "creditDebitIndicator" : "debit", - "accountServicerReference" : "N7JSY17B", + "credit_debit_indicator" : "debit", + "account_servicer_reference" : "N7JSY17B", "paymentInformationId" : null }, { - "accountLabel" : "testacct01", - "creditorIban" : "DE18500105172929531888", - "creditorBic" : "INGDDEFFXXX", - "creditorName" : "Creditor Name", - "debtorIban" : "DE06500105174526623718", - "debtorBic" : "INGDDEFFXXX", - "debtorName" : "Joe Foo", + "account_label" : "testacct01", + "creditor_iban" : "DE18500105172929531888", + "creditor_bic" : "INGDDEFFXXX", + "creditor_name" : "Creditor Name", + "debtor_iban" : "DE06500105174526623718", + "debtor_bic" : "INGDDEFFXXX", + "debtor_name" : "Joe Foo", "amount" : "10.50", "currency" : "EUR", "subject" : "Hello World", "date" : "Wed, 26 Jan 2022 09:04:31 GMT", - "creditDebitIndicator" : "credit", - "accountServicerReference" : "sandbox-6UI2J3636J9EESXO", + "credit_debit_indicator" : "credit", + "account_servicer_reference" : "sandbox-6UI2J3636J9EESXO", "paymentInformationId" : null } ] } @@ -872,11 +872,11 @@ For example: $ libeufin-cli permissions list { "permissions" : [ { - "subjectType" : "some-subject-type", - "subjectId" : "some-subject-id", - "resourceType" : "some-resource-type", - "resourceId" : "some-resource-id", - "permissionName" : "facade.anastasis.history" + "subject_type" : "some-subject-type", + "subject_id" : "some-subject-id", + "resource_type" : "some-resource-type", + "resource_id" : "some-resource-id", + "permission_name" : "facade.anastasis.history" } ] } |