pnap_billing_api 2.0.0 → 2.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.
Files changed (58) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +9 -0
  3. data/VERSION +1 -1
  4. data/docs/BandwidthRecord.md +4 -2
  5. data/docs/CreditDetails.md +49 -0
  6. data/docs/CreditDetailsBase.md +20 -0
  7. data/docs/CreditTypeEnum.md +15 -0
  8. data/docs/DiscountDetails.md +2 -2
  9. data/docs/DiscountTypeEnum.md +15 -0
  10. data/docs/GpuConfigurationMetadata.md +20 -0
  11. data/docs/OperatingSystemRecord.md +4 -2
  12. data/docs/PricingPlan.md +2 -2
  13. data/docs/PromoCreditDetails.md +24 -0
  14. data/docs/PublicSubnetRecord.md +4 -2
  15. data/docs/RatedUsageProductCategoryEnum.md +15 -0
  16. data/docs/RatedUsageRecord.md +5 -3
  17. data/docs/ReservationAutoRenewDisableRequest.md +1 -1
  18. data/docs/ServerProductMetadata.md +3 -1
  19. data/docs/ServerRecord.md +4 -2
  20. data/docs/StorageRecord.md +4 -2
  21. data/docs/SystemCreditCauseEnum.md +15 -0
  22. data/docs/SystemCreditDetails.md +22 -0
  23. data/lib/pnap_billing_api/models/bandwidth_record.rb +13 -15
  24. data/lib/pnap_billing_api/models/credit_details.rb +105 -0
  25. data/lib/pnap_billing_api/models/credit_details_base.rb +261 -0
  26. data/lib/pnap_billing_api/models/credit_type_enum.rb +40 -0
  27. data/lib/pnap_billing_api/models/discount_details.rb +1 -14
  28. data/lib/pnap_billing_api/models/discount_type_enum.rb +41 -0
  29. data/lib/pnap_billing_api/models/gpu_configuration_metadata.rb +226 -0
  30. data/lib/pnap_billing_api/models/operating_system_record.rb +13 -15
  31. data/lib/pnap_billing_api/models/promo_credit_details.rb +301 -0
  32. data/lib/pnap_billing_api/models/public_subnet_record.rb +13 -15
  33. data/lib/pnap_billing_api/models/rated_usage_product_category_enum.rb +43 -0
  34. data/lib/pnap_billing_api/models/rated_usage_record.rb +16 -18
  35. data/lib/pnap_billing_api/models/server_product_metadata.rb +16 -4
  36. data/lib/pnap_billing_api/models/server_record.rb +13 -15
  37. data/lib/pnap_billing_api/models/storage_record.rb +13 -15
  38. data/lib/pnap_billing_api/models/system_credit_cause_enum.rb +39 -0
  39. data/lib/pnap_billing_api/models/system_credit_details.rb +283 -0
  40. data/lib/pnap_billing_api.rb +9 -0
  41. data/spec/models/bandwidth_record_spec.rb +6 -4
  42. data/spec/models/credit_details_base_spec.rb +42 -0
  43. data/spec/models/credit_details_spec.rb +32 -0
  44. data/spec/models/credit_type_enum_spec.rb +30 -0
  45. data/spec/models/discount_details_spec.rb +0 -4
  46. data/spec/models/discount_type_enum_spec.rb +30 -0
  47. data/spec/models/gpu_configuration_metadata_spec.rb +42 -0
  48. data/spec/models/operating_system_record_spec.rb +6 -4
  49. data/spec/models/promo_credit_details_spec.rb +54 -0
  50. data/spec/models/public_subnet_record_spec.rb +6 -4
  51. data/spec/models/rated_usage_product_category_enum_spec.rb +30 -0
  52. data/spec/models/rated_usage_record_spec.rb +6 -4
  53. data/spec/models/server_product_metadata_spec.rb +6 -0
  54. data/spec/models/server_record_spec.rb +6 -4
  55. data/spec/models/storage_record_spec.rb +6 -4
  56. data/spec/models/system_credit_cause_enum_spec.rb +30 -0
  57. data/spec/models/system_credit_details_spec.rb +48 -0
  58. metadata +67 -31
@@ -0,0 +1,283 @@
1
+ =begin
2
+ #Billing API
3
+
4
+ #Automate your infrastructure billing with the Bare Metal Cloud Billing API. Reserve your server instances to ensure guaranteed resource availability for 12, 24, and 36 months. Retrieve your server’s rated usage for a given period and enable or disable auto-renewals.<br> <br> <span class='pnap-api-knowledge-base-link'> Knowledge base articles to help you can be found <a href='https://phoenixnap.com/kb/phoenixnap-bare-metal-cloud-billing-models' target='_blank'>here</a> </span><br> <br> <b>All URLs are relative to (https://api.phoenixnap.com/billing/v1/)</b>
5
+
6
+ The version of the OpenAPI document: 0.1
7
+ Contact: support@phoenixnap.com
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 7.2.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module BillingApi
17
+ class SystemCreditDetails
18
+ # Amount applied.
19
+ attr_accessor :applied_amount
20
+
21
+ attr_accessor :type
22
+
23
+ attr_accessor :cause
24
+
25
+ class EnumAttributeValidator
26
+ attr_reader :datatype
27
+ attr_reader :allowable_values
28
+
29
+ def initialize(datatype, allowable_values)
30
+ @allowable_values = allowable_values.map do |value|
31
+ case datatype.to_s
32
+ when /Integer/i
33
+ value.to_i
34
+ when /Float/i
35
+ value.to_f
36
+ else
37
+ value
38
+ end
39
+ end
40
+ end
41
+
42
+ def valid?(value)
43
+ !value || allowable_values.include?(value)
44
+ end
45
+ end
46
+
47
+ # Attribute mapping from ruby-style variable name to JSON key.
48
+ def self.attribute_map
49
+ {
50
+ :'applied_amount' => :'appliedAmount',
51
+ :'type' => :'type',
52
+ :'cause' => :'cause'
53
+ }
54
+ end
55
+
56
+ # Returns all the JSON keys this model knows about
57
+ def self.acceptable_attributes
58
+ attribute_map.values
59
+ end
60
+
61
+ # Attribute type mapping.
62
+ def self.openapi_types
63
+ {
64
+ :'applied_amount' => :'Float',
65
+ :'type' => :'CreditTypeEnum',
66
+ :'cause' => :'SystemCreditCauseEnum'
67
+ }
68
+ end
69
+
70
+ # List of attributes with nullable: true
71
+ def self.openapi_nullable
72
+ Set.new([
73
+ ])
74
+ end
75
+
76
+ # List of class defined in allOf (OpenAPI v3)
77
+ def self.openapi_all_of
78
+ [
79
+ :'CreditDetailsBase'
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 `BillingApi::SystemCreditDetails` initialize method"
88
+ end
89
+
90
+ # check to see if the attribute exists and convert string to symbol for hash key
91
+ attributes = attributes.each_with_object({}) { |(k, v), h|
92
+ if (!self.class.attribute_map.key?(k.to_sym))
93
+ fail ArgumentError, "`#{k}` is not a valid attribute in `BillingApi::SystemCreditDetails`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
94
+ end
95
+ h[k.to_sym] = v
96
+ }
97
+
98
+ if attributes.key?(:'applied_amount')
99
+ self.applied_amount = attributes[:'applied_amount']
100
+ else
101
+ self.applied_amount = nil
102
+ end
103
+
104
+ if attributes.key?(:'type')
105
+ self.type = attributes[:'type']
106
+ else
107
+ self.type = nil
108
+ end
109
+
110
+ if attributes.key?(:'cause')
111
+ self.cause = attributes[:'cause']
112
+ else
113
+ self.cause = nil
114
+ end
115
+ end
116
+
117
+ # Show invalid properties with the reasons. Usually used together with valid?
118
+ # @return Array for valid properties with the reasons
119
+ def list_invalid_properties
120
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
121
+ invalid_properties = Array.new
122
+ if @applied_amount.nil?
123
+ invalid_properties.push('invalid value for "applied_amount", applied_amount cannot be nil.')
124
+ end
125
+
126
+ if @type.nil?
127
+ invalid_properties.push('invalid value for "type", type cannot be nil.')
128
+ end
129
+
130
+ if @cause.nil?
131
+ invalid_properties.push('invalid value for "cause", cause cannot be nil.')
132
+ end
133
+
134
+ invalid_properties
135
+ end
136
+
137
+ # Check to see if the all the properties in the model are valid
138
+ # @return true if the model is valid
139
+ def valid?
140
+ warn '[DEPRECATED] the `valid?` method is obsolete'
141
+ return false if @applied_amount.nil?
142
+ return false if @type.nil?
143
+ return false if @cause.nil?
144
+ true
145
+ end
146
+
147
+ # Checks equality by comparing each attribute.
148
+ # @param [Object] Object to be compared
149
+ def ==(o)
150
+ return true if self.equal?(o)
151
+ self.class == o.class &&
152
+ applied_amount == o.applied_amount &&
153
+ type == o.type &&
154
+ cause == o.cause
155
+ end
156
+
157
+ # @see the `==` method
158
+ # @param [Object] Object to be compared
159
+ def eql?(o)
160
+ self == o
161
+ end
162
+
163
+ # Calculates hash code according to all attributes.
164
+ # @return [Integer] Hash code
165
+ def hash
166
+ [applied_amount, type, cause].hash
167
+ end
168
+
169
+ # Builds the object from hash
170
+ # @param [Hash] attributes Model attributes in the form of hash
171
+ # @return [Object] Returns the model itself
172
+ def self.build_from_hash(attributes)
173
+ return nil unless attributes.is_a?(Hash)
174
+ attributes = attributes.transform_keys(&:to_sym)
175
+ transformed_hash = {}
176
+ openapi_types.each_pair do |key, type|
177
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
178
+ transformed_hash["#{key}"] = nil
179
+ elsif type =~ /\AArray<(.*)>/i
180
+ # check to ensure the input is an array given that the attribute
181
+ # is documented as an array but the input is not
182
+ if attributes[attribute_map[key]].is_a?(Array)
183
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
184
+ end
185
+ elsif !attributes[attribute_map[key]].nil?
186
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
187
+ end
188
+ end
189
+ new(transformed_hash)
190
+ end
191
+
192
+ # Deserializes the data based on type
193
+ # @param string type Data type
194
+ # @param string value Value to be deserialized
195
+ # @return [Object] Deserialized data
196
+ def self._deserialize(type, value)
197
+ case type.to_sym
198
+ when :Time
199
+ Time.parse(value)
200
+ when :Date
201
+ Date.parse(value)
202
+ when :String
203
+ value.to_s
204
+ when :Integer
205
+ value.to_i
206
+ when :Float
207
+ value.to_f
208
+ when :Boolean
209
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
210
+ true
211
+ else
212
+ false
213
+ end
214
+ when :Object
215
+ # generic object (usually a Hash), return directly
216
+ value
217
+ when /\AArray<(?<inner_type>.+)>\z/
218
+ inner_type = Regexp.last_match[:inner_type]
219
+ value.map { |v| _deserialize(inner_type, v) }
220
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
221
+ k_type = Regexp.last_match[:k_type]
222
+ v_type = Regexp.last_match[:v_type]
223
+ {}.tap do |hash|
224
+ value.each do |k, v|
225
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
226
+ end
227
+ end
228
+ else # model
229
+ # models (e.g. Pet) or oneOf
230
+ klass = BillingApi.const_get(type)
231
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
232
+ end
233
+ end
234
+
235
+ # Returns the string representation of the object
236
+ # @return [String] String presentation of the object
237
+ def to_s
238
+ to_hash.to_s
239
+ end
240
+
241
+ # to_body is an alias to to_hash (backward compatibility)
242
+ # @return [Hash] Returns the object in the form of hash
243
+ def to_body
244
+ to_hash
245
+ end
246
+
247
+ # Returns the object in the form of hash
248
+ # @return [Hash] Returns the object in the form of hash
249
+ def to_hash
250
+ hash = {}
251
+ self.class.attribute_map.each_pair do |attr, param|
252
+ value = self.send(attr)
253
+ if value.nil?
254
+ is_nullable = self.class.openapi_nullable.include?(attr)
255
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
256
+ end
257
+
258
+ hash[param] = _to_hash(value)
259
+ end
260
+ hash
261
+ end
262
+
263
+ # Outputs non-array value in the form of hash
264
+ # For object, use to_hash. Otherwise, just return the value
265
+ # @param [Object] value Any valid value
266
+ # @return [Hash] Returns the value in the form of hash
267
+ def _to_hash(value)
268
+ if value.is_a?(Array)
269
+ value.compact.map { |v| _to_hash(v) }
270
+ elsif value.is_a?(Hash)
271
+ {}.tap do |hash|
272
+ value.each { |k, v| hash[k] = _to_hash(v) }
273
+ end
274
+ elsif value.respond_to? :to_hash
275
+ value.to_hash
276
+ else
277
+ value
278
+ end
279
+ end
280
+
281
+ end
282
+
283
+ end
@@ -21,8 +21,13 @@ require 'pnap_billing_api/models/applicable_discounts'
21
21
  require 'pnap_billing_api/models/bandwidth_details'
22
22
  require 'pnap_billing_api/models/bandwidth_record'
23
23
  require 'pnap_billing_api/models/configuration_details'
24
+ require 'pnap_billing_api/models/credit_details'
25
+ require 'pnap_billing_api/models/credit_details_base'
26
+ require 'pnap_billing_api/models/credit_type_enum'
24
27
  require 'pnap_billing_api/models/discount_details'
28
+ require 'pnap_billing_api/models/discount_type_enum'
25
29
  require 'pnap_billing_api/models/error'
30
+ require 'pnap_billing_api/models/gpu_configuration_metadata'
26
31
  require 'pnap_billing_api/models/location_availability_detail'
27
32
  require 'pnap_billing_api/models/location_enum'
28
33
  require 'pnap_billing_api/models/operating_system_details'
@@ -34,9 +39,11 @@ require 'pnap_billing_api/models/product'
34
39
  require 'pnap_billing_api/models/product_availability'
35
40
  require 'pnap_billing_api/models/product_category_enum'
36
41
  require 'pnap_billing_api/models/products_get200_response_inner'
42
+ require 'pnap_billing_api/models/promo_credit_details'
37
43
  require 'pnap_billing_api/models/public_subnet_details'
38
44
  require 'pnap_billing_api/models/public_subnet_record'
39
45
  require 'pnap_billing_api/models/rated_usage_get200_response_inner'
46
+ require 'pnap_billing_api/models/rated_usage_product_category_enum'
40
47
  require 'pnap_billing_api/models/rated_usage_record'
41
48
  require 'pnap_billing_api/models/reservation'
42
49
  require 'pnap_billing_api/models/reservation_auto_renew_disable_request'
@@ -50,6 +57,8 @@ require 'pnap_billing_api/models/server_product_metadata'
50
57
  require 'pnap_billing_api/models/server_record'
51
58
  require 'pnap_billing_api/models/storage_details'
52
59
  require 'pnap_billing_api/models/storage_record'
60
+ require 'pnap_billing_api/models/system_credit_cause_enum'
61
+ require 'pnap_billing_api/models/system_credit_details'
53
62
  require 'pnap_billing_api/models/threshold_configuration_details'
54
63
 
55
64
  # APIs
@@ -36,10 +36,6 @@ describe BillingApi::BandwidthRecord do
36
36
  describe 'test attribute "product_category"' do
37
37
  it 'should work' do
38
38
  # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
39
- # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["bmc-server", "bandwidth", "operating-system", "public-ip", "storage"])
40
- # validator.allowable_values.each do |value|
41
- # expect { instance.product_category = value }.not_to raise_error
42
- # end
43
39
  end
44
40
  end
45
41
 
@@ -145,6 +141,12 @@ describe BillingApi::BandwidthRecord do
145
141
  end
146
142
  end
147
143
 
144
+ describe 'test attribute "credit_details"' do
145
+ it 'should work' do
146
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
147
+ end
148
+ end
149
+
148
150
  describe 'test attribute "metadata"' do
149
151
  it 'should work' do
150
152
  # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
@@ -0,0 +1,42 @@
1
+ =begin
2
+ #Billing API
3
+
4
+ #Automate your infrastructure billing with the Bare Metal Cloud Billing API. Reserve your server instances to ensure guaranteed resource availability for 12, 24, and 36 months. Retrieve your server’s rated usage for a given period and enable or disable auto-renewals.<br> <br> <span class='pnap-api-knowledge-base-link'> Knowledge base articles to help you can be found <a href='https://phoenixnap.com/kb/phoenixnap-bare-metal-cloud-billing-models' target='_blank'>here</a> </span><br> <br> <b>All URLs are relative to (https://api.phoenixnap.com/billing/v1/)</b>
5
+
6
+ The version of the OpenAPI document: 0.1
7
+ Contact: support@phoenixnap.com
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 7.2.0
10
+
11
+ =end
12
+
13
+ require 'spec_helper'
14
+ require 'json'
15
+ require 'date'
16
+
17
+ # Unit tests for BillingApi::CreditDetailsBase
18
+ # Automatically generated by openapi-generator (https://openapi-generator.tech)
19
+ # Please update as you see appropriate
20
+ describe BillingApi::CreditDetailsBase do
21
+ let(:instance) { BillingApi::CreditDetailsBase.new }
22
+
23
+ describe 'test an instance of CreditDetailsBase' do
24
+ it 'should create an instance of CreditDetailsBase' do
25
+ # uncomment below to test the instance creation
26
+ #expect(instance).to be_instance_of(BillingApi::CreditDetailsBase)
27
+ end
28
+ end
29
+
30
+ describe 'test attribute "applied_amount"' do
31
+ it 'should work' do
32
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
33
+ end
34
+ end
35
+
36
+ describe 'test attribute "type"' do
37
+ it 'should work' do
38
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
39
+ end
40
+ end
41
+
42
+ end
@@ -0,0 +1,32 @@
1
+ =begin
2
+ #Billing API
3
+
4
+ #Automate your infrastructure billing with the Bare Metal Cloud Billing API. Reserve your server instances to ensure guaranteed resource availability for 12, 24, and 36 months. Retrieve your server’s rated usage for a given period and enable or disable auto-renewals.<br> <br> <span class='pnap-api-knowledge-base-link'> Knowledge base articles to help you can be found <a href='https://phoenixnap.com/kb/phoenixnap-bare-metal-cloud-billing-models' target='_blank'>here</a> </span><br> <br> <b>All URLs are relative to (https://api.phoenixnap.com/billing/v1/)</b>
5
+
6
+ The version of the OpenAPI document: 0.1
7
+ Contact: support@phoenixnap.com
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 7.2.0
10
+
11
+ =end
12
+
13
+ require 'spec_helper'
14
+ require 'json'
15
+ require 'date'
16
+
17
+ # Unit tests for BillingApi::CreditDetails
18
+ # Automatically generated by openapi-generator (https://openapi-generator.tech)
19
+ # Please update as you see appropriate
20
+ describe BillingApi::CreditDetails do
21
+ describe '.openapi_one_of' do
22
+ it 'lists the items referenced in the oneOf array' do
23
+ expect(described_class.openapi_one_of).to_not be_empty
24
+ end
25
+ end
26
+
27
+ describe '.build' do
28
+ it 'returns the correct model' do
29
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
30
+ end
31
+ end
32
+ end
@@ -0,0 +1,30 @@
1
+ =begin
2
+ #Billing API
3
+
4
+ #Automate your infrastructure billing with the Bare Metal Cloud Billing API. Reserve your server instances to ensure guaranteed resource availability for 12, 24, and 36 months. Retrieve your server’s rated usage for a given period and enable or disable auto-renewals.<br> <br> <span class='pnap-api-knowledge-base-link'> Knowledge base articles to help you can be found <a href='https://phoenixnap.com/kb/phoenixnap-bare-metal-cloud-billing-models' target='_blank'>here</a> </span><br> <br> <b>All URLs are relative to (https://api.phoenixnap.com/billing/v1/)</b>
5
+
6
+ The version of the OpenAPI document: 0.1
7
+ Contact: support@phoenixnap.com
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 7.2.0
10
+
11
+ =end
12
+
13
+ require 'spec_helper'
14
+ require 'json'
15
+ require 'date'
16
+
17
+ # Unit tests for BillingApi::CreditTypeEnum
18
+ # Automatically generated by openapi-generator (https://openapi-generator.tech)
19
+ # Please update as you see appropriate
20
+ describe BillingApi::CreditTypeEnum do
21
+ let(:instance) { BillingApi::CreditTypeEnum.new }
22
+
23
+ describe 'test an instance of CreditTypeEnum' do
24
+ it 'should create an instance of CreditTypeEnum' do
25
+ # uncomment below to test the instance creation
26
+ #expect(instance).to be_instance_of(BillingApi::CreditTypeEnum)
27
+ end
28
+ end
29
+
30
+ end
@@ -36,10 +36,6 @@ describe BillingApi::DiscountDetails do
36
36
  describe 'test attribute "type"' do
37
37
  it 'should work' do
38
38
  # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
39
- # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["PRODUCT_CATEGORY_PERCENTAGE", "GLOBAL_PERCENTAGE"])
40
- # validator.allowable_values.each do |value|
41
- # expect { instance.type = value }.not_to raise_error
42
- # end
43
39
  end
44
40
  end
45
41
 
@@ -0,0 +1,30 @@
1
+ =begin
2
+ #Billing API
3
+
4
+ #Automate your infrastructure billing with the Bare Metal Cloud Billing API. Reserve your server instances to ensure guaranteed resource availability for 12, 24, and 36 months. Retrieve your server’s rated usage for a given period and enable or disable auto-renewals.<br> <br> <span class='pnap-api-knowledge-base-link'> Knowledge base articles to help you can be found <a href='https://phoenixnap.com/kb/phoenixnap-bare-metal-cloud-billing-models' target='_blank'>here</a> </span><br> <br> <b>All URLs are relative to (https://api.phoenixnap.com/billing/v1/)</b>
5
+
6
+ The version of the OpenAPI document: 0.1
7
+ Contact: support@phoenixnap.com
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 7.2.0
10
+
11
+ =end
12
+
13
+ require 'spec_helper'
14
+ require 'json'
15
+ require 'date'
16
+
17
+ # Unit tests for BillingApi::DiscountTypeEnum
18
+ # Automatically generated by openapi-generator (https://openapi-generator.tech)
19
+ # Please update as you see appropriate
20
+ describe BillingApi::DiscountTypeEnum do
21
+ let(:instance) { BillingApi::DiscountTypeEnum.new }
22
+
23
+ describe 'test an instance of DiscountTypeEnum' do
24
+ it 'should create an instance of DiscountTypeEnum' do
25
+ # uncomment below to test the instance creation
26
+ #expect(instance).to be_instance_of(BillingApi::DiscountTypeEnum)
27
+ end
28
+ end
29
+
30
+ end
@@ -0,0 +1,42 @@
1
+ =begin
2
+ #Billing API
3
+
4
+ #Automate your infrastructure billing with the Bare Metal Cloud Billing API. Reserve your server instances to ensure guaranteed resource availability for 12, 24, and 36 months. Retrieve your server’s rated usage for a given period and enable or disable auto-renewals.<br> <br> <span class='pnap-api-knowledge-base-link'> Knowledge base articles to help you can be found <a href='https://phoenixnap.com/kb/phoenixnap-bare-metal-cloud-billing-models' target='_blank'>here</a> </span><br> <br> <b>All URLs are relative to (https://api.phoenixnap.com/billing/v1/)</b>
5
+
6
+ The version of the OpenAPI document: 0.1
7
+ Contact: support@phoenixnap.com
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 7.2.0
10
+
11
+ =end
12
+
13
+ require 'spec_helper'
14
+ require 'json'
15
+ require 'date'
16
+
17
+ # Unit tests for BillingApi::GpuConfigurationMetadata
18
+ # Automatically generated by openapi-generator (https://openapi-generator.tech)
19
+ # Please update as you see appropriate
20
+ describe BillingApi::GpuConfigurationMetadata do
21
+ let(:instance) { BillingApi::GpuConfigurationMetadata.new }
22
+
23
+ describe 'test an instance of GpuConfigurationMetadata' do
24
+ it 'should create an instance of GpuConfigurationMetadata' do
25
+ # uncomment below to test the instance creation
26
+ #expect(instance).to be_instance_of(BillingApi::GpuConfigurationMetadata)
27
+ end
28
+ end
29
+
30
+ describe 'test attribute "count"' do
31
+ it 'should work' do
32
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
33
+ end
34
+ end
35
+
36
+ describe 'test attribute "name"' do
37
+ it 'should work' do
38
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
39
+ end
40
+ end
41
+
42
+ end
@@ -36,10 +36,6 @@ describe BillingApi::OperatingSystemRecord do
36
36
  describe 'test attribute "product_category"' do
37
37
  it 'should work' do
38
38
  # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
39
- # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["bmc-server", "bandwidth", "operating-system", "public-ip", "storage"])
40
- # validator.allowable_values.each do |value|
41
- # expect { instance.product_category = value }.not_to raise_error
42
- # end
43
39
  end
44
40
  end
45
41
 
@@ -145,6 +141,12 @@ describe BillingApi::OperatingSystemRecord do
145
141
  end
146
142
  end
147
143
 
144
+ describe 'test attribute "credit_details"' do
145
+ it 'should work' do
146
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
147
+ end
148
+ end
149
+
148
150
  describe 'test attribute "metadata"' do
149
151
  it 'should work' do
150
152
  # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
@@ -0,0 +1,54 @@
1
+ =begin
2
+ #Billing API
3
+
4
+ #Automate your infrastructure billing with the Bare Metal Cloud Billing API. Reserve your server instances to ensure guaranteed resource availability for 12, 24, and 36 months. Retrieve your server’s rated usage for a given period and enable or disable auto-renewals.<br> <br> <span class='pnap-api-knowledge-base-link'> Knowledge base articles to help you can be found <a href='https://phoenixnap.com/kb/phoenixnap-bare-metal-cloud-billing-models' target='_blank'>here</a> </span><br> <br> <b>All URLs are relative to (https://api.phoenixnap.com/billing/v1/)</b>
5
+
6
+ The version of the OpenAPI document: 0.1
7
+ Contact: support@phoenixnap.com
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 7.2.0
10
+
11
+ =end
12
+
13
+ require 'spec_helper'
14
+ require 'json'
15
+ require 'date'
16
+
17
+ # Unit tests for BillingApi::PromoCreditDetails
18
+ # Automatically generated by openapi-generator (https://openapi-generator.tech)
19
+ # Please update as you see appropriate
20
+ describe BillingApi::PromoCreditDetails do
21
+ let(:instance) { BillingApi::PromoCreditDetails.new }
22
+
23
+ describe 'test an instance of PromoCreditDetails' do
24
+ it 'should create an instance of PromoCreditDetails' do
25
+ # uncomment below to test the instance creation
26
+ #expect(instance).to be_instance_of(BillingApi::PromoCreditDetails)
27
+ end
28
+ end
29
+
30
+ describe 'test attribute "applied_amount"' do
31
+ it 'should work' do
32
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
33
+ end
34
+ end
35
+
36
+ describe 'test attribute "type"' do
37
+ it 'should work' do
38
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
39
+ end
40
+ end
41
+
42
+ describe 'test attribute "coupon_id"' 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
+ describe 'test attribute "coupon_code"' do
49
+ it 'should work' do
50
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
51
+ end
52
+ end
53
+
54
+ end
@@ -36,10 +36,6 @@ describe BillingApi::PublicSubnetRecord do
36
36
  describe 'test attribute "product_category"' do
37
37
  it 'should work' do
38
38
  # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
39
- # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["bmc-server", "bandwidth", "operating-system", "public-ip", "storage"])
40
- # validator.allowable_values.each do |value|
41
- # expect { instance.product_category = value }.not_to raise_error
42
- # end
43
39
  end
44
40
  end
45
41
 
@@ -145,6 +141,12 @@ describe BillingApi::PublicSubnetRecord do
145
141
  end
146
142
  end
147
143
 
144
+ describe 'test attribute "credit_details"' do
145
+ it 'should work' do
146
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
147
+ end
148
+ end
149
+
148
150
  describe 'test attribute "metadata"' do
149
151
  it 'should work' do
150
152
  # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
@@ -0,0 +1,30 @@
1
+ =begin
2
+ #Billing API
3
+
4
+ #Automate your infrastructure billing with the Bare Metal Cloud Billing API. Reserve your server instances to ensure guaranteed resource availability for 12, 24, and 36 months. Retrieve your server’s rated usage for a given period and enable or disable auto-renewals.<br> <br> <span class='pnap-api-knowledge-base-link'> Knowledge base articles to help you can be found <a href='https://phoenixnap.com/kb/phoenixnap-bare-metal-cloud-billing-models' target='_blank'>here</a> </span><br> <br> <b>All URLs are relative to (https://api.phoenixnap.com/billing/v1/)</b>
5
+
6
+ The version of the OpenAPI document: 0.1
7
+ Contact: support@phoenixnap.com
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 7.2.0
10
+
11
+ =end
12
+
13
+ require 'spec_helper'
14
+ require 'json'
15
+ require 'date'
16
+
17
+ # Unit tests for BillingApi::RatedUsageProductCategoryEnum
18
+ # Automatically generated by openapi-generator (https://openapi-generator.tech)
19
+ # Please update as you see appropriate
20
+ describe BillingApi::RatedUsageProductCategoryEnum do
21
+ let(:instance) { BillingApi::RatedUsageProductCategoryEnum.new }
22
+
23
+ describe 'test an instance of RatedUsageProductCategoryEnum' do
24
+ it 'should create an instance of RatedUsageProductCategoryEnum' do
25
+ # uncomment below to test the instance creation
26
+ #expect(instance).to be_instance_of(BillingApi::RatedUsageProductCategoryEnum)
27
+ end
28
+ end
29
+
30
+ end