smile-identity-core 1.0.0 → 1.0.1
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 +5 -0
- data/Gemfile.lock +1 -1
- data/lib/smile-identity-core/id_api.rb +5 -1
- data/lib/smile-identity-core/version.rb +1 -1
- data/lib/smile-identity-core/web_api.rb +2 -5
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: edcf68a6d2595ffaaace47ea75b7a7ef4829072f02ef7095564472261563649a
|
|
4
|
+
data.tar.gz: e6657acf87f95de20366f5a559118bfcea6a58757bfa77a88984b083d44c2fe1
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: bc0a67955105b33ca0cd3a287772ec3666a6fc22f1f5ae3c1a0d47f1fc2b70838b830748d7f29d14dde39bc84ce230d4d45028cd40b9c06ae8d419a39ff29654
|
|
7
|
+
data.tar.gz: 7b4afa3dafab637388ffead740accaea4d1ba43327297ca7567a80ad180d60bbf39507e7865071275305b4e781bce1540ec484a4f5c576f3c73293283d175ef1
|
data/CHANGELOG.md
CHANGED
|
@@ -39,3 +39,8 @@ Amend the success response when job status is false to be a JSON String containi
|
|
|
39
39
|
Add the ID API Class
|
|
40
40
|
Add the ability to query ID Api from the Web API class
|
|
41
41
|
Update the documentation
|
|
42
|
+
|
|
43
|
+
## [1.0.1] - 2019-10-24
|
|
44
|
+
## Updated
|
|
45
|
+
Remove first_name and last_name validations from id information in Web Api
|
|
46
|
+
Add country, id_number and id_type validations for id information in ID Api
|
data/Gemfile.lock
CHANGED
|
@@ -57,7 +57,11 @@ module SmileIdentityCore
|
|
|
57
57
|
raise ArgumentError.new("Please make sure that id_info not empty or nil")
|
|
58
58
|
end
|
|
59
59
|
|
|
60
|
-
|
|
60
|
+
[:country, :id_type, :id_number].each do |key|
|
|
61
|
+
unless updated_id_info[key] && !updated_id_info[key].nil? && !updated_id_info[key].empty?
|
|
62
|
+
raise ArgumentError.new("Please make sure that #{key.to_s} is included in the id_info")
|
|
63
|
+
end
|
|
64
|
+
end
|
|
61
65
|
|
|
62
66
|
@id_info = updated_id_info
|
|
63
67
|
end
|
|
@@ -97,6 +97,7 @@ module SmileIdentityCore
|
|
|
97
97
|
end
|
|
98
98
|
|
|
99
99
|
@images = images.map { |image| symbolize_keys image }
|
|
100
|
+
|
|
100
101
|
end
|
|
101
102
|
|
|
102
103
|
def id_info=(id_info)
|
|
@@ -118,17 +119,13 @@ module SmileIdentityCore
|
|
|
118
119
|
end
|
|
119
120
|
|
|
120
121
|
if updated_id_info[:entered] && updated_id_info[:entered] == 'true'
|
|
121
|
-
[:
|
|
122
|
+
[:country, :id_type, :id_number].each do |key|
|
|
122
123
|
unless id_info[key] && !id_info[key].nil? && !id_info[key].empty?
|
|
123
124
|
raise ArgumentError.new("Please make sure that #{key.to_s} is included in the id_info")
|
|
124
125
|
end
|
|
125
126
|
end
|
|
126
127
|
end
|
|
127
128
|
|
|
128
|
-
if updated_id_info[:country] && updated_id_info[:country].upcase == 'NG' && ['PASSPORT', 'VOTER_ID', 'DRIVERS_LICENSE', 'NATIONAL_ID', 'TIN', 'CAC'].include?(updated_id_info[:id_type].upcase) && (!updated_id_info[:dob] || updated_id_info[:dob].empty? || updated_id_info[:dob].nil?)
|
|
129
|
-
raise ArgumentError.new("The ID type #{updated_id_info[:id_type]} for #{updated_id_info[:country]} requires a valid dob paramater.")
|
|
130
|
-
end
|
|
131
|
-
|
|
132
129
|
@id_info = updated_id_info
|
|
133
130
|
end
|
|
134
131
|
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: smile-identity-core
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.0.
|
|
4
|
+
version: 1.0.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Ridhwana
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2019-10-
|
|
11
|
+
date: 2019-10-25 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|