sumsub-ruby-sdk 0.2.0 → 0.2.2

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9413196d575bbddc26d58047d48137b768f70aa7b257187073338b468c109068
4
- data.tar.gz: 6a291133d2e3a5417ec4f83ca3f30f24130d2e2018f3d768e068345ecf20198d
3
+ metadata.gz: f2bf9c16ba9c5b111a784b7ceec422c9f261e927289a568c9b346b814b8de5fe
4
+ data.tar.gz: e8c1b0a7fa1e616f3998191109538802fc7f90a3ea6b6af4dcbe4ca2edd59554
5
5
  SHA512:
6
- metadata.gz: bda4bb1f88238b57859559b6fcf740550b92225a0290b764a6c29560e6567da41fc5b994b9caac0ec5d273304108abc800d8da2fb5a4d536c2cf2553a75beebd
7
- data.tar.gz: f36d963aae4ef9416227e85893fcb58369d40a9302916ddd74eeca8e2c532ada9608ac12296a7625525b8123f70f8607812ae8b54829ac9b63df63d08620bacc
6
+ metadata.gz: 51f1ba2890fdb770f0ccc56b9061c1d048fd4327c8a1cfefe78d8452b1f64d34953e2fdab7979d560679f1af62a8e69a485ce85e7c760bad489170b5a301ecb3
7
+ data.tar.gz: 0f16d8a52e34f4beba32a89ed101fe69db003d930234c4819aca2ac35c4d58f993a3b210680449752016af48faddfbe4b0fa2d51765422bc232bc47f6a38d9ce
data/CHANGELOG.md CHANGED
@@ -4,9 +4,15 @@
4
4
  ### 0.1.3
5
5
  - Require level name as argument in `get_access_token` of `Sumsub::Request`. This change makes the method compatible with the [recent updates in the Sumsub SDK](https://developers.sumsub.com/migrations/sdk.html#sdk-migration-guide).
6
6
 
7
- ### 0.2.0
7
+ ### 0.1.4
8
8
  - General minor fixes (don't require dev gems in the production build, add extra ignored files in `.gitignore`, etc);
9
9
  - Move the `require 'dry-struct'` to the `lib/sumsub.rb`, so we don't need to always require it in our structs;
10
10
  - Add [`generate_external_link`](https://developers.sumsub.com/api-reference/additional-methods.html#generating-websdk-external-link-for-particular-user);
11
11
  - Updated structs with new fields;
12
12
  - Add `WebhookSender` with `get_payload` class method to format the payload before informing it to the `verify_webhook_sender` method (those strange string transformations are necessary in order to receive the right answer from Sumsub).
13
+
14
+ ### 0.2.1
15
+ - New rejection labels ([PR](ydakuka:replace-old-reject-label-with-new-ones))
16
+
17
+ ### 0.2.2
18
+ - Update Subsub types ([PR](https://github.com/rwehresmann/sumsub-ruby-sdk/pull/10))
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- sumsub-ruby-sdk (0.1.3)
4
+ sumsub-ruby-sdk (0.2.2)
5
5
  dry-struct (~> 1.4)
6
6
  http (>= 4.0)
7
7
  mime-types (~> 3.3)
@@ -9,97 +9,117 @@ PATH
9
9
  GEM
10
10
  remote: https://rubygems.org/
11
11
  specs:
12
- addressable (2.8.0)
13
- public_suffix (>= 2.0.2, < 5.0)
12
+ addressable (2.8.7)
13
+ public_suffix (>= 2.0.2, < 7.0)
14
+ bigdecimal (3.3.1)
14
15
  coderay (1.1.3)
15
- concurrent-ruby (1.1.9)
16
- crack (0.4.5)
16
+ concurrent-ruby (1.3.5)
17
+ crack (1.0.1)
18
+ bigdecimal
17
19
  rexml
18
- diff-lcs (1.4.4)
19
- domain_name (0.5.20190701)
20
- unf (>= 0.0.5, < 1.0.0)
21
- dry-configurable (0.13.0)
20
+ diff-lcs (1.6.2)
21
+ domain_name (0.6.20240107)
22
+ dry-core (1.1.0)
22
23
  concurrent-ruby (~> 1.0)
23
- dry-core (~> 0.6)
24
- dry-container (0.9.0)
24
+ logger
25
+ zeitwerk (~> 2.6)
26
+ dry-inflector (1.2.0)
27
+ dry-logic (1.6.0)
28
+ bigdecimal
25
29
  concurrent-ruby (~> 1.0)
26
- dry-configurable (~> 0.13, >= 0.13.0)
27
- dry-core (0.7.1)
28
- concurrent-ruby (~> 1.0)
29
- dry-inflector (0.2.1)
30
- dry-logic (1.2.0)
31
- concurrent-ruby (~> 1.0)
32
- dry-core (~> 0.5, >= 0.5)
33
- dry-struct (1.4.0)
34
- dry-core (~> 0.5, >= 0.5)
35
- dry-types (~> 1.5)
30
+ dry-core (~> 1.1)
31
+ zeitwerk (~> 2.6)
32
+ dry-struct (1.8.0)
33
+ dry-core (~> 1.1)
34
+ dry-types (~> 1.8, >= 1.8.2)
36
35
  ice_nine (~> 0.11)
37
- dry-types (1.5.1)
36
+ zeitwerk (~> 2.6)
37
+ dry-types (1.8.3)
38
+ bigdecimal (~> 3.0)
38
39
  concurrent-ruby (~> 1.0)
39
- dry-container (~> 0.3)
40
- dry-core (~> 0.5, >= 0.5)
41
- dry-inflector (~> 0.1, >= 0.1.2)
42
- dry-logic (~> 1.0, >= 1.0.2)
43
- ffi (1.15.4)
44
- ffi-compiler (1.0.1)
45
- ffi (>= 1.0.0)
40
+ dry-core (~> 1.0)
41
+ dry-inflector (~> 1.0)
42
+ dry-logic (~> 1.4)
43
+ zeitwerk (~> 2.6)
44
+ ffi (1.17.2)
45
+ ffi (1.17.2-aarch64-linux-gnu)
46
+ ffi (1.17.2-aarch64-linux-musl)
47
+ ffi (1.17.2-arm-linux-gnu)
48
+ ffi (1.17.2-arm-linux-musl)
49
+ ffi (1.17.2-arm64-darwin)
50
+ ffi (1.17.2-x86-linux-gnu)
51
+ ffi (1.17.2-x86-linux-musl)
52
+ ffi (1.17.2-x86_64-darwin)
53
+ ffi (1.17.2-x86_64-linux-gnu)
54
+ ffi (1.17.2-x86_64-linux-musl)
55
+ ffi-compiler (1.3.2)
56
+ ffi (>= 1.15.5)
46
57
  rake
47
- hashdiff (1.0.1)
48
- http (5.0.0)
49
- addressable (~> 2.3)
58
+ hashdiff (1.2.1)
59
+ http (5.3.1)
60
+ addressable (~> 2.8)
50
61
  http-cookie (~> 1.0)
51
62
  http-form_data (~> 2.2)
52
- llhttp-ffi (~> 0.0.1)
53
- http-cookie (1.0.4)
63
+ llhttp-ffi (~> 0.5.0)
64
+ http-cookie (1.1.0)
54
65
  domain_name (~> 0.5)
55
66
  http-form_data (2.3.0)
56
67
  ice_nine (0.11.2)
57
- llhttp-ffi (0.0.1)
68
+ llhttp-ffi (0.5.1)
58
69
  ffi-compiler (~> 1.0)
59
70
  rake (~> 13.0)
60
- method_source (1.0.0)
61
- mime-types (3.4.1)
62
- mime-types-data (~> 3.2015)
63
- mime-types-data (3.2021.1115)
64
- pry (0.14.1)
71
+ logger (1.7.0)
72
+ method_source (1.1.0)
73
+ mime-types (3.7.0)
74
+ logger
75
+ mime-types-data (~> 3.2025, >= 3.2025.0507)
76
+ mime-types-data (3.2025.0924)
77
+ pry (0.15.2)
65
78
  coderay (~> 1.1)
66
79
  method_source (~> 1.0)
67
- public_suffix (4.0.6)
68
- rake (13.0.6)
69
- rexml (3.2.5)
70
- rspec (3.10.0)
71
- rspec-core (~> 3.10.0)
72
- rspec-expectations (~> 3.10.0)
73
- rspec-mocks (~> 3.10.0)
74
- rspec-core (3.10.1)
75
- rspec-support (~> 3.10.0)
76
- rspec-expectations (3.10.1)
80
+ public_suffix (6.0.2)
81
+ rake (13.3.1)
82
+ rexml (3.4.4)
83
+ rspec (3.13.2)
84
+ rspec-core (~> 3.13.0)
85
+ rspec-expectations (~> 3.13.0)
86
+ rspec-mocks (~> 3.13.0)
87
+ rspec-core (3.13.6)
88
+ rspec-support (~> 3.13.0)
89
+ rspec-expectations (3.13.5)
77
90
  diff-lcs (>= 1.2.0, < 2.0)
78
- rspec-support (~> 3.10.0)
79
- rspec-mocks (3.10.2)
91
+ rspec-support (~> 3.13.0)
92
+ rspec-mocks (3.13.7)
80
93
  diff-lcs (>= 1.2.0, < 2.0)
81
- rspec-support (~> 3.10.0)
82
- rspec-support (3.10.3)
83
- timecop (0.9.4)
84
- unf (0.1.4)
85
- unf_ext
86
- unf_ext (0.0.8)
87
- webmock (3.14.0)
94
+ rspec-support (~> 3.13.0)
95
+ rspec-support (3.13.6)
96
+ timecop (0.9.10)
97
+ webmock (3.26.1)
88
98
  addressable (>= 2.8.0)
89
99
  crack (>= 0.3.2)
90
100
  hashdiff (>= 0.4.0, < 2.0.0)
101
+ zeitwerk (2.7.3)
91
102
 
92
103
  PLATFORMS
104
+ aarch64-linux-gnu
105
+ aarch64-linux-musl
106
+ arm-linux-gnu
107
+ arm-linux-musl
108
+ arm64-darwin
93
109
  ruby
94
- x86_64-linux
110
+ x86-linux-gnu
111
+ x86-linux-musl
112
+ x86_64-darwin
113
+ x86_64-linux-gnu
114
+ x86_64-linux-musl
95
115
 
96
116
  DEPENDENCIES
97
117
  pry (~> 0.14)
98
118
  rake (~> 13.0)
99
- rspec (~> 3.0)
119
+ rspec (~> 3.10, ~> 3.0)
100
120
  sumsub-ruby-sdk!
101
121
  timecop (~> 0.9)
102
122
  webmock (~> 3.13)
103
123
 
104
124
  BUNDLED WITH
105
- 2.2.32
125
+ 2.7.2
data/lib/sumsub/types.rb CHANGED
@@ -4,33 +4,36 @@ module Sumsub
4
4
  module Types
5
5
  include Dry.Types()
6
6
 
7
- # https://developers.sumsub.com/api-reference/#supported-document-types
7
+ # https://docs.sumsub.com/reference/add-verification-documents#supported-document-types
8
8
  IdDocTypes = Types::Strict::Symbol
9
9
  .constructor(&:to_sym)
10
10
  .enum(
11
- :ID_CARD,
12
- :PASSPORT,
13
- :DRIVERS, # Driving license
14
- :RESIDENCE_PERMIT,
15
- :UTILITY_BILL,
16
- :SELFIE,
17
- :VIDEO_SELFIE,
18
- :PROFILE_IMAGE,
19
- :ID_DOC_PHOTO,
20
11
  :AGREEMENT,
12
+ :ARBITRARY_DOC,
13
+ :BANK_CARD,
21
14
  :CONTRACT,
15
+ :COVID_VACCINATION_FORM,
16
+ :DRIVERS, # Driving license
22
17
  :DRIVERS_TRANSLATION,
18
+ :FILE_ATTACHMENT,
19
+ :ID_CARD,
20
+ :ID_DOC_PHOTO,
21
+ :INCOME_SOURCE, # Proof of income
23
22
  :INVESTOR_DOC,
23
+ :PASSPORT,
24
+ :PAYMENT_SOURCE,
25
+ :PROFILE_IMAGE,
26
+ :RESIDENCE_PERMIT,
27
+ :SELFIE,
28
+ :UTILITY_BILL, # Proof of address document
29
+ :UTILITY_BILL2, # Second proof of address document
24
30
  :VEHICLE_REGISTRATION_CERTIFICATE,
25
- :INCOME_SOURCE, # Proof of income
26
- :PAYMENT_METHOD,
27
- :BANK_CARD,
28
- :COVID_VACCINATION_FORM,
31
+ :VIDEO_SELFIE,
29
32
  :OTHER,
30
33
  nil,
31
34
  )
32
35
 
33
- # https://developers.sumsub.com/api-reference/#request-metadata-body-part-fields
36
+ # https://docs.sumsub.com/reference/add-verification-documents
34
37
  IdDocSubTypes = Types::Strict::Symbol
35
38
  .constructor(&:to_sym)
36
39
  .enum(
@@ -39,7 +42,7 @@ module Sumsub
39
42
  nil,
40
43
  )
41
44
 
42
- # https://developers.sumsub.com/api-reference/#getting-verification-results
45
+ # https://docs.sumsub.com/docs/receive-and-interpret-results-via-api
43
46
  ReviewAnswers = Types::Strict::Symbol
44
47
  .constructor(&:to_sym)
45
48
  .enum(
@@ -47,68 +50,92 @@ module Sumsub
47
50
  :RED,
48
51
  )
49
52
 
50
- # https://developers.sumsub.com/api-reference/#getting-verification-results
51
- RejectLabels = Types::Strict::Symbol
53
+ # https://docs.sumsub.com/docs/receive-and-interpret-results-via-api#rejected-labels
54
+ RejectedLabels = Types::Strict::Symbol
52
55
  .constructor(&:to_sym)
53
56
  .enum(
54
- :FORGERY,
57
+ :ADVERSE_MEDIA,
58
+ :AGE_REQUIREMENT_MISMATCH,
59
+ :BLOCKLIST,
60
+ :CHECK_UNAVAILABLE,
61
+ :COMPROMISED_PERSONS,
62
+ :CRIMINAL,
63
+ :DB_DATA_MISMATCH,
64
+ :DB_DATA_NOT_FOUND,
55
65
  :DOCUMENT_TEMPLATE,
56
- :LOW_QUALITY,
57
- :SPAM,
58
- :NOT_DOCUMENT,
59
- :SELFIE_MISMATCH,
60
- :ID_INVALID,
61
- :FOREIGNER,
62
66
  :DUPLICATE,
63
- :BAD_AVATAR,
64
- :WRONG_USER_REGION,
65
- :INCOMPLETE_DOCUMENT,
66
- :BLACKLIST,
67
- :UNSATISFACTORY_PHOTOS,
68
- :DOCUMENT_PAGE_MISSING,
69
- :DOCUMENT_DAMAGED,
70
- :REGULATIONS_VIOLATIONS,
71
- :INCONSISTENT_PROFILE,
72
- :PROBLEMATIC_APPLICANT_DATA,
73
- :ADDITIONAL_DOCUMENT_REQUIRED,
74
- :AGE_REQUIREMENT_MISMATCH,
75
67
  :EXPERIENCE_REQUIREMENT_MISMATCH,
76
- :CRIMINAL,
77
- :WRONG_ADDRESS,
78
- :GRAPHIC_EDITOR,
79
- :DOCUMENT_DEPRIVED,
80
- :COMPROMISED_PERSONS,
81
- :PEP,
82
- :ADVERSE_MEDIA,
68
+ :EXTERNAL_DECISION_REJECTION,
69
+ :FORGERY,
70
+ :FRAUDULENT_LIVENESS,
83
71
  :FRAUDULENT_PATTERNS,
72
+ :INCONSISTENT_PROFILE,
73
+ :PEP,
74
+ :REGULATIONS_VIOLATIONS,
84
75
  :SANCTIONS,
85
- :NOT_ALL_CHECKS_COMPLETED,
86
- :FRONT_SIDE_MISSING,
76
+ :SELFIE_MISMATCH,
77
+ :SPAM,
78
+ :NOT_DOCUMENT,
79
+ :THIRD_PARTY_INVOLVED,
80
+ :UNSUPPORTED_LANGUAGE,
81
+ :WRONG_USER_REGION,
82
+ :SUSPICIOUS_PATTERNS,
83
+ )
84
+
85
+ # https://docs.sumsub.com/docs/receive-and-interpret-results-via-api#resubmission-requested-labels
86
+ ResubmissionRequestedLabels = Types::Strict::Symbol
87
+ .constructor(&:to_sym)
88
+ .enum(
89
+ :APPLICANT_INTERRUPTED_INTERVIEW,
90
+ :ADDITIONAL_DOCUMENT_REQUIRED,
87
91
  :BACK_SIDE_MISSING,
88
- :SCREENSHOTS,
89
- :BLACK_AND_WHITE,
90
- :INCOMPATIBLE_LANGUAGE,
91
- :EXPIRATION_DATE,
92
- :UNFILLED_ID,
93
- :BAD_SELFIE,
94
- :BAD_VIDEO_SELFIE,
92
+ :BAD_AVATAR,
95
93
  :BAD_FACE_MATCHING,
96
- :BAD_PROOF_OF_IDENTITY,
97
94
  :BAD_PROOF_OF_ADDRESS,
95
+ :BAD_PROOF_OF_IDENTITY,
98
96
  :BAD_PROOF_OF_PAYMENT,
99
- :SELFIE_WITH_PAPER,
100
- :FRAUDULENT_LIVENESS,
101
- :OTHER,
102
- :REQUESTED_DATA_MISMATCH,
103
- :OK,
104
- :COMPANY_NOT_DEFINED_STRUCTURE,
97
+ :BAD_SELFIE,
98
+ :BAD_VIDEO_SELFIE,
99
+ :BLACK_AND_WHITE,
105
100
  :COMPANY_NOT_DEFINED_BENEFICIARIES,
106
- :COMPANY_NOT_VALIDATED_BENEFICIARIES,
107
101
  :COMPANY_NOT_DEFINED_REPRESENTATIVES,
102
+ :COMPANY_NOT_DEFINED_STRUCTURE,
103
+ :COMPANY_NOT_VALIDATED_BENEFICIARIES,
108
104
  :COMPANY_NOT_VALIDATED_REPRESENTATIVES,
105
+ :CONNECTION_INTERRUPTED,
106
+ :DIGITAL_DOCUMENT,
107
+ :DOCUMENT_DEPRIVED,
108
+ :DOCUMENT_DAMAGED,
109
+ :DOCUMENT_MISSING,
110
+ :DOCUMENT_PAGE_MISSING,
111
+ :EXPIRATION_DATE,
112
+ :FRONT_SIDE_MISSING,
113
+ :GRAPHIC_EDITOR,
114
+ :ID_INVALID,
115
+ :INCOMPATIBLE_LANGUAGE,
116
+ :INCOMPLETE_DOCUMENT,
117
+ :INCORRECT_SOCIAL_NUMBER,
118
+ :PROBLEMATIC_APPLICANT_DATA,
119
+ :REQUESTED_DATA_MISMATCH,
120
+ :SELFIE_WITH_PAPER,
121
+ :LOW_QUALITY,
122
+ :NOT_ALL_CHECKS_COMPLETED,
123
+ :SCREENSHOTS,
124
+ :UNFILLED_ID,
125
+ :UNSATISFACTORY_PHOTOS,
126
+ :UNSUITABLE_ENV,
127
+ :WRONG_ADDRESS,
109
128
  )
110
129
 
111
- # https://developers.sumsub.com/api-reference/#getting-verification-results
130
+ # https://docs.sumsub.com/docs/receive-and-interpret-results-via-api#understand-rejection
131
+ RejectLabels = Types::Strict::Symbol
132
+ .constructor(&:to_sym)
133
+ .enum(
134
+ *RejectedLabels.values,
135
+ *ResubmissionRequestedLabels.values
136
+ )
137
+
138
+ # https://docs.sumsub.com/docs/receive-and-interpret-results-via-api
112
139
  ReviewRejectTypes = Types::Strict::Symbol
113
140
  .constructor(&:to_sym)
114
141
  .enum(
@@ -116,22 +143,31 @@ module Sumsub
116
143
  :RETRY,
117
144
  )
118
145
 
119
- # https://developers.sumsub.com/api-reference/#webhook-types
146
+ # https://docs.sumsub.com/docs/user-verification-webhooks
120
147
  WebhookTypes = Types::Strict::Symbol
121
148
  .constructor(&:to_sym)
122
149
  .enum(
123
- :applicantReviewed,
124
- :applicantPending,
125
150
  :applicantCreated,
151
+ :applicantPending,
152
+ :applicantReviewed,
126
153
  :applicantOnHold,
127
- :applicantPersonalInfoChanged,
128
- :applicantPrechecked,
129
- :applicantDeleted,
130
- :videoIdentStatusChanged,
131
- :applicantReset,
132
154
  :applicantActionPending,
133
155
  :applicantActionReviewed,
134
156
  :applicantActionOnHold,
157
+ :applicantPersonalInfoChanged,
158
+ :applicantTagsChanged,
159
+ :applicantActivated,
160
+ :applicantDeactivated,
161
+ :applicantDeleted,
162
+ :applicantReset,
163
+ :applicantPrechecked,
164
+ :applicantLevelChanged,
165
+ :applicantWorkflowCompleted,
166
+ :applicantWorkflowFailed,
167
+ :videoIdentStatusChanged,
168
+ :videoIdentCompositionCompleted,
169
+ :applicantAwaitingService,
170
+ :applicantAwaitingUser,
135
171
  )
136
172
  end
137
173
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Sumsub
4
- VERSION = "0.2.0"
4
+ VERSION = "0.2.2"
5
5
  end
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sumsub-ruby-sdk
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rodrigo W. Ehresmann
8
- autorequire:
9
8
  bindir: exe
10
9
  cert_chain: []
11
- date: 2022-03-14 00:00:00.000000000 Z
10
+ date: 2025-11-06 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
13
  name: http
@@ -153,7 +152,6 @@ metadata:
153
152
  homepage_uri: https://github.com/rwehresmann/sumsub-ruby-sdk
154
153
  source_code_uri: https://github.com/rwehresmann/sumsub-ruby-sdk
155
154
  changelog_uri: https://github.com/rwehresmann/sumsub-ruby-sdk/blob/master/CHANGELOG.md
156
- post_install_message:
157
155
  rdoc_options: []
158
156
  require_paths:
159
157
  - lib
@@ -168,8 +166,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
168
166
  - !ruby/object:Gem::Version
169
167
  version: '0'
170
168
  requirements: []
171
- rubygems_version: 3.0.9
172
- signing_key:
169
+ rubygems_version: 3.6.2
173
170
  specification_version: 4
174
171
  summary: SumSub Ruby SDK
175
172
  test_files: []