Comment on COUNTERPARTY

This commit is contained in:
Simon Redfern 2017-02-22 13:48:50 +01:00
parent ddc9a90860
commit a8668d8a4f
2 changed files with 10 additions and 2 deletions

View File

@ -363,6 +363,11 @@ trait APIMethods210 {
toBankId <- Full(BankId(toCounterparty.otherBankId ))
toAccountId <- Full(AccountId(toCounterparty.otherAccountId))
toAccountProvider <- Full(AccountId(toCounterparty.otherAccountProvider))
// Use toAccountProvider to determine how we validate the toBank and toAccount.
// i.e. Only validate toBankId and toAccountId if the toAccountProvider is OBP
// i.e. if toAccountProvider is OBP we can expect the account to exist locally.
// In the future we may remove toBankId and toAccountId and exclusively the scheme/address in Counterparty
// This is so developers can follow the COUNTERPARTY flow in the sandbox
toAccount <- if (toAccountProvider == "OBP")
BankAccount(toBankId, toAccountId) ?~! {ErrorMessages.BankAccountNotFound}
else

View File

@ -146,8 +146,11 @@ trait APIMethods220 {
|
| The 'hide_metadata_if_alias_used' field in the JSON can take boolean values. If it is set to `true` and there is an alias on the other account then the other accounts' metadata (like more_info, url, image_url, open_corporates_url, etc.) will be hidden. Otherwise the metadata will be shown.
|
| The 'allowed_actions' field is a list containing the name of the actions allowed on this view, all the actions contained will be set to `true` on the view creation, the rest will be set to `false`.""",
Extraction.decompose(CreateViewJSON("Name of view to create", "Description of view (this example is public, uses the public alias, and has limited access to account data)", true, "_public_", true, List("can_see_transaction_start_date", "can_see_bank_account_label", "can_see_tags"))),
| The 'allowed_actions' field is a list containing the name of the actions allowed on this view, all the actions contained will be set to `true` on the view creation, the rest will be set to `false`.
|
| You should use a leading _ (underscore) for the view name because other view names may become reserved by OBP internally
| """,
Extraction.decompose(CreateViewJSON("_name-of-view-to-create", "Description of view", false, "_public_", true, List("can_see_transaction_start_date", "can_see_bank_account_label", "can_see_tags", "can_add_counterparty"))),
emptyObjectJson,
emptyObjectJson :: Nil,
Catalogs(notCore, notPSD2, notOBWG),