kinde_sdk 1.1.1 → 1.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (156) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +103 -19
  3. data/kinde_api/README.md +58 -23
  4. data/kinde_api/docs/AddOrganizationUsersRequest.md +1 -1
  5. data/kinde_api/docs/AddOrganizationUsersRequestUsersInner.md +22 -0
  6. data/kinde_api/docs/{AddOrganizationUsers200Response.md → AddOrganizationUsersResponse.md} +2 -2
  7. data/kinde_api/docs/Application.md +20 -0
  8. data/kinde_api/docs/CallbacksApi.md +219 -0
  9. data/kinde_api/docs/ConnectedAppsApi.md +9 -9
  10. data/kinde_api/docs/CreateOrganizationRequest.md +11 -1
  11. data/kinde_api/docs/CreateOrganizationResponse.md +22 -0
  12. data/kinde_api/docs/CreateOrganizationResponseOrganization.md +18 -0
  13. data/kinde_api/docs/CreateOrganizationUserRoleRequest.md +18 -0
  14. data/kinde_api/docs/CreatePermissionRequest.md +22 -0
  15. data/kinde_api/docs/CreateRoleRequest.md +24 -0
  16. data/kinde_api/docs/CreateSubscriberSuccessResponse.md +18 -0
  17. data/kinde_api/docs/CreateSubscriberSuccessResponseSubscriber.md +18 -0
  18. data/kinde_api/docs/{CreateUser200Response.md → CreateUserResponse.md} +2 -2
  19. data/kinde_api/docs/EnvironmentsApi.md +71 -4
  20. data/kinde_api/docs/FeatureFlagsApi.md +9 -11
  21. data/kinde_api/docs/GetApplicationsResponse.md +24 -0
  22. data/kinde_api/docs/GetEnvironmentFeatureFlagsResponse.md +24 -0
  23. data/kinde_api/docs/GetOrganizationFeatureFlagsResponse.md +22 -0
  24. data/kinde_api/docs/GetOrganizationFeatureFlagsResponseFeatureFlagsValue.md +20 -0
  25. data/kinde_api/docs/{GetOrganizations200Response.md → GetOrganizationsResponse.md} +2 -2
  26. data/kinde_api/docs/GetOrganizationsUserRolesResponse.md +24 -0
  27. data/kinde_api/docs/{GetOrganizationUsers200Response.md → GetOrganizationsUsersResponse.md} +2 -2
  28. data/kinde_api/docs/GetRedirectCallbackUrlsResponse.md +18 -0
  29. data/kinde_api/docs/OrganizationUser.md +3 -1
  30. data/kinde_api/docs/OrganizationUserRole.md +22 -0
  31. data/kinde_api/docs/OrganizationsApi.md +494 -59
  32. data/kinde_api/docs/Permissions.md +22 -0
  33. data/kinde_api/docs/PermissionsApi.md +229 -0
  34. data/kinde_api/docs/RedirectCallbackUrls.md +18 -0
  35. data/kinde_api/docs/Roles.md +22 -0
  36. data/kinde_api/docs/RolesApi.md +229 -0
  37. data/kinde_api/docs/SubscribersApi.md +229 -0
  38. data/kinde_api/docs/UpdateOrganizationRequest.md +28 -0
  39. data/kinde_api/docs/UpdateOrganizationUsersRequest.md +18 -0
  40. data/kinde_api/docs/UpdateOrganizationUsersRequestUsersInner.md +24 -0
  41. data/kinde_api/docs/UpdateOrganizationUsersResponse.md +24 -0
  42. data/kinde_api/docs/UpdateUserRequest.md +3 -1
  43. data/kinde_api/docs/User.md +15 -1
  44. data/kinde_api/docs/UserIdentityResult.md +1 -3
  45. data/kinde_api/docs/UserProfile.md +3 -1
  46. data/kinde_api/docs/UserProfileV2.md +6 -2
  47. data/kinde_api/docs/UsersApi.md +31 -259
  48. data/kinde_api/docs/{GetUsers200Response.md → UsersResponse.md} +2 -2
  49. data/kinde_api/lib/kinde_api/api/callbacks_api.rb +221 -0
  50. data/kinde_api/lib/kinde_api/api/connected_apps_api.rb +8 -8
  51. data/kinde_api/lib/kinde_api/api/environments_api.rb +61 -4
  52. data/kinde_api/lib/kinde_api/api/feature_flags_api.rb +8 -15
  53. data/kinde_api/lib/kinde_api/api/organizations_api.rb +492 -57
  54. data/kinde_api/lib/kinde_api/api/permissions_api.rb +226 -0
  55. data/kinde_api/lib/kinde_api/api/roles_api.rb +226 -0
  56. data/kinde_api/lib/kinde_api/api/subscribers_api.rb +228 -0
  57. data/kinde_api/lib/kinde_api/api/users_api.rb +30 -233
  58. data/kinde_api/lib/kinde_api/api_client.rb +1 -13
  59. data/kinde_api/lib/kinde_api/configuration.rb +3 -77
  60. data/kinde_api/lib/kinde_api/models/add_organization_users_request.rb +2 -2
  61. data/kinde_api/lib/kinde_api/models/add_organization_users_request_users_inner.rb +242 -0
  62. data/kinde_api/lib/kinde_api/models/{add_organization_users200_response.rb → add_organization_users_response.rb} +3 -3
  63. data/kinde_api/lib/kinde_api/models/application.rb +226 -0
  64. data/kinde_api/lib/kinde_api/models/create_organization_request.rb +54 -4
  65. data/kinde_api/lib/kinde_api/models/{remove_organization_users200_response.rb → create_organization_response.rb} +19 -12
  66. data/kinde_api/lib/kinde_api/models/{create_organization201_response.rb → create_organization_response_organization.rb} +8 -18
  67. data/kinde_api/lib/kinde_api/models/create_organization_user_role_request.rb +218 -0
  68. data/kinde_api/lib/kinde_api/models/create_permission_request.rb +238 -0
  69. data/kinde_api/lib/kinde_api/models/create_role_request.rb +248 -0
  70. data/kinde_api/lib/kinde_api/models/create_subscriber_success_response.rb +217 -0
  71. data/kinde_api/lib/kinde_api/models/create_subscriber_success_response_subscriber.rb +218 -0
  72. data/kinde_api/lib/kinde_api/models/create_user_request_identities_inner.rb +34 -0
  73. data/kinde_api/lib/kinde_api/models/{create_user200_response.rb → create_user_response.rb} +3 -3
  74. data/kinde_api/lib/kinde_api/models/get_applications_response.rb +249 -0
  75. data/kinde_api/lib/kinde_api/models/get_environment_feature_flags_response.rb +250 -0
  76. data/kinde_api/lib/kinde_api/models/get_organization_feature_flags_response.rb +240 -0
  77. data/kinde_api/lib/kinde_api/models/get_organization_feature_flags_response_feature_flags_value.rb +260 -0
  78. data/kinde_api/lib/kinde_api/models/{get_organizations200_response.rb → get_organizations_response.rb} +3 -3
  79. data/kinde_api/lib/kinde_api/models/get_organizations_user_roles_response.rb +249 -0
  80. data/kinde_api/lib/kinde_api/models/{get_organization_users200_response.rb → get_organizations_users_response.rb} +3 -3
  81. data/kinde_api/lib/kinde_api/models/get_redirect_callback_urls_response.rb +220 -0
  82. data/kinde_api/lib/kinde_api/models/organization_user.rb +15 -4
  83. data/kinde_api/lib/kinde_api/models/organization_user_role.rb +235 -0
  84. data/kinde_api/lib/kinde_api/models/permissions.rb +238 -0
  85. data/kinde_api/lib/kinde_api/models/redirect_callback_urls.rb +220 -0
  86. data/kinde_api/lib/kinde_api/models/roles.rb +238 -0
  87. data/kinde_api/lib/kinde_api/models/update_organization_request.rb +268 -0
  88. data/kinde_api/lib/kinde_api/models/{remove_organization_users_request.rb → update_organization_users_request.rb} +5 -5
  89. data/kinde_api/lib/kinde_api/models/update_organization_users_request_users_inner.rb +252 -0
  90. data/kinde_api/lib/kinde_api/models/update_organization_users_response.rb +250 -0
  91. data/kinde_api/lib/kinde_api/models/update_user_request.rb +14 -4
  92. data/kinde_api/lib/kinde_api/models/user.rb +79 -5
  93. data/kinde_api/lib/kinde_api/models/user_identity_result.rb +4 -14
  94. data/kinde_api/lib/kinde_api/models/user_profile.rb +14 -4
  95. data/kinde_api/lib/kinde_api/models/user_profile_v2.rb +25 -5
  96. data/kinde_api/lib/kinde_api/models/{get_users200_response.rb → users_response.rb} +3 -3
  97. data/kinde_api/lib/kinde_api.rb +32 -8
  98. data/kinde_api/spec/api/callbacks_api_spec.rb +73 -0
  99. data/kinde_api/spec/api/connected_apps_api_spec.rb +1 -1
  100. data/kinde_api/spec/api/environments_api_spec.rb +11 -0
  101. data/kinde_api/spec/api/feature_flags_api_spec.rb +1 -2
  102. data/kinde_api/spec/api/organizations_api_spec.rb +93 -14
  103. data/kinde_api/spec/api/permissions_api_spec.rb +74 -0
  104. data/kinde_api/spec/api/roles_api_spec.rb +74 -0
  105. data/kinde_api/spec/api/subscribers_api_spec.rb +76 -0
  106. data/kinde_api/spec/api/users_api_spec.rb +6 -47
  107. data/kinde_api/spec/api_client_spec.rb +0 -12
  108. data/kinde_api/spec/models/add_organization_users_request_users_inner_spec.rb +46 -0
  109. data/kinde_api/spec/models/{add_organization_users200_response_spec.rb → add_organization_users_response_spec.rb} +6 -6
  110. data/kinde_api/spec/models/{remove_organization_users200_response_spec.rb → application_spec.rb} +8 -8
  111. data/kinde_api/spec/models/create_organization_request_spec.rb +30 -0
  112. data/kinde_api/spec/models/create_organization_response_organization_spec.rb +34 -0
  113. data/kinde_api/spec/models/{create_organization201_response_spec.rb → create_organization_response_spec.rb} +13 -7
  114. data/kinde_api/spec/models/create_organization_user_role_request_spec.rb +34 -0
  115. data/kinde_api/spec/models/create_permission_request_spec.rb +46 -0
  116. data/kinde_api/spec/models/create_role_request_spec.rb +52 -0
  117. data/kinde_api/spec/models/create_subscriber_success_response_spec.rb +34 -0
  118. data/kinde_api/spec/models/create_subscriber_success_response_subscriber_spec.rb +34 -0
  119. data/kinde_api/spec/models/create_user_request_identities_inner_spec.rb +4 -0
  120. data/kinde_api/spec/models/{create_user200_response_spec.rb → create_user_response_spec.rb} +6 -6
  121. data/kinde_api/spec/models/get_applications_response_spec.rb +52 -0
  122. data/kinde_api/spec/models/get_environment_feature_flags_response_spec.rb +52 -0
  123. data/kinde_api/spec/models/get_organization_feature_flags_response_feature_flags_value_spec.rb +44 -0
  124. data/kinde_api/spec/models/get_organization_feature_flags_response_spec.rb +46 -0
  125. data/kinde_api/spec/models/{get_organizations200_response_spec.rb → get_organizations_response_spec.rb} +6 -6
  126. data/kinde_api/spec/models/get_organizations_user_roles_response_spec.rb +52 -0
  127. data/kinde_api/spec/models/{get_organization_users200_response_spec.rb → get_organizations_users_response_spec.rb} +6 -6
  128. data/kinde_api/spec/models/get_redirect_callback_urls_response_spec.rb +34 -0
  129. data/kinde_api/spec/models/organization_user_role_spec.rb +46 -0
  130. data/kinde_api/spec/models/organization_user_spec.rb +6 -0
  131. data/kinde_api/spec/models/permissions_spec.rb +46 -0
  132. data/kinde_api/spec/models/redirect_callback_urls_spec.rb +34 -0
  133. data/kinde_api/spec/models/roles_spec.rb +46 -0
  134. data/kinde_api/spec/models/update_organization_request_spec.rb +64 -0
  135. data/kinde_api/spec/models/{remove_organization_users_request_spec.rb → update_organization_users_request_spec.rb} +6 -6
  136. data/kinde_api/spec/models/update_organization_users_request_users_inner_spec.rb +52 -0
  137. data/kinde_api/spec/models/update_organization_users_response_spec.rb +52 -0
  138. data/kinde_api/spec/models/update_user_request_spec.rb +6 -0
  139. data/kinde_api/spec/models/user_identity_result_spec.rb +0 -6
  140. data/kinde_api/spec/models/user_profile_spec.rb +6 -0
  141. data/kinde_api/spec/models/user_profile_v2_spec.rb +12 -0
  142. data/kinde_api/spec/models/user_spec.rb +42 -0
  143. data/kinde_api/spec/models/{get_users200_response_spec.rb → users_response_spec.rb} +6 -6
  144. data/kinde_sdk.gemspec +1 -1
  145. data/lib/kinde_sdk/client/feature_flags.rb +64 -0
  146. data/lib/kinde_sdk/client/permissions.rb +20 -0
  147. data/lib/kinde_sdk/client.rb +33 -18
  148. data/lib/kinde_sdk/configuration.rb +0 -2
  149. data/lib/kinde_sdk/version.rb +1 -1
  150. data/lib/kinde_sdk.rb +27 -12
  151. data/spec/kinde_sdk_spec.rb +131 -5
  152. data/spec/spec_helper.rb +2 -0
  153. metadata +134 -36
  154. data/kinde_api/docs/CreateOrganization201Response.md +0 -20
  155. data/kinde_api/docs/RemoveOrganizationUsers200Response.md +0 -20
  156. data/kinde_api/docs/RemoveOrganizationUsersRequest.md +0 -18
@@ -0,0 +1,252 @@
1
+ =begin
2
+ #Kinde Management API
3
+
4
+ #Provides endpoints to manage your Kinde Businesses
5
+
6
+ The version of the OpenAPI document: 1
7
+ Contact: support@kinde.com
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 6.4.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module KindeApi
17
+ class UpdateOrganizationUsersRequestUsersInner
18
+ # The users id.
19
+ attr_accessor :id
20
+
21
+ # Optional operation, set to 'delete' to remove the user from the organization.
22
+ attr_accessor :operation
23
+
24
+ # Role keys to assign to the user.
25
+ attr_accessor :roles
26
+
27
+ # Permission keys to assign to the user.
28
+ attr_accessor :permissions
29
+
30
+ # Attribute mapping from ruby-style variable name to JSON key.
31
+ def self.attribute_map
32
+ {
33
+ :'id' => :'id',
34
+ :'operation' => :'operation',
35
+ :'roles' => :'roles',
36
+ :'permissions' => :'permissions'
37
+ }
38
+ end
39
+
40
+ # Returns all the JSON keys this model knows about
41
+ def self.acceptable_attributes
42
+ attribute_map.values
43
+ end
44
+
45
+ # Attribute type mapping.
46
+ def self.openapi_types
47
+ {
48
+ :'id' => :'String',
49
+ :'operation' => :'String',
50
+ :'roles' => :'Array<String>',
51
+ :'permissions' => :'Array<String>'
52
+ }
53
+ end
54
+
55
+ # List of attributes with nullable: true
56
+ def self.openapi_nullable
57
+ Set.new([
58
+ ])
59
+ end
60
+
61
+ # Initializes the object
62
+ # @param [Hash] attributes Model attributes in the form of hash
63
+ def initialize(attributes = {})
64
+ if (!attributes.is_a?(Hash))
65
+ fail ArgumentError, "The input argument (attributes) must be a hash in `KindeApi::UpdateOrganizationUsersRequestUsersInner` initialize method"
66
+ end
67
+
68
+ # check to see if the attribute exists and convert string to symbol for hash key
69
+ attributes = attributes.each_with_object({}) { |(k, v), h|
70
+ if (!self.class.attribute_map.key?(k.to_sym))
71
+ fail ArgumentError, "`#{k}` is not a valid attribute in `KindeApi::UpdateOrganizationUsersRequestUsersInner`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
72
+ end
73
+ h[k.to_sym] = v
74
+ }
75
+
76
+ if attributes.key?(:'id')
77
+ self.id = attributes[:'id']
78
+ end
79
+
80
+ if attributes.key?(:'operation')
81
+ self.operation = attributes[:'operation']
82
+ end
83
+
84
+ if attributes.key?(:'roles')
85
+ if (value = attributes[:'roles']).is_a?(Array)
86
+ self.roles = value
87
+ end
88
+ end
89
+
90
+ if attributes.key?(:'permissions')
91
+ if (value = attributes[:'permissions']).is_a?(Array)
92
+ self.permissions = value
93
+ end
94
+ end
95
+ end
96
+
97
+ # Show invalid properties with the reasons. Usually used together with valid?
98
+ # @return Array for valid properties with the reasons
99
+ def list_invalid_properties
100
+ invalid_properties = Array.new
101
+ invalid_properties
102
+ end
103
+
104
+ # Check to see if the all the properties in the model are valid
105
+ # @return true if the model is valid
106
+ def valid?
107
+ true
108
+ end
109
+
110
+ # Checks equality by comparing each attribute.
111
+ # @param [Object] Object to be compared
112
+ def ==(o)
113
+ return true if self.equal?(o)
114
+ self.class == o.class &&
115
+ id == o.id &&
116
+ operation == o.operation &&
117
+ roles == o.roles &&
118
+ permissions == o.permissions
119
+ end
120
+
121
+ # @see the `==` method
122
+ # @param [Object] Object to be compared
123
+ def eql?(o)
124
+ self == o
125
+ end
126
+
127
+ # Calculates hash code according to all attributes.
128
+ # @return [Integer] Hash code
129
+ def hash
130
+ [id, operation, roles, permissions].hash
131
+ end
132
+
133
+ # Builds the object from hash
134
+ # @param [Hash] attributes Model attributes in the form of hash
135
+ # @return [Object] Returns the model itself
136
+ def self.build_from_hash(attributes)
137
+ new.build_from_hash(attributes)
138
+ end
139
+
140
+ # Builds the object from hash
141
+ # @param [Hash] attributes Model attributes in the form of hash
142
+ # @return [Object] Returns the model itself
143
+ def build_from_hash(attributes)
144
+ return nil unless attributes.is_a?(Hash)
145
+ attributes = attributes.transform_keys(&:to_sym)
146
+ self.class.openapi_types.each_pair do |key, type|
147
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
148
+ self.send("#{key}=", nil)
149
+ elsif type =~ /\AArray<(.*)>/i
150
+ # check to ensure the input is an array given that the attribute
151
+ # is documented as an array but the input is not
152
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
153
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
154
+ end
155
+ elsif !attributes[self.class.attribute_map[key]].nil?
156
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
157
+ end
158
+ end
159
+
160
+ self
161
+ end
162
+
163
+ # Deserializes the data based on type
164
+ # @param string type Data type
165
+ # @param string value Value to be deserialized
166
+ # @return [Object] Deserialized data
167
+ def _deserialize(type, value)
168
+ case type.to_sym
169
+ when :Time
170
+ Time.parse(value)
171
+ when :Date
172
+ Date.parse(value)
173
+ when :String
174
+ value.to_s
175
+ when :Integer
176
+ value.to_i
177
+ when :Float
178
+ value.to_f
179
+ when :Boolean
180
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
181
+ true
182
+ else
183
+ false
184
+ end
185
+ when :Object
186
+ # generic object (usually a Hash), return directly
187
+ value
188
+ when /\AArray<(?<inner_type>.+)>\z/
189
+ inner_type = Regexp.last_match[:inner_type]
190
+ value.map { |v| _deserialize(inner_type, v) }
191
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
192
+ k_type = Regexp.last_match[:k_type]
193
+ v_type = Regexp.last_match[:v_type]
194
+ {}.tap do |hash|
195
+ value.each do |k, v|
196
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
197
+ end
198
+ end
199
+ else # model
200
+ # models (e.g. Pet) or oneOf
201
+ klass = KindeApi.const_get(type)
202
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
203
+ end
204
+ end
205
+
206
+ # Returns the string representation of the object
207
+ # @return [String] String presentation of the object
208
+ def to_s
209
+ to_hash.to_s
210
+ end
211
+
212
+ # to_body is an alias to to_hash (backward compatibility)
213
+ # @return [Hash] Returns the object in the form of hash
214
+ def to_body
215
+ to_hash
216
+ end
217
+
218
+ # Returns the object in the form of hash
219
+ # @return [Hash] Returns the object in the form of hash
220
+ def to_hash
221
+ hash = {}
222
+ self.class.attribute_map.each_pair do |attr, param|
223
+ value = self.send(attr)
224
+ if value.nil?
225
+ is_nullable = self.class.openapi_nullable.include?(attr)
226
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
227
+ end
228
+
229
+ hash[param] = _to_hash(value)
230
+ end
231
+ hash
232
+ end
233
+
234
+ # Outputs non-array value in the form of hash
235
+ # For object, use to_hash. Otherwise, just return the value
236
+ # @param [Object] value Any valid value
237
+ # @return [Hash] Returns the value in the form of hash
238
+ def _to_hash(value)
239
+ if value.is_a?(Array)
240
+ value.compact.map { |v| _to_hash(v) }
241
+ elsif value.is_a?(Hash)
242
+ {}.tap do |hash|
243
+ value.each { |k, v| hash[k] = _to_hash(v) }
244
+ end
245
+ elsif value.respond_to? :to_hash
246
+ value.to_hash
247
+ else
248
+ value
249
+ end
250
+ end
251
+ end
252
+ end
@@ -0,0 +1,250 @@
1
+ =begin
2
+ #Kinde Management API
3
+
4
+ #Provides endpoints to manage your Kinde Businesses
5
+
6
+ The version of the OpenAPI document: 1
7
+ Contact: support@kinde.com
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 6.4.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module KindeApi
17
+ class UpdateOrganizationUsersResponse
18
+ attr_accessor :message
19
+
20
+ attr_accessor :users_added
21
+
22
+ attr_accessor :users_updated
23
+
24
+ attr_accessor :users_removed
25
+
26
+ # Attribute mapping from ruby-style variable name to JSON key.
27
+ def self.attribute_map
28
+ {
29
+ :'message' => :'message',
30
+ :'users_added' => :'users_added',
31
+ :'users_updated' => :'users_updated',
32
+ :'users_removed' => :'users_removed'
33
+ }
34
+ end
35
+
36
+ # Returns all the JSON keys this model knows about
37
+ def self.acceptable_attributes
38
+ attribute_map.values
39
+ end
40
+
41
+ # Attribute type mapping.
42
+ def self.openapi_types
43
+ {
44
+ :'message' => :'String',
45
+ :'users_added' => :'Array<String>',
46
+ :'users_updated' => :'Array<String>',
47
+ :'users_removed' => :'Array<String>'
48
+ }
49
+ end
50
+
51
+ # List of attributes with nullable: true
52
+ def self.openapi_nullable
53
+ Set.new([
54
+ ])
55
+ end
56
+
57
+ # Initializes the object
58
+ # @param [Hash] attributes Model attributes in the form of hash
59
+ def initialize(attributes = {})
60
+ if (!attributes.is_a?(Hash))
61
+ fail ArgumentError, "The input argument (attributes) must be a hash in `KindeApi::UpdateOrganizationUsersResponse` initialize method"
62
+ end
63
+
64
+ # check to see if the attribute exists and convert string to symbol for hash key
65
+ attributes = attributes.each_with_object({}) { |(k, v), h|
66
+ if (!self.class.attribute_map.key?(k.to_sym))
67
+ fail ArgumentError, "`#{k}` is not a valid attribute in `KindeApi::UpdateOrganizationUsersResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
68
+ end
69
+ h[k.to_sym] = v
70
+ }
71
+
72
+ if attributes.key?(:'message')
73
+ self.message = attributes[:'message']
74
+ end
75
+
76
+ if attributes.key?(:'users_added')
77
+ if (value = attributes[:'users_added']).is_a?(Array)
78
+ self.users_added = value
79
+ end
80
+ end
81
+
82
+ if attributes.key?(:'users_updated')
83
+ if (value = attributes[:'users_updated']).is_a?(Array)
84
+ self.users_updated = value
85
+ end
86
+ end
87
+
88
+ if attributes.key?(:'users_removed')
89
+ if (value = attributes[:'users_removed']).is_a?(Array)
90
+ self.users_removed = value
91
+ end
92
+ end
93
+ end
94
+
95
+ # Show invalid properties with the reasons. Usually used together with valid?
96
+ # @return Array for valid properties with the reasons
97
+ def list_invalid_properties
98
+ invalid_properties = Array.new
99
+ invalid_properties
100
+ end
101
+
102
+ # Check to see if the all the properties in the model are valid
103
+ # @return true if the model is valid
104
+ def valid?
105
+ true
106
+ end
107
+
108
+ # Checks equality by comparing each attribute.
109
+ # @param [Object] Object to be compared
110
+ def ==(o)
111
+ return true if self.equal?(o)
112
+ self.class == o.class &&
113
+ message == o.message &&
114
+ users_added == o.users_added &&
115
+ users_updated == o.users_updated &&
116
+ users_removed == o.users_removed
117
+ end
118
+
119
+ # @see the `==` method
120
+ # @param [Object] Object to be compared
121
+ def eql?(o)
122
+ self == o
123
+ end
124
+
125
+ # Calculates hash code according to all attributes.
126
+ # @return [Integer] Hash code
127
+ def hash
128
+ [message, users_added, users_updated, users_removed].hash
129
+ end
130
+
131
+ # Builds the object from hash
132
+ # @param [Hash] attributes Model attributes in the form of hash
133
+ # @return [Object] Returns the model itself
134
+ def self.build_from_hash(attributes)
135
+ new.build_from_hash(attributes)
136
+ end
137
+
138
+ # Builds the object from hash
139
+ # @param [Hash] attributes Model attributes in the form of hash
140
+ # @return [Object] Returns the model itself
141
+ def build_from_hash(attributes)
142
+ return nil unless attributes.is_a?(Hash)
143
+ attributes = attributes.transform_keys(&:to_sym)
144
+ self.class.openapi_types.each_pair do |key, type|
145
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
146
+ self.send("#{key}=", nil)
147
+ elsif type =~ /\AArray<(.*)>/i
148
+ # check to ensure the input is an array given that the attribute
149
+ # is documented as an array but the input is not
150
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
151
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
152
+ end
153
+ elsif !attributes[self.class.attribute_map[key]].nil?
154
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
155
+ end
156
+ end
157
+
158
+ self
159
+ end
160
+
161
+ # Deserializes the data based on type
162
+ # @param string type Data type
163
+ # @param string value Value to be deserialized
164
+ # @return [Object] Deserialized data
165
+ def _deserialize(type, value)
166
+ case type.to_sym
167
+ when :Time
168
+ Time.parse(value)
169
+ when :Date
170
+ Date.parse(value)
171
+ when :String
172
+ value.to_s
173
+ when :Integer
174
+ value.to_i
175
+ when :Float
176
+ value.to_f
177
+ when :Boolean
178
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
179
+ true
180
+ else
181
+ false
182
+ end
183
+ when :Object
184
+ # generic object (usually a Hash), return directly
185
+ value
186
+ when /\AArray<(?<inner_type>.+)>\z/
187
+ inner_type = Regexp.last_match[:inner_type]
188
+ value.map { |v| _deserialize(inner_type, v) }
189
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
190
+ k_type = Regexp.last_match[:k_type]
191
+ v_type = Regexp.last_match[:v_type]
192
+ {}.tap do |hash|
193
+ value.each do |k, v|
194
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
195
+ end
196
+ end
197
+ else # model
198
+ # models (e.g. Pet) or oneOf
199
+ klass = KindeApi.const_get(type)
200
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
201
+ end
202
+ end
203
+
204
+ # Returns the string representation of the object
205
+ # @return [String] String presentation of the object
206
+ def to_s
207
+ to_hash.to_s
208
+ end
209
+
210
+ # to_body is an alias to to_hash (backward compatibility)
211
+ # @return [Hash] Returns the object in the form of hash
212
+ def to_body
213
+ to_hash
214
+ end
215
+
216
+ # Returns the object in the form of hash
217
+ # @return [Hash] Returns the object in the form of hash
218
+ def to_hash
219
+ hash = {}
220
+ self.class.attribute_map.each_pair do |attr, param|
221
+ value = self.send(attr)
222
+ if value.nil?
223
+ is_nullable = self.class.openapi_nullable.include?(attr)
224
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
225
+ end
226
+
227
+ hash[param] = _to_hash(value)
228
+ end
229
+ hash
230
+ end
231
+
232
+ # Outputs non-array value in the form of hash
233
+ # For object, use to_hash. Otherwise, just return the value
234
+ # @param [Object] value Any valid value
235
+ # @return [Hash] Returns the value in the form of hash
236
+ def _to_hash(value)
237
+ if value.is_a?(Array)
238
+ value.compact.map { |v| _to_hash(v) }
239
+ elsif value.is_a?(Hash)
240
+ {}.tap do |hash|
241
+ value.each { |k, v| hash[k] = _to_hash(v) }
242
+ end
243
+ elsif value.respond_to? :to_hash
244
+ value.to_hash
245
+ else
246
+ value
247
+ end
248
+ end
249
+ end
250
+ end
@@ -24,12 +24,16 @@ module KindeApi
24
24
  # Whether the user is currently suspended or not.
25
25
  attr_accessor :is_suspended
26
26
 
27
+ # Prompt the user to change their password on next sign in.
28
+ attr_accessor :is_password_reset_requested
29
+
27
30
  # Attribute mapping from ruby-style variable name to JSON key.
28
31
  def self.attribute_map
29
32
  {
30
33
  :'given_name' => :'given_name',
31
34
  :'family_name' => :'family_name',
32
- :'is_suspended' => :'is_suspended'
35
+ :'is_suspended' => :'is_suspended',
36
+ :'is_password_reset_requested' => :'is_password_reset_requested'
33
37
  }
34
38
  end
35
39
 
@@ -43,7 +47,8 @@ module KindeApi
43
47
  {
44
48
  :'given_name' => :'String',
45
49
  :'family_name' => :'String',
46
- :'is_suspended' => :'Boolean'
50
+ :'is_suspended' => :'Boolean',
51
+ :'is_password_reset_requested' => :'Boolean'
47
52
  }
48
53
  end
49
54
 
@@ -79,6 +84,10 @@ module KindeApi
79
84
  if attributes.key?(:'is_suspended')
80
85
  self.is_suspended = attributes[:'is_suspended']
81
86
  end
87
+
88
+ if attributes.key?(:'is_password_reset_requested')
89
+ self.is_password_reset_requested = attributes[:'is_password_reset_requested']
90
+ end
82
91
  end
83
92
 
84
93
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -101,7 +110,8 @@ module KindeApi
101
110
  self.class == o.class &&
102
111
  given_name == o.given_name &&
103
112
  family_name == o.family_name &&
104
- is_suspended == o.is_suspended
113
+ is_suspended == o.is_suspended &&
114
+ is_password_reset_requested == o.is_password_reset_requested
105
115
  end
106
116
 
107
117
  # @see the `==` method
@@ -113,7 +123,7 @@ module KindeApi
113
123
  # Calculates hash code according to all attributes.
114
124
  # @return [Integer] Hash code
115
125
  def hash
116
- [given_name, family_name, is_suspended].hash
126
+ [given_name, family_name, is_suspended, is_password_reset_requested].hash
117
127
  end
118
128
 
119
129
  # Builds the object from hash