smplkit 3.0.102 → 3.0.103

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: 047e3fc0922ee25b1441a22a33addbba76e885b486414ac3ca99b31d07b17277
4
- data.tar.gz: 5ce032781cecf99066afb73359af216000039d158318dc427dfc456f159d35b3
3
+ metadata.gz: b4885e5b0997b0792d5b2a40437167f76818c0dca5185d78428d54ef6b650f4c
4
+ data.tar.gz: 75915674e533382f9ce457cffe2f5347c15bf24c2f26ec105fb3503d28c3b442
5
5
  SHA512:
6
- metadata.gz: 7c5a05ff1932b11b194a3405bb6f361763810c935e3e7bc924afb6431dfd201b6447020b117f14161dc209525a072e4a4afb9d6b467eb086bfd177c5f3f6400c
7
- data.tar.gz: cebda2b16e66a59fac937a6f135fdaeff3cdd727ff009637a77627efefc0eb2738a411dead73ccaf60d3f30edbd1416a6f55602bcfe4da2d00c891c14effefcc
6
+ metadata.gz: e4fc9b5b6206da24bf576cc7c9e4a5f1dab28ffa58b53d5d41c41b78092d61ebdf8708a0024efa79c1d593d725237363a45db30a82a2a7de29af6f08ae509cf7
7
+ data.tar.gz: b2096cc388bde3c892b48235e826c3418dba647abde121f42190007015c4102dee95b6949e2d54e9a962d33da17a932721491b0cf623976ce09fc9a23e24ec6c
@@ -22,11 +22,15 @@ module SmplkitGeneratedClient::App
22
22
  # Map of limit key to the cap that applies on this plan. `-1` indicates an unlimited cap.
23
23
  attr_accessor :limits
24
24
 
25
+ # For metered products only: map of metered limit key to the per-unit overage price in micro-USD ($0.000001) charged for each unit beyond the plan's included allotment. A rate of `0` means the plan stops at its allotment with no overage. Omitted for products that are not metered.
26
+ attr_accessor :overage_rates
27
+
25
28
  # Attribute mapping from ruby-style variable name to JSON key.
26
29
  def self.attribute_map
27
30
  {
28
31
  :'price_monthly_cents' => :'price_monthly_cents',
29
- :'limits' => :'limits'
32
+ :'limits' => :'limits',
33
+ :'overage_rates' => :'overage_rates'
30
34
  }
31
35
  end
32
36
 
@@ -44,13 +48,15 @@ module SmplkitGeneratedClient::App
44
48
  def self.openapi_types
45
49
  {
46
50
  :'price_monthly_cents' => :'Integer',
47
- :'limits' => :'Hash<String, Integer>'
51
+ :'limits' => :'Hash<String, Integer>',
52
+ :'overage_rates' => :'Hash<String, Integer>'
48
53
  }
49
54
  end
50
55
 
51
56
  # List of attributes with nullable: true
52
57
  def self.openapi_nullable
53
58
  Set.new([
59
+ :'overage_rates'
54
60
  ])
55
61
  end
56
62
 
@@ -83,6 +89,12 @@ module SmplkitGeneratedClient::App
83
89
  else
84
90
  self.limits = nil
85
91
  end
92
+
93
+ if attributes.key?(:'overage_rates')
94
+ if (value = attributes[:'overage_rates']).is_a?(Hash)
95
+ self.overage_rates = value
96
+ end
97
+ end
86
98
  end
87
99
 
88
100
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -136,7 +148,8 @@ module SmplkitGeneratedClient::App
136
148
  return true if self.equal?(o)
137
149
  self.class == o.class &&
138
150
  price_monthly_cents == o.price_monthly_cents &&
139
- limits == o.limits
151
+ limits == o.limits &&
152
+ overage_rates == o.overage_rates
140
153
  end
141
154
 
142
155
  # @see the `==` method
@@ -148,7 +161,7 @@ module SmplkitGeneratedClient::App
148
161
  # Calculates hash code according to all attributes.
149
162
  # @return [Integer] Hash code
150
163
  def hash
151
- [price_monthly_cents, limits].hash
164
+ [price_monthly_cents, limits, overage_rates].hash
152
165
  end
153
166
 
154
167
  # Builds the object from hash
@@ -34,6 +34,9 @@ module SmplkitGeneratedClient::App
34
34
  # Map of limit key to limit definition for this product.
35
35
  attr_accessor :limits
36
36
 
37
+ # Limit keys on this product that are metered: each includes a monthly allotment in the plan price and bills per unit beyond it at the plan's `overage_rates` rate, rather than capping hard. Empty for products with no metered limits.
38
+ attr_accessor :metered_limits
39
+
37
40
  # Map of plan key to plan definition for this product.
38
41
  attr_accessor :plans
39
42
 
@@ -46,6 +49,7 @@ module SmplkitGeneratedClient::App
46
49
  :'features' => :'features',
47
50
  :'coming_soon' => :'coming_soon',
48
51
  :'limits' => :'limits',
52
+ :'metered_limits' => :'metered_limits',
49
53
  :'plans' => :'plans'
50
54
  }
51
55
  end
@@ -69,6 +73,7 @@ module SmplkitGeneratedClient::App
69
73
  :'features' => :'Array<String>',
70
74
  :'coming_soon' => :'Boolean',
71
75
  :'limits' => :'Hash<String, LimitDefinition>',
76
+ :'metered_limits' => :'Array<String>',
72
77
  :'plans' => :'Hash<String, PlanDefinition>'
73
78
  }
74
79
  end
@@ -132,6 +137,12 @@ module SmplkitGeneratedClient::App
132
137
  self.limits = nil
133
138
  end
134
139
 
140
+ if attributes.key?(:'metered_limits')
141
+ if (value = attributes[:'metered_limits']).is_a?(Array)
142
+ self.metered_limits = value
143
+ end
144
+ end
145
+
135
146
  if attributes.key?(:'plans')
136
147
  if (value = attributes[:'plans']).is_a?(Hash)
137
148
  self.plans = value
@@ -227,6 +238,7 @@ module SmplkitGeneratedClient::App
227
238
  features == o.features &&
228
239
  coming_soon == o.coming_soon &&
229
240
  limits == o.limits &&
241
+ metered_limits == o.metered_limits &&
230
242
  plans == o.plans
231
243
  end
232
244
 
@@ -239,7 +251,7 @@ module SmplkitGeneratedClient::App
239
251
  # Calculates hash code according to all attributes.
240
252
  # @return [Integer] Hash code
241
253
  def hash
242
- [display_name, description, tagline, features, coming_soon, limits, plans].hash
254
+ [display_name, description, tagline, features, coming_soon, limits, metered_limits, plans].hash
243
255
  end
244
256
 
245
257
  # Builds the object from hash
@@ -39,4 +39,10 @@ describe SmplkitGeneratedClient::App::PlanDefinition do
39
39
  end
40
40
  end
41
41
 
42
+ describe 'test attribute "overage_rates"' 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
+
42
48
  end
@@ -63,6 +63,12 @@ describe SmplkitGeneratedClient::App::Product do
63
63
  end
64
64
  end
65
65
 
66
+ describe 'test attribute "metered_limits"' do
67
+ it 'should work' do
68
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
69
+ end
70
+ end
71
+
66
72
  describe 'test attribute "plans"' do
67
73
  it 'should work' do
68
74
  # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: smplkit
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.102
4
+ version: 3.0.103
5
5
  platform: ruby
6
6
  authors:
7
7
  - Smpl Solutions LLC