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,22 @@
1
+ # KindeApi::Permissions
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **id** | **String** | The permission identifier to use in code. | [optional] |
8
+ | **name** | **String** | The permission's name. | [optional] |
9
+ | **description** | **String** | The permission's description. | [optional] |
10
+
11
+ ## Example
12
+
13
+ ```ruby
14
+ require 'kinde_api'
15
+
16
+ instance = KindeApi::Permissions.new(
17
+ id: null,
18
+ name: null,
19
+ description: null
20
+ )
21
+ ```
22
+
@@ -0,0 +1,229 @@
1
+ # KindeApi::PermissionsApi
2
+
3
+ All URIs are relative to *https://app.kinde.com*
4
+
5
+ | Method | HTTP request | Description |
6
+ | ------ | ------------ | ----------- |
7
+ | [**create_permission**](PermissionsApi.md#create_permission) | **POST** /api/v1/permissions | Create a new permission |
8
+ | [**get_permissions**](PermissionsApi.md#get_permissions) | **GET** /api/v1/permissions | List Permissions |
9
+ | [**update_permissions**](PermissionsApi.md#update_permissions) | **PATCH** /api/v1/permissions/{permission_id} | Update a permission |
10
+
11
+
12
+ ## create_permission
13
+
14
+ > <SuccessResponse> create_permission(opts)
15
+
16
+ Create a new permission
17
+
18
+ Create permission.
19
+
20
+ ### Examples
21
+
22
+ ```ruby
23
+ require 'time'
24
+ require 'kinde_api'
25
+ # setup authorization
26
+ KindeApi.configure do |config|
27
+ # Configure Bearer authorization (JWT): kindeBearerAuth
28
+ config.access_token = 'YOUR_BEARER_TOKEN'
29
+ end
30
+
31
+ api_instance = KindeApi::PermissionsApi.new
32
+ opts = {
33
+ create_permission_request: KindeApi::CreatePermissionRequest.new # CreatePermissionRequest | Permission details.
34
+ }
35
+
36
+ begin
37
+ # Create a new permission
38
+ result = api_instance.create_permission(opts)
39
+ p result
40
+ rescue KindeApi::ApiError => e
41
+ puts "Error when calling PermissionsApi->create_permission: #{e}"
42
+ end
43
+ ```
44
+
45
+ #### Using the create_permission_with_http_info variant
46
+
47
+ This returns an Array which contains the response data, status code and headers.
48
+
49
+ > <Array(<SuccessResponse>, Integer, Hash)> create_permission_with_http_info(opts)
50
+
51
+ ```ruby
52
+ begin
53
+ # Create a new permission
54
+ data, status_code, headers = api_instance.create_permission_with_http_info(opts)
55
+ p status_code # => 2xx
56
+ p headers # => { ... }
57
+ p data # => <SuccessResponse>
58
+ rescue KindeApi::ApiError => e
59
+ puts "Error when calling PermissionsApi->create_permission_with_http_info: #{e}"
60
+ end
61
+ ```
62
+
63
+ ### Parameters
64
+
65
+ | Name | Type | Description | Notes |
66
+ | ---- | ---- | ----------- | ----- |
67
+ | **create_permission_request** | [**CreatePermissionRequest**](CreatePermissionRequest.md) | Permission details. | [optional] |
68
+
69
+ ### Return type
70
+
71
+ [**SuccessResponse**](SuccessResponse.md)
72
+
73
+ ### Authorization
74
+
75
+ [kindeBearerAuth](../README.md#kindeBearerAuth)
76
+
77
+ ### HTTP request headers
78
+
79
+ - **Content-Type**: application/json
80
+ - **Accept**: application/json; charset=utf-8
81
+
82
+
83
+ ## get_permissions
84
+
85
+ > <SuccessResponse> get_permissions(opts)
86
+
87
+ List Permissions
88
+
89
+ The returned list can be sorted by permission name or permission ID in ascending or descending order. The number of records to return at a time can also be controlled using the `page_size` query string parameter.
90
+
91
+ ### Examples
92
+
93
+ ```ruby
94
+ require 'time'
95
+ require 'kinde_api'
96
+ # setup authorization
97
+ KindeApi.configure do |config|
98
+ # Configure Bearer authorization (JWT): kindeBearerAuth
99
+ config.access_token = 'YOUR_BEARER_TOKEN'
100
+ end
101
+
102
+ api_instance = KindeApi::PermissionsApi.new
103
+ opts = {
104
+ sort: 'name_asc', # String | Field and order to sort the result by.
105
+ page_size: 56, # Integer | Number of results per page. Defaults to 10 if parameter not sent.
106
+ next_token: 'next_token_example' # String | A string to get the next page of results if there are more results.
107
+ }
108
+
109
+ begin
110
+ # List Permissions
111
+ result = api_instance.get_permissions(opts)
112
+ p result
113
+ rescue KindeApi::ApiError => e
114
+ puts "Error when calling PermissionsApi->get_permissions: #{e}"
115
+ end
116
+ ```
117
+
118
+ #### Using the get_permissions_with_http_info variant
119
+
120
+ This returns an Array which contains the response data, status code and headers.
121
+
122
+ > <Array(<SuccessResponse>, Integer, Hash)> get_permissions_with_http_info(opts)
123
+
124
+ ```ruby
125
+ begin
126
+ # List Permissions
127
+ data, status_code, headers = api_instance.get_permissions_with_http_info(opts)
128
+ p status_code # => 2xx
129
+ p headers # => { ... }
130
+ p data # => <SuccessResponse>
131
+ rescue KindeApi::ApiError => e
132
+ puts "Error when calling PermissionsApi->get_permissions_with_http_info: #{e}"
133
+ end
134
+ ```
135
+
136
+ ### Parameters
137
+
138
+ | Name | Type | Description | Notes |
139
+ | ---- | ---- | ----------- | ----- |
140
+ | **sort** | **String** | Field and order to sort the result by. | [optional] |
141
+ | **page_size** | **Integer** | Number of results per page. Defaults to 10 if parameter not sent. | [optional] |
142
+ | **next_token** | **String** | A string to get the next page of results if there are more results. | [optional] |
143
+
144
+ ### Return type
145
+
146
+ [**SuccessResponse**](SuccessResponse.md)
147
+
148
+ ### Authorization
149
+
150
+ [kindeBearerAuth](../README.md#kindeBearerAuth)
151
+
152
+ ### HTTP request headers
153
+
154
+ - **Content-Type**: Not defined
155
+ - **Accept**: application/json; charset=utf-8
156
+
157
+
158
+ ## update_permissions
159
+
160
+ > <SuccessResponse> update_permissions(permission_id, opts)
161
+
162
+ Update a permission
163
+
164
+ Update permission
165
+
166
+ ### Examples
167
+
168
+ ```ruby
169
+ require 'time'
170
+ require 'kinde_api'
171
+ # setup authorization
172
+ KindeApi.configure do |config|
173
+ # Configure Bearer authorization (JWT): kindeBearerAuth
174
+ config.access_token = 'YOUR_BEARER_TOKEN'
175
+ end
176
+
177
+ api_instance = KindeApi::PermissionsApi.new
178
+ permission_id = 56 # Integer | The identifier for the permission.
179
+ opts = {
180
+ create_permission_request: KindeApi::CreatePermissionRequest.new # CreatePermissionRequest | Permission details.
181
+ }
182
+
183
+ begin
184
+ # Update a permission
185
+ result = api_instance.update_permissions(permission_id, opts)
186
+ p result
187
+ rescue KindeApi::ApiError => e
188
+ puts "Error when calling PermissionsApi->update_permissions: #{e}"
189
+ end
190
+ ```
191
+
192
+ #### Using the update_permissions_with_http_info variant
193
+
194
+ This returns an Array which contains the response data, status code and headers.
195
+
196
+ > <Array(<SuccessResponse>, Integer, Hash)> update_permissions_with_http_info(permission_id, opts)
197
+
198
+ ```ruby
199
+ begin
200
+ # Update a permission
201
+ data, status_code, headers = api_instance.update_permissions_with_http_info(permission_id, opts)
202
+ p status_code # => 2xx
203
+ p headers # => { ... }
204
+ p data # => <SuccessResponse>
205
+ rescue KindeApi::ApiError => e
206
+ puts "Error when calling PermissionsApi->update_permissions_with_http_info: #{e}"
207
+ end
208
+ ```
209
+
210
+ ### Parameters
211
+
212
+ | Name | Type | Description | Notes |
213
+ | ---- | ---- | ----------- | ----- |
214
+ | **permission_id** | **Integer** | The identifier for the permission. | |
215
+ | **create_permission_request** | [**CreatePermissionRequest**](CreatePermissionRequest.md) | Permission details. | [optional] |
216
+
217
+ ### Return type
218
+
219
+ [**SuccessResponse**](SuccessResponse.md)
220
+
221
+ ### Authorization
222
+
223
+ [kindeBearerAuth](../README.md#kindeBearerAuth)
224
+
225
+ ### HTTP request headers
226
+
227
+ - **Content-Type**: application/json
228
+ - **Accept**: application/json; charset=utf-8
229
+
@@ -0,0 +1,18 @@
1
+ # KindeApi::RedirectCallbackUrls
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **redirect_urls** | **Array&lt;String&gt;** | An application&#39;s redirect URLs. | [optional] |
8
+
9
+ ## Example
10
+
11
+ ```ruby
12
+ require 'kinde_api'
13
+
14
+ instance = KindeApi::RedirectCallbackUrls.new(
15
+ redirect_urls: null
16
+ )
17
+ ```
18
+
@@ -0,0 +1,22 @@
1
+ # KindeApi::Roles
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **key** | **String** | The role identifier to use in code. | [optional] |
8
+ | **name** | **String** | The role&#39;s name. | [optional] |
9
+ | **description** | **String** | The role&#39;s description. | [optional] |
10
+
11
+ ## Example
12
+
13
+ ```ruby
14
+ require 'kinde_api'
15
+
16
+ instance = KindeApi::Roles.new(
17
+ key: null,
18
+ name: null,
19
+ description: null
20
+ )
21
+ ```
22
+
@@ -0,0 +1,229 @@
1
+ # KindeApi::RolesApi
2
+
3
+ All URIs are relative to *https://app.kinde.com*
4
+
5
+ | Method | HTTP request | Description |
6
+ | ------ | ------------ | ----------- |
7
+ | [**create_role**](RolesApi.md#create_role) | **POST** /api/v1/role | Create a new role |
8
+ | [**get_roles**](RolesApi.md#get_roles) | **GET** /api/v1/roles | List Roles |
9
+ | [**update_roles**](RolesApi.md#update_roles) | **PATCH** /api/v1/roles/{role_id} | Update a role |
10
+
11
+
12
+ ## create_role
13
+
14
+ > <SuccessResponse> create_role(opts)
15
+
16
+ Create a new role
17
+
18
+ Create role.
19
+
20
+ ### Examples
21
+
22
+ ```ruby
23
+ require 'time'
24
+ require 'kinde_api'
25
+ # setup authorization
26
+ KindeApi.configure do |config|
27
+ # Configure Bearer authorization (JWT): kindeBearerAuth
28
+ config.access_token = 'YOUR_BEARER_TOKEN'
29
+ end
30
+
31
+ api_instance = KindeApi::RolesApi.new
32
+ opts = {
33
+ create_role_request: KindeApi::CreateRoleRequest.new # CreateRoleRequest | Role details.
34
+ }
35
+
36
+ begin
37
+ # Create a new role
38
+ result = api_instance.create_role(opts)
39
+ p result
40
+ rescue KindeApi::ApiError => e
41
+ puts "Error when calling RolesApi->create_role: #{e}"
42
+ end
43
+ ```
44
+
45
+ #### Using the create_role_with_http_info variant
46
+
47
+ This returns an Array which contains the response data, status code and headers.
48
+
49
+ > <Array(<SuccessResponse>, Integer, Hash)> create_role_with_http_info(opts)
50
+
51
+ ```ruby
52
+ begin
53
+ # Create a new role
54
+ data, status_code, headers = api_instance.create_role_with_http_info(opts)
55
+ p status_code # => 2xx
56
+ p headers # => { ... }
57
+ p data # => <SuccessResponse>
58
+ rescue KindeApi::ApiError => e
59
+ puts "Error when calling RolesApi->create_role_with_http_info: #{e}"
60
+ end
61
+ ```
62
+
63
+ ### Parameters
64
+
65
+ | Name | Type | Description | Notes |
66
+ | ---- | ---- | ----------- | ----- |
67
+ | **create_role_request** | [**CreateRoleRequest**](CreateRoleRequest.md) | Role details. | [optional] |
68
+
69
+ ### Return type
70
+
71
+ [**SuccessResponse**](SuccessResponse.md)
72
+
73
+ ### Authorization
74
+
75
+ [kindeBearerAuth](../README.md#kindeBearerAuth)
76
+
77
+ ### HTTP request headers
78
+
79
+ - **Content-Type**: application/json
80
+ - **Accept**: application/json; charset=utf-8
81
+
82
+
83
+ ## get_roles
84
+
85
+ > <SuccessResponse> get_roles(opts)
86
+
87
+ List Roles
88
+
89
+ The returned list can be sorted by role name or role ID in ascending or descending order. The number of records to return at a time can also be controlled using the `page_size` query string parameter.
90
+
91
+ ### Examples
92
+
93
+ ```ruby
94
+ require 'time'
95
+ require 'kinde_api'
96
+ # setup authorization
97
+ KindeApi.configure do |config|
98
+ # Configure Bearer authorization (JWT): kindeBearerAuth
99
+ config.access_token = 'YOUR_BEARER_TOKEN'
100
+ end
101
+
102
+ api_instance = KindeApi::RolesApi.new
103
+ opts = {
104
+ sort: 'name_asc', # String | Field and order to sort the result by.
105
+ page_size: 56, # Integer | Number of results per page. Defaults to 10 if parameter not sent.
106
+ next_token: 'next_token_example' # String | A string to get the next page of results if there are more results.
107
+ }
108
+
109
+ begin
110
+ # List Roles
111
+ result = api_instance.get_roles(opts)
112
+ p result
113
+ rescue KindeApi::ApiError => e
114
+ puts "Error when calling RolesApi->get_roles: #{e}"
115
+ end
116
+ ```
117
+
118
+ #### Using the get_roles_with_http_info variant
119
+
120
+ This returns an Array which contains the response data, status code and headers.
121
+
122
+ > <Array(<SuccessResponse>, Integer, Hash)> get_roles_with_http_info(opts)
123
+
124
+ ```ruby
125
+ begin
126
+ # List Roles
127
+ data, status_code, headers = api_instance.get_roles_with_http_info(opts)
128
+ p status_code # => 2xx
129
+ p headers # => { ... }
130
+ p data # => <SuccessResponse>
131
+ rescue KindeApi::ApiError => e
132
+ puts "Error when calling RolesApi->get_roles_with_http_info: #{e}"
133
+ end
134
+ ```
135
+
136
+ ### Parameters
137
+
138
+ | Name | Type | Description | Notes |
139
+ | ---- | ---- | ----------- | ----- |
140
+ | **sort** | **String** | Field and order to sort the result by. | [optional] |
141
+ | **page_size** | **Integer** | Number of results per page. Defaults to 10 if parameter not sent. | [optional] |
142
+ | **next_token** | **String** | A string to get the next page of results if there are more results. | [optional] |
143
+
144
+ ### Return type
145
+
146
+ [**SuccessResponse**](SuccessResponse.md)
147
+
148
+ ### Authorization
149
+
150
+ [kindeBearerAuth](../README.md#kindeBearerAuth)
151
+
152
+ ### HTTP request headers
153
+
154
+ - **Content-Type**: Not defined
155
+ - **Accept**: application/json; charset=utf-8
156
+
157
+
158
+ ## update_roles
159
+
160
+ > <SuccessResponse> update_roles(role_id, opts)
161
+
162
+ Update a role
163
+
164
+ Update role
165
+
166
+ ### Examples
167
+
168
+ ```ruby
169
+ require 'time'
170
+ require 'kinde_api'
171
+ # setup authorization
172
+ KindeApi.configure do |config|
173
+ # Configure Bearer authorization (JWT): kindeBearerAuth
174
+ config.access_token = 'YOUR_BEARER_TOKEN'
175
+ end
176
+
177
+ api_instance = KindeApi::RolesApi.new
178
+ role_id = 56 # Integer | The identifier for the role.
179
+ opts = {
180
+ create_role_request: KindeApi::CreateRoleRequest.new # CreateRoleRequest | Role details.
181
+ }
182
+
183
+ begin
184
+ # Update a role
185
+ result = api_instance.update_roles(role_id, opts)
186
+ p result
187
+ rescue KindeApi::ApiError => e
188
+ puts "Error when calling RolesApi->update_roles: #{e}"
189
+ end
190
+ ```
191
+
192
+ #### Using the update_roles_with_http_info variant
193
+
194
+ This returns an Array which contains the response data, status code and headers.
195
+
196
+ > <Array(<SuccessResponse>, Integer, Hash)> update_roles_with_http_info(role_id, opts)
197
+
198
+ ```ruby
199
+ begin
200
+ # Update a role
201
+ data, status_code, headers = api_instance.update_roles_with_http_info(role_id, opts)
202
+ p status_code # => 2xx
203
+ p headers # => { ... }
204
+ p data # => <SuccessResponse>
205
+ rescue KindeApi::ApiError => e
206
+ puts "Error when calling RolesApi->update_roles_with_http_info: #{e}"
207
+ end
208
+ ```
209
+
210
+ ### Parameters
211
+
212
+ | Name | Type | Description | Notes |
213
+ | ---- | ---- | ----------- | ----- |
214
+ | **role_id** | **Integer** | The identifier for the role. | |
215
+ | **create_role_request** | [**CreateRoleRequest**](CreateRoleRequest.md) | Role details. | [optional] |
216
+
217
+ ### Return type
218
+
219
+ [**SuccessResponse**](SuccessResponse.md)
220
+
221
+ ### Authorization
222
+
223
+ [kindeBearerAuth](../README.md#kindeBearerAuth)
224
+
225
+ ### HTTP request headers
226
+
227
+ - **Content-Type**: application/json
228
+ - **Accept**: application/json; charset=utf-8
229
+