trinsic_api 2.0.0.pre.alpha3 → 2.0.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.
Files changed (84) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +1 -1
  3. data/docs/AttachmentsApi.md +1 -1
  4. data/docs/BrazilDigitalCnhInput.md +2 -2
  5. data/docs/CreateAdvancedProviderSessionRequest.md +3 -3
  6. data/docs/CreateHostedProviderSessionResponse.md +4 -2
  7. data/docs/CreateWidgetSessionRequest.md +3 -3
  8. data/docs/CreateWidgetSessionResponse.md +4 -2
  9. data/docs/IdentityData.md +2 -0
  10. data/docs/IdinInput.md +18 -0
  11. data/docs/Language.md +15 -0
  12. data/docs/ListProviderContractsResponse.md +18 -0
  13. data/docs/MobileIdInput.md +22 -0
  14. data/docs/NetworkApi.md +71 -4
  15. data/docs/ProviderContract.md +46 -0
  16. data/docs/ProviderInfo.md +1 -3
  17. data/docs/ProviderInformation.md +3 -3
  18. data/docs/ProviderInput.md +24 -12
  19. data/docs/RecommendRequest.md +2 -10
  20. data/docs/RecommendationInfo.md +24 -0
  21. data/docs/ResultCollection.md +2 -2
  22. data/docs/Session.md +3 -3
  23. data/docs/SessionsApi.md +2 -2
  24. data/docs/SmartIdInput.md +18 -0
  25. data/docs/SpidInput.md +18 -0
  26. data/docs/StepRefreshInfo.md +1 -1
  27. data/docs/SubProviderMetadata.md +24 -0
  28. data/docs/TrinsicTestDatabaseLookupInput.md +24 -0
  29. data/docs/TrinsicTestSubProvidersInput.md +18 -0
  30. data/lib/trinsic_api/api/attachments_api.rb +2 -2
  31. data/lib/trinsic_api/api/network_api.rb +59 -2
  32. data/lib/trinsic_api/api/sessions_api.rb +4 -4
  33. data/lib/trinsic_api/models/brazil_digital_cnh_input.rb +2 -2
  34. data/lib/trinsic_api/models/create_advanced_provider_session_request.rb +3 -3
  35. data/lib/trinsic_api/models/create_hosted_provider_session_response.rb +29 -6
  36. data/lib/trinsic_api/models/create_widget_session_request.rb +10 -10
  37. data/lib/trinsic_api/models/create_widget_session_response.rb +29 -6
  38. data/lib/trinsic_api/models/identity_data.rb +11 -1
  39. data/lib/trinsic_api/models/{known_identity_data.rb → idin_input.rb} +12 -13
  40. data/lib/trinsic_api/models/integration_launch_method.rb +2 -2
  41. data/lib/trinsic_api/models/language.rb +42 -0
  42. data/lib/trinsic_api/models/list_provider_contracts_response.rb +224 -0
  43. data/lib/trinsic_api/models/mobile_id_input.rb +260 -0
  44. data/lib/trinsic_api/models/provider_contract.rb +482 -0
  45. data/lib/trinsic_api/models/provider_info.rb +4 -17
  46. data/lib/trinsic_api/models/provider_input.rb +82 -16
  47. data/lib/trinsic_api/models/recommend_request.rb +9 -59
  48. data/lib/trinsic_api/models/recommendation_info.rb +256 -0
  49. data/lib/trinsic_api/models/result_collection.rb +8 -2
  50. data/lib/trinsic_api/models/session.rb +3 -3
  51. data/lib/trinsic_api/models/smart_id_input.rb +216 -0
  52. data/lib/trinsic_api/models/spid_input.rb +216 -0
  53. data/lib/trinsic_api/models/step_refresh_info.rb +1 -1
  54. data/lib/trinsic_api/models/{known_address.rb → sub_provider_metadata.rb} +59 -72
  55. data/lib/trinsic_api/models/{known_person_data.rb → trinsic_test_database_lookup_input.rb} +22 -66
  56. data/lib/trinsic_api/models/trinsic_test_sub_providers_input.rb +216 -0
  57. data/lib/trinsic_api/version.rb +1 -1
  58. data/lib/trinsic_api.rb +11 -3
  59. data/spec/api/attachments_api_spec.rb +1 -1
  60. data/spec/api/network_api_spec.rb +12 -1
  61. data/spec/api/sessions_api_spec.rb +2 -2
  62. data/spec/models/create_hosted_provider_session_response_spec.rb +6 -0
  63. data/spec/models/create_widget_session_request_spec.rb +1 -1
  64. data/spec/models/create_widget_session_response_spec.rb +6 -0
  65. data/spec/models/identity_data_spec.rb +6 -0
  66. data/spec/models/{known_identity_data_spec.rb → idin_input_spec.rb} +7 -7
  67. data/spec/models/language_spec.rb +30 -0
  68. data/spec/models/list_provider_contracts_response_spec.rb +36 -0
  69. data/spec/models/mobile_id_input_spec.rb +48 -0
  70. data/spec/models/provider_contract_spec.rb +120 -0
  71. data/spec/models/provider_info_spec.rb +0 -6
  72. data/spec/models/provider_input_spec.rb +36 -0
  73. data/spec/models/recommend_request_spec.rb +1 -25
  74. data/spec/models/recommendation_info_spec.rb +54 -0
  75. data/spec/models/smart_id_input_spec.rb +36 -0
  76. data/spec/models/spid_input_spec.rb +36 -0
  77. data/spec/models/sub_provider_metadata_spec.rb +54 -0
  78. data/spec/models/{known_person_data_spec.rb → trinsic_test_database_lookup_input_spec.rb} +8 -32
  79. data/spec/models/trinsic_test_sub_providers_input_spec.rb +36 -0
  80. metadata +46 -14
  81. data/docs/KnownAddress.md +0 -32
  82. data/docs/KnownIdentityData.md +0 -18
  83. data/docs/KnownPersonData.md +0 -32
  84. data/spec/models/known_address_spec.rb +0 -78
@@ -0,0 +1,42 @@
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.8.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module TrinsicApi
17
+ class Language
18
+ LIT = "LIT".freeze
19
+ EST = "EST".freeze
20
+ ENG = "ENG".freeze
21
+ RUS = "RUS".freeze
22
+
23
+ def self.all_vars
24
+ @all_vars ||= [LIT, EST, ENG, RUS].freeze
25
+ end
26
+
27
+ # Builds the enum from string
28
+ # @param [String] The enum value in the form of the string
29
+ # @return [String] The enum value
30
+ def self.build_from_hash(value)
31
+ new.build_from_hash(value)
32
+ end
33
+
34
+ # Builds the enum from string
35
+ # @param [String] The enum value in the form of the string
36
+ # @return [String] The enum value
37
+ def build_from_hash(value)
38
+ return value if Language.all_vars.include?(value)
39
+ raise "Invalid ENUM value #{value} for class #Language"
40
+ end
41
+ end
42
+ end
@@ -0,0 +1,224 @@
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.8.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module TrinsicApi
17
+ class ListProviderContractsResponse
18
+ # Contracts for all Providers available to your App, filtered by your App's current test mode setting.
19
+ attr_accessor :provider_contracts
20
+
21
+ # Attribute mapping from ruby-style variable name to JSON key.
22
+ def self.attribute_map
23
+ {
24
+ :'provider_contracts' => :'providerContracts'
25
+ }
26
+ end
27
+
28
+ # Returns all the JSON keys this model knows about
29
+ def self.acceptable_attributes
30
+ attribute_map.values
31
+ end
32
+
33
+ # Attribute type mapping.
34
+ def self.openapi_types
35
+ {
36
+ :'provider_contracts' => :'Array<ProviderContract>'
37
+ }
38
+ end
39
+
40
+ # List of attributes with nullable: true
41
+ def self.openapi_nullable
42
+ Set.new([
43
+ ])
44
+ end
45
+
46
+ # Initializes the object
47
+ # @param [Hash] attributes Model attributes in the form of hash
48
+ def initialize(attributes = {})
49
+ if (!attributes.is_a?(Hash))
50
+ fail ArgumentError, "The input argument (attributes) must be a hash in `TrinsicApi::ListProviderContractsResponse` initialize method"
51
+ end
52
+
53
+ # check to see if the attribute exists and convert string to symbol for hash key
54
+ attributes = attributes.each_with_object({}) { |(k, v), h|
55
+ if (!self.class.attribute_map.key?(k.to_sym))
56
+ fail ArgumentError, "`#{k}` is not a valid attribute in `TrinsicApi::ListProviderContractsResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
57
+ end
58
+ h[k.to_sym] = v
59
+ }
60
+
61
+ if attributes.key?(:'provider_contracts')
62
+ if (value = attributes[:'provider_contracts']).is_a?(Array)
63
+ self.provider_contracts = value
64
+ end
65
+ else
66
+ self.provider_contracts = nil
67
+ end
68
+ end
69
+
70
+ # Show invalid properties with the reasons. Usually used together with valid?
71
+ # @return Array for valid properties with the reasons
72
+ def list_invalid_properties
73
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
74
+ invalid_properties = Array.new
75
+ if @provider_contracts.nil?
76
+ invalid_properties.push('invalid value for "provider_contracts", provider_contracts cannot be nil.')
77
+ end
78
+
79
+ invalid_properties
80
+ end
81
+
82
+ # Check to see if the all the properties in the model are valid
83
+ # @return true if the model is valid
84
+ def valid?
85
+ warn '[DEPRECATED] the `valid?` method is obsolete'
86
+ return false if @provider_contracts.nil?
87
+ true
88
+ end
89
+
90
+ # Checks equality by comparing each attribute.
91
+ # @param [Object] Object to be compared
92
+ def ==(o)
93
+ return true if self.equal?(o)
94
+ self.class == o.class &&
95
+ provider_contracts == o.provider_contracts
96
+ end
97
+
98
+ # @see the `==` method
99
+ # @param [Object] Object to be compared
100
+ def eql?(o)
101
+ self == o
102
+ end
103
+
104
+ # Calculates hash code according to all attributes.
105
+ # @return [Integer] Hash code
106
+ def hash
107
+ [provider_contracts].hash
108
+ end
109
+
110
+ # Builds the object from hash
111
+ # @param [Hash] attributes Model attributes in the form of hash
112
+ # @return [Object] Returns the model itself
113
+ def self.build_from_hash(attributes)
114
+ return nil unless attributes.is_a?(Hash)
115
+ attributes = attributes.transform_keys(&:to_sym)
116
+ transformed_hash = {}
117
+ openapi_types.each_pair do |key, type|
118
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
119
+ transformed_hash["#{key}"] = nil
120
+ elsif type =~ /\AArray<(.*)>/i
121
+ # check to ensure the input is an array given that the attribute
122
+ # is documented as an array but the input is not
123
+ if attributes[attribute_map[key]].is_a?(Array)
124
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
125
+ end
126
+ elsif !attributes[attribute_map[key]].nil?
127
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
128
+ end
129
+ end
130
+ new(transformed_hash)
131
+ end
132
+
133
+ # Deserializes the data based on type
134
+ # @param string type Data type
135
+ # @param string value Value to be deserialized
136
+ # @return [Object] Deserialized data
137
+ def self._deserialize(type, value)
138
+ case type.to_sym
139
+ when :Time
140
+ Time.parse(value)
141
+ when :Date
142
+ Date.parse(value)
143
+ when :String
144
+ value.to_s
145
+ when :Integer
146
+ value.to_i
147
+ when :Float
148
+ value.to_f
149
+ when :Boolean
150
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
151
+ true
152
+ else
153
+ false
154
+ end
155
+ when :Object
156
+ # generic object (usually a Hash), return directly
157
+ value
158
+ when /\AArray<(?<inner_type>.+)>\z/
159
+ inner_type = Regexp.last_match[:inner_type]
160
+ value.map { |v| _deserialize(inner_type, v) }
161
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
162
+ k_type = Regexp.last_match[:k_type]
163
+ v_type = Regexp.last_match[:v_type]
164
+ {}.tap do |hash|
165
+ value.each do |k, v|
166
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
167
+ end
168
+ end
169
+ else # model
170
+ # models (e.g. Pet) or oneOf
171
+ klass = TrinsicApi.const_get(type)
172
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
173
+ end
174
+ end
175
+
176
+ # Returns the string representation of the object
177
+ # @return [String] String presentation of the object
178
+ def to_s
179
+ to_hash.to_s
180
+ end
181
+
182
+ # to_body is an alias to to_hash (backward compatibility)
183
+ # @return [Hash] Returns the object in the form of hash
184
+ def to_body
185
+ to_hash
186
+ end
187
+
188
+ # Returns the object in the form of hash
189
+ # @return [Hash] Returns the object in the form of hash
190
+ def to_hash
191
+ hash = {}
192
+ self.class.attribute_map.each_pair do |attr, param|
193
+ value = self.send(attr)
194
+ if value.nil?
195
+ is_nullable = self.class.openapi_nullable.include?(attr)
196
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
197
+ end
198
+
199
+ hash[param] = _to_hash(value)
200
+ end
201
+ hash
202
+ end
203
+
204
+ # Outputs non-array value in the form of hash
205
+ # For object, use to_hash. Otherwise, just return the value
206
+ # @param [Object] value Any valid value
207
+ # @return [Hash] Returns the value in the form of hash
208
+ def _to_hash(value)
209
+ if value.is_a?(Array)
210
+ value.compact.map { |v| _to_hash(v) }
211
+ elsif value.is_a?(Hash)
212
+ {}.tap do |hash|
213
+ value.each { |k, v| hash[k] = _to_hash(v) }
214
+ end
215
+ elsif value.respond_to? :to_hash
216
+ value.to_hash
217
+ else
218
+ value
219
+ end
220
+ end
221
+
222
+ end
223
+
224
+ end
@@ -0,0 +1,260 @@
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.8.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module TrinsicApi
17
+ class MobileIdInput
18
+ # The user's phone number in E.164 format
19
+ attr_accessor :mobile_id_phone_number
20
+
21
+ # The user's National ID number
22
+ attr_accessor :mobile_id_national_identity_number
23
+
24
+ # The user's language -- LIT, EST, ENG, or RUS
25
+ attr_accessor :mobile_id_language
26
+
27
+ class EnumAttributeValidator
28
+ attr_reader :datatype
29
+ attr_reader :allowable_values
30
+
31
+ def initialize(datatype, allowable_values)
32
+ @allowable_values = allowable_values.map do |value|
33
+ case datatype.to_s
34
+ when /Integer/i
35
+ value.to_i
36
+ when /Float/i
37
+ value.to_f
38
+ else
39
+ value
40
+ end
41
+ end
42
+ end
43
+
44
+ def valid?(value)
45
+ !value || allowable_values.include?(value)
46
+ end
47
+ end
48
+
49
+ # Attribute mapping from ruby-style variable name to JSON key.
50
+ def self.attribute_map
51
+ {
52
+ :'mobile_id_phone_number' => :'mobileIdPhoneNumber',
53
+ :'mobile_id_national_identity_number' => :'mobileIdNationalIdentityNumber',
54
+ :'mobile_id_language' => :'mobileIdLanguage'
55
+ }
56
+ end
57
+
58
+ # Returns all the JSON keys this model knows about
59
+ def self.acceptable_attributes
60
+ attribute_map.values
61
+ end
62
+
63
+ # Attribute type mapping.
64
+ def self.openapi_types
65
+ {
66
+ :'mobile_id_phone_number' => :'String',
67
+ :'mobile_id_national_identity_number' => :'String',
68
+ :'mobile_id_language' => :'Language'
69
+ }
70
+ end
71
+
72
+ # List of attributes with nullable: true
73
+ def self.openapi_nullable
74
+ Set.new([
75
+ :'mobile_id_phone_number',
76
+ :'mobile_id_national_identity_number',
77
+ :'mobile_id_language'
78
+ ])
79
+ end
80
+
81
+ # Initializes the object
82
+ # @param [Hash] attributes Model attributes in the form of hash
83
+ def initialize(attributes = {})
84
+ if (!attributes.is_a?(Hash))
85
+ fail ArgumentError, "The input argument (attributes) must be a hash in `TrinsicApi::MobileIdInput` initialize method"
86
+ end
87
+
88
+ # check to see if the attribute exists and convert string to symbol for hash key
89
+ attributes = attributes.each_with_object({}) { |(k, v), h|
90
+ if (!self.class.attribute_map.key?(k.to_sym))
91
+ fail ArgumentError, "`#{k}` is not a valid attribute in `TrinsicApi::MobileIdInput`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
92
+ end
93
+ h[k.to_sym] = v
94
+ }
95
+
96
+ if attributes.key?(:'mobile_id_phone_number')
97
+ self.mobile_id_phone_number = attributes[:'mobile_id_phone_number']
98
+ end
99
+
100
+ if attributes.key?(:'mobile_id_national_identity_number')
101
+ self.mobile_id_national_identity_number = attributes[:'mobile_id_national_identity_number']
102
+ end
103
+
104
+ if attributes.key?(:'mobile_id_language')
105
+ self.mobile_id_language = attributes[:'mobile_id_language']
106
+ end
107
+ end
108
+
109
+ # Show invalid properties with the reasons. Usually used together with valid?
110
+ # @return Array for valid properties with the reasons
111
+ def list_invalid_properties
112
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
113
+ invalid_properties = Array.new
114
+ invalid_properties
115
+ end
116
+
117
+ # Check to see if the all the properties in the model are valid
118
+ # @return true if the model is valid
119
+ def valid?
120
+ warn '[DEPRECATED] the `valid?` method is obsolete'
121
+ true
122
+ end
123
+
124
+ # Checks equality by comparing each attribute.
125
+ # @param [Object] Object to be compared
126
+ def ==(o)
127
+ return true if self.equal?(o)
128
+ self.class == o.class &&
129
+ mobile_id_phone_number == o.mobile_id_phone_number &&
130
+ mobile_id_national_identity_number == o.mobile_id_national_identity_number &&
131
+ mobile_id_language == o.mobile_id_language
132
+ end
133
+
134
+ # @see the `==` method
135
+ # @param [Object] Object to be compared
136
+ def eql?(o)
137
+ self == o
138
+ end
139
+
140
+ # Calculates hash code according to all attributes.
141
+ # @return [Integer] Hash code
142
+ def hash
143
+ [mobile_id_phone_number, mobile_id_national_identity_number, mobile_id_language].hash
144
+ end
145
+
146
+ # Builds the object from hash
147
+ # @param [Hash] attributes Model attributes in the form of hash
148
+ # @return [Object] Returns the model itself
149
+ def self.build_from_hash(attributes)
150
+ return nil unless attributes.is_a?(Hash)
151
+ attributes = attributes.transform_keys(&:to_sym)
152
+ transformed_hash = {}
153
+ openapi_types.each_pair do |key, type|
154
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
155
+ transformed_hash["#{key}"] = nil
156
+ elsif type =~ /\AArray<(.*)>/i
157
+ # check to ensure the input is an array given that the attribute
158
+ # is documented as an array but the input is not
159
+ if attributes[attribute_map[key]].is_a?(Array)
160
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
161
+ end
162
+ elsif !attributes[attribute_map[key]].nil?
163
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
164
+ end
165
+ end
166
+ new(transformed_hash)
167
+ end
168
+
169
+ # Deserializes the data based on type
170
+ # @param string type Data type
171
+ # @param string value Value to be deserialized
172
+ # @return [Object] Deserialized data
173
+ def self._deserialize(type, value)
174
+ case type.to_sym
175
+ when :Time
176
+ Time.parse(value)
177
+ when :Date
178
+ Date.parse(value)
179
+ when :String
180
+ value.to_s
181
+ when :Integer
182
+ value.to_i
183
+ when :Float
184
+ value.to_f
185
+ when :Boolean
186
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
187
+ true
188
+ else
189
+ false
190
+ end
191
+ when :Object
192
+ # generic object (usually a Hash), return directly
193
+ value
194
+ when /\AArray<(?<inner_type>.+)>\z/
195
+ inner_type = Regexp.last_match[:inner_type]
196
+ value.map { |v| _deserialize(inner_type, v) }
197
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
198
+ k_type = Regexp.last_match[:k_type]
199
+ v_type = Regexp.last_match[:v_type]
200
+ {}.tap do |hash|
201
+ value.each do |k, v|
202
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
203
+ end
204
+ end
205
+ else # model
206
+ # models (e.g. Pet) or oneOf
207
+ klass = TrinsicApi.const_get(type)
208
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
209
+ end
210
+ end
211
+
212
+ # Returns the string representation of the object
213
+ # @return [String] String presentation of the object
214
+ def to_s
215
+ to_hash.to_s
216
+ end
217
+
218
+ # to_body is an alias to to_hash (backward compatibility)
219
+ # @return [Hash] Returns the object in the form of hash
220
+ def to_body
221
+ to_hash
222
+ end
223
+
224
+ # Returns the object in the form of hash
225
+ # @return [Hash] Returns the object in the form of hash
226
+ def to_hash
227
+ hash = {}
228
+ self.class.attribute_map.each_pair do |attr, param|
229
+ value = self.send(attr)
230
+ if value.nil?
231
+ is_nullable = self.class.openapi_nullable.include?(attr)
232
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
233
+ end
234
+
235
+ hash[param] = _to_hash(value)
236
+ end
237
+ hash
238
+ end
239
+
240
+ # Outputs non-array value in the form of hash
241
+ # For object, use to_hash. Otherwise, just return the value
242
+ # @param [Object] value Any valid value
243
+ # @return [Hash] Returns the value in the form of hash
244
+ def _to_hash(value)
245
+ if value.is_a?(Array)
246
+ value.compact.map { |v| _to_hash(v) }
247
+ elsif value.is_a?(Hash)
248
+ {}.tap do |hash|
249
+ value.each { |k, v| hash[k] = _to_hash(v) }
250
+ end
251
+ elsif value.respond_to? :to_hash
252
+ value.to_hash
253
+ else
254
+ value
255
+ end
256
+ end
257
+
258
+ end
259
+
260
+ end