kinde_sdk 1.2.1 → 1.2.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (241) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +128 -0
  3. data/README.md +12 -434
  4. data/kinde_api/README.md +98 -27
  5. data/kinde_api/docs/APIsApi.md +356 -0
  6. data/kinde_api/docs/AddAPIsRequest.md +20 -0
  7. data/kinde_api/docs/Api.md +28 -0
  8. data/kinde_api/docs/ApiApplicationsInner.md +24 -0
  9. data/kinde_api/docs/Apis.md +24 -0
  10. data/kinde_api/docs/Applications.md +22 -0
  11. data/kinde_api/docs/ApplicationsApi.md +368 -0
  12. data/kinde_api/docs/BusinessApi.md +183 -0
  13. data/kinde_api/docs/CallbacksApi.md +385 -25
  14. data/kinde_api/docs/CreateApplicationRequest.md +20 -0
  15. data/kinde_api/docs/CreateApplicationResponse.md +22 -0
  16. data/kinde_api/docs/CreateApplicationResponseApplication.md +22 -0
  17. data/kinde_api/docs/CreateFeatureFlagRequest.md +28 -0
  18. data/kinde_api/docs/CreateOrganizationRequest.md +3 -1
  19. data/kinde_api/docs/CreateOrganizationUserPermissionRequest.md +18 -0
  20. data/kinde_api/docs/EnvironmentsApi.md +23 -23
  21. data/kinde_api/docs/FeatureFlagsApi.md +19 -29
  22. data/kinde_api/docs/GetApplicationResponse.md +22 -0
  23. data/kinde_api/docs/GetApplicationResponseApplication.md +26 -0
  24. data/kinde_api/docs/GetApplicationsResponse.md +2 -2
  25. data/kinde_api/docs/{GetOrganizationsUsersResponse.md → GetOrganizationUsersResponse.md} +2 -2
  26. data/kinde_api/docs/GetOrganizationsUserPermissionsResponse.md +22 -0
  27. data/kinde_api/docs/GetPermissionsResponse.md +24 -0
  28. data/kinde_api/docs/GetRolesResponse.md +24 -0
  29. data/kinde_api/docs/GetSubscriberResponse.md +22 -0
  30. data/kinde_api/docs/GetSubscribersResponse.md +24 -0
  31. data/kinde_api/docs/IndustriesApi.md +81 -0
  32. data/kinde_api/docs/LogoutRedirectUrls.md +18 -0
  33. data/kinde_api/docs/OAuthApi.md +153 -4
  34. data/kinde_api/docs/Organization.md +3 -1
  35. data/kinde_api/docs/OrganizationUserPermission.md +26 -0
  36. data/kinde_api/docs/OrganizationUserPermissionRolesInner.md +20 -0
  37. data/kinde_api/docs/OrganizationUserRolePermissions.md +22 -0
  38. data/kinde_api/docs/OrganizationUserRolePermissionsPermissions.md +18 -0
  39. data/kinde_api/docs/OrganizationsApi.md +328 -32
  40. data/kinde_api/docs/PermissionsApi.md +84 -14
  41. data/kinde_api/docs/ReplaceLogoutRedirectURLsRequest.md +18 -0
  42. data/kinde_api/docs/ReplaceRedirectCallbackURLsRequest.md +18 -0
  43. data/kinde_api/docs/Role.md +24 -0
  44. data/kinde_api/docs/Roles.md +2 -0
  45. data/kinde_api/docs/RolesApi.md +309 -17
  46. data/kinde_api/docs/RolesPermissionResponseInner.md +24 -0
  47. data/kinde_api/docs/Subscriber.md +24 -0
  48. data/kinde_api/docs/SubscribersApi.md +12 -14
  49. data/kinde_api/docs/SubscribersSubscriber.md +26 -0
  50. data/kinde_api/docs/TimezonesApi.md +81 -0
  51. data/kinde_api/docs/TokenErrorResponse.md +20 -0
  52. data/kinde_api/docs/TokenIntrospect.md +26 -0
  53. data/kinde_api/docs/UpdateAPIApplicationsRequest.md +18 -0
  54. data/kinde_api/docs/UpdateAPIApplicationsRequestApplicationsInner.md +20 -0
  55. data/kinde_api/docs/UpdateApplicationRequest.md +24 -0
  56. data/kinde_api/docs/UpdateEnvironementFeatureFlagOverrideRequest.md +18 -0
  57. data/kinde_api/docs/UpdateOrganizationRequest.md +3 -1
  58. data/kinde_api/docs/UpdateOrganizationUsersRequest.md +1 -1
  59. data/kinde_api/docs/UpdateRolePermissionsRequest.md +18 -0
  60. data/kinde_api/docs/UpdateRolePermissionsRequestPermissionsInner.md +20 -0
  61. data/kinde_api/docs/UpdateRolePermissionsResponse.md +24 -0
  62. data/kinde_api/docs/UpdateRolesRequest.md +24 -0
  63. data/kinde_api/docs/UpdateUserResponse.md +30 -0
  64. data/kinde_api/docs/User.md +7 -7
  65. data/kinde_api/docs/UserIdentitiesInner.md +20 -0
  66. data/kinde_api/docs/UsersApi.md +93 -15
  67. data/kinde_api/docs/UsersResponse.md +1 -1
  68. data/kinde_api/docs/UsersResponseUsersInner.md +42 -0
  69. data/kinde_api/lib/kinde_api/api/apis_api.rb +347 -0
  70. data/kinde_api/lib/kinde_api/api/applications_api.rb +352 -0
  71. data/kinde_api/lib/kinde_api/api/business_api.rb +210 -0
  72. data/kinde_api/lib/kinde_api/api/callbacks_api.rb +394 -31
  73. data/kinde_api/lib/kinde_api/api/environments_api.rb +22 -18
  74. data/kinde_api/lib/kinde_api/api/feature_flags_api.rb +20 -61
  75. data/kinde_api/lib/kinde_api/api/industries_api.rb +85 -0
  76. data/kinde_api/lib/kinde_api/api/o_auth_api.rb +141 -2
  77. data/kinde_api/lib/kinde_api/api/organizations_api.rb +318 -25
  78. data/kinde_api/lib/kinde_api/api/permissions_api.rb +75 -12
  79. data/kinde_api/lib/kinde_api/api/roles_api.rb +297 -15
  80. data/kinde_api/lib/kinde_api/api/subscribers_api.rb +8 -11
  81. data/kinde_api/lib/kinde_api/api/timezones_api.rb +85 -0
  82. data/kinde_api/lib/kinde_api/api/users_api.rb +87 -11
  83. data/kinde_api/lib/kinde_api/api_client.rb +14 -7
  84. data/kinde_api/lib/kinde_api/configuration.rb +81 -5
  85. data/kinde_api/lib/kinde_api/models/add_apis_request.rb +238 -0
  86. data/kinde_api/lib/kinde_api/models/add_organization_users_request.rb +2 -0
  87. data/kinde_api/lib/kinde_api/models/add_organization_users_request_users_inner.rb +2 -0
  88. data/kinde_api/lib/kinde_api/models/add_organization_users_response.rb +2 -0
  89. data/kinde_api/lib/kinde_api/models/api.rb +271 -0
  90. data/kinde_api/lib/kinde_api/models/api_applications_inner.rb +246 -0
  91. data/kinde_api/lib/kinde_api/models/api_result.rb +2 -0
  92. data/kinde_api/lib/kinde_api/models/apis.rb +250 -0
  93. data/kinde_api/lib/kinde_api/models/applications.rb +237 -0
  94. data/kinde_api/lib/kinde_api/models/connected_apps_access_token.rb +2 -0
  95. data/kinde_api/lib/kinde_api/models/connected_apps_auth_url.rb +2 -0
  96. data/kinde_api/lib/kinde_api/models/create_application_request.rb +264 -0
  97. data/kinde_api/lib/kinde_api/models/create_application_response.rb +239 -0
  98. data/kinde_api/lib/kinde_api/models/create_application_response_application.rb +240 -0
  99. data/kinde_api/lib/kinde_api/models/create_feature_flag_request.rb +336 -0
  100. data/kinde_api/lib/kinde_api/models/create_organization_request.rb +16 -4
  101. data/kinde_api/lib/kinde_api/models/create_organization_response.rb +2 -0
  102. data/kinde_api/lib/kinde_api/models/create_organization_response_organization.rb +2 -0
  103. data/kinde_api/lib/kinde_api/models/{application.rb → create_organization_user_permission_request.rb} +13 -19
  104. data/kinde_api/lib/kinde_api/models/create_organization_user_role_request.rb +2 -0
  105. data/kinde_api/lib/kinde_api/models/create_permission_request.rb +2 -0
  106. data/kinde_api/lib/kinde_api/models/create_role_request.rb +2 -0
  107. data/kinde_api/lib/kinde_api/models/create_subscriber_success_response.rb +2 -0
  108. data/kinde_api/lib/kinde_api/models/create_subscriber_success_response_subscriber.rb +2 -0
  109. data/kinde_api/lib/kinde_api/models/create_user_request.rb +2 -0
  110. data/kinde_api/lib/kinde_api/models/create_user_request_identities_inner.rb +2 -0
  111. data/kinde_api/lib/kinde_api/models/create_user_request_identities_inner_details.rb +2 -0
  112. data/kinde_api/lib/kinde_api/models/create_user_request_profile.rb +2 -0
  113. data/kinde_api/lib/kinde_api/models/create_user_response.rb +2 -0
  114. data/kinde_api/lib/kinde_api/models/error.rb +2 -0
  115. data/kinde_api/lib/kinde_api/models/error_response.rb +2 -0
  116. data/kinde_api/lib/kinde_api/models/get_application_response.rb +239 -0
  117. data/kinde_api/lib/kinde_api/models/get_application_response_application.rb +260 -0
  118. data/kinde_api/lib/kinde_api/models/get_applications_response.rb +10 -8
  119. data/kinde_api/lib/kinde_api/models/get_environment_feature_flags_response.rb +2 -0
  120. data/kinde_api/lib/kinde_api/models/get_organization_feature_flags_response.rb +2 -0
  121. data/kinde_api/lib/kinde_api/models/get_organization_feature_flags_response_feature_flags_value.rb +2 -0
  122. data/kinde_api/lib/kinde_api/models/{get_organizations_users_response.rb → get_organization_users_response.rb} +5 -3
  123. data/kinde_api/lib/kinde_api/models/get_organizations_response.rb +2 -0
  124. data/kinde_api/lib/kinde_api/models/get_organizations_user_permissions_response.rb +241 -0
  125. data/kinde_api/lib/kinde_api/models/get_organizations_user_roles_response.rb +2 -0
  126. data/kinde_api/lib/kinde_api/models/get_permissions_response.rb +251 -0
  127. data/kinde_api/lib/kinde_api/models/get_redirect_callback_urls_response.rb +2 -0
  128. data/kinde_api/lib/kinde_api/models/get_roles_response.rb +251 -0
  129. data/kinde_api/lib/kinde_api/models/get_subscriber_response.rb +241 -0
  130. data/kinde_api/lib/kinde_api/models/get_subscribers_response.rb +251 -0
  131. data/kinde_api/lib/kinde_api/models/logout_redirect_urls.rb +222 -0
  132. data/kinde_api/lib/kinde_api/models/organization.rb +15 -4
  133. data/kinde_api/lib/kinde_api/models/organization_user.rb +2 -0
  134. data/kinde_api/lib/kinde_api/models/organization_user_permission.rb +257 -0
  135. data/kinde_api/lib/kinde_api/models/organization_user_permission_roles_inner.rb +228 -0
  136. data/kinde_api/lib/kinde_api/models/organization_user_role.rb +2 -0
  137. data/kinde_api/lib/kinde_api/models/organization_user_role_permissions.rb +237 -0
  138. data/kinde_api/lib/kinde_api/models/organization_user_role_permissions_permissions.rb +219 -0
  139. data/kinde_api/lib/kinde_api/models/permissions.rb +2 -0
  140. data/kinde_api/lib/kinde_api/models/redirect_callback_urls.rb +2 -0
  141. data/kinde_api/lib/kinde_api/models/replace_logout_redirect_urls_request.rb +222 -0
  142. data/kinde_api/lib/kinde_api/models/replace_redirect_callback_urls_request.rb +222 -0
  143. data/kinde_api/lib/kinde_api/models/role.rb +246 -0
  144. data/kinde_api/lib/kinde_api/models/roles.rb +13 -1
  145. data/kinde_api/lib/kinde_api/models/roles_permission_response_inner.rb +246 -0
  146. data/kinde_api/lib/kinde_api/models/subscriber.rb +246 -0
  147. data/kinde_api/lib/kinde_api/models/subscribers_subscriber.rb +255 -0
  148. data/kinde_api/lib/kinde_api/models/success_response.rb +2 -0
  149. data/kinde_api/lib/kinde_api/models/token_error_response.rb +230 -0
  150. data/kinde_api/lib/kinde_api/models/token_introspect.rb +262 -0
  151. data/kinde_api/lib/kinde_api/models/update_api_applications_request.rb +226 -0
  152. data/kinde_api/lib/kinde_api/models/update_api_applications_request_applications_inner.rb +235 -0
  153. data/kinde_api/lib/kinde_api/models/update_application_request.rb +254 -0
  154. data/kinde_api/lib/kinde_api/models/update_environement_feature_flag_override_request.rb +225 -0
  155. data/kinde_api/lib/kinde_api/models/update_organization_request.rb +16 -4
  156. data/kinde_api/lib/kinde_api/models/update_organization_users_request.rb +3 -1
  157. data/kinde_api/lib/kinde_api/models/update_organization_users_request_users_inner.rb +2 -0
  158. data/kinde_api/lib/kinde_api/models/update_organization_users_response.rb +2 -0
  159. data/kinde_api/lib/kinde_api/models/update_role_permissions_request.rb +222 -0
  160. data/kinde_api/lib/kinde_api/models/update_role_permissions_request_permissions_inner.rb +230 -0
  161. data/kinde_api/lib/kinde_api/models/update_role_permissions_response.rb +250 -0
  162. data/kinde_api/lib/kinde_api/models/update_roles_request.rb +260 -0
  163. data/kinde_api/lib/kinde_api/models/update_user_request.rb +2 -0
  164. data/kinde_api/lib/kinde_api/models/update_user_response.rb +280 -0
  165. data/kinde_api/lib/kinde_api/models/user.rb +37 -32
  166. data/kinde_api/lib/kinde_api/models/user_identities_inner.rb +228 -0
  167. data/kinde_api/lib/kinde_api/models/user_identity.rb +2 -0
  168. data/kinde_api/lib/kinde_api/models/user_identity_result.rb +2 -0
  169. data/kinde_api/lib/kinde_api/models/user_profile.rb +2 -0
  170. data/kinde_api/lib/kinde_api/models/user_profile_v2.rb +2 -0
  171. data/kinde_api/lib/kinde_api/models/users_response.rb +3 -1
  172. data/kinde_api/lib/kinde_api/models/users_response_users_inner.rb +348 -0
  173. data/kinde_api/lib/kinde_api.rb +47 -2
  174. data/kinde_api/spec/api/apis_api_spec.rb +95 -0
  175. data/kinde_api/spec/api/applications_api_spec.rb +98 -0
  176. data/kinde_api/spec/api/business_api_spec.rb +75 -0
  177. data/kinde_api/spec/api/callbacks_api_spec.rb +69 -5
  178. data/kinde_api/spec/api/environments_api_spec.rb +5 -5
  179. data/kinde_api/spec/api/feature_flags_api_spec.rb +4 -9
  180. data/kinde_api/spec/api/industries_api_spec.rb +48 -0
  181. data/kinde_api/spec/api/o_auth_api_spec.rb +28 -1
  182. data/kinde_api/spec/api/organizations_api_spec.rb +63 -8
  183. data/kinde_api/spec/api/permissions_api_spec.rb +16 -4
  184. data/kinde_api/spec/api/roles_api_spec.rb +57 -4
  185. data/kinde_api/spec/api/subscribers_api_spec.rb +3 -4
  186. data/kinde_api/spec/api/timezones_api_spec.rb +48 -0
  187. data/kinde_api/spec/api/users_api_spec.rb +17 -2
  188. data/kinde_api/spec/api_client_spec.rb +13 -2
  189. data/kinde_api/spec/models/{application_spec.rb → add_apis_request_spec.rb} +8 -8
  190. data/kinde_api/spec/models/api_applications_inner_spec.rb +52 -0
  191. data/kinde_api/spec/models/api_spec.rb +64 -0
  192. data/kinde_api/spec/models/apis_spec.rb +52 -0
  193. data/kinde_api/spec/models/applications_spec.rb +46 -0
  194. data/kinde_api/spec/models/create_application_request_spec.rb +44 -0
  195. data/kinde_api/spec/models/create_application_response_application_spec.rb +46 -0
  196. data/kinde_api/spec/models/create_application_response_spec.rb +46 -0
  197. data/kinde_api/spec/models/create_feature_flag_request_spec.rb +72 -0
  198. data/kinde_api/spec/models/create_organization_request_spec.rb +6 -0
  199. data/kinde_api/spec/models/create_organization_user_permission_request_spec.rb +34 -0
  200. data/kinde_api/spec/models/get_application_response_application_spec.rb +58 -0
  201. data/kinde_api/spec/models/get_application_response_spec.rb +46 -0
  202. data/kinde_api/spec/models/get_applications_response_spec.rb +1 -1
  203. data/kinde_api/spec/models/{get_organizations_users_response_spec.rb → get_organization_users_response_spec.rb} +6 -6
  204. data/kinde_api/spec/models/get_organizations_user_permissions_response_spec.rb +46 -0
  205. data/kinde_api/spec/models/get_permissions_response_spec.rb +52 -0
  206. data/kinde_api/spec/models/get_roles_response_spec.rb +52 -0
  207. data/kinde_api/spec/models/get_subscriber_response_spec.rb +46 -0
  208. data/kinde_api/spec/models/get_subscribers_response_spec.rb +52 -0
  209. data/kinde_api/spec/models/logout_redirect_urls_spec.rb +34 -0
  210. data/kinde_api/spec/models/organization_spec.rb +6 -0
  211. data/kinde_api/spec/models/organization_user_permission_roles_inner_spec.rb +40 -0
  212. data/kinde_api/spec/models/organization_user_permission_spec.rb +58 -0
  213. data/kinde_api/spec/models/organization_user_role_permissions_permissions_spec.rb +34 -0
  214. data/kinde_api/spec/models/organization_user_role_permissions_spec.rb +46 -0
  215. data/kinde_api/spec/models/replace_logout_redirect_urls_request_spec.rb +34 -0
  216. data/kinde_api/spec/models/replace_redirect_callback_urls_request_spec.rb +34 -0
  217. data/kinde_api/spec/models/role_spec.rb +52 -0
  218. data/kinde_api/spec/models/roles_permission_response_inner_spec.rb +52 -0
  219. data/kinde_api/spec/models/roles_spec.rb +6 -0
  220. data/kinde_api/spec/models/subscriber_spec.rb +52 -0
  221. data/kinde_api/spec/models/subscribers_subscriber_spec.rb +58 -0
  222. data/kinde_api/spec/models/token_error_response_spec.rb +40 -0
  223. data/kinde_api/spec/models/token_introspect_spec.rb +58 -0
  224. data/kinde_api/spec/models/update_api_applications_request_applications_inner_spec.rb +40 -0
  225. data/kinde_api/spec/models/update_api_applications_request_spec.rb +34 -0
  226. data/kinde_api/spec/models/update_application_request_spec.rb +52 -0
  227. data/kinde_api/spec/models/update_environement_feature_flag_override_request_spec.rb +34 -0
  228. data/kinde_api/spec/models/update_organization_request_spec.rb +6 -0
  229. data/kinde_api/spec/models/update_role_permissions_request_permissions_inner_spec.rb +40 -0
  230. data/kinde_api/spec/models/update_role_permissions_request_spec.rb +34 -0
  231. data/kinde_api/spec/models/update_role_permissions_response_spec.rb +52 -0
  232. data/kinde_api/spec/models/update_roles_request_spec.rb +52 -0
  233. data/kinde_api/spec/models/update_user_response_spec.rb +70 -0
  234. data/kinde_api/spec/models/user_identities_inner_spec.rb +40 -0
  235. data/kinde_api/spec/models/user_spec.rb +9 -9
  236. data/kinde_api/spec/models/users_response_users_inner_spec.rb +106 -0
  237. data/kinde_sdk.gemspec +1 -1
  238. data/lib/kinde_sdk/version.rb +1 -1
  239. data/spec/kinde_sdk_spec.rb +0 -46
  240. metadata +193 -12
  241. data/kinde_api/docs/Application.md +0 -20
@@ -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 UpdateRolePermissionsResponse
18
+ attr_accessor :code
19
+
20
+ attr_accessor :message
21
+
22
+ attr_accessor :permissions_added
23
+
24
+ attr_accessor :permissions_removed
25
+
26
+ # Attribute mapping from ruby-style variable name to JSON key.
27
+ def self.attribute_map
28
+ {
29
+ :'code' => :'code',
30
+ :'message' => :'message',
31
+ :'permissions_added' => :'permissions_added',
32
+ :'permissions_removed' => :'permissions_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
+ :'code' => :'String',
45
+ :'message' => :'String',
46
+ :'permissions_added' => :'Array<String>',
47
+ :'permissions_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::UpdateRolePermissionsResponse` 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::UpdateRolePermissionsResponse`. 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?(:'code')
73
+ self.code = attributes[:'code']
74
+ end
75
+
76
+ if attributes.key?(:'message')
77
+ self.message = attributes[:'message']
78
+ end
79
+
80
+ if attributes.key?(:'permissions_added')
81
+ if (value = attributes[:'permissions_added']).is_a?(Array)
82
+ self.permissions_added = value
83
+ end
84
+ end
85
+
86
+ if attributes.key?(:'permissions_removed')
87
+ if (value = attributes[:'permissions_removed']).is_a?(Array)
88
+ self.permissions_removed = value
89
+ end
90
+ end
91
+ end
92
+
93
+ # Show invalid properties with the reasons. Usually used together with valid?
94
+ # @return Array for valid properties with the reasons
95
+ def list_invalid_properties
96
+ invalid_properties = Array.new
97
+ invalid_properties
98
+ end
99
+
100
+ # Check to see if the all the properties in the model are valid
101
+ # @return true if the model is valid
102
+ def valid?
103
+ true
104
+ end
105
+
106
+ # Checks equality by comparing each attribute.
107
+ # @param [Object] Object to be compared
108
+ def ==(o)
109
+ return true if self.equal?(o)
110
+ self.class == o.class &&
111
+ code == o.code &&
112
+ message == o.message &&
113
+ permissions_added == o.permissions_added &&
114
+ permissions_removed == o.permissions_removed
115
+ end
116
+
117
+ # @see the `==` method
118
+ # @param [Object] Object to be compared
119
+ def eql?(o)
120
+ self == o
121
+ end
122
+
123
+ # Calculates hash code according to all attributes.
124
+ # @return [Integer] Hash code
125
+ def hash
126
+ [code, message, permissions_added, permissions_removed].hash
127
+ end
128
+
129
+ # Builds the object from hash
130
+ # @param [Hash] attributes Model attributes in the form of hash
131
+ # @return [Object] Returns the model itself
132
+ def self.build_from_hash(attributes)
133
+ new.build_from_hash(attributes)
134
+ end
135
+
136
+ # Builds the object from hash
137
+ # @param [Hash] attributes Model attributes in the form of hash
138
+ # @return [Object] Returns the model itself
139
+ def build_from_hash(attributes)
140
+ return nil unless attributes.is_a?(Hash)
141
+ attributes = attributes.transform_keys(&:to_sym)
142
+ self.class.openapi_types.each_pair do |key, type|
143
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
144
+ self.send("#{key}=", nil)
145
+ elsif type =~ /\AArray<(.*)>/i
146
+ # check to ensure the input is an array given that the attribute
147
+ # is documented as an array but the input is not
148
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
149
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
150
+ end
151
+ elsif !attributes[self.class.attribute_map[key]].nil?
152
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
153
+ end
154
+ end
155
+
156
+ self
157
+ end
158
+
159
+ # Deserializes the data based on type
160
+ # @param string type Data type
161
+ # @param string value Value to be deserialized
162
+ # @return [Object] Deserialized data
163
+ def _deserialize(type, value)
164
+ case type.to_sym
165
+ when :Time
166
+ Time.parse(value)
167
+ when :Date
168
+ Date.parse(value)
169
+ when :String
170
+ value.to_s
171
+ when :Integer
172
+ value.to_i
173
+ when :Float
174
+ value.to_f
175
+ when :Boolean
176
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
177
+ true
178
+ else
179
+ false
180
+ end
181
+ when :Object
182
+ # generic object (usually a Hash), return directly
183
+ value
184
+ when /\AArray<(?<inner_type>.+)>\z/
185
+ inner_type = Regexp.last_match[:inner_type]
186
+ value.map { |v| _deserialize(inner_type, v) }
187
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
188
+ k_type = Regexp.last_match[:k_type]
189
+ v_type = Regexp.last_match[:v_type]
190
+ {}.tap do |hash|
191
+ value.each do |k, v|
192
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
193
+ end
194
+ end
195
+ else # model
196
+ # models (e.g. Pet) or oneOf
197
+ klass = KindeApi.const_get(type)
198
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
199
+ end
200
+ end
201
+
202
+ # Returns the string representation of the object
203
+ # @return [String] String presentation of the object
204
+ def to_s
205
+ to_hash.to_s
206
+ end
207
+
208
+ # to_body is an alias to to_hash (backward compatibility)
209
+ # @return [Hash] Returns the object in the form of hash
210
+ def to_body
211
+ to_hash
212
+ end
213
+
214
+ # Returns the object in the form of hash
215
+ # @return [Hash] Returns the object in the form of hash
216
+ def to_hash
217
+ hash = {}
218
+ self.class.attribute_map.each_pair do |attr, param|
219
+ value = self.send(attr)
220
+ if value.nil?
221
+ is_nullable = self.class.openapi_nullable.include?(attr)
222
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
223
+ end
224
+
225
+ hash[param] = _to_hash(value)
226
+ end
227
+ hash
228
+ end
229
+
230
+ # Outputs non-array value in the form of hash
231
+ # For object, use to_hash. Otherwise, just return the value
232
+ # @param [Object] value Any valid value
233
+ # @return [Hash] Returns the value in the form of hash
234
+ def _to_hash(value)
235
+ if value.is_a?(Array)
236
+ value.compact.map { |v| _to_hash(v) }
237
+ elsif value.is_a?(Hash)
238
+ {}.tap do |hash|
239
+ value.each { |k, v| hash[k] = _to_hash(v) }
240
+ end
241
+ elsif value.respond_to? :to_hash
242
+ value.to_hash
243
+ else
244
+ value
245
+ end
246
+ end
247
+
248
+ end
249
+
250
+ end
@@ -0,0 +1,260 @@
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 UpdateRolesRequest
18
+ # The role's name.
19
+ attr_accessor :name
20
+
21
+ # The role's description.
22
+ attr_accessor :description
23
+
24
+ # The role identifier to use in code.
25
+ attr_accessor :key
26
+
27
+ # Set role as default for new users.
28
+ attr_accessor :is_default_role
29
+
30
+ # Attribute mapping from ruby-style variable name to JSON key.
31
+ def self.attribute_map
32
+ {
33
+ :'name' => :'name',
34
+ :'description' => :'description',
35
+ :'key' => :'key',
36
+ :'is_default_role' => :'is_default_role'
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
+ :'name' => :'String',
49
+ :'description' => :'String',
50
+ :'key' => :'String',
51
+ :'is_default_role' => :'Boolean'
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::UpdateRolesRequest` 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::UpdateRolesRequest`. 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?(:'name')
77
+ self.name = attributes[:'name']
78
+ end
79
+
80
+ if attributes.key?(:'description')
81
+ self.description = attributes[:'description']
82
+ end
83
+
84
+ if attributes.key?(:'key')
85
+ self.key = attributes[:'key']
86
+ end
87
+
88
+ if attributes.key?(:'is_default_role')
89
+ self.is_default_role = attributes[:'is_default_role']
90
+ end
91
+ end
92
+
93
+ # Show invalid properties with the reasons. Usually used together with valid?
94
+ # @return Array for valid properties with the reasons
95
+ def list_invalid_properties
96
+ invalid_properties = Array.new
97
+ if @name.nil?
98
+ invalid_properties.push('invalid value for "name", name cannot be nil.')
99
+ end
100
+
101
+ if @key.nil?
102
+ invalid_properties.push('invalid value for "key", key cannot be nil.')
103
+ end
104
+
105
+ invalid_properties
106
+ end
107
+
108
+ # Check to see if the all the properties in the model are valid
109
+ # @return true if the model is valid
110
+ def valid?
111
+ return false if @name.nil?
112
+ return false if @key.nil?
113
+ true
114
+ end
115
+
116
+ # Checks equality by comparing each attribute.
117
+ # @param [Object] Object to be compared
118
+ def ==(o)
119
+ return true if self.equal?(o)
120
+ self.class == o.class &&
121
+ name == o.name &&
122
+ description == o.description &&
123
+ key == o.key &&
124
+ is_default_role == o.is_default_role
125
+ end
126
+
127
+ # @see the `==` method
128
+ # @param [Object] Object to be compared
129
+ def eql?(o)
130
+ self == o
131
+ end
132
+
133
+ # Calculates hash code according to all attributes.
134
+ # @return [Integer] Hash code
135
+ def hash
136
+ [name, description, key, is_default_role].hash
137
+ end
138
+
139
+ # Builds the object from hash
140
+ # @param [Hash] attributes Model attributes in the form of hash
141
+ # @return [Object] Returns the model itself
142
+ def self.build_from_hash(attributes)
143
+ new.build_from_hash(attributes)
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 build_from_hash(attributes)
150
+ return nil unless attributes.is_a?(Hash)
151
+ attributes = attributes.transform_keys(&:to_sym)
152
+ self.class.openapi_types.each_pair do |key, type|
153
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
154
+ self.send("#{key}=", nil)
155
+ elsif type =~ /\AArray<(.*)>/i
156
+ # check to ensure the input is an array given that the attribute
157
+ # is documented as an array but the input is not
158
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
159
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
160
+ end
161
+ elsif !attributes[self.class.attribute_map[key]].nil?
162
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
163
+ end
164
+ end
165
+
166
+ self
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 _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 = KindeApi.const_get(type)
208
+ 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
@@ -244,5 +244,7 @@ module KindeApi
244
244
  value
245
245
  end
246
246
  end
247
+
247
248
  end
249
+
248
250
  end