stage-ruby 0.0.03 → 0.0.04

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a8d7dd1333a2e7a46ab3a03c46d6de8408b365980d779926698c884137b2d93e
4
- data.tar.gz: 1e4ec0c51ca67372c5b803fcfbe73243422ae360898083a63665299547d62fce
3
+ metadata.gz: 560a6c5af4474f961980b195795265a741824d6a517ca12b4a27a8de015dd512
4
+ data.tar.gz: 4c04f092e12f39d8a00e8df00f95d281feabf7e0f74ad4426ecd8d7e36778bf5
5
5
  SHA512:
6
- metadata.gz: 1b694ed28479e23f7ffa1d99806ac9dd2750908f5ba0e0bc4a37228d6e43c9164a4953e805a23e51227e37bbb92619369e19d4c2210c0c4fc02a188b9bfd3162
7
- data.tar.gz: 1ea07c3cb282a46d09d36a5aeb7e0fb5c9b7f7de18ff0991af675a8f410f49dd06ee3eea0a2bf432bf83b6aeacbd91df49cdcda2969dee8789b13daa9aa9c475
6
+ metadata.gz: b7b28a3f9e959634955a23c41fc4ef366ac2927d9ac1be2763fc4b8ce8d6e105d4fe9040c6da15001841e4a66ea2f39d3cc83ced2fdd18b12d55cdd067b1999f
7
+ data.tar.gz: ab1c989921d086981538f857a237dd9800ba3eff86d8f3d07b6cde9729439135e4bcdc3abd7f3aa872d4379ab1490a69fb1d086777e1af424d513fd89b4a08c2
data/README.md CHANGED
@@ -145,12 +145,14 @@ end
145
145
 
146
146
  ## 4. Documentation for API Endpoints
147
147
 
148
- | Class | Method | HTTP request | Description |
149
- |-------------------|-----------------------------------------------------------|-----------------------------------------------------|--------------------------------------------------------|
150
- | *Stage::StageApi* | [**create_user**](docs/StageApi.md#create_user) | **POST** /sdk-api/v1/users | Creates a user and assigning it to a pre-defined role. |
151
- | *Stage::StageApi* | [**get_plans**](docs/StageApi.md#get_plans) | **GET** /sdk-api/v1/plans | Gets all plans. |
152
- | *Stage::StageApi* | [**has_access**](docs/StageApi.md#has_access) | **GET** /sdk-api/v1/users/{userIdentifier}/features | Checks if a user has access to the identified feature. |
153
- | *Stage::StageApi* | [**update_user_plan**](docs/StageApi.md#update_user_plan) | **PUT** /sdk-api/v1/users/{userIdentifier}/plans | Updates a user's plan. |
148
+ | Class | Method | HTTP request | Description |
149
+ |-------------------|-----------------------------------------------------------|--------------------------------------------------------|--------------------------------------------------------------------------------|
150
+ | *Stage::StageApi* | [**create_user**](docs/StageApi.md#create_user) | **POST** /sdk-api/v1/users | Creates a user and assigning it to a pre-defined role. |
151
+ | *Stage::StageApi* | [**get_plans**](docs/StageApi.md#get_plans) | **GET** /sdk-api/v1/plans | Gets all plans. |
152
+ | *Stage::StageApi* | [**has_access**](docs/StageApi.md#has_access) | **GET** /sdk-api/v1/users/{userIdentifier}/features | Checks if a user has access to the identified features. |
153
+ | *Stage::StageApi* | [**access**](docs/StageApi.md#access) | **POST** /sdk-api/v1/users/{userIdentifier}/features | If the user has access to the features, this marks those features as accessed. |
154
+ | *Stage::StageApi* | [**un_access**](docs/StageApi.md#un_access) | **DELETE** /sdk-api/v1/users/{userIdentifier}/features | If the user has access to the features, this un-accesses those features. |
155
+ | *Stage::StageApi* | [**update_user_plan**](docs/StageApi.md#update_user_plan) | **PUT** /sdk-api/v1/users/{userIdentifier}/plans | Updates a user's plan. |
154
156
 
155
157
  ## 5. Documentation for Models
156
158
 
@@ -5,10 +5,12 @@ Name | Type | Description | Notes
5
5
  ------------ | ------------- | ------------- | -------------
6
6
  **arena_id** | **Integer** | The Arena ID of the client user. | [optional]
7
7
  **created_at** | **DateTime** | The creation date. | [optional]
8
- **created_by** | [**StageUserObjectForm**](StageUserObjectForm.md) | | [optional]
8
+ **created_by** | [**StageUserObjectFormReq**](StageUserObjectFormReq.md) | | [optional]
9
9
  **deleted** | **BOOLEAN** | A boolean value indicating whether the client user is deleted or not. | [optional]
10
10
  **id** | **Integer** | The ID of the client user. | [optional]
11
11
  **identifier** | **String** | A client user identifier. | [optional]
12
+ **organization_id** | **Integer** | The organization this user belongs to. | [optional]
12
13
  **plan_id** | **Integer** | The plan to be assigned to the client user. | [optional]
13
14
  **plan_identifier** | **String** | The plan to be assigned to the user. | [optional]
15
+ **plan_role_id** | **Integer** | The role within the organization's plan this user is assigned. | [optional]
14
16
 
data/docs/StageApi.md CHANGED
@@ -4,11 +4,71 @@ All URIs are relative to *//localhost:8080/*
4
4
 
5
5
  Method | HTTP request | Description
6
6
  ------------- | ------------- | -------------
7
+ [**access**](StageApi.md#access) | **POST** /sdk-api/v1/users/{userIdentifier}/features | If the user has access to the features, this marks those features as accessed.
7
8
  [**create_user**](StageApi.md#create_user) | **POST** /sdk-api/v1/users | Creates a user and assigning it to a pre-defined role.
8
9
  [**get_plans**](StageApi.md#get_plans) | **GET** /sdk-api/v1/plans | Gets all plans.
9
- [**has_access**](StageApi.md#has_access) | **GET** /sdk-api/v1/users/{userIdentifier}/features | Checks if a user has access to the identified feature.
10
+ [**has_access**](StageApi.md#has_access) | **GET** /sdk-api/v1/users/{userIdentifier}/features | Checks if a user has access to the identified features.
11
+ [**un_access**](StageApi.md#un_access) | **DELETE** /sdk-api/v1/users/{userIdentifier}/features | If the user has access to the features, this un-accesses those features.
10
12
  [**update_user_plan**](StageApi.md#update_user_plan) | **PUT** /sdk-api/v1/users/{userIdentifier}/plans | Updates a user's plan.
11
13
 
14
+ # **access**
15
+ > AccessForm access(identifiers, user_identifier)
16
+
17
+ If the user has access to the features, this marks those features as accessed.
18
+
19
+ ### Example
20
+ ```ruby
21
+ # load the gem
22
+ require 'stage-ruby'
23
+ # setup authorization
24
+ Stage.configure do |config|
25
+ # Configure API key authorization: stage-api-token
26
+ config.api_key['Authorization'] = 'YOUR API KEY'
27
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
28
+ #config.api_key_prefix['Authorization'] = 'Bearer'
29
+
30
+ # Configure API key authorization: stage-read-only-api-token
31
+ config.api_key['Authorization'] = 'YOUR API KEY'
32
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
33
+ #config.api_key_prefix['Authorization'] = 'Bearer'
34
+ end
35
+
36
+ api_instance = Stage::StageApi.new
37
+ identifiers = ['identifiers_example'] # Array<String> | The identifiers of the features being accessed.
38
+ user_identifier = 'user_identifier_example' # String | The identifier of the user who is accessing the feature.
39
+
40
+
41
+ begin
42
+ #If the user has access to the features, this marks those features as accessed.
43
+ result = api_instance.access(identifiers, user_identifier)
44
+ p result
45
+ rescue Stage::ApiError => e
46
+ puts "Exception when calling StageApi->access: #{e}"
47
+ end
48
+ ```
49
+
50
+ ### Parameters
51
+
52
+ Name | Type | Description | Notes
53
+ ------------- | ------------- | ------------- | -------------
54
+ **identifiers** | [**Array&lt;String&gt;**](String.md)| The identifiers of the features being accessed. |
55
+ **user_identifier** | **String**| The identifier of the user who is accessing the feature. |
56
+
57
+ ### Return type
58
+
59
+ [**AccessForm**](AccessForm.md)
60
+
61
+ ### Authorization
62
+
63
+ [stage-api-token](../README.md#stage-api-token), [stage-read-only-api-token](../README.md#stage-read-only-api-token)
64
+
65
+ ### HTTP request headers
66
+
67
+ - **Content-Type**: Not defined
68
+ - **Accept**: application/json
69
+
70
+
71
+
12
72
  # **create_user**
13
73
  > ClientUserForm create_user(body)
14
74
 
@@ -24,6 +84,11 @@ Stage.configure do |config|
24
84
  config.api_key['Authorization'] = 'YOUR API KEY'
25
85
  # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
26
86
  #config.api_key_prefix['Authorization'] = 'Bearer'
87
+
88
+ # Configure API key authorization: stage-read-only-api-token
89
+ config.api_key['Authorization'] = 'YOUR API KEY'
90
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
91
+ #config.api_key_prefix['Authorization'] = 'Bearer'
27
92
  end
28
93
 
29
94
  api_instance = Stage::StageApi.new
@@ -51,7 +116,7 @@ Name | Type | Description | Notes
51
116
 
52
117
  ### Authorization
53
118
 
54
- [stage-api-token](../README.md#stage-api-token)
119
+ [stage-api-token](../README.md#stage-api-token), [stage-read-only-api-token](../README.md#stage-read-only-api-token)
55
120
 
56
121
  ### HTTP request headers
57
122
 
@@ -75,6 +140,11 @@ Stage.configure do |config|
75
140
  config.api_key['Authorization'] = 'YOUR API KEY'
76
141
  # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
77
142
  #config.api_key_prefix['Authorization'] = 'Bearer'
143
+
144
+ # Configure API key authorization: stage-read-only-api-token
145
+ config.api_key['Authorization'] = 'YOUR API KEY'
146
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
147
+ #config.api_key_prefix['Authorization'] = 'Bearer'
78
148
  end
79
149
 
80
150
  api_instance = Stage::StageApi.new
@@ -97,7 +167,7 @@ This endpoint does not need any parameter.
97
167
 
98
168
  ### Authorization
99
169
 
100
- [stage-api-token](../README.md#stage-api-token)
170
+ [stage-api-token](../README.md#stage-api-token), [stage-read-only-api-token](../README.md#stage-read-only-api-token)
101
171
 
102
172
  ### HTTP request headers
103
173
 
@@ -107,9 +177,9 @@ This endpoint does not need any parameter.
107
177
 
108
178
 
109
179
  # **has_access**
110
- > AccessForm has_access(identifiers, user_identifier, mark_accessed)
180
+ > AccessForm has_access(identifiers, user_identifier)
111
181
 
112
- Checks if a user has access to the identified feature.
182
+ Checks if a user has access to the identified features.
113
183
 
114
184
  ### Example
115
185
  ```ruby
@@ -121,17 +191,21 @@ Stage.configure do |config|
121
191
  config.api_key['Authorization'] = 'YOUR API KEY'
122
192
  # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
123
193
  #config.api_key_prefix['Authorization'] = 'Bearer'
194
+
195
+ # Configure API key authorization: stage-read-only-api-token
196
+ config.api_key['Authorization'] = 'YOUR API KEY'
197
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
198
+ #config.api_key_prefix['Authorization'] = 'Bearer'
124
199
  end
125
200
 
126
201
  api_instance = Stage::StageApi.new
127
202
  identifiers = ['identifiers_example'] # Array<String> | The identifiers of the features being accessed.
128
- mark_accessed = true # BOOLEAN | Whether this has-access check should mark the features as having been accessed.
129
203
  user_identifier = 'user_identifier_example' # String | The identifier of the user who is accessing the feature.
130
204
 
131
205
 
132
206
  begin
133
- #Checks if a user has access to the identified feature.
134
- result = api_instance.has_access(identifiers, user_identifier, mark_accessed)
207
+ #Checks if a user has access to the identified features.
208
+ result = api_instance.has_access(identifiers, user_identifier)
135
209
  p result
136
210
  rescue Stage::ApiError => e
137
211
  puts "Exception when calling StageApi->has_access: #{e}"
@@ -143,7 +217,6 @@ end
143
217
  Name | Type | Description | Notes
144
218
  ------------- | ------------- | ------------- | -------------
145
219
  **identifiers** | [**Array&lt;String&gt;**](String.md)| The identifiers of the features being accessed. |
146
- **mark_accessed** | **BOOLEAN**| Whether this has-access check should mark the features as having been accessed. |
147
220
  **user_identifier** | **String**| The identifier of the user who is accessing the feature. |
148
221
 
149
222
  ### Return type
@@ -152,7 +225,67 @@ Name | Type | Description | Notes
152
225
 
153
226
  ### Authorization
154
227
 
155
- [stage-api-token](../README.md#stage-api-token)
228
+ [stage-api-token](../README.md#stage-api-token), [stage-read-only-api-token](../README.md#stage-read-only-api-token)
229
+
230
+ ### HTTP request headers
231
+
232
+ - **Content-Type**: Not defined
233
+ - **Accept**: application/json
234
+
235
+
236
+
237
+ # **un_access**
238
+ > AccessForm un_access(as_credit, identifiers, user_identifier)
239
+
240
+ If the user has access to the features, this un-accesses those features.
241
+
242
+ ### Example
243
+ ```ruby
244
+ # load the gem
245
+ require 'stage-ruby'
246
+ # setup authorization
247
+ Stage.configure do |config|
248
+ # Configure API key authorization: stage-api-token
249
+ config.api_key['Authorization'] = 'YOUR API KEY'
250
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
251
+ #config.api_key_prefix['Authorization'] = 'Bearer'
252
+
253
+ # Configure API key authorization: stage-read-only-api-token
254
+ config.api_key['Authorization'] = 'YOUR API KEY'
255
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
256
+ #config.api_key_prefix['Authorization'] = 'Bearer'
257
+ end
258
+
259
+ api_instance = Stage::StageApi.new
260
+ as_credit = true # BOOLEAN | When set to true, this un-accessing of a feature is treated as a credit instead of decrementing the access count.
261
+ identifiers = ['identifiers_example'] # Array<String> | The identifiers of the features being accessed.
262
+ user_identifier = 'user_identifier_example' # String | The identifier of the user who is accessing the feature.
263
+
264
+
265
+ begin
266
+ #If the user has access to the features, this un-accesses those features.
267
+ result = api_instance.un_access(as_credit, identifiers, user_identifier)
268
+ p result
269
+ rescue Stage::ApiError => e
270
+ puts "Exception when calling StageApi->un_access: #{e}"
271
+ end
272
+ ```
273
+
274
+ ### Parameters
275
+
276
+ Name | Type | Description | Notes
277
+ ------------- | ------------- | ------------- | -------------
278
+ **as_credit** | **BOOLEAN**| When set to true, this un-accessing of a feature is treated as a credit instead of decrementing the access count. |
279
+ **identifiers** | [**Array&lt;String&gt;**](String.md)| The identifiers of the features being accessed. |
280
+ **user_identifier** | **String**| The identifier of the user who is accessing the feature. |
281
+
282
+ ### Return type
283
+
284
+ [**AccessForm**](AccessForm.md)
285
+
286
+ ### Authorization
287
+
288
+ [stage-api-token](../README.md#stage-api-token), [stage-read-only-api-token](../README.md#stage-read-only-api-token)
156
289
 
157
290
  ### HTTP request headers
158
291
 
@@ -176,6 +309,11 @@ Stage.configure do |config|
176
309
  config.api_key['Authorization'] = 'YOUR API KEY'
177
310
  # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
178
311
  #config.api_key_prefix['Authorization'] = 'Bearer'
312
+
313
+ # Configure API key authorization: stage-read-only-api-token
314
+ config.api_key['Authorization'] = 'YOUR API KEY'
315
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
316
+ #config.api_key_prefix['Authorization'] = 'Bearer'
179
317
  end
180
318
 
181
319
  api_instance = Stage::StageApi.new
@@ -196,7 +334,7 @@ end
196
334
 
197
335
  Name | Type | Description | Notes
198
336
  ------------- | ------------- | ------------- | -------------
199
- **body** | [**ClientUserForm**](ClientUserForm.md)| The payload containing the information to update a user&#x27;s plan. Only identifier and planIdentifier fields are required. |
337
+ **body** | [**ClientUserForm**](ClientUserForm.md)| The payload containing the information to update a user&#x27;s plan. Only identifier and planIdentifier fields are required. |
200
338
  **user_identifier** | **String**| The identifier of the user. |
201
339
 
202
340
  ### Return type
@@ -205,7 +343,7 @@ Name | Type | Description | Notes
205
343
 
206
344
  ### Authorization
207
345
 
208
- [stage-api-token](../README.md#stage-api-token)
346
+ [stage-api-token](../README.md#stage-api-token), [stage-read-only-api-token](../README.md#stage-read-only-api-token)
209
347
 
210
348
  ### HTTP request headers
211
349
 
@@ -4,8 +4,14 @@
4
4
  Name | Type | Description | Notes
5
5
  ------------ | ------------- | ------------- | -------------
6
6
  **arena_id** | **Integer** | | [optional]
7
+ **created_at** | **DateTime** | | [optional]
7
8
  **deleted** | **BOOLEAN** | | [optional]
8
9
  **email** | **String** | | [optional]
9
- **id** | **Integer** | | [optional]
10
+ **existing_password** | **String** | | [optional]
11
+ **first_name** | **String** | | [optional]
12
+ **id** | **Integer** | | [optional]
13
+ **invite_accepted** | **BOOLEAN** | | [optional]
14
+ **last_name** | **String** | | [optional]
10
15
  **password** | **String** | | [optional]
16
+ **updated_at** | **DateTime** | | [optional]
11
17
 
@@ -135,34 +135,32 @@ module Stage
135
135
  # Checks if a user has access to the identified feature.
136
136
  # @param user_identifier The identifier of the user who is accessing the feature.
137
137
  # @param feature_identifiers identifiers
138
- # @param mark_accessed Whether this has-access check should mark the features as having been accessed.
139
138
  # @return [AccessForm]
140
- def has_access_verbose(user_identifier, feature_identifiers, mark_accessed)
141
- data, _status_code, _headers = has_access_with_http_info(user_identifier, feature_identifiers, mark_accessed, {})
139
+ def has_access_verbose(user_identifier, feature_identifiers)
140
+ data, _status_code, _headers = has_access_with_http_info(user_identifier, feature_identifiers, {})
142
141
  data
143
142
  end
144
143
 
145
- def has_access(user_identifier, feature_identifier, mark_accessed)
146
- has_access_to_all(user_identifier, [feature_identifier], mark_accessed)
144
+ def has_access(user_identifier, feature_identifier)
145
+ has_access_to_all(user_identifier, [feature_identifier])
147
146
  end
148
147
 
149
- def has_access_to_any(user_identifier, feature_identifiers, mark_accessed)
150
- data, _status_code, _headers = has_access_with_http_info(user_identifier, feature_identifiers, mark_accessed, {})
148
+ def has_access_to_any(user_identifier, feature_identifiers)
149
+ data, _status_code, _headers = has_access_with_http_info(user_identifier, feature_identifiers, {})
151
150
  data.features.map { |feature| feature[:hasAccess] }.any?
152
151
  end
153
152
 
154
- def has_access_to_all(user_identifier, feature_identifiers, mark_accessed)
155
- data, _status_code, _headers = has_access_with_http_info(user_identifier, feature_identifiers, mark_accessed, {})
153
+ def has_access_to_all(user_identifier, feature_identifiers)
154
+ data, _status_code, _headers = has_access_with_http_info(user_identifier, feature_identifiers, {})
156
155
  data.features.map { |feature| feature[:hasAccess] }.all?
157
156
  end
158
157
 
159
158
  # Checks if a user has access to the identified feature.
160
159
  # @param user_identifier The identifier of the user who is accessing the feature.
161
160
  # @param feature_identifiers identifiers
162
- # @param mark_accessed Whether this has-access check should mark the features as having been accessed.
163
161
  # @param [Hash] opts the optional parameters
164
162
  # @return [Array<(AccessForm, Integer, Hash)>] AccessForm data, response status code and response headers
165
- def has_access_with_http_info(user_identifier, feature_identifiers, mark_accessed, opts = {})
163
+ def has_access_with_http_info(user_identifier, feature_identifiers, opts = {})
166
164
  if @api_client.config.debugging
167
165
  @api_client.config.logger.debug 'Calling API: StageApi.has_access ...'
168
166
  end
@@ -180,7 +178,6 @@ module Stage
180
178
  # query parameters
181
179
  query_params = opts[:query_params] || {}
182
180
  query_params[:'identifiers'] = @api_client.build_collection_param(feature_identifiers, :csv)
183
- query_params[:'markAccessed'] = mark_accessed
184
181
 
185
182
  # header parameters
186
183
  header_params = opts[:header_params] || {}
@@ -210,6 +207,158 @@ module Stage
210
207
  return data, status_code, headers
211
208
  end
212
209
 
210
+ # If the user has access to the feature, this marks that feature as accessed.
211
+ # @param user_identifier The identifier of the user who is accessing the feature.
212
+ # @param feature_identifier The feature_identifier of the feature being accessed.
213
+ # @param [Hash] opts the optional parameters
214
+ # @return [AccessForm]
215
+ def access(user_identifier, feature_identifier, opts = {})
216
+ data, _status_code, _headers = access_with_http_info(user_identifier, [feature_identifier], opts)
217
+ data
218
+ end
219
+
220
+ # If the user has access to the features, this marks those features as accessed.
221
+ # @param user_identifier The identifier of the user who is accessing the feature.
222
+ # @param feature_identifiers The feature_identifiers of the features being accessed.
223
+ # @param [Hash] opts the optional parameters
224
+ # @return [AccessForm]
225
+ def accessAll(user_identifier, feature_identifiers, opts = {})
226
+ data, _status_code, _headers = access_with_http_info(user_identifier, feature_identifiers, opts)
227
+ data
228
+ end
229
+
230
+ # If the user has access to the features, this marks those features as accessed.
231
+ # @param user_identifier The identifier of the user who is accessing the feature.
232
+ # @param feature_identifiers The identifiers of the features being accessed.
233
+ # @param [Hash] opts the optional parameters
234
+ # @return [Array<(AccessForm, Integer, Hash)>] AccessForm data, response status code and response headers
235
+ def access_with_http_info(user_identifier, feature_identifiers, opts = {})
236
+ if @api_client.config.debugging
237
+ @api_client.config.logger.debug 'Calling API: StageApi.access ...'
238
+ end
239
+ # verify the required parameter 'feature_identifiers' is set
240
+ if @api_client.config.client_side_validation && feature_identifiers.nil?
241
+ fail ArgumentError, "Missing the required parameter 'feature_identifiers' when calling StageApi.access"
242
+ end
243
+ # verify the required parameter 'user_identifier' is set
244
+ if @api_client.config.client_side_validation && user_identifier.nil?
245
+ fail ArgumentError, "Missing the required parameter 'user_identifier' when calling StageApi.access"
246
+ end
247
+ # resource path
248
+ local_var_path = '/sdk-api/v1/users/{userIdentifier}/features'.sub('{' + 'userIdentifier' + '}', user_identifier.to_s)
249
+
250
+ # query parameters
251
+ query_params = opts[:query_params] || {}
252
+ query_params[:'identifiers'] = @api_client.build_collection_param(feature_identifiers, :multi)
253
+
254
+ # header parameters
255
+ header_params = opts[:header_params] || {}
256
+ # HTTP header 'Accept' (if needed)
257
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
258
+
259
+ # form parameters
260
+ form_params = opts[:form_params] || {}
261
+
262
+ # http body (model)
263
+ post_body = opts[:body]
264
+
265
+ return_type = opts[:return_type] || 'AccessForm'
266
+
267
+ auth_names = opts[:auth_names] || ['stage-api-token', 'stage-read-only-api-token']
268
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
269
+ :header_params => header_params,
270
+ :query_params => query_params,
271
+ :form_params => form_params,
272
+ :body => post_body,
273
+ :auth_names => auth_names,
274
+ :return_type => return_type)
275
+
276
+ if @api_client.config.debugging
277
+ @api_client.config.logger.debug "API called: StageApi#access\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
278
+ end
279
+ return data, status_code, headers
280
+ end
281
+
282
+ # If the user has access to the feature, this un-accesses that features.
283
+ # @param user_identifier The identifier of the user who is accessing the feature.
284
+ # @param feature_identifier The identifier of the feature being accessed.
285
+ # @param as_credit When set to true, this un-accessing of a feature is treated as a credit instead of decrementing the access count.
286
+ # @param [Hash] opts the optional parameters
287
+ # @return [AccessForm]
288
+ def un_access(user_identifier, feature_identifier, as_credit, opts = {})
289
+ data, _status_code, _headers = un_access_with_http_info(as_credit, [feature_identifier], user_identifier, opts)
290
+ data
291
+ end
292
+
293
+ # If the user has access to the features, this un-accesses those features.
294
+ # @param user_identifier The identifier of the user who is accessing the feature.
295
+ # @param feature_identifiers The identifiers of the features being accessed.
296
+ # @param as_credit When set to true, this un-accessing of a feature is treated as a credit instead of decrementing the access count.
297
+ # @param [Hash] opts the optional parameters
298
+ # @return [AccessForm]
299
+ def un_access_all(user_identifier, feature_identifiers, as_credit, opts = {})
300
+ data, _status_code, _headers = un_access_with_http_info(as_credit, feature_identifiers, user_identifier, opts)
301
+ data
302
+ end
303
+
304
+ # If the user has access to the features, this un-accesses those features.
305
+ # @param as_credit When set to true, this un-accessing of a feature is treated as a credit instead of decrementing the access count.
306
+ # @param feature_identifiers The identifiers of the features being accessed.
307
+ # @param user_identifier The identifier of the user who is accessing the feature.
308
+ # @param [Hash] opts the optional parameters
309
+ # @return [Array<(AccessForm, Integer, Hash)>] AccessForm data, response status code and response headers
310
+ def un_access_with_http_info(user_identifier, feature_identifiers, as_credit, opts = {})
311
+ if @api_client.config.debugging
312
+ @api_client.config.logger.debug 'Calling API: StageApi.un_access ...'
313
+ end
314
+ # verify the required parameter 'as_credit' is set
315
+ if @api_client.config.client_side_validation && as_credit.nil?
316
+ fail ArgumentError, "Missing the required parameter 'as_credit' when calling StageApi.un_access"
317
+ end
318
+ # verify the required parameter 'feature_identifiers' is set
319
+ if @api_client.config.client_side_validation && feature_identifiers.nil?
320
+ fail ArgumentError, "Missing the required parameter 'feature_identifiers' when calling StageApi.un_access"
321
+ end
322
+ # verify the required parameter 'user_identifier' is set
323
+ if @api_client.config.client_side_validation && user_identifier.nil?
324
+ fail ArgumentError, "Missing the required parameter 'user_identifier' when calling StageApi.un_access"
325
+ end
326
+ # resource path
327
+ local_var_path = '/sdk-api/v1/users/{userIdentifier}/features'.sub('{' + 'userIdentifier' + '}', user_identifier.to_s)
328
+
329
+ # query parameters
330
+ query_params = opts[:query_params] || {}
331
+ query_params[:'asCredit'] = as_credit
332
+ query_params[:'identifiers'] = @api_client.build_collection_param(feature_identifiers, :multi)
333
+
334
+ # header parameters
335
+ header_params = opts[:header_params] || {}
336
+ # HTTP header 'Accept' (if needed)
337
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
338
+
339
+ # form parameters
340
+ form_params = opts[:form_params] || {}
341
+
342
+ # http body (model)
343
+ post_body = opts[:body]
344
+
345
+ return_type = opts[:return_type] || 'AccessForm'
346
+
347
+ auth_names = opts[:auth_names] || ['stage-api-token', 'stage-read-only-api-token']
348
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
349
+ :header_params => header_params,
350
+ :query_params => query_params,
351
+ :form_params => form_params,
352
+ :body => post_body,
353
+ :auth_names => auth_names,
354
+ :return_type => return_type)
355
+
356
+ if @api_client.config.debugging
357
+ @api_client.config.logger.debug "API called: StageApi#un_access\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
358
+ end
359
+ return data, status_code, headers
360
+ end
361
+
213
362
  # Updates a user's plan.
214
363
  # @param user_identifier The identifier of the user.
215
364
  # @param plan_identifier The plan identifier.
@@ -199,6 +199,13 @@ module Stage
199
199
  key: 'Authorization',
200
200
  value: api_key_with_prefix('Authorization')
201
201
  },
202
+ 'stage-read-only-api-token' =>
203
+ {
204
+ type: 'api_key',
205
+ in: 'header',
206
+ key: 'Authorization',
207
+ value: api_key_with_prefix('Authorization')
208
+ },
202
209
  }
203
210
  end
204
211
  end
@@ -30,12 +30,18 @@ module Stage
30
30
  # A client user identifier.
31
31
  attr_accessor :identifier
32
32
 
33
+ # The organization this user belongs to.
34
+ attr_accessor :organization_id
35
+
33
36
  # The plan to be assigned to the client user.
34
37
  attr_accessor :plan_id
35
38
 
36
39
  # The plan to be assigned to the user.
37
40
  attr_accessor :plan_identifier
38
41
 
42
+ # The role within the organization's plan this user is assigned.
43
+ attr_accessor :plan_role_id
44
+
39
45
  # Attribute mapping from ruby-style variable name to JSON key.
40
46
  def self.attribute_map
41
47
  {
@@ -45,8 +51,10 @@ module Stage
45
51
  :'deleted' => :'deleted',
46
52
  :'id' => :'id',
47
53
  :'identifier' => :'identifier',
54
+ :'organization_id' => :'organizationId',
48
55
  :'plan_id' => :'planId',
49
- :'plan_identifier' => :'planIdentifier'
56
+ :'plan_identifier' => :'planIdentifier',
57
+ :'plan_role_id' => :'planRoleId'
50
58
  }
51
59
  end
52
60
 
@@ -59,8 +67,10 @@ module Stage
59
67
  :'deleted' => :'Object',
60
68
  :'id' => :'Object',
61
69
  :'identifier' => :'Object',
70
+ :'organization_id' => :'Object',
62
71
  :'plan_id' => :'Object',
63
- :'plan_identifier' => :'Object'
72
+ :'plan_identifier' => :'Object',
73
+ :'plan_role_id' => :'Object'
64
74
  }
65
75
  end
66
76
 
@@ -109,6 +119,10 @@ module Stage
109
119
  self.identifier = attributes[:'identifier']
110
120
  end
111
121
 
122
+ if attributes.key?(:'organization_id')
123
+ self.organization_id = attributes[:'organization_id']
124
+ end
125
+
112
126
  if attributes.key?(:'plan_id')
113
127
  self.plan_id = attributes[:'plan_id']
114
128
  end
@@ -116,6 +130,10 @@ module Stage
116
130
  if attributes.key?(:'plan_identifier')
117
131
  self.plan_identifier = attributes[:'plan_identifier']
118
132
  end
133
+
134
+ if attributes.key?(:'plan_role_id')
135
+ self.plan_role_id = attributes[:'plan_role_id']
136
+ end
119
137
  end
120
138
 
121
139
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -142,8 +160,10 @@ module Stage
142
160
  deleted == o.deleted &&
143
161
  id == o.id &&
144
162
  identifier == o.identifier &&
163
+ organization_id == o.organization_id &&
145
164
  plan_id == o.plan_id &&
146
- plan_identifier == o.plan_identifier
165
+ plan_identifier == o.plan_identifier &&
166
+ plan_role_id == o.plan_role_id
147
167
  end
148
168
 
149
169
  # @see the `==` method
@@ -155,7 +175,7 @@ module Stage
155
175
  # Calculates hash code according to all attributes.
156
176
  # @return [Integer] Hash code
157
177
  def hash
158
- [arena_id, created_at, created_by, deleted, id, identifier, plan_id, plan_identifier].hash
178
+ [arena_id, created_at, created_by, deleted, id, identifier, organization_id, plan_id, plan_identifier, plan_role_id].hash
159
179
  end
160
180
 
161
181
  # Builds the object from hash
@@ -15,22 +15,40 @@ module Stage
15
15
  class StageUserObjectForm
16
16
  attr_accessor :arena_id
17
17
 
18
+ attr_accessor :created_at
19
+
18
20
  attr_accessor :deleted
19
21
 
20
22
  attr_accessor :email
21
23
 
24
+ attr_accessor :existing_password
25
+
26
+ attr_accessor :first_name
27
+
22
28
  attr_accessor :id
23
29
 
30
+ attr_accessor :invite_accepted
31
+
32
+ attr_accessor :last_name
33
+
24
34
  attr_accessor :password
25
35
 
36
+ attr_accessor :updated_at
37
+
26
38
  # Attribute mapping from ruby-style variable name to JSON key.
27
39
  def self.attribute_map
28
40
  {
29
41
  :'arena_id' => :'arenaId',
42
+ :'created_at' => :'createdAt',
30
43
  :'deleted' => :'deleted',
31
44
  :'email' => :'email',
45
+ :'existing_password' => :'existingPassword',
46
+ :'first_name' => :'firstName',
32
47
  :'id' => :'id',
33
- :'password' => :'password'
48
+ :'invite_accepted' => :'inviteAccepted',
49
+ :'last_name' => :'lastName',
50
+ :'password' => :'password',
51
+ :'updated_at' => :'updatedAt'
34
52
  }
35
53
  end
36
54
 
@@ -38,10 +56,16 @@ module Stage
38
56
  def self.openapi_types
39
57
  {
40
58
  :'arena_id' => :'Object',
59
+ :'created_at' => :'Object',
41
60
  :'deleted' => :'Object',
42
61
  :'email' => :'Object',
62
+ :'existing_password' => :'Object',
63
+ :'first_name' => :'Object',
43
64
  :'id' => :'Object',
44
- :'password' => :'Object'
65
+ :'invite_accepted' => :'Object',
66
+ :'last_name' => :'Object',
67
+ :'password' => :'Object',
68
+ :'updated_at' => :'Object'
45
69
  }
46
70
  end
47
71
 
@@ -70,6 +94,10 @@ module Stage
70
94
  self.arena_id = attributes[:'arena_id']
71
95
  end
72
96
 
97
+ if attributes.key?(:'created_at')
98
+ self.created_at = attributes[:'created_at']
99
+ end
100
+
73
101
  if attributes.key?(:'deleted')
74
102
  self.deleted = attributes[:'deleted']
75
103
  end
@@ -78,13 +106,33 @@ module Stage
78
106
  self.email = attributes[:'email']
79
107
  end
80
108
 
109
+ if attributes.key?(:'existing_password')
110
+ self.existing_password = attributes[:'existing_password']
111
+ end
112
+
113
+ if attributes.key?(:'first_name')
114
+ self.first_name = attributes[:'first_name']
115
+ end
116
+
81
117
  if attributes.key?(:'id')
82
118
  self.id = attributes[:'id']
83
119
  end
84
120
 
121
+ if attributes.key?(:'invite_accepted')
122
+ self.invite_accepted = attributes[:'invite_accepted']
123
+ end
124
+
125
+ if attributes.key?(:'last_name')
126
+ self.last_name = attributes[:'last_name']
127
+ end
128
+
85
129
  if attributes.key?(:'password')
86
130
  self.password = attributes[:'password']
87
131
  end
132
+
133
+ if attributes.key?(:'updated_at')
134
+ self.updated_at = attributes[:'updated_at']
135
+ end
88
136
  end
89
137
 
90
138
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -106,10 +154,16 @@ module Stage
106
154
  return true if self.equal?(o)
107
155
  self.class == o.class &&
108
156
  arena_id == o.arena_id &&
157
+ created_at == o.created_at &&
109
158
  deleted == o.deleted &&
110
159
  email == o.email &&
160
+ existing_password == o.existing_password &&
161
+ first_name == o.first_name &&
111
162
  id == o.id &&
112
- password == o.password
163
+ invite_accepted == o.invite_accepted &&
164
+ last_name == o.last_name &&
165
+ password == o.password &&
166
+ updated_at == o.updated_at
113
167
  end
114
168
 
115
169
  # @see the `==` method
@@ -121,7 +175,7 @@ module Stage
121
175
  # Calculates hash code according to all attributes.
122
176
  # @return [Integer] Hash code
123
177
  def hash
124
- [arena_id, deleted, email, id, password].hash
178
+ [arena_id, created_at, deleted, email, existing_password, first_name, id, invite_accepted, last_name, password, updated_at].hash
125
179
  end
126
180
 
127
181
  # Builds the object from hash
@@ -10,5 +10,5 @@ Swagger Codegen version: 3.0.33
10
10
  =end
11
11
 
12
12
  module Stage
13
- VERSION = '0.0.03'
13
+ VERSION = '0.0.04'
14
14
  end
Binary file
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: stage-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.03
4
+ version: 0.0.04
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stage Technologies, Inc.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-08-23 00:00:00.000000000 Z
11
+ date: 2022-10-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: typhoeus
@@ -127,6 +127,7 @@ files:
127
127
  - spec/models/stage_user_object_form_spec.rb
128
128
  - spec/spec_helper.rb
129
129
  - stage-ruby-0.0.02.gem
130
+ - stage-ruby-0.0.03.gem
130
131
  - stage-ruby.gemspec
131
132
  homepage: https://github.com/swagger-api/swagger-codegen
132
133
  licenses: