sumsub-ruby-sdk 0.1.1 → 0.1.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: 507bfecc21b02884373eeaaf2ef76729711b710b348a7d6de2b289349b5cb1ae
4
- data.tar.gz: e943a0860aa49188e629a87a43a8b09ecac65079cacd76e7ffb601c1b4d4aec9
3
+ metadata.gz: 5138a233e8f3beb86ecd09e241b8c4906bdd9e040ae9d609f36672fd25a5baa9
4
+ data.tar.gz: f5e877c88ee9b32d9eb9fc9a3bfbf4bf83f17695f8820129ca429cba5241e4e0
5
5
  SHA512:
6
- metadata.gz: 22eb29cf663da0995ae277ca39263b2c9e38a937c1b02a3ba7b750246b1292de7592ec336a772511555c34823e617506f8d4a9cc821560aed46dfc9be75695f7
7
- data.tar.gz: 5a3c8f478845385fc6a6f326b9d13043d6dc20930a2353d555cd3853f9fa0f5118500e3b8bc43f42cb9d8aa9aaaabb358a65c91833590b12c0bca32e2e64d063
6
+ metadata.gz: 7a87f86646a839edb25dce80e5273d0d2501f2369cb0d30c264c7a22f9a1eb74813876016eaa2b1bd121f76253d7df7e12f399cea7b7589b2128b6327b33a00c
7
+ data.tar.gz: cf1dc8e6b44e63443a6e603e9eec19ba5f9dd2c9854ab3c72afc5966c3783159a8116315915ecba9c1259ec05b680918aba38862e3262f5c30c8c92236895f1e
data/CHANGELOG.md ADDED
@@ -0,0 +1,2 @@
1
+ ### 0.1.2
2
+ - An instance of `Sumsub::Request` returns now only the url without `/resources` (e.g., `sumsub.url` was `https://api.sumsub.com/resources` and now it is `https://api.sumsub.com`).
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- sumsub-ruby-sdk (0.1.1)
4
+ sumsub-ruby-sdk (0.1.2)
5
5
  dry-struct (~> 1.4.0)
6
6
  http (~> 5.0.0)
7
7
  mime-types (~> 3.3.1)
data/README.md CHANGED
@@ -7,7 +7,7 @@ This gem is an unnoficial SDK for the [SumSub API](https://developers.sumsub.com
7
7
  Add this line to your application's Gemfile:
8
8
 
9
9
  ```ruby
10
- gem 'sumsub-ruby-sdk', '~> 0.1.1', require: 'sumsub'
10
+ gem 'sumsub-ruby-sdk', '~> 0.1.2', require: 'sumsub'
11
11
  ```
12
12
 
13
13
  And then execute:
@@ -1,7 +1,7 @@
1
1
  module Sumsub
2
2
  class Request
3
- PRODUCTION_URL = "https://api.sumsub.com/resources"
4
- TEST_URL = "https://test-api.sumsub.com/resources"
3
+ PRODUCTION_URL = "https://api.sumsub.com"
4
+ TEST_URL = "https://test-api.sumsub.com"
5
5
 
6
6
  attr_reader :url, :secret_key, :token
7
7
 
@@ -21,7 +21,7 @@ module Sumsub
21
21
  resource = "applicants?levelName=#{lvl_name}"
22
22
  headers = build_header(resource, body: applicant.to_json)
23
23
  response = HTTP.headers(headers)
24
- .post("#{@url}/#{resource}", json: applicant)
24
+ .post("#{@url}/resources/#{resource}", json: applicant)
25
25
 
26
26
  parse_response(response)
27
27
  end
@@ -61,7 +61,7 @@ module Sumsub
61
61
  content_type: 'multipart/form-data; boundary=' + boundary
62
62
  ).merge({ "X-Return-Doc-Warnings": true })
63
63
  response = HTTP.headers(headers)
64
- .post("#{@url}/#{resource}", body: body)
64
+ .post("#{@url}/resources/#{resource}", body: body)
65
65
 
66
66
  parse_response(response)
67
67
  end
@@ -71,7 +71,7 @@ module Sumsub
71
71
  resource = "applicants/#{applicant_id}/requiredIdDocsStatus"
72
72
  headers = build_header(resource, method: 'GET')
73
73
  response = HTTP.headers(headers)
74
- .get("#{@url}/#{resource}")
74
+ .get("#{@url}/resources/#{resource}")
75
75
 
76
76
  parse_response(response)
77
77
  end
@@ -83,7 +83,7 @@ module Sumsub
83
83
  "applicants/#{applicant_id}/one"
84
84
  headers = build_header(resource, method: 'GET')
85
85
  response = HTTP.headers(headers)
86
- .get("#{@url}/#{resource}")
86
+ .get("#{@url}/resources/#{resource}")
87
87
 
88
88
  parse_response(response)
89
89
  end
@@ -93,7 +93,7 @@ module Sumsub
93
93
  resource = "applicants/#{applicant_id}/status"
94
94
  headers = build_header(resource, method: 'GET')
95
95
  response = HTTP.headers(headers)
96
- .get("#{@url}/#{resource}")
96
+ .get("#{@url}/resources/#{resource}")
97
97
 
98
98
  parse_response(response)
99
99
  end
@@ -103,7 +103,7 @@ module Sumsub
103
103
  resource = "applicants/#{applicant_id}/status/pending?reason=#{reason}"
104
104
  headers = build_header(resource)
105
105
  response = HTTP.headers(headers)
106
- .post("#{@url}/#{resource}")
106
+ .post("#{@url}/resources/#{resource}")
107
107
 
108
108
  parse_response(response)
109
109
  end
@@ -113,7 +113,7 @@ module Sumsub
113
113
  resource = "inspections/#{inspection_id}/resources/#{image_id}"
114
114
  headers = build_header(resource, method: 'GET')
115
115
  response = HTTP.headers(headers)
116
- .get("#{@url}/#{resource}")
116
+ .get("#{@url}/resources/#{resource}")
117
117
 
118
118
  parse_response(response)
119
119
  end
@@ -123,7 +123,7 @@ module Sumsub
123
123
  resource = "applicants/#{applicant_id}/reset"
124
124
  headers = build_header(resource)
125
125
  response = HTTP.headers(headers)
126
- .post("#{@url}/#{resource}")
126
+ .post("#{@url}/resources/#{resource}")
127
127
 
128
128
  parse_response(response)
129
129
  end
@@ -134,7 +134,7 @@ module Sumsub
134
134
  resource = "applicants/"
135
135
  headers = build_header(resource, method: 'PATCH', body: applicant_new_values.to_json)
136
136
  response = HTTP.headers(headers)
137
- .patch("#{@url}/#{resource}", json: applicant_new_values)
137
+ .patch("#{@url}/resources/#{resource}", json: applicant_new_values)
138
138
 
139
139
  parse_response(response)
140
140
  end
@@ -144,7 +144,7 @@ module Sumsub
144
144
  resource = "accessTokens?userId=#{user_id}&ttlInSecs=#{ttl_in_seconds}&external_action_id=#{external_action_id}"
145
145
  headers = build_header(resource, method: 'POST')
146
146
  response = HTTP.headers(headers)
147
- .post("#{@url}/#{resource}")
147
+ .post("#{@url}/resources/#{resource}")
148
148
 
149
149
  parse_response(response)
150
150
  end
@@ -162,7 +162,7 @@ module Sumsub
162
162
  )
163
163
 
164
164
  response = HTTP.headers(headers)
165
- .post("#{@url}/#{resource}", body: payload)
165
+ .post("#{@url}/resources/#{resource}", body: payload)
166
166
 
167
167
  parse_response(response)
168
168
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Sumsub
4
- VERSION = "0.1.1"
4
+ VERSION = "0.1.2"
5
5
  end
@@ -18,7 +18,7 @@ Gem::Specification.new do |spec|
18
18
 
19
19
  spec.metadata["homepage_uri"] = spec.homepage
20
20
  spec.metadata["source_code_uri"] = "https://github.com/rwehresmann/sumsub-ruby-sdk"
21
- spec.metadata["changelog_uri"] = "https://github.com/rwehresmann/sumsub-ruby-sdk"
21
+ spec.metadata["changelog_uri"] = "https://github.com/rwehresmann/sumsub-ruby-sdk/blob/master/CHANGELOG.md"
22
22
 
23
23
  # Specify which files should be added to the gem when it is released.
24
24
  # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sumsub-ruby-sdk
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rodrigo W. Ehresmann
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-05-26 00:00:00.000000000 Z
11
+ date: 2021-05-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: http
@@ -119,6 +119,7 @@ files:
119
119
  - ".editorconfig"
120
120
  - ".gitignore"
121
121
  - ".rspec"
122
+ - CHANGELOG.md
122
123
  - Gemfile
123
124
  - Gemfile.lock
124
125
  - LICENSE.txt
@@ -148,7 +149,7 @@ metadata:
148
149
  allowed_push_host: https://rubygems.org
149
150
  homepage_uri: https://github.com/rwehresmann/sumsub-ruby-sdk
150
151
  source_code_uri: https://github.com/rwehresmann/sumsub-ruby-sdk
151
- changelog_uri: https://github.com/rwehresmann/sumsub-ruby-sdk
152
+ changelog_uri: https://github.com/rwehresmann/sumsub-ruby-sdk/blob/master/CHANGELOG.md
152
153
  post_install_message:
153
154
  rdoc_options: []
154
155
  require_paths: