pnap_billing_api 2.1.0 → 2.1.2

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f37221728fd67758c8f6e22385aac200fc51443a7bb27973387e73165c8864b4
4
- data.tar.gz: 9d84e2136af8a8d6a0230406f5d66e5c175b5f95877343875c3ee2ff0d5ba863
3
+ metadata.gz: 4fe2f8bfaed5ab0853423725cc7c30e1bb0e5d49ce0a10acc6ad19c960651742
4
+ data.tar.gz: 60ed7b8bbd6fd4e249cdf3097a49048865a788de960a2769a66444532ba43ee6
5
5
  SHA512:
6
- metadata.gz: 42f4b44a38abe4a19d65e1e1321c4758b3f4734753e71a365f1854e682caefd1695e29e21a501d6c56fb027fc0ca285827861b1662ebe1333df451d8876787ea
7
- data.tar.gz: c247691e4182530559aac6d193926307c0f65043b3077cc87dc4c963ab8a19ff1409d7405e14136cd46d817544b108fb2944cd0aefd993ac04662b665daab36d
6
+ metadata.gz: b720eda3cc235037af2e6d8716f45ad9a7dab7d98b84a1159c466038cc42b39b606c692935f960ea824eca58391936f3788bcf5a3936dc34ea028777046ade57
7
+ data.tar.gz: 7b4dadc644145daa85acd6d43c43e7a47eac241e9a5d899420a37119714a116920eb89dd7f48813dff4bbd2723039e928a0d33349633c763104c57c1996657bc
data/README.md CHANGED
@@ -137,6 +137,7 @@ Class | Method | HTTP request | Description
137
137
 
138
138
  ## Documentation for Models
139
139
 
140
+ - [BillingApi::ApplicableDiscountDetails](docs/ApplicableDiscountDetails.md)
140
141
  - [BillingApi::ApplicableDiscounts](docs/ApplicableDiscounts.md)
141
142
  - [BillingApi::BandwidthDetails](docs/BandwidthDetails.md)
142
143
  - [BillingApi::BandwidthRecord](docs/BandwidthRecord.md)
data/VERSION CHANGED
@@ -1 +1 @@
1
- 2.1.0
1
+ 2.1.2
@@ -0,0 +1,24 @@
1
+ # BillingApi::ApplicableDiscountDetails
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **code** | **String** | A unique code associated with the discount. | |
8
+ | **type** | [**DiscountTypeEnum**](DiscountTypeEnum.md) | | |
9
+ | **value** | **Float** | The value or amount of the discount. The interpretation of this value depends on the 'type' of discount. | |
10
+ | **coupon_code** | **String** | Coupon code which is the source of the discount. | [optional] |
11
+
12
+ ## Example
13
+
14
+ ```ruby
15
+ require 'pnap_billing_api'
16
+
17
+ instance = BillingApi::ApplicableDiscountDetails.new(
18
+ code: new-year-2022-monthly,
19
+ type: null,
20
+ value: 20.5,
21
+ coupon_code: promo234
22
+ )
23
+ ```
24
+
@@ -5,7 +5,7 @@
5
5
  | Name | Type | Description | Notes |
6
6
  | ---- | ---- | ----------- | ----- |
7
7
  | **discounted_price** | **Float** | The price of the product after applying a discount. | [optional] |
8
- | **discount_details** | [**Array<DiscountDetails>**](DiscountDetails.md) | | [optional] |
8
+ | **discount_details** | [**Array<ApplicableDiscountDetails>**](ApplicableDiscountDetails.md) | | [optional] |
9
9
 
10
10
  ## Example
11
11
 
@@ -22,7 +22,7 @@
22
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
23
  | **correlation_id** | **String** | Holds usage record id | |
24
24
  | **reservation_id** | **String** | Reservation id associated with this rated usage record. | [optional] |
25
- | **discount_details** | [**DiscountDetails**](DiscountDetails.md) | | [optional] |
25
+ | **discount_details** | [**ApplicableDiscountDetails**](ApplicableDiscountDetails.md) | | [optional] |
26
26
  | **credit_details** | [**Array<CreditDetails>**](CreditDetails.md) | | [optional] |
27
27
  | **metadata** | [**BandwidthDetails**](BandwidthDetails.md) | | |
28
28
 
@@ -22,7 +22,7 @@
22
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
23
  | **correlation_id** | **String** | Holds usage record id | |
24
24
  | **reservation_id** | **String** | Reservation id associated with this rated usage record. | [optional] |
25
- | **discount_details** | [**DiscountDetails**](DiscountDetails.md) | | [optional] |
25
+ | **discount_details** | [**ApplicableDiscountDetails**](ApplicableDiscountDetails.md) | | [optional] |
26
26
  | **credit_details** | [**Array<CreditDetails>**](CreditDetails.md) | | [optional] |
27
27
  | **metadata** | [**OperatingSystemDetails**](OperatingSystemDetails.md) | | |
28
28
 
@@ -22,7 +22,7 @@
22
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
23
  | **correlation_id** | **String** | Holds usage record id | |
24
24
  | **reservation_id** | **String** | Reservation id associated with this rated usage record. | [optional] |
25
- | **discount_details** | [**DiscountDetails**](DiscountDetails.md) | | [optional] |
25
+ | **discount_details** | [**ApplicableDiscountDetails**](ApplicableDiscountDetails.md) | | [optional] |
26
26
  | **credit_details** | [**Array<CreditDetails>**](CreditDetails.md) | | [optional] |
27
27
  | **metadata** | [**PublicSubnetDetails**](PublicSubnetDetails.md) | | |
28
28
 
@@ -22,7 +22,7 @@
22
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
23
  | **correlation_id** | **String** | Holds usage record id | |
24
24
  | **reservation_id** | **String** | Reservation id associated with this rated usage record. | [optional] |
25
- | **discount_details** | [**DiscountDetails**](DiscountDetails.md) | | [optional] |
25
+ | **discount_details** | [**ApplicableDiscountDetails**](ApplicableDiscountDetails.md) | | [optional] |
26
26
  | **credit_details** | [**Array<CreditDetails>**](CreditDetails.md) | | [optional] |
27
27
 
28
28
  ## Example
data/docs/ServerRecord.md CHANGED
@@ -22,7 +22,7 @@
22
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
23
  | **correlation_id** | **String** | Holds usage record id | |
24
24
  | **reservation_id** | **String** | Reservation id associated with this rated usage record. | [optional] |
25
- | **discount_details** | [**DiscountDetails**](DiscountDetails.md) | | [optional] |
25
+ | **discount_details** | [**ApplicableDiscountDetails**](ApplicableDiscountDetails.md) | | [optional] |
26
26
  | **credit_details** | [**Array<CreditDetails>**](CreditDetails.md) | | [optional] |
27
27
  | **metadata** | [**ServerDetails**](ServerDetails.md) | | |
28
28
 
@@ -22,7 +22,7 @@
22
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
23
  | **correlation_id** | **String** | Holds usage record id | |
24
24
  | **reservation_id** | **String** | Reservation id associated with this rated usage record. | [optional] |
25
- | **discount_details** | [**DiscountDetails**](DiscountDetails.md) | | [optional] |
25
+ | **discount_details** | [**ApplicableDiscountDetails**](ApplicableDiscountDetails.md) | | [optional] |
26
26
  | **credit_details** | [**Array<CreditDetails>**](CreditDetails.md) | | [optional] |
27
27
  | **metadata** | [**StorageDetails**](StorageDetails.md) | | |
28
28
 
@@ -0,0 +1,294 @@
1
+ =begin
2
+ #Billing API
3
+
4
+ #Automate your infrastructure billing with the Bare Metal Cloud Billing API. Reserve your server instances to ensure guaranteed resource availability for 12, 24, and 36 months. Retrieve your server’s rated usage for a given period and enable or disable auto-renewals.<br> <br> <span class='pnap-api-knowledge-base-link'> Knowledge base articles to help you can be found <a href='https://phoenixnap.com/kb/phoenixnap-bare-metal-cloud-billing-models' target='_blank'>here</a> </span><br> <br> <b>All URLs are relative to (https://api.phoenixnap.com/billing/v1/)</b>
5
+
6
+ The version of the OpenAPI document: 0.1
7
+ Contact: support@phoenixnap.com
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 7.2.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module BillingApi
17
+ class ApplicableDiscountDetails
18
+ # A unique code associated with the discount.
19
+ attr_accessor :code
20
+
21
+ attr_accessor :type
22
+
23
+ # The value or amount of the discount. The interpretation of this value depends on the 'type' of discount.
24
+ attr_accessor :value
25
+
26
+ # Coupon code which is the source of the discount.
27
+ attr_accessor :coupon_code
28
+
29
+ class EnumAttributeValidator
30
+ attr_reader :datatype
31
+ attr_reader :allowable_values
32
+
33
+ def initialize(datatype, allowable_values)
34
+ @allowable_values = allowable_values.map do |value|
35
+ case datatype.to_s
36
+ when /Integer/i
37
+ value.to_i
38
+ when /Float/i
39
+ value.to_f
40
+ else
41
+ value
42
+ end
43
+ end
44
+ end
45
+
46
+ def valid?(value)
47
+ !value || allowable_values.include?(value)
48
+ end
49
+ end
50
+
51
+ # Attribute mapping from ruby-style variable name to JSON key.
52
+ def self.attribute_map
53
+ {
54
+ :'code' => :'code',
55
+ :'type' => :'type',
56
+ :'value' => :'value',
57
+ :'coupon_code' => :'couponCode'
58
+ }
59
+ end
60
+
61
+ # Returns all the JSON keys this model knows about
62
+ def self.acceptable_attributes
63
+ attribute_map.values
64
+ end
65
+
66
+ # Attribute type mapping.
67
+ def self.openapi_types
68
+ {
69
+ :'code' => :'String',
70
+ :'type' => :'DiscountTypeEnum',
71
+ :'value' => :'Float',
72
+ :'coupon_code' => :'String'
73
+ }
74
+ end
75
+
76
+ # List of attributes with nullable: true
77
+ def self.openapi_nullable
78
+ Set.new([
79
+ ])
80
+ end
81
+
82
+ # List of class defined in allOf (OpenAPI v3)
83
+ def self.openapi_all_of
84
+ [
85
+ :'DiscountDetails'
86
+ ]
87
+ end
88
+
89
+ # Initializes the object
90
+ # @param [Hash] attributes Model attributes in the form of hash
91
+ def initialize(attributes = {})
92
+ if (!attributes.is_a?(Hash))
93
+ fail ArgumentError, "The input argument (attributes) must be a hash in `BillingApi::ApplicableDiscountDetails` initialize method"
94
+ end
95
+
96
+ # check to see if the attribute exists and convert string to symbol for hash key
97
+ attributes = attributes.each_with_object({}) { |(k, v), h|
98
+ if (!self.class.attribute_map.key?(k.to_sym))
99
+ fail ArgumentError, "`#{k}` is not a valid attribute in `BillingApi::ApplicableDiscountDetails`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
100
+ end
101
+ h[k.to_sym] = v
102
+ }
103
+
104
+ if attributes.key?(:'code')
105
+ self.code = attributes[:'code']
106
+ else
107
+ self.code = nil
108
+ end
109
+
110
+ if attributes.key?(:'type')
111
+ self.type = attributes[:'type']
112
+ else
113
+ self.type = nil
114
+ end
115
+
116
+ if attributes.key?(:'value')
117
+ self.value = attributes[:'value']
118
+ else
119
+ self.value = nil
120
+ end
121
+
122
+ if attributes.key?(:'coupon_code')
123
+ self.coupon_code = attributes[:'coupon_code']
124
+ end
125
+ end
126
+
127
+ # Show invalid properties with the reasons. Usually used together with valid?
128
+ # @return Array for valid properties with the reasons
129
+ def list_invalid_properties
130
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
131
+ invalid_properties = Array.new
132
+ if @code.nil?
133
+ invalid_properties.push('invalid value for "code", code cannot be nil.')
134
+ end
135
+
136
+ if @type.nil?
137
+ invalid_properties.push('invalid value for "type", type cannot be nil.')
138
+ end
139
+
140
+ if @value.nil?
141
+ invalid_properties.push('invalid value for "value", value cannot be nil.')
142
+ end
143
+
144
+ invalid_properties
145
+ end
146
+
147
+ # Check to see if the all the properties in the model are valid
148
+ # @return true if the model is valid
149
+ def valid?
150
+ warn '[DEPRECATED] the `valid?` method is obsolete'
151
+ return false if @code.nil?
152
+ return false if @type.nil?
153
+ return false if @value.nil?
154
+ true
155
+ end
156
+
157
+ # Checks equality by comparing each attribute.
158
+ # @param [Object] Object to be compared
159
+ def ==(o)
160
+ return true if self.equal?(o)
161
+ self.class == o.class &&
162
+ code == o.code &&
163
+ type == o.type &&
164
+ value == o.value &&
165
+ coupon_code == o.coupon_code
166
+ end
167
+
168
+ # @see the `==` method
169
+ # @param [Object] Object to be compared
170
+ def eql?(o)
171
+ self == o
172
+ end
173
+
174
+ # Calculates hash code according to all attributes.
175
+ # @return [Integer] Hash code
176
+ def hash
177
+ [code, type, value, coupon_code].hash
178
+ end
179
+
180
+ # Builds the object from hash
181
+ # @param [Hash] attributes Model attributes in the form of hash
182
+ # @return [Object] Returns the model itself
183
+ def self.build_from_hash(attributes)
184
+ return nil unless attributes.is_a?(Hash)
185
+ attributes = attributes.transform_keys(&:to_sym)
186
+ transformed_hash = {}
187
+ openapi_types.each_pair do |key, type|
188
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
189
+ transformed_hash["#{key}"] = nil
190
+ elsif type =~ /\AArray<(.*)>/i
191
+ # check to ensure the input is an array given that the attribute
192
+ # is documented as an array but the input is not
193
+ if attributes[attribute_map[key]].is_a?(Array)
194
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
195
+ end
196
+ elsif !attributes[attribute_map[key]].nil?
197
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
198
+ end
199
+ end
200
+ new(transformed_hash)
201
+ end
202
+
203
+ # Deserializes the data based on type
204
+ # @param string type Data type
205
+ # @param string value Value to be deserialized
206
+ # @return [Object] Deserialized data
207
+ def self._deserialize(type, value)
208
+ case type.to_sym
209
+ when :Time
210
+ Time.parse(value)
211
+ when :Date
212
+ Date.parse(value)
213
+ when :String
214
+ value.to_s
215
+ when :Integer
216
+ value.to_i
217
+ when :Float
218
+ value.to_f
219
+ when :Boolean
220
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
221
+ true
222
+ else
223
+ false
224
+ end
225
+ when :Object
226
+ # generic object (usually a Hash), return directly
227
+ value
228
+ when /\AArray<(?<inner_type>.+)>\z/
229
+ inner_type = Regexp.last_match[:inner_type]
230
+ value.map { |v| _deserialize(inner_type, v) }
231
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
232
+ k_type = Regexp.last_match[:k_type]
233
+ v_type = Regexp.last_match[:v_type]
234
+ {}.tap do |hash|
235
+ value.each do |k, v|
236
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
237
+ end
238
+ end
239
+ else # model
240
+ # models (e.g. Pet) or oneOf
241
+ klass = BillingApi.const_get(type)
242
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
243
+ end
244
+ end
245
+
246
+ # Returns the string representation of the object
247
+ # @return [String] String presentation of the object
248
+ def to_s
249
+ to_hash.to_s
250
+ end
251
+
252
+ # to_body is an alias to to_hash (backward compatibility)
253
+ # @return [Hash] Returns the object in the form of hash
254
+ def to_body
255
+ to_hash
256
+ end
257
+
258
+ # Returns the object in the form of hash
259
+ # @return [Hash] Returns the object in the form of hash
260
+ def to_hash
261
+ hash = {}
262
+ self.class.attribute_map.each_pair do |attr, param|
263
+ value = self.send(attr)
264
+ if value.nil?
265
+ is_nullable = self.class.openapi_nullable.include?(attr)
266
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
267
+ end
268
+
269
+ hash[param] = _to_hash(value)
270
+ end
271
+ hash
272
+ end
273
+
274
+ # Outputs non-array value in the form of hash
275
+ # For object, use to_hash. Otherwise, just return the value
276
+ # @param [Object] value Any valid value
277
+ # @return [Hash] Returns the value in the form of hash
278
+ def _to_hash(value)
279
+ if value.is_a?(Array)
280
+ value.compact.map { |v| _to_hash(v) }
281
+ elsif value.is_a?(Hash)
282
+ {}.tap do |hash|
283
+ value.each { |k, v| hash[k] = _to_hash(v) }
284
+ end
285
+ elsif value.respond_to? :to_hash
286
+ value.to_hash
287
+ else
288
+ value
289
+ end
290
+ end
291
+
292
+ end
293
+
294
+ end
@@ -38,7 +38,7 @@ module BillingApi
38
38
  def self.openapi_types
39
39
  {
40
40
  :'discounted_price' => :'Float',
41
- :'discount_details' => :'Array<DiscountDetails>'
41
+ :'discount_details' => :'Array<ApplicableDiscountDetails>'
42
42
  }
43
43
  end
44
44
 
@@ -148,7 +148,7 @@ module BillingApi
148
148
  :'usage_session_id' => :'String',
149
149
  :'correlation_id' => :'String',
150
150
  :'reservation_id' => :'String',
151
- :'discount_details' => :'DiscountDetails',
151
+ :'discount_details' => :'ApplicableDiscountDetails',
152
152
  :'credit_details' => :'Array<CreditDetails>',
153
153
  :'metadata' => :'BandwidthDetails'
154
154
  }
@@ -148,7 +148,7 @@ module BillingApi
148
148
  :'usage_session_id' => :'String',
149
149
  :'correlation_id' => :'String',
150
150
  :'reservation_id' => :'String',
151
- :'discount_details' => :'DiscountDetails',
151
+ :'discount_details' => :'ApplicableDiscountDetails',
152
152
  :'credit_details' => :'Array<CreditDetails>',
153
153
  :'metadata' => :'OperatingSystemDetails'
154
154
  }
@@ -148,7 +148,7 @@ module BillingApi
148
148
  :'usage_session_id' => :'String',
149
149
  :'correlation_id' => :'String',
150
150
  :'reservation_id' => :'String',
151
- :'discount_details' => :'DiscountDetails',
151
+ :'discount_details' => :'ApplicableDiscountDetails',
152
152
  :'credit_details' => :'Array<CreditDetails>',
153
153
  :'metadata' => :'PublicSubnetDetails'
154
154
  }
@@ -146,7 +146,7 @@ module BillingApi
146
146
  :'usage_session_id' => :'String',
147
147
  :'correlation_id' => :'String',
148
148
  :'reservation_id' => :'String',
149
- :'discount_details' => :'DiscountDetails',
149
+ :'discount_details' => :'ApplicableDiscountDetails',
150
150
  :'credit_details' => :'Array<CreditDetails>'
151
151
  }
152
152
  end
@@ -148,7 +148,7 @@ module BillingApi
148
148
  :'usage_session_id' => :'String',
149
149
  :'correlation_id' => :'String',
150
150
  :'reservation_id' => :'String',
151
- :'discount_details' => :'DiscountDetails',
151
+ :'discount_details' => :'ApplicableDiscountDetails',
152
152
  :'credit_details' => :'Array<CreditDetails>',
153
153
  :'metadata' => :'ServerDetails'
154
154
  }
@@ -148,7 +148,7 @@ module BillingApi
148
148
  :'usage_session_id' => :'String',
149
149
  :'correlation_id' => :'String',
150
150
  :'reservation_id' => :'String',
151
- :'discount_details' => :'DiscountDetails',
151
+ :'discount_details' => :'ApplicableDiscountDetails',
152
152
  :'credit_details' => :'Array<CreditDetails>',
153
153
  :'metadata' => :'StorageDetails'
154
154
  }
@@ -17,6 +17,7 @@ require 'pnap_billing_api/version'
17
17
  require 'pnap_billing_api/configuration'
18
18
 
19
19
  # Models
20
+ require 'pnap_billing_api/models/applicable_discount_details'
20
21
  require 'pnap_billing_api/models/applicable_discounts'
21
22
  require 'pnap_billing_api/models/bandwidth_details'
22
23
  require 'pnap_billing_api/models/bandwidth_record'
@@ -0,0 +1,54 @@
1
+ =begin
2
+ #Billing API
3
+
4
+ #Automate your infrastructure billing with the Bare Metal Cloud Billing API. Reserve your server instances to ensure guaranteed resource availability for 12, 24, and 36 months. Retrieve your server’s rated usage for a given period and enable or disable auto-renewals.<br> <br> <span class='pnap-api-knowledge-base-link'> Knowledge base articles to help you can be found <a href='https://phoenixnap.com/kb/phoenixnap-bare-metal-cloud-billing-models' target='_blank'>here</a> </span><br> <br> <b>All URLs are relative to (https://api.phoenixnap.com/billing/v1/)</b>
5
+
6
+ The version of the OpenAPI document: 0.1
7
+ Contact: support@phoenixnap.com
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 7.2.0
10
+
11
+ =end
12
+
13
+ require 'spec_helper'
14
+ require 'json'
15
+ require 'date'
16
+
17
+ # Unit tests for BillingApi::ApplicableDiscountDetails
18
+ # Automatically generated by openapi-generator (https://openapi-generator.tech)
19
+ # Please update as you see appropriate
20
+ describe BillingApi::ApplicableDiscountDetails do
21
+ let(:instance) { BillingApi::ApplicableDiscountDetails.new }
22
+
23
+ describe 'test an instance of ApplicableDiscountDetails' do
24
+ it 'should create an instance of ApplicableDiscountDetails' do
25
+ # uncomment below to test the instance creation
26
+ #expect(instance).to be_instance_of(BillingApi::ApplicableDiscountDetails)
27
+ end
28
+ end
29
+
30
+ describe 'test attribute "code"' do
31
+ it 'should work' do
32
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
33
+ end
34
+ end
35
+
36
+ describe 'test attribute "type"' do
37
+ it 'should work' do
38
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
39
+ end
40
+ end
41
+
42
+ describe 'test attribute "value"' do
43
+ it 'should work' do
44
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
45
+ end
46
+ end
47
+
48
+ describe 'test attribute "coupon_code"' do
49
+ it 'should work' do
50
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
51
+ end
52
+ end
53
+
54
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pnap_billing_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.0
4
+ version: 2.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - PhoenixNAP
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2025-03-06 00:00:00.000000000 Z
11
+ date: 2025-05-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: typhoeus
@@ -61,6 +61,7 @@ files:
61
61
  - README.md
62
62
  - Rakefile
63
63
  - VERSION
64
+ - docs/ApplicableDiscountDetails.md
64
65
  - docs/ApplicableDiscounts.md
65
66
  - docs/BandwidthDetails.md
66
67
  - docs/BandwidthRecord.md
@@ -118,6 +119,7 @@ files:
118
119
  - lib/pnap_billing_api/api_client.rb
119
120
  - lib/pnap_billing_api/api_error.rb
120
121
  - lib/pnap_billing_api/configuration.rb
122
+ - lib/pnap_billing_api/models/applicable_discount_details.rb
121
123
  - lib/pnap_billing_api/models/applicable_discounts.rb
122
124
  - lib/pnap_billing_api/models/bandwidth_details.rb
123
125
  - lib/pnap_billing_api/models/bandwidth_record.rb
@@ -168,6 +170,7 @@ files:
168
170
  - spec/api/products_api_spec.rb
169
171
  - spec/api/rated_usage_api_spec.rb
170
172
  - spec/api/reservations_api_spec.rb
173
+ - spec/models/applicable_discount_details_spec.rb
171
174
  - spec/models/applicable_discounts_spec.rb
172
175
  - spec/models/bandwidth_details_spec.rb
173
176
  - spec/models/bandwidth_record_spec.rb
@@ -237,52 +240,53 @@ signing_key:
237
240
  specification_version: 4
238
241
  summary: Billing API Ruby Gem
239
242
  test_files:
240
- - spec/api/product_availability_api_spec.rb
241
243
  - spec/api/reservations_api_spec.rb
242
244
  - spec/api/rated_usage_api_spec.rb
245
+ - spec/api/product_availability_api_spec.rb
243
246
  - spec/api/products_api_spec.rb
244
247
  - spec/api/billing_configurations_api_spec.rb
245
- - spec/models/operating_system_record_spec.rb
248
+ - spec/models/price_unit_enum_spec.rb
249
+ - spec/models/rated_usage_product_category_enum_spec.rb
250
+ - spec/models/operating_system_details_spec.rb
246
251
  - spec/models/error_spec.rb
247
- - spec/models/configuration_details_spec.rb
248
- - spec/models/credit_type_enum_spec.rb
249
- - spec/models/package_unit_enum_spec.rb
250
- - spec/models/promo_credit_details_spec.rb
251
- - spec/models/location_enum_spec.rb
252
- - spec/models/server_product_spec.rb
253
- - spec/models/gpu_configuration_metadata_spec.rb
254
- - spec/models/pricing_plan_spec.rb
255
- - spec/models/credit_details_base_spec.rb
256
- - spec/models/bandwidth_record_spec.rb
257
- - spec/models/public_subnet_record_spec.rb
258
- - spec/models/rated_usage_get200_response_inner_spec.rb
259
- - spec/models/bandwidth_details_spec.rb
260
- - spec/models/storage_record_spec.rb
252
+ - spec/models/discount_details_spec.rb
253
+ - spec/models/server_record_spec.rb
261
254
  - spec/models/product_availability_spec.rb
255
+ - spec/models/location_availability_detail_spec.rb
256
+ - spec/models/reservation_auto_renew_disable_request_spec.rb
257
+ - spec/models/product_category_enum_spec.rb
258
+ - spec/models/threshold_configuration_details_spec.rb
262
259
  - spec/models/reservation_model_enum_spec.rb
263
260
  - spec/models/system_credit_details_spec.rb
261
+ - spec/models/location_enum_spec.rb
262
+ - spec/models/operating_system_record_spec.rb
263
+ - spec/models/applicable_discounts_spec.rb
264
+ - spec/models/reservation_request_spec.rb
265
+ - spec/models/server_product_metadata_spec.rb
266
+ - spec/models/server_details_spec.rb
267
+ - spec/models/reservation_invoicing_model_enum_spec.rb
268
+ - spec/models/rated_usage_get200_response_inner_spec.rb
269
+ - spec/models/applicable_discount_details_spec.rb
270
+ - spec/models/storage_record_spec.rb
271
+ - spec/models/system_credit_cause_enum_spec.rb
272
+ - spec/models/package_unit_enum_spec.rb
264
273
  - spec/models/credit_details_spec.rb
274
+ - spec/models/promo_credit_details_spec.rb
275
+ - spec/models/rated_usage_record_spec.rb
265
276
  - spec/models/reservation_spec.rb
266
- - spec/models/reservation_product_category_enum_spec.rb
267
- - spec/models/reservation_auto_renew_disable_request_spec.rb
268
- - spec/models/operating_system_details_spec.rb
269
- - spec/models/location_availability_detail_spec.rb
270
- - spec/models/products_get200_response_inner_spec.rb
271
- - spec/models/discount_type_enum_spec.rb
272
- - spec/models/rated_usage_product_category_enum_spec.rb
277
+ - spec/models/credit_details_base_spec.rb
273
278
  - spec/models/public_subnet_details_spec.rb
274
- - spec/models/reservation_invoicing_model_enum_spec.rb
275
- - spec/models/applicable_discounts_spec.rb
276
- - spec/models/server_product_metadata_spec.rb
277
279
  - spec/models/product_spec.rb
278
- - spec/models/price_unit_enum_spec.rb
279
280
  - spec/models/storage_details_spec.rb
280
- - spec/models/server_record_spec.rb
281
- - spec/models/product_category_enum_spec.rb
282
- - spec/models/rated_usage_record_spec.rb
283
- - spec/models/threshold_configuration_details_spec.rb
284
- - spec/models/server_details_spec.rb
285
- - spec/models/reservation_request_spec.rb
286
- - spec/models/discount_details_spec.rb
287
- - spec/models/system_credit_cause_enum_spec.rb
281
+ - spec/models/reservation_product_category_enum_spec.rb
282
+ - spec/models/public_subnet_record_spec.rb
283
+ - spec/models/products_get200_response_inner_spec.rb
284
+ - spec/models/discount_type_enum_spec.rb
285
+ - spec/models/pricing_plan_spec.rb
286
+ - spec/models/configuration_details_spec.rb
287
+ - spec/models/bandwidth_details_spec.rb
288
+ - spec/models/credit_type_enum_spec.rb
289
+ - spec/models/gpu_configuration_metadata_spec.rb
290
+ - spec/models/bandwidth_record_spec.rb
291
+ - spec/models/server_product_spec.rb
288
292
  - spec/spec_helper.rb