didit-sdk 2.34.0 → 2.36.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +48 -0
- data/lib/didit/resources/authentication_setup.rb +29 -28
- data/lib/didit/resources/bank.rb +183 -61
- data/lib/didit/resources/messages.rb +1 -1
- data/lib/didit/resources/phone.rb +757 -1
- data/lib/didit/resources/pricing.rb +42 -0
- data/lib/didit/types/bank.rb +60 -0
- data/lib/didit/types/components.rb +123 -6
- data/lib/didit/types/phone.rb +673 -0
- data/lib/didit/types.rb +94 -0
- data/lib/didit/version.rb +1 -1
- data/sig/didit/resources/bank.rbs +2 -0
- data/sig/didit/resources/phone.rbs +39 -0
- data/sig/didit/resources/pricing.rbs +2 -0
- data/sig/didit/types/bank.rbs +58 -0
- data/sig/didit/types/components.rbs +103 -0
- data/sig/didit/types/phone.rbs +607 -0
- metadata +1 -1
data/lib/didit/resources/bank.rb
CHANGED
|
@@ -122,9 +122,9 @@ module Didit
|
|
|
122
122
|
# by the browser. History: send `history_from` or `history_days`, not both. Where the bank allows, ongoing
|
|
123
123
|
# access keeps working until the consent ends; the real date is on each connection.
|
|
124
124
|
#
|
|
125
|
-
# Needs an API key with
|
|
126
|
-
#
|
|
127
|
-
#
|
|
125
|
+
# Needs an API key with write access to Bank data, because this operation changes something: a full-access key
|
|
126
|
+
# has it, and a scoped key needs `bank-data` write in its scopes. Otherwise the call answers `403
|
|
127
|
+
# bank_data_access_denied`.
|
|
128
128
|
#
|
|
129
129
|
# +POST /v3/bank/links/+
|
|
130
130
|
#
|
|
@@ -166,7 +166,10 @@ module Didit
|
|
|
166
166
|
# registration. Any other address answers `400 redirect_url_not_registered`: registering other addresses is n...
|
|
167
167
|
# @param allowed_origins [Array<String>] Accepted and not used today: reserved for Didit's embedded Bank Link,
|
|
168
168
|
# which is not released yet. HTTPS origins, up to 50.
|
|
169
|
-
# @param language [String] Optional
|
|
169
|
+
# @param language [String] Optional. One of the [supported languages](/integration/supported-languages), the
|
|
170
|
+
# same codes the `language` of the session API takes, for example `es`, `pt`, `pt-BR` or `zh-CN` (`pt-PT` is not
|
|
171
|
+
# one of them). The match is exact and case-sensitive (`ES` and `pt-PT` are refused). A code outside that list
|
|
172
|
+
# answers `400 invalid_request` with `field: language`. The language of the hosted page and of the...
|
|
170
173
|
# @param vendor_data [String] Your own reference, returned on the link and the connection.
|
|
171
174
|
# @param expires_in [Integer] Lifetime of the link in seconds, 300 to 86400. Default 3600.
|
|
172
175
|
# @param duplicates [String] `reuse` (default) completes a link that resolves to accounts you already share as a
|
|
@@ -260,9 +263,9 @@ module Didit
|
|
|
260
263
|
# already downloaded, which is your own copy. Repeating the call is safe. To stop access without deleting, use
|
|
261
264
|
# `revoke_connection`.
|
|
262
265
|
#
|
|
263
|
-
# Needs an API key with
|
|
264
|
-
#
|
|
265
|
-
#
|
|
266
|
+
# Needs an API key with write access to Bank data, because this operation changes something: a full-access key
|
|
267
|
+
# has it, and a scoped key needs `bank-data` write in its scopes. Otherwise the call answers `403
|
|
268
|
+
# bank_data_access_denied`.
|
|
266
269
|
#
|
|
267
270
|
# +DELETE /v3/bank/connections/{id}/+
|
|
268
271
|
#
|
|
@@ -287,10 +290,10 @@ module Didit
|
|
|
287
290
|
# bank delivered of the history you asked for. `sync.last_synced_at` is when the data was fetched from the bank,
|
|
288
291
|
# not when you read it.
|
|
289
292
|
#
|
|
290
|
-
# Needs an API key with
|
|
291
|
-
#
|
|
292
|
-
#
|
|
293
|
-
#
|
|
293
|
+
# Needs an API key with read access to Bank data: a full-access key has it, and a scoped key needs `bank-data`
|
|
294
|
+
# read in its scopes. Otherwise the call answers `403 bank_data_access_denied`. A sandbox application reads its
|
|
295
|
+
# Test Bank data with the key alone. A request without an API key (client credentials) is refused on raw data
|
|
296
|
+
# with the same `403`.
|
|
294
297
|
#
|
|
295
298
|
# +GET /v3/bank/accounts/{account_id}/+
|
|
296
299
|
#
|
|
@@ -311,10 +314,10 @@ module Didit
|
|
|
311
314
|
#
|
|
312
315
|
# Returns the typed balances of an account with their reference dates. Balances are replaced at each sync.
|
|
313
316
|
#
|
|
314
|
-
# Needs an API key with
|
|
315
|
-
#
|
|
316
|
-
#
|
|
317
|
-
#
|
|
317
|
+
# Needs an API key with read access to Bank data: a full-access key has it, and a scoped key needs `bank-data`
|
|
318
|
+
# read in its scopes. Otherwise the call answers `403 bank_data_access_denied`. A sandbox application reads its
|
|
319
|
+
# Test Bank data with the key alone. A request without an API key (client credentials) is refused on raw data
|
|
320
|
+
# with the same `403`.
|
|
318
321
|
#
|
|
319
322
|
# +GET /v3/bank/accounts/{account_id}/balances/+
|
|
320
323
|
#
|
|
@@ -338,9 +341,8 @@ module Didit
|
|
|
338
341
|
# its id, `status: deleted`, the reason, its dates and its `erasure` status, and no accounts, balances,
|
|
339
342
|
# transactions, consent or sync data.
|
|
340
343
|
#
|
|
341
|
-
# Needs an API key with
|
|
342
|
-
#
|
|
343
|
-
# bank_data_access_denied`.
|
|
344
|
+
# Needs an API key with read access to Bank data: a full-access key has it, and a scoped key needs `bank-data`
|
|
345
|
+
# read in its scopes. Otherwise the call answers `403 bank_data_access_denied`.
|
|
344
346
|
#
|
|
345
347
|
# +GET /v3/bank/connections/{id}/+
|
|
346
348
|
#
|
|
@@ -364,9 +366,8 @@ module Didit
|
|
|
364
366
|
# and whether business accounts are supported. Ongoing access is counted only where a bank is switched on for
|
|
365
367
|
# it. Use it to decide which countries to offer; use `list_institutions` for a single bank.
|
|
366
368
|
#
|
|
367
|
-
# Needs an API key with
|
|
368
|
-
#
|
|
369
|
-
# bank_data_access_denied`.
|
|
369
|
+
# Needs an API key with read access to Bank data: a full-access key has it, and a scoped key needs `bank-data`
|
|
370
|
+
# read in its scopes. Otherwise the call answers `403 bank_data_access_denied`.
|
|
370
371
|
#
|
|
371
372
|
# +GET /v3/bank/coverage/+
|
|
372
373
|
#
|
|
@@ -385,9 +386,8 @@ module Didit
|
|
|
385
386
|
#
|
|
386
387
|
# Returns one bank with its capabilities. The id is Didit's slug, as listed by `list_institutions`.
|
|
387
388
|
#
|
|
388
|
-
# Needs an API key with
|
|
389
|
-
#
|
|
390
|
-
# bank_data_access_denied`.
|
|
389
|
+
# Needs an API key with read access to Bank data: a full-access key has it, and a scoped key needs `bank-data`
|
|
390
|
+
# read in its scopes. Otherwise the call answers `403 bank_data_access_denied`.
|
|
391
391
|
#
|
|
392
392
|
# +GET /v3/bank/institutions/{id}/+
|
|
393
393
|
#
|
|
@@ -414,9 +414,8 @@ module Didit
|
|
|
414
414
|
# example `duplicate_conflict` with `conflicts_with`. `url` and `client_token` are returned only when the link
|
|
415
415
|
# is created.
|
|
416
416
|
#
|
|
417
|
-
# Needs an API key with
|
|
418
|
-
#
|
|
419
|
-
# bank_data_access_denied`.
|
|
417
|
+
# Needs an API key with read access to Bank data: a full-access key has it, and a scoped key needs `bank-data`
|
|
418
|
+
# read in its scopes. Otherwise the call answers `403 bank_data_access_denied`.
|
|
420
419
|
#
|
|
421
420
|
# +GET /v3/bank/links/{id}/+
|
|
422
421
|
#
|
|
@@ -437,9 +436,8 @@ module Didit
|
|
|
437
436
|
#
|
|
438
437
|
# Returns one sync run with its results per account and resource.
|
|
439
438
|
#
|
|
440
|
-
# Needs an API key with
|
|
441
|
-
#
|
|
442
|
-
# bank_data_access_denied`.
|
|
439
|
+
# Needs an API key with read access to Bank data: a full-access key has it, and a scoped key needs `bank-data`
|
|
440
|
+
# read in its scopes. Otherwise the call answers `403 bank_data_access_denied`.
|
|
443
441
|
#
|
|
444
442
|
# +GET /v3/bank/connections/{id}/sync-runs/{sync_id}/+
|
|
445
443
|
#
|
|
@@ -461,10 +459,10 @@ module Didit
|
|
|
461
459
|
#
|
|
462
460
|
# Lists every account of the connection, oldest first, with full identifiers and holders. A read never bills.
|
|
463
461
|
#
|
|
464
|
-
# Needs an API key with
|
|
465
|
-
#
|
|
466
|
-
#
|
|
467
|
-
#
|
|
462
|
+
# Needs an API key with read access to Bank data: a full-access key has it, and a scoped key needs `bank-data`
|
|
463
|
+
# read in its scopes. Otherwise the call answers `403 bank_data_access_denied`. A sandbox application reads its
|
|
464
|
+
# Test Bank data with the key alone. A request without an API key (client credentials) is refused on raw data
|
|
465
|
+
# with the same `403`.
|
|
468
466
|
#
|
|
469
467
|
# +GET /v3/bank/connections/{id}/accounts/+
|
|
470
468
|
#
|
|
@@ -498,9 +496,8 @@ module Didit
|
|
|
498
496
|
# carries no bank data, and reading it by id returns the same minimal record (`id`, `status`, `status_reason`,
|
|
499
497
|
# `created_at` and `erasure`).
|
|
500
498
|
#
|
|
501
|
-
# Needs an API key with
|
|
502
|
-
#
|
|
503
|
-
# bank_data_access_denied`.
|
|
499
|
+
# Needs an API key with read access to Bank data: a full-access key has it, and a scoped key needs `bank-data`
|
|
500
|
+
# read in its scopes. Otherwise the call answers `403 bank_data_access_denied`.
|
|
504
501
|
#
|
|
505
502
|
# In this list `sync.budgets` shows only the budgets that exist already; `GET /v3/bank/connections/{id}/` opens
|
|
506
503
|
# today's budgets.
|
|
@@ -562,9 +559,8 @@ module Didit
|
|
|
562
559
|
# `null`. The same data feeds the bank picker, so use it to know what to expect before you create a link.
|
|
563
560
|
# `access` lists `ongoing` only where ongoing access is available.
|
|
564
561
|
#
|
|
565
|
-
# Needs an API key with
|
|
566
|
-
#
|
|
567
|
-
# bank_data_access_denied`.
|
|
562
|
+
# Needs an API key with read access to Bank data: a full-access key has it, and a scoped key needs `bank-data`
|
|
563
|
+
# read in its scopes. Otherwise the call answers `403 bank_data_access_denied`.
|
|
568
564
|
#
|
|
569
565
|
# The list is sorted by name, then id.
|
|
570
566
|
#
|
|
@@ -611,9 +607,8 @@ module Didit
|
|
|
611
607
|
#
|
|
612
608
|
# Lists what each sync of a connection did, newest first, per account and resource.
|
|
613
609
|
#
|
|
614
|
-
# Needs an API key with
|
|
615
|
-
#
|
|
616
|
-
# bank_data_access_denied`.
|
|
610
|
+
# Needs an API key with read access to Bank data: a full-access key has it, and a scoped key needs `bank-data`
|
|
611
|
+
# read in its scopes. Otherwise the call answers `403 bank_data_access_denied`.
|
|
617
612
|
#
|
|
618
613
|
# +GET /v3/bank/connections/{id}/sync-runs/+
|
|
619
614
|
#
|
|
@@ -652,10 +647,10 @@ module Didit
|
|
|
652
647
|
#
|
|
653
648
|
# Response headers: `X-Bank-Last-Synced-At` and `Cache-Control: no-store`.
|
|
654
649
|
#
|
|
655
|
-
# Needs an API key with
|
|
656
|
-
#
|
|
657
|
-
#
|
|
658
|
-
#
|
|
650
|
+
# Needs an API key with read access to Bank data: a full-access key has it, and a scoped key needs `bank-data`
|
|
651
|
+
# read in its scopes. Otherwise the call answers `403 bank_data_access_denied`. A sandbox application reads its
|
|
652
|
+
# Test Bank data with the key alone. A request without an API key (client credentials) is refused on raw data
|
|
653
|
+
# with the same `403`.
|
|
659
654
|
#
|
|
660
655
|
# +GET /v3/bank/accounts/{account_id}/transactions/+
|
|
661
656
|
#
|
|
@@ -713,9 +708,9 @@ module Didit
|
|
|
713
708
|
#
|
|
714
709
|
# When a sync stores changes, `bank.data.updated` tells you; then read the change feed.
|
|
715
710
|
#
|
|
716
|
-
# Needs an API key with
|
|
717
|
-
#
|
|
718
|
-
#
|
|
711
|
+
# Needs an API key with write access to Bank data, because this operation changes something: a full-access key
|
|
712
|
+
# has it, and a scoped key needs `bank-data` write in its scopes. Otherwise the call answers `403
|
|
713
|
+
# bank_data_access_denied`.
|
|
719
714
|
#
|
|
720
715
|
# Refreshing a deleted connection answers `409 connection_not_active`. A one-time connection is read once and
|
|
721
716
|
# its access then ends, so refreshing it answers `409 one_time_connection`: create a new link to read the bank
|
|
@@ -761,9 +756,9 @@ module Didit
|
|
|
761
756
|
# Until the consent has 30 days left or fewer it answers `409 renewal_not_needed`; after
|
|
762
757
|
# `consent.renewable_until` it answers `409 renewal_window_expired` and the person connects again.
|
|
763
758
|
#
|
|
764
|
-
# Needs an API key with
|
|
765
|
-
#
|
|
766
|
-
#
|
|
759
|
+
# Needs an API key with write access to Bank data, because this operation changes something: a full-access key
|
|
760
|
+
# has it, and a scoped key needs `bank-data` write in its scopes. Otherwise the call answers `403
|
|
761
|
+
# bank_data_access_denied`.
|
|
767
762
|
#
|
|
768
763
|
# +POST /v3/bank/connections/{id}/renew/+
|
|
769
764
|
#
|
|
@@ -773,7 +768,10 @@ module Didit
|
|
|
773
768
|
# redirect_url_not_registered`: registering other addresses is not available yet.
|
|
774
769
|
# @param allowed_origins [Array<String>] Accepted and not used today: reserved for Didit's embedded Bank Link,
|
|
775
770
|
# which is not released yet. HTTPS origins, up to 50.
|
|
776
|
-
# @param language [String]
|
|
771
|
+
# @param language [String] Optional. One of the [supported languages](/integration/supported-languages), the
|
|
772
|
+
# same codes the `language` of the session API takes, for example `es`, `pt`, `pt-BR` or `zh-CN` (`pt-PT` is not
|
|
773
|
+
# one of them). The match is exact and case-sensitive (`ES` and `pt-PT` are refused). A code outside that list
|
|
774
|
+
# answers `400 invalid_request` with `field: language`. The language of the hosted page and of the...
|
|
777
775
|
# @param expires_in [Integer] Lifetime in seconds, 300 to 86400.
|
|
778
776
|
# @param idempotency_key [String] sent as the Idempotency-Key header
|
|
779
777
|
# @param request_options [Hash, nil] :timeout, :max_retries, :extra_headers, :extra_query, :extra_body
|
|
@@ -815,9 +813,9 @@ module Didit
|
|
|
815
813
|
# `consent.retain_until`, the retention setting of your application, and nothing is charged. To delete them now,
|
|
816
814
|
# call `delete_connection`. Repeating the call returns the current state.
|
|
817
815
|
#
|
|
818
|
-
# Needs an API key with
|
|
819
|
-
#
|
|
820
|
-
#
|
|
816
|
+
# Needs an API key with write access to Bank data, because this operation changes something: a full-access key
|
|
817
|
+
# has it, and a scoped key needs `bank-data` write in its scopes. Otherwise the call answers `403
|
|
818
|
+
# bank_data_access_denied`.
|
|
821
819
|
#
|
|
822
820
|
# Revoking a connection that was deleted answers `200` with the deleted connection, so repeating the call is
|
|
823
821
|
# safe.
|
|
@@ -839,6 +837,130 @@ module Didit
|
|
|
839
837
|
)
|
|
840
838
|
end
|
|
841
839
|
|
|
840
|
+
# Simulate a bank connection event (sandbox)
|
|
841
|
+
#
|
|
842
|
+
# Moves a sandbox connection through time without waiting: new transactions, a pending row that posts, a consent
|
|
843
|
+
# that is about to end or has ended, a revocation, a failing sync, a duplicate webhook or a used-up refresh
|
|
844
|
+
# allowance. It uses the real sync engine and the real webhooks, so `bank.*` deliveries, the change feed and
|
|
845
|
+
# `sync` behave as they do for a real bank. Answers the connection as `get_connection` would.
|
|
846
|
+
#
|
|
847
|
+
# `action` is required and is one of:
|
|
848
|
+
#
|
|
849
|
+
# - `new_transactions`: the bank adds `count` booked transactions (1 to 500, default 3). A sync follows.
|
|
850
|
+
# - `pending_posted`: one day passes at the bank: pending rows leave the change feed as `removed` and their
|
|
851
|
+
# booked rows arrive as `added`. It needs a test customer with pending transactions (`pending`); with
|
|
852
|
+
# `personal_basic` nothing changes. A sync follows.
|
|
853
|
+
# - `booking_correction`: the next sync returns booked rows again with a corrected booking, so they arrive as
|
|
854
|
+
# `modified`. A sync follows.
|
|
855
|
+
# - `midnight_booking`: a row is booked across midnight, to test day boundaries. A sync follows.
|
|
856
|
+
# - `consent_expiring`: the consent now ends in `days` days and the expiry notice is sent
|
|
857
|
+
# (`bank.connection.consent_expiring`). `days` accepts only the notification thresholds, 14, 7 or 1 (default
|
|
858
|
+
# 7); any other value answers `400 invalid_request` with `field` `days`.
|
|
859
|
+
# - `consent_expired`: the consent has ended now and the connection becomes `renewal_required`.
|
|
860
|
+
# - `revoked_by_user` and `revoked_by_bank`: the bank tells Didit the consent ended, as if the person or the
|
|
861
|
+
# bank had revoked it. The connection reads `revoked` with `status_reason` `revoked_by_end_user` or
|
|
862
|
+
# `revoked_by_bank`, and `consent.ended_by` is `end_user` or `bank`.
|
|
863
|
+
# - `sync_failed`: the bank fails every read until `sync_recovered`; the connection has been failing for 24
|
|
864
|
+
# hours, so `bank.sync.failed` is sent. A sync follows.
|
|
865
|
+
# - `sync_recovered`: the bank answers again. A sync follows.
|
|
866
|
+
# - `webhook_twice`: the last `bank.*` webhook of this connection is delivered again with the same `event_id`
|
|
867
|
+
# and a fresh signature, to test your deduplication. It answers `400 invalid_request` if the connection has no
|
|
868
|
+
# delivery yet.
|
|
869
|
+
# - `budget_used`: today's refresh allowance is used up on the bank's own day, so the next `refresh_connection`
|
|
870
|
+
# answers `429 refresh_limit_reached` with `Retry-After`, and `sync.live_syncs_left_today` and the
|
|
871
|
+
# `sync.budgets` `remaining` read 0.
|
|
872
|
+
# - `budget_reset`: today's refresh allowance is restored: `sync.live_syncs_left_today` and the `remaining` of
|
|
873
|
+
# `sync.budgets` read what they read on a new connection.
|
|
874
|
+
#
|
|
875
|
+
# `days` is only accepted with `consent_expiring` and `count` only with `new_transactions`: sent with another
|
|
876
|
+
# action, each answers `400 invalid_request` with `field` naming it.
|
|
877
|
+
#
|
|
878
|
+
# Needs an API key with write access to Bank data, because this operation changes something: a full-access key
|
|
879
|
+
# has it, and a scoped key needs `bank-data` write in its scopes. Otherwise the call answers `403
|
|
880
|
+
# bank_data_access_denied`. Sandbox only: a live application, or a link or connection that belongs to the live
|
|
881
|
+
# environment, answers `404 not_found`, exactly as an unknown route does.
|
|
882
|
+
#
|
|
883
|
+
# +POST /v3/bank/connections/{id}/simulate/+
|
|
884
|
+
#
|
|
885
|
+
# @param id [String] The connection id.
|
|
886
|
+
# @param action [String] What happens. The operation description explains each value.
|
|
887
|
+
# @param days [Integer] Only for `consent_expiring`: days until the consent ends. Only the notification
|
|
888
|
+
# thresholds are accepted: 14, 7 or 1. Any other value, or `days` with another action, answers `400
|
|
889
|
+
# invalid_request` with `field` `days`.
|
|
890
|
+
# @param count [Integer] Only for `new_transactions`: how many booked transactions the bank adds. With another
|
|
891
|
+
# action it answers `400 invalid_request` with `field` `count`.
|
|
892
|
+
# @param idempotency_key [String] sent as the Idempotency-Key header
|
|
893
|
+
# @param request_options [Hash, nil] :timeout, :max_retries, :extra_headers, :extra_query, :extra_body
|
|
894
|
+
# @return [Didit::Types::BankConnection]
|
|
895
|
+
def simulate_connection(id, action:, days: OMIT, count: OMIT, idempotency_key: OMIT, request_options: nil)
|
|
896
|
+
@client.request(
|
|
897
|
+
:post,
|
|
898
|
+
"/v3/bank/connections/{id}/simulate/",
|
|
899
|
+
path_params: { "id" => id },
|
|
900
|
+
body: {
|
|
901
|
+
"action" => action,
|
|
902
|
+
"days" => days,
|
|
903
|
+
"count" => count
|
|
904
|
+
},
|
|
905
|
+
headers: { "Idempotency-Key" => idempotency_key },
|
|
906
|
+
response: Types::BankConnection,
|
|
907
|
+
request_options: request_options
|
|
908
|
+
)
|
|
909
|
+
end
|
|
910
|
+
|
|
911
|
+
# Simulate a bank link (sandbox)
|
|
912
|
+
#
|
|
913
|
+
# Finishes a link of your sandbox application in one call, as if the person had gone through the Didit Test
|
|
914
|
+
# Bank: you choose the Test Bank customer (`persona`) and how the link ends (`outcome`). The link goes through
|
|
915
|
+
# the same completion code as a real bank sign-in, so the connection, its accounts, the first sync and the
|
|
916
|
+
# `bank.*` webhooks happen exactly as they would for a real person. Answers the link, so read `status` and
|
|
917
|
+
# `connection_id`.
|
|
918
|
+
#
|
|
919
|
+
# `outcome` is `completed` (the default: the person agrees and the connection is created), `cancelled` (the
|
|
920
|
+
# person leaves, the link ends `cancelled`), `failed` (the link ends `failed`; `error_code` picks the reason,
|
|
921
|
+
# `bank_unavailable` by default), `duplicate_conflict` (the person already has a connection with the same bank),
|
|
922
|
+
# `reduced_grant` (the person shares less than you asked for) or `renewal_login_mismatch` (a renewal with
|
|
923
|
+
# another bank login; on a connect link it ends as the failure it is). `error_code` is only accepted with
|
|
924
|
+
# `outcome: failed`.
|
|
925
|
+
#
|
|
926
|
+
# A link that allows the one-time fallback and meets a bank that cannot keep access open accepts the reduced
|
|
927
|
+
# access and finishes in the same call. A link that is no longer open (completed, cancelled, expired or failed)
|
|
928
|
+
# is returned unchanged, so the call is safe to repeat.
|
|
929
|
+
#
|
|
930
|
+
# Needs an API key with write access to Bank data, because this operation changes something: a full-access key
|
|
931
|
+
# has it, and a scoped key needs `bank-data` write in its scopes. Otherwise the call answers `403
|
|
932
|
+
# bank_data_access_denied`. Sandbox only: a live application, or a link or connection that belongs to the live
|
|
933
|
+
# environment, answers `404 not_found`, exactly as an unknown route does.
|
|
934
|
+
#
|
|
935
|
+
# +POST /v3/bank/links/{id}/simulate/+
|
|
936
|
+
#
|
|
937
|
+
# @param id [String] The link id.
|
|
938
|
+
# @param persona [String] The Test Bank customer who signs in: `personal_basic` (one current account),
|
|
939
|
+
# `business_multi` (several business accounts), `long_history` (a long transaction history), `pending` (pending
|
|
940
|
+
# rows), `sparse_fields` (transactions with fields missing, one automatic sync a day) or `no_ongoing` (a bank
|
|
941
|
+
# that cannot keep access open).
|
|
942
|
+
# @param outcome [String] How the link ends.
|
|
943
|
+
# @param error_code [String] The failure the link records. Only accepted with `outcome: failed`, where it
|
|
944
|
+
# defaults to `bank_unavailable`.
|
|
945
|
+
# @param idempotency_key [String] sent as the Idempotency-Key header
|
|
946
|
+
# @param request_options [Hash, nil] :timeout, :max_retries, :extra_headers, :extra_query, :extra_body
|
|
947
|
+
# @return [Didit::Types::BankLink]
|
|
948
|
+
def simulate_link(id, persona: OMIT, outcome: OMIT, error_code: OMIT, idempotency_key: OMIT, request_options: nil)
|
|
949
|
+
@client.request(
|
|
950
|
+
:post,
|
|
951
|
+
"/v3/bank/links/{id}/simulate/",
|
|
952
|
+
path_params: { "id" => id },
|
|
953
|
+
body: {
|
|
954
|
+
"persona" => persona,
|
|
955
|
+
"outcome" => outcome,
|
|
956
|
+
"error_code" => error_code
|
|
957
|
+
},
|
|
958
|
+
headers: { "Idempotency-Key" => idempotency_key },
|
|
959
|
+
response: Types::BankLink,
|
|
960
|
+
request_options: request_options
|
|
961
|
+
)
|
|
962
|
+
end
|
|
963
|
+
|
|
842
964
|
# Sync transactions (change feed)
|
|
843
965
|
#
|
|
844
966
|
# Returns what changed in a connection's transactions since a `cursor`: `added`, `modified` and `removed` (with
|
|
@@ -858,10 +980,10 @@ module Didit
|
|
|
858
980
|
# pending transaction appears in `added` and the pending one in `removed` with `reason: pending_booked`. Webhook
|
|
859
981
|
# `bank.data.updated` tells you when to call.
|
|
860
982
|
#
|
|
861
|
-
# Needs an API key with
|
|
862
|
-
#
|
|
863
|
-
#
|
|
864
|
-
#
|
|
983
|
+
# Needs an API key with read access to Bank data: a full-access key has it, and a scoped key needs `bank-data`
|
|
984
|
+
# read in its scopes. Otherwise the call answers `403 bank_data_access_denied`. A sandbox application reads its
|
|
985
|
+
# Test Bank data with the key alone. A request without an API key (client credentials) is refused on raw data
|
|
986
|
+
# with the same `403`.
|
|
865
987
|
#
|
|
866
988
|
# +GET /v3/bank/connections/{id}/transactions/sync/+
|
|
867
989
|
#
|
|
@@ -271,7 +271,7 @@ module Didit
|
|
|
271
271
|
# Set how many days a message keeps its text and recipient, from 2 to 365 (default 30). Shortening the retention
|
|
272
272
|
# erases, within the hour, the text and recipient of every message already past the new one (irreversible); the
|
|
273
273
|
# messages themselves, with their status, channel, country, segments, price and timestamps, stay. Lengthening it
|
|
274
|
-
# applies to the messages
|
|
274
|
+
# applies to the messages whose text and recipient are still held.
|
|
275
275
|
#
|
|
276
276
|
# A scoped API key needs write access to application settings.
|
|
277
277
|
#
|