spartera_api_sdk 1.0.58
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 +7 -0
- data/Gemfile +11 -0
- data/Gemfile.lock +69 -0
- data/LICENSE +21 -0
- data/README.md +360 -0
- data/Rakefile +10 -0
- data/config.json +10 -0
- data/docs/APIKeysApi.md +353 -0
- data/docs/Alert.md +36 -0
- data/docs/AlertsApi.md +511 -0
- data/docs/Apikey.md +36 -0
- data/docs/Asset.md +110 -0
- data/docs/AssetPriceHistoryApi.md +573 -0
- data/docs/Assetpricehistory.md +38 -0
- data/docs/AssetsApi.md +1131 -0
- data/docs/CloudProvidersApi.md +341 -0
- data/docs/Cloudprovider.md +30 -0
- data/docs/CompaniesApi.md +619 -0
- data/docs/Company.md +44 -0
- data/docs/Connection.md +54 -0
- data/docs/ConnectionsApi.md +497 -0
- data/docs/Error.md +24 -0
- data/docs/Favorite.md +36 -0
- data/docs/FavoritesApi.md +581 -0
- data/docs/InlineObject.md +22 -0
- data/docs/InlineObject1.md +20 -0
- data/docs/InlineObject2.md +20 -0
- data/docs/InlineObject3.md +20 -0
- data/docs/User.md +34 -0
- data/docs/UsersApi.md +357 -0
- data/example.rb +51 -0
- data/git_push.sh +57 -0
- data/lib/spartera_api_sdk/api/alerts_api.rb +543 -0
- data/lib/spartera_api_sdk/api/api_keys_api.rb +345 -0
- data/lib/spartera_api_sdk/api/asset_price_history_api.rb +576 -0
- data/lib/spartera_api_sdk/api/assets_api.rb +1106 -0
- data/lib/spartera_api_sdk/api/cloud_providers_api.rb +315 -0
- data/lib/spartera_api_sdk/api/companies_api.rb +571 -0
- data/lib/spartera_api_sdk/api/connections_api.rb +501 -0
- data/lib/spartera_api_sdk/api/favorites_api.rb +610 -0
- data/lib/spartera_api_sdk/api/users_api.rb +367 -0
- data/lib/spartera_api_sdk/api_client.rb +393 -0
- data/lib/spartera_api_sdk/api_error.rb +58 -0
- data/lib/spartera_api_sdk/configuration.rb +320 -0
- data/lib/spartera_api_sdk/models/alert.rb +353 -0
- data/lib/spartera_api_sdk/models/apikey.rb +370 -0
- data/lib/spartera_api_sdk/models/asset.rb +686 -0
- data/lib/spartera_api_sdk/models/assetpricehistory.rb +345 -0
- data/lib/spartera_api_sdk/models/cloudprovider.rb +292 -0
- data/lib/spartera_api_sdk/models/company.rb +389 -0
- data/lib/spartera_api_sdk/models/connection.rb +434 -0
- data/lib/spartera_api_sdk/models/error.rb +285 -0
- data/lib/spartera_api_sdk/models/favorite.rb +353 -0
- data/lib/spartera_api_sdk/models/inline_object.rb +240 -0
- data/lib/spartera_api_sdk/models/inline_object1.rb +229 -0
- data/lib/spartera_api_sdk/models/inline_object2.rb +229 -0
- data/lib/spartera_api_sdk/models/inline_object3.rb +229 -0
- data/lib/spartera_api_sdk/models/user.rb +327 -0
- data/lib/spartera_api_sdk/version.rb +15 -0
- data/lib/spartera_api_sdk.rb +62 -0
- data/spartera_api_sdk.gemspec +28 -0
- data/spec/api/alerts_api_spec.rb +126 -0
- data/spec/api/api_keys_api_spec.rb +93 -0
- data/spec/api/asset_price_history_api_spec.rb +134 -0
- data/spec/api/assets_api_spec.rb +228 -0
- data/spec/api/cloud_providers_api_spec.rb +88 -0
- data/spec/api/companies_api_spec.rb +134 -0
- data/spec/api/connections_api_spec.rb +119 -0
- data/spec/api/favorites_api_spec.rb +138 -0
- data/spec/api/users_api_spec.rb +95 -0
- data/spec/models/alert_spec.rb +90 -0
- data/spec/models/apikey_spec.rb +90 -0
- data/spec/models/asset_spec.rb +312 -0
- data/spec/models/assetpricehistory_spec.rb +96 -0
- data/spec/models/cloudprovider_spec.rb +72 -0
- data/spec/models/company_spec.rb +114 -0
- data/spec/models/connection_spec.rb +144 -0
- data/spec/models/error_spec.rb +54 -0
- data/spec/models/favorite_spec.rb +90 -0
- data/spec/models/inline_object1_spec.rb +42 -0
- data/spec/models/inline_object2_spec.rb +42 -0
- data/spec/models/inline_object3_spec.rb +42 -0
- data/spec/models/inline_object_spec.rb +48 -0
- data/spec/models/user_spec.rb +84 -0
- data/spec/spec_helper.rb +111 -0
- data/test.sh +42 -0
- metadata +204 -0
@@ -0,0 +1,327 @@
|
|
1
|
+
=begin
|
2
|
+
#Spartera API Documentation
|
3
|
+
|
4
|
+
#Auto-generated API documentation for REST services of the Spartera platform
|
5
|
+
|
6
|
+
The version of the OpenAPI document: 0.0.0
|
7
|
+
Contact: support@spartera.com
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
Generator version: 7.13.0
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'date'
|
14
|
+
require 'time'
|
15
|
+
|
16
|
+
module SparteraApiSdk
|
17
|
+
# Individual users within a company
|
18
|
+
class User
|
19
|
+
attr_accessor :user_id
|
20
|
+
|
21
|
+
attr_accessor :company_id
|
22
|
+
|
23
|
+
attr_accessor :function_id
|
24
|
+
|
25
|
+
attr_accessor :status
|
26
|
+
|
27
|
+
attr_accessor :email_address
|
28
|
+
|
29
|
+
attr_accessor :timezone
|
30
|
+
|
31
|
+
attr_accessor :date_created
|
32
|
+
|
33
|
+
attr_accessor :last_updated
|
34
|
+
|
35
|
+
attr_accessor :active
|
36
|
+
|
37
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
38
|
+
def self.attribute_map
|
39
|
+
{
|
40
|
+
:'user_id' => :'user_id',
|
41
|
+
:'company_id' => :'company_id',
|
42
|
+
:'function_id' => :'function_id',
|
43
|
+
:'status' => :'status',
|
44
|
+
:'email_address' => :'email_address',
|
45
|
+
:'timezone' => :'timezone',
|
46
|
+
:'date_created' => :'date_created',
|
47
|
+
:'last_updated' => :'last_updated',
|
48
|
+
:'active' => :'active'
|
49
|
+
}
|
50
|
+
end
|
51
|
+
|
52
|
+
# Returns attribute mapping this model knows about
|
53
|
+
def self.acceptable_attribute_map
|
54
|
+
attribute_map
|
55
|
+
end
|
56
|
+
|
57
|
+
# Returns all the JSON keys this model knows about
|
58
|
+
def self.acceptable_attributes
|
59
|
+
acceptable_attribute_map.values
|
60
|
+
end
|
61
|
+
|
62
|
+
# Attribute type mapping.
|
63
|
+
def self.openapi_types
|
64
|
+
{
|
65
|
+
:'user_id' => :'String',
|
66
|
+
:'company_id' => :'String',
|
67
|
+
:'function_id' => :'String',
|
68
|
+
:'status' => :'String',
|
69
|
+
:'email_address' => :'String',
|
70
|
+
:'timezone' => :'String',
|
71
|
+
:'date_created' => :'String',
|
72
|
+
:'last_updated' => :'String',
|
73
|
+
:'active' => :'String'
|
74
|
+
}
|
75
|
+
end
|
76
|
+
|
77
|
+
# List of attributes with nullable: true
|
78
|
+
def self.openapi_nullable
|
79
|
+
Set.new([
|
80
|
+
])
|
81
|
+
end
|
82
|
+
|
83
|
+
# Initializes the object
|
84
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
85
|
+
def initialize(attributes = {})
|
86
|
+
if (!attributes.is_a?(Hash))
|
87
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `SparteraApiSdk::User` initialize method"
|
88
|
+
end
|
89
|
+
|
90
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
91
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
92
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
93
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
94
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `SparteraApiSdk::User`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
95
|
+
end
|
96
|
+
h[k.to_sym] = v
|
97
|
+
}
|
98
|
+
|
99
|
+
if attributes.key?(:'user_id')
|
100
|
+
self.user_id = attributes[:'user_id']
|
101
|
+
end
|
102
|
+
|
103
|
+
if attributes.key?(:'company_id')
|
104
|
+
self.company_id = attributes[:'company_id']
|
105
|
+
else
|
106
|
+
self.company_id = nil
|
107
|
+
end
|
108
|
+
|
109
|
+
if attributes.key?(:'function_id')
|
110
|
+
self.function_id = attributes[:'function_id']
|
111
|
+
end
|
112
|
+
|
113
|
+
if attributes.key?(:'status')
|
114
|
+
self.status = attributes[:'status']
|
115
|
+
else
|
116
|
+
self.status = nil
|
117
|
+
end
|
118
|
+
|
119
|
+
if attributes.key?(:'email_address')
|
120
|
+
self.email_address = attributes[:'email_address']
|
121
|
+
end
|
122
|
+
|
123
|
+
if attributes.key?(:'timezone')
|
124
|
+
self.timezone = attributes[:'timezone']
|
125
|
+
end
|
126
|
+
|
127
|
+
if attributes.key?(:'date_created')
|
128
|
+
self.date_created = attributes[:'date_created']
|
129
|
+
end
|
130
|
+
|
131
|
+
if attributes.key?(:'last_updated')
|
132
|
+
self.last_updated = attributes[:'last_updated']
|
133
|
+
end
|
134
|
+
|
135
|
+
if attributes.key?(:'active')
|
136
|
+
self.active = attributes[:'active']
|
137
|
+
end
|
138
|
+
end
|
139
|
+
|
140
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
141
|
+
# @return Array for valid properties with the reasons
|
142
|
+
def list_invalid_properties
|
143
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
144
|
+
invalid_properties = Array.new
|
145
|
+
if @company_id.nil?
|
146
|
+
invalid_properties.push('invalid value for "company_id", company_id cannot be nil.')
|
147
|
+
end
|
148
|
+
|
149
|
+
if @status.nil?
|
150
|
+
invalid_properties.push('invalid value for "status", status cannot be nil.')
|
151
|
+
end
|
152
|
+
|
153
|
+
invalid_properties
|
154
|
+
end
|
155
|
+
|
156
|
+
# Check to see if the all the properties in the model are valid
|
157
|
+
# @return true if the model is valid
|
158
|
+
def valid?
|
159
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
160
|
+
return false if @company_id.nil?
|
161
|
+
return false if @status.nil?
|
162
|
+
true
|
163
|
+
end
|
164
|
+
|
165
|
+
# Custom attribute writer method with validation
|
166
|
+
# @param [Object] company_id Value to be assigned
|
167
|
+
def company_id=(company_id)
|
168
|
+
if company_id.nil?
|
169
|
+
fail ArgumentError, 'company_id cannot be nil'
|
170
|
+
end
|
171
|
+
|
172
|
+
@company_id = company_id
|
173
|
+
end
|
174
|
+
|
175
|
+
# Custom attribute writer method with validation
|
176
|
+
# @param [Object] status Value to be assigned
|
177
|
+
def status=(status)
|
178
|
+
if status.nil?
|
179
|
+
fail ArgumentError, 'status cannot be nil'
|
180
|
+
end
|
181
|
+
|
182
|
+
@status = status
|
183
|
+
end
|
184
|
+
|
185
|
+
# Checks equality by comparing each attribute.
|
186
|
+
# @param [Object] Object to be compared
|
187
|
+
def ==(o)
|
188
|
+
return true if self.equal?(o)
|
189
|
+
self.class == o.class &&
|
190
|
+
user_id == o.user_id &&
|
191
|
+
company_id == o.company_id &&
|
192
|
+
function_id == o.function_id &&
|
193
|
+
status == o.status &&
|
194
|
+
email_address == o.email_address &&
|
195
|
+
timezone == o.timezone &&
|
196
|
+
date_created == o.date_created &&
|
197
|
+
last_updated == o.last_updated &&
|
198
|
+
active == o.active
|
199
|
+
end
|
200
|
+
|
201
|
+
# @see the `==` method
|
202
|
+
# @param [Object] Object to be compared
|
203
|
+
def eql?(o)
|
204
|
+
self == o
|
205
|
+
end
|
206
|
+
|
207
|
+
# Calculates hash code according to all attributes.
|
208
|
+
# @return [Integer] Hash code
|
209
|
+
def hash
|
210
|
+
[user_id, company_id, function_id, status, email_address, timezone, date_created, last_updated, active].hash
|
211
|
+
end
|
212
|
+
|
213
|
+
# Builds the object from hash
|
214
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
215
|
+
# @return [Object] Returns the model itself
|
216
|
+
def self.build_from_hash(attributes)
|
217
|
+
return nil unless attributes.is_a?(Hash)
|
218
|
+
attributes = attributes.transform_keys(&:to_sym)
|
219
|
+
transformed_hash = {}
|
220
|
+
openapi_types.each_pair do |key, type|
|
221
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
222
|
+
transformed_hash["#{key}"] = nil
|
223
|
+
elsif type =~ /\AArray<(.*)>/i
|
224
|
+
# check to ensure the input is an array given that the attribute
|
225
|
+
# is documented as an array but the input is not
|
226
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
227
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
228
|
+
end
|
229
|
+
elsif !attributes[attribute_map[key]].nil?
|
230
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
231
|
+
end
|
232
|
+
end
|
233
|
+
new(transformed_hash)
|
234
|
+
end
|
235
|
+
|
236
|
+
# Deserializes the data based on type
|
237
|
+
# @param string type Data type
|
238
|
+
# @param string value Value to be deserialized
|
239
|
+
# @return [Object] Deserialized data
|
240
|
+
def self._deserialize(type, value)
|
241
|
+
case type.to_sym
|
242
|
+
when :Time
|
243
|
+
Time.parse(value)
|
244
|
+
when :Date
|
245
|
+
Date.parse(value)
|
246
|
+
when :String
|
247
|
+
value.to_s
|
248
|
+
when :Integer
|
249
|
+
value.to_i
|
250
|
+
when :Float
|
251
|
+
value.to_f
|
252
|
+
when :Boolean
|
253
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
254
|
+
true
|
255
|
+
else
|
256
|
+
false
|
257
|
+
end
|
258
|
+
when :Object
|
259
|
+
# generic object (usually a Hash), return directly
|
260
|
+
value
|
261
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
262
|
+
inner_type = Regexp.last_match[:inner_type]
|
263
|
+
value.map { |v| _deserialize(inner_type, v) }
|
264
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
265
|
+
k_type = Regexp.last_match[:k_type]
|
266
|
+
v_type = Regexp.last_match[:v_type]
|
267
|
+
{}.tap do |hash|
|
268
|
+
value.each do |k, v|
|
269
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
270
|
+
end
|
271
|
+
end
|
272
|
+
else # model
|
273
|
+
# models (e.g. Pet) or oneOf
|
274
|
+
klass = SparteraApiSdk.const_get(type)
|
275
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
276
|
+
end
|
277
|
+
end
|
278
|
+
|
279
|
+
# Returns the string representation of the object
|
280
|
+
# @return [String] String presentation of the object
|
281
|
+
def to_s
|
282
|
+
to_hash.to_s
|
283
|
+
end
|
284
|
+
|
285
|
+
# to_body is an alias to to_hash (backward compatibility)
|
286
|
+
# @return [Hash] Returns the object in the form of hash
|
287
|
+
def to_body
|
288
|
+
to_hash
|
289
|
+
end
|
290
|
+
|
291
|
+
# Returns the object in the form of hash
|
292
|
+
# @return [Hash] Returns the object in the form of hash
|
293
|
+
def to_hash
|
294
|
+
hash = {}
|
295
|
+
self.class.attribute_map.each_pair do |attr, param|
|
296
|
+
value = self.send(attr)
|
297
|
+
if value.nil?
|
298
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
299
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
300
|
+
end
|
301
|
+
|
302
|
+
hash[param] = _to_hash(value)
|
303
|
+
end
|
304
|
+
hash
|
305
|
+
end
|
306
|
+
|
307
|
+
# Outputs non-array value in the form of hash
|
308
|
+
# For object, use to_hash. Otherwise, just return the value
|
309
|
+
# @param [Object] value Any valid value
|
310
|
+
# @return [Hash] Returns the value in the form of hash
|
311
|
+
def _to_hash(value)
|
312
|
+
if value.is_a?(Array)
|
313
|
+
value.compact.map { |v| _to_hash(v) }
|
314
|
+
elsif value.is_a?(Hash)
|
315
|
+
{}.tap do |hash|
|
316
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
317
|
+
end
|
318
|
+
elsif value.respond_to? :to_hash
|
319
|
+
value.to_hash
|
320
|
+
else
|
321
|
+
value
|
322
|
+
end
|
323
|
+
end
|
324
|
+
|
325
|
+
end
|
326
|
+
|
327
|
+
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
=begin
|
2
|
+
#Spartera API Documentation
|
3
|
+
|
4
|
+
#Auto-generated API documentation for REST services of the Spartera platform
|
5
|
+
|
6
|
+
The version of the OpenAPI document: 0.0.0
|
7
|
+
Contact: support@spartera.com
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
Generator version: 7.13.0
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
module SparteraApiSdk
|
14
|
+
VERSION = '1.0.58'
|
15
|
+
end
|
@@ -0,0 +1,62 @@
|
|
1
|
+
=begin
|
2
|
+
#Spartera API Documentation
|
3
|
+
|
4
|
+
#Auto-generated API documentation for REST services of the Spartera platform
|
5
|
+
|
6
|
+
The version of the OpenAPI document: 0.0.0
|
7
|
+
Contact: support@spartera.com
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
Generator version: 7.13.0
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
# Common files
|
14
|
+
require 'spartera_api_sdk/api_client'
|
15
|
+
require 'spartera_api_sdk/api_error'
|
16
|
+
require 'spartera_api_sdk/version'
|
17
|
+
require 'spartera_api_sdk/configuration'
|
18
|
+
|
19
|
+
# Models
|
20
|
+
require 'spartera_api_sdk/models/alert'
|
21
|
+
require 'spartera_api_sdk/models/apikey'
|
22
|
+
require 'spartera_api_sdk/models/asset'
|
23
|
+
require 'spartera_api_sdk/models/assetpricehistory'
|
24
|
+
require 'spartera_api_sdk/models/cloudprovider'
|
25
|
+
require 'spartera_api_sdk/models/company'
|
26
|
+
require 'spartera_api_sdk/models/connection'
|
27
|
+
require 'spartera_api_sdk/models/error'
|
28
|
+
require 'spartera_api_sdk/models/favorite'
|
29
|
+
require 'spartera_api_sdk/models/inline_object'
|
30
|
+
require 'spartera_api_sdk/models/inline_object1'
|
31
|
+
require 'spartera_api_sdk/models/inline_object2'
|
32
|
+
require 'spartera_api_sdk/models/inline_object3'
|
33
|
+
require 'spartera_api_sdk/models/user'
|
34
|
+
|
35
|
+
# APIs
|
36
|
+
require 'spartera_api_sdk/api/api_keys_api'
|
37
|
+
require 'spartera_api_sdk/api/alerts_api'
|
38
|
+
require 'spartera_api_sdk/api/asset_price_history_api'
|
39
|
+
require 'spartera_api_sdk/api/assets_api'
|
40
|
+
require 'spartera_api_sdk/api/cloud_providers_api'
|
41
|
+
require 'spartera_api_sdk/api/companies_api'
|
42
|
+
require 'spartera_api_sdk/api/connections_api'
|
43
|
+
require 'spartera_api_sdk/api/favorites_api'
|
44
|
+
require 'spartera_api_sdk/api/users_api'
|
45
|
+
|
46
|
+
module SparteraApiSdk
|
47
|
+
class << self
|
48
|
+
# Customize default settings for the SDK using block.
|
49
|
+
# SparteraApiSdk.configure do |config|
|
50
|
+
# config.username = "xxx"
|
51
|
+
# config.password = "xxx"
|
52
|
+
# end
|
53
|
+
# If no block given, return the default Configuration object.
|
54
|
+
def configure
|
55
|
+
if block_given?
|
56
|
+
yield(Configuration.default)
|
57
|
+
else
|
58
|
+
Configuration.default
|
59
|
+
end
|
60
|
+
end
|
61
|
+
end
|
62
|
+
end
|
@@ -0,0 +1,28 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
|
3
|
+
$:.push File.expand_path("../lib", __FILE__)
|
4
|
+
require "spartera_api_sdk/version"
|
5
|
+
|
6
|
+
Gem::Specification.new do |s|
|
7
|
+
s.name = "spartera_api_sdk"
|
8
|
+
s.version = SparteraApiSdk::VERSION
|
9
|
+
s.platform = Gem::Platform::RUBY
|
10
|
+
s.authors = ["Tony D"]
|
11
|
+
s.email = ["tony@spartera.com"]
|
12
|
+
s.homepage = "https://github.com/spartera-com/spartera-ruby-sdk"
|
13
|
+
s.summary = "Spartera API Ruby SDK"
|
14
|
+
s.description = "Official SDK for Spartera API - Interface to manage companies' accounts and process insights remotely"
|
15
|
+
s.license = "Apache-2.0"
|
16
|
+
|
17
|
+
s.required_ruby_version = ">= 2.7.0"
|
18
|
+
|
19
|
+
s.add_runtime_dependency 'faraday', '>= 1.0.1', '< 3.0'
|
20
|
+
s.add_runtime_dependency 'faraday-multipart', '~> 1.0'
|
21
|
+
|
22
|
+
s.add_development_dependency 'rspec', '~> 3.6', '>= 3.6.0'
|
23
|
+
|
24
|
+
s.files = `find *`.split("\n").uniq.sort.select { |f| !f.empty? }
|
25
|
+
s.test_files = `find spec/*`.split("\n")
|
26
|
+
s.executables = []
|
27
|
+
s.require_paths = ["lib"]
|
28
|
+
end
|
@@ -0,0 +1,126 @@
|
|
1
|
+
=begin
|
2
|
+
#Spartera API Documentation
|
3
|
+
|
4
|
+
#Auto-generated API documentation for REST services of the Spartera platform
|
5
|
+
|
6
|
+
The version of the OpenAPI document: 0.0.0
|
7
|
+
Contact: support@spartera.com
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
Generator version: 7.13.0
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'spec_helper'
|
14
|
+
require 'json'
|
15
|
+
|
16
|
+
# Unit tests for SparteraApiSdk::AlertsApi
|
17
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
18
|
+
# Please update as you see appropriate
|
19
|
+
describe 'AlertsApi' do
|
20
|
+
before do
|
21
|
+
# run before each test
|
22
|
+
@api_instance = SparteraApiSdk::AlertsApi.new
|
23
|
+
end
|
24
|
+
|
25
|
+
after do
|
26
|
+
# run after each test
|
27
|
+
end
|
28
|
+
|
29
|
+
describe 'test an instance of AlertsApi' do
|
30
|
+
it 'should create an instance of AlertsApi' do
|
31
|
+
expect(@api_instance).to be_instance_of(SparteraApiSdk::AlertsApi)
|
32
|
+
end
|
33
|
+
end
|
34
|
+
|
35
|
+
# unit tests for companies_company_id_users_user_id_alerts_alert_id_delete
|
36
|
+
# Delete single alert by ID
|
37
|
+
# @param company_id
|
38
|
+
# @param user_id
|
39
|
+
# @param alert_id
|
40
|
+
# @param [Hash] opts the optional parameters
|
41
|
+
# @return [Object]
|
42
|
+
describe 'companies_company_id_users_user_id_alerts_alert_id_delete test' do
|
43
|
+
it 'should work' do
|
44
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
45
|
+
end
|
46
|
+
end
|
47
|
+
|
48
|
+
# unit tests for companies_company_id_users_user_id_alerts_alert_id_get
|
49
|
+
# Get single alert by ID
|
50
|
+
# @param company_id
|
51
|
+
# @param user_id
|
52
|
+
# @param alert_id
|
53
|
+
# @param [Hash] opts the optional parameters
|
54
|
+
# @return [Object]
|
55
|
+
describe 'companies_company_id_users_user_id_alerts_alert_id_get test' do
|
56
|
+
it 'should work' do
|
57
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
58
|
+
end
|
59
|
+
end
|
60
|
+
|
61
|
+
# unit tests for companies_company_id_users_user_id_alerts_alert_id_patch
|
62
|
+
# Update an existing alert by ID
|
63
|
+
# @param company_id
|
64
|
+
# @param user_id
|
65
|
+
# @param alert_id
|
66
|
+
# @param alert
|
67
|
+
# @param [Hash] opts the optional parameters
|
68
|
+
# @return [Object]
|
69
|
+
describe 'companies_company_id_users_user_id_alerts_alert_id_patch test' do
|
70
|
+
it 'should work' do
|
71
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
72
|
+
end
|
73
|
+
end
|
74
|
+
|
75
|
+
# unit tests for companies_company_id_users_user_id_alerts_asset_asset_id_all_get
|
76
|
+
# Get all alerts for a specific asset (from all users) This would typically be restricted to asset owners or admins
|
77
|
+
# @param company_id
|
78
|
+
# @param user_id
|
79
|
+
# @param asset_id
|
80
|
+
# @param [Hash] opts the optional parameters
|
81
|
+
# @return [Object]
|
82
|
+
describe 'companies_company_id_users_user_id_alerts_asset_asset_id_all_get test' do
|
83
|
+
it 'should work' do
|
84
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
85
|
+
end
|
86
|
+
end
|
87
|
+
|
88
|
+
# unit tests for companies_company_id_users_user_id_alerts_asset_asset_id_get
|
89
|
+
# Get all alerts for a specific asset by the specified user Useful for checking if user already has an alert set up for an asset
|
90
|
+
# @param company_id
|
91
|
+
# @param user_id
|
92
|
+
# @param asset_id
|
93
|
+
# @param [Hash] opts the optional parameters
|
94
|
+
# @return [Object]
|
95
|
+
describe 'companies_company_id_users_user_id_alerts_asset_asset_id_get test' do
|
96
|
+
it 'should work' do
|
97
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
98
|
+
end
|
99
|
+
end
|
100
|
+
|
101
|
+
# unit tests for companies_company_id_users_user_id_alerts_get
|
102
|
+
# Get a list of all alerts for a specific user
|
103
|
+
# @param company_id
|
104
|
+
# @param user_id
|
105
|
+
# @param [Hash] opts the optional parameters
|
106
|
+
# @return [Object]
|
107
|
+
describe 'companies_company_id_users_user_id_alerts_get test' do
|
108
|
+
it 'should work' do
|
109
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
110
|
+
end
|
111
|
+
end
|
112
|
+
|
113
|
+
# unit tests for companies_company_id_users_user_id_alerts_post
|
114
|
+
# POST /companies/{company_id}/users/{user_id}/alerts
|
115
|
+
# @param company_id
|
116
|
+
# @param user_id
|
117
|
+
# @param alert
|
118
|
+
# @param [Hash] opts the optional parameters
|
119
|
+
# @return [Object]
|
120
|
+
describe 'companies_company_id_users_user_id_alerts_post test' do
|
121
|
+
it 'should work' do
|
122
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
123
|
+
end
|
124
|
+
end
|
125
|
+
|
126
|
+
end
|
@@ -0,0 +1,93 @@
|
|
1
|
+
=begin
|
2
|
+
#Spartera API Documentation
|
3
|
+
|
4
|
+
#Auto-generated API documentation for REST services of the Spartera platform
|
5
|
+
|
6
|
+
The version of the OpenAPI document: 0.0.0
|
7
|
+
Contact: support@spartera.com
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
Generator version: 7.13.0
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'spec_helper'
|
14
|
+
require 'json'
|
15
|
+
|
16
|
+
# Unit tests for SparteraApiSdk::APIKeysApi
|
17
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
18
|
+
# Please update as you see appropriate
|
19
|
+
describe 'APIKeysApi' do
|
20
|
+
before do
|
21
|
+
# run before each test
|
22
|
+
@api_instance = SparteraApiSdk::APIKeysApi.new
|
23
|
+
end
|
24
|
+
|
25
|
+
after do
|
26
|
+
# run after each test
|
27
|
+
end
|
28
|
+
|
29
|
+
describe 'test an instance of APIKeysApi' do
|
30
|
+
it 'should create an instance of APIKeysApi' do
|
31
|
+
expect(@api_instance).to be_instance_of(SparteraApiSdk::APIKeysApi)
|
32
|
+
end
|
33
|
+
end
|
34
|
+
|
35
|
+
# unit tests for companies_company_id_api_keys_api_key_id_get
|
36
|
+
# Get single API key by ID
|
37
|
+
# @param company_id
|
38
|
+
# @param api_key_id
|
39
|
+
# @param [Hash] opts the optional parameters
|
40
|
+
# @return [Object]
|
41
|
+
describe 'companies_company_id_api_keys_api_key_id_get test' do
|
42
|
+
it 'should work' do
|
43
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
44
|
+
end
|
45
|
+
end
|
46
|
+
|
47
|
+
# unit tests for companies_company_id_api_keys_api_key_id_patch
|
48
|
+
# Update an existing API key by ID
|
49
|
+
# @param company_id
|
50
|
+
# @param api_key_id
|
51
|
+
# @param [Hash] opts the optional parameters
|
52
|
+
# @return [Object]
|
53
|
+
describe 'companies_company_id_api_keys_api_key_id_patch test' do
|
54
|
+
it 'should work' do
|
55
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
56
|
+
end
|
57
|
+
end
|
58
|
+
|
59
|
+
# unit tests for companies_company_id_api_keys_get
|
60
|
+
# Get all API keys
|
61
|
+
# @param company_id
|
62
|
+
# @param [Hash] opts the optional parameters
|
63
|
+
# @return [Object]
|
64
|
+
describe 'companies_company_id_api_keys_get test' do
|
65
|
+
it 'should work' do
|
66
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
67
|
+
end
|
68
|
+
end
|
69
|
+
|
70
|
+
# unit tests for companies_company_id_api_keys_post
|
71
|
+
# Create single API key
|
72
|
+
# @param company_id
|
73
|
+
# @param [Hash] opts the optional parameters
|
74
|
+
# @return [Object]
|
75
|
+
describe 'companies_company_id_api_keys_post test' do
|
76
|
+
it 'should work' do
|
77
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
78
|
+
end
|
79
|
+
end
|
80
|
+
|
81
|
+
# unit tests for companies_company_id_api_keys_token_delete
|
82
|
+
# Delete single API key by token
|
83
|
+
# @param company_id
|
84
|
+
# @param token
|
85
|
+
# @param [Hash] opts the optional parameters
|
86
|
+
# @return [Object]
|
87
|
+
describe 'companies_company_id_api_keys_token_delete test' do
|
88
|
+
it 'should work' do
|
89
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
90
|
+
end
|
91
|
+
end
|
92
|
+
|
93
|
+
end
|