didit-sdk 2.17.0 → 2.18.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 +8 -0
- data/lib/didit/resources/reports.rb +114 -0
- data/lib/didit/resources/travel_rule.rb +295 -8
- data/lib/didit/resources/webhooks.rb +29 -0
- data/lib/didit/resources.rb +6 -0
- data/lib/didit/types/components.rb +346 -5
- data/lib/didit/types/reports.rb +8 -0
- data/lib/didit/types/travel_rule.rb +19 -0
- data/lib/didit/types.rb +34 -1
- data/lib/didit/version.rb +1 -1
- data/sig/didit/resources/reports.rbs +11 -0
- data/sig/didit/resources/travel_rule.rbs +17 -3
- data/sig/didit/resources/webhooks.rbs +1 -0
- data/sig/didit/resources.rbs +1 -0
- data/sig/didit/types/components.rbs +312 -1
- data/sig/didit/types/reports.rbs +7 -0
- data/sig/didit/types/travel_rule.rbs +27 -2
- metadata +5 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 72d330e40c5235733270dcbe6eb54779329a2562403fadf8e219ed986026db00
|
|
4
|
+
data.tar.gz: 39c54e6afd3fd66a3f5f3e28a2ee7a41328e7c307e76d1c2902dcb23967298be
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 53426179c7fbbb5b41de911f530a1b929e8c4672c04feb51f5a752f07f2cd2e868f766ac47007d0d954cfa29490dfe8859e572c8eeeb692baed841eb32eaba7e
|
|
7
|
+
data.tar.gz: 79a8116c3c03e363fff660c6806a7ccbe6d429f386030b9ca20da5289d71c2cdcee4af2da900ba79dbc9dbd606da418acd861571ee1b669a69c818f990f20931
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [2.18.0](https://github.com/didit-protocol/sdk-ruby/compare/v2.17.0...v2.18.0) (2026-11-14)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* **spec:** sync API spec 2026-11-14 ([a41816c](https://github.com/didit-protocol/sdk-ruby/commit/a41816ce714e8b0098160b123a1d5a9bee43cd98))
|
|
9
|
+
* **spec:** sync API spec 2026-11-14 ([6f7bb35](https://github.com/didit-protocol/sdk-ruby/commit/6f7bb35a3d869d4bbe17608c5088033348d89a90))
|
|
10
|
+
|
|
3
11
|
## [2.17.0](https://github.com/didit-protocol/sdk-ruby/compare/v2.16.0...v2.17.0) (2026-11-14)
|
|
4
12
|
|
|
5
13
|
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
# Code generated by codegen from openapi/*.json. DO NOT EDIT.
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
|
|
4
|
+
module Didit
|
|
5
|
+
module Resources
|
|
6
|
+
# The +reports+ resource.
|
|
7
|
+
class Reports < Didit::Resource
|
|
8
|
+
# List async reports
|
|
9
|
+
#
|
|
10
|
+
# Requires read permissions for every resource covered by the report. Application/API-key credentials must
|
|
11
|
+
# belong to the application in the path. Member Bearer tokens must have access to the application. Returns
|
|
12
|
+
# readable reports newest first. These async export jobs are separate from the Regulatory Reports API. See
|
|
13
|
+
# [Export verification data](https://docs.didit.me/console/export-pdf-csv).
|
|
14
|
+
#
|
|
15
|
+
# +GET /v3/organization/{organization_id}/application/{application_id}/reports/+
|
|
16
|
+
#
|
|
17
|
+
# @param limit [Integer] Maximum results per page.
|
|
18
|
+
# @param offset [Integer] Number of results to skip.
|
|
19
|
+
# @param status [String] Comma-separated or repeated status values: PENDING, PROCESSING, READY, FAILED.
|
|
20
|
+
# @param report_type [String] Comma-separated or repeated report_type values.
|
|
21
|
+
# @param q [String] Search by report ID fragment or requester name/email (at most 255 characters).
|
|
22
|
+
# @param request_options [Hash, nil] :timeout, :max_retries, :extra_headers, :extra_query, :extra_body
|
|
23
|
+
# @return [Didit::Page<Didit::Types::AsyncReport>]
|
|
24
|
+
def list(limit: OMIT, offset: OMIT, status: OMIT, report_type: OMIT, q: OMIT, request_options: nil)
|
|
25
|
+
@client.request(
|
|
26
|
+
:get,
|
|
27
|
+
"/v3/organization/{organization_id}/application/{application_id}/reports/",
|
|
28
|
+
query: {
|
|
29
|
+
"limit" => limit,
|
|
30
|
+
"offset" => offset,
|
|
31
|
+
"status" => status,
|
|
32
|
+
"report_type" => report_type,
|
|
33
|
+
"q" => q
|
|
34
|
+
},
|
|
35
|
+
scope: :application,
|
|
36
|
+
page: Types::AsyncReport,
|
|
37
|
+
request_options: request_options
|
|
38
|
+
)
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
# Retrieve async report
|
|
42
|
+
#
|
|
43
|
+
# Requires read permissions for every resource covered by the report. Application/API-key credentials must
|
|
44
|
+
# belong to the application in the path. Member Bearer tokens must have access to the application.
|
|
45
|
+
# failed_item_ids excludes deleted sessions; failed_count is its length.
|
|
46
|
+
#
|
|
47
|
+
# +GET /v3/organization/{organization_id}/application/{application_id}/reports/{report_uuid}/+
|
|
48
|
+
#
|
|
49
|
+
# @param report_uuid [String] Report uuid.
|
|
50
|
+
# @param request_options [Hash, nil] :timeout, :max_retries, :extra_headers, :extra_query, :extra_body
|
|
51
|
+
# @return [Didit::Types::AsyncReport]
|
|
52
|
+
def retrieve(report_uuid, request_options: nil)
|
|
53
|
+
@client.request(
|
|
54
|
+
:get,
|
|
55
|
+
"/v3/organization/{organization_id}/application/{application_id}/reports/{report_uuid}/",
|
|
56
|
+
path_params: { "report_uuid" => report_uuid },
|
|
57
|
+
scope: :application,
|
|
58
|
+
response: Types::AsyncReport,
|
|
59
|
+
request_options: request_options
|
|
60
|
+
)
|
|
61
|
+
end
|
|
62
|
+
|
|
63
|
+
# Retry async report
|
|
64
|
+
#
|
|
65
|
+
# Requires read permissions for every resource covered by the report. Application/API-key credentials must
|
|
66
|
+
# belong to the application in the path. Member Bearer tokens must have access to the application. Also requires
|
|
67
|
+
# write permissions for the resources being exported. Omit item_ids to run the original export again, optionally
|
|
68
|
+
# over a replacement date range. A report created as a failed-item retry requires an explicit item_ids selection
|
|
69
|
+
# for further retries. With item_ids, only the original requester (a non-null requested_by_user_id matching the
|
|
70
|
+
# authenticated user) can retry a READY or FAILED SESSION_EXPORT. An API key or application token without that
|
|
71
|
+
# user identity receives 403 for a selective retry. Select only live failed sessions from the original export;
|
|
72
|
+
# deleted sessions cannot be re-exported. The original report remains unchanged. The first selection creates a
|
|
73
|
+
# new report (201); replaying the identical selected set returns the existing retry report (200). Overlapping or
|
|
74
|
+
# different selections already assigned to another retry return 400. See [Retry failed export
|
|
75
|
+
# items](https://docs.didit.me/console/export-pdf-csv#retry-failed-export-items).
|
|
76
|
+
#
|
|
77
|
+
# +POST /v3/organization/{organization_id}/application/{application_id}/reports/{report_uuid}/retry/+
|
|
78
|
+
#
|
|
79
|
+
# @param report_uuid [String] Report uuid.
|
|
80
|
+
# @param item_ids [Array<String>] Optional selection of 1 to 1000 live failed-session UUIDs from this export.
|
|
81
|
+
# Duplicates are collapsed. Only the original requester can retry a subset. Cannot be combined with
|
|
82
|
+
# date_from/date_to.
|
|
83
|
+
# @param date_from [Date, String] Optional replacement period start. Send both dates in order; omit for a
|
|
84
|
+
# failed-item retry.
|
|
85
|
+
# @param date_to [Date, String] Optional replacement period end, on or after date_from.
|
|
86
|
+
# @param notify_on_ready [Boolean] Email the requester when ready, if a requester email is available.
|
|
87
|
+
# @param request_options [Hash, nil] :timeout, :max_retries, :extra_headers, :extra_query, :extra_body
|
|
88
|
+
# @return [Didit::Types::AsyncReport]
|
|
89
|
+
def retry(
|
|
90
|
+
report_uuid,
|
|
91
|
+
item_ids: OMIT,
|
|
92
|
+
date_from: OMIT,
|
|
93
|
+
date_to: OMIT,
|
|
94
|
+
notify_on_ready: OMIT,
|
|
95
|
+
request_options: nil
|
|
96
|
+
)
|
|
97
|
+
@client.request(
|
|
98
|
+
:post,
|
|
99
|
+
"/v3/organization/{organization_id}/application/{application_id}/reports/{report_uuid}/retry/",
|
|
100
|
+
path_params: { "report_uuid" => report_uuid },
|
|
101
|
+
body: {
|
|
102
|
+
"item_ids" => item_ids,
|
|
103
|
+
"date_from" => date_from,
|
|
104
|
+
"date_to" => date_to,
|
|
105
|
+
"notify_on_ready" => notify_on_ready
|
|
106
|
+
},
|
|
107
|
+
scope: :application,
|
|
108
|
+
response: Types::AsyncReport,
|
|
109
|
+
request_options: request_options
|
|
110
|
+
)
|
|
111
|
+
end
|
|
112
|
+
end
|
|
113
|
+
end
|
|
114
|
+
end
|
|
@@ -10,6 +10,11 @@ module Didit
|
|
|
10
10
|
@counterparty_contacts ||= CounterpartyContacts.new(@client)
|
|
11
11
|
end
|
|
12
12
|
|
|
13
|
+
# @return [Didit::Resources::TravelRule::Documents]
|
|
14
|
+
def documents
|
|
15
|
+
@documents ||= Documents.new(@client)
|
|
16
|
+
end
|
|
17
|
+
|
|
13
18
|
# @return [Didit::Resources::TravelRule::Networks]
|
|
14
19
|
def networks
|
|
15
20
|
@networks ||= Networks.new(@client)
|
|
@@ -190,6 +195,33 @@ module Didit
|
|
|
190
195
|
)
|
|
191
196
|
end
|
|
192
197
|
|
|
198
|
+
# List a VASP's decision history
|
|
199
|
+
#
|
|
200
|
+
# Your application's own decision changes for the counterparty, newest first. Only changes made after this
|
|
201
|
+
# history existed are listed. Needs the transactions read privilege.
|
|
202
|
+
#
|
|
203
|
+
# +GET /v3/travel-rule/vasps/{vasp_id}/decision-history/+
|
|
204
|
+
#
|
|
205
|
+
# @param vasp_id [String] The id of a row of GET /v3/travel-rule/vasps/: a directory entry or a Didit network
|
|
206
|
+
# member.
|
|
207
|
+
# @param limit [Integer]
|
|
208
|
+
# @param offset [Integer]
|
|
209
|
+
# @param request_options [Hash, nil] :timeout, :max_retries, :extra_headers, :extra_query, :extra_body
|
|
210
|
+
# @return [Didit::Page<Didit::Types::TravelRuleDecisionEvent>]
|
|
211
|
+
def list_vasp_decision_history(vasp_id, limit: OMIT, offset: OMIT, request_options: nil)
|
|
212
|
+
@client.request(
|
|
213
|
+
:get,
|
|
214
|
+
"/v3/travel-rule/vasps/{vasp_id}/decision-history/",
|
|
215
|
+
path_params: { "vasp_id" => vasp_id },
|
|
216
|
+
query: {
|
|
217
|
+
"limit" => limit,
|
|
218
|
+
"offset" => offset
|
|
219
|
+
},
|
|
220
|
+
page: Types::TravelRuleDecisionEvent,
|
|
221
|
+
request_options: request_options
|
|
222
|
+
)
|
|
223
|
+
end
|
|
224
|
+
|
|
193
225
|
# List due-diligence questionnaires with a VASP
|
|
194
226
|
#
|
|
195
227
|
# Every due-diligence questionnaire your application sent the counterparty, newest first, with its status and,
|
|
@@ -229,6 +261,26 @@ module Didit
|
|
|
229
261
|
)
|
|
230
262
|
end
|
|
231
263
|
|
|
264
|
+
# List the documents shared with a VASP
|
|
265
|
+
#
|
|
266
|
+
# The documents currently shared with the counterparty.
|
|
267
|
+
#
|
|
268
|
+
# +GET /v3/travel-rule/vasps/{vasp_id}/shared-documents/+
|
|
269
|
+
#
|
|
270
|
+
# @param vasp_id [String] The id of a row of GET /v3/travel-rule/vasps/: a directory entry or a Didit network
|
|
271
|
+
# member.
|
|
272
|
+
# @param request_options [Hash, nil] :timeout, :max_retries, :extra_headers, :extra_query, :extra_body
|
|
273
|
+
# @return [Didit::Types::TravelRuleListVaspSharedDocumentsResponse]
|
|
274
|
+
def list_vasp_shared_documents(vasp_id, request_options: nil)
|
|
275
|
+
@client.request(
|
|
276
|
+
:get,
|
|
277
|
+
"/v3/travel-rule/vasps/{vasp_id}/shared-documents/",
|
|
278
|
+
path_params: { "vasp_id" => vasp_id },
|
|
279
|
+
response: Types::TravelRuleListVaspSharedDocumentsResponse,
|
|
280
|
+
request_options: request_options
|
|
281
|
+
)
|
|
282
|
+
end
|
|
283
|
+
|
|
232
284
|
# Search the VASP directory
|
|
233
285
|
#
|
|
234
286
|
# Paginated, name-sorted search of the VASP directory: the shared directory entries, which Didit builds from the
|
|
@@ -530,21 +582,63 @@ module Didit
|
|
|
530
582
|
# its compliance address or a contact your application sees, for a Didit network member its confirmed compliance
|
|
531
583
|
# email. Default: the address a Travel Rule email to the counterparty goes to (your own contact first, then a
|
|
532
584
|
# platform contact, then the entry's compliance address).
|
|
585
|
+
# @param answer_by_days [Integer] Optional. Days the counterparty has to answer. Default: the standard answer
|
|
586
|
+
# window.
|
|
587
|
+
# @param requested_items [Array<String>] Optional. What the counterparty must provide: the questionnaire answers
|
|
588
|
+
# and/or PDF documents.
|
|
533
589
|
# @param request_options [Hash, nil] :timeout, :max_retries, :extra_headers, :extra_query, :extra_body
|
|
534
590
|
# @return [Didit::Types::TravelRuleCounterpartyQuestionnaire]
|
|
535
|
-
def send_vasp_questionnaire(
|
|
591
|
+
def send_vasp_questionnaire(
|
|
592
|
+
vasp_id,
|
|
593
|
+
sent_to: OMIT,
|
|
594
|
+
answer_by_days: OMIT,
|
|
595
|
+
requested_items: OMIT,
|
|
596
|
+
request_options: nil
|
|
597
|
+
)
|
|
536
598
|
@client.request(
|
|
537
599
|
:post,
|
|
538
600
|
"/v3/travel-rule/vasps/{vasp_id}/questionnaires/",
|
|
539
601
|
path_params: { "vasp_id" => vasp_id },
|
|
540
602
|
body: {
|
|
541
|
-
"sent_to" => sent_to
|
|
603
|
+
"sent_to" => sent_to,
|
|
604
|
+
"answer_by_days" => answer_by_days,
|
|
605
|
+
"requested_items" => requested_items
|
|
542
606
|
},
|
|
543
607
|
response: Types::TravelRuleCounterpartyQuestionnaire,
|
|
544
608
|
request_options: request_options
|
|
545
609
|
)
|
|
546
610
|
end
|
|
547
611
|
|
|
612
|
+
# Share documents with a VASP
|
|
613
|
+
#
|
|
614
|
+
# Emails the counterparty a private link to the selected documents. Sharing again replaces the earlier share:
|
|
615
|
+
# the earlier link stops working for good. Sharing exactly what is already shared with the same address changes
|
|
616
|
+
# nothing and answers `200` with `url: null`. Needs the transactions write privilege.
|
|
617
|
+
#
|
|
618
|
+
# +POST /v3/travel-rule/vasps/{vasp_id}/shared-documents/+
|
|
619
|
+
#
|
|
620
|
+
# @param vasp_id [String] The id of a row of GET /v3/travel-rule/vasps/: a directory entry or a Didit network
|
|
621
|
+
# member.
|
|
622
|
+
# @param document_ids [Array<String>] Documents of your own inventory, each once.
|
|
623
|
+
# @param sent_to [String] Optional. A compliance address on record for the counterparty, chosen the way
|
|
624
|
+
# `sent_to` of the questionnaire request is. Default: the address a Travel Rule email to the counterparty goes
|
|
625
|
+
# to.
|
|
626
|
+
# @param request_options [Hash, nil] :timeout, :max_retries, :extra_headers, :extra_query, :extra_body
|
|
627
|
+
# @return [Didit::Types::TravelRuleDocumentShare]
|
|
628
|
+
def share_vasp_documents(vasp_id, document_ids:, sent_to: OMIT, request_options: nil)
|
|
629
|
+
@client.request(
|
|
630
|
+
:post,
|
|
631
|
+
"/v3/travel-rule/vasps/{vasp_id}/shared-documents/",
|
|
632
|
+
path_params: { "vasp_id" => vasp_id },
|
|
633
|
+
body: {
|
|
634
|
+
"document_ids" => document_ids,
|
|
635
|
+
"sent_to" => sent_to
|
|
636
|
+
},
|
|
637
|
+
response: Types::TravelRuleDocumentShare,
|
|
638
|
+
request_options: request_options
|
|
639
|
+
)
|
|
640
|
+
end
|
|
641
|
+
|
|
548
642
|
# Update Travel Rule settings
|
|
549
643
|
#
|
|
550
644
|
# Upsert the application's Travel Rule settings and VASP profile. Partial update - only send the fields you want
|
|
@@ -691,6 +785,47 @@ module Didit
|
|
|
691
785
|
)
|
|
692
786
|
end
|
|
693
787
|
|
|
788
|
+
# Withdraw the documents shared with a VASP
|
|
789
|
+
#
|
|
790
|
+
# Revokes every active link to your documents for this counterparty. Withdrawal is permanent: the links never
|
|
791
|
+
# work again, and sharing again creates a new link.
|
|
792
|
+
#
|
|
793
|
+
# +DELETE /v3/travel-rule/vasps/{vasp_id}/shared-documents/+
|
|
794
|
+
#
|
|
795
|
+
# @param vasp_id [String] The id of a row of GET /v3/travel-rule/vasps/: a directory entry or a Didit network
|
|
796
|
+
# member.
|
|
797
|
+
# @param request_options [Hash, nil] :timeout, :max_retries, :extra_headers, :extra_query, :extra_body
|
|
798
|
+
# @return [nil]
|
|
799
|
+
def withdraw_vasp_documents(vasp_id, request_options: nil)
|
|
800
|
+
@client.request(
|
|
801
|
+
:delete,
|
|
802
|
+
"/v3/travel-rule/vasps/{vasp_id}/shared-documents/",
|
|
803
|
+
path_params: { "vasp_id" => vasp_id },
|
|
804
|
+
request_options: request_options
|
|
805
|
+
)
|
|
806
|
+
end
|
|
807
|
+
|
|
808
|
+
# Withdraw a due-diligence request
|
|
809
|
+
#
|
|
810
|
+
# Withdraws the request and erases the documents and answers collected with it. Its answer link stops working.
|
|
811
|
+
# Deletion is irreversible. Needs the transactions write privilege.
|
|
812
|
+
#
|
|
813
|
+
# +DELETE /v3/travel-rule/vasps/{vasp_id}/questionnaires/{questionnaire_id}/+
|
|
814
|
+
#
|
|
815
|
+
# @param vasp_id [String] The id of a row of GET /v3/travel-rule/vasps/: a directory entry or a Didit network
|
|
816
|
+
# member.
|
|
817
|
+
# @param questionnaire_id [String]
|
|
818
|
+
# @param request_options [Hash, nil] :timeout, :max_retries, :extra_headers, :extra_query, :extra_body
|
|
819
|
+
# @return [nil]
|
|
820
|
+
def withdraw_vasp_questionnaire(vasp_id, questionnaire_id, request_options: nil)
|
|
821
|
+
@client.request(
|
|
822
|
+
:delete,
|
|
823
|
+
"/v3/travel-rule/vasps/{vasp_id}/questionnaires/{questionnaire_id}/",
|
|
824
|
+
path_params: { "vasp_id" => vasp_id, "questionnaire_id" => questionnaire_id },
|
|
825
|
+
request_options: request_options
|
|
826
|
+
)
|
|
827
|
+
end
|
|
828
|
+
|
|
694
829
|
# The +travel_rule.counterparty_contacts+ resource.
|
|
695
830
|
class CounterpartyContacts < Didit::Resource
|
|
696
831
|
# Add a counterparty contact
|
|
@@ -704,16 +839,30 @@ module Didit
|
|
|
704
839
|
# @param counterparty [String] The directory entry's `id`.
|
|
705
840
|
# @param email [String]
|
|
706
841
|
# @param name [String] Optional label.
|
|
842
|
+
# @param role [String] Optional. The contact's role.
|
|
843
|
+
# @param phone [String] Optional. The contact's phone number.
|
|
844
|
+
# @param receives_requests [Boolean] Whether due-diligence requests and reminders go to this contact.
|
|
707
845
|
# @param request_options [Hash, nil] :timeout, :max_retries, :extra_headers, :extra_query, :extra_body
|
|
708
846
|
# @return [Didit::Types::TravelRuleCounterpartyContact]
|
|
709
|
-
def create(
|
|
847
|
+
def create(
|
|
848
|
+
counterparty:,
|
|
849
|
+
email:,
|
|
850
|
+
name: OMIT,
|
|
851
|
+
role: OMIT,
|
|
852
|
+
phone: OMIT,
|
|
853
|
+
receives_requests: OMIT,
|
|
854
|
+
request_options: nil
|
|
855
|
+
)
|
|
710
856
|
@client.request(
|
|
711
857
|
:post,
|
|
712
858
|
"/v3/travel-rule/counterparty-contacts/",
|
|
713
859
|
body: {
|
|
714
860
|
"counterparty" => counterparty,
|
|
715
861
|
"email" => email,
|
|
716
|
-
"name" => name
|
|
862
|
+
"name" => name,
|
|
863
|
+
"role" => role,
|
|
864
|
+
"phone" => phone,
|
|
865
|
+
"receives_requests" => receives_requests
|
|
717
866
|
},
|
|
718
867
|
response: Types::TravelRuleCounterpartyContact,
|
|
719
868
|
request_options: request_options
|
|
@@ -766,6 +915,143 @@ module Didit
|
|
|
766
915
|
request_options: request_options
|
|
767
916
|
)
|
|
768
917
|
end
|
|
918
|
+
|
|
919
|
+
# Edit a counterparty contact
|
|
920
|
+
#
|
|
921
|
+
# Edits one of your application's own contacts. Changing the email address clears its verification and invalid
|
|
922
|
+
# state. Platform contacts cannot be edited.
|
|
923
|
+
#
|
|
924
|
+
# +PATCH /v3/travel-rule/counterparty-contacts/{contact_uuid}/+
|
|
925
|
+
#
|
|
926
|
+
# @param contact_uuid [String]
|
|
927
|
+
# @param name [String]
|
|
928
|
+
# @param email [String]
|
|
929
|
+
# @param role [String]
|
|
930
|
+
# @param phone [String]
|
|
931
|
+
# @param receives_requests [Boolean]
|
|
932
|
+
# @param request_options [Hash, nil] :timeout, :max_retries, :extra_headers, :extra_query, :extra_body
|
|
933
|
+
# @return [Didit::Types::TravelRuleCounterpartyContact]
|
|
934
|
+
def update(
|
|
935
|
+
contact_uuid,
|
|
936
|
+
name: OMIT,
|
|
937
|
+
email: OMIT,
|
|
938
|
+
role: OMIT,
|
|
939
|
+
phone: OMIT,
|
|
940
|
+
receives_requests: OMIT,
|
|
941
|
+
request_options: nil
|
|
942
|
+
)
|
|
943
|
+
@client.request(
|
|
944
|
+
:patch,
|
|
945
|
+
"/v3/travel-rule/counterparty-contacts/{contact_uuid}/",
|
|
946
|
+
path_params: { "contact_uuid" => contact_uuid },
|
|
947
|
+
body: {
|
|
948
|
+
"name" => name,
|
|
949
|
+
"email" => email,
|
|
950
|
+
"role" => role,
|
|
951
|
+
"phone" => phone,
|
|
952
|
+
"receives_requests" => receives_requests
|
|
953
|
+
},
|
|
954
|
+
response: Types::TravelRuleCounterpartyContact,
|
|
955
|
+
request_options: request_options
|
|
956
|
+
)
|
|
957
|
+
end
|
|
958
|
+
end
|
|
959
|
+
|
|
960
|
+
# The +travel_rule.documents+ resource.
|
|
961
|
+
class Documents < Didit::Resource
|
|
962
|
+
# Upload a Travel Rule document
|
|
963
|
+
#
|
|
964
|
+
# Stores a PDF in your inventory so you can share it with counterparties. The file must be a PDF of at most 5
|
|
965
|
+
# MiB. Uploading identical content of the same kind again returns the existing document. Needs the
|
|
966
|
+
# transactions write privilege.
|
|
967
|
+
#
|
|
968
|
+
# +POST /v3/travel-rule/documents/+
|
|
969
|
+
#
|
|
970
|
+
# @param kind [String] `questionnaire`: the due-diligence questionnaire answers. `incorporation`: certificate
|
|
971
|
+
# of incorporation. `licence`: licence or registration. `aml_policy`: AML and CFT policy. `ownership`:
|
|
972
|
+
# ownership structure.
|
|
973
|
+
# @param file [Pathname, IO, String, Didit::FilePart] A PDF of at most 5 MiB.
|
|
974
|
+
# @param request_options [Hash, nil] :timeout, :max_retries, :extra_headers, :extra_query, :extra_body
|
|
975
|
+
# @return [Didit::Types::TravelRuleDocument]
|
|
976
|
+
def create(kind:, file:, request_options: nil)
|
|
977
|
+
@client.request(
|
|
978
|
+
:post,
|
|
979
|
+
"/v3/travel-rule/documents/",
|
|
980
|
+
body: {
|
|
981
|
+
"kind" => kind,
|
|
982
|
+
"file" => file
|
|
983
|
+
},
|
|
984
|
+
encoding: :multipart,
|
|
985
|
+
file_fields: %w[file],
|
|
986
|
+
response: Types::TravelRuleDocument,
|
|
987
|
+
request_options: request_options
|
|
988
|
+
)
|
|
989
|
+
end
|
|
990
|
+
|
|
991
|
+
# Delete a Travel Rule document
|
|
992
|
+
#
|
|
993
|
+
# Deletes the document and every link that shared it. Deletion is irreversible and takes effect at once:
|
|
994
|
+
# shared links stop working.
|
|
995
|
+
#
|
|
996
|
+
# +DELETE /v3/travel-rule/documents/{document_id}/+
|
|
997
|
+
#
|
|
998
|
+
# @param document_id [String]
|
|
999
|
+
# @param request_options [Hash, nil] :timeout, :max_retries, :extra_headers, :extra_query, :extra_body
|
|
1000
|
+
# @return [nil]
|
|
1001
|
+
def delete(document_id, request_options: nil)
|
|
1002
|
+
@client.request(
|
|
1003
|
+
:delete,
|
|
1004
|
+
"/v3/travel-rule/documents/{document_id}/",
|
|
1005
|
+
path_params: { "document_id" => document_id },
|
|
1006
|
+
request_options: request_options
|
|
1007
|
+
)
|
|
1008
|
+
end
|
|
1009
|
+
|
|
1010
|
+
# Download a Travel Rule document
|
|
1011
|
+
#
|
|
1012
|
+
# Returns the PDF, as an attachment, for a document you uploaded or one a counterparty sent you with a
|
|
1013
|
+
# questionnaire. Needs the transactions read privilege.
|
|
1014
|
+
#
|
|
1015
|
+
# +GET /v3/travel-rule/documents/{document_id}/+
|
|
1016
|
+
#
|
|
1017
|
+
# @param document_id [String]
|
|
1018
|
+
# @param request_options [Hash, nil] :timeout, :max_retries, :extra_headers, :extra_query, :extra_body
|
|
1019
|
+
# @return [String, nil] the body bytes, or nil when a block receives the chunks
|
|
1020
|
+
def download(document_id, request_options: nil, &block)
|
|
1021
|
+
@client.request(
|
|
1022
|
+
:get,
|
|
1023
|
+
"/v3/travel-rule/documents/{document_id}/",
|
|
1024
|
+
path_params: { "document_id" => document_id },
|
|
1025
|
+
response: :binary,
|
|
1026
|
+
accept: "application/pdf, application/json",
|
|
1027
|
+
request_options: request_options, &block
|
|
1028
|
+
)
|
|
1029
|
+
end
|
|
1030
|
+
|
|
1031
|
+
# List your Travel Rule documents
|
|
1032
|
+
#
|
|
1033
|
+
# Paginated inventory of the PDF documents you uploaded to share with counterparties, newest first. Documents
|
|
1034
|
+
# counterparties sent you with a questionnaire are not listed here: they appear on the questionnaire. Needs
|
|
1035
|
+
# the transactions read privilege.
|
|
1036
|
+
#
|
|
1037
|
+
# +GET /v3/travel-rule/documents/+
|
|
1038
|
+
#
|
|
1039
|
+
# @param limit [Integer]
|
|
1040
|
+
# @param offset [Integer]
|
|
1041
|
+
# @param request_options [Hash, nil] :timeout, :max_retries, :extra_headers, :extra_query, :extra_body
|
|
1042
|
+
# @return [Didit::Page<Didit::Types::TravelRuleDocument>]
|
|
1043
|
+
def list(limit: OMIT, offset: OMIT, request_options: nil)
|
|
1044
|
+
@client.request(
|
|
1045
|
+
:get,
|
|
1046
|
+
"/v3/travel-rule/documents/",
|
|
1047
|
+
query: {
|
|
1048
|
+
"limit" => limit,
|
|
1049
|
+
"offset" => offset
|
|
1050
|
+
},
|
|
1051
|
+
page: Types::TravelRuleDocument,
|
|
1052
|
+
request_options: request_options
|
|
1053
|
+
)
|
|
1054
|
+
end
|
|
769
1055
|
end
|
|
770
1056
|
|
|
771
1057
|
# The +travel_rule.networks+ resource.
|
|
@@ -1268,8 +1554,9 @@ module Didit
|
|
|
1268
1554
|
# Update wallet address holder metadata
|
|
1269
1555
|
#
|
|
1270
1556
|
# Partial update of holder_name, holder_vendor_data, entity_type, and travel_address. Setting travel_address
|
|
1271
|
-
# attaches a TRP routing address to the entry; invalid values are rejected with 400. The response
|
|
1272
|
-
#
|
|
1557
|
+
# attaches a TRP routing address to the entry; invalid values are rejected with 400. The response returns the
|
|
1558
|
+
# updated entry: its label, owner type, receiving travel address and ownership proof summary, with the
|
|
1559
|
+
# writable fields.
|
|
1273
1560
|
#
|
|
1274
1561
|
# +PATCH /v3/travel-rule/wallet-addresses/{entry_uuid}/+
|
|
1275
1562
|
#
|
|
@@ -1279,7 +1566,7 @@ module Didit
|
|
|
1279
1566
|
# @param entity_type [String]
|
|
1280
1567
|
# @param travel_address [String]
|
|
1281
1568
|
# @param request_options [Hash, nil] :timeout, :max_retries, :extra_headers, :extra_query, :extra_body
|
|
1282
|
-
# @return [Didit::Types::
|
|
1569
|
+
# @return [Didit::Types::WalletAddressEntryUpdateResponse]
|
|
1283
1570
|
def update(
|
|
1284
1571
|
entry_uuid,
|
|
1285
1572
|
holder_name: OMIT,
|
|
@@ -1298,7 +1585,7 @@ module Didit
|
|
|
1298
1585
|
"entity_type" => entity_type,
|
|
1299
1586
|
"travel_address" => travel_address
|
|
1300
1587
|
},
|
|
1301
|
-
response: Types::
|
|
1588
|
+
response: Types::WalletAddressEntryUpdateResponse,
|
|
1302
1589
|
request_options: request_options
|
|
1303
1590
|
)
|
|
1304
1591
|
end
|
|
@@ -198,6 +198,35 @@ module Didit
|
|
|
198
198
|
)
|
|
199
199
|
end
|
|
200
200
|
|
|
201
|
+
# List webhook destination activity
|
|
202
|
+
#
|
|
203
|
+
# Lists recorded failure alerts for one destination, newest first. Requires read:webhooks. Application/API-key
|
|
204
|
+
# credentials must belong to the application in the path; member Bearer tokens must have access to that
|
|
205
|
+
# application. These are failure alert events, not individual delivery attempts or outbound webhook event
|
|
206
|
+
# types. See [Webhooks](https://docs.didit.me/integration/webhooks#retry-policy).
|
|
207
|
+
#
|
|
208
|
+
# +GET /v3/organization/{organization_id}/application/{application_id}/webhook/destinations/{destination_uuid}/activity/+
|
|
209
|
+
#
|
|
210
|
+
# @param destination_uuid [String] Destination uuid.
|
|
211
|
+
# @param limit [Integer] Maximum results per page.
|
|
212
|
+
# @param offset [Integer] Number of results to skip.
|
|
213
|
+
# @param request_options [Hash, nil] :timeout, :max_retries, :extra_headers, :extra_query, :extra_body
|
|
214
|
+
# @return [Didit::Page<Didit::Types::WebhookDestinationActivity>]
|
|
215
|
+
def list_activity(destination_uuid, limit: OMIT, offset: OMIT, request_options: nil)
|
|
216
|
+
@client.request(
|
|
217
|
+
:get,
|
|
218
|
+
"/v3/organization/{organization_id}/application/{application_id}/webhook/destinations/{destination_uuid}/activity/",
|
|
219
|
+
path_params: { "destination_uuid" => destination_uuid },
|
|
220
|
+
query: {
|
|
221
|
+
"limit" => limit,
|
|
222
|
+
"offset" => offset
|
|
223
|
+
},
|
|
224
|
+
scope: :application,
|
|
225
|
+
page: Types::WebhookDestinationActivity,
|
|
226
|
+
request_options: request_options
|
|
227
|
+
)
|
|
228
|
+
end
|
|
229
|
+
|
|
201
230
|
# List webhook destination deliveries
|
|
202
231
|
#
|
|
203
232
|
# Page through every delivery attempt to one webhook destination, newest first. The first send of each event,
|
data/lib/didit/resources.rb
CHANGED
|
@@ -39,6 +39,7 @@ module Didit
|
|
|
39
39
|
autoload :Questionnaires, "didit/resources/questionnaires"
|
|
40
40
|
autoload :RegulatoryReports, "didit/resources/regulatory_reports"
|
|
41
41
|
autoload :ReportTemplates, "didit/resources/report_templates"
|
|
42
|
+
autoload :Reports, "didit/resources/reports"
|
|
42
43
|
autoload :Sandbox, "didit/resources/sandbox"
|
|
43
44
|
autoload :Sessions, "didit/resources/sessions"
|
|
44
45
|
autoload :Transactions, "didit/resources/transactions"
|
|
@@ -225,6 +226,11 @@ module Didit
|
|
|
225
226
|
@report_templates ||= Resources::ReportTemplates.new(self)
|
|
226
227
|
end
|
|
227
228
|
|
|
229
|
+
# @return [Didit::Resources::Reports]
|
|
230
|
+
def reports
|
|
231
|
+
@reports ||= Resources::Reports.new(self)
|
|
232
|
+
end
|
|
233
|
+
|
|
228
234
|
# @return [Didit::Resources::Sandbox]
|
|
229
235
|
def sandbox
|
|
230
236
|
@sandbox ||= Resources::Sandbox.new(self)
|