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,216 @@
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 SmartIdInput
18
+ # The user's Smart ID Document Number
19
+ attr_accessor :smart_id_document_number
20
+
21
+ # Attribute mapping from ruby-style variable name to JSON key.
22
+ def self.attribute_map
23
+ {
24
+ :'smart_id_document_number' => :'smartIdDocumentNumber'
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
+ :'smart_id_document_number' => :'String'
37
+ }
38
+ end
39
+
40
+ # List of attributes with nullable: true
41
+ def self.openapi_nullable
42
+ Set.new([
43
+ :'smart_id_document_number'
44
+ ])
45
+ end
46
+
47
+ # Initializes the object
48
+ # @param [Hash] attributes Model attributes in the form of hash
49
+ def initialize(attributes = {})
50
+ if (!attributes.is_a?(Hash))
51
+ fail ArgumentError, "The input argument (attributes) must be a hash in `TrinsicApi::SmartIdInput` initialize method"
52
+ end
53
+
54
+ # check to see if the attribute exists and convert string to symbol for hash key
55
+ attributes = attributes.each_with_object({}) { |(k, v), h|
56
+ if (!self.class.attribute_map.key?(k.to_sym))
57
+ fail ArgumentError, "`#{k}` is not a valid attribute in `TrinsicApi::SmartIdInput`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
58
+ end
59
+ h[k.to_sym] = v
60
+ }
61
+
62
+ if attributes.key?(:'smart_id_document_number')
63
+ self.smart_id_document_number = attributes[:'smart_id_document_number']
64
+ end
65
+ end
66
+
67
+ # Show invalid properties with the reasons. Usually used together with valid?
68
+ # @return Array for valid properties with the reasons
69
+ def list_invalid_properties
70
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
71
+ invalid_properties = Array.new
72
+ invalid_properties
73
+ end
74
+
75
+ # Check to see if the all the properties in the model are valid
76
+ # @return true if the model is valid
77
+ def valid?
78
+ warn '[DEPRECATED] the `valid?` method is obsolete'
79
+ true
80
+ end
81
+
82
+ # Checks equality by comparing each attribute.
83
+ # @param [Object] Object to be compared
84
+ def ==(o)
85
+ return true if self.equal?(o)
86
+ self.class == o.class &&
87
+ smart_id_document_number == o.smart_id_document_number
88
+ end
89
+
90
+ # @see the `==` method
91
+ # @param [Object] Object to be compared
92
+ def eql?(o)
93
+ self == o
94
+ end
95
+
96
+ # Calculates hash code according to all attributes.
97
+ # @return [Integer] Hash code
98
+ def hash
99
+ [smart_id_document_number].hash
100
+ end
101
+
102
+ # Builds the object from hash
103
+ # @param [Hash] attributes Model attributes in the form of hash
104
+ # @return [Object] Returns the model itself
105
+ def self.build_from_hash(attributes)
106
+ return nil unless attributes.is_a?(Hash)
107
+ attributes = attributes.transform_keys(&:to_sym)
108
+ transformed_hash = {}
109
+ openapi_types.each_pair do |key, type|
110
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
111
+ transformed_hash["#{key}"] = nil
112
+ elsif type =~ /\AArray<(.*)>/i
113
+ # check to ensure the input is an array given that the attribute
114
+ # is documented as an array but the input is not
115
+ if attributes[attribute_map[key]].is_a?(Array)
116
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
117
+ end
118
+ elsif !attributes[attribute_map[key]].nil?
119
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
120
+ end
121
+ end
122
+ new(transformed_hash)
123
+ end
124
+
125
+ # Deserializes the data based on type
126
+ # @param string type Data type
127
+ # @param string value Value to be deserialized
128
+ # @return [Object] Deserialized data
129
+ def self._deserialize(type, value)
130
+ case type.to_sym
131
+ when :Time
132
+ Time.parse(value)
133
+ when :Date
134
+ Date.parse(value)
135
+ when :String
136
+ value.to_s
137
+ when :Integer
138
+ value.to_i
139
+ when :Float
140
+ value.to_f
141
+ when :Boolean
142
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
143
+ true
144
+ else
145
+ false
146
+ end
147
+ when :Object
148
+ # generic object (usually a Hash), return directly
149
+ value
150
+ when /\AArray<(?<inner_type>.+)>\z/
151
+ inner_type = Regexp.last_match[:inner_type]
152
+ value.map { |v| _deserialize(inner_type, v) }
153
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
154
+ k_type = Regexp.last_match[:k_type]
155
+ v_type = Regexp.last_match[:v_type]
156
+ {}.tap do |hash|
157
+ value.each do |k, v|
158
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
159
+ end
160
+ end
161
+ else # model
162
+ # models (e.g. Pet) or oneOf
163
+ klass = TrinsicApi.const_get(type)
164
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
165
+ end
166
+ end
167
+
168
+ # Returns the string representation of the object
169
+ # @return [String] String presentation of the object
170
+ def to_s
171
+ to_hash.to_s
172
+ end
173
+
174
+ # to_body is an alias to to_hash (backward compatibility)
175
+ # @return [Hash] Returns the object in the form of hash
176
+ def to_body
177
+ to_hash
178
+ end
179
+
180
+ # Returns the object in the form of hash
181
+ # @return [Hash] Returns the object in the form of hash
182
+ def to_hash
183
+ hash = {}
184
+ self.class.attribute_map.each_pair do |attr, param|
185
+ value = self.send(attr)
186
+ if value.nil?
187
+ is_nullable = self.class.openapi_nullable.include?(attr)
188
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
189
+ end
190
+
191
+ hash[param] = _to_hash(value)
192
+ end
193
+ hash
194
+ end
195
+
196
+ # Outputs non-array value in the form of hash
197
+ # For object, use to_hash. Otherwise, just return the value
198
+ # @param [Object] value Any valid value
199
+ # @return [Hash] Returns the value in the form of hash
200
+ def _to_hash(value)
201
+ if value.is_a?(Array)
202
+ value.compact.map { |v| _to_hash(v) }
203
+ elsif value.is_a?(Hash)
204
+ {}.tap do |hash|
205
+ value.each { |k, v| hash[k] = _to_hash(v) }
206
+ end
207
+ elsif value.respond_to? :to_hash
208
+ value.to_hash
209
+ else
210
+ value
211
+ end
212
+ end
213
+
214
+ end
215
+
216
+ end
@@ -0,0 +1,216 @@
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 SpidInput
18
+ # The ID of the specific IDP to invoke within SPID. If not specified, the user will be prompted to select an IDP.
19
+ attr_accessor :sub_provider_id
20
+
21
+ # Attribute mapping from ruby-style variable name to JSON key.
22
+ def self.attribute_map
23
+ {
24
+ :'sub_provider_id' => :'subProviderId'
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
+ :'sub_provider_id' => :'String'
37
+ }
38
+ end
39
+
40
+ # List of attributes with nullable: true
41
+ def self.openapi_nullable
42
+ Set.new([
43
+ :'sub_provider_id'
44
+ ])
45
+ end
46
+
47
+ # Initializes the object
48
+ # @param [Hash] attributes Model attributes in the form of hash
49
+ def initialize(attributes = {})
50
+ if (!attributes.is_a?(Hash))
51
+ fail ArgumentError, "The input argument (attributes) must be a hash in `TrinsicApi::SpidInput` initialize method"
52
+ end
53
+
54
+ # check to see if the attribute exists and convert string to symbol for hash key
55
+ attributes = attributes.each_with_object({}) { |(k, v), h|
56
+ if (!self.class.attribute_map.key?(k.to_sym))
57
+ fail ArgumentError, "`#{k}` is not a valid attribute in `TrinsicApi::SpidInput`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
58
+ end
59
+ h[k.to_sym] = v
60
+ }
61
+
62
+ if attributes.key?(:'sub_provider_id')
63
+ self.sub_provider_id = attributes[:'sub_provider_id']
64
+ end
65
+ end
66
+
67
+ # Show invalid properties with the reasons. Usually used together with valid?
68
+ # @return Array for valid properties with the reasons
69
+ def list_invalid_properties
70
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
71
+ invalid_properties = Array.new
72
+ invalid_properties
73
+ end
74
+
75
+ # Check to see if the all the properties in the model are valid
76
+ # @return true if the model is valid
77
+ def valid?
78
+ warn '[DEPRECATED] the `valid?` method is obsolete'
79
+ true
80
+ end
81
+
82
+ # Checks equality by comparing each attribute.
83
+ # @param [Object] Object to be compared
84
+ def ==(o)
85
+ return true if self.equal?(o)
86
+ self.class == o.class &&
87
+ sub_provider_id == o.sub_provider_id
88
+ end
89
+
90
+ # @see the `==` method
91
+ # @param [Object] Object to be compared
92
+ def eql?(o)
93
+ self == o
94
+ end
95
+
96
+ # Calculates hash code according to all attributes.
97
+ # @return [Integer] Hash code
98
+ def hash
99
+ [sub_provider_id].hash
100
+ end
101
+
102
+ # Builds the object from hash
103
+ # @param [Hash] attributes Model attributes in the form of hash
104
+ # @return [Object] Returns the model itself
105
+ def self.build_from_hash(attributes)
106
+ return nil unless attributes.is_a?(Hash)
107
+ attributes = attributes.transform_keys(&:to_sym)
108
+ transformed_hash = {}
109
+ openapi_types.each_pair do |key, type|
110
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
111
+ transformed_hash["#{key}"] = nil
112
+ elsif type =~ /\AArray<(.*)>/i
113
+ # check to ensure the input is an array given that the attribute
114
+ # is documented as an array but the input is not
115
+ if attributes[attribute_map[key]].is_a?(Array)
116
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
117
+ end
118
+ elsif !attributes[attribute_map[key]].nil?
119
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
120
+ end
121
+ end
122
+ new(transformed_hash)
123
+ end
124
+
125
+ # Deserializes the data based on type
126
+ # @param string type Data type
127
+ # @param string value Value to be deserialized
128
+ # @return [Object] Deserialized data
129
+ def self._deserialize(type, value)
130
+ case type.to_sym
131
+ when :Time
132
+ Time.parse(value)
133
+ when :Date
134
+ Date.parse(value)
135
+ when :String
136
+ value.to_s
137
+ when :Integer
138
+ value.to_i
139
+ when :Float
140
+ value.to_f
141
+ when :Boolean
142
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
143
+ true
144
+ else
145
+ false
146
+ end
147
+ when :Object
148
+ # generic object (usually a Hash), return directly
149
+ value
150
+ when /\AArray<(?<inner_type>.+)>\z/
151
+ inner_type = Regexp.last_match[:inner_type]
152
+ value.map { |v| _deserialize(inner_type, v) }
153
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
154
+ k_type = Regexp.last_match[:k_type]
155
+ v_type = Regexp.last_match[:v_type]
156
+ {}.tap do |hash|
157
+ value.each do |k, v|
158
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
159
+ end
160
+ end
161
+ else # model
162
+ # models (e.g. Pet) or oneOf
163
+ klass = TrinsicApi.const_get(type)
164
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
165
+ end
166
+ end
167
+
168
+ # Returns the string representation of the object
169
+ # @return [String] String presentation of the object
170
+ def to_s
171
+ to_hash.to_s
172
+ end
173
+
174
+ # to_body is an alias to to_hash (backward compatibility)
175
+ # @return [Hash] Returns the object in the form of hash
176
+ def to_body
177
+ to_hash
178
+ end
179
+
180
+ # Returns the object in the form of hash
181
+ # @return [Hash] Returns the object in the form of hash
182
+ def to_hash
183
+ hash = {}
184
+ self.class.attribute_map.each_pair do |attr, param|
185
+ value = self.send(attr)
186
+ if value.nil?
187
+ is_nullable = self.class.openapi_nullable.include?(attr)
188
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
189
+ end
190
+
191
+ hash[param] = _to_hash(value)
192
+ end
193
+ hash
194
+ end
195
+
196
+ # Outputs non-array value in the form of hash
197
+ # For object, use to_hash. Otherwise, just return the value
198
+ # @param [Object] value Any valid value
199
+ # @return [Hash] Returns the value in the form of hash
200
+ def _to_hash(value)
201
+ if value.is_a?(Array)
202
+ value.compact.map { |v| _to_hash(v) }
203
+ elsif value.is_a?(Hash)
204
+ {}.tap do |hash|
205
+ value.each { |k, v| hash[k] = _to_hash(v) }
206
+ end
207
+ elsif value.respond_to? :to_hash
208
+ value.to_hash
209
+ else
210
+ value
211
+ end
212
+ end
213
+
214
+ end
215
+
216
+ end
@@ -15,7 +15,7 @@ require 'time'
15
15
 
16
16
  module TrinsicApi
17
17
  class StepRefreshInfo
18
- # The UTC date/time at which the step `content` will expire and should no longer be used. Use the `Refresh Step Content` API to obtain a new value for `content`.
18
+ # The UTC date/time at which the step `content` will expire and should no longer be used. Use the `Refresh Step Content` API to obtain a new value for `content`.
19
19
  attr_accessor :expires_at
20
20
 
21
21
  # The UTC date/time after which Trinsic recommends you refresh the step `content`.
@@ -14,36 +14,27 @@ require 'date'
14
14
  require 'time'
15
15
 
16
16
  module TrinsicApi
17
- # Address information for an individual
18
- class KnownAddress
19
- attr_accessor :line1
17
+ # Information about a sub-provider.
18
+ class SubProviderMetadata
19
+ # The ID of the sub-provider. This cannot be used as a standalone Provider ID when creating a Session. It must be passed in via the Provider-specific input.
20
+ attr_accessor :id
20
21
 
21
- attr_accessor :line2
22
+ # The name of the sub-provider
23
+ attr_accessor :name
22
24
 
23
- attr_accessor :line3
25
+ # Flavor text for the sub-provider
26
+ attr_accessor :description
24
27
 
25
- attr_accessor :city
26
-
27
- attr_accessor :subdivision
28
-
29
- # Deprecated. Use `Subdivision` instead.
30
- attr_accessor :state
31
-
32
- attr_accessor :postal_code
33
-
34
- attr_accessor :country
28
+ # A URL pointing to the logo on Trinsic's CDN. May be a PNG, JPG, or SVG image.
29
+ attr_accessor :logo_url
35
30
 
36
31
  # Attribute mapping from ruby-style variable name to JSON key.
37
32
  def self.attribute_map
38
33
  {
39
- :'line1' => :'line1',
40
- :'line2' => :'line2',
41
- :'line3' => :'line3',
42
- :'city' => :'city',
43
- :'subdivision' => :'subdivision',
44
- :'state' => :'state',
45
- :'postal_code' => :'postalCode',
46
- :'country' => :'country'
34
+ :'id' => :'id',
35
+ :'name' => :'name',
36
+ :'description' => :'description',
37
+ :'logo_url' => :'logoUrl'
47
38
  }
48
39
  end
49
40
 
@@ -55,28 +46,16 @@ module TrinsicApi
55
46
  # Attribute type mapping.
56
47
  def self.openapi_types
57
48
  {
58
- :'line1' => :'String',
59
- :'line2' => :'String',
60
- :'line3' => :'String',
61
- :'city' => :'String',
62
- :'subdivision' => :'String',
63
- :'state' => :'String',
64
- :'postal_code' => :'String',
65
- :'country' => :'String'
49
+ :'id' => :'String',
50
+ :'name' => :'String',
51
+ :'description' => :'String',
52
+ :'logo_url' => :'String'
66
53
  }
67
54
  end
68
55
 
69
56
  # List of attributes with nullable: true
70
57
  def self.openapi_nullable
71
58
  Set.new([
72
- :'line1',
73
- :'line2',
74
- :'line3',
75
- :'city',
76
- :'subdivision',
77
- :'state',
78
- :'postal_code',
79
- :'country'
80
59
  ])
81
60
  end
82
61
 
@@ -84,55 +63,63 @@ module TrinsicApi
84
63
  # @param [Hash] attributes Model attributes in the form of hash
85
64
  def initialize(attributes = {})
86
65
  if (!attributes.is_a?(Hash))
87
- fail ArgumentError, "The input argument (attributes) must be a hash in `TrinsicApi::KnownAddress` initialize method"
66
+ fail ArgumentError, "The input argument (attributes) must be a hash in `TrinsicApi::SubProviderMetadata` initialize method"
88
67
  end
89
68
 
90
69
  # check to see if the attribute exists and convert string to symbol for hash key
91
70
  attributes = attributes.each_with_object({}) { |(k, v), h|
92
71
  if (!self.class.attribute_map.key?(k.to_sym))
93
- fail ArgumentError, "`#{k}` is not a valid attribute in `TrinsicApi::KnownAddress`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
72
+ fail ArgumentError, "`#{k}` is not a valid attribute in `TrinsicApi::SubProviderMetadata`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
94
73
  end
95
74
  h[k.to_sym] = v
96
75
  }
97
76
 
98
- if attributes.key?(:'line1')
99
- self.line1 = attributes[:'line1']
77
+ if attributes.key?(:'id')
78
+ self.id = attributes[:'id']
79
+ else
80
+ self.id = nil
100
81
  end
101
82
 
102
- if attributes.key?(:'line2')
103
- self.line2 = attributes[:'line2']
83
+ if attributes.key?(:'name')
84
+ self.name = attributes[:'name']
85
+ else
86
+ self.name = nil
104
87
  end
105
88
 
106
- if attributes.key?(:'line3')
107
- self.line3 = attributes[:'line3']
89
+ if attributes.key?(:'description')
90
+ self.description = attributes[:'description']
91
+ else
92
+ self.description = nil
108
93
  end
109
94
 
110
- if attributes.key?(:'city')
111
- self.city = attributes[:'city']
95
+ if attributes.key?(:'logo_url')
96
+ self.logo_url = attributes[:'logo_url']
97
+ else
98
+ self.logo_url = nil
112
99
  end
100
+ end
113
101
 
114
- if attributes.key?(:'subdivision')
115
- self.subdivision = attributes[:'subdivision']
102
+ # Show invalid properties with the reasons. Usually used together with valid?
103
+ # @return Array for valid properties with the reasons
104
+ def list_invalid_properties
105
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
106
+ invalid_properties = Array.new
107
+ if @id.nil?
108
+ invalid_properties.push('invalid value for "id", id cannot be nil.')
116
109
  end
117
110
 
118
- if attributes.key?(:'state')
119
- self.state = attributes[:'state']
111
+ if @name.nil?
112
+ invalid_properties.push('invalid value for "name", name cannot be nil.')
120
113
  end
121
114
 
122
- if attributes.key?(:'postal_code')
123
- self.postal_code = attributes[:'postal_code']
115
+ if @description.nil?
116
+ invalid_properties.push('invalid value for "description", description cannot be nil.')
124
117
  end
125
118
 
126
- if attributes.key?(:'country')
127
- self.country = attributes[:'country']
119
+ if @logo_url.nil?
120
+ invalid_properties.push('invalid value for "logo_url", logo_url cannot be nil.')
128
121
  end
129
- end
130
122
 
131
- # Show invalid properties with the reasons. Usually used together with valid?
132
- # @return Array for valid properties with the reasons
133
- def list_invalid_properties
134
- warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
135
- invalid_properties = Array.new
136
123
  invalid_properties
137
124
  end
138
125
 
@@ -140,6 +127,10 @@ module TrinsicApi
140
127
  # @return true if the model is valid
141
128
  def valid?
142
129
  warn '[DEPRECATED] the `valid?` method is obsolete'
130
+ return false if @id.nil?
131
+ return false if @name.nil?
132
+ return false if @description.nil?
133
+ return false if @logo_url.nil?
143
134
  true
144
135
  end
145
136
 
@@ -148,14 +139,10 @@ module TrinsicApi
148
139
  def ==(o)
149
140
  return true if self.equal?(o)
150
141
  self.class == o.class &&
151
- line1 == o.line1 &&
152
- line2 == o.line2 &&
153
- line3 == o.line3 &&
154
- city == o.city &&
155
- subdivision == o.subdivision &&
156
- state == o.state &&
157
- postal_code == o.postal_code &&
158
- country == o.country
142
+ id == o.id &&
143
+ name == o.name &&
144
+ description == o.description &&
145
+ logo_url == o.logo_url
159
146
  end
160
147
 
161
148
  # @see the `==` method
@@ -167,7 +154,7 @@ module TrinsicApi
167
154
  # Calculates hash code according to all attributes.
168
155
  # @return [Integer] Hash code
169
156
  def hash
170
- [line1, line2, line3, city, subdivision, state, postal_code, country].hash
157
+ [id, name, description, logo_url].hash
171
158
  end
172
159
 
173
160
  # Builds the object from hash