subskribe_dev 1.0.0 → 1.1.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 +4 -4
- data/Gemfile +0 -1
- data/README.md +20 -20
- data/docs/SettingsApi.md +27 -27
- data/docs/UnitOfMeasureJson.md +1 -1
- data/docs/UnitOfMeasurePaginationResponseJson.md +1 -1
- data/lib/{swagger_client → subskribe_dev}/api/settings_api.rb +1 -1
- data/lib/{swagger_client → subskribe_dev}/api_client.rb +2 -2
- data/lib/{swagger_client → subskribe_dev}/api_error.rb +1 -1
- data/lib/{swagger_client → subskribe_dev}/configuration.rb +1 -1
- data/lib/{swagger_client → subskribe_dev}/models/unit_of_measure_json.rb +2 -2
- data/lib/{swagger_client → subskribe_dev}/models/unit_of_measure_pagination_response_json.rb +2 -2
- data/lib/{swagger_client → subskribe_dev}/version.rb +2 -2
- data/lib/{swagger_client.rb → subskribe_dev.rb} +9 -9
- data/spec/api/settings_api_spec.rb +3 -3
- data/spec/api_client_spec.rb +31 -31
- data/spec/configuration_spec.rb +3 -3
- data/spec/models/unit_of_measure_json_spec.rb +3 -3
- data/spec/models/unit_of_measure_pagination_response_json_spec.rb +3 -3
- data/spec/spec_helper.rb +1 -1
- data/{swagger_client.gemspec → subskribe_dev.gemspec} +6 -6
- metadata +14 -16
- data/swagger_client-1.0.0.gem +0 -0
- data/test1.rb +0 -24
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c09af78f048850383713411a64e9ccbcb3d0c157b122e561b0ae7c1f79180939
|
4
|
+
data.tar.gz: 8735732838581a6ed5d1700fc9c3d4aa71c9cb60b3daedc2142eebe641a33a9f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3374679fdff15521a255557f5531f8e8f2294329d5f9728d0a7b42709084b5eafb9107ad79930b6a99b8cd62df7a6449dd9efb10713b588c7fdc2405bc5f108e
|
7
|
+
data.tar.gz: 43712caa4ce78ad9f57088ea52f3a90628b9b7dbd7a76b28920edbcde6ca4a3a6329f2872e6313e40d93a339be9a1ae87f2b90c0bc041f7ccdb87f3f26f37e29
|
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -1,13 +1,13 @@
|
|
1
|
-
#
|
1
|
+
# subskribe_dev
|
2
2
|
|
3
|
-
|
3
|
+
SubskribeDevClient - the Ruby gem for the Subskribe API
|
4
4
|
|
5
5
|
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
|
6
6
|
|
7
7
|
This SDK is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project:
|
8
8
|
|
9
9
|
- API version: 1.0.0
|
10
|
-
- Package version: 1.
|
10
|
+
- Package version: 1.1.0
|
11
11
|
- Build package: io.swagger.codegen.languages.RubyClientCodegen
|
12
12
|
|
13
13
|
## Installation
|
@@ -17,27 +17,27 @@ This SDK is automatically generated by the [Swagger Codegen](https://github.com/
|
|
17
17
|
To build the Ruby code into a gem:
|
18
18
|
|
19
19
|
```shell
|
20
|
-
gem build
|
20
|
+
gem build subskribe_dev.gemspec
|
21
21
|
```
|
22
22
|
|
23
23
|
Then either install the gem locally:
|
24
24
|
|
25
25
|
```shell
|
26
|
-
gem install ./
|
26
|
+
gem install ./subskribe_dev-1.1.0.gem
|
27
27
|
```
|
28
|
-
(for development, run `gem install --dev ./
|
28
|
+
(for development, run `gem install --dev ./subskribe_dev-1.1.0.gem` to install the development dependencies)
|
29
29
|
|
30
30
|
or publish the gem to a gem hosting service, e.g. [RubyGems](https://rubygems.org/).
|
31
31
|
|
32
32
|
Finally add this to the Gemfile:
|
33
33
|
|
34
|
-
gem '
|
34
|
+
gem 'subskribe_dev', '~> 1.1.0'
|
35
35
|
|
36
36
|
### Install from Git
|
37
37
|
|
38
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
39
|
|
40
|
-
gem '
|
40
|
+
gem 'subskribe_dev', :git => 'https://github.com/GIT_USER_ID/GIT_REPO_ID.git'
|
41
41
|
|
42
42
|
### Include the Ruby code directly
|
43
43
|
|
@@ -52,17 +52,17 @@ ruby -Ilib script.rb
|
|
52
52
|
Please follow the [installation](#installation) procedure and then run the following code:
|
53
53
|
```ruby
|
54
54
|
# Load the gem
|
55
|
-
require '
|
55
|
+
require 'subskribe_dev'
|
56
56
|
|
57
57
|
# Setup authorization
|
58
|
-
|
58
|
+
SubskribeDevClient.configure do |config|
|
59
59
|
# Configure API key authorization: ApiKeyAuth
|
60
60
|
config.api_key['X-API-Key'] = 'YOUR API KEY'
|
61
61
|
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
62
62
|
#config.api_key_prefix['X-API-Key'] = 'Bearer'
|
63
63
|
end
|
64
64
|
|
65
|
-
api_instance =
|
65
|
+
api_instance = SubskribeDevClient::SettingsApi.new
|
66
66
|
|
67
67
|
id = 'id_example' # String |
|
68
68
|
|
@@ -70,7 +70,7 @@ id = 'id_example' # String |
|
|
70
70
|
begin
|
71
71
|
#Activate unit of measure
|
72
72
|
api_instance.activate_unit_of_measure(id)
|
73
|
-
rescue
|
73
|
+
rescue SubskribeDevClient::ApiError => e
|
74
74
|
puts "Exception when calling SettingsApi->activate_unit_of_measure: #{e}"
|
75
75
|
end
|
76
76
|
|
@@ -82,18 +82,18 @@ All URIs are relative to *https://api.dev2.subskribe.net*
|
|
82
82
|
|
83
83
|
Class | Method | HTTP request | Description
|
84
84
|
------------ | ------------- | ------------- | -------------
|
85
|
-
*
|
86
|
-
*
|
87
|
-
*
|
88
|
-
*
|
89
|
-
*
|
90
|
-
*
|
85
|
+
*SubskribeDevClient::SettingsApi* | [**activate_unit_of_measure**](docs/SettingsApi.md#activate_unit_of_measure) | **POST** /unitsOfMeasure/{id}/activate | Activate unit of measure
|
86
|
+
*SubskribeDevClient::SettingsApi* | [**add_unit_of_measure**](docs/SettingsApi.md#add_unit_of_measure) | **POST** /unitsOfMeasure | Add unit of measure
|
87
|
+
*SubskribeDevClient::SettingsApi* | [**delete_unit_of_measure**](docs/SettingsApi.md#delete_unit_of_measure) | **DELETE** /unitsOfMeasure/{id} | Delete unit of measure
|
88
|
+
*SubskribeDevClient::SettingsApi* | [**deprecate_unit_of_measure**](docs/SettingsApi.md#deprecate_unit_of_measure) | **POST** /unitsOfMeasure/{id}/deprecate | Deprecate unit of measure
|
89
|
+
*SubskribeDevClient::SettingsApi* | [**get_units_of_measure**](docs/SettingsApi.md#get_units_of_measure) | **GET** /unitsOfMeasure | Get units of measure
|
90
|
+
*SubskribeDevClient::SettingsApi* | [**update_unit_of_measure**](docs/SettingsApi.md#update_unit_of_measure) | **PUT** /unitsOfMeasure/{id} | Update unit of measure
|
91
91
|
|
92
92
|
|
93
93
|
## Documentation for Models
|
94
94
|
|
95
|
-
- [
|
96
|
-
- [
|
95
|
+
- [SubskribeDevClient::UnitOfMeasureJson](docs/UnitOfMeasureJson.md)
|
96
|
+
- [SubskribeDevClient::UnitOfMeasurePaginationResponseJson](docs/UnitOfMeasurePaginationResponseJson.md)
|
97
97
|
|
98
98
|
|
99
99
|
## Documentation for Authorization
|
data/docs/SettingsApi.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
#
|
1
|
+
# SubskribeDevClient::SettingsApi
|
2
2
|
|
3
3
|
All URIs are relative to *https://api.dev2.subskribe.net*
|
4
4
|
|
@@ -22,16 +22,16 @@ Activates the specified unit of measure making it available to be attached to ch
|
|
22
22
|
### Example
|
23
23
|
```ruby
|
24
24
|
# load the gem
|
25
|
-
require '
|
25
|
+
require 'subskribe_dev'
|
26
26
|
# setup authorization
|
27
|
-
|
27
|
+
SubskribeDevClient.configure do |config|
|
28
28
|
# Configure API key authorization: ApiKeyAuth
|
29
29
|
config.api_key['X-API-Key'] = 'YOUR API KEY'
|
30
30
|
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
31
31
|
#config.api_key_prefix['X-API-Key'] = 'Bearer'
|
32
32
|
end
|
33
33
|
|
34
|
-
api_instance =
|
34
|
+
api_instance = SubskribeDevClient::SettingsApi.new
|
35
35
|
|
36
36
|
id = 'id_example' # String |
|
37
37
|
|
@@ -39,7 +39,7 @@ id = 'id_example' # String |
|
|
39
39
|
begin
|
40
40
|
#Activate unit of measure
|
41
41
|
api_instance.activate_unit_of_measure(id)
|
42
|
-
rescue
|
42
|
+
rescue SubskribeDevClient::ApiError => e
|
43
43
|
puts "Exception when calling SettingsApi->activate_unit_of_measure: #{e}"
|
44
44
|
end
|
45
45
|
```
|
@@ -75,26 +75,26 @@ Add a new instance of unit of measure as specified by the input
|
|
75
75
|
### Example
|
76
76
|
```ruby
|
77
77
|
# load the gem
|
78
|
-
require '
|
78
|
+
require 'subskribe_dev'
|
79
79
|
# setup authorization
|
80
|
-
|
80
|
+
SubskribeDevClient.configure do |config|
|
81
81
|
# Configure API key authorization: ApiKeyAuth
|
82
82
|
config.api_key['X-API-Key'] = 'YOUR API KEY'
|
83
83
|
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
84
84
|
#config.api_key_prefix['X-API-Key'] = 'Bearer'
|
85
85
|
end
|
86
86
|
|
87
|
-
api_instance =
|
87
|
+
api_instance = SubskribeDevClient::SettingsApi.new
|
88
88
|
|
89
89
|
opts = {
|
90
|
-
body:
|
90
|
+
body: SubskribeDevClient::UnitOfMeasureJson.new # UnitOfMeasureJson |
|
91
91
|
}
|
92
92
|
|
93
93
|
begin
|
94
94
|
#Add unit of measure
|
95
95
|
result = api_instance.add_unit_of_measure(opts)
|
96
96
|
p result
|
97
|
-
rescue
|
97
|
+
rescue SubskribeDevClient::ApiError => e
|
98
98
|
puts "Exception when calling SettingsApi->add_unit_of_measure: #{e}"
|
99
99
|
end
|
100
100
|
```
|
@@ -130,16 +130,16 @@ Delete the unit of measure by Id provided. Returns the deleted unit of measure o
|
|
130
130
|
### Example
|
131
131
|
```ruby
|
132
132
|
# load the gem
|
133
|
-
require '
|
133
|
+
require 'subskribe_dev'
|
134
134
|
# setup authorization
|
135
|
-
|
135
|
+
SubskribeDevClient.configure do |config|
|
136
136
|
# Configure API key authorization: ApiKeyAuth
|
137
137
|
config.api_key['X-API-Key'] = 'YOUR API KEY'
|
138
138
|
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
139
139
|
#config.api_key_prefix['X-API-Key'] = 'Bearer'
|
140
140
|
end
|
141
141
|
|
142
|
-
api_instance =
|
142
|
+
api_instance = SubskribeDevClient::SettingsApi.new
|
143
143
|
|
144
144
|
id = 'id_example' # String |
|
145
145
|
|
@@ -148,7 +148,7 @@ begin
|
|
148
148
|
#Delete unit of measure
|
149
149
|
result = api_instance.delete_unit_of_measure(id)
|
150
150
|
p result
|
151
|
-
rescue
|
151
|
+
rescue SubskribeDevClient::ApiError => e
|
152
152
|
puts "Exception when calling SettingsApi->delete_unit_of_measure: #{e}"
|
153
153
|
end
|
154
154
|
```
|
@@ -184,16 +184,16 @@ Deprecates the specified unit of measure making it unavailable to be attached to
|
|
184
184
|
### Example
|
185
185
|
```ruby
|
186
186
|
# load the gem
|
187
|
-
require '
|
187
|
+
require 'subskribe_dev'
|
188
188
|
# setup authorization
|
189
|
-
|
189
|
+
SubskribeDevClient.configure do |config|
|
190
190
|
# Configure API key authorization: ApiKeyAuth
|
191
191
|
config.api_key['X-API-Key'] = 'YOUR API KEY'
|
192
192
|
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
193
193
|
#config.api_key_prefix['X-API-Key'] = 'Bearer'
|
194
194
|
end
|
195
195
|
|
196
|
-
api_instance =
|
196
|
+
api_instance = SubskribeDevClient::SettingsApi.new
|
197
197
|
|
198
198
|
id = 'id_example' # String |
|
199
199
|
|
@@ -201,7 +201,7 @@ id = 'id_example' # String |
|
|
201
201
|
begin
|
202
202
|
#Deprecate unit of measure
|
203
203
|
api_instance.deprecate_unit_of_measure(id)
|
204
|
-
rescue
|
204
|
+
rescue SubskribeDevClient::ApiError => e
|
205
205
|
puts "Exception when calling SettingsApi->deprecate_unit_of_measure: #{e}"
|
206
206
|
end
|
207
207
|
```
|
@@ -237,16 +237,16 @@ Returns a paginated list of units of measure
|
|
237
237
|
### Example
|
238
238
|
```ruby
|
239
239
|
# load the gem
|
240
|
-
require '
|
240
|
+
require 'subskribe_dev'
|
241
241
|
# setup authorization
|
242
|
-
|
242
|
+
SubskribeDevClient.configure do |config|
|
243
243
|
# Configure API key authorization: ApiKeyAuth
|
244
244
|
config.api_key['X-API-Key'] = 'YOUR API KEY'
|
245
245
|
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
246
246
|
#config.api_key_prefix['X-API-Key'] = 'Bearer'
|
247
247
|
end
|
248
248
|
|
249
|
-
api_instance =
|
249
|
+
api_instance = SubskribeDevClient::SettingsApi.new
|
250
250
|
|
251
251
|
opts = {
|
252
252
|
cursor: 'cursor_example', # String |
|
@@ -257,7 +257,7 @@ begin
|
|
257
257
|
#Get units of measure
|
258
258
|
result = api_instance.get_units_of_measure(opts)
|
259
259
|
p result
|
260
|
-
rescue
|
260
|
+
rescue SubskribeDevClient::ApiError => e
|
261
261
|
puts "Exception when calling SettingsApi->get_units_of_measure: #{e}"
|
262
262
|
end
|
263
263
|
```
|
@@ -294,28 +294,28 @@ Update the unit of measure by Id provided.
|
|
294
294
|
### Example
|
295
295
|
```ruby
|
296
296
|
# load the gem
|
297
|
-
require '
|
297
|
+
require 'subskribe_dev'
|
298
298
|
# setup authorization
|
299
|
-
|
299
|
+
SubskribeDevClient.configure do |config|
|
300
300
|
# Configure API key authorization: ApiKeyAuth
|
301
301
|
config.api_key['X-API-Key'] = 'YOUR API KEY'
|
302
302
|
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
303
303
|
#config.api_key_prefix['X-API-Key'] = 'Bearer'
|
304
304
|
end
|
305
305
|
|
306
|
-
api_instance =
|
306
|
+
api_instance = SubskribeDevClient::SettingsApi.new
|
307
307
|
|
308
308
|
id = 'id_example' # String |
|
309
309
|
|
310
310
|
opts = {
|
311
|
-
body:
|
311
|
+
body: SubskribeDevClient::UnitOfMeasureJson.new # UnitOfMeasureJson |
|
312
312
|
}
|
313
313
|
|
314
314
|
begin
|
315
315
|
#Update unit of measure
|
316
316
|
result = api_instance.update_unit_of_measure(id, opts)
|
317
317
|
p result
|
318
|
-
rescue
|
318
|
+
rescue SubskribeDevClient::ApiError => e
|
319
319
|
puts "Exception when calling SettingsApi->update_unit_of_measure: #{e}"
|
320
320
|
end
|
321
321
|
```
|
data/docs/UnitOfMeasureJson.md
CHANGED
@@ -17,7 +17,7 @@ require 'tempfile'
|
|
17
17
|
require 'typhoeus'
|
18
18
|
require 'addressable/uri'
|
19
19
|
|
20
|
-
module
|
20
|
+
module SubskribeDevClient
|
21
21
|
class ApiClient
|
22
22
|
# The Configuration object holding settings to be used in the API client.
|
23
23
|
attr_accessor :config
|
@@ -212,7 +212,7 @@ module SwaggerClient
|
|
212
212
|
end
|
213
213
|
else
|
214
214
|
# models, e.g. Pet
|
215
|
-
|
215
|
+
SubskribeDevClient.const_get(return_type).new.tap do |model|
|
216
216
|
model.build_from_hash data
|
217
217
|
end
|
218
218
|
end
|
@@ -12,7 +12,7 @@ Swagger Codegen version: 2.4.41
|
|
12
12
|
|
13
13
|
require 'date'
|
14
14
|
|
15
|
-
module
|
15
|
+
module SubskribeDevClient
|
16
16
|
class UnitOfMeasureJson
|
17
17
|
attr_accessor :id
|
18
18
|
|
@@ -199,7 +199,7 @@ module SwaggerClient
|
|
199
199
|
end
|
200
200
|
end
|
201
201
|
else # model
|
202
|
-
temp_model =
|
202
|
+
temp_model = SubskribeDevClient.const_get(type).new
|
203
203
|
temp_model.build_from_hash(value)
|
204
204
|
end
|
205
205
|
end
|
data/lib/{swagger_client → subskribe_dev}/models/unit_of_measure_pagination_response_json.rb
RENAMED
@@ -12,7 +12,7 @@ Swagger Codegen version: 2.4.41
|
|
12
12
|
|
13
13
|
require 'date'
|
14
14
|
|
15
|
-
module
|
15
|
+
module SubskribeDevClient
|
16
16
|
class UnitOfMeasurePaginationResponseJson
|
17
17
|
attr_accessor :data
|
18
18
|
|
@@ -153,7 +153,7 @@ module SwaggerClient
|
|
153
153
|
end
|
154
154
|
end
|
155
155
|
else # model
|
156
|
-
temp_model =
|
156
|
+
temp_model = SubskribeDevClient.const_get(type).new
|
157
157
|
temp_model.build_from_hash(value)
|
158
158
|
end
|
159
159
|
end
|
@@ -11,22 +11,22 @@ Swagger Codegen version: 2.4.41
|
|
11
11
|
=end
|
12
12
|
|
13
13
|
# Common files
|
14
|
-
require '
|
15
|
-
require '
|
16
|
-
require '
|
17
|
-
require '
|
14
|
+
require 'subskribe_dev/api_client'
|
15
|
+
require 'subskribe_dev/api_error'
|
16
|
+
require 'subskribe_dev/version'
|
17
|
+
require 'subskribe_dev/configuration'
|
18
18
|
|
19
19
|
# Models
|
20
|
-
require '
|
21
|
-
require '
|
20
|
+
require 'subskribe_dev/models/unit_of_measure_json'
|
21
|
+
require 'subskribe_dev/models/unit_of_measure_pagination_response_json'
|
22
22
|
|
23
23
|
# APIs
|
24
|
-
require '
|
24
|
+
require 'subskribe_dev/api/settings_api'
|
25
25
|
|
26
|
-
module
|
26
|
+
module SubskribeDevClient
|
27
27
|
class << self
|
28
28
|
# Customize default settings for the SDK using block.
|
29
|
-
#
|
29
|
+
# SubskribeDevClient.configure do |config|
|
30
30
|
# config.username = "xxx"
|
31
31
|
# config.password = "xxx"
|
32
32
|
# end
|
@@ -13,13 +13,13 @@ Swagger Codegen version: 2.4.41
|
|
13
13
|
require 'spec_helper'
|
14
14
|
require 'json'
|
15
15
|
|
16
|
-
# Unit tests for
|
16
|
+
# Unit tests for SubskribeDevClient::SettingsApi
|
17
17
|
# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen)
|
18
18
|
# Please update as you see appropriate
|
19
19
|
describe 'SettingsApi' do
|
20
20
|
before do
|
21
21
|
# run before each test
|
22
|
-
@instance =
|
22
|
+
@instance = SubskribeDevClient::SettingsApi.new
|
23
23
|
end
|
24
24
|
|
25
25
|
after do
|
@@ -28,7 +28,7 @@ describe 'SettingsApi' do
|
|
28
28
|
|
29
29
|
describe 'test an instance of SettingsApi' do
|
30
30
|
it 'should create an instance of SettingsApi' do
|
31
|
-
expect(@instance).to be_instance_of(
|
31
|
+
expect(@instance).to be_instance_of(SubskribeDevClient::SettingsApi)
|
32
32
|
end
|
33
33
|
end
|
34
34
|
|
data/spec/api_client_spec.rb
CHANGED
@@ -12,51 +12,51 @@ Swagger Codegen version: 2.4.41
|
|
12
12
|
|
13
13
|
require 'spec_helper'
|
14
14
|
|
15
|
-
describe
|
15
|
+
describe SubskribeDevClient::ApiClient do
|
16
16
|
context 'initialization' do
|
17
17
|
context 'URL stuff' do
|
18
18
|
context 'host' do
|
19
19
|
it 'removes http from host' do
|
20
|
-
|
21
|
-
expect(
|
20
|
+
SubskribeDevClient.configure { |c| c.host = 'http://example.com' }
|
21
|
+
expect(SubskribeDevClient::Configuration.default.host).to eq('example.com')
|
22
22
|
end
|
23
23
|
|
24
24
|
it 'removes https from host' do
|
25
|
-
|
26
|
-
expect(
|
25
|
+
SubskribeDevClient.configure { |c| c.host = 'https://wookiee.com' }
|
26
|
+
expect(SubskribeDevClient::ApiClient.default.config.host).to eq('wookiee.com')
|
27
27
|
end
|
28
28
|
|
29
29
|
it 'removes trailing path from host' do
|
30
|
-
|
31
|
-
expect(
|
30
|
+
SubskribeDevClient.configure { |c| c.host = 'hobo.com/v4' }
|
31
|
+
expect(SubskribeDevClient::Configuration.default.host).to eq('hobo.com')
|
32
32
|
end
|
33
33
|
end
|
34
34
|
|
35
35
|
context 'base_path' do
|
36
36
|
it "prepends a slash to base_path" do
|
37
|
-
|
38
|
-
expect(
|
37
|
+
SubskribeDevClient.configure { |c| c.base_path = 'v4/dog' }
|
38
|
+
expect(SubskribeDevClient::Configuration.default.base_path).to eq('/v4/dog')
|
39
39
|
end
|
40
40
|
|
41
41
|
it "doesn't prepend a slash if one is already there" do
|
42
|
-
|
43
|
-
expect(
|
42
|
+
SubskribeDevClient.configure { |c| c.base_path = '/v4/dog' }
|
43
|
+
expect(SubskribeDevClient::Configuration.default.base_path).to eq('/v4/dog')
|
44
44
|
end
|
45
45
|
|
46
46
|
it "ends up as a blank string if nil" do
|
47
|
-
|
48
|
-
expect(
|
47
|
+
SubskribeDevClient.configure { |c| c.base_path = nil }
|
48
|
+
expect(SubskribeDevClient::Configuration.default.base_path).to eq('')
|
49
49
|
end
|
50
50
|
end
|
51
51
|
end
|
52
52
|
end
|
53
53
|
|
54
54
|
describe 'params_encoding in #build_request' do
|
55
|
-
let(:config) {
|
56
|
-
let(:api_client) {
|
55
|
+
let(:config) { SubskribeDevClient::Configuration.new }
|
56
|
+
let(:api_client) { SubskribeDevClient::ApiClient.new(config) }
|
57
57
|
|
58
58
|
it 'defaults to nil' do
|
59
|
-
expect(
|
59
|
+
expect(SubskribeDevClient::Configuration.default.params_encoding).to eq(nil)
|
60
60
|
expect(config.params_encoding).to eq(nil)
|
61
61
|
|
62
62
|
request = api_client.build_request(:get, '/test')
|
@@ -71,11 +71,11 @@ describe SwaggerClient::ApiClient do
|
|
71
71
|
end
|
72
72
|
|
73
73
|
describe 'timeout in #build_request' do
|
74
|
-
let(:config) {
|
75
|
-
let(:api_client) {
|
74
|
+
let(:config) { SubskribeDevClient::Configuration.new }
|
75
|
+
let(:api_client) { SubskribeDevClient::ApiClient.new(config) }
|
76
76
|
|
77
77
|
it 'defaults to 0' do
|
78
|
-
expect(
|
78
|
+
expect(SubskribeDevClient::Configuration.default.timeout).to eq(0)
|
79
79
|
expect(config.timeout).to eq(0)
|
80
80
|
|
81
81
|
request = api_client.build_request(:get, '/test')
|
@@ -90,8 +90,8 @@ describe SwaggerClient::ApiClient do
|
|
90
90
|
end
|
91
91
|
|
92
92
|
describe '#build_request' do
|
93
|
-
let(:config) {
|
94
|
-
let(:api_client) {
|
93
|
+
let(:config) { SubskribeDevClient::Configuration.new }
|
94
|
+
let(:api_client) { SubskribeDevClient::ApiClient.new(config) }
|
95
95
|
|
96
96
|
it 'does not send multipart to request' do
|
97
97
|
expect(Typhoeus::Request).to receive(:new).with(anything, hash_not_including(:multipart))
|
@@ -108,7 +108,7 @@ describe SwaggerClient::ApiClient do
|
|
108
108
|
|
109
109
|
describe '#deserialize' do
|
110
110
|
it "handles Array<Integer>" do
|
111
|
-
api_client =
|
111
|
+
api_client = SubskribeDevClient::ApiClient.new
|
112
112
|
headers = { 'Content-Type' => 'application/json' }
|
113
113
|
response = double('response', headers: headers, body: '[12, 34]')
|
114
114
|
data = api_client.deserialize(response, 'Array<Integer>')
|
@@ -117,7 +117,7 @@ describe SwaggerClient::ApiClient do
|
|
117
117
|
end
|
118
118
|
|
119
119
|
it 'handles Array<Array<Integer>>' do
|
120
|
-
api_client =
|
120
|
+
api_client = SubskribeDevClient::ApiClient.new
|
121
121
|
headers = { 'Content-Type' => 'application/json' }
|
122
122
|
response = double('response', headers: headers, body: '[[12, 34], [56]]')
|
123
123
|
data = api_client.deserialize(response, 'Array<Array<Integer>>')
|
@@ -126,7 +126,7 @@ describe SwaggerClient::ApiClient do
|
|
126
126
|
end
|
127
127
|
|
128
128
|
it 'handles Hash<String, String>' do
|
129
|
-
api_client =
|
129
|
+
api_client = SubskribeDevClient::ApiClient.new
|
130
130
|
headers = { 'Content-Type' => 'application/json' }
|
131
131
|
response = double('response', headers: headers, body: '{"message": "Hello"}')
|
132
132
|
data = api_client.deserialize(response, 'Hash<String, String>')
|
@@ -138,8 +138,8 @@ describe SwaggerClient::ApiClient do
|
|
138
138
|
describe "#object_to_hash" do
|
139
139
|
it 'ignores nils and includes empty arrays' do
|
140
140
|
# uncomment below to test object_to_hash for model
|
141
|
-
# api_client =
|
142
|
-
# _model =
|
141
|
+
# api_client = SubskribeDevClient::ApiClient.new
|
142
|
+
# _model = SubskribeDevClient::ModelName.new
|
143
143
|
# update the model attribute below
|
144
144
|
# _model.id = 1
|
145
145
|
# update the expected value (hash) below
|
@@ -150,7 +150,7 @@ describe SwaggerClient::ApiClient do
|
|
150
150
|
|
151
151
|
describe '#build_collection_param' do
|
152
152
|
let(:param) { ['aa', 'bb', 'cc'] }
|
153
|
-
let(:api_client) {
|
153
|
+
let(:api_client) { SubskribeDevClient::ApiClient.new }
|
154
154
|
|
155
155
|
it 'works for csv' do
|
156
156
|
expect(api_client.build_collection_param(param, :csv)).to eq('aa,bb,cc')
|
@@ -178,7 +178,7 @@ describe SwaggerClient::ApiClient do
|
|
178
178
|
end
|
179
179
|
|
180
180
|
describe '#json_mime?' do
|
181
|
-
let(:api_client) {
|
181
|
+
let(:api_client) { SubskribeDevClient::ApiClient.new }
|
182
182
|
|
183
183
|
it 'works' do
|
184
184
|
expect(api_client.json_mime?(nil)).to eq false
|
@@ -195,7 +195,7 @@ describe SwaggerClient::ApiClient do
|
|
195
195
|
end
|
196
196
|
|
197
197
|
describe '#select_header_accept' do
|
198
|
-
let(:api_client) {
|
198
|
+
let(:api_client) { SubskribeDevClient::ApiClient.new }
|
199
199
|
|
200
200
|
it 'works' do
|
201
201
|
expect(api_client.select_header_accept(nil)).to be_nil
|
@@ -211,7 +211,7 @@ describe SwaggerClient::ApiClient do
|
|
211
211
|
end
|
212
212
|
|
213
213
|
describe '#select_header_content_type' do
|
214
|
-
let(:api_client) {
|
214
|
+
let(:api_client) { SubskribeDevClient::ApiClient.new }
|
215
215
|
|
216
216
|
it 'works' do
|
217
217
|
expect(api_client.select_header_content_type(nil)).to eq('application/json')
|
@@ -226,7 +226,7 @@ describe SwaggerClient::ApiClient do
|
|
226
226
|
end
|
227
227
|
|
228
228
|
describe '#sanitize_filename' do
|
229
|
-
let(:api_client) {
|
229
|
+
let(:api_client) { SubskribeDevClient::ApiClient.new }
|
230
230
|
|
231
231
|
it 'works' do
|
232
232
|
expect(api_client.sanitize_filename('sun')).to eq('sun')
|
data/spec/configuration_spec.rb
CHANGED
@@ -12,14 +12,14 @@ Swagger Codegen version: 2.4.41
|
|
12
12
|
|
13
13
|
require 'spec_helper'
|
14
14
|
|
15
|
-
describe
|
16
|
-
let(:config) {
|
15
|
+
describe SubskribeDevClient::Configuration do
|
16
|
+
let(:config) { SubskribeDevClient::Configuration.default }
|
17
17
|
|
18
18
|
before(:each) do
|
19
19
|
# uncomment below to setup host and base_path
|
20
20
|
# require 'URI'
|
21
21
|
# uri = URI.parse("https://api.dev2.subskribe.net")
|
22
|
-
#
|
22
|
+
# SubskribeDevClient.configure do |c|
|
23
23
|
# c.host = uri.host
|
24
24
|
# c.base_path = uri.path
|
25
25
|
# end
|
@@ -14,13 +14,13 @@ require 'spec_helper'
|
|
14
14
|
require 'json'
|
15
15
|
require 'date'
|
16
16
|
|
17
|
-
# Unit tests for
|
17
|
+
# Unit tests for SubskribeDevClient::UnitOfMeasureJson
|
18
18
|
# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen)
|
19
19
|
# Please update as you see appropriate
|
20
20
|
describe 'UnitOfMeasureJson' do
|
21
21
|
before do
|
22
22
|
# run before each test
|
23
|
-
@instance =
|
23
|
+
@instance = SubskribeDevClient::UnitOfMeasureJson.new
|
24
24
|
end
|
25
25
|
|
26
26
|
after do
|
@@ -29,7 +29,7 @@ describe 'UnitOfMeasureJson' do
|
|
29
29
|
|
30
30
|
describe 'test an instance of UnitOfMeasureJson' do
|
31
31
|
it 'should create an instance of UnitOfMeasureJson' do
|
32
|
-
expect(@instance).to be_instance_of(
|
32
|
+
expect(@instance).to be_instance_of(SubskribeDevClient::UnitOfMeasureJson)
|
33
33
|
end
|
34
34
|
end
|
35
35
|
describe 'test attribute "id"' do
|
@@ -14,13 +14,13 @@ require 'spec_helper'
|
|
14
14
|
require 'json'
|
15
15
|
require 'date'
|
16
16
|
|
17
|
-
# Unit tests for
|
17
|
+
# Unit tests for SubskribeDevClient::UnitOfMeasurePaginationResponseJson
|
18
18
|
# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen)
|
19
19
|
# Please update as you see appropriate
|
20
20
|
describe 'UnitOfMeasurePaginationResponseJson' do
|
21
21
|
before do
|
22
22
|
# run before each test
|
23
|
-
@instance =
|
23
|
+
@instance = SubskribeDevClient::UnitOfMeasurePaginationResponseJson.new
|
24
24
|
end
|
25
25
|
|
26
26
|
after do
|
@@ -29,7 +29,7 @@ describe 'UnitOfMeasurePaginationResponseJson' do
|
|
29
29
|
|
30
30
|
describe 'test an instance of UnitOfMeasurePaginationResponseJson' do
|
31
31
|
it 'should create an instance of UnitOfMeasurePaginationResponseJson' do
|
32
|
-
expect(@instance).to be_instance_of(
|
32
|
+
expect(@instance).to be_instance_of(SubskribeDevClient::UnitOfMeasurePaginationResponseJson)
|
33
33
|
end
|
34
34
|
end
|
35
35
|
describe 'test attribute "data"' do
|
data/spec/spec_helper.rb
CHANGED
@@ -11,7 +11,7 @@ Swagger Codegen version: 2.4.41
|
|
11
11
|
=end
|
12
12
|
|
13
13
|
# load the gem
|
14
|
-
require '
|
14
|
+
require 'subskribe_dev'
|
15
15
|
|
16
16
|
# The following was generated by the `rspec --init` command. Conventionally, all
|
17
17
|
# specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`.
|
@@ -13,17 +13,17 @@ Swagger Codegen version: 2.4.41
|
|
13
13
|
=end
|
14
14
|
|
15
15
|
$:.push File.expand_path("../lib", __FILE__)
|
16
|
-
require "
|
16
|
+
require "subskribe_dev/version"
|
17
17
|
|
18
18
|
Gem::Specification.new do |s|
|
19
19
|
s.name = "subskribe_dev"
|
20
|
-
s.version =
|
20
|
+
s.version = SubskribeDevClient::VERSION
|
21
21
|
s.platform = Gem::Platform::RUBY
|
22
|
-
s.authors = ["
|
23
|
-
s.email = ["
|
22
|
+
s.authors = ["Swagger-Codegen"]
|
23
|
+
s.email = [""]
|
24
24
|
s.homepage = "https://github.com/swagger-api/swagger-codegen"
|
25
|
-
s.summary = "Subskribe
|
26
|
-
s.description = "
|
25
|
+
s.summary = "Subskribe API Ruby Gem"
|
26
|
+
s.description = "No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)"
|
27
27
|
s.license = "Unlicense"
|
28
28
|
s.required_ruby_version = ">= 1.9"
|
29
29
|
|
metadata
CHANGED
@@ -1,10 +1,10 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: subskribe_dev
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
|
-
-
|
7
|
+
- Swagger-Codegen
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
@@ -210,9 +210,9 @@ dependencies:
|
|
210
210
|
- - ">="
|
211
211
|
- !ruby/object:Gem::Version
|
212
212
|
version: 0.2.12
|
213
|
-
description:
|
213
|
+
description: No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
|
214
214
|
email:
|
215
|
-
-
|
215
|
+
- ''
|
216
216
|
executables: []
|
217
217
|
extensions: []
|
218
218
|
extra_rdoc_files: []
|
@@ -224,23 +224,21 @@ files:
|
|
224
224
|
- docs/UnitOfMeasureJson.md
|
225
225
|
- docs/UnitOfMeasurePaginationResponseJson.md
|
226
226
|
- git_push.sh
|
227
|
-
- lib/
|
228
|
-
- lib/
|
229
|
-
- lib/
|
230
|
-
- lib/
|
231
|
-
- lib/
|
232
|
-
- lib/
|
233
|
-
- lib/
|
234
|
-
- lib/
|
227
|
+
- lib/subskribe_dev.rb
|
228
|
+
- lib/subskribe_dev/api/settings_api.rb
|
229
|
+
- lib/subskribe_dev/api_client.rb
|
230
|
+
- lib/subskribe_dev/api_error.rb
|
231
|
+
- lib/subskribe_dev/configuration.rb
|
232
|
+
- lib/subskribe_dev/models/unit_of_measure_json.rb
|
233
|
+
- lib/subskribe_dev/models/unit_of_measure_pagination_response_json.rb
|
234
|
+
- lib/subskribe_dev/version.rb
|
235
235
|
- spec/api/settings_api_spec.rb
|
236
236
|
- spec/api_client_spec.rb
|
237
237
|
- spec/configuration_spec.rb
|
238
238
|
- spec/models/unit_of_measure_json_spec.rb
|
239
239
|
- spec/models/unit_of_measure_pagination_response_json_spec.rb
|
240
240
|
- spec/spec_helper.rb
|
241
|
-
-
|
242
|
-
- swagger_client.gemspec
|
243
|
-
- test1.rb
|
241
|
+
- subskribe_dev.gemspec
|
244
242
|
homepage: https://github.com/swagger-api/swagger-codegen
|
245
243
|
licenses:
|
246
244
|
- Unlicense
|
@@ -263,7 +261,7 @@ requirements: []
|
|
263
261
|
rubygems_version: 3.4.20
|
264
262
|
signing_key:
|
265
263
|
specification_version: 4
|
266
|
-
summary: Subskribe
|
264
|
+
summary: Subskribe API Ruby Gem
|
267
265
|
test_files:
|
268
266
|
- spec/api/settings_api_spec.rb
|
269
267
|
- spec/api_client_spec.rb
|
data/swagger_client-1.0.0.gem
DELETED
Binary file
|
data/test1.rb
DELETED
@@ -1,24 +0,0 @@
|
|
1
|
-
# load the gem
|
2
|
-
require 'swagger_client'
|
3
|
-
# setup authorization
|
4
|
-
SwaggerClient.configure do |config|
|
5
|
-
# Configure API key authorization: ApiKeyAuth
|
6
|
-
config.api_key['X-API-Key'] = 'eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJTdWJza3JpYmUiLCJpYXQiOjE3MjEyMDAxODIsImFwayI6IjA5T2xJRDI4QzlHSW1MTlRBM2I1NzJIeEN2UWwyYjlMOWRkRHcxc0NJVjg9IiwidGlkIjoiNzVlNDdhZGQtYzMxMC00YzcyLWJlMDYtZTU4ZWQzMDhhMzg4Iiwia2lkIjoiMjY2OTExNTEtN2Y4NC00ZjI3LTlkYTItNGFiMDcwMTBiMjI5In0.GC8EiTHfqp7fDaF6yEzEOcO8UlvUcpYCzRy1VFrD_5y5TW44Y1C7TW1e1CnrOngWThtgif5ub862VDsAzQMt8X4uxjB4kgK4JqlvKD2NINmwgqyrlOeJFLFnZrWOUsdXyHONJbhw3Wga2NbRsv3Zp6SfeKKbFAenylAtFuGEniUnucL52qaF54cWcl1pu34igPbzVzWstqy109Jnw_UN0rkaEyRY8ftHob6-vvOQvQDY16Bes8_d34To7MDntRxDBW6aWoYD4HJ7Hs1vMZRXllGLfiMiOOyfhfYDJ_TrKebK0FO5aUDr-gRRFD28fqgdpS-ugINq8grT2JayUdg9VA'
|
7
|
-
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
8
|
-
#config.api_key_prefix['X-API-Key'] = 'Bearer'
|
9
|
-
end
|
10
|
-
|
11
|
-
api_instance = SwaggerClient::SettingsApi.new
|
12
|
-
|
13
|
-
opts = {
|
14
|
-
cursor: '', # String |
|
15
|
-
limit: 6 # Integer |
|
16
|
-
}
|
17
|
-
|
18
|
-
begin
|
19
|
-
#Get units of measure
|
20
|
-
result = api_instance.get_units_of_measure(opts)
|
21
|
-
p result
|
22
|
-
rescue SwaggerClient::ApiError => e
|
23
|
-
puts "Exception when calling SettingsApi->get_units_of_measure: #{e}"
|
24
|
-
end
|