didit-sdk 2.34.0 → 2.35.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 +12 -0
- data/lib/didit/resources/authentication_setup.rb +29 -28
- data/lib/didit/resources/bank.rb +132 -2
- data/lib/didit/resources/messages.rb +1 -1
- data/lib/didit/resources/phone.rb +735 -9
- data/lib/didit/resources/pricing.rb +42 -0
- data/lib/didit/types/bank.rb +60 -0
- data/lib/didit/types/components.rb +454 -99
- data/lib/didit/types/phone.rb +216 -0
- data/lib/didit/types.rb +79 -9
- data/lib/didit/version.rb +1 -1
- data/sig/didit/resources/bank.rbs +2 -0
- data/sig/didit/resources/phone.rbs +40 -1
- data/sig/didit/resources/pricing.rbs +2 -0
- data/sig/didit/types/bank.rbs +58 -0
- data/sig/didit/types/components.rbs +391 -82
- data/sig/didit/types/phone.rbs +211 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 64451cf7f43e0874045cc8d8431c373427b6ee09be5474a57f8db68bdaefa360
|
|
4
|
+
data.tar.gz: 659d6ae80bb6d1d4bbcdf3430936875bc68a925e56082b4c83d7f80f5c1ba97d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: b40608aa6b6efdbc13c5be90f1d11fd79ce0040577f15b89c87277fe348f21e3d30235d369db49510873e2943ea6c5e4502f1354ee291ad5352e17a5a5ca4dc9
|
|
7
|
+
data.tar.gz: 07adf859caf7529b9bbac3a7d11801d6657ee576c45edb4733d65e4ccff0b51cb7d38a842ec3e1adcafdf15dba5ba3f81e8e03db0937fe0afb4e0769d3b9b917
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [2.35.0](https://github.com/didit-protocol/sdk-ruby/compare/v2.34.0...v2.35.0) (2026-11-23)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### API changes that can break typed code
|
|
7
|
+
|
|
8
|
+
* **spec:** `phone.check_code` (`POST /v3/phone/check/`): request body `(anyOf 1)`: type changed from object to any ([d50a148](https://github.com/didit-protocol/sdk-ruby/commit/d50a1481e1e5772c2ab871209d5d1a7707dbad9c))
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Features
|
|
12
|
+
|
|
13
|
+
* **spec:** sync API spec 2026-11-23 ([d50a148](https://github.com/didit-protocol/sdk-ruby/commit/d50a1481e1e5772c2ab871209d5d1a7707dbad9c))
|
|
14
|
+
|
|
3
15
|
## [2.34.0](https://github.com/didit-protocol/sdk-ruby/compare/v2.33.0...v2.34.0) (2026-11-23)
|
|
4
16
|
|
|
5
17
|
|
|
@@ -14,7 +14,7 @@ module Didit
|
|
|
14
14
|
# +POST /organizations/{organization_id}/applications/{application_id}/authentication/domain/activate/+
|
|
15
15
|
#
|
|
16
16
|
# @param organization_id [String] UUID of the organization that owns the application.
|
|
17
|
-
# @param application_id [String] UUID of the application: live or sandbox.
|
|
17
|
+
# @param application_id [String] UUID of the application: live or sandbox. An API key configures its own
|
|
18
18
|
# application only.
|
|
19
19
|
# @param request_options [Hash, nil] :timeout, :max_retries, :extra_headers, :extra_query, :extra_body
|
|
20
20
|
# @return [Didit::Types::SetupDomain]
|
|
@@ -37,7 +37,7 @@ module Didit
|
|
|
37
37
|
# +GET /organizations/{organization_id}/applications/{application_id}/authentication/branding/+
|
|
38
38
|
#
|
|
39
39
|
# @param organization_id [String] UUID of the organization that owns the application.
|
|
40
|
-
# @param application_id [String] UUID of the application: live or sandbox.
|
|
40
|
+
# @param application_id [String] UUID of the application: live or sandbox. An API key configures its own
|
|
41
41
|
# application only.
|
|
42
42
|
# @param language [String] Language of the default texts and the previews: an unsupported code falls back to
|
|
43
43
|
# `en`.
|
|
@@ -67,7 +67,7 @@ module Didit
|
|
|
67
67
|
# +GET /organizations/{organization_id}/applications/{application_id}/authentication/+
|
|
68
68
|
#
|
|
69
69
|
# @param organization_id [String] UUID of the organization that owns the application.
|
|
70
|
-
# @param application_id [String] UUID of the application: live or sandbox.
|
|
70
|
+
# @param application_id [String] UUID of the application: live or sandbox. An API key configures its own
|
|
71
71
|
# application only.
|
|
72
72
|
# @param request_options [Hash, nil] :timeout, :max_retries, :extra_headers, :extra_query, :extra_body
|
|
73
73
|
# @return [Didit::Types::SetupConfiguration]
|
|
@@ -91,7 +91,7 @@ module Didit
|
|
|
91
91
|
# +GET /organizations/{organization_id}/applications/{application_id}/authentication/domain/+
|
|
92
92
|
#
|
|
93
93
|
# @param organization_id [String] UUID of the organization that owns the application.
|
|
94
|
-
# @param application_id [String] UUID of the application: live or sandbox.
|
|
94
|
+
# @param application_id [String] UUID of the application: live or sandbox. An API key configures its own
|
|
95
95
|
# application only.
|
|
96
96
|
# @param request_options [Hash, nil] :timeout, :max_retries, :extra_headers, :extra_query, :extra_body
|
|
97
97
|
# @return [Didit::Types::SetupDomain]
|
|
@@ -109,15 +109,16 @@ module Didit
|
|
|
109
109
|
# Preview a sign-in email
|
|
110
110
|
#
|
|
111
111
|
# Returns one email as it renders, with sample codes and links. An invitation preview uses a sample organization
|
|
112
|
-
# for a grant or
|
|
113
|
-
# when your team ends an agent's access with a notification; `agent` names the agent. A console session
|
|
114
|
-
# a customer organization's name. The address of a console member is left out for a grant or a key,
|
|
115
|
-
# no mailbox. An email Authentication does not send answers `{"error":
|
|
112
|
+
# for a grant or an API key, or the `organization` and `role` you pass. `agentoff` is the email a person
|
|
113
|
+
# receives when your team ends an agent's access with a notification; `agent` names the agent. A console session
|
|
114
|
+
# can see a customer organization's name. The address of a console member is left out for a grant or a key,
|
|
115
|
+
# which have no mailbox. An email Authentication does not send answers `{"error":
|
|
116
|
+
# "email_not_sent_by_authentication"}`.
|
|
116
117
|
#
|
|
117
118
|
# +GET /organizations/{organization_id}/applications/{application_id}/authentication/emails/{key}/+
|
|
118
119
|
#
|
|
119
120
|
# @param organization_id [String] UUID of the organization that owns the application.
|
|
120
|
-
# @param application_id [String] UUID of the application: live or sandbox.
|
|
121
|
+
# @param application_id [String] UUID of the application: live or sandbox. An API key configures its own
|
|
121
122
|
# application only.
|
|
122
123
|
# @param key [String] The email: `code`, `magic`, `reset`, `device`, `invite`, `org`, `agent` or `agentoff`.
|
|
123
124
|
# @param organization [String] For `org` only: the organization the invitation is for, so the preview shows it
|
|
@@ -162,7 +163,7 @@ module Didit
|
|
|
162
163
|
# +GET /organizations/{organization_id}/applications/{application_id}/authentication/emails/+
|
|
163
164
|
#
|
|
164
165
|
# @param organization_id [String] UUID of the organization that owns the application.
|
|
165
|
-
# @param application_id [String] UUID of the application: live or sandbox.
|
|
166
|
+
# @param application_id [String] UUID of the application: live or sandbox. An API key configures its own
|
|
166
167
|
# application only.
|
|
167
168
|
# @param language [String] Language of the subjects and previews: an unsupported code falls back to `en`.
|
|
168
169
|
# @param request_options [Hash, nil] :timeout, :max_retries, :extra_headers, :extra_query, :extra_body
|
|
@@ -189,7 +190,7 @@ module Didit
|
|
|
189
190
|
# +GET /organizations/{organization_id}/applications/{application_id}/authentication/native-apps/+
|
|
190
191
|
#
|
|
191
192
|
# @param organization_id [String] UUID of the organization that owns the application.
|
|
192
|
-
# @param application_id [String] UUID of the application: live or sandbox.
|
|
193
|
+
# @param application_id [String] UUID of the application: live or sandbox. An API key configures its own
|
|
193
194
|
# application only.
|
|
194
195
|
# @param request_options [Hash, nil] :timeout, :max_retries, :extra_headers, :extra_query, :extra_body
|
|
195
196
|
# @return [Didit::Types::SetupNativeApps]
|
|
@@ -212,7 +213,7 @@ module Didit
|
|
|
212
213
|
# +GET /organizations/{organization_id}/applications/{application_id}/authentication/onboarding/+
|
|
213
214
|
#
|
|
214
215
|
# @param organization_id [String] UUID of the organization that owns the application.
|
|
215
|
-
# @param application_id [String] UUID of the application: live or sandbox.
|
|
216
|
+
# @param application_id [String] UUID of the application: live or sandbox. An API key configures its own
|
|
216
217
|
# application only.
|
|
217
218
|
# @param request_options [Hash, nil] :timeout, :max_retries, :extra_headers, :extra_query, :extra_body
|
|
218
219
|
# @return [Didit::Types::SetupOnboarding]
|
|
@@ -230,12 +231,12 @@ module Didit
|
|
|
230
231
|
# Get bot protection
|
|
231
232
|
#
|
|
232
233
|
# Returns whether protection is on, each policy's mode and the last 14 days of detections. Console sessions,
|
|
233
|
-
# grants and
|
|
234
|
+
# grants and API keys receive the same aggregate counters.
|
|
234
235
|
#
|
|
235
236
|
# +GET /organizations/{organization_id}/applications/{application_id}/authentication/protection/+
|
|
236
237
|
#
|
|
237
238
|
# @param organization_id [String] UUID of the organization that owns the application.
|
|
238
|
-
# @param application_id [String] UUID of the application: live or sandbox.
|
|
239
|
+
# @param application_id [String] UUID of the application: live or sandbox. An API key configures its own
|
|
239
240
|
# application only.
|
|
240
241
|
# @param request_options [Hash, nil] :timeout, :max_retries, :extra_headers, :extra_query, :extra_body
|
|
241
242
|
# @return [Didit::Types::SetupProtection]
|
|
@@ -258,7 +259,7 @@ module Didit
|
|
|
258
259
|
# +GET /organizations/{organization_id}/applications/{application_id}/authentication/settings/+
|
|
259
260
|
#
|
|
260
261
|
# @param organization_id [String] UUID of the organization that owns the application.
|
|
261
|
-
# @param application_id [String] UUID of the application: live or sandbox.
|
|
262
|
+
# @param application_id [String] UUID of the application: live or sandbox. An API key configures its own
|
|
262
263
|
# application only.
|
|
263
264
|
# @param request_options [Hash, nil] :timeout, :max_retries, :extra_headers, :extra_query, :extra_body
|
|
264
265
|
# @return [Didit::Types::SetupSettings]
|
|
@@ -281,7 +282,7 @@ module Didit
|
|
|
281
282
|
# +GET /organizations/{organization_id}/applications/{application_id}/authentication/verified/+
|
|
282
283
|
#
|
|
283
284
|
# @param organization_id [String] UUID of the organization that owns the application.
|
|
284
|
-
# @param application_id [String] UUID of the application: live or sandbox.
|
|
285
|
+
# @param application_id [String] UUID of the application: live or sandbox. An API key configures its own
|
|
285
286
|
# application only.
|
|
286
287
|
# @param request_options [Hash, nil] :timeout, :max_retries, :extra_headers, :extra_query, :extra_body
|
|
287
288
|
# @return [Didit::Types::SetupVerified]
|
|
@@ -304,7 +305,7 @@ module Didit
|
|
|
304
305
|
# +DELETE /organizations/{organization_id}/applications/{application_id}/authentication/domain/+
|
|
305
306
|
#
|
|
306
307
|
# @param organization_id [String] UUID of the organization that owns the application.
|
|
307
|
-
# @param application_id [String] UUID of the application: live or sandbox.
|
|
308
|
+
# @param application_id [String] UUID of the application: live or sandbox. An API key configures its own
|
|
308
309
|
# application only.
|
|
309
310
|
# @param request_options [Hash, nil] :timeout, :max_retries, :extra_headers, :extra_query, :extra_body
|
|
310
311
|
# @return [Didit::Types::SetupDomain]
|
|
@@ -328,7 +329,7 @@ module Didit
|
|
|
328
329
|
# +PUT /organizations/{organization_id}/applications/{application_id}/authentication/domain/+
|
|
329
330
|
#
|
|
330
331
|
# @param organization_id [String] UUID of the organization that owns the application.
|
|
331
|
-
# @param application_id [String] UUID of the application: live or sandbox.
|
|
332
|
+
# @param application_id [String] UUID of the application: live or sandbox. An API key configures its own
|
|
332
333
|
# application only.
|
|
333
334
|
# @param domain [String] The domain to serve the hosted pages on. It must be a host under a zone: a CNAME cannot
|
|
334
335
|
# sit at an apex.
|
|
@@ -361,7 +362,7 @@ module Didit
|
|
|
361
362
|
# +PUT /organizations/{organization_id}/applications/{application_id}/authentication/methods/{name}/+
|
|
362
363
|
#
|
|
363
364
|
# @param organization_id [String] UUID of the organization that owns the application.
|
|
364
|
-
# @param application_id [String] UUID of the application: live or sandbox.
|
|
365
|
+
# @param application_id [String] UUID of the application: live or sandbox. An API key configures its own
|
|
365
366
|
# application only.
|
|
366
367
|
# @param name [String] The method: `password`, `code`, `magic`, `phone`, `passkey`, `google`, `microsoft`,
|
|
367
368
|
# `apple`, `github`, `sso` or `wallet`.
|
|
@@ -408,7 +409,7 @@ module Didit
|
|
|
408
409
|
# +PATCH /organizations/{organization_id}/applications/{application_id}/authentication/branding/+
|
|
409
410
|
#
|
|
410
411
|
# @param organization_id [String] UUID of the organization that owns the application.
|
|
411
|
-
# @param application_id [String] UUID of the application: live or sandbox.
|
|
412
|
+
# @param application_id [String] UUID of the application: live or sandbox. An API key configures its own
|
|
412
413
|
# application only.
|
|
413
414
|
# @param texts [Hash{String => Hash}]
|
|
414
415
|
# @param terms_url [String]
|
|
@@ -448,7 +449,7 @@ module Didit
|
|
|
448
449
|
# +PATCH /organizations/{organization_id}/applications/{application_id}/authentication/+
|
|
449
450
|
#
|
|
450
451
|
# @param organization_id [String] UUID of the organization that owns the application.
|
|
451
|
-
# @param application_id [String] UUID of the application: live or sandbox.
|
|
452
|
+
# @param application_id [String] UUID of the application: live or sandbox. An API key configures its own
|
|
452
453
|
# application only.
|
|
453
454
|
# @param redirect_uris [Array<String>]
|
|
454
455
|
# @param allowed_origins [Array<String>]
|
|
@@ -510,7 +511,7 @@ module Didit
|
|
|
510
511
|
# +PUT /organizations/{organization_id}/applications/{application_id}/authentication/native-apps/+
|
|
511
512
|
#
|
|
512
513
|
# @param organization_id [String] UUID of the organization that owns the application.
|
|
513
|
-
# @param application_id [String] UUID of the application: live or sandbox.
|
|
514
|
+
# @param application_id [String] UUID of the application: live or sandbox. An API key configures its own
|
|
514
515
|
# application only.
|
|
515
516
|
# @param ios_app_ids [Array<String>]
|
|
516
517
|
# @param android_apps [Array<Hash>]
|
|
@@ -539,7 +540,7 @@ module Didit
|
|
|
539
540
|
# +PATCH /organizations/{organization_id}/applications/{application_id}/authentication/onboarding/+
|
|
540
541
|
#
|
|
541
542
|
# @param organization_id [String] UUID of the organization that owns the application.
|
|
542
|
-
# @param application_id [String] UUID of the application: live or sandbox.
|
|
543
|
+
# @param application_id [String] UUID of the application: live or sandbox. An API key configures its own
|
|
543
544
|
# application only.
|
|
544
545
|
# @param test_skipped [Boolean]
|
|
545
546
|
# @param import_skipped [Boolean]
|
|
@@ -578,7 +579,7 @@ module Didit
|
|
|
578
579
|
# +PATCH /organizations/{organization_id}/applications/{application_id}/authentication/protection/+
|
|
579
580
|
#
|
|
580
581
|
# @param organization_id [String] UUID of the organization that owns the application.
|
|
581
|
-
# @param application_id [String] UUID of the application: live or sandbox.
|
|
582
|
+
# @param application_id [String] UUID of the application: live or sandbox. An API key configures its own
|
|
582
583
|
# application only.
|
|
583
584
|
# @param enabled [Boolean]
|
|
584
585
|
# @param breached_password_check [Boolean]
|
|
@@ -611,13 +612,13 @@ module Didit
|
|
|
611
612
|
|
|
612
613
|
# Update the application settings
|
|
613
614
|
#
|
|
614
|
-
# Changes the settings in the body. `agent_humans_only` needs a person:
|
|
615
|
+
# Changes the settings in the body. `agent_humans_only` needs a person: an API key answers 403
|
|
615
616
|
# `owner_or_admin_required`, and turning it on needs an owner or admin with an enrolled passkey.
|
|
616
617
|
#
|
|
617
618
|
# +PATCH /organizations/{organization_id}/applications/{application_id}/authentication/settings/+
|
|
618
619
|
#
|
|
619
620
|
# @param organization_id [String] UUID of the organization that owns the application.
|
|
620
|
-
# @param application_id [String] UUID of the application: live or sandbox.
|
|
621
|
+
# @param application_id [String] UUID of the application: live or sandbox. An API key configures its own
|
|
621
622
|
# application only.
|
|
622
623
|
# @param sign_in_ui [String]
|
|
623
624
|
# @param agent_humans_only [Boolean]
|
|
@@ -681,7 +682,7 @@ module Didit
|
|
|
681
682
|
# +PATCH /organizations/{organization_id}/applications/{application_id}/authentication/verified/+
|
|
682
683
|
#
|
|
683
684
|
# @param organization_id [String] UUID of the organization that owns the application.
|
|
684
|
-
# @param application_id [String] UUID of the application: live or sandbox.
|
|
685
|
+
# @param application_id [String] UUID of the application: live or sandbox. An API key configures its own
|
|
685
686
|
# application only.
|
|
686
687
|
# @param signup_level [String]
|
|
687
688
|
# @param rules [Array<Hash>]
|
|
@@ -723,7 +724,7 @@ module Didit
|
|
|
723
724
|
# +POST /organizations/{organization_id}/applications/{application_id}/authentication/domain/verify/+
|
|
724
725
|
#
|
|
725
726
|
# @param organization_id [String] UUID of the organization that owns the application.
|
|
726
|
-
# @param application_id [String] UUID of the application: live or sandbox.
|
|
727
|
+
# @param application_id [String] UUID of the application: live or sandbox. An API key configures its own
|
|
727
728
|
# application only.
|
|
728
729
|
# @param request_options [Hash, nil] :timeout, :max_retries, :extra_headers, :extra_query, :extra_body
|
|
729
730
|
# @return [Didit::Types::SetupDomain]
|
data/lib/didit/resources/bank.rb
CHANGED
|
@@ -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`. Otherwise the browser language.
|
|
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
|
|
@@ -773,7 +776,10 @@ module Didit
|
|
|
773
776
|
# redirect_url_not_registered`: registering other addresses is not available yet.
|
|
774
777
|
# @param allowed_origins [Array<String>] Accepted and not used today: reserved for Didit's embedded Bank Link,
|
|
775
778
|
# which is not released yet. HTTPS origins, up to 50.
|
|
776
|
-
# @param language [String]
|
|
779
|
+
# @param language [String] Optional. One of the [supported languages](/integration/supported-languages), the
|
|
780
|
+
# same codes the `language` of the session API takes, for example `es`, `pt`, `pt-BR` or `zh-CN` (`pt-PT` is not
|
|
781
|
+
# one of them). The match is exact and case-sensitive (`ES` and `pt-PT` are refused). A code outside that list
|
|
782
|
+
# answers `400 invalid_request` with `field: language`.
|
|
777
783
|
# @param expires_in [Integer] Lifetime in seconds, 300 to 86400.
|
|
778
784
|
# @param idempotency_key [String] sent as the Idempotency-Key header
|
|
779
785
|
# @param request_options [Hash, nil] :timeout, :max_retries, :extra_headers, :extra_query, :extra_body
|
|
@@ -839,6 +845,130 @@ module Didit
|
|
|
839
845
|
)
|
|
840
846
|
end
|
|
841
847
|
|
|
848
|
+
# Simulate a bank connection event (sandbox)
|
|
849
|
+
#
|
|
850
|
+
# Moves a sandbox connection through time without waiting: new transactions, a pending row that posts, a consent
|
|
851
|
+
# that is about to end or has ended, a revocation, a failing sync, a duplicate webhook or a used-up refresh
|
|
852
|
+
# allowance. It uses the real sync engine and the real webhooks, so `bank.*` deliveries, the change feed and
|
|
853
|
+
# `sync` behave as they do for a real bank. Answers the connection as `get_connection` would.
|
|
854
|
+
#
|
|
855
|
+
# `action` is required and is one of:
|
|
856
|
+
#
|
|
857
|
+
# - `new_transactions`: the bank adds `count` booked transactions (1 to 500, default 3). A sync follows.
|
|
858
|
+
# - `pending_posted`: one day passes at the bank: pending rows leave the change feed as `removed` and their
|
|
859
|
+
# booked rows arrive as `added`. It needs a test customer with pending transactions (`pending`); with
|
|
860
|
+
# `personal_basic` nothing changes. A sync follows.
|
|
861
|
+
# - `booking_correction`: the next sync returns booked rows again with a corrected booking, so they arrive as
|
|
862
|
+
# `modified`. A sync follows.
|
|
863
|
+
# - `midnight_booking`: a row is booked across midnight, to test day boundaries. A sync follows.
|
|
864
|
+
# - `consent_expiring`: the consent now ends in `days` days and the expiry notice is sent
|
|
865
|
+
# (`bank.connection.consent_expiring`). `days` accepts only the notification thresholds, 14, 7 or 1 (default
|
|
866
|
+
# 7); any other value answers `400 invalid_request` with `field` `days`.
|
|
867
|
+
# - `consent_expired`: the consent has ended now and the connection becomes `renewal_required`.
|
|
868
|
+
# - `revoked_by_user` and `revoked_by_bank`: the bank tells Didit the consent ended, as if the person or the
|
|
869
|
+
# bank had revoked it. The connection reads `revoked` with `status_reason` `revoked_by_end_user` or
|
|
870
|
+
# `revoked_by_bank`, and `consent.ended_by` is `end_user` or `bank`.
|
|
871
|
+
# - `sync_failed`: the bank fails every read until `sync_recovered`; the connection has been failing for 24
|
|
872
|
+
# hours, so `bank.sync.failed` is sent. A sync follows.
|
|
873
|
+
# - `sync_recovered`: the bank answers again. A sync follows.
|
|
874
|
+
# - `webhook_twice`: the last `bank.*` webhook of this connection is delivered again with the same `event_id`
|
|
875
|
+
# and a fresh signature, to test your deduplication. It answers `400 invalid_request` if the connection has no
|
|
876
|
+
# delivery yet.
|
|
877
|
+
# - `budget_used`: today's refresh allowance is used up on the bank's own day, so the next `refresh_connection`
|
|
878
|
+
# answers `429 refresh_limit_reached` with `Retry-After`, and `sync.live_syncs_left_today` and the
|
|
879
|
+
# `sync.budgets` `remaining` read 0.
|
|
880
|
+
# - `budget_reset`: today's refresh allowance is restored: `sync.live_syncs_left_today` and the `remaining` of
|
|
881
|
+
# `sync.budgets` read what they read on a new connection.
|
|
882
|
+
#
|
|
883
|
+
# `days` is only accepted with `consent_expiring` and `count` only with `new_transactions`: sent with another
|
|
884
|
+
# action, each answers `400 invalid_request` with `field` naming it.
|
|
885
|
+
#
|
|
886
|
+
# Needs an API key with the Bank data permission (`bank-data`): write for this operation, which changes
|
|
887
|
+
# something. A key with full access does not include it: grant it explicitly when you create the key, or the
|
|
888
|
+
# call answers `403 bank_data_access_denied`. Sandbox only: a live application, or a link or connection that
|
|
889
|
+
# belongs to the live environment, answers `404 not_found`, exactly as an unknown route does.
|
|
890
|
+
#
|
|
891
|
+
# +POST /v3/bank/connections/{id}/simulate/+
|
|
892
|
+
#
|
|
893
|
+
# @param id [String] The connection id.
|
|
894
|
+
# @param action [String] What happens. The operation description explains each value.
|
|
895
|
+
# @param days [Integer] Only for `consent_expiring`: days until the consent ends. Only the notification
|
|
896
|
+
# thresholds are accepted: 14, 7 or 1. Any other value, or `days` with another action, answers `400
|
|
897
|
+
# invalid_request` with `field` `days`.
|
|
898
|
+
# @param count [Integer] Only for `new_transactions`: how many booked transactions the bank adds. With another
|
|
899
|
+
# action it answers `400 invalid_request` with `field` `count`.
|
|
900
|
+
# @param idempotency_key [String] sent as the Idempotency-Key header
|
|
901
|
+
# @param request_options [Hash, nil] :timeout, :max_retries, :extra_headers, :extra_query, :extra_body
|
|
902
|
+
# @return [Didit::Types::BankConnection]
|
|
903
|
+
def simulate_connection(id, action:, days: OMIT, count: OMIT, idempotency_key: OMIT, request_options: nil)
|
|
904
|
+
@client.request(
|
|
905
|
+
:post,
|
|
906
|
+
"/v3/bank/connections/{id}/simulate/",
|
|
907
|
+
path_params: { "id" => id },
|
|
908
|
+
body: {
|
|
909
|
+
"action" => action,
|
|
910
|
+
"days" => days,
|
|
911
|
+
"count" => count
|
|
912
|
+
},
|
|
913
|
+
headers: { "Idempotency-Key" => idempotency_key },
|
|
914
|
+
response: Types::BankConnection,
|
|
915
|
+
request_options: request_options
|
|
916
|
+
)
|
|
917
|
+
end
|
|
918
|
+
|
|
919
|
+
# Simulate a bank link (sandbox)
|
|
920
|
+
#
|
|
921
|
+
# Finishes a link of your sandbox application in one call, as if the person had gone through the Didit Test
|
|
922
|
+
# Bank: you choose the Test Bank customer (`persona`) and how the link ends (`outcome`). The link goes through
|
|
923
|
+
# the same completion code as a real bank sign-in, so the connection, its accounts, the first sync and the
|
|
924
|
+
# `bank.*` webhooks happen exactly as they would for a real person. Answers the link, so read `status` and
|
|
925
|
+
# `connection_id`.
|
|
926
|
+
#
|
|
927
|
+
# `outcome` is `completed` (the default: the person agrees and the connection is created), `cancelled` (the
|
|
928
|
+
# person leaves, the link ends `cancelled`), `failed` (the link ends `failed`; `error_code` picks the reason,
|
|
929
|
+
# `bank_unavailable` by default), `duplicate_conflict` (the person already has a connection with the same bank),
|
|
930
|
+
# `reduced_grant` (the person shares less than you asked for) or `renewal_login_mismatch` (a renewal with
|
|
931
|
+
# another bank login; on a connect link it ends as the failure it is). `error_code` is only accepted with
|
|
932
|
+
# `outcome: failed`.
|
|
933
|
+
#
|
|
934
|
+
# A link that allows the one-time fallback and meets a bank that cannot keep access open accepts the reduced
|
|
935
|
+
# access and finishes in the same call. A link that is no longer open (completed, cancelled, expired or failed)
|
|
936
|
+
# is returned unchanged, so the call is safe to repeat.
|
|
937
|
+
#
|
|
938
|
+
# Needs an API key with the Bank data permission (`bank-data`): write for this operation, which changes
|
|
939
|
+
# something. A key with full access does not include it: grant it explicitly when you create the key, or the
|
|
940
|
+
# call answers `403 bank_data_access_denied`. Sandbox only: a live application, or a link or connection that
|
|
941
|
+
# belongs to the live environment, answers `404 not_found`, exactly as an unknown route does.
|
|
942
|
+
#
|
|
943
|
+
# +POST /v3/bank/links/{id}/simulate/+
|
|
944
|
+
#
|
|
945
|
+
# @param id [String] The link id.
|
|
946
|
+
# @param persona [String] The Test Bank customer who signs in: `personal_basic` (one current account),
|
|
947
|
+
# `business_multi` (several business accounts), `long_history` (a long transaction history), `pending` (pending
|
|
948
|
+
# rows), `sparse_fields` (transactions with fields missing, one automatic sync a day) or `no_ongoing` (a bank
|
|
949
|
+
# that cannot keep access open).
|
|
950
|
+
# @param outcome [String] How the link ends.
|
|
951
|
+
# @param error_code [String] The failure the link records. Only accepted with `outcome: failed`, where it
|
|
952
|
+
# defaults to `bank_unavailable`.
|
|
953
|
+
# @param idempotency_key [String] sent as the Idempotency-Key header
|
|
954
|
+
# @param request_options [Hash, nil] :timeout, :max_retries, :extra_headers, :extra_query, :extra_body
|
|
955
|
+
# @return [Didit::Types::BankLink]
|
|
956
|
+
def simulate_link(id, persona: OMIT, outcome: OMIT, error_code: OMIT, idempotency_key: OMIT, request_options: nil)
|
|
957
|
+
@client.request(
|
|
958
|
+
:post,
|
|
959
|
+
"/v3/bank/links/{id}/simulate/",
|
|
960
|
+
path_params: { "id" => id },
|
|
961
|
+
body: {
|
|
962
|
+
"persona" => persona,
|
|
963
|
+
"outcome" => outcome,
|
|
964
|
+
"error_code" => error_code
|
|
965
|
+
},
|
|
966
|
+
headers: { "Idempotency-Key" => idempotency_key },
|
|
967
|
+
response: Types::BankLink,
|
|
968
|
+
request_options: request_options
|
|
969
|
+
)
|
|
970
|
+
end
|
|
971
|
+
|
|
842
972
|
# Sync transactions (change feed)
|
|
843
973
|
#
|
|
844
974
|
# Returns what changed in a connection's transactions since a `cursor`: `added`, `modified` and `removed` (with
|
|
@@ -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
|
#
|