pnap_billing_api 1.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.
- checksums.yaml +4 -4
- data/README.md +16 -5
- data/VERSION +1 -1
- data/docs/BandwidthRecord.md +4 -2
- data/docs/CreditDetails.md +49 -0
- data/docs/CreditDetailsBase.md +20 -0
- data/docs/CreditTypeEnum.md +15 -0
- data/docs/DiscountDetails.md +2 -2
- data/docs/DiscountTypeEnum.md +15 -0
- data/docs/GpuConfigurationMetadata.md +20 -0
- data/docs/OperatingSystemRecord.md +4 -2
- data/docs/PackageUnitEnum.md +15 -0
- data/docs/PricingPlan.md +3 -3
- data/docs/ProductAvailabilityApi.md +89 -0
- data/docs/ProductsApi.md +0 -82
- data/docs/PromoCreditDetails.md +24 -0
- data/docs/PublicSubnetRecord.md +4 -2
- data/docs/RatedUsageProductCategoryEnum.md +15 -0
- data/docs/RatedUsageRecord.md +5 -3
- data/docs/Reservation.md +2 -2
- data/docs/ReservationAutoRenewDisableRequest.md +1 -1
- data/docs/ReservationProductCategoryEnum.md +15 -0
- data/docs/ReservationsApi.md +30 -30
- data/docs/ServerProductMetadata.md +3 -1
- data/docs/ServerRecord.md +4 -2
- data/docs/StorageRecord.md +4 -2
- data/docs/SystemCreditCauseEnum.md +15 -0
- data/docs/SystemCreditDetails.md +22 -0
- data/lib/pnap_billing_api/api/product_availability_api.rb +105 -0
- data/lib/pnap_billing_api/api/products_api.rb +0 -83
- data/lib/pnap_billing_api/api/reservations_api.rb +38 -38
- data/lib/pnap_billing_api/api_client.rb +2 -2
- data/lib/pnap_billing_api/models/bandwidth_record.rb +13 -15
- data/lib/pnap_billing_api/models/credit_details.rb +105 -0
- data/lib/pnap_billing_api/models/credit_details_base.rb +261 -0
- data/lib/pnap_billing_api/models/credit_type_enum.rb +40 -0
- data/lib/pnap_billing_api/models/discount_details.rb +1 -14
- data/lib/pnap_billing_api/models/discount_type_enum.rb +41 -0
- data/lib/pnap_billing_api/models/gpu_configuration_metadata.rb +226 -0
- data/lib/pnap_billing_api/models/operating_system_record.rb +13 -15
- data/lib/pnap_billing_api/models/package_unit_enum.rb +40 -0
- data/lib/pnap_billing_api/models/pricing_plan.rb +1 -14
- data/lib/pnap_billing_api/models/promo_credit_details.rb +301 -0
- data/lib/pnap_billing_api/models/public_subnet_record.rb +13 -15
- data/lib/pnap_billing_api/models/rated_usage_product_category_enum.rb +43 -0
- data/lib/pnap_billing_api/models/rated_usage_record.rb +16 -18
- data/lib/pnap_billing_api/models/reservation.rb +1 -14
- data/lib/pnap_billing_api/models/reservation_product_category_enum.rb +40 -0
- data/lib/pnap_billing_api/models/server_product_metadata.rb +16 -4
- data/lib/pnap_billing_api/models/server_record.rb +13 -15
- data/lib/pnap_billing_api/models/storage_record.rb +13 -15
- data/lib/pnap_billing_api/models/system_credit_cause_enum.rb +39 -0
- data/lib/pnap_billing_api/models/system_credit_details.rb +283 -0
- data/lib/pnap_billing_api.rb +12 -0
- data/spec/api/product_availability_api_spec.rb +52 -0
- data/spec/api/products_api_spec.rb +0 -17
- data/spec/api/reservations_api_spec.rb +5 -5
- data/spec/models/bandwidth_record_spec.rb +6 -4
- data/spec/models/credit_details_base_spec.rb +42 -0
- data/spec/models/credit_details_spec.rb +32 -0
- data/spec/models/credit_type_enum_spec.rb +30 -0
- data/spec/models/discount_details_spec.rb +0 -4
- data/spec/models/discount_type_enum_spec.rb +30 -0
- data/spec/models/gpu_configuration_metadata_spec.rb +42 -0
- data/spec/models/operating_system_record_spec.rb +6 -4
- data/spec/models/package_unit_enum_spec.rb +30 -0
- data/spec/models/pricing_plan_spec.rb +0 -4
- data/spec/models/promo_credit_details_spec.rb +54 -0
- data/spec/models/public_subnet_record_spec.rb +6 -4
- data/spec/models/rated_usage_product_category_enum_spec.rb +30 -0
- data/spec/models/rated_usage_record_spec.rb +6 -4
- data/spec/models/reservation_product_category_enum_spec.rb +30 -0
- data/spec/models/reservation_spec.rb +0 -4
- data/spec/models/server_product_metadata_spec.rb +6 -0
- data/spec/models/server_record_spec.rb +6 -4
- data/spec/models/storage_record_spec.rb +6 -4
- data/spec/models/system_credit_cause_enum_spec.rb +30 -0
- data/spec/models/system_credit_details_spec.rb +48 -0
- metadata +77 -29
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f37221728fd67758c8f6e22385aac200fc51443a7bb27973387e73165c8864b4
|
4
|
+
data.tar.gz: 9d84e2136af8a8d6a0230406f5d66e5c175b5f95877343875c3ee2ff0d5ba863
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 42f4b44a38abe4a19d65e1e1321c4758b3f4734753e71a365f1854e682caefd1695e29e21a501d6c56fb027fc0ca285827861b1662ebe1333df451d8876787ea
|
7
|
+
data.tar.gz: c247691e4182530559aac6d193926307c0f65043b3077cc87dc4c963ab8a19ff1409d7405e14136cd46d817544b108fb2944cd0aefd993ac04662b665daab36d
|
data/README.md
CHANGED
@@ -123,16 +123,16 @@ All URIs are relative to *https://api.phoenixnap.com/billing/v1*
|
|
123
123
|
Class | Method | HTTP request | Description
|
124
124
|
------------ | ------------- | ------------- | -------------
|
125
125
|
*BillingApi::BillingConfigurationsApi* | [**account_billing_configuration_me_get**](docs/BillingConfigurationsApi.md#account_billing_configuration_me_get) | **GET** /account-billing-configurations/me | Retrieves billing configuration associated with the authenticated account.
|
126
|
-
*BillingApi::
|
126
|
+
*BillingApi::ProductAvailabilityApi* | [**product_availability_get**](docs/ProductAvailabilityApi.md#product_availability_get) | **GET** /product-availability | List all Product availabilities.
|
127
127
|
*BillingApi::ProductsApi* | [**products_get**](docs/ProductsApi.md#products_get) | **GET** /products | List all Products.
|
128
128
|
*BillingApi::RatedUsageApi* | [**rated_usage_get**](docs/RatedUsageApi.md#rated_usage_get) | **GET** /rated-usage | List the rated usage.
|
129
129
|
*BillingApi::RatedUsageApi* | [**rated_usage_month_to_date_get**](docs/RatedUsageApi.md#rated_usage_month_to_date_get) | **GET** /rated-usage/month-to-date | List the rated usage records for the current calendar month.
|
130
130
|
*BillingApi::ReservationsApi* | [**reservations_get**](docs/ReservationsApi.md#reservations_get) | **GET** /reservations | List all Reservations.
|
131
131
|
*BillingApi::ReservationsApi* | [**reservations_post**](docs/ReservationsApi.md#reservations_post) | **POST** /reservations | Create a reservation.
|
132
|
-
*BillingApi::ReservationsApi* | [**reservations_reservation_id_actions_auto_renew_disable_post**](docs/ReservationsApi.md#reservations_reservation_id_actions_auto_renew_disable_post) | **POST** /reservations/{
|
133
|
-
*BillingApi::ReservationsApi* | [**reservations_reservation_id_actions_auto_renew_enable_post**](docs/ReservationsApi.md#reservations_reservation_id_actions_auto_renew_enable_post) | **POST** /reservations/{
|
134
|
-
*BillingApi::ReservationsApi* | [**reservations_reservation_id_actions_convert_post**](docs/ReservationsApi.md#reservations_reservation_id_actions_convert_post) | **POST** /reservations/{
|
135
|
-
*BillingApi::ReservationsApi* | [**reservations_reservation_id_get**](docs/ReservationsApi.md#reservations_reservation_id_get) | **GET** /reservations/{
|
132
|
+
*BillingApi::ReservationsApi* | [**reservations_reservation_id_actions_auto_renew_disable_post**](docs/ReservationsApi.md#reservations_reservation_id_actions_auto_renew_disable_post) | **POST** /reservations/{id}/actions/auto-renew/disable | Disable auto-renewal for reservation by id.
|
133
|
+
*BillingApi::ReservationsApi* | [**reservations_reservation_id_actions_auto_renew_enable_post**](docs/ReservationsApi.md#reservations_reservation_id_actions_auto_renew_enable_post) | **POST** /reservations/{id}/actions/auto-renew/enable | Enable auto-renewal for unexpired reservation by reservation id.
|
134
|
+
*BillingApi::ReservationsApi* | [**reservations_reservation_id_actions_convert_post**](docs/ReservationsApi.md#reservations_reservation_id_actions_convert_post) | **POST** /reservations/{id}/actions/convert | Convert reservation pricing model by reservation ID.
|
135
|
+
*BillingApi::ReservationsApi* | [**reservations_reservation_id_get**](docs/ReservationsApi.md#reservations_reservation_id_get) | **GET** /reservations/{id} | Get a reservation.
|
136
136
|
|
137
137
|
|
138
138
|
## Documentation for Models
|
@@ -141,26 +141,35 @@ 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)
|
149
154
|
- [BillingApi::OperatingSystemRecord](docs/OperatingSystemRecord.md)
|
155
|
+
- [BillingApi::PackageUnitEnum](docs/PackageUnitEnum.md)
|
150
156
|
- [BillingApi::PriceUnitEnum](docs/PriceUnitEnum.md)
|
151
157
|
- [BillingApi::PricingPlan](docs/PricingPlan.md)
|
152
158
|
- [BillingApi::Product](docs/Product.md)
|
153
159
|
- [BillingApi::ProductAvailability](docs/ProductAvailability.md)
|
154
160
|
- [BillingApi::ProductCategoryEnum](docs/ProductCategoryEnum.md)
|
155
161
|
- [BillingApi::ProductsGet200ResponseInner](docs/ProductsGet200ResponseInner.md)
|
162
|
+
- [BillingApi::PromoCreditDetails](docs/PromoCreditDetails.md)
|
156
163
|
- [BillingApi::PublicSubnetDetails](docs/PublicSubnetDetails.md)
|
157
164
|
- [BillingApi::PublicSubnetRecord](docs/PublicSubnetRecord.md)
|
158
165
|
- [BillingApi::RatedUsageGet200ResponseInner](docs/RatedUsageGet200ResponseInner.md)
|
166
|
+
- [BillingApi::RatedUsageProductCategoryEnum](docs/RatedUsageProductCategoryEnum.md)
|
159
167
|
- [BillingApi::RatedUsageRecord](docs/RatedUsageRecord.md)
|
160
168
|
- [BillingApi::Reservation](docs/Reservation.md)
|
161
169
|
- [BillingApi::ReservationAutoRenewDisableRequest](docs/ReservationAutoRenewDisableRequest.md)
|
162
170
|
- [BillingApi::ReservationInvoicingModelEnum](docs/ReservationInvoicingModelEnum.md)
|
163
171
|
- [BillingApi::ReservationModelEnum](docs/ReservationModelEnum.md)
|
172
|
+
- [BillingApi::ReservationProductCategoryEnum](docs/ReservationProductCategoryEnum.md)
|
164
173
|
- [BillingApi::ReservationRequest](docs/ReservationRequest.md)
|
165
174
|
- [BillingApi::ServerDetails](docs/ServerDetails.md)
|
166
175
|
- [BillingApi::ServerProduct](docs/ServerProduct.md)
|
@@ -168,6 +177,8 @@ Class | Method | HTTP request | Description
|
|
168
177
|
- [BillingApi::ServerRecord](docs/ServerRecord.md)
|
169
178
|
- [BillingApi::StorageDetails](docs/StorageDetails.md)
|
170
179
|
- [BillingApi::StorageRecord](docs/StorageRecord.md)
|
180
|
+
- [BillingApi::SystemCreditCauseEnum](docs/SystemCreditCauseEnum.md)
|
181
|
+
- [BillingApi::SystemCreditDetails](docs/SystemCreditDetails.md)
|
171
182
|
- [BillingApi::ThresholdConfigurationDetails](docs/ThresholdConfigurationDetails.md)
|
172
183
|
|
173
184
|
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.0
|
1
|
+
2.1.0
|
data/docs/BandwidthRecord.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** | **
|
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:
|
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
|
+
|
data/docs/DiscountDetails.md
CHANGED
@@ -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** | **
|
8
|
+
| **type** | [**DiscountTypeEnum**](DiscountTypeEnum.md) | | |
|
9
9
|
| **value** | **Float** | The value or amount of the discount. The interpretation of this value depends on the 'type' 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:
|
18
|
+
type: null,
|
19
19
|
value: 20.5
|
20
20
|
)
|
21
21
|
```
|
@@ -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** | **
|
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** | [**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:
|
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
@@ -13,7 +13,7 @@
|
|
13
13
|
| **applicable_discounts** | [**ApplicableDiscounts**](ApplicableDiscounts.md) | | [optional] |
|
14
14
|
| **correlated_product_code** | **String** | Product code of the product this product is correlated with | [optional] |
|
15
15
|
| **package_quantity** | **Float** | Package size per month. | [optional] |
|
16
|
-
| **package_unit** | **
|
16
|
+
| **package_unit** | [**PackageUnitEnum**](PackageUnitEnum.md) | | [optional] |
|
17
17
|
|
18
18
|
## Example
|
19
19
|
|
@@ -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:
|
27
|
-
pricing_model:
|
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,89 @@
|
|
1
|
+
# BillingApi::ProductAvailabilityApi
|
2
|
+
|
3
|
+
All URIs are relative to *https://api.phoenixnap.com/billing/v1*
|
4
|
+
|
5
|
+
| Method | HTTP request | Description |
|
6
|
+
| ------ | ------------ | ----------- |
|
7
|
+
| [**product_availability_get**](ProductAvailabilityApi.md#product_availability_get) | **GET** /product-availability | List all Product availabilities. |
|
8
|
+
|
9
|
+
|
10
|
+
## product_availability_get
|
11
|
+
|
12
|
+
> <Array<ProductAvailability>> product_availability_get(opts)
|
13
|
+
|
14
|
+
List all Product availabilities.
|
15
|
+
|
16
|
+
Retrieves the list of product availability details.
|
17
|
+
|
18
|
+
### Examples
|
19
|
+
|
20
|
+
```ruby
|
21
|
+
require 'time'
|
22
|
+
require 'pnap_billing_api'
|
23
|
+
# setup authorization
|
24
|
+
BillingApi.configure do |config|
|
25
|
+
# Configure OAuth2 access token for authorization: OAuth2
|
26
|
+
config.access_token = 'YOUR ACCESS TOKEN'
|
27
|
+
end
|
28
|
+
|
29
|
+
api_instance = BillingApi::ProductAvailabilityApi.new
|
30
|
+
opts = {
|
31
|
+
product_category: ['SERVER'], # Array<String> | Product category. Currently only SERVER category is supported.
|
32
|
+
product_code: ['inner_example'], # Array<String> |
|
33
|
+
show_only_min_quantity_available: true, # Boolean | Show only locations where product with requested quantity is available or all locations where product is offered.
|
34
|
+
location: [BillingApi::LocationEnum::PHX], # Array<LocationEnum> |
|
35
|
+
solution: ['SERVER_RANCHER'], # Array<String> |
|
36
|
+
min_quantity: 2 # Float | Minimal quantity of product needed. Minimum, maximum and default values might differ for different products. For servers, they are 1, 10 and 1 respectively.
|
37
|
+
}
|
38
|
+
|
39
|
+
begin
|
40
|
+
# List all Product availabilities.
|
41
|
+
result = api_instance.product_availability_get(opts)
|
42
|
+
p result
|
43
|
+
rescue BillingApi::ApiError => e
|
44
|
+
puts "Error when calling ProductAvailabilityApi->product_availability_get: #{e}"
|
45
|
+
end
|
46
|
+
```
|
47
|
+
|
48
|
+
#### Using the product_availability_get_with_http_info variant
|
49
|
+
|
50
|
+
This returns an Array which contains the response data, status code and headers.
|
51
|
+
|
52
|
+
> <Array(<Array<ProductAvailability>>, Integer, Hash)> product_availability_get_with_http_info(opts)
|
53
|
+
|
54
|
+
```ruby
|
55
|
+
begin
|
56
|
+
# List all Product availabilities.
|
57
|
+
data, status_code, headers = api_instance.product_availability_get_with_http_info(opts)
|
58
|
+
p status_code # => 2xx
|
59
|
+
p headers # => { ... }
|
60
|
+
p data # => <Array<ProductAvailability>>
|
61
|
+
rescue BillingApi::ApiError => e
|
62
|
+
puts "Error when calling ProductAvailabilityApi->product_availability_get_with_http_info: #{e}"
|
63
|
+
end
|
64
|
+
```
|
65
|
+
|
66
|
+
### Parameters
|
67
|
+
|
68
|
+
| Name | Type | Description | Notes |
|
69
|
+
| ---- | ---- | ----------- | ----- |
|
70
|
+
| **product_category** | [**Array<String>**](String.md) | Product category. Currently only SERVER category is supported. | [optional] |
|
71
|
+
| **product_code** | [**Array<String>**](String.md) | | [optional] |
|
72
|
+
| **show_only_min_quantity_available** | **Boolean** | Show only locations where product with requested quantity is available or all locations where product is offered. | [optional][default to true] |
|
73
|
+
| **location** | [**Array<LocationEnum>**](LocationEnum.md) | | [optional] |
|
74
|
+
| **solution** | [**Array<String>**](String.md) | | [optional] |
|
75
|
+
| **min_quantity** | **Float** | Minimal quantity of product needed. Minimum, maximum and default values might differ for different products. For servers, they are 1, 10 and 1 respectively. | [optional] |
|
76
|
+
|
77
|
+
### Return type
|
78
|
+
|
79
|
+
[**Array<ProductAvailability>**](ProductAvailability.md)
|
80
|
+
|
81
|
+
### Authorization
|
82
|
+
|
83
|
+
[OAuth2](../README.md#OAuth2)
|
84
|
+
|
85
|
+
### HTTP request headers
|
86
|
+
|
87
|
+
- **Content-Type**: Not defined
|
88
|
+
- **Accept**: application/json
|
89
|
+
|
data/docs/ProductsApi.md
CHANGED
@@ -4,91 +4,9 @@ All URIs are relative to *https://api.phoenixnap.com/billing/v1*
|
|
4
4
|
|
5
5
|
| Method | HTTP request | Description |
|
6
6
|
| ------ | ------------ | ----------- |
|
7
|
-
| [**product_availability_get**](ProductsApi.md#product_availability_get) | **GET** /product-availability | List all Product availabilities. |
|
8
7
|
| [**products_get**](ProductsApi.md#products_get) | **GET** /products | List all Products. |
|
9
8
|
|
10
9
|
|
11
|
-
## product_availability_get
|
12
|
-
|
13
|
-
> <Array<ProductAvailability>> product_availability_get(opts)
|
14
|
-
|
15
|
-
List all Product availabilities.
|
16
|
-
|
17
|
-
Retrieves the list of product availability details.
|
18
|
-
|
19
|
-
### Examples
|
20
|
-
|
21
|
-
```ruby
|
22
|
-
require 'time'
|
23
|
-
require 'pnap_billing_api'
|
24
|
-
# setup authorization
|
25
|
-
BillingApi.configure do |config|
|
26
|
-
# Configure OAuth2 access token for authorization: OAuth2
|
27
|
-
config.access_token = 'YOUR ACCESS TOKEN'
|
28
|
-
end
|
29
|
-
|
30
|
-
api_instance = BillingApi::ProductsApi.new
|
31
|
-
opts = {
|
32
|
-
product_category: ['SERVER'], # Array<String> | Product category. Currently only SERVER category is supported.
|
33
|
-
product_code: ['inner_example'], # Array<String> |
|
34
|
-
show_only_min_quantity_available: true, # Boolean | Show only locations where product with requested quantity is available or all locations where product is offered.
|
35
|
-
location: [BillingApi::LocationEnum::PHX], # Array<LocationEnum> |
|
36
|
-
solution: ['SERVER_RANCHER'], # Array<String> |
|
37
|
-
min_quantity: 2 # Float | Minimal quantity of product needed. Minimum, maximum and default values might differ for different products. For servers, they are 1, 10 and 1 respectively.
|
38
|
-
}
|
39
|
-
|
40
|
-
begin
|
41
|
-
# List all Product availabilities.
|
42
|
-
result = api_instance.product_availability_get(opts)
|
43
|
-
p result
|
44
|
-
rescue BillingApi::ApiError => e
|
45
|
-
puts "Error when calling ProductsApi->product_availability_get: #{e}"
|
46
|
-
end
|
47
|
-
```
|
48
|
-
|
49
|
-
#### Using the product_availability_get_with_http_info variant
|
50
|
-
|
51
|
-
This returns an Array which contains the response data, status code and headers.
|
52
|
-
|
53
|
-
> <Array(<Array<ProductAvailability>>, Integer, Hash)> product_availability_get_with_http_info(opts)
|
54
|
-
|
55
|
-
```ruby
|
56
|
-
begin
|
57
|
-
# List all Product availabilities.
|
58
|
-
data, status_code, headers = api_instance.product_availability_get_with_http_info(opts)
|
59
|
-
p status_code # => 2xx
|
60
|
-
p headers # => { ... }
|
61
|
-
p data # => <Array<ProductAvailability>>
|
62
|
-
rescue BillingApi::ApiError => e
|
63
|
-
puts "Error when calling ProductsApi->product_availability_get_with_http_info: #{e}"
|
64
|
-
end
|
65
|
-
```
|
66
|
-
|
67
|
-
### Parameters
|
68
|
-
|
69
|
-
| Name | Type | Description | Notes |
|
70
|
-
| ---- | ---- | ----------- | ----- |
|
71
|
-
| **product_category** | [**Array<String>**](String.md) | Product category. Currently only SERVER category is supported. | [optional] |
|
72
|
-
| **product_code** | [**Array<String>**](String.md) | | [optional] |
|
73
|
-
| **show_only_min_quantity_available** | **Boolean** | Show only locations where product with requested quantity is available or all locations where product is offered. | [optional][default to true] |
|
74
|
-
| **location** | [**Array<LocationEnum>**](LocationEnum.md) | | [optional] |
|
75
|
-
| **solution** | [**Array<String>**](String.md) | | [optional] |
|
76
|
-
| **min_quantity** | **Float** | Minimal quantity of product needed. Minimum, maximum and default values might differ for different products. For servers, they are 1, 10 and 1 respectively. | [optional] |
|
77
|
-
|
78
|
-
### Return type
|
79
|
-
|
80
|
-
[**Array<ProductAvailability>**](ProductAvailability.md)
|
81
|
-
|
82
|
-
### Authorization
|
83
|
-
|
84
|
-
[OAuth2](../README.md#OAuth2)
|
85
|
-
|
86
|
-
### HTTP request headers
|
87
|
-
|
88
|
-
- **Content-Type**: Not defined
|
89
|
-
- **Accept**: application/json
|
90
|
-
|
91
|
-
|
92
10
|
## products_get
|
93
11
|
|
94
12
|
> <Array<ProductsGet200ResponseInner>> products_get(opts)
|
@@ -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
|
+
|
data/docs/PublicSubnetRecord.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** | **
|
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** | [**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:
|
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
|
+
|
data/docs/RatedUsageRecord.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** | **
|
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
|
|
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:
|
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
|
|
data/docs/Reservation.md
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
| ---- | ---- | ----------- | ----- |
|
7
7
|
| **id** | **String** | The reservation identifier. | |
|
8
8
|
| **product_code** | **String** | The code identifying the product. This code has significant across all locations. | |
|
9
|
-
| **product_category** | **
|
9
|
+
| **product_category** | [**ReservationProductCategoryEnum**](ReservationProductCategoryEnum.md) | | |
|
10
10
|
| **location** | [**LocationEnum**](LocationEnum.md) | | |
|
11
11
|
| **reservation_model** | [**ReservationModelEnum**](ReservationModelEnum.md) | | |
|
12
12
|
| **initial_invoice_model** | [**ReservationInvoicingModelEnum**](ReservationInvoicingModelEnum.md) | | [optional] |
|
@@ -29,7 +29,7 @@ require 'pnap_billing_api'
|
|
29
29
|
instance = BillingApi::Reservation.new(
|
30
30
|
id: 83604275-bdba-490a-b87a-978e8dffdb14,
|
31
31
|
product_code: s1.c1.small,
|
32
|
-
product_category:
|
32
|
+
product_category: null,
|
33
33
|
location: null,
|
34
34
|
reservation_model: null,
|
35
35
|
initial_invoice_model: null,
|