spartera_api_sdk 1.0.68 → 1.0.72

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.
Files changed (175) hide show
  1. checksums.yaml +4 -4
  2. data/docs/APIKeysApi.md +20 -20
  3. data/docs/AlertsApi.md +28 -28
  4. data/docs/AssetPriceHistoryApi.md +32 -32
  5. data/docs/AssetsApi.md +52 -52
  6. data/docs/CloudProvidersApi.md +8 -8
  7. data/docs/CompaniesApi.md +36 -36
  8. data/docs/CompaniesCompanyIdApiKeysGet200Response.md +20 -0
  9. data/docs/CompaniesCompanyIdAssetsAssetIdDelete200Response.md +20 -0
  10. data/docs/CompaniesCompanyIdAssetsAssetIdDelete200ResponseData.md +18 -0
  11. data/docs/CompaniesCompanyIdAssetsAssetIdGet200Response.md +20 -0
  12. data/docs/CompaniesCompanyIdAssetsAssetIdPatch200Response.md +20 -0
  13. data/docs/CompaniesCompanyIdAssetsAssetIdPatch200ResponseData.md +18 -0
  14. data/docs/CompaniesCompanyIdAssetsGet200Response.md +20 -0
  15. data/docs/CompaniesCompanyIdAssetsPost200Response.md +20 -0
  16. data/docs/CompaniesCompanyIdAssetsPost200ResponseData.md +18 -0
  17. data/docs/CompaniesCompanyIdConnectionsConnectionIdDelete200Response.md +20 -0
  18. data/docs/CompaniesCompanyIdConnectionsConnectionIdDelete200ResponseData.md +18 -0
  19. data/docs/CompaniesCompanyIdConnectionsConnectionIdGet200Response.md +20 -0
  20. data/docs/CompaniesCompanyIdConnectionsConnectionIdPatch200Response.md +20 -0
  21. data/docs/CompaniesCompanyIdConnectionsConnectionIdPatch200ResponseData.md +18 -0
  22. data/docs/CompaniesCompanyIdConnectionsGet200Response.md +20 -0
  23. data/docs/CompaniesCompanyIdConnectionsPost200Response.md +20 -0
  24. data/docs/CompaniesCompanyIdConnectionsPost200ResponseData.md +18 -0
  25. data/docs/CompaniesCompanyIdUsersGet200Response.md +20 -0
  26. data/docs/CompaniesCompanyIdUsersPost200Response.md +20 -0
  27. data/docs/CompaniesCompanyIdUsersPost200ResponseData.md +18 -0
  28. data/docs/CompaniesCompanyIdUsersUserIdAlertsAlertIdDelete200Response.md +20 -0
  29. data/docs/CompaniesCompanyIdUsersUserIdAlertsAlertIdDelete200ResponseData.md +18 -0
  30. data/docs/CompaniesCompanyIdUsersUserIdAlertsAlertIdGet200Response.md +20 -0
  31. data/docs/CompaniesCompanyIdUsersUserIdAlertsAlertIdPatch200Response.md +20 -0
  32. data/docs/CompaniesCompanyIdUsersUserIdAlertsAlertIdPatch200ResponseData.md +18 -0
  33. data/docs/CompaniesCompanyIdUsersUserIdAlertsGet200Response.md +20 -0
  34. data/docs/CompaniesCompanyIdUsersUserIdAlertsPost200Response.md +20 -0
  35. data/docs/CompaniesCompanyIdUsersUserIdAlertsPost200ResponseData.md +18 -0
  36. data/docs/CompaniesCompanyIdUsersUserIdDelete200Response.md +20 -0
  37. data/docs/CompaniesCompanyIdUsersUserIdDelete200ResponseData.md +18 -0
  38. data/docs/CompaniesCompanyIdUsersUserIdFavoritesFavoriteIdDelete200Response.md +20 -0
  39. data/docs/CompaniesCompanyIdUsersUserIdFavoritesFavoriteIdDelete200ResponseData.md +18 -0
  40. data/docs/CompaniesCompanyIdUsersUserIdFavoritesFavoriteIdGet200Response.md +20 -0
  41. data/docs/CompaniesCompanyIdUsersUserIdFavoritesFavoriteIdPatch200Response.md +20 -0
  42. data/docs/CompaniesCompanyIdUsersUserIdFavoritesFavoriteIdPatch200ResponseData.md +18 -0
  43. data/docs/CompaniesCompanyIdUsersUserIdFavoritesGet200Response.md +20 -0
  44. data/docs/CompaniesCompanyIdUsersUserIdFavoritesPost200Response.md +20 -0
  45. data/docs/CompaniesCompanyIdUsersUserIdFavoritesPost200ResponseData.md +18 -0
  46. data/docs/CompaniesCompanyIdUsersUserIdGet200Response.md +20 -0
  47. data/docs/CompaniesCompanyIdUsersUserIdPatch200Response.md +20 -0
  48. data/docs/CompaniesCompanyIdUsersUserIdPatch200ResponseData.md +18 -0
  49. data/docs/ConnectionsApi.md +28 -28
  50. data/docs/FavoritesApi.md +32 -32
  51. data/docs/MeGet200Response.md +36 -0
  52. data/docs/MeGet200ResponseApiKeyInfo.md +20 -0
  53. data/docs/MeGet200ResponseProfile.md +36 -0
  54. data/docs/MeGet200ResponseTokenMetadata.md +24 -0
  55. data/docs/StorageEnginesApi.md +8 -8
  56. data/docs/UsersApi.md +87 -20
  57. data/lib/spartera_api_sdk/api/alerts_api.rb +21 -21
  58. data/lib/spartera_api_sdk/api/api_keys_api.rb +15 -15
  59. data/lib/spartera_api_sdk/api/asset_price_history_api.rb +24 -24
  60. data/lib/spartera_api_sdk/api/assets_api.rb +46 -46
  61. data/lib/spartera_api_sdk/api/cloud_providers_api.rb +6 -6
  62. data/lib/spartera_api_sdk/api/companies_api.rb +27 -27
  63. data/lib/spartera_api_sdk/api/connections_api.rb +21 -21
  64. data/lib/spartera_api_sdk/api/favorites_api.rb +24 -24
  65. data/lib/spartera_api_sdk/api/storage_engines_api.rb +6 -6
  66. data/lib/spartera_api_sdk/api/users_api.rb +70 -15
  67. data/lib/spartera_api_sdk/models/companies_company_id_api_keys_get200_response.rb +248 -0
  68. data/lib/spartera_api_sdk/models/companies_company_id_assets_asset_id_delete200_response.rb +264 -0
  69. data/lib/spartera_api_sdk/models/companies_company_id_assets_asset_id_delete200_response_data.rb +238 -0
  70. data/lib/spartera_api_sdk/models/companies_company_id_assets_asset_id_get200_response.rb +264 -0
  71. data/lib/spartera_api_sdk/models/companies_company_id_assets_asset_id_patch200_response.rb +264 -0
  72. data/lib/spartera_api_sdk/models/companies_company_id_assets_asset_id_patch200_response_data.rb +238 -0
  73. data/lib/spartera_api_sdk/models/companies_company_id_assets_get200_response.rb +266 -0
  74. data/lib/spartera_api_sdk/models/companies_company_id_assets_post200_response.rb +264 -0
  75. data/lib/spartera_api_sdk/models/companies_company_id_assets_post200_response_data.rb +238 -0
  76. data/lib/spartera_api_sdk/models/companies_company_id_connections_connection_id_delete200_response.rb +264 -0
  77. data/lib/spartera_api_sdk/models/companies_company_id_connections_connection_id_delete200_response_data.rb +238 -0
  78. data/lib/spartera_api_sdk/models/companies_company_id_connections_connection_id_get200_response.rb +264 -0
  79. data/lib/spartera_api_sdk/models/companies_company_id_connections_connection_id_patch200_response.rb +264 -0
  80. data/lib/spartera_api_sdk/models/companies_company_id_connections_connection_id_patch200_response_data.rb +238 -0
  81. data/lib/spartera_api_sdk/models/companies_company_id_connections_get200_response.rb +266 -0
  82. data/lib/spartera_api_sdk/models/companies_company_id_connections_post200_response.rb +264 -0
  83. data/lib/spartera_api_sdk/models/companies_company_id_connections_post200_response_data.rb +238 -0
  84. data/lib/spartera_api_sdk/models/companies_company_id_users_get200_response.rb +266 -0
  85. data/lib/spartera_api_sdk/models/companies_company_id_users_post200_response.rb +264 -0
  86. data/lib/spartera_api_sdk/models/companies_company_id_users_post200_response_data.rb +238 -0
  87. data/lib/spartera_api_sdk/models/companies_company_id_users_user_id_alerts_alert_id_delete200_response.rb +264 -0
  88. data/lib/spartera_api_sdk/models/companies_company_id_users_user_id_alerts_alert_id_delete200_response_data.rb +238 -0
  89. data/lib/spartera_api_sdk/models/companies_company_id_users_user_id_alerts_alert_id_get200_response.rb +264 -0
  90. data/lib/spartera_api_sdk/models/companies_company_id_users_user_id_alerts_alert_id_patch200_response.rb +264 -0
  91. data/lib/spartera_api_sdk/models/companies_company_id_users_user_id_alerts_alert_id_patch200_response_data.rb +238 -0
  92. data/lib/spartera_api_sdk/models/companies_company_id_users_user_id_alerts_get200_response.rb +266 -0
  93. data/lib/spartera_api_sdk/models/companies_company_id_users_user_id_alerts_post200_response.rb +264 -0
  94. data/lib/spartera_api_sdk/models/companies_company_id_users_user_id_alerts_post200_response_data.rb +238 -0
  95. data/lib/spartera_api_sdk/models/companies_company_id_users_user_id_delete200_response.rb +264 -0
  96. data/lib/spartera_api_sdk/models/companies_company_id_users_user_id_delete200_response_data.rb +238 -0
  97. data/lib/spartera_api_sdk/models/companies_company_id_users_user_id_favorites_favorite_id_delete200_response.rb +264 -0
  98. data/lib/spartera_api_sdk/models/companies_company_id_users_user_id_favorites_favorite_id_delete200_response_data.rb +238 -0
  99. data/lib/spartera_api_sdk/models/companies_company_id_users_user_id_favorites_favorite_id_get200_response.rb +264 -0
  100. data/lib/spartera_api_sdk/models/companies_company_id_users_user_id_favorites_favorite_id_patch200_response.rb +264 -0
  101. data/lib/spartera_api_sdk/models/companies_company_id_users_user_id_favorites_favorite_id_patch200_response_data.rb +238 -0
  102. data/lib/spartera_api_sdk/models/companies_company_id_users_user_id_favorites_get200_response.rb +266 -0
  103. data/lib/spartera_api_sdk/models/companies_company_id_users_user_id_favorites_post200_response.rb +264 -0
  104. data/lib/spartera_api_sdk/models/companies_company_id_users_user_id_favorites_post200_response_data.rb +238 -0
  105. data/lib/spartera_api_sdk/models/companies_company_id_users_user_id_get200_response.rb +264 -0
  106. data/lib/spartera_api_sdk/models/companies_company_id_users_user_id_patch200_response.rb +264 -0
  107. data/lib/spartera_api_sdk/models/companies_company_id_users_user_id_patch200_response_data.rb +238 -0
  108. data/lib/spartera_api_sdk/models/me_get200_response.rb +417 -0
  109. data/lib/spartera_api_sdk/models/me_get200_response_api_key_info.rb +232 -0
  110. data/lib/spartera_api_sdk/models/me_get200_response_profile.rb +345 -0
  111. data/lib/spartera_api_sdk/models/me_get200_response_token_metadata.rb +252 -0
  112. data/lib/spartera_api_sdk/version.rb +1 -13
  113. data/lib/spartera_api_sdk.rb +45 -0
  114. data/spec/api/alerts_api_spec.rb +7 -7
  115. data/spec/api/api_keys_api_spec.rb +5 -5
  116. data/spec/api/asset_price_history_api_spec.rb +8 -8
  117. data/spec/api/assets_api_spec.rb +13 -13
  118. data/spec/api/cloud_providers_api_spec.rb +2 -2
  119. data/spec/api/companies_api_spec.rb +9 -9
  120. data/spec/api/connections_api_spec.rb +7 -7
  121. data/spec/api/favorites_api_spec.rb +8 -8
  122. data/spec/api/storage_engines_api_spec.rb +2 -2
  123. data/spec/api/users_api_spec.rb +15 -5
  124. data/spec/models/companies_company_id_api_keys_get200_response_spec.rb +42 -0
  125. data/spec/models/companies_company_id_assets_asset_id_delete200_response_data_spec.rb +36 -0
  126. data/spec/models/companies_company_id_assets_asset_id_delete200_response_spec.rb +42 -0
  127. data/spec/models/companies_company_id_assets_asset_id_get200_response_spec.rb +42 -0
  128. data/spec/models/companies_company_id_assets_asset_id_patch200_response_data_spec.rb +36 -0
  129. data/spec/models/companies_company_id_assets_asset_id_patch200_response_spec.rb +42 -0
  130. data/spec/models/companies_company_id_assets_get200_response_spec.rb +42 -0
  131. data/spec/models/companies_company_id_assets_post200_response_data_spec.rb +36 -0
  132. data/spec/models/companies_company_id_assets_post200_response_spec.rb +42 -0
  133. data/spec/models/companies_company_id_connections_connection_id_delete200_response_data_spec.rb +36 -0
  134. data/spec/models/companies_company_id_connections_connection_id_delete200_response_spec.rb +42 -0
  135. data/spec/models/companies_company_id_connections_connection_id_get200_response_spec.rb +42 -0
  136. data/spec/models/companies_company_id_connections_connection_id_patch200_response_data_spec.rb +36 -0
  137. data/spec/models/companies_company_id_connections_connection_id_patch200_response_spec.rb +42 -0
  138. data/spec/models/companies_company_id_connections_get200_response_spec.rb +42 -0
  139. data/spec/models/companies_company_id_connections_post200_response_data_spec.rb +36 -0
  140. data/spec/models/companies_company_id_connections_post200_response_spec.rb +42 -0
  141. data/spec/models/companies_company_id_users_get200_response_spec.rb +42 -0
  142. data/spec/models/companies_company_id_users_post200_response_data_spec.rb +36 -0
  143. data/spec/models/companies_company_id_users_post200_response_spec.rb +42 -0
  144. data/spec/models/companies_company_id_users_user_id_alerts_alert_id_delete200_response_data_spec.rb +36 -0
  145. data/spec/models/companies_company_id_users_user_id_alerts_alert_id_delete200_response_spec.rb +42 -0
  146. data/spec/models/companies_company_id_users_user_id_alerts_alert_id_get200_response_spec.rb +42 -0
  147. data/spec/models/companies_company_id_users_user_id_alerts_alert_id_patch200_response_data_spec.rb +36 -0
  148. data/spec/models/companies_company_id_users_user_id_alerts_alert_id_patch200_response_spec.rb +42 -0
  149. data/spec/models/companies_company_id_users_user_id_alerts_get200_response_spec.rb +42 -0
  150. data/spec/models/companies_company_id_users_user_id_alerts_post200_response_data_spec.rb +36 -0
  151. data/spec/models/companies_company_id_users_user_id_alerts_post200_response_spec.rb +42 -0
  152. data/spec/models/companies_company_id_users_user_id_delete200_response_data_spec.rb +36 -0
  153. data/spec/models/companies_company_id_users_user_id_delete200_response_spec.rb +42 -0
  154. data/spec/models/companies_company_id_users_user_id_favorites_favorite_id_delete200_response_data_spec.rb +36 -0
  155. data/spec/models/companies_company_id_users_user_id_favorites_favorite_id_delete200_response_spec.rb +42 -0
  156. data/spec/models/companies_company_id_users_user_id_favorites_favorite_id_get200_response_spec.rb +42 -0
  157. data/spec/models/companies_company_id_users_user_id_favorites_favorite_id_patch200_response_data_spec.rb +36 -0
  158. data/spec/models/companies_company_id_users_user_id_favorites_favorite_id_patch200_response_spec.rb +42 -0
  159. data/spec/models/companies_company_id_users_user_id_favorites_get200_response_spec.rb +42 -0
  160. data/spec/models/companies_company_id_users_user_id_favorites_post200_response_data_spec.rb +36 -0
  161. data/spec/models/companies_company_id_users_user_id_favorites_post200_response_spec.rb +42 -0
  162. data/spec/models/companies_company_id_users_user_id_get200_response_spec.rb +42 -0
  163. data/spec/models/companies_company_id_users_user_id_patch200_response_data_spec.rb +36 -0
  164. data/spec/models/companies_company_id_users_user_id_patch200_response_spec.rb +42 -0
  165. data/spec/models/me_get200_response_api_key_info_spec.rb +42 -0
  166. data/spec/models/me_get200_response_profile_spec.rb +94 -0
  167. data/spec/models/me_get200_response_spec.rb +94 -0
  168. data/spec/models/me_get200_response_token_metadata_spec.rb +54 -0
  169. metadata +212 -20
  170. data/Gemfile +0 -11
  171. data/Rakefile +0 -10
  172. data/config.json +0 -10
  173. data/git_push.sh +0 -57
  174. data/spartera_api_sdk.gemspec +0 -28
  175. data/test.sh +0 -42
@@ -0,0 +1,345 @@
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
+ class MeGet200ResponseProfile
18
+ # User ID (primary key)
19
+ attr_accessor :id
20
+
21
+ # Profile type
22
+ attr_accessor :type
23
+
24
+ # Company ID
25
+ attr_accessor :company_id
26
+
27
+ # User function/role ID
28
+ attr_accessor :function_id
29
+
30
+ # User status
31
+ attr_accessor :status
32
+
33
+ # User email address
34
+ attr_accessor :email_address
35
+
36
+ # User timezone
37
+ attr_accessor :timezone
38
+
39
+ # Account creation date
40
+ attr_accessor :date_created
41
+
42
+ # Last profile update
43
+ attr_accessor :last_updated
44
+
45
+ # Account active status
46
+ attr_accessor :active
47
+
48
+ class EnumAttributeValidator
49
+ attr_reader :datatype
50
+ attr_reader :allowable_values
51
+
52
+ def initialize(datatype, allowable_values)
53
+ @allowable_values = allowable_values.map do |value|
54
+ case datatype.to_s
55
+ when /Integer/i
56
+ value.to_i
57
+ when /Float/i
58
+ value.to_f
59
+ else
60
+ value
61
+ end
62
+ end
63
+ end
64
+
65
+ def valid?(value)
66
+ !value || allowable_values.include?(value)
67
+ end
68
+ end
69
+
70
+ # Attribute mapping from ruby-style variable name to JSON key.
71
+ def self.attribute_map
72
+ {
73
+ :'id' => :'id',
74
+ :'type' => :'type',
75
+ :'company_id' => :'company_id',
76
+ :'function_id' => :'function_id',
77
+ :'status' => :'status',
78
+ :'email_address' => :'email_address',
79
+ :'timezone' => :'timezone',
80
+ :'date_created' => :'date_created',
81
+ :'last_updated' => :'last_updated',
82
+ :'active' => :'active'
83
+ }
84
+ end
85
+
86
+ # Returns attribute mapping this model knows about
87
+ def self.acceptable_attribute_map
88
+ attribute_map
89
+ end
90
+
91
+ # Returns all the JSON keys this model knows about
92
+ def self.acceptable_attributes
93
+ acceptable_attribute_map.values
94
+ end
95
+
96
+ # Attribute type mapping.
97
+ def self.openapi_types
98
+ {
99
+ :'id' => :'String',
100
+ :'type' => :'String',
101
+ :'company_id' => :'String',
102
+ :'function_id' => :'Integer',
103
+ :'status' => :'String',
104
+ :'email_address' => :'String',
105
+ :'timezone' => :'String',
106
+ :'date_created' => :'Time',
107
+ :'last_updated' => :'Time',
108
+ :'active' => :'Boolean'
109
+ }
110
+ end
111
+
112
+ # List of attributes with nullable: true
113
+ def self.openapi_nullable
114
+ Set.new([
115
+ ])
116
+ end
117
+
118
+ # Initializes the object
119
+ # @param [Hash] attributes Model attributes in the form of hash
120
+ def initialize(attributes = {})
121
+ if (!attributes.is_a?(Hash))
122
+ fail ArgumentError, "The input argument (attributes) must be a hash in `SparteraApiSdk::MeGet200ResponseProfile` initialize method"
123
+ end
124
+
125
+ # check to see if the attribute exists and convert string to symbol for hash key
126
+ acceptable_attribute_map = self.class.acceptable_attribute_map
127
+ attributes = attributes.each_with_object({}) { |(k, v), h|
128
+ if (!acceptable_attribute_map.key?(k.to_sym))
129
+ fail ArgumentError, "`#{k}` is not a valid attribute in `SparteraApiSdk::MeGet200ResponseProfile`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
130
+ end
131
+ h[k.to_sym] = v
132
+ }
133
+
134
+ if attributes.key?(:'id')
135
+ self.id = attributes[:'id']
136
+ end
137
+
138
+ if attributes.key?(:'type')
139
+ self.type = attributes[:'type']
140
+ end
141
+
142
+ if attributes.key?(:'company_id')
143
+ self.company_id = attributes[:'company_id']
144
+ end
145
+
146
+ if attributes.key?(:'function_id')
147
+ self.function_id = attributes[:'function_id']
148
+ end
149
+
150
+ if attributes.key?(:'status')
151
+ self.status = attributes[:'status']
152
+ end
153
+
154
+ if attributes.key?(:'email_address')
155
+ self.email_address = attributes[:'email_address']
156
+ end
157
+
158
+ if attributes.key?(:'timezone')
159
+ self.timezone = attributes[:'timezone']
160
+ end
161
+
162
+ if attributes.key?(:'date_created')
163
+ self.date_created = attributes[:'date_created']
164
+ end
165
+
166
+ if attributes.key?(:'last_updated')
167
+ self.last_updated = attributes[:'last_updated']
168
+ end
169
+
170
+ if attributes.key?(:'active')
171
+ self.active = attributes[:'active']
172
+ end
173
+ end
174
+
175
+ # Show invalid properties with the reasons. Usually used together with valid?
176
+ # @return Array for valid properties with the reasons
177
+ def list_invalid_properties
178
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
179
+ invalid_properties = Array.new
180
+ invalid_properties
181
+ end
182
+
183
+ # Check to see if the all the properties in the model are valid
184
+ # @return true if the model is valid
185
+ def valid?
186
+ warn '[DEPRECATED] the `valid?` method is obsolete'
187
+ type_validator = EnumAttributeValidator.new('String', ["human_user", "service_account"])
188
+ return false unless type_validator.valid?(@type)
189
+ true
190
+ end
191
+
192
+ # Custom attribute writer method checking allowed values (enum).
193
+ # @param [Object] type Object to be assigned
194
+ def type=(type)
195
+ validator = EnumAttributeValidator.new('String', ["human_user", "service_account"])
196
+ unless validator.valid?(type)
197
+ fail ArgumentError, "invalid value for \"type\", must be one of #{validator.allowable_values}."
198
+ end
199
+ @type = type
200
+ end
201
+
202
+ # Checks equality by comparing each attribute.
203
+ # @param [Object] Object to be compared
204
+ def ==(o)
205
+ return true if self.equal?(o)
206
+ self.class == o.class &&
207
+ id == o.id &&
208
+ type == o.type &&
209
+ company_id == o.company_id &&
210
+ function_id == o.function_id &&
211
+ status == o.status &&
212
+ email_address == o.email_address &&
213
+ timezone == o.timezone &&
214
+ date_created == o.date_created &&
215
+ last_updated == o.last_updated &&
216
+ active == o.active
217
+ end
218
+
219
+ # @see the `==` method
220
+ # @param [Object] Object to be compared
221
+ def eql?(o)
222
+ self == o
223
+ end
224
+
225
+ # Calculates hash code according to all attributes.
226
+ # @return [Integer] Hash code
227
+ def hash
228
+ [id, type, company_id, function_id, status, email_address, timezone, date_created, last_updated, active].hash
229
+ end
230
+
231
+ # Builds the object from hash
232
+ # @param [Hash] attributes Model attributes in the form of hash
233
+ # @return [Object] Returns the model itself
234
+ def self.build_from_hash(attributes)
235
+ return nil unless attributes.is_a?(Hash)
236
+ attributes = attributes.transform_keys(&:to_sym)
237
+ transformed_hash = {}
238
+ openapi_types.each_pair do |key, type|
239
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
240
+ transformed_hash["#{key}"] = nil
241
+ elsif type =~ /\AArray<(.*)>/i
242
+ # check to ensure the input is an array given that the attribute
243
+ # is documented as an array but the input is not
244
+ if attributes[attribute_map[key]].is_a?(Array)
245
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
246
+ end
247
+ elsif !attributes[attribute_map[key]].nil?
248
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
249
+ end
250
+ end
251
+ new(transformed_hash)
252
+ end
253
+
254
+ # Deserializes the data based on type
255
+ # @param string type Data type
256
+ # @param string value Value to be deserialized
257
+ # @return [Object] Deserialized data
258
+ def self._deserialize(type, value)
259
+ case type.to_sym
260
+ when :Time
261
+ Time.parse(value)
262
+ when :Date
263
+ Date.parse(value)
264
+ when :String
265
+ value.to_s
266
+ when :Integer
267
+ value.to_i
268
+ when :Float
269
+ value.to_f
270
+ when :Boolean
271
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
272
+ true
273
+ else
274
+ false
275
+ end
276
+ when :Object
277
+ # generic object (usually a Hash), return directly
278
+ value
279
+ when /\AArray<(?<inner_type>.+)>\z/
280
+ inner_type = Regexp.last_match[:inner_type]
281
+ value.map { |v| _deserialize(inner_type, v) }
282
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
283
+ k_type = Regexp.last_match[:k_type]
284
+ v_type = Regexp.last_match[:v_type]
285
+ {}.tap do |hash|
286
+ value.each do |k, v|
287
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
288
+ end
289
+ end
290
+ else # model
291
+ # models (e.g. Pet) or oneOf
292
+ klass = SparteraApiSdk.const_get(type)
293
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
294
+ end
295
+ end
296
+
297
+ # Returns the string representation of the object
298
+ # @return [String] String presentation of the object
299
+ def to_s
300
+ to_hash.to_s
301
+ end
302
+
303
+ # to_body is an alias to to_hash (backward compatibility)
304
+ # @return [Hash] Returns the object in the form of hash
305
+ def to_body
306
+ to_hash
307
+ end
308
+
309
+ # Returns the object in the form of hash
310
+ # @return [Hash] Returns the object in the form of hash
311
+ def to_hash
312
+ hash = {}
313
+ self.class.attribute_map.each_pair do |attr, param|
314
+ value = self.send(attr)
315
+ if value.nil?
316
+ is_nullable = self.class.openapi_nullable.include?(attr)
317
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
318
+ end
319
+
320
+ hash[param] = _to_hash(value)
321
+ end
322
+ hash
323
+ end
324
+
325
+ # Outputs non-array value in the form of hash
326
+ # For object, use to_hash. Otherwise, just return the value
327
+ # @param [Object] value Any valid value
328
+ # @return [Hash] Returns the value in the form of hash
329
+ def _to_hash(value)
330
+ if value.is_a?(Array)
331
+ value.compact.map { |v| _to_hash(v) }
332
+ elsif value.is_a?(Hash)
333
+ {}.tap do |hash|
334
+ value.each { |k, v| hash[k] = _to_hash(v) }
335
+ end
336
+ elsif value.respond_to? :to_hash
337
+ value.to_hash
338
+ else
339
+ value
340
+ end
341
+ end
342
+
343
+ end
344
+
345
+ end
@@ -0,0 +1,252 @@
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
+ # JWT token metadata (null for API keys)
18
+ class MeGet200ResponseTokenMetadata
19
+ # Token issuer
20
+ attr_accessor :issuer
21
+
22
+ # Authentication time
23
+ attr_accessor :auth_time
24
+
25
+ # Token issued timestamp
26
+ attr_accessor :issued_at
27
+
28
+ # Token expiration timestamp
29
+ attr_accessor :expires_at
30
+
31
+ # Attribute mapping from ruby-style variable name to JSON key.
32
+ def self.attribute_map
33
+ {
34
+ :'issuer' => :'issuer',
35
+ :'auth_time' => :'auth_time',
36
+ :'issued_at' => :'issued_at',
37
+ :'expires_at' => :'expires_at'
38
+ }
39
+ end
40
+
41
+ # Returns attribute mapping this model knows about
42
+ def self.acceptable_attribute_map
43
+ attribute_map
44
+ end
45
+
46
+ # Returns all the JSON keys this model knows about
47
+ def self.acceptable_attributes
48
+ acceptable_attribute_map.values
49
+ end
50
+
51
+ # Attribute type mapping.
52
+ def self.openapi_types
53
+ {
54
+ :'issuer' => :'String',
55
+ :'auth_time' => :'Integer',
56
+ :'issued_at' => :'Integer',
57
+ :'expires_at' => :'Integer'
58
+ }
59
+ end
60
+
61
+ # List of attributes with nullable: true
62
+ def self.openapi_nullable
63
+ Set.new([
64
+ ])
65
+ end
66
+
67
+ # Initializes the object
68
+ # @param [Hash] attributes Model attributes in the form of hash
69
+ def initialize(attributes = {})
70
+ if (!attributes.is_a?(Hash))
71
+ fail ArgumentError, "The input argument (attributes) must be a hash in `SparteraApiSdk::MeGet200ResponseTokenMetadata` initialize method"
72
+ end
73
+
74
+ # check to see if the attribute exists and convert string to symbol for hash key
75
+ acceptable_attribute_map = self.class.acceptable_attribute_map
76
+ attributes = attributes.each_with_object({}) { |(k, v), h|
77
+ if (!acceptable_attribute_map.key?(k.to_sym))
78
+ fail ArgumentError, "`#{k}` is not a valid attribute in `SparteraApiSdk::MeGet200ResponseTokenMetadata`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
79
+ end
80
+ h[k.to_sym] = v
81
+ }
82
+
83
+ if attributes.key?(:'issuer')
84
+ self.issuer = attributes[:'issuer']
85
+ end
86
+
87
+ if attributes.key?(:'auth_time')
88
+ self.auth_time = attributes[:'auth_time']
89
+ end
90
+
91
+ if attributes.key?(:'issued_at')
92
+ self.issued_at = attributes[:'issued_at']
93
+ end
94
+
95
+ if attributes.key?(:'expires_at')
96
+ self.expires_at = attributes[:'expires_at']
97
+ end
98
+ end
99
+
100
+ # Show invalid properties with the reasons. Usually used together with valid?
101
+ # @return Array for valid properties with the reasons
102
+ def list_invalid_properties
103
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
104
+ invalid_properties = Array.new
105
+ invalid_properties
106
+ end
107
+
108
+ # Check to see if the all the properties in the model are valid
109
+ # @return true if the model is valid
110
+ def valid?
111
+ warn '[DEPRECATED] the `valid?` method is obsolete'
112
+ true
113
+ end
114
+
115
+ # Checks equality by comparing each attribute.
116
+ # @param [Object] Object to be compared
117
+ def ==(o)
118
+ return true if self.equal?(o)
119
+ self.class == o.class &&
120
+ issuer == o.issuer &&
121
+ auth_time == o.auth_time &&
122
+ issued_at == o.issued_at &&
123
+ expires_at == o.expires_at
124
+ end
125
+
126
+ # @see the `==` method
127
+ # @param [Object] Object to be compared
128
+ def eql?(o)
129
+ self == o
130
+ end
131
+
132
+ # Calculates hash code according to all attributes.
133
+ # @return [Integer] Hash code
134
+ def hash
135
+ [issuer, auth_time, issued_at, expires_at].hash
136
+ end
137
+
138
+ # Builds the object from hash
139
+ # @param [Hash] attributes Model attributes in the form of hash
140
+ # @return [Object] Returns the model itself
141
+ def self.build_from_hash(attributes)
142
+ return nil unless attributes.is_a?(Hash)
143
+ attributes = attributes.transform_keys(&:to_sym)
144
+ transformed_hash = {}
145
+ openapi_types.each_pair do |key, type|
146
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
147
+ transformed_hash["#{key}"] = nil
148
+ elsif type =~ /\AArray<(.*)>/i
149
+ # check to ensure the input is an array given that the attribute
150
+ # is documented as an array but the input is not
151
+ if attributes[attribute_map[key]].is_a?(Array)
152
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
153
+ end
154
+ elsif !attributes[attribute_map[key]].nil?
155
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
156
+ end
157
+ end
158
+ new(transformed_hash)
159
+ end
160
+
161
+ # Deserializes the data based on type
162
+ # @param string type Data type
163
+ # @param string value Value to be deserialized
164
+ # @return [Object] Deserialized data
165
+ def self._deserialize(type, value)
166
+ case type.to_sym
167
+ when :Time
168
+ Time.parse(value)
169
+ when :Date
170
+ Date.parse(value)
171
+ when :String
172
+ value.to_s
173
+ when :Integer
174
+ value.to_i
175
+ when :Float
176
+ value.to_f
177
+ when :Boolean
178
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
179
+ true
180
+ else
181
+ false
182
+ end
183
+ when :Object
184
+ # generic object (usually a Hash), return directly
185
+ value
186
+ when /\AArray<(?<inner_type>.+)>\z/
187
+ inner_type = Regexp.last_match[:inner_type]
188
+ value.map { |v| _deserialize(inner_type, v) }
189
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
190
+ k_type = Regexp.last_match[:k_type]
191
+ v_type = Regexp.last_match[:v_type]
192
+ {}.tap do |hash|
193
+ value.each do |k, v|
194
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
195
+ end
196
+ end
197
+ else # model
198
+ # models (e.g. Pet) or oneOf
199
+ klass = SparteraApiSdk.const_get(type)
200
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
201
+ end
202
+ end
203
+
204
+ # Returns the string representation of the object
205
+ # @return [String] String presentation of the object
206
+ def to_s
207
+ to_hash.to_s
208
+ end
209
+
210
+ # to_body is an alias to to_hash (backward compatibility)
211
+ # @return [Hash] Returns the object in the form of hash
212
+ def to_body
213
+ to_hash
214
+ end
215
+
216
+ # Returns the object in the form of hash
217
+ # @return [Hash] Returns the object in the form of hash
218
+ def to_hash
219
+ hash = {}
220
+ self.class.attribute_map.each_pair do |attr, param|
221
+ value = self.send(attr)
222
+ if value.nil?
223
+ is_nullable = self.class.openapi_nullable.include?(attr)
224
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
225
+ end
226
+
227
+ hash[param] = _to_hash(value)
228
+ end
229
+ hash
230
+ end
231
+
232
+ # Outputs non-array value in the form of hash
233
+ # For object, use to_hash. Otherwise, just return the value
234
+ # @param [Object] value Any valid value
235
+ # @return [Hash] Returns the value in the form of hash
236
+ def _to_hash(value)
237
+ if value.is_a?(Array)
238
+ value.compact.map { |v| _to_hash(v) }
239
+ elsif value.is_a?(Hash)
240
+ {}.tap do |hash|
241
+ value.each { |k, v| hash[k] = _to_hash(v) }
242
+ end
243
+ elsif value.respond_to? :to_hash
244
+ value.to_hash
245
+ else
246
+ value
247
+ end
248
+ end
249
+
250
+ end
251
+
252
+ end
@@ -1,15 +1,3 @@
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
1
  module SparteraApiSdk
14
- VERSION = '1.0.68'
2
+ VERSION = '1.0.72'
15
3
  end
@@ -22,6 +22,47 @@ require 'spartera_api_sdk/models/apikey'
22
22
  require 'spartera_api_sdk/models/asset'
23
23
  require 'spartera_api_sdk/models/assetpricehistory'
24
24
  require 'spartera_api_sdk/models/cloudprovider'
25
+ require 'spartera_api_sdk/models/companies_company_id_api_keys_get200_response'
26
+ require 'spartera_api_sdk/models/companies_company_id_assets_asset_id_delete200_response'
27
+ require 'spartera_api_sdk/models/companies_company_id_assets_asset_id_delete200_response_data'
28
+ require 'spartera_api_sdk/models/companies_company_id_assets_asset_id_get200_response'
29
+ require 'spartera_api_sdk/models/companies_company_id_assets_asset_id_patch200_response'
30
+ require 'spartera_api_sdk/models/companies_company_id_assets_asset_id_patch200_response_data'
31
+ require 'spartera_api_sdk/models/companies_company_id_assets_get200_response'
32
+ require 'spartera_api_sdk/models/companies_company_id_assets_post200_response'
33
+ require 'spartera_api_sdk/models/companies_company_id_assets_post200_response_data'
34
+ require 'spartera_api_sdk/models/companies_company_id_connections_connection_id_delete200_response'
35
+ require 'spartera_api_sdk/models/companies_company_id_connections_connection_id_delete200_response_data'
36
+ require 'spartera_api_sdk/models/companies_company_id_connections_connection_id_get200_response'
37
+ require 'spartera_api_sdk/models/companies_company_id_connections_connection_id_patch200_response'
38
+ require 'spartera_api_sdk/models/companies_company_id_connections_connection_id_patch200_response_data'
39
+ require 'spartera_api_sdk/models/companies_company_id_connections_get200_response'
40
+ require 'spartera_api_sdk/models/companies_company_id_connections_post200_response'
41
+ require 'spartera_api_sdk/models/companies_company_id_connections_post200_response_data'
42
+ require 'spartera_api_sdk/models/companies_company_id_users_get200_response'
43
+ require 'spartera_api_sdk/models/companies_company_id_users_post200_response'
44
+ require 'spartera_api_sdk/models/companies_company_id_users_post200_response_data'
45
+ require 'spartera_api_sdk/models/companies_company_id_users_user_id_alerts_alert_id_delete200_response'
46
+ require 'spartera_api_sdk/models/companies_company_id_users_user_id_alerts_alert_id_delete200_response_data'
47
+ require 'spartera_api_sdk/models/companies_company_id_users_user_id_alerts_alert_id_get200_response'
48
+ require 'spartera_api_sdk/models/companies_company_id_users_user_id_alerts_alert_id_patch200_response'
49
+ require 'spartera_api_sdk/models/companies_company_id_users_user_id_alerts_alert_id_patch200_response_data'
50
+ require 'spartera_api_sdk/models/companies_company_id_users_user_id_alerts_get200_response'
51
+ require 'spartera_api_sdk/models/companies_company_id_users_user_id_alerts_post200_response'
52
+ require 'spartera_api_sdk/models/companies_company_id_users_user_id_alerts_post200_response_data'
53
+ require 'spartera_api_sdk/models/companies_company_id_users_user_id_delete200_response'
54
+ require 'spartera_api_sdk/models/companies_company_id_users_user_id_delete200_response_data'
55
+ require 'spartera_api_sdk/models/companies_company_id_users_user_id_favorites_favorite_id_delete200_response'
56
+ require 'spartera_api_sdk/models/companies_company_id_users_user_id_favorites_favorite_id_delete200_response_data'
57
+ require 'spartera_api_sdk/models/companies_company_id_users_user_id_favorites_favorite_id_get200_response'
58
+ require 'spartera_api_sdk/models/companies_company_id_users_user_id_favorites_favorite_id_patch200_response'
59
+ require 'spartera_api_sdk/models/companies_company_id_users_user_id_favorites_favorite_id_patch200_response_data'
60
+ require 'spartera_api_sdk/models/companies_company_id_users_user_id_favorites_get200_response'
61
+ require 'spartera_api_sdk/models/companies_company_id_users_user_id_favorites_post200_response'
62
+ require 'spartera_api_sdk/models/companies_company_id_users_user_id_favorites_post200_response_data'
63
+ require 'spartera_api_sdk/models/companies_company_id_users_user_id_get200_response'
64
+ require 'spartera_api_sdk/models/companies_company_id_users_user_id_patch200_response'
65
+ require 'spartera_api_sdk/models/companies_company_id_users_user_id_patch200_response_data'
25
66
  require 'spartera_api_sdk/models/company'
26
67
  require 'spartera_api_sdk/models/connection'
27
68
  require 'spartera_api_sdk/models/error'
@@ -30,6 +71,10 @@ require 'spartera_api_sdk/models/inline_object'
30
71
  require 'spartera_api_sdk/models/inline_object1'
31
72
  require 'spartera_api_sdk/models/inline_object2'
32
73
  require 'spartera_api_sdk/models/inline_object3'
74
+ require 'spartera_api_sdk/models/me_get200_response'
75
+ require 'spartera_api_sdk/models/me_get200_response_api_key_info'
76
+ require 'spartera_api_sdk/models/me_get200_response_profile'
77
+ require 'spartera_api_sdk/models/me_get200_response_token_metadata'
33
78
  require 'spartera_api_sdk/models/user'
34
79
 
35
80
  # APIs