subskribe_dev 1.0.0

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 ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: a702f6d2c6d74af6da3e64502de38bebc18f4aa3bb2ca2db7bfcc53375bbb78f
4
+ data.tar.gz: 23a0671388b015b9ea71580204b5bee16138ea877e58c90771f83ad4ef7fdafe
5
+ SHA512:
6
+ metadata.gz: 84ce209fcabdc86bc16b421e75aa77027886422da0725f5b9145d0e205cfa332e5495657d361a94e2bd7f4443c28c5fe6c1b7c2757161484802bbbb096b40a83
7
+ data.tar.gz: 83891da6deaebf5908afe74d4866541114db4f76fb066487f79299bbbd2d4af6987c65c9856d6012213288e2ade06d1b0ca77494a9f3319417cd78d037ed65af
data/Gemfile ADDED
@@ -0,0 +1,8 @@
1
+ source 'https://rubygems.org'
2
+
3
+ gemspec
4
+
5
+ group :development, :test do
6
+ gem 'rake', '~> 12.3.3'
7
+ gem 'swagger_client', '~> 1.0.0'
8
+ end
data/README.md ADDED
@@ -0,0 +1,107 @@
1
+ # swagger_client
2
+
3
+ SwaggerClient - the Ruby gem for the Subskribe API
4
+
5
+ No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
6
+
7
+ This SDK is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project:
8
+
9
+ - API version: 1.0.0
10
+ - Package version: 1.0.0
11
+ - Build package: io.swagger.codegen.languages.RubyClientCodegen
12
+
13
+ ## Installation
14
+
15
+ ### Build a gem
16
+
17
+ To build the Ruby code into a gem:
18
+
19
+ ```shell
20
+ gem build swagger_client.gemspec
21
+ ```
22
+
23
+ Then either install the gem locally:
24
+
25
+ ```shell
26
+ gem install ./swagger_client-1.0.0.gem
27
+ ```
28
+ (for development, run `gem install --dev ./swagger_client-1.0.0.gem` to install the development dependencies)
29
+
30
+ or publish the gem to a gem hosting service, e.g. [RubyGems](https://rubygems.org/).
31
+
32
+ Finally add this to the Gemfile:
33
+
34
+ gem 'swagger_client', '~> 1.0.0'
35
+
36
+ ### Install from Git
37
+
38
+ If the Ruby gem is hosted at a git repository: https://github.com/GIT_USER_ID/GIT_REPO_ID, then add the following in the Gemfile:
39
+
40
+ gem 'swagger_client', :git => 'https://github.com/GIT_USER_ID/GIT_REPO_ID.git'
41
+
42
+ ### Include the Ruby code directly
43
+
44
+ Include the Ruby code directly using `-I` as follows:
45
+
46
+ ```shell
47
+ ruby -Ilib script.rb
48
+ ```
49
+
50
+ ## Getting Started
51
+
52
+ Please follow the [installation](#installation) procedure and then run the following code:
53
+ ```ruby
54
+ # Load the gem
55
+ require 'swagger_client'
56
+
57
+ # Setup authorization
58
+ SwaggerClient.configure do |config|
59
+ # Configure API key authorization: ApiKeyAuth
60
+ config.api_key['X-API-Key'] = 'YOUR API KEY'
61
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
62
+ #config.api_key_prefix['X-API-Key'] = 'Bearer'
63
+ end
64
+
65
+ api_instance = SwaggerClient::SettingsApi.new
66
+
67
+ id = 'id_example' # String |
68
+
69
+
70
+ begin
71
+ #Activate unit of measure
72
+ api_instance.activate_unit_of_measure(id)
73
+ rescue SwaggerClient::ApiError => e
74
+ puts "Exception when calling SettingsApi->activate_unit_of_measure: #{e}"
75
+ end
76
+
77
+ ```
78
+
79
+ ## Documentation for API Endpoints
80
+
81
+ All URIs are relative to *https://api.dev2.subskribe.net*
82
+
83
+ Class | Method | HTTP request | Description
84
+ ------------ | ------------- | ------------- | -------------
85
+ *SwaggerClient::SettingsApi* | [**activate_unit_of_measure**](docs/SettingsApi.md#activate_unit_of_measure) | **POST** /unitsOfMeasure/{id}/activate | Activate unit of measure
86
+ *SwaggerClient::SettingsApi* | [**add_unit_of_measure**](docs/SettingsApi.md#add_unit_of_measure) | **POST** /unitsOfMeasure | Add unit of measure
87
+ *SwaggerClient::SettingsApi* | [**delete_unit_of_measure**](docs/SettingsApi.md#delete_unit_of_measure) | **DELETE** /unitsOfMeasure/{id} | Delete unit of measure
88
+ *SwaggerClient::SettingsApi* | [**deprecate_unit_of_measure**](docs/SettingsApi.md#deprecate_unit_of_measure) | **POST** /unitsOfMeasure/{id}/deprecate | Deprecate unit of measure
89
+ *SwaggerClient::SettingsApi* | [**get_units_of_measure**](docs/SettingsApi.md#get_units_of_measure) | **GET** /unitsOfMeasure | Get units of measure
90
+ *SwaggerClient::SettingsApi* | [**update_unit_of_measure**](docs/SettingsApi.md#update_unit_of_measure) | **PUT** /unitsOfMeasure/{id} | Update unit of measure
91
+
92
+
93
+ ## Documentation for Models
94
+
95
+ - [SwaggerClient::UnitOfMeasureJson](docs/UnitOfMeasureJson.md)
96
+ - [SwaggerClient::UnitOfMeasurePaginationResponseJson](docs/UnitOfMeasurePaginationResponseJson.md)
97
+
98
+
99
+ ## Documentation for Authorization
100
+
101
+
102
+ ### ApiKeyAuth
103
+
104
+ - **Type**: API key
105
+ - **API key parameter name**: X-API-Key
106
+ - **Location**: HTTP header
107
+
data/Rakefile ADDED
@@ -0,0 +1,8 @@
1
+ begin
2
+ require 'rspec/core/rake_task'
3
+
4
+ RSpec::Core::RakeTask.new(:spec)
5
+ task default: :spec
6
+ rescue LoadError
7
+ # no rspec available
8
+ end
@@ -0,0 +1,344 @@
1
+ # SwaggerClient::SettingsApi
2
+
3
+ All URIs are relative to *https://api.dev2.subskribe.net*
4
+
5
+ Method | HTTP request | Description
6
+ ------------- | ------------- | -------------
7
+ [**activate_unit_of_measure**](SettingsApi.md#activate_unit_of_measure) | **POST** /unitsOfMeasure/{id}/activate | Activate unit of measure
8
+ [**add_unit_of_measure**](SettingsApi.md#add_unit_of_measure) | **POST** /unitsOfMeasure | Add unit of measure
9
+ [**delete_unit_of_measure**](SettingsApi.md#delete_unit_of_measure) | **DELETE** /unitsOfMeasure/{id} | Delete unit of measure
10
+ [**deprecate_unit_of_measure**](SettingsApi.md#deprecate_unit_of_measure) | **POST** /unitsOfMeasure/{id}/deprecate | Deprecate unit of measure
11
+ [**get_units_of_measure**](SettingsApi.md#get_units_of_measure) | **GET** /unitsOfMeasure | Get units of measure
12
+ [**update_unit_of_measure**](SettingsApi.md#update_unit_of_measure) | **PUT** /unitsOfMeasure/{id} | Update unit of measure
13
+
14
+
15
+ # **activate_unit_of_measure**
16
+ > activate_unit_of_measure(id)
17
+
18
+ Activate unit of measure
19
+
20
+ Activates the specified unit of measure making it available to be attached to charges
21
+
22
+ ### Example
23
+ ```ruby
24
+ # load the gem
25
+ require 'swagger_client'
26
+ # setup authorization
27
+ SwaggerClient.configure do |config|
28
+ # Configure API key authorization: ApiKeyAuth
29
+ config.api_key['X-API-Key'] = 'YOUR API KEY'
30
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
31
+ #config.api_key_prefix['X-API-Key'] = 'Bearer'
32
+ end
33
+
34
+ api_instance = SwaggerClient::SettingsApi.new
35
+
36
+ id = 'id_example' # String |
37
+
38
+
39
+ begin
40
+ #Activate unit of measure
41
+ api_instance.activate_unit_of_measure(id)
42
+ rescue SwaggerClient::ApiError => e
43
+ puts "Exception when calling SettingsApi->activate_unit_of_measure: #{e}"
44
+ end
45
+ ```
46
+
47
+ ### Parameters
48
+
49
+ Name | Type | Description | Notes
50
+ ------------- | ------------- | ------------- | -------------
51
+ **id** | [**String**](.md)| |
52
+
53
+ ### Return type
54
+
55
+ nil (empty response body)
56
+
57
+ ### Authorization
58
+
59
+ [ApiKeyAuth](../README.md#ApiKeyAuth)
60
+
61
+ ### HTTP request headers
62
+
63
+ - **Content-Type**: Not defined
64
+ - **Accept**: application/json
65
+
66
+
67
+
68
+ # **add_unit_of_measure**
69
+ > UnitOfMeasureJson add_unit_of_measure(opts)
70
+
71
+ Add unit of measure
72
+
73
+ Add a new instance of unit of measure as specified by the input
74
+
75
+ ### Example
76
+ ```ruby
77
+ # load the gem
78
+ require 'swagger_client'
79
+ # setup authorization
80
+ SwaggerClient.configure do |config|
81
+ # Configure API key authorization: ApiKeyAuth
82
+ config.api_key['X-API-Key'] = 'YOUR API KEY'
83
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
84
+ #config.api_key_prefix['X-API-Key'] = 'Bearer'
85
+ end
86
+
87
+ api_instance = SwaggerClient::SettingsApi.new
88
+
89
+ opts = {
90
+ body: SwaggerClient::UnitOfMeasureJson.new # UnitOfMeasureJson |
91
+ }
92
+
93
+ begin
94
+ #Add unit of measure
95
+ result = api_instance.add_unit_of_measure(opts)
96
+ p result
97
+ rescue SwaggerClient::ApiError => e
98
+ puts "Exception when calling SettingsApi->add_unit_of_measure: #{e}"
99
+ end
100
+ ```
101
+
102
+ ### Parameters
103
+
104
+ Name | Type | Description | Notes
105
+ ------------- | ------------- | ------------- | -------------
106
+ **body** | [**UnitOfMeasureJson**](UnitOfMeasureJson.md)| | [optional]
107
+
108
+ ### Return type
109
+
110
+ [**UnitOfMeasureJson**](UnitOfMeasureJson.md)
111
+
112
+ ### Authorization
113
+
114
+ [ApiKeyAuth](../README.md#ApiKeyAuth)
115
+
116
+ ### HTTP request headers
117
+
118
+ - **Content-Type**: application/json
119
+ - **Accept**: application/json
120
+
121
+
122
+
123
+ # **delete_unit_of_measure**
124
+ > UnitOfMeasureJson delete_unit_of_measure(id)
125
+
126
+ Delete unit of measure
127
+
128
+ Delete the unit of measure by Id provided. Returns the deleted unit of measure object if successful.
129
+
130
+ ### Example
131
+ ```ruby
132
+ # load the gem
133
+ require 'swagger_client'
134
+ # setup authorization
135
+ SwaggerClient.configure do |config|
136
+ # Configure API key authorization: ApiKeyAuth
137
+ config.api_key['X-API-Key'] = 'YOUR API KEY'
138
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
139
+ #config.api_key_prefix['X-API-Key'] = 'Bearer'
140
+ end
141
+
142
+ api_instance = SwaggerClient::SettingsApi.new
143
+
144
+ id = 'id_example' # String |
145
+
146
+
147
+ begin
148
+ #Delete unit of measure
149
+ result = api_instance.delete_unit_of_measure(id)
150
+ p result
151
+ rescue SwaggerClient::ApiError => e
152
+ puts "Exception when calling SettingsApi->delete_unit_of_measure: #{e}"
153
+ end
154
+ ```
155
+
156
+ ### Parameters
157
+
158
+ Name | Type | Description | Notes
159
+ ------------- | ------------- | ------------- | -------------
160
+ **id** | [**String**](.md)| |
161
+
162
+ ### Return type
163
+
164
+ [**UnitOfMeasureJson**](UnitOfMeasureJson.md)
165
+
166
+ ### Authorization
167
+
168
+ [ApiKeyAuth](../README.md#ApiKeyAuth)
169
+
170
+ ### HTTP request headers
171
+
172
+ - **Content-Type**: Not defined
173
+ - **Accept**: application/json
174
+
175
+
176
+
177
+ # **deprecate_unit_of_measure**
178
+ > deprecate_unit_of_measure(id)
179
+
180
+ Deprecate unit of measure
181
+
182
+ Deprecates the specified unit of measure making it unavailable to be attached to charges going forward
183
+
184
+ ### Example
185
+ ```ruby
186
+ # load the gem
187
+ require 'swagger_client'
188
+ # setup authorization
189
+ SwaggerClient.configure do |config|
190
+ # Configure API key authorization: ApiKeyAuth
191
+ config.api_key['X-API-Key'] = 'YOUR API KEY'
192
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
193
+ #config.api_key_prefix['X-API-Key'] = 'Bearer'
194
+ end
195
+
196
+ api_instance = SwaggerClient::SettingsApi.new
197
+
198
+ id = 'id_example' # String |
199
+
200
+
201
+ begin
202
+ #Deprecate unit of measure
203
+ api_instance.deprecate_unit_of_measure(id)
204
+ rescue SwaggerClient::ApiError => e
205
+ puts "Exception when calling SettingsApi->deprecate_unit_of_measure: #{e}"
206
+ end
207
+ ```
208
+
209
+ ### Parameters
210
+
211
+ Name | Type | Description | Notes
212
+ ------------- | ------------- | ------------- | -------------
213
+ **id** | [**String**](.md)| |
214
+
215
+ ### Return type
216
+
217
+ nil (empty response body)
218
+
219
+ ### Authorization
220
+
221
+ [ApiKeyAuth](../README.md#ApiKeyAuth)
222
+
223
+ ### HTTP request headers
224
+
225
+ - **Content-Type**: Not defined
226
+ - **Accept**: application/json
227
+
228
+
229
+
230
+ # **get_units_of_measure**
231
+ > UnitOfMeasurePaginationResponseJson get_units_of_measure(opts)
232
+
233
+ Get units of measure
234
+
235
+ Returns a paginated list of units of measure
236
+
237
+ ### Example
238
+ ```ruby
239
+ # load the gem
240
+ require 'swagger_client'
241
+ # setup authorization
242
+ SwaggerClient.configure do |config|
243
+ # Configure API key authorization: ApiKeyAuth
244
+ config.api_key['X-API-Key'] = 'YOUR API KEY'
245
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
246
+ #config.api_key_prefix['X-API-Key'] = 'Bearer'
247
+ end
248
+
249
+ api_instance = SwaggerClient::SettingsApi.new
250
+
251
+ opts = {
252
+ cursor: 'cursor_example', # String |
253
+ limit: 56 # Integer |
254
+ }
255
+
256
+ begin
257
+ #Get units of measure
258
+ result = api_instance.get_units_of_measure(opts)
259
+ p result
260
+ rescue SwaggerClient::ApiError => e
261
+ puts "Exception when calling SettingsApi->get_units_of_measure: #{e}"
262
+ end
263
+ ```
264
+
265
+ ### Parameters
266
+
267
+ Name | Type | Description | Notes
268
+ ------------- | ------------- | ------------- | -------------
269
+ **cursor** | [**String**](.md)| | [optional]
270
+ **limit** | **Integer**| | [optional]
271
+
272
+ ### Return type
273
+
274
+ [**UnitOfMeasurePaginationResponseJson**](UnitOfMeasurePaginationResponseJson.md)
275
+
276
+ ### Authorization
277
+
278
+ [ApiKeyAuth](../README.md#ApiKeyAuth)
279
+
280
+ ### HTTP request headers
281
+
282
+ - **Content-Type**: Not defined
283
+ - **Accept**: application/json
284
+
285
+
286
+
287
+ # **update_unit_of_measure**
288
+ > UnitOfMeasureJson update_unit_of_measure(id, opts)
289
+
290
+ Update unit of measure
291
+
292
+ Update the unit of measure by Id provided.
293
+
294
+ ### Example
295
+ ```ruby
296
+ # load the gem
297
+ require 'swagger_client'
298
+ # setup authorization
299
+ SwaggerClient.configure do |config|
300
+ # Configure API key authorization: ApiKeyAuth
301
+ config.api_key['X-API-Key'] = 'YOUR API KEY'
302
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
303
+ #config.api_key_prefix['X-API-Key'] = 'Bearer'
304
+ end
305
+
306
+ api_instance = SwaggerClient::SettingsApi.new
307
+
308
+ id = 'id_example' # String |
309
+
310
+ opts = {
311
+ body: SwaggerClient::UnitOfMeasureJson.new # UnitOfMeasureJson |
312
+ }
313
+
314
+ begin
315
+ #Update unit of measure
316
+ result = api_instance.update_unit_of_measure(id, opts)
317
+ p result
318
+ rescue SwaggerClient::ApiError => e
319
+ puts "Exception when calling SettingsApi->update_unit_of_measure: #{e}"
320
+ end
321
+ ```
322
+
323
+ ### Parameters
324
+
325
+ Name | Type | Description | Notes
326
+ ------------- | ------------- | ------------- | -------------
327
+ **id** | [**String**](.md)| |
328
+ **body** | [**UnitOfMeasureJson**](UnitOfMeasureJson.md)| | [optional]
329
+
330
+ ### Return type
331
+
332
+ [**UnitOfMeasureJson**](UnitOfMeasureJson.md)
333
+
334
+ ### Authorization
335
+
336
+ [ApiKeyAuth](../README.md#ApiKeyAuth)
337
+
338
+ ### HTTP request headers
339
+
340
+ - **Content-Type**: Not defined
341
+ - **Accept**: application/json
342
+
343
+
344
+
@@ -0,0 +1,11 @@
1
+ # SwaggerClient::UnitOfMeasureJson
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **id** | **String** | | [optional]
7
+ **name** | **String** | | [optional]
8
+ **description** | **String** | | [optional]
9
+ **status** | **String** | |
10
+
11
+
@@ -0,0 +1,10 @@
1
+ # SwaggerClient::UnitOfMeasurePaginationResponseJson
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **data** | [**Array<UnitOfMeasureJson>**](UnitOfMeasureJson.md) | | [optional]
7
+ **num_elements** | **Integer** | | [optional]
8
+ **next_cursor** | **String** | | [optional]
9
+
10
+
data/git_push.sh ADDED
@@ -0,0 +1,55 @@
1
+ #!/bin/sh
2
+ #
3
+ # Generated by: https://github.com/swagger-api/swagger-codegen.git
4
+ #
5
+ # ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/
6
+ #
7
+ # Usage example: /bin/sh ./git_push.sh wing328 swagger-petstore-perl "minor update"
8
+
9
+ git_user_id=$1
10
+ git_repo_id=$2
11
+ release_note=$3
12
+
13
+ if [ "$git_user_id" = "" ]; then
14
+ git_user_id="GIT_USER_ID"
15
+ echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id"
16
+ fi
17
+
18
+ if [ "$git_repo_id" = "" ]; then
19
+ git_repo_id="GIT_REPO_ID"
20
+ echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id"
21
+ fi
22
+
23
+ if [ "$release_note" = "" ]; then
24
+ release_note="Minor update"
25
+ echo "[INFO] No command line input provided. Set \$release_note to $release_note"
26
+ fi
27
+
28
+ # Initialize the local directory as a Git repository
29
+ git init
30
+
31
+ # Adds the files in the local repository and stages them for commit.
32
+ git add .
33
+
34
+ # Commits the tracked changes and prepares them to be pushed to a remote repository.
35
+ git commit -m "$release_note"
36
+
37
+ # Sets the new remote
38
+ git_remote=`git remote`
39
+ if [ "$git_remote" = "" ]; then # git remote not defined
40
+
41
+ if [ "$GIT_TOKEN" = "" ]; then
42
+ echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment."
43
+ git remote add origin https://github.com/${git_user_id}/${git_repo_id}.git
44
+ else
45
+ git remote add origin https://${git_user_id}:${GIT_TOKEN}@github.com/${git_user_id}/${git_repo_id}.git
46
+ fi
47
+
48
+ fi
49
+
50
+ git pull origin master
51
+
52
+ # Pushes (Forces) the changes in the local repository up to the remote repository
53
+ echo "Git pushing to https://github.com/${git_user_id}/${git_repo_id}.git"
54
+ git push origin master 2>&1 | grep -v 'To https'
55
+