didit-sdk 2.20.1 → 2.22.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.
Files changed (81) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +14 -0
  3. data/lib/didit/resources/address_validation.rb +3 -0
  4. data/lib/didit/resources/age_estimation.rb +3 -0
  5. data/lib/didit/resources/bank.rb +14 -3
  6. data/lib/didit/resources/biometric_templates.rb +6 -1
  7. data/lib/didit/resources/blocklist.rb +6 -0
  8. data/lib/didit/resources/businesses.rb +29 -3
  9. data/lib/didit/resources/cases.rb +204 -35
  10. data/lib/didit/resources/customization.rb +3 -0
  11. data/lib/didit/resources/database_validation.rb +3 -0
  12. data/lib/didit/resources/document_ai.rb +3 -0
  13. data/lib/didit/resources/email.rb +17 -1
  14. data/lib/didit/resources/face_match.rb +3 -0
  15. data/lib/didit/resources/face_search.rb +3 -0
  16. data/lib/didit/resources/fraud_checks.rb +6 -0
  17. data/lib/didit/resources/id_verification.rb +3 -0
  18. data/lib/didit/resources/id_wallets.rb +13 -8
  19. data/lib/didit/resources/investigator.rb +12 -2
  20. data/lib/didit/resources/ip.rb +3 -0
  21. data/lib/didit/resources/kyb.rb +26 -2
  22. data/lib/didit/resources/lists.rb +18 -5
  23. data/lib/didit/resources/monitoring_events.rb +12 -2
  24. data/lib/didit/resources/networks.rb +12 -4
  25. data/lib/didit/resources/passive_liveness.rb +3 -0
  26. data/lib/didit/resources/phone.rb +9 -0
  27. data/lib/didit/resources/proof_of_address.rb +3 -0
  28. data/lib/didit/resources/questionnaires.rb +9 -1
  29. data/lib/didit/resources/regulatory_reports.rb +15 -3
  30. data/lib/didit/resources/report_templates.rb +9 -2
  31. data/lib/didit/resources/reports.rb +3 -0
  32. data/lib/didit/resources/sessions.rb +170 -29
  33. data/lib/didit/resources/transactions.rb +51 -8
  34. data/lib/didit/resources/travel_rule.rb +115 -24
  35. data/lib/didit/resources/users.rb +23 -3
  36. data/lib/didit/resources/wallet_screening.rb +3 -1
  37. data/lib/didit/resources/webhooks.rb +23 -3
  38. data/lib/didit/resources/workflows.rb +11 -3
  39. data/lib/didit/types/components.rb +30 -1
  40. data/lib/didit/types/sessions.rb +22 -0
  41. data/lib/didit/types.rb +3 -0
  42. data/lib/didit/version.rb +1 -1
  43. data/sig/didit/resources/address_validation.rbs +1 -1
  44. data/sig/didit/resources/age_estimation.rbs +1 -1
  45. data/sig/didit/resources/bank.rbs +1 -1
  46. data/sig/didit/resources/biometric_templates.rbs +2 -2
  47. data/sig/didit/resources/blocklist.rbs +2 -2
  48. data/sig/didit/resources/businesses.rbs +7 -7
  49. data/sig/didit/resources/cases.rbs +44 -44
  50. data/sig/didit/resources/customization.rbs +1 -1
  51. data/sig/didit/resources/database_validation.rbs +1 -1
  52. data/sig/didit/resources/document_ai.rbs +1 -1
  53. data/sig/didit/resources/email.rbs +3 -3
  54. data/sig/didit/resources/face_match.rbs +1 -1
  55. data/sig/didit/resources/face_search.rbs +1 -1
  56. data/sig/didit/resources/fraud_checks.rbs +2 -2
  57. data/sig/didit/resources/id_verification.rbs +1 -1
  58. data/sig/didit/resources/id_wallets.rbs +3 -3
  59. data/sig/didit/resources/investigator.rbs +4 -4
  60. data/sig/didit/resources/ip.rbs +1 -1
  61. data/sig/didit/resources/kyb.rbs +4 -4
  62. data/sig/didit/resources/lists.rbs +6 -6
  63. data/sig/didit/resources/monitoring_events.rbs +4 -4
  64. data/sig/didit/resources/networks.rbs +4 -4
  65. data/sig/didit/resources/passive_liveness.rbs +1 -1
  66. data/sig/didit/resources/phone.rbs +3 -3
  67. data/sig/didit/resources/proof_of_address.rbs +1 -1
  68. data/sig/didit/resources/questionnaires.rbs +3 -3
  69. data/sig/didit/resources/regulatory_reports.rbs +5 -5
  70. data/sig/didit/resources/report_templates.rbs +3 -3
  71. data/sig/didit/resources/reports.rbs +1 -1
  72. data/sig/didit/resources/sessions.rbs +39 -39
  73. data/sig/didit/resources/transactions.rbs +15 -15
  74. data/sig/didit/resources/travel_rule.rbs +33 -33
  75. data/sig/didit/resources/users.rbs +7 -7
  76. data/sig/didit/resources/wallet_screening.rbs +1 -1
  77. data/sig/didit/resources/webhooks.rbs +5 -5
  78. data/sig/didit/resources/workflows.rbs +3 -3
  79. data/sig/didit/types/components.rbs +20 -0
  80. data/sig/didit/types/sessions.rbs +21 -0
  81. metadata +1 -1
@@ -48,9 +48,10 @@ module Didit
48
48
  # result.
49
49
  # @param file_password [String] Password of an encrypted PDF. Without it, or with a wrong one, an encrypted PDF
50
50
  # returns `400`.
51
+ # @param idempotency_key [String] sent as the Idempotency-Key header
51
52
  # @param request_options [Hash, nil] :timeout, :max_retries, :extra_headers, :extra_query, :extra_body
52
53
  # @return [Didit::Types::SessionsAddImagesResponse]
53
- def add_images(session_id, file:, model_type:, file_password: OMIT, request_options: nil)
54
+ def add_images(session_id, file:, model_type:, file_password: OMIT, idempotency_key: OMIT, request_options: nil)
54
55
  @client.request(
55
56
  :patch,
56
57
  "/v3/session/{sessionId}/add-images/",
@@ -62,6 +63,7 @@ module Didit
62
63
  },
63
64
  encoding: :multipart,
64
65
  file_fields: %w[file],
66
+ headers: { "Idempotency-Key" => idempotency_key },
65
67
  response: Types::SessionsAddImagesResponse,
66
68
  request_options: request_options
67
69
  )
@@ -242,6 +244,7 @@ module Didit
242
244
  # comma-separated string or an array. With an API key it can only match your own organization's name, so it
243
245
  # selects all of your sessions or none. Ignored without `delete_all`. An empty value is ignored and does not
244
246
  # narrow the selection.
247
+ # @param idempotency_key [String] sent as the Idempotency-Key header
245
248
  # @param request_options [Hash, nil] :timeout, :max_retries, :extra_headers, :extra_query, :extra_body
246
249
  # @return [Didit::Types::SessionsBatchDeleteResponse, Didit::Types::SessionDeletionJob]
247
250
  def batch_delete(
@@ -271,6 +274,7 @@ module Didit
271
274
  filter_is_kyc_to_be_reviewed: OMIT,
272
275
  filter_euuid: OMIT,
273
276
  filter_organization_name: OMIT,
277
+ idempotency_key: OMIT,
274
278
  request_options: nil
275
279
  )
276
280
  @client.request(
@@ -304,6 +308,7 @@ module Didit
304
308
  "filter_euuid" => filter_euuid,
305
309
  "filter_organization_name" => filter_organization_name
306
310
  },
311
+ headers: { "Idempotency-Key" => idempotency_key },
307
312
  response: { 200 => Types::SessionsBatchDeleteResponse, 202 => Types::SessionDeletionJob },
308
313
  request_options: request_options
309
314
  )
@@ -331,9 +336,17 @@ module Didit
331
336
  # multiple AML checks.
332
337
  # @param node_id_query [String] Workflow graph node ID. Required only when the session has multiple AML checks
333
338
  # (one per node); omit it for single-AML sessions.
339
+ # @param idempotency_key [String] sent as the Idempotency-Key header
334
340
  # @param request_options [Hash, nil] :timeout, :max_retries, :extra_headers, :extra_query, :extra_body
335
341
  # @return [Didit::Types::SessionsBulkUpdateAmlHitStatusResponse]
336
- def bulk_update_aml_hit_status(session_id, hit_updates:, node_id: OMIT, node_id_query: OMIT, request_options: nil)
342
+ def bulk_update_aml_hit_status(
343
+ session_id,
344
+ hit_updates:,
345
+ node_id: OMIT,
346
+ node_id_query: OMIT,
347
+ idempotency_key: OMIT,
348
+ request_options: nil
349
+ )
337
350
  @client.request(
338
351
  :patch,
339
352
  "/v3/session/{sessionId}/bulk-update-aml-hit-status/",
@@ -345,6 +358,7 @@ module Didit
345
358
  "hit_updates" => hit_updates,
346
359
  "node_id" => node_id
347
360
  },
361
+ headers: { "Idempotency-Key" => idempotency_key },
348
362
  response: Types::SessionsBulkUpdateAmlHitStatusResponse,
349
363
  request_options: request_options
350
364
  )
@@ -368,13 +382,15 @@ module Didit
368
382
  # @param session_id [String] UUID of the verification session. Accepts both user (KYC) and business (KYB)
369
383
  # session IDs.
370
384
  # @param override_id [String] The `id` of the override to cancel.
385
+ # @param idempotency_key [String] sent as the Idempotency-Key header
371
386
  # @param request_options [Hash, nil] :timeout, :max_retries, :extra_headers, :extra_query, :extra_body
372
387
  # @return [Didit::Types::FeatureStatusOverride]
373
- def cancel_feature_override(session_id, override_id, request_options: nil)
388
+ def cancel_feature_override(session_id, override_id, idempotency_key: OMIT, request_options: nil)
374
389
  @client.request(
375
390
  :post,
376
391
  "/v3/session/{sessionId}/features/overrides/{overrideId}/cancel/",
377
392
  path_params: { "sessionId" => session_id, "overrideId" => override_id },
393
+ headers: { "Idempotency-Key" => idempotency_key },
378
394
  response: Types::FeatureStatusOverride,
379
395
  request_options: request_options
380
396
  )
@@ -473,6 +489,7 @@ module Didit
473
489
  # the requirement, so the verification flow does not ask again, and the decision records it as `status: "given"`
474
490
  # with trigger `customer_collected`. An answer the person already gave in the flow is never replaced. See
475
491
  # [Biometric consent](/getting-started/biometric-consent).
492
+ # @param idempotency_key [String] sent as the Idempotency-Key header
476
493
  # @param request_options [Hash, nil] :timeout, :max_retries, :extra_headers, :extra_query, :extra_body
477
494
  # @return [Didit::Types::SessionsCreateResponse]
478
495
  def create(
@@ -492,6 +509,7 @@ module Didit
492
509
  sign: OMIT,
493
510
  user_state: OMIT,
494
511
  biometric_consent: OMIT,
512
+ idempotency_key: OMIT,
495
513
  request_options: nil
496
514
  )
497
515
  @client.request(
@@ -515,6 +533,7 @@ module Didit
515
533
  "user_state" => user_state,
516
534
  "biometric_consent" => biometric_consent
517
535
  },
536
+ headers: { "Idempotency-Key" => idempotency_key },
518
537
  response: Types::SessionsCreateResponse,
519
538
  request_options: request_options
520
539
  )
@@ -553,6 +572,7 @@ module Didit
553
572
  # allows skipping in the workflow's Key People settings.
554
573
  # @param node_id [String] Workflow node of the KYB step. Only needed when the workflow has more than one KYB
555
574
  # node; by default Didit uses the session's own node.
575
+ # @param idempotency_key [String] sent as the Idempotency-Key header
556
576
  # @param request_options [Hash, nil] :timeout, :max_retries, :extra_headers, :extra_query, :extra_body
557
577
  # @return [Didit::Types::SessionsCreateKybPartyDraftResponse]
558
578
  def create_kyb_party_draft(
@@ -574,6 +594,7 @@ module Didit
574
594
  custom_fields: OMIT,
575
595
  skip_verification: OMIT,
576
596
  node_id: OMIT,
597
+ idempotency_key: OMIT,
577
598
  request_options: nil
578
599
  )
579
600
  @client.request(
@@ -601,6 +622,7 @@ module Didit
601
622
  "custom_fields" => custom_fields,
602
623
  "skip_verification" => skip_verification
603
624
  },
625
+ headers: { "Idempotency-Key" => idempotency_key },
604
626
  response: Types::SessionsCreateKybPartyDraftResponse,
605
627
  request_options: request_options
606
628
  )
@@ -663,9 +685,9 @@ module Didit
663
685
  # `deleted_child_verifications`. Earlier versions of this endpoint returned `204 No Content`; update clients
664
686
  # that assert on `204`. Keep your `instruction_id` in your own erasure log.
665
687
  #
666
- # **Idempotency:** not idempotent at the HTTP level: the first call returns `200`; repeating it returns `404`
667
- # because the session no longer resolves. After a `503` the session is still in place; repeat the same request
668
- # to finish deleting it.
688
+ # **Idempotency:** without an `Idempotency-Key`, repeating a delete returns `404` because the session no longer
689
+ # resolves; with the same key, a repeat of a successful delete returns the first `200` response. After a `503`
690
+ # the session is still in place; repeat the same request to finish deleting it.
669
691
  #
670
692
  # **Authentication:** send your application's API key in the `x-api-key` header; the session must belong to that
671
693
  # application. Console user access tokens (`Authorization: Bearer ...`) may also call this endpoint when they
@@ -703,6 +725,7 @@ module Didit
703
725
  # true` (`...
704
726
  # @param instruction_id [String] Your durable reference for this deletion instruction (for example an
705
727
  # erasure-ticket id). Recorded on the audit trail and on any retained template. Generated by Didit when omitted.
728
+ # @param idempotency_key [String] sent as the Idempotency-Key header
706
729
  # @param request_options [Hash, nil] :timeout, :max_retries, :extra_headers, :extra_query, :extra_body
707
730
  # @return [Didit::Types::SessionsDeleteResponse]
708
731
  def delete(
@@ -712,6 +735,7 @@ module Didit
712
735
  face_retention_deadline: OMIT,
713
736
  deletion_instruction: OMIT,
714
737
  instruction_id: OMIT,
738
+ idempotency_key: OMIT,
715
739
  request_options: nil
716
740
  )
717
741
  @client.request(
@@ -725,6 +749,7 @@ module Didit
725
749
  "deletion_instruction" => deletion_instruction,
726
750
  "instruction_id" => instruction_id
727
751
  },
752
+ headers: { "Idempotency-Key" => idempotency_key },
728
753
  response: Types::SessionsDeleteResponse,
729
754
  request_options: request_options
730
755
  )
@@ -741,9 +766,10 @@ module Didit
741
766
  # @param draft_id [String] UUID of the party draft (`draft_id` returned when it was created).
742
767
  # @param node_id [String] Workflow node of the KYB step. Only needed when the workflow has more than one KYB
743
768
  # node; by default Didit uses the session's own node.
769
+ # @param idempotency_key [String] sent as the Idempotency-Key header
744
770
  # @param request_options [Hash, nil] :timeout, :max_retries, :extra_headers, :extra_query, :extra_body
745
771
  # @return [nil]
746
- def delete_kyb_party_draft(session_id, draft_id, node_id: OMIT, request_options: nil)
772
+ def delete_kyb_party_draft(session_id, draft_id, node_id: OMIT, idempotency_key: OMIT, request_options: nil)
747
773
  @client.request(
748
774
  :delete,
749
775
  "/v3/session/{sessionId}/kyb/parties/drafts/{draftId}/",
@@ -751,6 +777,7 @@ module Didit
751
777
  query: {
752
778
  "node_id" => node_id
753
779
  },
780
+ headers: { "Idempotency-Key" => idempotency_key },
754
781
  request_options: request_options
755
782
  )
756
783
  end
@@ -809,13 +836,15 @@ module Didit
809
836
  # @param session_id [String] UUID of the verification session (the `session_id` returned by `POST
810
837
  # /v3/session/`). Accepts both User Verification (KYC) and Business Verification (KYB) session IDs. A deleted
811
838
  # session returns `404`.
839
+ # @param idempotency_key [String] sent as the Idempotency-Key header
812
840
  # @param request_options [Hash, nil] :timeout, :max_retries, :extra_headers, :extra_query, :extra_body
813
841
  # @return [Didit::Types::SessionFilesExport]
814
- def export_files(session_id, request_options: nil)
842
+ def export_files(session_id, idempotency_key: OMIT, request_options: nil)
815
843
  @client.request(
816
844
  :post,
817
845
  "/v3/session/{sessionId}/files-export/",
818
846
  path_params: { "sessionId" => session_id },
847
+ headers: { "Idempotency-Key" => idempotency_key },
819
848
  response: Types::SessionFilesExport,
820
849
  request_options: request_options
821
850
  )
@@ -846,8 +875,10 @@ module Didit
846
875
  # followed by tags and review activity.
847
876
  #
848
877
  # **Branding.** If your application has white-label customization, the report is rendered with your logo and
849
- # links to your privacy-policy URL; otherwise it carries Didit branding. Reports are rendered in English - there
850
- # is no language parameter.
878
+ # links to your privacy-policy URL; otherwise it carries Didit branding. Reports are rendered in English by
879
+ # default; pass the `language` query parameter to print every word the report writes itself (section titles,
880
+ # labels, statuses, check names, notes, footers, dates and country names) in one of 16 languages, while values
881
+ # the end user submitted or a source returned print exactly as captured.
851
882
  #
852
883
  # **No caching.** Every call re-renders the PDF from the current session data, so a report generated after a
853
884
  # manual review reflects the reviewer’s decision. Two calls for the same session can produce byte-different
@@ -872,13 +903,20 @@ module Didit
872
903
  # `Content-Disposition` filename on the response to tell which report type you received. **Must be a
873
904
  # well-formed, lowercase UUID.** The route only matches valid UUIDs, so a malformed value is rejected by the
874
905
  # URL...
906
+ # @param language [String] Language of the report. Every word the report writes itself prints in this language:
907
+ # section titles, labels, table headers, statuses, check names and descriptions, notes, footers, page numbering,
908
+ # the cover, the PDF outline, dates (month names and order per language) and country names. What the end user
909
+ # submitted or a source returned (names, addresses, document fields, OCR values, watchlist profil...
875
910
  # @param request_options [Hash, nil] :timeout, :max_retries, :extra_headers, :extra_query, :extra_body
876
911
  # @return [String, nil] the body bytes, or nil when a block receives the chunks
877
- def generate_pdf(session_id, request_options: nil, &block)
912
+ def generate_pdf(session_id, language: OMIT, request_options: nil, &block)
878
913
  @client.request(
879
914
  :get,
880
915
  "/v3/session/{sessionId}/generate-pdf/",
881
916
  path_params: { "sessionId" => session_id },
917
+ query: {
918
+ "language" => language
919
+ },
882
920
  response: :binary,
883
921
  accept: "application/pdf, application/json",
884
922
  request_options: request_options, &block
@@ -912,8 +950,9 @@ module Didit
912
950
 
913
951
  # Redeem a share token to clone a verification session into your application
914
952
  #
915
- # Redeem a share token to clone a KYC or KYB session into the calling application with a fresh `session_id`. Not
916
- # idempotent - a token redeems once per receiver.
953
+ # Redeem a share token to clone a KYC or KYB session into the calling application with a fresh `session_id`.
954
+ # Without an `Idempotency-Key` a token redeems once per receiver; repeat it with the same key to get the first
955
+ # response back.
917
956
  #
918
957
  # +POST /v3/session/import-shared/+
919
958
  #
@@ -924,9 +963,17 @@ module Didit
924
963
  # @param workflow_id [String] UUID of a workflow in the calling application. Cross-application IDs are rejected
925
964
  # with `404`.
926
965
  # @param vendor_data [String, nil] Optional override for the cloned session's `vendor_data`.
966
+ # @param idempotency_key [String] sent as the Idempotency-Key header
927
967
  # @param request_options [Hash, nil] :timeout, :max_retries, :extra_headers, :extra_query, :extra_body
928
968
  # @return [Didit::Types::SessionDecision]
929
- def import_shared(share_token:, trust_review:, workflow_id:, vendor_data: OMIT, request_options: nil)
969
+ def import_shared(
970
+ share_token:,
971
+ trust_review:,
972
+ workflow_id:,
973
+ vendor_data: OMIT,
974
+ idempotency_key: OMIT,
975
+ request_options: nil
976
+ )
930
977
  @client.request(
931
978
  :post,
932
979
  "/v3/session/import-shared/",
@@ -936,6 +983,7 @@ module Didit
936
983
  "workflow_id" => workflow_id,
937
984
  "vendor_data" => vendor_data
938
985
  },
986
+ headers: { "Idempotency-Key" => idempotency_key },
939
987
  response: Types::SessionDecision,
940
988
  request_options: request_options
941
989
  )
@@ -1355,9 +1403,16 @@ module Didit
1355
1403
  # @param new_status [String] The decision whose email you want to preview.
1356
1404
  # @param email_language [String] Language of the email, the same default as Update Session Status. A language
1357
1405
  # that is not offered falls back to English; `language` in the response says which one is used.
1406
+ # @param idempotency_key [String] sent as the Idempotency-Key header
1358
1407
  # @param request_options [Hash, nil] :timeout, :max_retries, :extra_headers, :extra_query, :extra_body
1359
1408
  # @return [Didit::Types::SessionsPreviewDecisionEmailResponse]
1360
- def preview_decision_email(session_id, new_status:, email_language: OMIT, request_options: nil)
1409
+ def preview_decision_email(
1410
+ session_id,
1411
+ new_status:,
1412
+ email_language: OMIT,
1413
+ idempotency_key: OMIT,
1414
+ request_options: nil
1415
+ )
1361
1416
  @client.request(
1362
1417
  :post,
1363
1418
  "/v3/session/{sessionId}/decision-email-preview/",
@@ -1366,6 +1421,7 @@ module Didit
1366
1421
  "new_status" => new_status,
1367
1422
  "email_language" => email_language
1368
1423
  },
1424
+ headers: { "Idempotency-Key" => idempotency_key },
1369
1425
  response: Types::SessionsPreviewDecisionEmailResponse,
1370
1426
  request_options: request_options
1371
1427
  )
@@ -1410,6 +1466,7 @@ module Didit
1410
1466
  # email is sent by this call.
1411
1467
  # @param email_language [String] Language for the notification email. Accepts any string at schema level;
1412
1468
  # unsupported codes silently fall back to English (`en`).
1469
+ # @param idempotency_key [String] sent as the Idempotency-Key header
1413
1470
  # @param request_options [Hash, nil] :timeout, :max_retries, :extra_headers, :extra_query, :extra_body
1414
1471
  # @return [Didit::Types::SessionsPreviewResubmissionResponse]
1415
1472
  def preview_resubmission(
@@ -1417,6 +1474,7 @@ module Didit
1417
1474
  nodes_to_resubmit: OMIT,
1418
1475
  email_address: OMIT,
1419
1476
  email_language: OMIT,
1477
+ idempotency_key: OMIT,
1420
1478
  request_options: nil
1421
1479
  )
1422
1480
  @client.request(
@@ -1428,6 +1486,7 @@ module Didit
1428
1486
  "email_address" => email_address,
1429
1487
  "email_language" => email_language
1430
1488
  },
1489
+ headers: { "Idempotency-Key" => idempotency_key },
1431
1490
  response: Types::SessionsPreviewResubmissionResponse,
1432
1491
  request_options: request_options
1433
1492
  )
@@ -1457,13 +1516,15 @@ module Didit
1457
1516
  # @param session_id [String] UUID of the parent Business Verification (KYB) session.
1458
1517
  # @param party_uuid [String] UUID of the Key People party (`key_people_checks[].submitted.parties[].uuid` on the
1459
1518
  # business session decision). Must belong to the session referenced by `sessionId`.
1519
+ # @param idempotency_key [String] sent as the Idempotency-Key header
1460
1520
  # @param request_options [Hash, nil] :timeout, :max_retries, :extra_headers, :extra_query, :extra_body
1461
1521
  # @return [Didit::Types::KYBKeyPeopleParty]
1462
- def regenerate_kyb_party(session_id, party_uuid, request_options: nil)
1522
+ def regenerate_kyb_party(session_id, party_uuid, idempotency_key: OMIT, request_options: nil)
1463
1523
  @client.request(
1464
1524
  :post,
1465
1525
  "/v3/session/{sessionId}/kyb/parties/{partyUuid}/regenerate/",
1466
1526
  path_params: { "sessionId" => session_id, "partyUuid" => party_uuid },
1527
+ headers: { "Idempotency-Key" => idempotency_key },
1467
1528
  response: Types::KYBKeyPeopleParty,
1468
1529
  request_options: request_options
1469
1530
  )
@@ -1575,9 +1636,10 @@ module Didit
1575
1636
  # → Application**.
1576
1637
  # @param ttl_in_seconds [Integer] Token lifetime, in seconds. Minimum `60`, maximum `86400` (24 h). Defaults to
1577
1638
  # `3600` (1 h).
1639
+ # @param idempotency_key [String] sent as the Idempotency-Key header
1578
1640
  # @param request_options [Hash, nil] :timeout, :max_retries, :extra_headers, :extra_query, :extra_body
1579
1641
  # @return [Didit::Types::SessionsShareResponse]
1580
- def share(session_id, for_application_id:, ttl_in_seconds: OMIT, request_options: nil)
1642
+ def share(session_id, for_application_id:, ttl_in_seconds: OMIT, idempotency_key: OMIT, request_options: nil)
1581
1643
  @client.request(
1582
1644
  :post,
1583
1645
  "/v3/session/{sessionId}/share/",
@@ -1586,6 +1648,7 @@ module Didit
1586
1648
  "for_application_id" => for_application_id,
1587
1649
  "ttl_in_seconds" => ttl_in_seconds
1588
1650
  },
1651
+ headers: { "Idempotency-Key" => idempotency_key },
1589
1652
  response: Types::SessionsShareResponse,
1590
1653
  request_options: request_options
1591
1654
  )
@@ -1629,6 +1692,7 @@ module Didit
1629
1692
  # `business.status.updated` / `business.data.updated`) events the change causes, for destinations subscribed to
1630
1693
  # them. `false` changes the status without logging or sending any webhook: the missed-webhook recovery never
1631
1694
  # re-...
1695
+ # @param idempotency_key [String] sent as the Idempotency-Key header
1632
1696
  # @param request_options [Hash, nil] :timeout, :max_retries, :extra_headers, :extra_query, :extra_body
1633
1697
  # @return [Didit::Types::SandboxSimulateResponse]
1634
1698
  def simulate(
@@ -1639,6 +1703,7 @@ module Didit
1639
1703
  risk: OMIT,
1640
1704
  node_id: OMIT,
1641
1705
  send_webhooks: OMIT,
1706
+ idempotency_key: OMIT,
1642
1707
  request_options: nil
1643
1708
  )
1644
1709
  @client.request(
@@ -1653,6 +1718,7 @@ module Didit
1653
1718
  "node_id" => node_id,
1654
1719
  "send_webhooks" => send_webhooks
1655
1720
  },
1721
+ headers: { "Idempotency-Key" => idempotency_key },
1656
1722
  response: Types::SandboxSimulateResponse,
1657
1723
  request_options: request_options
1658
1724
  )
@@ -1675,9 +1741,10 @@ module Didit
1675
1741
  # @param locale [String] Locale used to translate the response of the step the session advances to.
1676
1742
  # @param node_id [String] Workflow node of the KYB step. Only needed when the workflow has more than one KYB
1677
1743
  # node; by default Didit uses the session's own node.
1744
+ # @param idempotency_key [String] sent as the Idempotency-Key header
1678
1745
  # @param request_options [Hash, nil] :timeout, :max_retries, :extra_headers, :extra_query, :extra_body
1679
1746
  # @return [Didit::Types::SessionsSubmitKybPartiesResponse]
1680
- def submit_kyb_parties(session_id, locale: OMIT, node_id: OMIT, request_options: nil)
1747
+ def submit_kyb_parties(session_id, locale: OMIT, node_id: OMIT, idempotency_key: OMIT, request_options: nil)
1681
1748
  @client.request(
1682
1749
  :post,
1683
1750
  "/v3/session/{sessionId}/kyb/parties/submit/",
@@ -1688,6 +1755,7 @@ module Didit
1688
1755
  body: {
1689
1756
  "locale" => locale
1690
1757
  },
1758
+ headers: { "Idempotency-Key" => idempotency_key },
1691
1759
  response: Types::SessionsSubmitKybPartiesResponse,
1692
1760
  request_options: request_options
1693
1761
  )
@@ -1722,6 +1790,7 @@ module Didit
1722
1790
  # multiple AML checks.
1723
1791
  # @param node_id_query [String] Workflow graph node ID. Required only when the session has multiple AML checks
1724
1792
  # (one per node); omit it for single-AML sessions.
1793
+ # @param idempotency_key [String] sent as the Idempotency-Key header
1725
1794
  # @param request_options [Hash, nil] :timeout, :max_retries, :extra_headers, :extra_query, :extra_body
1726
1795
  # @return [Didit::Types::SessionsUpdateAmlHitStatusResponse]
1727
1796
  def update_aml_hit_status(
@@ -1730,6 +1799,7 @@ module Didit
1730
1799
  review_status:,
1731
1800
  node_id: OMIT,
1732
1801
  node_id_query: OMIT,
1802
+ idempotency_key: OMIT,
1733
1803
  request_options: nil
1734
1804
  )
1735
1805
  @client.request(
@@ -1744,6 +1814,7 @@ module Didit
1744
1814
  "review_status" => review_status,
1745
1815
  "node_id" => node_id
1746
1816
  },
1817
+ headers: { "Idempotency-Key" => idempotency_key },
1747
1818
  response: Types::SessionsUpdateAmlHitStatusResponse,
1748
1819
  request_options: request_options
1749
1820
  )
@@ -1770,9 +1841,17 @@ module Didit
1770
1841
  # @param node_id [String] Workflow graph node ID of the AML check, as an alternative to the query parameter.
1771
1842
  # @param node_id_query [String] Workflow graph node ID of the AML check to update. Needed only when the session
1772
1843
  # ran more than one AML step. Takes precedence over `node_id` in the body.
1844
+ # @param idempotency_key [String] sent as the Idempotency-Key header
1773
1845
  # @param request_options [Hash, nil] :timeout, :max_retries, :extra_headers, :extra_query, :extra_body
1774
1846
  # @return [Didit::Types::SessionsUpdateAmlStatusResponse]
1775
- def update_aml_status(session_id, status:, node_id: OMIT, node_id_query: OMIT, request_options: nil)
1847
+ def update_aml_status(
1848
+ session_id,
1849
+ status:,
1850
+ node_id: OMIT,
1851
+ node_id_query: OMIT,
1852
+ idempotency_key: OMIT,
1853
+ request_options: nil
1854
+ )
1776
1855
  @client.request(
1777
1856
  :patch,
1778
1857
  "/v3/session/{sessionId}/update-aml-status/",
@@ -1784,6 +1863,7 @@ module Didit
1784
1863
  "status" => status,
1785
1864
  "node_id" => node_id
1786
1865
  },
1866
+ headers: { "Idempotency-Key" => idempotency_key },
1787
1867
  response: Types::SessionsUpdateAmlStatusResponse,
1788
1868
  request_options: request_options
1789
1869
  )
@@ -1870,6 +1950,7 @@ module Didit
1870
1950
  # ID-verification steps (also accepted as a `node_id` body field). When omitted, the most recent KYC record on
1871
1951
  # the session is patched. If no KYC exists for the given node, the call returns `404` (`"The session does not
1872
1952
  # have a KYC for node '<node_id>'."`).
1953
+ # @param idempotency_key [String] sent as the Idempotency-Key header
1873
1954
  # @param request_options [Hash, nil] :timeout, :max_retries, :extra_headers, :extra_query, :extra_body
1874
1955
  # @return [Didit::Types::SessionsUpdateDataResponse]
1875
1956
  def update_data(
@@ -1892,6 +1973,7 @@ module Didit
1892
1973
  extra_fields: OMIT,
1893
1974
  parsed_address: OMIT,
1894
1975
  node_id: OMIT,
1976
+ idempotency_key: OMIT,
1895
1977
  request_options: nil
1896
1978
  )
1897
1979
  @client.request(
@@ -1920,6 +2002,7 @@ module Didit
1920
2002
  "extra_fields" => extra_fields,
1921
2003
  "parsed_address" => parsed_address
1922
2004
  },
2005
+ headers: { "Idempotency-Key" => idempotency_key },
1923
2006
  response: Types::SessionsUpdateDataResponse,
1924
2007
  request_options: request_options
1925
2008
  )
@@ -1947,9 +2030,17 @@ module Didit
1947
2030
  # Must be a JSON object; merged key by key into the stored data. Leave it out rather than sending `null`, which
1948
2031
  # returns `400`.
1949
2032
  # @param status [String] New review status of the document.
2033
+ # @param idempotency_key [String] sent as the Idempotency-Key header
1950
2034
  # @param request_options [Hash, nil] :timeout, :max_retries, :extra_headers, :extra_query, :extra_body
1951
2035
  # @return [Didit::Types::SessionsUpdateDocumentAiDataResponse]
1952
- def update_document_ai_data(session_id, document_uuid, extracted_data: OMIT, status: OMIT, request_options: nil)
2036
+ def update_document_ai_data(
2037
+ session_id,
2038
+ document_uuid,
2039
+ extracted_data: OMIT,
2040
+ status: OMIT,
2041
+ idempotency_key: OMIT,
2042
+ request_options: nil
2043
+ )
1953
2044
  @client.request(
1954
2045
  :patch,
1955
2046
  "/v3/document-ai/{sessionId}/documents/{documentUuid}/",
@@ -1958,6 +2049,7 @@ module Didit
1958
2049
  "extracted_data" => extracted_data,
1959
2050
  "status" => status
1960
2051
  },
2052
+ headers: { "Idempotency-Key" => idempotency_key },
1961
2053
  response: Types::SessionsUpdateDocumentAiDataResponse,
1962
2054
  request_options: request_options
1963
2055
  )
@@ -2015,6 +2107,7 @@ module Didit
2015
2107
  # @param defer_until_flow_finishes [Boolean] While the person is still in the flow, store the override as
2016
2108
  # `pending_until_flow_finishes` and apply it when the flow finishes, instead of at once. Omitted or `false`, the
2017
2109
  # override applies at once. On a session whose flow already ended it applies at once either way.
2110
+ # @param idempotency_key [String] sent as the Idempotency-Key header
2018
2111
  # @param request_options [Hash, nil] :timeout, :max_retries, :extra_headers, :extra_query, :extra_body
2019
2112
  # @return [Didit::Types::SessionsUpdateFeatureStatusResponse]
2020
2113
  def update_feature_status(
@@ -2024,6 +2117,7 @@ module Didit
2024
2117
  comment: OMIT,
2025
2118
  feature_type: OMIT,
2026
2119
  defer_until_flow_finishes: OMIT,
2120
+ idempotency_key: OMIT,
2027
2121
  request_options: nil
2028
2122
  )
2029
2123
  @client.request(
@@ -2036,6 +2130,7 @@ module Didit
2036
2130
  "feature_type" => feature_type,
2037
2131
  "defer_until_flow_finishes" => defer_until_flow_finishes
2038
2132
  },
2133
+ headers: { "Idempotency-Key" => idempotency_key },
2039
2134
  response: Types::SessionsUpdateFeatureStatusResponse,
2040
2135
  request_options: request_options
2041
2136
  )
@@ -2124,6 +2219,7 @@ module Didit
2124
2219
  # unchanged.
2125
2220
  # @param control_scheme [String] Control / governance scheme when the registry exposes it. Stored in the
2126
2221
  # registry snapshot only.
2222
+ # @param idempotency_key [String] sent as the Idempotency-Key header
2127
2223
  # @param request_options [Hash, nil] :timeout, :max_retries, :extra_headers, :extra_query, :extra_body
2128
2224
  # @return [Didit::Types::SessionsUpdateKybCompanyDataResponse]
2129
2225
  def update_kyb_company_data(
@@ -2153,6 +2249,7 @@ module Didit
2153
2249
  location_of_registration: OMIT,
2154
2250
  vat_number: OMIT,
2155
2251
  control_scheme: OMIT,
2252
+ idempotency_key: OMIT,
2156
2253
  request_options: nil
2157
2254
  )
2158
2255
  @client.request(
@@ -2185,6 +2282,7 @@ module Didit
2185
2282
  "vat_number" => vat_number,
2186
2283
  "control_scheme" => control_scheme
2187
2284
  },
2285
+ headers: { "Idempotency-Key" => idempotency_key },
2188
2286
  response: Types::SessionsUpdateKybCompanyDataResponse,
2189
2287
  request_options: request_options
2190
2288
  )
@@ -2221,9 +2319,10 @@ module Didit
2221
2319
  # referenced by `sessionId`.
2222
2320
  # @param is_skipped [Boolean] `true` exempts the party from verification so the Key People check can settle
2223
2321
  # without it; `false` puts it back in scope.
2322
+ # @param idempotency_key [String] sent as the Idempotency-Key header
2224
2323
  # @param request_options [Hash, nil] :timeout, :max_retries, :extra_headers, :extra_query, :extra_body
2225
2324
  # @return [Didit::Types::SessionsUpdateKybPartyResponse]
2226
- def update_kyb_party(session_id, party_uuid, is_skipped:, request_options: nil)
2325
+ def update_kyb_party(session_id, party_uuid, is_skipped:, idempotency_key: OMIT, request_options: nil)
2227
2326
  @client.request(
2228
2327
  :patch,
2229
2328
  "/v3/session/{sessionId}/kyb/parties/{partyUuid}/",
@@ -2231,6 +2330,7 @@ module Didit
2231
2330
  body: {
2232
2331
  "is_skipped" => is_skipped
2233
2332
  },
2333
+ headers: { "Idempotency-Key" => idempotency_key },
2234
2334
  response: Types::SessionsUpdateKybPartyResponse,
2235
2335
  request_options: request_options
2236
2336
  )
@@ -2268,6 +2368,7 @@ module Didit
2268
2368
  # allows skipping in the workflow's Key People settings.
2269
2369
  # @param node_id [String] Workflow node of the KYB step. Only needed when the workflow has more than one KYB
2270
2370
  # node; by default Didit uses the session's own node.
2371
+ # @param idempotency_key [String] sent as the Idempotency-Key header
2271
2372
  # @param request_options [Hash, nil] :timeout, :max_retries, :extra_headers, :extra_query, :extra_body
2272
2373
  # @return [Didit::Types::SessionsUpdateKybPartyDraftResponse]
2273
2374
  def update_kyb_party_draft(
@@ -2290,6 +2391,7 @@ module Didit
2290
2391
  custom_fields: OMIT,
2291
2392
  skip_verification: OMIT,
2292
2393
  node_id: OMIT,
2394
+ idempotency_key: OMIT,
2293
2395
  request_options: nil
2294
2396
  )
2295
2397
  @client.request(
@@ -2317,6 +2419,7 @@ module Didit
2317
2419
  "custom_fields" => custom_fields,
2318
2420
  "skip_verification" => skip_verification
2319
2421
  },
2422
+ headers: { "Idempotency-Key" => idempotency_key },
2320
2423
  response: Types::SessionsUpdateKybPartyDraftResponse,
2321
2424
  request_options: request_options
2322
2425
  )
@@ -2391,6 +2494,7 @@ module Didit
2391
2494
  # of Address steps (also accepted as a `node_id` body field). When omitted, the most recent POA record on the
2392
2495
  # session is patched. If no POA exists for the given node, the call returns `404` (`"The session does not have a
2393
2496
  # POA for node '<node_id>'."`).
2497
+ # @param idempotency_key [String] sent as the Idempotency-Key header
2394
2498
  # @param request_options [Hash, nil] :timeout, :max_retries, :extra_headers, :extra_query, :extra_body
2395
2499
  # @return [Didit::Types::SessionsUpdatePoaDataResponse]
2396
2500
  def update_poa_data(
@@ -2405,6 +2509,7 @@ module Didit
2405
2509
  extra_fields: OMIT,
2406
2510
  poa_parsed_address: OMIT,
2407
2511
  node_id: OMIT,
2512
+ idempotency_key: OMIT,
2408
2513
  request_options: nil
2409
2514
  )
2410
2515
  @client.request(
@@ -2425,6 +2530,7 @@ module Didit
2425
2530
  "extra_fields" => extra_fields,
2426
2531
  "poa_parsed_address" => poa_parsed_address
2427
2532
  },
2533
+ headers: { "Idempotency-Key" => idempotency_key },
2428
2534
  response: Types::SessionsUpdatePoaDataResponse,
2429
2535
  request_options: request_options
2430
2536
  )
@@ -2522,6 +2628,7 @@ module Didit
2522
2628
  # @param link_reason [String] Reviewer reason for the same-person link, required with link_to_session_id and
2523
2629
  # rejected without it. Leading and trailing whitespace is trimmed; the result must be nonblank and at most 2000
2524
2630
  # characters. Recorded in the separate link audit. comment does not substitute for this field.
2631
+ # @param idempotency_key [String] sent as the Idempotency-Key header
2525
2632
  # @param request_options [Hash, nil] :timeout, :max_retries, :extra_headers, :extra_query, :extra_body
2526
2633
  # @return [Didit::Types::SessionsUpdateStatusResponse]
2527
2634
  def update_status(
@@ -2535,6 +2642,7 @@ module Didit
2535
2642
  email_preview_token: OMIT,
2536
2643
  link_to_session_id: OMIT,
2537
2644
  link_reason: OMIT,
2645
+ idempotency_key: OMIT,
2538
2646
  request_options: nil
2539
2647
  )
2540
2648
  @client.request(
@@ -2552,6 +2660,7 @@ module Didit
2552
2660
  "link_to_session_id" => link_to_session_id,
2553
2661
  "link_reason" => link_reason
2554
2662
  },
2663
+ headers: { "Idempotency-Key" => idempotency_key },
2555
2664
  response: Types::SessionsUpdateStatusResponse,
2556
2665
  request_options: request_options
2557
2666
  )
@@ -2579,6 +2688,7 @@ module Didit
2579
2688
  # @param locale [String] Locale used to translate the response of the next step.
2580
2689
  # @param node_id [String] Workflow node of the KYB step. Only needed when the workflow has more than one KYB
2581
2690
  # node; by default Didit uses the session's own node.
2691
+ # @param idempotency_key [String] sent as the Idempotency-Key header
2582
2692
  # @param request_options [Hash, nil] :timeout, :max_retries, :extra_headers, :extra_query, :extra_body
2583
2693
  # @return [Didit::Types::SessionsUploadKybDocumentsResponse]
2584
2694
  def upload_kyb_documents(
@@ -2588,6 +2698,7 @@ module Didit
2588
2698
  document_group: OMIT,
2589
2699
  locale: OMIT,
2590
2700
  node_id: OMIT,
2701
+ idempotency_key: OMIT,
2591
2702
  request_options: nil
2592
2703
  )
2593
2704
  @client.request(
@@ -2605,6 +2716,7 @@ module Didit
2605
2716
  },
2606
2717
  encoding: :multipart,
2607
2718
  file_fields: %w[documents],
2719
+ headers: { "Idempotency-Key" => idempotency_key },
2608
2720
  response: Types::SessionsUploadKybDocumentsResponse,
2609
2721
  request_options: request_options
2610
2722
  )
@@ -2619,13 +2731,15 @@ module Didit
2619
2731
  # +POST /v3/session/imports/{importId}/cancel/+
2620
2732
  #
2621
2733
  # @param import_id [String]
2734
+ # @param idempotency_key [String] sent as the Idempotency-Key header
2622
2735
  # @param request_options [Hash, nil] :timeout, :max_retries, :extra_headers, :extra_query, :extra_body
2623
2736
  # @return [Didit::Types::SessionImportJob]
2624
- def cancel(import_id, request_options: nil)
2737
+ def cancel(import_id, idempotency_key: OMIT, request_options: nil)
2625
2738
  @client.request(
2626
2739
  :post,
2627
2740
  "/v3/session/imports/{importId}/cancel/",
2628
2741
  path_params: { "importId" => import_id },
2742
+ headers: { "Idempotency-Key" => idempotency_key },
2629
2743
  response: Types::SessionImportJob,
2630
2744
  request_options: request_options
2631
2745
  )
@@ -2644,9 +2758,17 @@ module Didit
2644
2758
  # JSON string in multipart.
2645
2759
  # @param options [Hash]
2646
2760
  # @param record_ids [Array<String>] For `api_ids` providers: the first record ID of your export.
2761
+ # @param idempotency_key [String] sent as the Idempotency-Key header
2647
2762
  # @param request_options [Hash, nil] :timeout, :max_retries, :extra_headers, :extra_query, :extra_body
2648
2763
  # @return [Didit::Types::SessionsImportsCheckProviderResponse]
2649
- def check_provider(provider:, credentials:, options: OMIT, record_ids: OMIT, request_options: nil)
2764
+ def check_provider(
2765
+ provider:,
2766
+ credentials:,
2767
+ options: OMIT,
2768
+ record_ids: OMIT,
2769
+ idempotency_key: OMIT,
2770
+ request_options: nil
2771
+ )
2650
2772
  @client.request(
2651
2773
  :post,
2652
2774
  "/v3/session/imports/providers/check/",
@@ -2656,6 +2778,7 @@ module Didit
2656
2778
  "options" => options,
2657
2779
  "record_ids" => record_ids
2658
2780
  },
2781
+ headers: { "Idempotency-Key" => idempotency_key },
2659
2782
  response: Types::SessionsImportsCheckProviderResponse,
2660
2783
  request_options: request_options
2661
2784
  )
@@ -2703,6 +2826,7 @@ module Didit
2703
2826
  # @param file [Pathname, IO, String, Didit::FilePart] Canonical CSV or NDJSON file. Use NDJSON for large
2704
2827
  # imports. Maximum upload size 25 MB (use `source_file_url` for bigger files). Mutually exclusive with
2705
2828
  # `source_file_url`.
2829
+ # @param idempotency_key [String] sent as the Idempotency-Key header
2706
2830
  # @param request_options [Hash, nil] :timeout, :max_retries, :extra_headers, :extra_query, :extra_body
2707
2831
  # @return [Didit::Types::SessionImportJob]
2708
2832
  def create(
@@ -2719,6 +2843,7 @@ module Didit
2719
2843
  face_templates: OMIT,
2720
2844
  lawful_basis_confirmed: OMIT,
2721
2845
  file: OMIT,
2846
+ idempotency_key: OMIT,
2722
2847
  request_options: nil
2723
2848
  )
2724
2849
  @client.request(
@@ -2741,6 +2866,7 @@ module Didit
2741
2866
  },
2742
2867
  encoding: :auto,
2743
2868
  file_fields: %w[file],
2869
+ headers: { "Idempotency-Key" => idempotency_key },
2744
2870
  response: Types::SessionImportJob,
2745
2871
  request_options: request_options
2746
2872
  )
@@ -2837,13 +2963,15 @@ module Didit
2837
2963
  # +POST /v3/session/imports/{importId}/pause/+
2838
2964
  #
2839
2965
  # @param import_id [String]
2966
+ # @param idempotency_key [String] sent as the Idempotency-Key header
2840
2967
  # @param request_options [Hash, nil] :timeout, :max_retries, :extra_headers, :extra_query, :extra_body
2841
2968
  # @return [Didit::Types::SessionImportJob]
2842
- def pause(import_id, request_options: nil)
2969
+ def pause(import_id, idempotency_key: OMIT, request_options: nil)
2843
2970
  @client.request(
2844
2971
  :post,
2845
2972
  "/v3/session/imports/{importId}/pause/",
2846
2973
  path_params: { "importId" => import_id },
2974
+ headers: { "Idempotency-Key" => idempotency_key },
2847
2975
  response: Types::SessionImportJob,
2848
2976
  request_options: request_options
2849
2977
  )
@@ -2856,13 +2984,15 @@ module Didit
2856
2984
  # +POST /v3/session/imports/{importId}/resume/+
2857
2985
  #
2858
2986
  # @param import_id [String]
2987
+ # @param idempotency_key [String] sent as the Idempotency-Key header
2859
2988
  # @param request_options [Hash, nil] :timeout, :max_retries, :extra_headers, :extra_query, :extra_body
2860
2989
  # @return [Didit::Types::SessionImportJob]
2861
- def resume(import_id, request_options: nil)
2990
+ def resume(import_id, idempotency_key: OMIT, request_options: nil)
2862
2991
  @client.request(
2863
2992
  :post,
2864
2993
  "/v3/session/imports/{importId}/resume/",
2865
2994
  path_params: { "importId" => import_id },
2995
+ headers: { "Idempotency-Key" => idempotency_key },
2866
2996
  response: Types::SessionImportJob,
2867
2997
  request_options: request_options
2868
2998
  )
@@ -2925,9 +3055,10 @@ module Didit
2925
3055
  # JSON string in multipart.
2926
3056
  # @param file [Pathname, IO, String, Didit::FilePart] The record IDs or export file again, for `api_ids` and
2927
3057
  # `export_file` providers.
3058
+ # @param idempotency_key [String] sent as the Idempotency-Key header
2928
3059
  # @param request_options [Hash, nil] :timeout, :max_retries, :extra_headers, :extra_query, :extra_body
2929
3060
  # @return [Didit::Types::SessionImportJob]
2930
- def retry(import_id, credentials: OMIT, file: OMIT, request_options: nil)
3061
+ def retry(import_id, credentials: OMIT, file: OMIT, idempotency_key: OMIT, request_options: nil)
2931
3062
  @client.request(
2932
3063
  :post,
2933
3064
  "/v3/session/imports/{importId}/retry/",
@@ -2938,6 +3069,7 @@ module Didit
2938
3069
  },
2939
3070
  encoding: :multipart,
2940
3071
  file_fields: %w[file],
3072
+ headers: { "Idempotency-Key" => idempotency_key },
2941
3073
  response: Types::SessionImportJob,
2942
3074
  request_options: request_options
2943
3075
  )
@@ -2957,6 +3089,7 @@ module Didit
2957
3089
  # application's faces and blocklist. Matches are flagged for review only. Requires `lawful_basis_confirmed`.
2958
3090
  # @param lawful_basis_confirmed [Boolean] Confirms you have a lawful basis to share these selfies with Didit
2959
3091
  # as processor.
3092
+ # @param idempotency_key [String] sent as the Idempotency-Key header
2960
3093
  # @param request_options [Hash, nil] :timeout, :max_retries, :extra_headers, :extra_query, :extra_body
2961
3094
  # @return [Didit::Types::SessionImportJob]
2962
3095
  def start(
@@ -2964,6 +3097,7 @@ module Didit
2964
3097
  status_mapping: OMIT,
2965
3098
  face_templates: OMIT,
2966
3099
  lawful_basis_confirmed: OMIT,
3100
+ idempotency_key: OMIT,
2967
3101
  request_options: nil
2968
3102
  )
2969
3103
  @client.request(
@@ -2975,6 +3109,7 @@ module Didit
2975
3109
  "face_templates" => face_templates,
2976
3110
  "lawful_basis_confirmed" => lawful_basis_confirmed
2977
3111
  },
3112
+ headers: { "Idempotency-Key" => idempotency_key },
2978
3113
  response: Types::SessionImportJob,
2979
3114
  request_options: request_options
2980
3115
  )
@@ -3010,9 +3145,10 @@ module Didit
3010
3145
  # session's actual status - use the update-status endpoint for that.
3011
3146
  # @param comment [String, nil] Optional free-text note (no enforced length limit). Stored verbatim; `@email`
3012
3147
  # mentions are not processed on this endpoint.
3148
+ # @param idempotency_key [String] sent as the Idempotency-Key header
3013
3149
  # @param request_options [Hash, nil] :timeout, :max_retries, :extra_headers, :extra_query, :extra_body
3014
3150
  # @return [Didit::Types::SessionsReviewsCreateResponse]
3015
- def create(session_id, new_status: OMIT, comment: OMIT, request_options: nil)
3151
+ def create(session_id, new_status: OMIT, comment: OMIT, idempotency_key: OMIT, request_options: nil)
3016
3152
  @client.request(
3017
3153
  :post,
3018
3154
  "/v3/sessions/{session_id}/reviews/",
@@ -3021,6 +3157,7 @@ module Didit
3021
3157
  "new_status" => new_status,
3022
3158
  "comment" => comment
3023
3159
  },
3160
+ headers: { "Idempotency-Key" => idempotency_key },
3024
3161
  response: Types::SessionsReviewsCreateResponse,
3025
3162
  request_options: request_options
3026
3163
  )
@@ -3171,9 +3308,10 @@ module Didit
3171
3308
  # @param session_id [String] The User Verification (KYC) or Business Verification (KYB) session.
3172
3309
  # @param node_id [String] The E-signature step: `node_id` of the item in `signatures[]`.
3173
3310
  # @param signature_id [String] `id` of one signer's item in `signatures[]`.
3311
+ # @param idempotency_key [String] sent as the Idempotency-Key header
3174
3312
  # @param request_options [Hash, nil] :timeout, :max_retries, :extra_headers, :extra_query, :extra_body
3175
3313
  # @return [Didit::Types::SessionsSignaturesValidateResponse]
3176
- def validate(session_id, node_id, signature_id: OMIT, request_options: nil)
3314
+ def validate(session_id, node_id, signature_id: OMIT, idempotency_key: OMIT, request_options: nil)
3177
3315
  @client.request(
3178
3316
  :post,
3179
3317
  "/v3/session/{sessionId}/signatures/{nodeId}/validate/",
@@ -3181,6 +3319,7 @@ module Didit
3181
3319
  body: {
3182
3320
  "signature_id" => signature_id
3183
3321
  },
3322
+ headers: { "Idempotency-Key" => idempotency_key },
3184
3323
  response: Types::SessionsSignaturesValidateResponse,
3185
3324
  request_options: request_options
3186
3325
  )
@@ -3238,13 +3377,15 @@ module Didit
3238
3377
  # e...
3239
3378
  # @param webhook_uuid [String] UUID of the delivery to resend: the `uuid` of an entry returned by `GET
3240
3379
  # /v3/session/{sessionId}/webhooks/`. It must belong to the session in the path.
3380
+ # @param idempotency_key [String] sent as the Idempotency-Key header
3241
3381
  # @param request_options [Hash, nil] :timeout, :max_retries, :extra_headers, :extra_query, :extra_body
3242
3382
  # @return [Didit::Types::SessionWebhookDelivery]
3243
- def resend(session_id, webhook_uuid, request_options: nil)
3383
+ def resend(session_id, webhook_uuid, idempotency_key: OMIT, request_options: nil)
3244
3384
  @client.request(
3245
3385
  :post,
3246
3386
  "/v3/session/{sessionId}/webhook/{webhook_uuid}/resend",
3247
3387
  path_params: { "sessionId" => session_id, "webhook_uuid" => webhook_uuid },
3388
+ headers: { "Idempotency-Key" => idempotency_key },
3248
3389
  response: Types::SessionWebhookDelivery,
3249
3390
  request_options: request_options
3250
3391
  )