pnap_billing_api 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (121) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +9 -0
  3. data/README.md +187 -0
  4. data/Rakefile +10 -0
  5. data/VERSION +1 -0
  6. data/docs/ApplicableDiscounts.md +20 -0
  7. data/docs/BandwidthDetails.md +24 -0
  8. data/docs/BandwidthRecord.md +56 -0
  9. data/docs/BillingConfigurationsApi.md +74 -0
  10. data/docs/ConfigurationDetails.md +18 -0
  11. data/docs/DiscountDetails.md +22 -0
  12. data/docs/Error.md +20 -0
  13. data/docs/LocationAvailabilityDetail.md +26 -0
  14. data/docs/LocationEnum.md +15 -0
  15. data/docs/OperatingSystemDetails.md +20 -0
  16. data/docs/OperatingSystemRecord.md +56 -0
  17. data/docs/PriceUnitEnum.md +15 -0
  18. data/docs/PricingPlan.md +36 -0
  19. data/docs/Product.md +22 -0
  20. data/docs/ProductAvailability.md +22 -0
  21. data/docs/ProductCategoryEnum.md +15 -0
  22. data/docs/ProductsApi.md +167 -0
  23. data/docs/ProductsGet200ResponseInner.md +82 -0
  24. data/docs/PublicSubnetDetails.md +22 -0
  25. data/docs/PublicSubnetRecord.md +56 -0
  26. data/docs/RatedUsageApi.md +155 -0
  27. data/docs/RatedUsageGet200ResponseInner.md +88 -0
  28. data/docs/RatedUsageRecord.md +54 -0
  29. data/docs/Reservation.md +48 -0
  30. data/docs/ReservationAutoRenewDisableRequest.md +18 -0
  31. data/docs/ReservationInvoicingModelEnum.md +15 -0
  32. data/docs/ReservationModelEnum.md +15 -0
  33. data/docs/ReservationRequest.md +18 -0
  34. data/docs/ReservationsApi.md +439 -0
  35. data/docs/ServerDetails.md +20 -0
  36. data/docs/ServerProduct.md +24 -0
  37. data/docs/ServerProductMetadata.md +30 -0
  38. data/docs/ServerRecord.md +56 -0
  39. data/docs/StorageDetails.md +28 -0
  40. data/docs/StorageRecord.md +56 -0
  41. data/docs/ThresholdConfigurationDetails.md +18 -0
  42. data/lib/pnap_billing_api/api/billing_configurations_api.rb +79 -0
  43. data/lib/pnap_billing_api/api/products_api.rb +174 -0
  44. data/lib/pnap_billing_api/api/rated_usage_api.rb +156 -0
  45. data/lib/pnap_billing_api/api/reservations_api.rb +412 -0
  46. data/lib/pnap_billing_api/api_client.rb +397 -0
  47. data/lib/pnap_billing_api/api_error.rb +58 -0
  48. data/lib/pnap_billing_api/configuration.rb +298 -0
  49. data/lib/pnap_billing_api/models/applicable_discounts.rb +227 -0
  50. data/lib/pnap_billing_api/models/bandwidth_details.rb +294 -0
  51. data/lib/pnap_billing_api/models/bandwidth_record.rb +548 -0
  52. data/lib/pnap_billing_api/models/configuration_details.rb +215 -0
  53. data/lib/pnap_billing_api/models/discount_details.rb +291 -0
  54. data/lib/pnap_billing_api/models/error.rb +234 -0
  55. data/lib/pnap_billing_api/models/location_availability_detail.rb +314 -0
  56. data/lib/pnap_billing_api/models/location_enum.rb +45 -0
  57. data/lib/pnap_billing_api/models/operating_system_details.rb +240 -0
  58. data/lib/pnap_billing_api/models/operating_system_record.rb +548 -0
  59. data/lib/pnap_billing_api/models/price_unit_enum.rb +44 -0
  60. data/lib/pnap_billing_api/models/pricing_plan.rb +397 -0
  61. data/lib/pnap_billing_api/models/product.rb +252 -0
  62. data/lib/pnap_billing_api/models/product_availability.rb +258 -0
  63. data/lib/pnap_billing_api/models/product_category_enum.rb +43 -0
  64. data/lib/pnap_billing_api/models/products_get200_response_inner.rb +61 -0
  65. data/lib/pnap_billing_api/models/public_subnet_details.rb +250 -0
  66. data/lib/pnap_billing_api/models/public_subnet_record.rb +548 -0
  67. data/lib/pnap_billing_api/models/rated_usage_get200_response_inner.rb +64 -0
  68. data/lib/pnap_billing_api/models/rated_usage_record.rb +526 -0
  69. data/lib/pnap_billing_api/models/reservation.rb +466 -0
  70. data/lib/pnap_billing_api/models/reservation_auto_renew_disable_request.rb +215 -0
  71. data/lib/pnap_billing_api/models/reservation_invoicing_model_enum.rb +40 -0
  72. data/lib/pnap_billing_api/models/reservation_model_enum.rb +43 -0
  73. data/lib/pnap_billing_api/models/reservation_request.rb +223 -0
  74. data/lib/pnap_billing_api/models/server_details.rb +240 -0
  75. data/lib/pnap_billing_api/models/server_product.rb +274 -0
  76. data/lib/pnap_billing_api/models/server_product_metadata.rb +325 -0
  77. data/lib/pnap_billing_api/models/server_record.rb +548 -0
  78. data/lib/pnap_billing_api/models/storage_details.rb +308 -0
  79. data/lib/pnap_billing_api/models/storage_record.rb +548 -0
  80. data/lib/pnap_billing_api/models/threshold_configuration_details.rb +223 -0
  81. data/lib/pnap_billing_api/version.rb +19 -0
  82. data/lib/pnap_billing_api.rb +75 -0
  83. data/pnap_billing_api.gemspec +39 -0
  84. data/spec/api/billing_configurations_api_spec.rb +46 -0
  85. data/spec/api/products_api_spec.rb +67 -0
  86. data/spec/api/rated_usage_api_spec.rb +61 -0
  87. data/spec/api/reservations_api_spec.rb +109 -0
  88. data/spec/models/applicable_discounts_spec.rb +42 -0
  89. data/spec/models/bandwidth_details_spec.rb +58 -0
  90. data/spec/models/bandwidth_record_spec.rb +154 -0
  91. data/spec/models/configuration_details_spec.rb +36 -0
  92. data/spec/models/discount_details_spec.rb +52 -0
  93. data/spec/models/error_spec.rb +42 -0
  94. data/spec/models/location_availability_detail_spec.rb +64 -0
  95. data/spec/models/location_enum_spec.rb +30 -0
  96. data/spec/models/operating_system_details_spec.rb +42 -0
  97. data/spec/models/operating_system_record_spec.rb +154 -0
  98. data/spec/models/price_unit_enum_spec.rb +30 -0
  99. data/spec/models/pricing_plan_spec.rb +102 -0
  100. data/spec/models/product_availability_spec.rb +48 -0
  101. data/spec/models/product_category_enum_spec.rb +30 -0
  102. data/spec/models/product_spec.rb +48 -0
  103. data/spec/models/products_get200_response_inner_spec.rb +44 -0
  104. data/spec/models/public_subnet_details_spec.rb +48 -0
  105. data/spec/models/public_subnet_record_spec.rb +154 -0
  106. data/spec/models/rated_usage_get200_response_inner_spec.rb +44 -0
  107. data/spec/models/rated_usage_record_spec.rb +148 -0
  108. data/spec/models/reservation_auto_renew_disable_request_spec.rb +36 -0
  109. data/spec/models/reservation_invoicing_model_enum_spec.rb +30 -0
  110. data/spec/models/reservation_model_enum_spec.rb +30 -0
  111. data/spec/models/reservation_request_spec.rb +36 -0
  112. data/spec/models/reservation_spec.rb +130 -0
  113. data/spec/models/server_details_spec.rb +42 -0
  114. data/spec/models/server_product_metadata_spec.rb +72 -0
  115. data/spec/models/server_product_spec.rb +54 -0
  116. data/spec/models/server_record_spec.rb +154 -0
  117. data/spec/models/storage_details_spec.rb +66 -0
  118. data/spec/models/storage_record_spec.rb +154 -0
  119. data/spec/models/threshold_configuration_details_spec.rb +36 -0
  120. data/spec/spec_helper.rb +111 -0
  121. metadata +240 -0
@@ -0,0 +1,48 @@
1
+ # BillingApi::Reservation
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **id** | **String** | The reservation identifier. | |
8
+ | **product_code** | **String** | The code identifying the product. This code has significant across all locations. | |
9
+ | **product_category** | **String** | The product category. | |
10
+ | **location** | [**LocationEnum**](LocationEnum.md) | | |
11
+ | **reservation_model** | [**ReservationModelEnum**](ReservationModelEnum.md) | | |
12
+ | **initial_invoice_model** | [**ReservationInvoicingModelEnum**](ReservationInvoicingModelEnum.md) | | [optional] |
13
+ | **start_date_time** | **Time** | The point in time (in UTC) when the reservation starts. | |
14
+ | **end_date_time** | **Time** | The point in time (in UTC) when the reservation end. | [optional] |
15
+ | **last_renewal_date_time** | **Time** | The point in time (in UTC) when the reservation was renewed last. | [optional] |
16
+ | **next_renewal_date_time** | **Time** | The point in time (in UTC) when the reservation will be renewed if auto renew is set to true. | [optional] |
17
+ | **auto_renew** | **Boolean** | A flag indicating whether the reservation will auto-renew (default is true). | |
18
+ | **sku** | **String** | The sku that will be applied to this reservation. It is useful to find out the price by querying the /product endpoint. | |
19
+ | **price** | **Float** | Reservation price. | |
20
+ | **price_unit** | [**PriceUnitEnum**](PriceUnitEnum.md) | | |
21
+ | **assigned_resource_id** | **String** | The resource ID currently being assigned to Reservation. | [optional] |
22
+ | **next_billing_date** | **Date** | Next billing date for Reservation. | [optional] |
23
+
24
+ ## Example
25
+
26
+ ```ruby
27
+ require 'pnap_billing_api'
28
+
29
+ instance = BillingApi::Reservation.new(
30
+ id: 83604275-bdba-490a-b87a-978e8dffdb14,
31
+ product_code: s1.c1.small,
32
+ product_category: server,
33
+ location: null,
34
+ reservation_model: null,
35
+ initial_invoice_model: null,
36
+ start_date_time: 2020-03-19T16:39Z,
37
+ end_date_time: 2020-04-19T16:39Z,
38
+ last_renewal_date_time: 2020-03-19T16:39Z,
39
+ next_renewal_date_time: 2020-04-19T16:39Z,
40
+ auto_renew: true,
41
+ sku: XXX-XXX-XXX,
42
+ price: 175,
43
+ price_unit: null,
44
+ assigned_resource_id: 83604275-bdba-490a-b87a-978e8dffdb14,
45
+ next_billing_date: Sun Apr 19 00:00:00 UTC 2020
46
+ )
47
+ ```
48
+
@@ -0,0 +1,18 @@
1
+ # BillingApi::ReservationAutoRenewDisableRequest
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **auto_renew_disable_reason** | **String** | | [optional] |
8
+
9
+ ## Example
10
+
11
+ ```ruby
12
+ require 'pnap_billing_api'
13
+
14
+ instance = BillingApi::ReservationAutoRenewDisableRequest.new(
15
+ auto_renew_disable_reason: null
16
+ )
17
+ ```
18
+
@@ -0,0 +1,15 @@
1
+ # BillingApi::ReservationInvoicingModelEnum
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::ReservationInvoicingModelEnum.new()
14
+ ```
15
+
@@ -0,0 +1,15 @@
1
+ # BillingApi::ReservationModelEnum
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::ReservationModelEnum.new()
14
+ ```
15
+
@@ -0,0 +1,18 @@
1
+ # BillingApi::ReservationRequest
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **sku** | **String** | The sku code of product pricing plan. | |
8
+
9
+ ## Example
10
+
11
+ ```ruby
12
+ require 'pnap_billing_api'
13
+
14
+ instance = BillingApi::ReservationRequest.new(
15
+ sku: XXX-XXX-XXX
16
+ )
17
+ ```
18
+
@@ -0,0 +1,439 @@
1
+ # BillingApi::ReservationsApi
2
+
3
+ All URIs are relative to *https://api.phoenixnap.com/billing/v1*
4
+
5
+ | Method | HTTP request | Description |
6
+ | ------ | ------------ | ----------- |
7
+ | [**reservations_get**](ReservationsApi.md#reservations_get) | **GET** /reservations | List all Reservations. |
8
+ | [**reservations_post**](ReservationsApi.md#reservations_post) | **POST** /reservations | Create a reservation. |
9
+ | [**reservations_reservation_id_actions_auto_renew_disable_post**](ReservationsApi.md#reservations_reservation_id_actions_auto_renew_disable_post) | **POST** /reservations/{reservationId}/actions/auto-renew/disable | Disable auto-renewal for reservation by id. |
10
+ | [**reservations_reservation_id_actions_auto_renew_enable_post**](ReservationsApi.md#reservations_reservation_id_actions_auto_renew_enable_post) | **POST** /reservations/{reservationId}/actions/auto-renew/enable | Enable auto-renewal for unexpired reservation by reservation id. |
11
+ | [**reservations_reservation_id_actions_convert_post**](ReservationsApi.md#reservations_reservation_id_actions_convert_post) | **POST** /reservations/{reservationId}/actions/convert | Convert reservation pricing model by reservation ID. |
12
+ | [**reservations_reservation_id_get**](ReservationsApi.md#reservations_reservation_id_get) | **GET** /reservations/{reservationId} | Get a reservation. |
13
+
14
+
15
+ ## reservations_get
16
+
17
+ > <Array<Reservation>> reservations_get(opts)
18
+
19
+ List all Reservations.
20
+
21
+ Retrieves all reservations associated with the authenticated account. All date & times are in UTC.
22
+
23
+ ### Examples
24
+
25
+ ```ruby
26
+ require 'time'
27
+ require 'pnap_billing_api'
28
+ # setup authorization
29
+ BillingApi.configure do |config|
30
+ # Configure OAuth2 access token for authorization: OAuth2
31
+ config.access_token = 'YOUR ACCESS TOKEN'
32
+ end
33
+
34
+ api_instance = BillingApi::ReservationsApi.new
35
+ opts = {
36
+ product_category: BillingApi::ProductCategoryEnum::SERVER # ProductCategoryEnum | The product category
37
+ }
38
+
39
+ begin
40
+ # List all Reservations.
41
+ result = api_instance.reservations_get(opts)
42
+ p result
43
+ rescue BillingApi::ApiError => e
44
+ puts "Error when calling ReservationsApi->reservations_get: #{e}"
45
+ end
46
+ ```
47
+
48
+ #### Using the reservations_get_with_http_info variant
49
+
50
+ This returns an Array which contains the response data, status code and headers.
51
+
52
+ > <Array(<Array<Reservation>>, Integer, Hash)> reservations_get_with_http_info(opts)
53
+
54
+ ```ruby
55
+ begin
56
+ # List all Reservations.
57
+ data, status_code, headers = api_instance.reservations_get_with_http_info(opts)
58
+ p status_code # => 2xx
59
+ p headers # => { ... }
60
+ p data # => <Array<Reservation>>
61
+ rescue BillingApi::ApiError => e
62
+ puts "Error when calling ReservationsApi->reservations_get_with_http_info: #{e}"
63
+ end
64
+ ```
65
+
66
+ ### Parameters
67
+
68
+ | Name | Type | Description | Notes |
69
+ | ---- | ---- | ----------- | ----- |
70
+ | **product_category** | [**ProductCategoryEnum**](.md) | The product category | [optional] |
71
+
72
+ ### Return type
73
+
74
+ [**Array&lt;Reservation&gt;**](Reservation.md)
75
+
76
+ ### Authorization
77
+
78
+ [OAuth2](../README.md#OAuth2)
79
+
80
+ ### HTTP request headers
81
+
82
+ - **Content-Type**: Not defined
83
+ - **Accept**: application/json
84
+
85
+
86
+ ## reservations_post
87
+
88
+ > <Reservation> reservations_post(opts)
89
+
90
+ Create a reservation.
91
+
92
+ Creates new package reservation for authenticated account.
93
+
94
+ ### Examples
95
+
96
+ ```ruby
97
+ require 'time'
98
+ require 'pnap_billing_api'
99
+ # setup authorization
100
+ BillingApi.configure do |config|
101
+ # Configure OAuth2 access token for authorization: OAuth2
102
+ config.access_token = 'YOUR ACCESS TOKEN'
103
+ end
104
+
105
+ api_instance = BillingApi::ReservationsApi.new
106
+ opts = {
107
+ reservation_request: BillingApi::ReservationRequest.new({sku: 'XXX-XXX-XXX'}) # ReservationRequest |
108
+ }
109
+
110
+ begin
111
+ # Create a reservation.
112
+ result = api_instance.reservations_post(opts)
113
+ p result
114
+ rescue BillingApi::ApiError => e
115
+ puts "Error when calling ReservationsApi->reservations_post: #{e}"
116
+ end
117
+ ```
118
+
119
+ #### Using the reservations_post_with_http_info variant
120
+
121
+ This returns an Array which contains the response data, status code and headers.
122
+
123
+ > <Array(<Reservation>, Integer, Hash)> reservations_post_with_http_info(opts)
124
+
125
+ ```ruby
126
+ begin
127
+ # Create a reservation.
128
+ data, status_code, headers = api_instance.reservations_post_with_http_info(opts)
129
+ p status_code # => 2xx
130
+ p headers # => { ... }
131
+ p data # => <Reservation>
132
+ rescue BillingApi::ApiError => e
133
+ puts "Error when calling ReservationsApi->reservations_post_with_http_info: #{e}"
134
+ end
135
+ ```
136
+
137
+ ### Parameters
138
+
139
+ | Name | Type | Description | Notes |
140
+ | ---- | ---- | ----------- | ----- |
141
+ | **reservation_request** | [**ReservationRequest**](ReservationRequest.md) | | [optional] |
142
+
143
+ ### Return type
144
+
145
+ [**Reservation**](Reservation.md)
146
+
147
+ ### Authorization
148
+
149
+ [OAuth2](../README.md#OAuth2)
150
+
151
+ ### HTTP request headers
152
+
153
+ - **Content-Type**: application/json
154
+ - **Accept**: application/json
155
+
156
+
157
+ ## reservations_reservation_id_actions_auto_renew_disable_post
158
+
159
+ > <Reservation> reservations_reservation_id_actions_auto_renew_disable_post(reservation_id, opts)
160
+
161
+ Disable auto-renewal for reservation by id.
162
+
163
+ Disable auto-renewal for reservation by reservation id.
164
+
165
+ ### Examples
166
+
167
+ ```ruby
168
+ require 'time'
169
+ require 'pnap_billing_api'
170
+ # setup authorization
171
+ BillingApi.configure do |config|
172
+ # Configure OAuth2 access token for authorization: OAuth2
173
+ config.access_token = 'YOUR ACCESS TOKEN'
174
+ end
175
+
176
+ api_instance = BillingApi::ReservationsApi.new
177
+ reservation_id = 'e6afba51-7de8-4080-83ab-0f915570659c' # String | The reservation's ID.
178
+ opts = {
179
+ reservation_auto_renew_disable_request: BillingApi::ReservationAutoRenewDisableRequest.new # ReservationAutoRenewDisableRequest |
180
+ }
181
+
182
+ begin
183
+ # Disable auto-renewal for reservation by id.
184
+ result = api_instance.reservations_reservation_id_actions_auto_renew_disable_post(reservation_id, opts)
185
+ p result
186
+ rescue BillingApi::ApiError => e
187
+ puts "Error when calling ReservationsApi->reservations_reservation_id_actions_auto_renew_disable_post: #{e}"
188
+ end
189
+ ```
190
+
191
+ #### Using the reservations_reservation_id_actions_auto_renew_disable_post_with_http_info variant
192
+
193
+ This returns an Array which contains the response data, status code and headers.
194
+
195
+ > <Array(<Reservation>, Integer, Hash)> reservations_reservation_id_actions_auto_renew_disable_post_with_http_info(reservation_id, opts)
196
+
197
+ ```ruby
198
+ begin
199
+ # Disable auto-renewal for reservation by id.
200
+ data, status_code, headers = api_instance.reservations_reservation_id_actions_auto_renew_disable_post_with_http_info(reservation_id, opts)
201
+ p status_code # => 2xx
202
+ p headers # => { ... }
203
+ p data # => <Reservation>
204
+ rescue BillingApi::ApiError => e
205
+ puts "Error when calling ReservationsApi->reservations_reservation_id_actions_auto_renew_disable_post_with_http_info: #{e}"
206
+ end
207
+ ```
208
+
209
+ ### Parameters
210
+
211
+ | Name | Type | Description | Notes |
212
+ | ---- | ---- | ----------- | ----- |
213
+ | **reservation_id** | **String** | The reservation&#39;s ID. | |
214
+ | **reservation_auto_renew_disable_request** | [**ReservationAutoRenewDisableRequest**](ReservationAutoRenewDisableRequest.md) | | [optional] |
215
+
216
+ ### Return type
217
+
218
+ [**Reservation**](Reservation.md)
219
+
220
+ ### Authorization
221
+
222
+ [OAuth2](../README.md#OAuth2)
223
+
224
+ ### HTTP request headers
225
+
226
+ - **Content-Type**: application/json
227
+ - **Accept**: application/json
228
+
229
+
230
+ ## reservations_reservation_id_actions_auto_renew_enable_post
231
+
232
+ > <Reservation> reservations_reservation_id_actions_auto_renew_enable_post(reservation_id)
233
+
234
+ Enable auto-renewal for unexpired reservation by reservation id.
235
+
236
+ Enable auto-renewal for unexpired reservation by reservation id.
237
+
238
+ ### Examples
239
+
240
+ ```ruby
241
+ require 'time'
242
+ require 'pnap_billing_api'
243
+ # setup authorization
244
+ BillingApi.configure do |config|
245
+ # Configure OAuth2 access token for authorization: OAuth2
246
+ config.access_token = 'YOUR ACCESS TOKEN'
247
+ end
248
+
249
+ api_instance = BillingApi::ReservationsApi.new
250
+ reservation_id = 'e6afba51-7de8-4080-83ab-0f915570659c' # String | The reservation's ID.
251
+
252
+ begin
253
+ # Enable auto-renewal for unexpired reservation by reservation id.
254
+ result = api_instance.reservations_reservation_id_actions_auto_renew_enable_post(reservation_id)
255
+ p result
256
+ rescue BillingApi::ApiError => e
257
+ puts "Error when calling ReservationsApi->reservations_reservation_id_actions_auto_renew_enable_post: #{e}"
258
+ end
259
+ ```
260
+
261
+ #### Using the reservations_reservation_id_actions_auto_renew_enable_post_with_http_info variant
262
+
263
+ This returns an Array which contains the response data, status code and headers.
264
+
265
+ > <Array(<Reservation>, Integer, Hash)> reservations_reservation_id_actions_auto_renew_enable_post_with_http_info(reservation_id)
266
+
267
+ ```ruby
268
+ begin
269
+ # Enable auto-renewal for unexpired reservation by reservation id.
270
+ data, status_code, headers = api_instance.reservations_reservation_id_actions_auto_renew_enable_post_with_http_info(reservation_id)
271
+ p status_code # => 2xx
272
+ p headers # => { ... }
273
+ p data # => <Reservation>
274
+ rescue BillingApi::ApiError => e
275
+ puts "Error when calling ReservationsApi->reservations_reservation_id_actions_auto_renew_enable_post_with_http_info: #{e}"
276
+ end
277
+ ```
278
+
279
+ ### Parameters
280
+
281
+ | Name | Type | Description | Notes |
282
+ | ---- | ---- | ----------- | ----- |
283
+ | **reservation_id** | **String** | The reservation&#39;s ID. | |
284
+
285
+ ### Return type
286
+
287
+ [**Reservation**](Reservation.md)
288
+
289
+ ### Authorization
290
+
291
+ [OAuth2](../README.md#OAuth2)
292
+
293
+ ### HTTP request headers
294
+
295
+ - **Content-Type**: Not defined
296
+ - **Accept**: application/json
297
+
298
+
299
+ ## reservations_reservation_id_actions_convert_post
300
+
301
+ > <Reservation> reservations_reservation_id_actions_convert_post(reservation_id, opts)
302
+
303
+ Convert reservation pricing model by reservation ID.
304
+
305
+ Convert reservation pricing model by reservation id.
306
+
307
+ ### Examples
308
+
309
+ ```ruby
310
+ require 'time'
311
+ require 'pnap_billing_api'
312
+ # setup authorization
313
+ BillingApi.configure do |config|
314
+ # Configure OAuth2 access token for authorization: OAuth2
315
+ config.access_token = 'YOUR ACCESS TOKEN'
316
+ end
317
+
318
+ api_instance = BillingApi::ReservationsApi.new
319
+ reservation_id = 'e6afba51-7de8-4080-83ab-0f915570659c' # String | The reservation's ID.
320
+ opts = {
321
+ reservation_request: BillingApi::ReservationRequest.new({sku: 'XXX-XXX-XXX'}) # ReservationRequest |
322
+ }
323
+
324
+ begin
325
+ # Convert reservation pricing model by reservation ID.
326
+ result = api_instance.reservations_reservation_id_actions_convert_post(reservation_id, opts)
327
+ p result
328
+ rescue BillingApi::ApiError => e
329
+ puts "Error when calling ReservationsApi->reservations_reservation_id_actions_convert_post: #{e}"
330
+ end
331
+ ```
332
+
333
+ #### Using the reservations_reservation_id_actions_convert_post_with_http_info variant
334
+
335
+ This returns an Array which contains the response data, status code and headers.
336
+
337
+ > <Array(<Reservation>, Integer, Hash)> reservations_reservation_id_actions_convert_post_with_http_info(reservation_id, opts)
338
+
339
+ ```ruby
340
+ begin
341
+ # Convert reservation pricing model by reservation ID.
342
+ data, status_code, headers = api_instance.reservations_reservation_id_actions_convert_post_with_http_info(reservation_id, opts)
343
+ p status_code # => 2xx
344
+ p headers # => { ... }
345
+ p data # => <Reservation>
346
+ rescue BillingApi::ApiError => e
347
+ puts "Error when calling ReservationsApi->reservations_reservation_id_actions_convert_post_with_http_info: #{e}"
348
+ end
349
+ ```
350
+
351
+ ### Parameters
352
+
353
+ | Name | Type | Description | Notes |
354
+ | ---- | ---- | ----------- | ----- |
355
+ | **reservation_id** | **String** | The reservation&#39;s ID. | |
356
+ | **reservation_request** | [**ReservationRequest**](ReservationRequest.md) | | [optional] |
357
+
358
+ ### Return type
359
+
360
+ [**Reservation**](Reservation.md)
361
+
362
+ ### Authorization
363
+
364
+ [OAuth2](../README.md#OAuth2)
365
+
366
+ ### HTTP request headers
367
+
368
+ - **Content-Type**: application/json
369
+ - **Accept**: application/json
370
+
371
+
372
+ ## reservations_reservation_id_get
373
+
374
+ > <Reservation> reservations_reservation_id_get(reservation_id)
375
+
376
+ Get a reservation.
377
+
378
+ Retrieves the reservations with the specified identifier. All date & times are in UTC.
379
+
380
+ ### Examples
381
+
382
+ ```ruby
383
+ require 'time'
384
+ require 'pnap_billing_api'
385
+ # setup authorization
386
+ BillingApi.configure do |config|
387
+ # Configure OAuth2 access token for authorization: OAuth2
388
+ config.access_token = 'YOUR ACCESS TOKEN'
389
+ end
390
+
391
+ api_instance = BillingApi::ReservationsApi.new
392
+ reservation_id = 'e6afba51-7de8-4080-83ab-0f915570659c' # String | The reservation's ID.
393
+
394
+ begin
395
+ # Get a reservation.
396
+ result = api_instance.reservations_reservation_id_get(reservation_id)
397
+ p result
398
+ rescue BillingApi::ApiError => e
399
+ puts "Error when calling ReservationsApi->reservations_reservation_id_get: #{e}"
400
+ end
401
+ ```
402
+
403
+ #### Using the reservations_reservation_id_get_with_http_info variant
404
+
405
+ This returns an Array which contains the response data, status code and headers.
406
+
407
+ > <Array(<Reservation>, Integer, Hash)> reservations_reservation_id_get_with_http_info(reservation_id)
408
+
409
+ ```ruby
410
+ begin
411
+ # Get a reservation.
412
+ data, status_code, headers = api_instance.reservations_reservation_id_get_with_http_info(reservation_id)
413
+ p status_code # => 2xx
414
+ p headers # => { ... }
415
+ p data # => <Reservation>
416
+ rescue BillingApi::ApiError => e
417
+ puts "Error when calling ReservationsApi->reservations_reservation_id_get_with_http_info: #{e}"
418
+ end
419
+ ```
420
+
421
+ ### Parameters
422
+
423
+ | Name | Type | Description | Notes |
424
+ | ---- | ---- | ----------- | ----- |
425
+ | **reservation_id** | **String** | The reservation&#39;s ID. | |
426
+
427
+ ### Return type
428
+
429
+ [**Reservation**](Reservation.md)
430
+
431
+ ### Authorization
432
+
433
+ [OAuth2](../README.md#OAuth2)
434
+
435
+ ### HTTP request headers
436
+
437
+ - **Content-Type**: Not defined
438
+ - **Accept**: application/json
439
+
@@ -0,0 +1,20 @@
1
+ # BillingApi::ServerDetails
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **id** | **String** | The server identifier as returned by the BMC API. | |
8
+ | **hostname** | **String** | The server hostname. | |
9
+
10
+ ## Example
11
+
12
+ ```ruby
13
+ require 'pnap_billing_api'
14
+
15
+ instance = BillingApi::ServerDetails.new(
16
+ id: 83604275-bdba-490a-b87a-978e8dffdb14,
17
+ hostname: example-server
18
+ )
19
+ ```
20
+
@@ -0,0 +1,24 @@
1
+ # BillingApi::ServerProduct
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **product_code** | **String** | The code identifying the product. This code has significant across all locations. | |
8
+ | **product_category** | **String** | The product category. | |
9
+ | **plans** | [**Array&lt;PricingPlan&gt;**](PricingPlan.md) | The pricing plans available for this product. | [optional] |
10
+ | **metadata** | [**ServerProductMetadata**](ServerProductMetadata.md) | | |
11
+
12
+ ## Example
13
+
14
+ ```ruby
15
+ require 'pnap_billing_api'
16
+
17
+ instance = BillingApi::ServerProduct.new(
18
+ product_code: s1.c1.small,
19
+ product_category: SERVER,
20
+ plans: null,
21
+ metadata: null
22
+ )
23
+ ```
24
+
@@ -0,0 +1,30 @@
1
+ # BillingApi::ServerProductMetadata
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **ram_in_gb** | **Float** | RAM in GB. | |
8
+ | **cpu** | **String** | CPU name. | |
9
+ | **cpu_count** | **Float** | Number of CPUs. | |
10
+ | **cores_per_cpu** | **Float** | The number of physical cores present on each CPU. | |
11
+ | **cpu_frequency** | **Float** | CPU frequency in GHz. | |
12
+ | **network** | **String** | Server network. | |
13
+ | **storage** | **String** | Server storage. | |
14
+
15
+ ## Example
16
+
17
+ ```ruby
18
+ require 'pnap_billing_api'
19
+
20
+ instance = BillingApi::ServerProductMetadata.new(
21
+ ram_in_gb: 256,
22
+ cpu: Dual Gold 6258R,
23
+ cpu_count: 56,
24
+ cores_per_cpu: 2,
25
+ cpu_frequency: 2.7,
26
+ network: 2x 25Gbps,
27
+ storage: 2x 2TB NVMe
28
+ )
29
+ ```
30
+
@@ -0,0 +1,56 @@
1
+ # BillingApi::ServerRecord
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
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. | |
9
+ | **product_code** | **String** | The code identifying the product associated to this usage record. | |
10
+ | **location** | [**LocationEnum**](LocationEnum.md) | | |
11
+ | **year_month** | **String** | Year and month of the usage record. | [optional] |
12
+ | **start_date_time** | **Time** | The point in time (in UTC) when usage has started. | |
13
+ | **end_date_time** | **Time** | The point in time (in UTC) until usage has been rated. | |
14
+ | **cost** | **Integer** | The rated usage in cents. | |
15
+ | **cost_before_discount** | **Integer** | The cost in cents before discount. | [optional] |
16
+ | **cost_description** | **String** | The rated usage cost description. | [optional] |
17
+ | **price_model** | **String** | The price model applied to this usage record. | |
18
+ | **unit_price** | **Float** | The unit price. | |
19
+ | **unit_price_description** | **String** | User friendly description of the unit price. | |
20
+ | **quantity** | **Float** | The number of units being charged. | |
21
+ | **active** | **Boolean** | A flag indicating whether the rated usage record is still active. | |
22
+ | **usage_session_id** | **String** | The usage session ID is used to correlate rated usage records across periods of time. For example, a server used for over a month will generate multiple rated usage records. The entire usage session cost can be computed by aggregating the records having the same usage session ID. It is usual to have one rated usage record per month or invoice. | |
23
+ | **correlation_id** | **String** | Holds usage record id | |
24
+ | **reservation_id** | **String** | Reservation id associated with this rated usage record. | [optional] |
25
+ | **discount_details** | [**DiscountDetails**](DiscountDetails.md) | | [optional] |
26
+ | **metadata** | [**ServerDetails**](ServerDetails.md) | | |
27
+
28
+ ## Example
29
+
30
+ ```ruby
31
+ require 'pnap_billing_api'
32
+
33
+ instance = BillingApi::ServerRecord.new(
34
+ id: ec4a9d49-1cef-49e9-b85e-b560f88bcd26,
35
+ product_category: bmc-server,
36
+ product_code: s1.c1.small,
37
+ location: null,
38
+ year_month: 2020-03,
39
+ start_date_time: 2020-03-19T16:39Z,
40
+ end_date_time: 2020-03-20T17:00Z,
41
+ cost: 384,
42
+ cost_before_discount: 15456,
43
+ cost_description: 24 Hour(s) @ $0.16 /Hour,
44
+ price_model: hourly,
45
+ unit_price: 0.16,
46
+ unit_price_description: per hour,
47
+ quantity: 24,
48
+ active: true,
49
+ usage_session_id: ec4a9d49-1cef-49e9-b85e-b560f88bcd26,
50
+ correlation_id: ec4a9d49-1cef-49e9-b85e-b560f88bcd26,
51
+ reservation_id: c32a24a1-5949-4b60-99c0-c8aaa3a92b04,
52
+ discount_details: null,
53
+ metadata: null
54
+ )
55
+ ```
56
+