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,237 @@
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 OrganizationUserRolePermissions
18
+ attr_accessor :id
19
+
20
+ attr_accessor :role
21
+
22
+ attr_accessor :permissions
23
+
24
+ # Attribute mapping from ruby-style variable name to JSON key.
25
+ def self.attribute_map
26
+ {
27
+ :'id' => :'id',
28
+ :'role' => :'role',
29
+ :'permissions' => :'permissions'
30
+ }
31
+ end
32
+
33
+ # Returns all the JSON keys this model knows about
34
+ def self.acceptable_attributes
35
+ attribute_map.values
36
+ end
37
+
38
+ # Attribute type mapping.
39
+ def self.openapi_types
40
+ {
41
+ :'id' => :'String',
42
+ :'role' => :'String',
43
+ :'permissions' => :'OrganizationUserRolePermissionsPermissions'
44
+ }
45
+ end
46
+
47
+ # List of attributes with nullable: true
48
+ def self.openapi_nullable
49
+ Set.new([
50
+ ])
51
+ end
52
+
53
+ # Initializes the object
54
+ # @param [Hash] attributes Model attributes in the form of hash
55
+ def initialize(attributes = {})
56
+ if (!attributes.is_a?(Hash))
57
+ fail ArgumentError, "The input argument (attributes) must be a hash in `KindeApi::OrganizationUserRolePermissions` initialize method"
58
+ end
59
+
60
+ # check to see if the attribute exists and convert string to symbol for hash key
61
+ attributes = attributes.each_with_object({}) { |(k, v), h|
62
+ if (!self.class.attribute_map.key?(k.to_sym))
63
+ fail ArgumentError, "`#{k}` is not a valid attribute in `KindeApi::OrganizationUserRolePermissions`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
64
+ end
65
+ h[k.to_sym] = v
66
+ }
67
+
68
+ if attributes.key?(:'id')
69
+ self.id = attributes[:'id']
70
+ end
71
+
72
+ if attributes.key?(:'role')
73
+ self.role = attributes[:'role']
74
+ end
75
+
76
+ if attributes.key?(:'permissions')
77
+ self.permissions = attributes[:'permissions']
78
+ end
79
+ end
80
+
81
+ # Show invalid properties with the reasons. Usually used together with valid?
82
+ # @return Array for valid properties with the reasons
83
+ def list_invalid_properties
84
+ invalid_properties = Array.new
85
+ invalid_properties
86
+ end
87
+
88
+ # Check to see if the all the properties in the model are valid
89
+ # @return true if the model is valid
90
+ def valid?
91
+ true
92
+ end
93
+
94
+ # Checks equality by comparing each attribute.
95
+ # @param [Object] Object to be compared
96
+ def ==(o)
97
+ return true if self.equal?(o)
98
+ self.class == o.class &&
99
+ id == o.id &&
100
+ role == o.role &&
101
+ permissions == o.permissions
102
+ end
103
+
104
+ # @see the `==` method
105
+ # @param [Object] Object to be compared
106
+ def eql?(o)
107
+ self == o
108
+ end
109
+
110
+ # Calculates hash code according to all attributes.
111
+ # @return [Integer] Hash code
112
+ def hash
113
+ [id, role, permissions].hash
114
+ end
115
+
116
+ # Builds the object from hash
117
+ # @param [Hash] attributes Model attributes in the form of hash
118
+ # @return [Object] Returns the model itself
119
+ def self.build_from_hash(attributes)
120
+ new.build_from_hash(attributes)
121
+ end
122
+
123
+ # Builds the object from hash
124
+ # @param [Hash] attributes Model attributes in the form of hash
125
+ # @return [Object] Returns the model itself
126
+ def build_from_hash(attributes)
127
+ return nil unless attributes.is_a?(Hash)
128
+ attributes = attributes.transform_keys(&:to_sym)
129
+ self.class.openapi_types.each_pair do |key, type|
130
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
131
+ self.send("#{key}=", nil)
132
+ elsif type =~ /\AArray<(.*)>/i
133
+ # check to ensure the input is an array given that the attribute
134
+ # is documented as an array but the input is not
135
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
136
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
137
+ end
138
+ elsif !attributes[self.class.attribute_map[key]].nil?
139
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
140
+ end
141
+ end
142
+
143
+ self
144
+ end
145
+
146
+ # Deserializes the data based on type
147
+ # @param string type Data type
148
+ # @param string value Value to be deserialized
149
+ # @return [Object] Deserialized data
150
+ def _deserialize(type, value)
151
+ case type.to_sym
152
+ when :Time
153
+ Time.parse(value)
154
+ when :Date
155
+ Date.parse(value)
156
+ when :String
157
+ value.to_s
158
+ when :Integer
159
+ value.to_i
160
+ when :Float
161
+ value.to_f
162
+ when :Boolean
163
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
164
+ true
165
+ else
166
+ false
167
+ end
168
+ when :Object
169
+ # generic object (usually a Hash), return directly
170
+ value
171
+ when /\AArray<(?<inner_type>.+)>\z/
172
+ inner_type = Regexp.last_match[:inner_type]
173
+ value.map { |v| _deserialize(inner_type, v) }
174
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
175
+ k_type = Regexp.last_match[:k_type]
176
+ v_type = Regexp.last_match[:v_type]
177
+ {}.tap do |hash|
178
+ value.each do |k, v|
179
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
180
+ end
181
+ end
182
+ else # model
183
+ # models (e.g. Pet) or oneOf
184
+ klass = KindeApi.const_get(type)
185
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
186
+ end
187
+ end
188
+
189
+ # Returns the string representation of the object
190
+ # @return [String] String presentation of the object
191
+ def to_s
192
+ to_hash.to_s
193
+ end
194
+
195
+ # to_body is an alias to to_hash (backward compatibility)
196
+ # @return [Hash] Returns the object in the form of hash
197
+ def to_body
198
+ to_hash
199
+ end
200
+
201
+ # Returns the object in the form of hash
202
+ # @return [Hash] Returns the object in the form of hash
203
+ def to_hash
204
+ hash = {}
205
+ self.class.attribute_map.each_pair do |attr, param|
206
+ value = self.send(attr)
207
+ if value.nil?
208
+ is_nullable = self.class.openapi_nullable.include?(attr)
209
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
210
+ end
211
+
212
+ hash[param] = _to_hash(value)
213
+ end
214
+ hash
215
+ end
216
+
217
+ # Outputs non-array value in the form of hash
218
+ # For object, use to_hash. Otherwise, just return the value
219
+ # @param [Object] value Any valid value
220
+ # @return [Hash] Returns the value in the form of hash
221
+ def _to_hash(value)
222
+ if value.is_a?(Array)
223
+ value.compact.map { |v| _to_hash(v) }
224
+ elsif value.is_a?(Hash)
225
+ {}.tap do |hash|
226
+ value.each { |k, v| hash[k] = _to_hash(v) }
227
+ end
228
+ elsif value.respond_to? :to_hash
229
+ value.to_hash
230
+ else
231
+ value
232
+ end
233
+ end
234
+
235
+ end
236
+
237
+ end
@@ -0,0 +1,219 @@
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 OrganizationUserRolePermissionsPermissions
18
+ attr_accessor :key
19
+
20
+ # Attribute mapping from ruby-style variable name to JSON key.
21
+ def self.attribute_map
22
+ {
23
+ :'key' => :'key'
24
+ }
25
+ end
26
+
27
+ # Returns all the JSON keys this model knows about
28
+ def self.acceptable_attributes
29
+ attribute_map.values
30
+ end
31
+
32
+ # Attribute type mapping.
33
+ def self.openapi_types
34
+ {
35
+ :'key' => :'String'
36
+ }
37
+ end
38
+
39
+ # List of attributes with nullable: true
40
+ def self.openapi_nullable
41
+ Set.new([
42
+ ])
43
+ end
44
+
45
+ # Initializes the object
46
+ # @param [Hash] attributes Model attributes in the form of hash
47
+ def initialize(attributes = {})
48
+ if (!attributes.is_a?(Hash))
49
+ fail ArgumentError, "The input argument (attributes) must be a hash in `KindeApi::OrganizationUserRolePermissionsPermissions` initialize method"
50
+ end
51
+
52
+ # check to see if the attribute exists and convert string to symbol for hash key
53
+ attributes = attributes.each_with_object({}) { |(k, v), h|
54
+ if (!self.class.attribute_map.key?(k.to_sym))
55
+ fail ArgumentError, "`#{k}` is not a valid attribute in `KindeApi::OrganizationUserRolePermissionsPermissions`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
56
+ end
57
+ h[k.to_sym] = v
58
+ }
59
+
60
+ if attributes.key?(:'key')
61
+ self.key = attributes[:'key']
62
+ end
63
+ end
64
+
65
+ # Show invalid properties with the reasons. Usually used together with valid?
66
+ # @return Array for valid properties with the reasons
67
+ def list_invalid_properties
68
+ invalid_properties = Array.new
69
+ invalid_properties
70
+ end
71
+
72
+ # Check to see if the all the properties in the model are valid
73
+ # @return true if the model is valid
74
+ def valid?
75
+ true
76
+ end
77
+
78
+ # Checks equality by comparing each attribute.
79
+ # @param [Object] Object to be compared
80
+ def ==(o)
81
+ return true if self.equal?(o)
82
+ self.class == o.class &&
83
+ key == o.key
84
+ end
85
+
86
+ # @see the `==` method
87
+ # @param [Object] Object to be compared
88
+ def eql?(o)
89
+ self == o
90
+ end
91
+
92
+ # Calculates hash code according to all attributes.
93
+ # @return [Integer] Hash code
94
+ def hash
95
+ [key].hash
96
+ end
97
+
98
+ # Builds the object from hash
99
+ # @param [Hash] attributes Model attributes in the form of hash
100
+ # @return [Object] Returns the model itself
101
+ def self.build_from_hash(attributes)
102
+ new.build_from_hash(attributes)
103
+ end
104
+
105
+ # Builds the object from hash
106
+ # @param [Hash] attributes Model attributes in the form of hash
107
+ # @return [Object] Returns the model itself
108
+ def build_from_hash(attributes)
109
+ return nil unless attributes.is_a?(Hash)
110
+ attributes = attributes.transform_keys(&:to_sym)
111
+ self.class.openapi_types.each_pair do |key, type|
112
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
113
+ self.send("#{key}=", nil)
114
+ elsif type =~ /\AArray<(.*)>/i
115
+ # check to ensure the input is an array given that the attribute
116
+ # is documented as an array but the input is not
117
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
118
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
119
+ end
120
+ elsif !attributes[self.class.attribute_map[key]].nil?
121
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
122
+ end
123
+ end
124
+
125
+ self
126
+ end
127
+
128
+ # Deserializes the data based on type
129
+ # @param string type Data type
130
+ # @param string value Value to be deserialized
131
+ # @return [Object] Deserialized data
132
+ def _deserialize(type, value)
133
+ case type.to_sym
134
+ when :Time
135
+ Time.parse(value)
136
+ when :Date
137
+ Date.parse(value)
138
+ when :String
139
+ value.to_s
140
+ when :Integer
141
+ value.to_i
142
+ when :Float
143
+ value.to_f
144
+ when :Boolean
145
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
146
+ true
147
+ else
148
+ false
149
+ end
150
+ when :Object
151
+ # generic object (usually a Hash), return directly
152
+ value
153
+ when /\AArray<(?<inner_type>.+)>\z/
154
+ inner_type = Regexp.last_match[:inner_type]
155
+ value.map { |v| _deserialize(inner_type, v) }
156
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
157
+ k_type = Regexp.last_match[:k_type]
158
+ v_type = Regexp.last_match[:v_type]
159
+ {}.tap do |hash|
160
+ value.each do |k, v|
161
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
162
+ end
163
+ end
164
+ else # model
165
+ # models (e.g. Pet) or oneOf
166
+ klass = KindeApi.const_get(type)
167
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
168
+ end
169
+ end
170
+
171
+ # Returns the string representation of the object
172
+ # @return [String] String presentation of the object
173
+ def to_s
174
+ to_hash.to_s
175
+ end
176
+
177
+ # to_body is an alias to to_hash (backward compatibility)
178
+ # @return [Hash] Returns the object in the form of hash
179
+ def to_body
180
+ to_hash
181
+ end
182
+
183
+ # Returns the object in the form of hash
184
+ # @return [Hash] Returns the object in the form of hash
185
+ def to_hash
186
+ hash = {}
187
+ self.class.attribute_map.each_pair do |attr, param|
188
+ value = self.send(attr)
189
+ if value.nil?
190
+ is_nullable = self.class.openapi_nullable.include?(attr)
191
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
192
+ end
193
+
194
+ hash[param] = _to_hash(value)
195
+ end
196
+ hash
197
+ end
198
+
199
+ # Outputs non-array value in the form of hash
200
+ # For object, use to_hash. Otherwise, just return the value
201
+ # @param [Object] value Any valid value
202
+ # @return [Hash] Returns the value in the form of hash
203
+ def _to_hash(value)
204
+ if value.is_a?(Array)
205
+ value.compact.map { |v| _to_hash(v) }
206
+ elsif value.is_a?(Hash)
207
+ {}.tap do |hash|
208
+ value.each { |k, v| hash[k] = _to_hash(v) }
209
+ end
210
+ elsif value.respond_to? :to_hash
211
+ value.to_hash
212
+ else
213
+ value
214
+ end
215
+ end
216
+
217
+ end
218
+
219
+ end
@@ -234,5 +234,7 @@ module KindeApi
234
234
  value
235
235
  end
236
236
  end
237
+
237
238
  end
239
+
238
240
  end
@@ -216,5 +216,7 @@ module KindeApi
216
216
  value
217
217
  end
218
218
  end
219
+
219
220
  end
221
+
220
222
  end
@@ -0,0 +1,222 @@
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 ReplaceLogoutRedirectURLsRequest
18
+ # Array of logout urls.
19
+ attr_accessor :urls
20
+
21
+ # Attribute mapping from ruby-style variable name to JSON key.
22
+ def self.attribute_map
23
+ {
24
+ :'urls' => :'urls'
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
+ :'urls' => :'Array<String>'
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 `KindeApi::ReplaceLogoutRedirectURLsRequest` 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 `KindeApi::ReplaceLogoutRedirectURLsRequest`. 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?(:'urls')
62
+ if (value = attributes[:'urls']).is_a?(Array)
63
+ self.urls = value
64
+ end
65
+ end
66
+ end
67
+
68
+ # Show invalid properties with the reasons. Usually used together with valid?
69
+ # @return Array for valid properties with the reasons
70
+ def list_invalid_properties
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
+ true
79
+ end
80
+
81
+ # Checks equality by comparing each attribute.
82
+ # @param [Object] Object to be compared
83
+ def ==(o)
84
+ return true if self.equal?(o)
85
+ self.class == o.class &&
86
+ urls == o.urls
87
+ end
88
+
89
+ # @see the `==` method
90
+ # @param [Object] Object to be compared
91
+ def eql?(o)
92
+ self == o
93
+ end
94
+
95
+ # Calculates hash code according to all attributes.
96
+ # @return [Integer] Hash code
97
+ def hash
98
+ [urls].hash
99
+ end
100
+
101
+ # Builds the object from hash
102
+ # @param [Hash] attributes Model attributes in the form of hash
103
+ # @return [Object] Returns the model itself
104
+ def self.build_from_hash(attributes)
105
+ new.build_from_hash(attributes)
106
+ end
107
+
108
+ # Builds the object from hash
109
+ # @param [Hash] attributes Model attributes in the form of hash
110
+ # @return [Object] Returns the model itself
111
+ def build_from_hash(attributes)
112
+ return nil unless attributes.is_a?(Hash)
113
+ attributes = attributes.transform_keys(&:to_sym)
114
+ self.class.openapi_types.each_pair do |key, type|
115
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
116
+ self.send("#{key}=", nil)
117
+ elsif type =~ /\AArray<(.*)>/i
118
+ # check to ensure the input is an array given that the attribute
119
+ # is documented as an array but the input is not
120
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
121
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
122
+ end
123
+ elsif !attributes[self.class.attribute_map[key]].nil?
124
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
125
+ end
126
+ end
127
+
128
+ self
129
+ end
130
+
131
+ # Deserializes the data based on type
132
+ # @param string type Data type
133
+ # @param string value Value to be deserialized
134
+ # @return [Object] Deserialized data
135
+ def _deserialize(type, value)
136
+ case type.to_sym
137
+ when :Time
138
+ Time.parse(value)
139
+ when :Date
140
+ Date.parse(value)
141
+ when :String
142
+ value.to_s
143
+ when :Integer
144
+ value.to_i
145
+ when :Float
146
+ value.to_f
147
+ when :Boolean
148
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
149
+ true
150
+ else
151
+ false
152
+ end
153
+ when :Object
154
+ # generic object (usually a Hash), return directly
155
+ value
156
+ when /\AArray<(?<inner_type>.+)>\z/
157
+ inner_type = Regexp.last_match[:inner_type]
158
+ value.map { |v| _deserialize(inner_type, v) }
159
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
160
+ k_type = Regexp.last_match[:k_type]
161
+ v_type = Regexp.last_match[:v_type]
162
+ {}.tap do |hash|
163
+ value.each do |k, v|
164
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
165
+ end
166
+ end
167
+ else # model
168
+ # models (e.g. Pet) or oneOf
169
+ klass = KindeApi.const_get(type)
170
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
171
+ end
172
+ end
173
+
174
+ # Returns the string representation of the object
175
+ # @return [String] String presentation of the object
176
+ def to_s
177
+ to_hash.to_s
178
+ end
179
+
180
+ # to_body is an alias to to_hash (backward compatibility)
181
+ # @return [Hash] Returns the object in the form of hash
182
+ def to_body
183
+ to_hash
184
+ end
185
+
186
+ # Returns the object in the form of hash
187
+ # @return [Hash] Returns the object in the form of hash
188
+ def to_hash
189
+ hash = {}
190
+ self.class.attribute_map.each_pair do |attr, param|
191
+ value = self.send(attr)
192
+ if value.nil?
193
+ is_nullable = self.class.openapi_nullable.include?(attr)
194
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
195
+ end
196
+
197
+ hash[param] = _to_hash(value)
198
+ end
199
+ hash
200
+ end
201
+
202
+ # Outputs non-array value in the form of hash
203
+ # For object, use to_hash. Otherwise, just return the value
204
+ # @param [Object] value Any valid value
205
+ # @return [Hash] Returns the value in the form of hash
206
+ def _to_hash(value)
207
+ if value.is_a?(Array)
208
+ value.compact.map { |v| _to_hash(v) }
209
+ elsif value.is_a?(Hash)
210
+ {}.tap do |hash|
211
+ value.each { |k, v| hash[k] = _to_hash(v) }
212
+ end
213
+ elsif value.respond_to? :to_hash
214
+ value.to_hash
215
+ else
216
+ value
217
+ end
218
+ end
219
+
220
+ end
221
+
222
+ end