diff options
author | Antoine A <> | 2023-12-05 16:00:13 +0000 |
---|---|---|
committer | Antoine A <> | 2023-12-06 13:30:05 +0000 |
commit | 8cecb7f9c0c9d7324fee7f512f5311eca6e30d52 (patch) | |
tree | c4f68371fcee06bd768bce4e7af5da5ddc061cde /core/api-corebank.rst | |
parent | f8f2ed0f78545175963976dcb626b73e0a6c9bce (diff) | |
download | docs-8cecb7f9c0c9d7324fee7f512f5311eca6e30d52.tar.gz docs-8cecb7f9c0c9d7324fee7f512f5311eca6e30d52.tar.bz2 docs-8cecb7f9c0c9d7324fee7f512f5311eca6e30d52.zip |
Improve and fix accounts API
Diffstat (limited to 'core/api-corebank.rst')
-rw-r--r-- | core/api-corebank.rst | 91 |
1 files changed, 72 insertions, 19 deletions
diff --git a/core/api-corebank.rst b/core/api-corebank.rst index 855b352a..25eb5f7b 100644 --- a/core/api-corebank.rst +++ b/core/api-corebank.rst @@ -89,13 +89,21 @@ Config allow_conversion: boolean; // If 'true' anyone can register - // If 'false' only the admin can + // If 'false' only admin can allow_registrations: boolean; // If 'true' account can delete themselves - // If 'false' only the admin can delete accounts + // If 'false' only admin can delete accounts allow_deletions: boolean; + // If 'true' anyone can edit their name + // If 'false' only admin can + allow_edit_name: boolean; + + // If 'true' anyone can edit their cashout account + // If 'false' only the admin + allow_edit_cashout_payto_uri: boolean; + // Default debt limit for newly created accounts default_debit_threshold: Amount; @@ -126,15 +134,16 @@ Account Management .. ts:def:: RegisterAccountRequest interface RegisterAccountRequest { - // Username + // Username of the account username: string; - // Password. + // Password of the account used for authentication password: string; // Legal name of the account owner name: string; + // Is this account visible to anyone? // Defaults to false. is_public?: boolean; @@ -151,9 +160,9 @@ Account Management // If missing, cashouts will fail. // In the future, might be used for other transactions // as well. - challenge_contact_data?: ChallengeContactData; + contact_data?: ChallengeContactData; - // 'payto' address of a fiat bank account. + // 'payto' URI of a fiat bank account. // Payments will be sent to this bank account // when the user wants to convert the regional currency // back to fiat currency outside bank. @@ -161,11 +170,19 @@ Account Management // Internal payto URI of this bank account. // Used mostly for testing. - internal_payto_uri?: string; + payto_uri?: string; // If present, set the max debit allowed for this user // Only admin can change this property. debit_threshold?: Amount + + // Deprecated use ``contact_data`` instead + // will be removed in the next release + challenge_contact_data?: ChallengeContactData; + + // Deprecated use ``payto_uri`` instead + // will be removed in the next release + internal_payto_uri?: string; } .. ts:def:: ChallengeContactData @@ -240,25 +257,33 @@ Account Management // If missing, cashouts will fail. // In the future, might be used for other transactions // as well. - challenge_contact_data?: ChallengeContactData; + contact_data?: ChallengeContactData; - // 'payto' address of a fiat bank account. + // 'payto' URI of a fiat bank account. // Payments will be sent to this bank account // when the user wants to convert the regional currency // back to fiat currency outside bank. + // Only admin can change this property if not allowed in config cashout_payto_uri?: string; // If present, change the legal name associated with $username. - // Only admin can change this property. + // Only admin can change this property if not allowed in config name?: string; - // If present, change the is_taler_exchange configuration. - // See `RegisterAccountRequest` - is_taler_exchange?: boolean; + // Is this account visible to anyone? + is_public?: boolean; // If present, change the max debit allowed for this user // Only admin can change this property. debit_threshold?: Amount + + // Deprecated use ``contact_data`` instead + // will be removed in the next release + challenge_contact_data?: ChallengeContactData; + + // Deprecated and have no effect + // will be removed in the next release + is_taler_exchange?: boolean; } **Response:** @@ -270,8 +295,8 @@ Account Management :http:statuscode:`404 Not found`: The account pointed by ``$USERNAME`` was not found. :http:statuscode:`409 Conflict`: - * ``TALER_EC_BANK_PATCH_ADMIN_EXCHANGE``: an admin user has tried to become an exchange. * ``TALER_EC_BANK_NON_ADMIN_PATCH_LEGAL_NAME`` : a non-admin user has tried to change their legal name. + * ``TALER_EC_BANK_NON_ADMIN_PATCH_CASHOUT`` : a non-admin user has tried to change their cashout account. * ``TALER_EC_BANK_NON_ADMIN_PATCH_DEBT_LIMIT``: a non-admin user has tried to change their debt limit. @@ -344,12 +369,20 @@ Account Management .. ts:def:: PublicAccount interface PublicAccount { + // Username of the account + username: string; + + // Internal payto URI of this bank account. payto_uri: string; + // Current balance of the account balance: Balance; - // The account name (=username) of the - // bank account. + // Is this a taler exchange account? + is_taler_exchange: boolean; + + // Deprecated use ``username`` instead + // will be removed in the next release account_name: string; } @@ -400,17 +433,26 @@ Account Management .. ts:def:: AccountMinimalData interface AccountMinimalData { - // Username + // Username of the account username: string; // Legal name of the account owner. name: string; - // current balance of the account + // Internal payto URI of this bank account. + payto_uri: string; + + // Current balance of the account balance: Balance; // Number indicating the max debit allowed for the requesting user. debit_threshold: Amount; + + // Is this account visible to anyone? + is_public: boolean; + + // Is this a taler exchange account? + is_taler_exchange: boolean; } .. _bank-account-info: @@ -447,15 +489,26 @@ Account Management // Number indicating the max debit allowed for the requesting user. debit_threshold: Amount; + // Addresses where to send the TAN for transactions. + // Currently only used for cashouts. + // If missing, cashouts will fail. + // In the future, might be used for other transactions + // as well. contact_data?: ChallengeContactData; - // 'payto' address pointing the bank account + // 'payto' URI pointing the bank account // where to send cashouts. This field is optional // because not all the accounts are required to participate // in the merchants' circuit. One example is the exchange: // that never cashouts. Registering these accounts can // be done via the access API. cashout_payto_uri?: string; + + // Is this account visible to anyone? + is_public: boolean; + + // Is this a taler exchange account? + is_taler_exchange: boolean; } Transactions |