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
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 999eb5be48a625ceef0bf6608b79094d75a012bf629530f7e2b925afaeffd5d3
4
- data.tar.gz: f807fa97dda2f0a5259a0fc7c453fd68ff02c11b6d944b1f10b2b45b2a04bfb7
3
+ metadata.gz: f37221728fd67758c8f6e22385aac200fc51443a7bb27973387e73165c8864b4
4
+ data.tar.gz: 9d84e2136af8a8d6a0230406f5d66e5c175b5f95877343875c3ee2ff0d5ba863
5
5
  SHA512:
6
- metadata.gz: 5520f6870ceb9469ef9b8c21a369a37d21ad09bf51779a4b389bb7ddbbca0c833d6d7a6ee16e3d156017c52c83b3ccaadeebc89a65cf98474d18c017f76965b0
7
- data.tar.gz: 3cdc30553d4f6a1feb8ef943d6c09996d3a386d7c1ae913235ea7f4cd41d65a22427233cd4648bc32527199a001b4fb314e61c367b96ba7cf59ee5322f764fa3
6
+ metadata.gz: 42f4b44a38abe4a19d65e1e1321c4758b3f4734753e71a365f1854e682caefd1695e29e21a501d6c56fb027fc0ca285827861b1662ebe1333df451d8876787ea
7
+ data.tar.gz: c247691e4182530559aac6d193926307c0f65043b3077cc87dc4c963ab8a19ff1409d7405e14136cd46d817544b108fb2944cd0aefd993ac04662b665daab36d
data/README.md CHANGED
@@ -141,8 +141,13 @@ Class | Method | HTTP request | Description
141
141
  - [BillingApi::BandwidthDetails](docs/BandwidthDetails.md)
142
142
  - [BillingApi::BandwidthRecord](docs/BandwidthRecord.md)
143
143
  - [BillingApi::ConfigurationDetails](docs/ConfigurationDetails.md)
144
+ - [BillingApi::CreditDetails](docs/CreditDetails.md)
145
+ - [BillingApi::CreditDetailsBase](docs/CreditDetailsBase.md)
146
+ - [BillingApi::CreditTypeEnum](docs/CreditTypeEnum.md)
144
147
  - [BillingApi::DiscountDetails](docs/DiscountDetails.md)
148
+ - [BillingApi::DiscountTypeEnum](docs/DiscountTypeEnum.md)
145
149
  - [BillingApi::Error](docs/Error.md)
150
+ - [BillingApi::GpuConfigurationMetadata](docs/GpuConfigurationMetadata.md)
146
151
  - [BillingApi::LocationAvailabilityDetail](docs/LocationAvailabilityDetail.md)
147
152
  - [BillingApi::LocationEnum](docs/LocationEnum.md)
148
153
  - [BillingApi::OperatingSystemDetails](docs/OperatingSystemDetails.md)
@@ -154,9 +159,11 @@ Class | Method | HTTP request | Description
154
159
  - [BillingApi::ProductAvailability](docs/ProductAvailability.md)
155
160
  - [BillingApi::ProductCategoryEnum](docs/ProductCategoryEnum.md)
156
161
  - [BillingApi::ProductsGet200ResponseInner](docs/ProductsGet200ResponseInner.md)
162
+ - [BillingApi::PromoCreditDetails](docs/PromoCreditDetails.md)
157
163
  - [BillingApi::PublicSubnetDetails](docs/PublicSubnetDetails.md)
158
164
  - [BillingApi::PublicSubnetRecord](docs/PublicSubnetRecord.md)
159
165
  - [BillingApi::RatedUsageGet200ResponseInner](docs/RatedUsageGet200ResponseInner.md)
166
+ - [BillingApi::RatedUsageProductCategoryEnum](docs/RatedUsageProductCategoryEnum.md)
160
167
  - [BillingApi::RatedUsageRecord](docs/RatedUsageRecord.md)
161
168
  - [BillingApi::Reservation](docs/Reservation.md)
162
169
  - [BillingApi::ReservationAutoRenewDisableRequest](docs/ReservationAutoRenewDisableRequest.md)
@@ -170,6 +177,8 @@ Class | Method | HTTP request | Description
170
177
  - [BillingApi::ServerRecord](docs/ServerRecord.md)
171
178
  - [BillingApi::StorageDetails](docs/StorageDetails.md)
172
179
  - [BillingApi::StorageRecord](docs/StorageRecord.md)
180
+ - [BillingApi::SystemCreditCauseEnum](docs/SystemCreditCauseEnum.md)
181
+ - [BillingApi::SystemCreditDetails](docs/SystemCreditDetails.md)
173
182
  - [BillingApi::ThresholdConfigurationDetails](docs/ThresholdConfigurationDetails.md)
174
183
 
175
184
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 2.0.0
1
+ 2.1.0
@@ -5,7 +5,7 @@
5
5
  | Name | Type | Description | Notes |
6
6
  | ---- | ---- | ----------- | ----- |
7
7
  | **id** | **String** | The unique identifier of the rated usage record. | |
8
- | **product_category** | **String** | The category of the product associated with this usage record. | |
8
+ | **product_category** | [**RatedUsageProductCategoryEnum**](RatedUsageProductCategoryEnum.md) | | |
9
9
  | **product_code** | **String** | The code identifying the product associated to this usage record. | |
10
10
  | **location** | [**LocationEnum**](LocationEnum.md) | | |
11
11
  | **year_month** | **String** | Year and month of the usage record. | [optional] |
@@ -23,6 +23,7 @@
23
23
  | **correlation_id** | **String** | Holds usage record id | |
24
24
  | **reservation_id** | **String** | Reservation id associated with this rated usage record. | [optional] |
25
25
  | **discount_details** | [**DiscountDetails**](DiscountDetails.md) | | [optional] |
26
+ | **credit_details** | [**Array<CreditDetails>**](CreditDetails.md) | | [optional] |
26
27
  | **metadata** | [**BandwidthDetails**](BandwidthDetails.md) | | |
27
28
 
28
29
  ## Example
@@ -32,7 +33,7 @@ require 'pnap_billing_api'
32
33
 
33
34
  instance = BillingApi::BandwidthRecord.new(
34
35
  id: ec4a9d49-1cef-49e9-b85e-b560f88bcd26,
35
- product_category: bmc-server,
36
+ product_category: null,
36
37
  product_code: s1.c1.small,
37
38
  location: null,
38
39
  year_month: 2020-03,
@@ -50,6 +51,7 @@ instance = BillingApi::BandwidthRecord.new(
50
51
  correlation_id: ec4a9d49-1cef-49e9-b85e-b560f88bcd26,
51
52
  reservation_id: c32a24a1-5949-4b60-99c0-c8aaa3a92b04,
52
53
  discount_details: null,
54
+ credit_details: null,
53
55
  metadata: null
54
56
  )
55
57
  ```
@@ -0,0 +1,49 @@
1
+ # BillingApi::CreditDetails
2
+
3
+ ## Class instance methods
4
+
5
+ ### `openapi_one_of`
6
+
7
+ Returns the list of classes defined in oneOf.
8
+
9
+ #### Example
10
+
11
+ ```ruby
12
+ require 'pnap_billing_api'
13
+
14
+ BillingApi::CreditDetails.openapi_one_of
15
+ # =>
16
+ # [
17
+ # :'PromoCreditDetails',
18
+ # :'SystemCreditDetails'
19
+ # ]
20
+ ```
21
+
22
+ ### build
23
+
24
+ Find the appropriate object from the `openapi_one_of` list and casts the data into it.
25
+
26
+ #### Example
27
+
28
+ ```ruby
29
+ require 'pnap_billing_api'
30
+
31
+ BillingApi::CreditDetails.build(data)
32
+ # => #<PromoCreditDetails:0x00007fdd4aab02a0>
33
+
34
+ BillingApi::CreditDetails.build(data_that_doesnt_match)
35
+ # => nil
36
+ ```
37
+
38
+ #### Parameters
39
+
40
+ | Name | Type | Description |
41
+ | ---- | ---- | ----------- |
42
+ | **data** | **Mixed** | data to be matched against the list of oneOf items |
43
+
44
+ #### Return type
45
+
46
+ - `PromoCreditDetails`
47
+ - `SystemCreditDetails`
48
+ - `nil` (if no type matches)
49
+
@@ -0,0 +1,20 @@
1
+ # BillingApi::CreditDetailsBase
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **applied_amount** | **Float** | Amount applied. | |
8
+ | **type** | [**CreditTypeEnum**](CreditTypeEnum.md) | | |
9
+
10
+ ## Example
11
+
12
+ ```ruby
13
+ require 'pnap_billing_api'
14
+
15
+ instance = BillingApi::CreditDetailsBase.new(
16
+ applied_amount: 50,
17
+ type: null
18
+ )
19
+ ```
20
+
@@ -0,0 +1,15 @@
1
+ # BillingApi::CreditTypeEnum
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+
8
+ ## Example
9
+
10
+ ```ruby
11
+ require 'pnap_billing_api'
12
+
13
+ instance = BillingApi::CreditTypeEnum.new()
14
+ ```
15
+
@@ -5,7 +5,7 @@
5
5
  | Name | Type | Description | Notes |
6
6
  | ---- | ---- | ----------- | ----- |
7
7
  | **code** | **String** | A unique code associated with the discount. | |
8
- | **type** | **String** | The type of discount applied. | |
8
+ | **type** | [**DiscountTypeEnum**](DiscountTypeEnum.md) | | |
9
9
  | **value** | **Float** | The value or amount of the discount. The interpretation of this value depends on the &#39;type&#39; of discount. | |
10
10
 
11
11
  ## Example
@@ -15,7 +15,7 @@ require 'pnap_billing_api'
15
15
 
16
16
  instance = BillingApi::DiscountDetails.new(
17
17
  code: new-year-2022-monthly,
18
- type: PRODUCT_CATEGORY_PERCENTAGE,
18
+ type: null,
19
19
  value: 20.5
20
20
  )
21
21
  ```
@@ -0,0 +1,15 @@
1
+ # BillingApi::DiscountTypeEnum
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+
8
+ ## Example
9
+
10
+ ```ruby
11
+ require 'pnap_billing_api'
12
+
13
+ instance = BillingApi::DiscountTypeEnum.new()
14
+ ```
15
+
@@ -0,0 +1,20 @@
1
+ # BillingApi::GpuConfigurationMetadata
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **count** | **Float** | GPU card count. | [optional] |
8
+ | **name** | **String** | GPU name. | [optional] |
9
+
10
+ ## Example
11
+
12
+ ```ruby
13
+ require 'pnap_billing_api'
14
+
15
+ instance = BillingApi::GpuConfigurationMetadata.new(
16
+ count: 2,
17
+ name: Intel MAX 11000
18
+ )
19
+ ```
20
+
@@ -5,7 +5,7 @@
5
5
  | Name | Type | Description | Notes |
6
6
  | ---- | ---- | ----------- | ----- |
7
7
  | **id** | **String** | The unique identifier of the rated usage record. | |
8
- | **product_category** | **String** | The category of the product associated with this usage record. | |
8
+ | **product_category** | [**RatedUsageProductCategoryEnum**](RatedUsageProductCategoryEnum.md) | | |
9
9
  | **product_code** | **String** | The code identifying the product associated to this usage record. | |
10
10
  | **location** | [**LocationEnum**](LocationEnum.md) | | |
11
11
  | **year_month** | **String** | Year and month of the usage record. | [optional] |
@@ -23,6 +23,7 @@
23
23
  | **correlation_id** | **String** | Holds usage record id | |
24
24
  | **reservation_id** | **String** | Reservation id associated with this rated usage record. | [optional] |
25
25
  | **discount_details** | [**DiscountDetails**](DiscountDetails.md) | | [optional] |
26
+ | **credit_details** | [**Array&lt;CreditDetails&gt;**](CreditDetails.md) | | [optional] |
26
27
  | **metadata** | [**OperatingSystemDetails**](OperatingSystemDetails.md) | | |
27
28
 
28
29
  ## Example
@@ -32,7 +33,7 @@ require 'pnap_billing_api'
32
33
 
33
34
  instance = BillingApi::OperatingSystemRecord.new(
34
35
  id: ec4a9d49-1cef-49e9-b85e-b560f88bcd26,
35
- product_category: bmc-server,
36
+ product_category: null,
36
37
  product_code: s1.c1.small,
37
38
  location: null,
38
39
  year_month: 2020-03,
@@ -50,6 +51,7 @@ instance = BillingApi::OperatingSystemRecord.new(
50
51
  correlation_id: ec4a9d49-1cef-49e9-b85e-b560f88bcd26,
51
52
  reservation_id: c32a24a1-5949-4b60-99c0-c8aaa3a92b04,
52
53
  discount_details: null,
54
+ credit_details: null,
53
55
  metadata: null
54
56
  )
55
57
  ```
data/docs/PricingPlan.md CHANGED
@@ -23,8 +23,8 @@ require 'pnap_billing_api'
23
23
  instance = BillingApi::PricingPlan.new(
24
24
  sku: XXX-XXX-XXX,
25
25
  sku_description: Hourly Rate for s1.c1.small in Phoenix,
26
- location: PHX,
27
- pricing_model: HOURLY,
26
+ location: null,
27
+ pricing_model: null,
28
28
  price: 0.22,
29
29
  price_unit: null,
30
30
  applicable_discounts: null,
@@ -0,0 +1,24 @@
1
+ # BillingApi::PromoCreditDetails
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **applied_amount** | **Float** | Amount applied. | |
8
+ | **type** | [**CreditTypeEnum**](CreditTypeEnum.md) | | |
9
+ | **coupon_id** | **String** | Coupon id which is the source of the promo credit. | |
10
+ | **coupon_code** | **String** | Coupon code which is the source of the promo credit. | |
11
+
12
+ ## Example
13
+
14
+ ```ruby
15
+ require 'pnap_billing_api'
16
+
17
+ instance = BillingApi::PromoCreditDetails.new(
18
+ applied_amount: 50,
19
+ type: null,
20
+ coupon_id: 574845ca-53e6-4e6e-ae16-3ecd2a7d8508,
21
+ coupon_code: promo234
22
+ )
23
+ ```
24
+
@@ -5,7 +5,7 @@
5
5
  | Name | Type | Description | Notes |
6
6
  | ---- | ---- | ----------- | ----- |
7
7
  | **id** | **String** | The unique identifier of the rated usage record. | |
8
- | **product_category** | **String** | The category of the product associated with this usage record. | |
8
+ | **product_category** | [**RatedUsageProductCategoryEnum**](RatedUsageProductCategoryEnum.md) | | |
9
9
  | **product_code** | **String** | The code identifying the product associated to this usage record. | |
10
10
  | **location** | [**LocationEnum**](LocationEnum.md) | | |
11
11
  | **year_month** | **String** | Year and month of the usage record. | [optional] |
@@ -23,6 +23,7 @@
23
23
  | **correlation_id** | **String** | Holds usage record id | |
24
24
  | **reservation_id** | **String** | Reservation id associated with this rated usage record. | [optional] |
25
25
  | **discount_details** | [**DiscountDetails**](DiscountDetails.md) | | [optional] |
26
+ | **credit_details** | [**Array&lt;CreditDetails&gt;**](CreditDetails.md) | | [optional] |
26
27
  | **metadata** | [**PublicSubnetDetails**](PublicSubnetDetails.md) | | |
27
28
 
28
29
  ## Example
@@ -32,7 +33,7 @@ require 'pnap_billing_api'
32
33
 
33
34
  instance = BillingApi::PublicSubnetRecord.new(
34
35
  id: ec4a9d49-1cef-49e9-b85e-b560f88bcd26,
35
- product_category: bmc-server,
36
+ product_category: null,
36
37
  product_code: s1.c1.small,
37
38
  location: null,
38
39
  year_month: 2020-03,
@@ -50,6 +51,7 @@ instance = BillingApi::PublicSubnetRecord.new(
50
51
  correlation_id: ec4a9d49-1cef-49e9-b85e-b560f88bcd26,
51
52
  reservation_id: c32a24a1-5949-4b60-99c0-c8aaa3a92b04,
52
53
  discount_details: null,
54
+ credit_details: null,
53
55
  metadata: null
54
56
  )
55
57
  ```
@@ -0,0 +1,15 @@
1
+ # BillingApi::RatedUsageProductCategoryEnum
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+
8
+ ## Example
9
+
10
+ ```ruby
11
+ require 'pnap_billing_api'
12
+
13
+ instance = BillingApi::RatedUsageProductCategoryEnum.new()
14
+ ```
15
+
@@ -5,7 +5,7 @@
5
5
  | Name | Type | Description | Notes |
6
6
  | ---- | ---- | ----------- | ----- |
7
7
  | **id** | **String** | The unique identifier of the rated usage record. | |
8
- | **product_category** | **String** | The category of the product associated with this usage record. | |
8
+ | **product_category** | [**RatedUsageProductCategoryEnum**](RatedUsageProductCategoryEnum.md) | | |
9
9
  | **product_code** | **String** | The code identifying the product associated to this usage record. | |
10
10
  | **location** | [**LocationEnum**](LocationEnum.md) | | |
11
11
  | **year_month** | **String** | Year and month of the usage record. | [optional] |
@@ -23,6 +23,7 @@
23
23
  | **correlation_id** | **String** | Holds usage record id | |
24
24
  | **reservation_id** | **String** | Reservation id associated with this rated usage record. | [optional] |
25
25
  | **discount_details** | [**DiscountDetails**](DiscountDetails.md) | | [optional] |
26
+ | **credit_details** | [**Array&lt;CreditDetails&gt;**](CreditDetails.md) | | [optional] |
26
27
 
27
28
  ## Example
28
29
 
@@ -31,7 +32,7 @@ require 'pnap_billing_api'
31
32
 
32
33
  instance = BillingApi::RatedUsageRecord.new(
33
34
  id: ec4a9d49-1cef-49e9-b85e-b560f88bcd26,
34
- product_category: bmc-server,
35
+ product_category: null,
35
36
  product_code: s1.c1.small,
36
37
  location: null,
37
38
  year_month: 2020-03,
@@ -48,7 +49,8 @@ instance = BillingApi::RatedUsageRecord.new(
48
49
  usage_session_id: ec4a9d49-1cef-49e9-b85e-b560f88bcd26,
49
50
  correlation_id: ec4a9d49-1cef-49e9-b85e-b560f88bcd26,
50
51
  reservation_id: c32a24a1-5949-4b60-99c0-c8aaa3a92b04,
51
- discount_details: null
52
+ discount_details: null,
53
+ credit_details: null
52
54
  )
53
55
  ```
54
56
 
@@ -12,7 +12,7 @@
12
12
  require 'pnap_billing_api'
13
13
 
14
14
  instance = BillingApi::ReservationAutoRenewDisableRequest.new(
15
- auto_renew_disable_reason: null
15
+ auto_renew_disable_reason: It is not needed anymore.
16
16
  )
17
17
  ```
18
18
 
@@ -11,6 +11,7 @@
11
11
  | **cpu_frequency** | **Float** | CPU frequency in GHz. | |
12
12
  | **network** | **String** | Server network. | |
13
13
  | **storage** | **String** | Server storage. | |
14
+ | **gpu_configurations** | [**Array&lt;GpuConfigurationMetadata&gt;**](GpuConfigurationMetadata.md) | GPU configurations | [optional] |
14
15
 
15
16
  ## Example
16
17
 
@@ -24,7 +25,8 @@ instance = BillingApi::ServerProductMetadata.new(
24
25
  cores_per_cpu: 2,
25
26
  cpu_frequency: 2.7,
26
27
  network: 2x 25Gbps,
27
- storage: 2x 2TB NVMe
28
+ storage: 2x 2TB NVMe,
29
+ gpu_configurations: null
28
30
  )
29
31
  ```
30
32
 
data/docs/ServerRecord.md CHANGED
@@ -5,7 +5,7 @@
5
5
  | Name | Type | Description | Notes |
6
6
  | ---- | ---- | ----------- | ----- |
7
7
  | **id** | **String** | The unique identifier of the rated usage record. | |
8
- | **product_category** | **String** | The category of the product associated with this usage record. | |
8
+ | **product_category** | [**RatedUsageProductCategoryEnum**](RatedUsageProductCategoryEnum.md) | | |
9
9
  | **product_code** | **String** | The code identifying the product associated to this usage record. | |
10
10
  | **location** | [**LocationEnum**](LocationEnum.md) | | |
11
11
  | **year_month** | **String** | Year and month of the usage record. | [optional] |
@@ -23,6 +23,7 @@
23
23
  | **correlation_id** | **String** | Holds usage record id | |
24
24
  | **reservation_id** | **String** | Reservation id associated with this rated usage record. | [optional] |
25
25
  | **discount_details** | [**DiscountDetails**](DiscountDetails.md) | | [optional] |
26
+ | **credit_details** | [**Array&lt;CreditDetails&gt;**](CreditDetails.md) | | [optional] |
26
27
  | **metadata** | [**ServerDetails**](ServerDetails.md) | | |
27
28
 
28
29
  ## Example
@@ -32,7 +33,7 @@ require 'pnap_billing_api'
32
33
 
33
34
  instance = BillingApi::ServerRecord.new(
34
35
  id: ec4a9d49-1cef-49e9-b85e-b560f88bcd26,
35
- product_category: bmc-server,
36
+ product_category: null,
36
37
  product_code: s1.c1.small,
37
38
  location: null,
38
39
  year_month: 2020-03,
@@ -50,6 +51,7 @@ instance = BillingApi::ServerRecord.new(
50
51
  correlation_id: ec4a9d49-1cef-49e9-b85e-b560f88bcd26,
51
52
  reservation_id: c32a24a1-5949-4b60-99c0-c8aaa3a92b04,
52
53
  discount_details: null,
54
+ credit_details: null,
53
55
  metadata: null
54
56
  )
55
57
  ```
@@ -5,7 +5,7 @@
5
5
  | Name | Type | Description | Notes |
6
6
  | ---- | ---- | ----------- | ----- |
7
7
  | **id** | **String** | The unique identifier of the rated usage record. | |
8
- | **product_category** | **String** | The category of the product associated with this usage record. | |
8
+ | **product_category** | [**RatedUsageProductCategoryEnum**](RatedUsageProductCategoryEnum.md) | | |
9
9
  | **product_code** | **String** | The code identifying the product associated to this usage record. | |
10
10
  | **location** | [**LocationEnum**](LocationEnum.md) | | |
11
11
  | **year_month** | **String** | Year and month of the usage record. | [optional] |
@@ -23,6 +23,7 @@
23
23
  | **correlation_id** | **String** | Holds usage record id | |
24
24
  | **reservation_id** | **String** | Reservation id associated with this rated usage record. | [optional] |
25
25
  | **discount_details** | [**DiscountDetails**](DiscountDetails.md) | | [optional] |
26
+ | **credit_details** | [**Array&lt;CreditDetails&gt;**](CreditDetails.md) | | [optional] |
26
27
  | **metadata** | [**StorageDetails**](StorageDetails.md) | | |
27
28
 
28
29
  ## Example
@@ -32,7 +33,7 @@ require 'pnap_billing_api'
32
33
 
33
34
  instance = BillingApi::StorageRecord.new(
34
35
  id: ec4a9d49-1cef-49e9-b85e-b560f88bcd26,
35
- product_category: bmc-server,
36
+ product_category: null,
36
37
  product_code: s1.c1.small,
37
38
  location: null,
38
39
  year_month: 2020-03,
@@ -50,6 +51,7 @@ instance = BillingApi::StorageRecord.new(
50
51
  correlation_id: ec4a9d49-1cef-49e9-b85e-b560f88bcd26,
51
52
  reservation_id: c32a24a1-5949-4b60-99c0-c8aaa3a92b04,
52
53
  discount_details: null,
54
+ credit_details: null,
53
55
  metadata: null
54
56
  )
55
57
  ```
@@ -0,0 +1,15 @@
1
+ # BillingApi::SystemCreditCauseEnum
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+
8
+ ## Example
9
+
10
+ ```ruby
11
+ require 'pnap_billing_api'
12
+
13
+ instance = BillingApi::SystemCreditCauseEnum.new()
14
+ ```
15
+
@@ -0,0 +1,22 @@
1
+ # BillingApi::SystemCreditDetails
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **applied_amount** | **Float** | Amount applied. | |
8
+ | **type** | [**CreditTypeEnum**](CreditTypeEnum.md) | | |
9
+ | **cause** | [**SystemCreditCauseEnum**](SystemCreditCauseEnum.md) | | |
10
+
11
+ ## Example
12
+
13
+ ```ruby
14
+ require 'pnap_billing_api'
15
+
16
+ instance = BillingApi::SystemCreditDetails.new(
17
+ applied_amount: 50,
18
+ type: null,
19
+ cause: null
20
+ )
21
+ ```
22
+
@@ -18,7 +18,6 @@ module BillingApi
18
18
  # The unique identifier of the rated usage record.
19
19
  attr_accessor :id
20
20
 
21
- # The category of the product associated with this usage record.
22
21
  attr_accessor :product_category
23
22
 
24
23
  # The code identifying the product associated to this usage record.
@@ -70,6 +69,8 @@ module BillingApi
70
69
 
71
70
  attr_accessor :discount_details
72
71
 
72
+ attr_accessor :credit_details
73
+
73
74
  attr_accessor :metadata
74
75
 
75
76
  class EnumAttributeValidator
@@ -116,6 +117,7 @@ module BillingApi
116
117
  :'correlation_id' => :'correlationId',
117
118
  :'reservation_id' => :'reservationId',
118
119
  :'discount_details' => :'discountDetails',
120
+ :'credit_details' => :'creditDetails',
119
121
  :'metadata' => :'metadata'
120
122
  }
121
123
  end
@@ -129,7 +131,7 @@ module BillingApi
129
131
  def self.openapi_types
130
132
  {
131
133
  :'id' => :'String',
132
- :'product_category' => :'String',
134
+ :'product_category' => :'RatedUsageProductCategoryEnum',
133
135
  :'product_code' => :'String',
134
136
  :'location' => :'LocationEnum',
135
137
  :'year_month' => :'String',
@@ -147,6 +149,7 @@ module BillingApi
147
149
  :'correlation_id' => :'String',
148
150
  :'reservation_id' => :'String',
149
151
  :'discount_details' => :'DiscountDetails',
152
+ :'credit_details' => :'Array<CreditDetails>',
150
153
  :'metadata' => :'BandwidthDetails'
151
154
  }
152
155
  end
@@ -283,6 +286,12 @@ module BillingApi
283
286
  self.discount_details = attributes[:'discount_details']
284
287
  end
285
288
 
289
+ if attributes.key?(:'credit_details')
290
+ if (value = attributes[:'credit_details']).is_a?(Array)
291
+ self.credit_details = value
292
+ end
293
+ end
294
+
286
295
  if attributes.key?(:'metadata')
287
296
  self.metadata = attributes[:'metadata']
288
297
  else
@@ -364,8 +373,6 @@ module BillingApi
364
373
  warn '[DEPRECATED] the `valid?` method is obsolete'
365
374
  return false if @id.nil?
366
375
  return false if @product_category.nil?
367
- product_category_validator = EnumAttributeValidator.new('String', ["bmc-server", "bandwidth", "operating-system", "public-ip", "storage"])
368
- return false unless product_category_validator.valid?(@product_category)
369
376
  return false if @product_code.nil?
370
377
  return false if @location.nil?
371
378
  return false if @start_date_time.nil?
@@ -382,16 +389,6 @@ module BillingApi
382
389
  true
383
390
  end
384
391
 
385
- # Custom attribute writer method checking allowed values (enum).
386
- # @param [Object] product_category Object to be assigned
387
- def product_category=(product_category)
388
- validator = EnumAttributeValidator.new('String', ["bmc-server", "bandwidth", "operating-system", "public-ip", "storage"])
389
- unless validator.valid?(product_category)
390
- fail ArgumentError, "invalid value for \"product_category\", must be one of #{validator.allowable_values}."
391
- end
392
- @product_category = product_category
393
- end
394
-
395
392
  # Checks equality by comparing each attribute.
396
393
  # @param [Object] Object to be compared
397
394
  def ==(o)
@@ -416,6 +413,7 @@ module BillingApi
416
413
  correlation_id == o.correlation_id &&
417
414
  reservation_id == o.reservation_id &&
418
415
  discount_details == o.discount_details &&
416
+ credit_details == o.credit_details &&
419
417
  metadata == o.metadata
420
418
  end
421
419
 
@@ -428,7 +426,7 @@ module BillingApi
428
426
  # Calculates hash code according to all attributes.
429
427
  # @return [Integer] Hash code
430
428
  def hash
431
- [id, product_category, product_code, location, year_month, start_date_time, end_date_time, cost, cost_before_discount, cost_description, price_model, unit_price, unit_price_description, quantity, active, usage_session_id, correlation_id, reservation_id, discount_details, metadata].hash
429
+ [id, product_category, product_code, location, year_month, start_date_time, end_date_time, cost, cost_before_discount, cost_description, price_model, unit_price, unit_price_description, quantity, active, usage_session_id, correlation_id, reservation_id, discount_details, credit_details, metadata].hash
432
430
  end
433
431
 
434
432
  # Builds the object from hash