stage-ruby 0.0.02 → 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 +4 -4
- data/README.md +46 -14
- data/docs/ClientUserObjectForm.md +3 -0
- data/docs/FeatureObjectForm.md +11 -0
- data/docs/PlanObjectForm.md +12 -0
- data/docs/StageApi.md +199 -12
- data/docs/StageUserObjectForm.md +17 -0
- data/lib/.DS_Store +0 -0
- data/lib/stage-ruby/.DS_Store +0 -0
- data/lib/stage-ruby/api/stage_api.rb +203 -3
- data/lib/stage-ruby/configuration.rb +7 -0
- data/lib/stage-ruby/models/client_user_object_form.rb +33 -4
- data/lib/stage-ruby/models/feature_object_form.rb +247 -0
- data/lib/stage-ruby/models/plan_object_form.rb +259 -0
- data/lib/stage-ruby/models/stage_user_object_form.rb +296 -0
- data/lib/stage-ruby/utils.rb +2 -0
- data/lib/stage-ruby/version.rb +1 -1
- data/lib/stage-ruby.rb +3 -0
- data/spec/.DS_Store +0 -0
- data/spec/api/stage_api_spec.rb +13 -2
- data/spec/models/client_user_object_form_spec.rb +6 -0
- data/spec/models/feature_object_form_spec.rb +64 -0
- data/spec/models/plan_object_form_spec.rb +70 -0
- data/spec/models/stage_user_object_form_spec.rb +64 -0
- data/stage-ruby-0.0.02.gem +0 -0
- data/stage-ruby-0.0.03.gem +0 -0
- metadata +19 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 560a6c5af4474f961980b195795265a741824d6a517ca12b4a27a8de015dd512
|
4
|
+
data.tar.gz: 4c04f092e12f39d8a00e8df00f95d281feabf7e0f74ad4426ecd8d7e36778bf5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b7b28a3f9e959634955a23c41fc4ef366ac2927d9ac1be2763fc4b8ce8d6e105d4fe9040c6da15001841e4a66ea2f39d3cc83ced2fdd18b12d55cdd067b1999f
|
7
|
+
data.tar.gz: ab1c989921d086981538f857a237dd9800ba3eff86d8f3d07b6cde9729439135e4bcdc3abd7f3aa872d4379ab1490a69fb1d086777e1af424d513fd89b4a08c2
|
data/README.md
CHANGED
@@ -47,7 +47,9 @@ rvm use 3.0.0@stage-ruby
|
|
47
47
|
bundle install
|
48
48
|
```
|
49
49
|
|
50
|
-
### 1.2. Build
|
50
|
+
### 1.2. Build and Publish `stage-ruby` Gem Locally
|
51
|
+
|
52
|
+
To build and publish `stage-ruby` gem locally for development or test, follow these steps:
|
51
53
|
|
52
54
|
1. Build Ruby code into a gem:
|
53
55
|
|
@@ -61,19 +63,43 @@ gem build stage-ruby.gemspec
|
|
61
63
|
gem install ./stage-ruby-{VERSION}.gem
|
62
64
|
```
|
63
65
|
|
64
|
-
|
66
|
+
To find the installation directory, run the following command: `rvm gemdir`.
|
67
|
+
|
68
|
+
### 1.3. Build and Publish `stage-ruby` Gem to RubyGems.org
|
69
|
+
|
70
|
+
Before proceeding, please see the RubyGems's documentation on how to publish a gem
|
71
|
+
[here](https://guides.rubygems.org/publishing/). To build and publish `stage-ruby` gem to
|
72
|
+
[RubyGems.org](https://guides.rubygems.org/), follow these steps:
|
73
|
+
|
74
|
+
1. Either create an account on RubyGems.org or use an existing account (username: `dennis_stage`, password: see
|
75
|
+
the password stored in Doppler's `RUBY_GEMS_PASSWORD`, under the `general` environment).
|
65
76
|
|
66
|
-
|
67
|
-
local gem installation directory (run `rvm gemdir` to find out):
|
77
|
+
2. Build Ruby code into a gem:
|
68
78
|
|
69
79
|
```shell
|
70
|
-
gem
|
80
|
+
gem build stage-ruby.gemspec
|
71
81
|
```
|
72
82
|
|
73
|
-
|
74
|
-
|
83
|
+
2. Push `stage-ruby` to RubyGems.org, where `{VERSION}` is the gem's version number (enter your username and password
|
84
|
+
when prompted):
|
75
85
|
|
86
|
+
```shell
|
87
|
+
gem push stage-ruby-{VERSION}.gem
|
76
88
|
```
|
89
|
+
|
90
|
+
## 2. Using `stage-ruby` Gem
|
91
|
+
|
92
|
+
When the `stage-ruby` gem is installed locally, add the following to your project's Gemfile, where `{VERSION}` is
|
93
|
+
the gem's version number, and `{GEM_DIR}` is your local gem installation directory (again, `rvm gemdir` to find out):
|
94
|
+
|
95
|
+
```ruby
|
96
|
+
gem 'stage-ruby', '~> {VERSION}', :path => '{GEM_DIR}'
|
97
|
+
```
|
98
|
+
|
99
|
+
To use the `stage-ruby` from RubyGems.org, add the following to your project's Gemfile, where `{VERSION}` is the gem's
|
100
|
+
version number:
|
101
|
+
|
102
|
+
```ruby
|
77
103
|
gem 'stage-ruby', '~> {VERSION}'
|
78
104
|
```
|
79
105
|
|
@@ -105,7 +131,8 @@ begin
|
|
105
131
|
new_user = api_instance.create_user(user_identifier, feature_identifier: 'BASIC_PLAN')
|
106
132
|
p "Created user: #{new_user}"
|
107
133
|
|
108
|
-
|
134
|
+
mark_accessed = true
|
135
|
+
result = api_instance.has_access(user_identifier, feature_identifier: 'BASIC_PLAN', mark_accessed)
|
109
136
|
p "User #{user_identifier} has access to plan: #{result}"
|
110
137
|
|
111
138
|
updated_user = api_instance.update_user_plan(user_identifier, feature_identifier: 'PRO_PLAN')
|
@@ -118,11 +145,14 @@ end
|
|
118
145
|
|
119
146
|
## 4. Documentation for API Endpoints
|
120
147
|
|
121
|
-
| Class | Method | HTTP request
|
122
|
-
|
123
|
-
| *Stage::StageApi* | [**create_user**](docs/StageApi.md#create_user) | **POST** /sdk-api/v1/users
|
124
|
-
| *Stage::StageApi* | [**
|
125
|
-
| *Stage::StageApi* | [**
|
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. |
|
126
156
|
|
127
157
|
## 5. Documentation for Models
|
128
158
|
|
@@ -130,8 +160,11 @@ end
|
|
130
160
|
- [Stage::AccessForm](docs/AccessForm.md)
|
131
161
|
- [Stage::ClientUserForm](docs/ClientUserForm.md)
|
132
162
|
- [Stage::ClientUserObjectForm](docs/ClientUserObjectForm.md)
|
163
|
+
- [Stage::FeatureObjectForm](docs/FeatureObjectForm.md)
|
133
164
|
- [Stage::Field](docs/Field.md)
|
165
|
+
- [Stage::PlanObjectForm](docs/PlanObjectForm.md)
|
134
166
|
- [Stage::StageError](docs/StageError.md)
|
167
|
+
- [Stage::StageUserObjectForm](docs/StageUserObjectForm.md)
|
135
168
|
|
136
169
|
## 6. Documentation for Authorization
|
137
170
|
|
@@ -140,4 +173,3 @@ end
|
|
140
173
|
- **Type**: API key
|
141
174
|
- **API key parameter name**: Authorization
|
142
175
|
- **Location**: HTTP header
|
143
|
-
|
@@ -5,9 +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** | [**StageUserObjectFormReq**](StageUserObjectFormReq.md) | | [optional]
|
8
9
|
**deleted** | **BOOLEAN** | A boolean value indicating whether the client user is deleted or not. | [optional]
|
9
10
|
**id** | **Integer** | The ID of the client user. | [optional]
|
10
11
|
**identifier** | **String** | A client user identifier. | [optional]
|
12
|
+
**organization_id** | **Integer** | The organization this user belongs to. | [optional]
|
11
13
|
**plan_id** | **Integer** | The plan to be assigned to the client user. | [optional]
|
12
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]
|
13
16
|
|
@@ -0,0 +1,11 @@
|
|
1
|
+
# Stage::FeatureObjectForm
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
Name | Type | Description | Notes
|
5
|
+
------------ | ------------- | ------------- | -------------
|
6
|
+
**description** | **String** | Feature description. | [optional]
|
7
|
+
**identifier** | **String** | Feature identifier. | [optional]
|
8
|
+
**limit** | **Integer** | Feature limit. | [optional]
|
9
|
+
**name** | **String** | Feature name. | [optional]
|
10
|
+
**order** | **Integer** | Feature order. | [optional]
|
11
|
+
|
@@ -0,0 +1,12 @@
|
|
1
|
+
# Stage::PlanObjectForm
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
Name | Type | Description | Notes
|
5
|
+
------------ | ------------- | ------------- | -------------
|
6
|
+
**description** | **String** | Plan description. | [optional]
|
7
|
+
**features** | [**Array<FeatureObjectForm>**](FeatureObjectForm.md) | Features associated to this plan. | [optional]
|
8
|
+
**identifier** | **String** | Plan identifier. | [optional]
|
9
|
+
**name** | **String** | Plan name. | [optional]
|
10
|
+
**order** | **Integer** | Plan order. | [optional]
|
11
|
+
**stripe_product_id** | **String** | Stripe product identifier. | [optional]
|
12
|
+
|
data/docs/StageApi.md
CHANGED
@@ -4,9 +4,70 @@ 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
|
-
[**
|
9
|
+
[**get_plans**](StageApi.md#get_plans) | **GET** /sdk-api/v1/plans | Gets all plans.
|
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.
|
12
|
+
[**update_user_plan**](StageApi.md#update_user_plan) | **PUT** /sdk-api/v1/users/{userIdentifier}/plans | Updates a user's plan.
|
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<String>**](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
|
+
|
10
71
|
|
11
72
|
# **create_user**
|
12
73
|
> ClientUserForm create_user(body)
|
@@ -23,6 +84,11 @@ Stage.configure do |config|
|
|
23
84
|
config.api_key['Authorization'] = 'YOUR API KEY'
|
24
85
|
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
25
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'
|
26
92
|
end
|
27
93
|
|
28
94
|
api_instance = Stage::StageApi.new
|
@@ -50,7 +116,7 @@ Name | Type | Description | Notes
|
|
50
116
|
|
51
117
|
### Authorization
|
52
118
|
|
53
|
-
[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)
|
54
120
|
|
55
121
|
### HTTP request headers
|
56
122
|
|
@@ -59,10 +125,61 @@ Name | Type | Description | Notes
|
|
59
125
|
|
60
126
|
|
61
127
|
|
128
|
+
# **get_plans**
|
129
|
+
> Array<PlanObjectForm> get_plans
|
130
|
+
|
131
|
+
Gets all plans.
|
132
|
+
|
133
|
+
### Example
|
134
|
+
```ruby
|
135
|
+
# load the gem
|
136
|
+
require 'stage-ruby'
|
137
|
+
# setup authorization
|
138
|
+
Stage.configure do |config|
|
139
|
+
# Configure API key authorization: stage-api-token
|
140
|
+
config.api_key['Authorization'] = 'YOUR API KEY'
|
141
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
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'
|
148
|
+
end
|
149
|
+
|
150
|
+
api_instance = Stage::StageApi.new
|
151
|
+
|
152
|
+
begin
|
153
|
+
#Gets all plans.
|
154
|
+
result = api_instance.get_plans
|
155
|
+
p result
|
156
|
+
rescue Stage::ApiError => e
|
157
|
+
puts "Exception when calling StageApi->get_plans: #{e}"
|
158
|
+
end
|
159
|
+
```
|
160
|
+
|
161
|
+
### Parameters
|
162
|
+
This endpoint does not need any parameter.
|
163
|
+
|
164
|
+
### Return type
|
165
|
+
|
166
|
+
[**Array<PlanObjectForm>**](PlanObjectForm.md)
|
167
|
+
|
168
|
+
### Authorization
|
169
|
+
|
170
|
+
[stage-api-token](../README.md#stage-api-token), [stage-read-only-api-token](../README.md#stage-read-only-api-token)
|
171
|
+
|
172
|
+
### HTTP request headers
|
173
|
+
|
174
|
+
- **Content-Type**: Not defined
|
175
|
+
- **Accept**: application/json
|
176
|
+
|
177
|
+
|
178
|
+
|
62
179
|
# **has_access**
|
63
180
|
> AccessForm has_access(identifiers, user_identifier)
|
64
181
|
|
65
|
-
Checks if a user has access to the identified
|
182
|
+
Checks if a user has access to the identified features.
|
66
183
|
|
67
184
|
### Example
|
68
185
|
```ruby
|
@@ -74,15 +191,20 @@ Stage.configure do |config|
|
|
74
191
|
config.api_key['Authorization'] = 'YOUR API KEY'
|
75
192
|
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
76
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'
|
77
199
|
end
|
78
200
|
|
79
201
|
api_instance = Stage::StageApi.new
|
80
|
-
identifiers = ['identifiers_example'] # Array<String> | identifiers
|
202
|
+
identifiers = ['identifiers_example'] # Array<String> | The identifiers of the features being accessed.
|
81
203
|
user_identifier = 'user_identifier_example' # String | The identifier of the user who is accessing the feature.
|
82
204
|
|
83
205
|
|
84
206
|
begin
|
85
|
-
#Checks if a user has access to the identified
|
207
|
+
#Checks if a user has access to the identified features.
|
86
208
|
result = api_instance.has_access(identifiers, user_identifier)
|
87
209
|
p result
|
88
210
|
rescue Stage::ApiError => e
|
@@ -94,7 +216,67 @@ end
|
|
94
216
|
|
95
217
|
Name | Type | Description | Notes
|
96
218
|
------------- | ------------- | ------------- | -------------
|
97
|
-
**identifiers** | [**Array<String>**](String.md)| identifiers |
|
219
|
+
**identifiers** | [**Array<String>**](String.md)| The identifiers of the features being accessed. |
|
220
|
+
**user_identifier** | **String**| The identifier of the user who is accessing the feature. |
|
221
|
+
|
222
|
+
### Return type
|
223
|
+
|
224
|
+
[**AccessForm**](AccessForm.md)
|
225
|
+
|
226
|
+
### Authorization
|
227
|
+
|
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<String>**](String.md)| The identifiers of the features being accessed. |
|
98
280
|
**user_identifier** | **String**| The identifier of the user who is accessing the feature. |
|
99
281
|
|
100
282
|
### Return type
|
@@ -103,7 +285,7 @@ Name | Type | Description | Notes
|
|
103
285
|
|
104
286
|
### Authorization
|
105
287
|
|
106
|
-
[stage-api-token](../README.md#stage-api-token)
|
288
|
+
[stage-api-token](../README.md#stage-api-token), [stage-read-only-api-token](../README.md#stage-read-only-api-token)
|
107
289
|
|
108
290
|
### HTTP request headers
|
109
291
|
|
@@ -115,7 +297,7 @@ Name | Type | Description | Notes
|
|
115
297
|
# **update_user_plan**
|
116
298
|
> ClientUserForm update_user_plan(bodyuser_identifier)
|
117
299
|
|
118
|
-
Updates a user's plan
|
300
|
+
Updates a user's plan.
|
119
301
|
|
120
302
|
### Example
|
121
303
|
```ruby
|
@@ -127,6 +309,11 @@ Stage.configure do |config|
|
|
127
309
|
config.api_key['Authorization'] = 'YOUR API KEY'
|
128
310
|
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
129
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'
|
130
317
|
end
|
131
318
|
|
132
319
|
api_instance = Stage::StageApi.new
|
@@ -135,7 +322,7 @@ user_identifier = 'user_identifier_example' # String | The identifier of the use
|
|
135
322
|
|
136
323
|
|
137
324
|
begin
|
138
|
-
#Updates a user's plan
|
325
|
+
#Updates a user's plan.
|
139
326
|
result = api_instance.update_user_plan(bodyuser_identifier)
|
140
327
|
p result
|
141
328
|
rescue Stage::ApiError => e
|
@@ -147,7 +334,7 @@ end
|
|
147
334
|
|
148
335
|
Name | Type | Description | Notes
|
149
336
|
------------- | ------------- | ------------- | -------------
|
150
|
-
**body** | [**ClientUserForm**](ClientUserForm.md)| The payload containing the information to update a user's plan. Only identifier and planIdentifier fields are required. |
|
337
|
+
**body** | [**ClientUserForm**](ClientUserForm.md)| The payload containing the information to update a user's plan. Only identifier and planIdentifier fields are required. |
|
151
338
|
**user_identifier** | **String**| The identifier of the user. |
|
152
339
|
|
153
340
|
### Return type
|
@@ -156,7 +343,7 @@ Name | Type | Description | Notes
|
|
156
343
|
|
157
344
|
### Authorization
|
158
345
|
|
159
|
-
[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)
|
160
347
|
|
161
348
|
### HTTP request headers
|
162
349
|
|
@@ -0,0 +1,17 @@
|
|
1
|
+
# Stage::StageUserObjectForm
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
Name | Type | Description | Notes
|
5
|
+
------------ | ------------- | ------------- | -------------
|
6
|
+
**arena_id** | **Integer** | | [optional]
|
7
|
+
**created_at** | **DateTime** | | [optional]
|
8
|
+
**deleted** | **BOOLEAN** | | [optional]
|
9
|
+
**email** | **String** | | [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]
|
15
|
+
**password** | **String** | | [optional]
|
16
|
+
**updated_at** | **DateTime** | | [optional]
|
17
|
+
|
data/lib/.DS_Store
ADDED
Binary file
|
Binary file
|