trinsic_api 2.1.0 → 2.1.1.pre.alpha2

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: eaf796566e0140c2a1920c7286603bb664765ba473ec2df70ea9c34248e3b4eb
4
- data.tar.gz: 13d5df25d199407075660c37da7fba5fae647c6ce47da3db62a17346fb3d702a
3
+ metadata.gz: fb8c1256f2b82fda2cfe039fe0f639205d0eaf4fb723e7e624dd3e1ac0a9e035
4
+ data.tar.gz: 37e08a82c6a552c962d76f2944e9b5649671e2431bb7c2c6963d00e2d3517bd3
5
5
  SHA512:
6
- metadata.gz: 65c764cf9575db00fa654d15543eb6d97a89e1e4bd60d7721567daa7379f6f6179aa362cbedaca1d8bc38f84135858a1404913341388ecd4febcf2943b82c5d7
7
- data.tar.gz: 87cc19483b259d4a147ef3fc0bcf29cda5779eb04e28c8f46a4f5add26d9545753b9b531df3c3c363a98a96105f4dde22c32307fb56c13a26c0aad53270a7233
6
+ metadata.gz: e1e545618fdf78ebbfdc87b5196c25182dd8307c1decff05bddbaea687c6047626f24ff4f47492f02fac8e1b130d82bb08f1d32f94ddff9c9641d49c5e511706
7
+ data.tar.gz: 52bca12c0a068c80774e791d8c143a6145f9bb8b5a7b13dec6e2bc7d6db91c9c231ae8ed6e1beb536d65a7cecaefdb8ca983d8feb9eb9441378f885e290fbf32
data/docs/IdentityData.md CHANGED
@@ -8,6 +8,7 @@
8
8
  | **originating_sub_provider_id** | **String** | | [optional] |
9
9
  | **person** | [**PersonData**](PersonData.md) | | [optional] |
10
10
  | **document** | [**DocumentData**](DocumentData.md) | | [optional] |
11
+ | **match** | [**MatchData**](MatchData.md) | | [optional] |
11
12
  | **attachment_access_keys** | [**AttachmentAccessKeys**](AttachmentAccessKeys.md) | | [optional] |
12
13
 
13
14
  ## Example
@@ -20,6 +21,7 @@ instance = TrinsicApi::IdentityData.new(
20
21
  originating_sub_provider_id: null,
21
22
  person: null,
22
23
  document: null,
24
+ match: null,
23
25
  attachment_access_keys: null
24
26
  )
25
27
  ```
@@ -0,0 +1,32 @@
1
+ # TrinsicApi::IndonesiaDukcapilMatchInput
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **full_name** | **String** | The user's full name | [optional] |
8
+ | **date_of_birth** | **Date** | The user's date of birth, in `YYYY-MM-DD` format | [optional] |
9
+ | **nik_id_number** | **String** | The user's Indonesia NIK ID number | [optional] |
10
+ | **email** | **String** | The email address of the individual. Either email or phone number must be provided. | [optional] |
11
+ | **phone_number** | **String** | The phone number of the individual. Either email or phone number must be provided. | [optional] |
12
+ | **selfie_image** | **String** | The raw bytes of the selfie image of the individual. Must be JPEG or PNG format; 10MB maximum. | [optional] |
13
+ | **document_image** | **String** | The raw bytes of the image of the individual's KTP government ID. Must be JPEG format; 1MB maximum. Optional. | [optional] |
14
+ | **consent_given_at** | **Time** | The timestamp when consent was given by the user for the verification. | [optional] |
15
+
16
+ ## Example
17
+
18
+ ```ruby
19
+ require 'trinsic_api'
20
+
21
+ instance = TrinsicApi::IndonesiaDukcapilMatchInput.new(
22
+ full_name: null,
23
+ date_of_birth: null,
24
+ nik_id_number: null,
25
+ email: null,
26
+ phone_number: null,
27
+ selfie_image: null,
28
+ document_image: null,
29
+ consent_given_at: null
30
+ )
31
+ ```
32
+
data/docs/Match.md ADDED
@@ -0,0 +1,20 @@
1
+ # TrinsicApi::Match
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **probability_value** | **Float** | | [optional] |
8
+ | **boolean_value** | **Boolean** | | [optional] |
9
+
10
+ ## Example
11
+
12
+ ```ruby
13
+ require 'trinsic_api'
14
+
15
+ instance = TrinsicApi::Match.new(
16
+ probability_value: null,
17
+ boolean_value: null
18
+ )
19
+ ```
20
+
data/docs/MatchData.md ADDED
@@ -0,0 +1,36 @@
1
+ # TrinsicApi::MatchData
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **national_id_number** | [**Match**](Match.md) | | [optional] |
8
+ | **full_name** | [**Match**](Match.md) | | [optional] |
9
+ | **given_name** | [**Match**](Match.md) | | [optional] |
10
+ | **middle_name** | [**Match**](Match.md) | | [optional] |
11
+ | **family_name** | [**Match**](Match.md) | | [optional] |
12
+ | **sex** | [**Match**](Match.md) | | [optional] |
13
+ | **date_of_birth** | [**Match**](Match.md) | | [optional] |
14
+ | **face_match** | [**Match**](Match.md) | | [optional] |
15
+ | **liveness** | [**Match**](Match.md) | | [optional] |
16
+ | **image_authenticity** | [**Match**](Match.md) | | [optional] |
17
+
18
+ ## Example
19
+
20
+ ```ruby
21
+ require 'trinsic_api'
22
+
23
+ instance = TrinsicApi::MatchData.new(
24
+ national_id_number: null,
25
+ full_name: null,
26
+ given_name: null,
27
+ middle_name: null,
28
+ family_name: null,
29
+ sex: null,
30
+ date_of_birth: null,
31
+ face_match: null,
32
+ liveness: null,
33
+ image_authenticity: null
34
+ )
35
+ ```
36
+
@@ -5,6 +5,7 @@
5
5
  | Name | Type | Description | Notes |
6
6
  | ---- | ---- | ----------- | ----- |
7
7
  | **indonesia_nik** | [**IndonesiaNikInput**](IndonesiaNikInput.md) | Input for the `indonesia-nik-lookup` provider | [optional] |
8
+ | **indonesia_dukcapil_match** | [**IndonesiaDukcapilMatchInput**](IndonesiaDukcapilMatchInput.md) | Input for the `indonesia-dukcapil-match` provider | [optional] |
8
9
  | **mexico_curp** | [**MexicoCurpInput**](MexicoCurpInput.md) | Input for the `mexico-curp-lookup` provider | [optional] |
9
10
  | **south_africa_nid** | [**SouthAfricaNidInput**](SouthAfricaNidInput.md) | Input for the `south-africa-nid-lookup` provider | [optional] |
10
11
  | **kenya_nid** | [**KenyaNidInput**](KenyaNidInput.md) | Input for the `kenya-nid-lookup` provider | [optional] |
@@ -29,6 +30,7 @@ require 'trinsic_api'
29
30
 
30
31
  instance = TrinsicApi::ProviderInput.new(
31
32
  indonesia_nik: null,
33
+ indonesia_dukcapil_match: null,
32
34
  mexico_curp: null,
33
35
  south_africa_nid: null,
34
36
  kenya_nid: null,
@@ -23,6 +23,8 @@ module TrinsicApi
23
23
 
24
24
  attr_accessor :document
25
25
 
26
+ attr_accessor :match
27
+
26
28
  attr_accessor :attachment_access_keys
27
29
 
28
30
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -32,6 +34,7 @@ module TrinsicApi
32
34
  :'originating_sub_provider_id' => :'originatingSubProviderId',
33
35
  :'person' => :'person',
34
36
  :'document' => :'document',
37
+ :'match' => :'match',
35
38
  :'attachment_access_keys' => :'attachmentAccessKeys'
36
39
  }
37
40
  end
@@ -53,6 +56,7 @@ module TrinsicApi
53
56
  :'originating_sub_provider_id' => :'String',
54
57
  :'person' => :'PersonData',
55
58
  :'document' => :'DocumentData',
59
+ :'match' => :'MatchData',
56
60
  :'attachment_access_keys' => :'AttachmentAccessKeys'
57
61
  }
58
62
  end
@@ -64,6 +68,7 @@ module TrinsicApi
64
68
  :'originating_sub_provider_id',
65
69
  :'person',
66
70
  :'document',
71
+ :'match',
67
72
  :'attachment_access_keys'
68
73
  ])
69
74
  end
@@ -100,6 +105,10 @@ module TrinsicApi
100
105
  self.document = attributes[:'document']
101
106
  end
102
107
 
108
+ if attributes.key?(:'match')
109
+ self.match = attributes[:'match']
110
+ end
111
+
103
112
  if attributes.key?(:'attachment_access_keys')
104
113
  self.attachment_access_keys = attributes[:'attachment_access_keys']
105
114
  end
@@ -129,6 +138,7 @@ module TrinsicApi
129
138
  originating_sub_provider_id == o.originating_sub_provider_id &&
130
139
  person == o.person &&
131
140
  document == o.document &&
141
+ match == o.match &&
132
142
  attachment_access_keys == o.attachment_access_keys
133
143
  end
134
144
 
@@ -141,7 +151,7 @@ module TrinsicApi
141
151
  # Calculates hash code according to all attributes.
142
152
  # @return [Integer] Hash code
143
153
  def hash
144
- [originating_provider_id, originating_sub_provider_id, person, document, attachment_access_keys].hash
154
+ [originating_provider_id, originating_sub_provider_id, person, document, match, attachment_access_keys].hash
145
155
  end
146
156
 
147
157
  # Builds the object from hash
@@ -0,0 +1,299 @@
1
+ =begin
2
+ #Trinsic API
3
+
4
+ #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
5
+
6
+ The version of the OpenAPI document: v1
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.13.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module TrinsicApi
17
+ class IndonesiaDukcapilMatchInput
18
+ # The user's full name
19
+ attr_accessor :full_name
20
+
21
+ # The user's date of birth, in `YYYY-MM-DD` format
22
+ attr_accessor :date_of_birth
23
+
24
+ # The user's Indonesia NIK ID number
25
+ attr_accessor :nik_id_number
26
+
27
+ # The email address of the individual. Either email or phone number must be provided.
28
+ attr_accessor :email
29
+
30
+ # The phone number of the individual. Either email or phone number must be provided.
31
+ attr_accessor :phone_number
32
+
33
+ # The raw bytes of the selfie image of the individual. Must be JPEG or PNG format; 10MB maximum.
34
+ attr_accessor :selfie_image
35
+
36
+ # The raw bytes of the image of the individual's KTP government ID. Must be JPEG format; 1MB maximum. Optional.
37
+ attr_accessor :document_image
38
+
39
+ # The timestamp when consent was given by the user for the verification.
40
+ attr_accessor :consent_given_at
41
+
42
+ # Attribute mapping from ruby-style variable name to JSON key.
43
+ def self.attribute_map
44
+ {
45
+ :'full_name' => :'fullName',
46
+ :'date_of_birth' => :'dateOfBirth',
47
+ :'nik_id_number' => :'nikIdNumber',
48
+ :'email' => :'email',
49
+ :'phone_number' => :'phoneNumber',
50
+ :'selfie_image' => :'selfieImage',
51
+ :'document_image' => :'documentImage',
52
+ :'consent_given_at' => :'consentGivenAt'
53
+ }
54
+ end
55
+
56
+ # Returns attribute mapping this model knows about
57
+ def self.acceptable_attribute_map
58
+ attribute_map
59
+ end
60
+
61
+ # Returns all the JSON keys this model knows about
62
+ def self.acceptable_attributes
63
+ acceptable_attribute_map.values
64
+ end
65
+
66
+ # Attribute type mapping.
67
+ def self.openapi_types
68
+ {
69
+ :'full_name' => :'String',
70
+ :'date_of_birth' => :'Date',
71
+ :'nik_id_number' => :'String',
72
+ :'email' => :'String',
73
+ :'phone_number' => :'String',
74
+ :'selfie_image' => :'String',
75
+ :'document_image' => :'String',
76
+ :'consent_given_at' => :'Time'
77
+ }
78
+ end
79
+
80
+ # List of attributes with nullable: true
81
+ def self.openapi_nullable
82
+ Set.new([
83
+ :'full_name',
84
+ :'date_of_birth',
85
+ :'nik_id_number',
86
+ :'email',
87
+ :'phone_number',
88
+ :'selfie_image',
89
+ :'document_image',
90
+ :'consent_given_at'
91
+ ])
92
+ end
93
+
94
+ # Initializes the object
95
+ # @param [Hash] attributes Model attributes in the form of hash
96
+ def initialize(attributes = {})
97
+ if (!attributes.is_a?(Hash))
98
+ fail ArgumentError, "The input argument (attributes) must be a hash in `TrinsicApi::IndonesiaDukcapilMatchInput` initialize method"
99
+ end
100
+
101
+ # check to see if the attribute exists and convert string to symbol for hash key
102
+ acceptable_attribute_map = self.class.acceptable_attribute_map
103
+ attributes = attributes.each_with_object({}) { |(k, v), h|
104
+ if (!acceptable_attribute_map.key?(k.to_sym))
105
+ fail ArgumentError, "`#{k}` is not a valid attribute in `TrinsicApi::IndonesiaDukcapilMatchInput`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
106
+ end
107
+ h[k.to_sym] = v
108
+ }
109
+
110
+ if attributes.key?(:'full_name')
111
+ self.full_name = attributes[:'full_name']
112
+ end
113
+
114
+ if attributes.key?(:'date_of_birth')
115
+ self.date_of_birth = attributes[:'date_of_birth']
116
+ end
117
+
118
+ if attributes.key?(:'nik_id_number')
119
+ self.nik_id_number = attributes[:'nik_id_number']
120
+ end
121
+
122
+ if attributes.key?(:'email')
123
+ self.email = attributes[:'email']
124
+ end
125
+
126
+ if attributes.key?(:'phone_number')
127
+ self.phone_number = attributes[:'phone_number']
128
+ end
129
+
130
+ if attributes.key?(:'selfie_image')
131
+ self.selfie_image = attributes[:'selfie_image']
132
+ end
133
+
134
+ if attributes.key?(:'document_image')
135
+ self.document_image = attributes[:'document_image']
136
+ end
137
+
138
+ if attributes.key?(:'consent_given_at')
139
+ self.consent_given_at = attributes[:'consent_given_at']
140
+ end
141
+ end
142
+
143
+ # Show invalid properties with the reasons. Usually used together with valid?
144
+ # @return Array for valid properties with the reasons
145
+ def list_invalid_properties
146
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
147
+ invalid_properties = Array.new
148
+ invalid_properties
149
+ end
150
+
151
+ # Check to see if the all the properties in the model are valid
152
+ # @return true if the model is valid
153
+ def valid?
154
+ warn '[DEPRECATED] the `valid?` method is obsolete'
155
+ true
156
+ end
157
+
158
+ # Checks equality by comparing each attribute.
159
+ # @param [Object] Object to be compared
160
+ def ==(o)
161
+ return true if self.equal?(o)
162
+ self.class == o.class &&
163
+ full_name == o.full_name &&
164
+ date_of_birth == o.date_of_birth &&
165
+ nik_id_number == o.nik_id_number &&
166
+ email == o.email &&
167
+ phone_number == o.phone_number &&
168
+ selfie_image == o.selfie_image &&
169
+ document_image == o.document_image &&
170
+ consent_given_at == o.consent_given_at
171
+ end
172
+
173
+ # @see the `==` method
174
+ # @param [Object] Object to be compared
175
+ def eql?(o)
176
+ self == o
177
+ end
178
+
179
+ # Calculates hash code according to all attributes.
180
+ # @return [Integer] Hash code
181
+ def hash
182
+ [full_name, date_of_birth, nik_id_number, email, phone_number, selfie_image, document_image, consent_given_at].hash
183
+ end
184
+
185
+ # Builds the object from hash
186
+ # @param [Hash] attributes Model attributes in the form of hash
187
+ # @return [Object] Returns the model itself
188
+ def self.build_from_hash(attributes)
189
+ return nil unless attributes.is_a?(Hash)
190
+ attributes = attributes.transform_keys(&:to_sym)
191
+ transformed_hash = {}
192
+ openapi_types.each_pair do |key, type|
193
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
194
+ transformed_hash["#{key}"] = nil
195
+ elsif type =~ /\AArray<(.*)>/i
196
+ # check to ensure the input is an array given that the attribute
197
+ # is documented as an array but the input is not
198
+ if attributes[attribute_map[key]].is_a?(Array)
199
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
200
+ end
201
+ elsif !attributes[attribute_map[key]].nil?
202
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
203
+ end
204
+ end
205
+ new(transformed_hash)
206
+ end
207
+
208
+ # Deserializes the data based on type
209
+ # @param string type Data type
210
+ # @param string value Value to be deserialized
211
+ # @return [Object] Deserialized data
212
+ def self._deserialize(type, value)
213
+ case type.to_sym
214
+ when :Time
215
+ Time.parse(value)
216
+ when :Date
217
+ Date.parse(value)
218
+ when :String
219
+ value.to_s
220
+ when :Integer
221
+ value.to_i
222
+ when :Float
223
+ value.to_f
224
+ when :Boolean
225
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
226
+ true
227
+ else
228
+ false
229
+ end
230
+ when :Object
231
+ # generic object (usually a Hash), return directly
232
+ value
233
+ when /\AArray<(?<inner_type>.+)>\z/
234
+ inner_type = Regexp.last_match[:inner_type]
235
+ value.map { |v| _deserialize(inner_type, v) }
236
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
237
+ k_type = Regexp.last_match[:k_type]
238
+ v_type = Regexp.last_match[:v_type]
239
+ {}.tap do |hash|
240
+ value.each do |k, v|
241
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
242
+ end
243
+ end
244
+ else # model
245
+ # models (e.g. Pet) or oneOf
246
+ klass = TrinsicApi.const_get(type)
247
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
248
+ end
249
+ end
250
+
251
+ # Returns the string representation of the object
252
+ # @return [String] String presentation of the object
253
+ def to_s
254
+ to_hash.to_s
255
+ end
256
+
257
+ # to_body is an alias to to_hash (backward compatibility)
258
+ # @return [Hash] Returns the object in the form of hash
259
+ def to_body
260
+ to_hash
261
+ end
262
+
263
+ # Returns the object in the form of hash
264
+ # @return [Hash] Returns the object in the form of hash
265
+ def to_hash
266
+ hash = {}
267
+ self.class.attribute_map.each_pair do |attr, param|
268
+ value = self.send(attr)
269
+ if value.nil?
270
+ is_nullable = self.class.openapi_nullable.include?(attr)
271
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
272
+ end
273
+
274
+ hash[param] = _to_hash(value)
275
+ end
276
+ hash
277
+ end
278
+
279
+ # Outputs non-array value in the form of hash
280
+ # For object, use to_hash. Otherwise, just return the value
281
+ # @param [Object] value Any valid value
282
+ # @return [Hash] Returns the value in the form of hash
283
+ def _to_hash(value)
284
+ if value.is_a?(Array)
285
+ value.compact.map { |v| _to_hash(v) }
286
+ elsif value.is_a?(Hash)
287
+ {}.tap do |hash|
288
+ value.each { |k, v| hash[k] = _to_hash(v) }
289
+ end
290
+ elsif value.respond_to? :to_hash
291
+ value.to_hash
292
+ else
293
+ value
294
+ end
295
+ end
296
+
297
+ end
298
+
299
+ end