togai_client 1.0.0 → 1.0.1
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 +1 -1
- data/docs/AccountsApi.md +1 -1
- data/docs/AssociatePricePlanRequest.md +4 -4
- data/docs/Bundle.md +22 -0
- data/docs/CreatePricePlanRequest.md +2 -4
- data/docs/EventPipelineInfoPricePlansInner.md +2 -0
- data/docs/EventSchemaListData.md +2 -2
- data/docs/EventSchemaListDataAllOf.md +2 -2
- data/docs/GetEventResponse.md +1 -1
- data/docs/PlanOverride.md +2 -2
- data/docs/PricePlan.md +0 -2
- data/docs/PricePlanDetails.md +20 -0
- data/docs/PricePlanDetailsOverride.md +20 -0
- data/docs/PricePlanListData.md +2 -4
- data/docs/PricePlanPaginatedResponse.md +1 -1
- data/docs/PricePlansApi.md +1 -1
- data/docs/PriceType.md +15 -0
- data/docs/{PricingCycle.md → PricingCycleConfig.md} +3 -3
- data/docs/{PricingCycleStartOffset.md → PricingCycleConfigStartOffset.md} +2 -2
- data/docs/PricingModel.md +15 -0
- data/docs/PricingSchedule.md +2 -2
- data/docs/RateCard.md +6 -6
- data/docs/RateCardBundleAggregation.md +15 -0
- data/docs/RateCardType.md +15 -0
- data/docs/RateConfigBundle.md +20 -0
- data/docs/RateConfigUsage.md +20 -0
- data/docs/SlabBundle.md +24 -0
- data/docs/{UsageStrategy.md → SlabUsage.md} +6 -2
- data/docs/UpdatePricePlanRequest.md +2 -4
- data/examples/example.rb +222 -0
- data/lib/togai_client/models/associate_price_plan_request.rb +17 -7
- data/lib/togai_client/models/{bundle_strategy.rb → bundle.rb} +34 -85
- data/lib/togai_client/models/create_customer_request.rb +0 -9
- data/lib/togai_client/models/create_customer_response.rb +0 -9
- data/lib/togai_client/models/create_price_plan_request.rb +10 -24
- data/lib/togai_client/models/customer.rb +0 -9
- data/lib/togai_client/models/event_pipeline_info_price_plans_inner.rb +15 -1
- data/lib/togai_client/models/event_schema_list_data.rb +7 -9
- data/lib/togai_client/models/event_schema_list_data_all_of.rb +7 -9
- data/lib/togai_client/models/get_event_response.rb +5 -0
- data/lib/togai_client/models/ingestion_status.rb +2 -2
- data/lib/togai_client/models/plan_override.rb +7 -7
- data/lib/togai_client/models/price_plan.rb +1 -15
- data/lib/togai_client/models/price_plan_details.rb +259 -0
- data/lib/togai_client/models/price_plan_details_override.rb +245 -0
- data/lib/togai_client/models/price_plan_list_data.rb +10 -25
- data/lib/togai_client/models/price_plan_paginated_response.rb +5 -0
- data/lib/togai_client/models/price_type.rb +38 -0
- data/lib/togai_client/models/{pricing_cycle.rb → pricing_cycle_config.rb} +4 -4
- data/lib/togai_client/models/{pricing_cycle_start_offset.rb → pricing_cycle_config_start_offset.rb} +3 -3
- data/lib/togai_client/models/pricing_model.rb +37 -0
- data/lib/togai_client/models/pricing_schedule.rb +7 -7
- data/lib/togai_client/models/rate_card.rb +32 -59
- data/lib/togai_client/models/rate_card_bundle_aggregation.rb +39 -0
- data/lib/togai_client/models/rate_card_type.rb +37 -0
- data/lib/togai_client/models/{bundle_strategy_usage_meters_value.rb → rate_config_bundle.rb} +28 -13
- data/lib/togai_client/models/{rate_card_usage_value.rb → rate_config_usage.rb} +15 -98
- data/lib/togai_client/models/signup_request.rb +0 -11
- data/lib/togai_client/models/slab_bundle.rb +264 -0
- data/lib/togai_client/models/{usage_strategy.rb → slab_usage.rb} +30 -5
- data/lib/togai_client/models/update_customer_request.rb +0 -9
- data/lib/togai_client/models/update_price_plan_request.rb +7 -16
- data/lib/togai_client/models/user_details.rb +0 -11
- data/lib/togai_client/version.rb +1 -1
- data/lib/togai_client.rb +13 -7
- metadata +36 -23
- data/docs/BundleStrategy.md +0 -24
- data/docs/BundleStrategyUsageMetersValue.md +0 -18
- data/docs/RateCardBundle.md +0 -22
- data/docs/RateCardUsageValue.md +0 -24
- data/lib/togai_client/models/rate_card_bundle.rb +0 -328
@@ -0,0 +1,264 @@
|
|
1
|
+
=begin
|
2
|
+
#Togai Apis
|
3
|
+
|
4
|
+
#APIs for Togai App
|
5
|
+
|
6
|
+
The version of the OpenAPI document: 1.0
|
7
|
+
Contact: engg@togai.com
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
OpenAPI Generator version: 6.1.0
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'date'
|
14
|
+
require 'time'
|
15
|
+
|
16
|
+
module TogaiClient
|
17
|
+
# TODO
|
18
|
+
class SlabBundle
|
19
|
+
attr_accessor :rate
|
20
|
+
|
21
|
+
attr_accessor :start_after
|
22
|
+
|
23
|
+
attr_accessor :price_type
|
24
|
+
|
25
|
+
attr_accessor :config
|
26
|
+
|
27
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
28
|
+
def self.attribute_map
|
29
|
+
{
|
30
|
+
:'rate' => :'rate',
|
31
|
+
:'start_after' => :'startAfter',
|
32
|
+
:'price_type' => :'priceType',
|
33
|
+
:'config' => :'config'
|
34
|
+
}
|
35
|
+
end
|
36
|
+
|
37
|
+
# Returns all the JSON keys this model knows about
|
38
|
+
def self.acceptable_attributes
|
39
|
+
attribute_map.values
|
40
|
+
end
|
41
|
+
|
42
|
+
# Attribute type mapping.
|
43
|
+
def self.openapi_types
|
44
|
+
{
|
45
|
+
:'rate' => :'Float',
|
46
|
+
:'start_after' => :'Float',
|
47
|
+
:'price_type' => :'PriceType',
|
48
|
+
:'config' => :'Hash<String, String>'
|
49
|
+
}
|
50
|
+
end
|
51
|
+
|
52
|
+
# List of attributes with nullable: true
|
53
|
+
def self.openapi_nullable
|
54
|
+
Set.new([
|
55
|
+
])
|
56
|
+
end
|
57
|
+
|
58
|
+
# Initializes the object
|
59
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
60
|
+
def initialize(attributes = {})
|
61
|
+
if (!attributes.is_a?(Hash))
|
62
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `TogaiClient::SlabBundle` initialize method"
|
63
|
+
end
|
64
|
+
|
65
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
66
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
67
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
68
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `TogaiClient::SlabBundle`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
69
|
+
end
|
70
|
+
h[k.to_sym] = v
|
71
|
+
}
|
72
|
+
|
73
|
+
if attributes.key?(:'rate')
|
74
|
+
self.rate = attributes[:'rate']
|
75
|
+
end
|
76
|
+
|
77
|
+
if attributes.key?(:'start_after')
|
78
|
+
self.start_after = attributes[:'start_after']
|
79
|
+
end
|
80
|
+
|
81
|
+
if attributes.key?(:'price_type')
|
82
|
+
self.price_type = attributes[:'price_type']
|
83
|
+
end
|
84
|
+
|
85
|
+
if attributes.key?(:'config')
|
86
|
+
if (value = attributes[:'config']).is_a?(Hash)
|
87
|
+
self.config = value
|
88
|
+
end
|
89
|
+
end
|
90
|
+
end
|
91
|
+
|
92
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
93
|
+
# @return Array for valid properties with the reasons
|
94
|
+
def list_invalid_properties
|
95
|
+
invalid_properties = Array.new
|
96
|
+
if @rate.nil?
|
97
|
+
invalid_properties.push('invalid value for "rate", rate cannot be nil.')
|
98
|
+
end
|
99
|
+
|
100
|
+
if @start_after.nil?
|
101
|
+
invalid_properties.push('invalid value for "start_after", start_after cannot be nil.')
|
102
|
+
end
|
103
|
+
|
104
|
+
if @price_type.nil?
|
105
|
+
invalid_properties.push('invalid value for "price_type", price_type cannot be nil.')
|
106
|
+
end
|
107
|
+
|
108
|
+
invalid_properties
|
109
|
+
end
|
110
|
+
|
111
|
+
# Check to see if the all the properties in the model are valid
|
112
|
+
# @return true if the model is valid
|
113
|
+
def valid?
|
114
|
+
return false if @rate.nil?
|
115
|
+
return false if @start_after.nil?
|
116
|
+
return false if @price_type.nil?
|
117
|
+
true
|
118
|
+
end
|
119
|
+
|
120
|
+
# Checks equality by comparing each attribute.
|
121
|
+
# @param [Object] Object to be compared
|
122
|
+
def ==(o)
|
123
|
+
return true if self.equal?(o)
|
124
|
+
self.class == o.class &&
|
125
|
+
rate == o.rate &&
|
126
|
+
start_after == o.start_after &&
|
127
|
+
price_type == o.price_type &&
|
128
|
+
config == o.config
|
129
|
+
end
|
130
|
+
|
131
|
+
# @see the `==` method
|
132
|
+
# @param [Object] Object to be compared
|
133
|
+
def eql?(o)
|
134
|
+
self == o
|
135
|
+
end
|
136
|
+
|
137
|
+
# Calculates hash code according to all attributes.
|
138
|
+
# @return [Integer] Hash code
|
139
|
+
def hash
|
140
|
+
[rate, start_after, price_type, config].hash
|
141
|
+
end
|
142
|
+
|
143
|
+
# Builds the object from hash
|
144
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
145
|
+
# @return [Object] Returns the model itself
|
146
|
+
def self.build_from_hash(attributes)
|
147
|
+
new.build_from_hash(attributes)
|
148
|
+
end
|
149
|
+
|
150
|
+
# Builds the object from hash
|
151
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
152
|
+
# @return [Object] Returns the model itself
|
153
|
+
def build_from_hash(attributes)
|
154
|
+
return nil unless attributes.is_a?(Hash)
|
155
|
+
attributes = attributes.transform_keys(&:to_sym)
|
156
|
+
self.class.openapi_types.each_pair do |key, type|
|
157
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
158
|
+
self.send("#{key}=", nil)
|
159
|
+
elsif type =~ /\AArray<(.*)>/i
|
160
|
+
# check to ensure the input is an array given that the attribute
|
161
|
+
# is documented as an array but the input is not
|
162
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
163
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
164
|
+
end
|
165
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
166
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
167
|
+
end
|
168
|
+
end
|
169
|
+
|
170
|
+
self
|
171
|
+
end
|
172
|
+
|
173
|
+
# Deserializes the data based on type
|
174
|
+
# @param string type Data type
|
175
|
+
# @param string value Value to be deserialized
|
176
|
+
# @return [Object] Deserialized data
|
177
|
+
def _deserialize(type, value)
|
178
|
+
case type.to_sym
|
179
|
+
when :Time
|
180
|
+
Time.parse(value)
|
181
|
+
when :Date
|
182
|
+
Date.parse(value)
|
183
|
+
when :String
|
184
|
+
value.to_s
|
185
|
+
when :Integer
|
186
|
+
value.to_i
|
187
|
+
when :Float
|
188
|
+
value.to_f
|
189
|
+
when :Boolean
|
190
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
191
|
+
true
|
192
|
+
else
|
193
|
+
false
|
194
|
+
end
|
195
|
+
when :Object
|
196
|
+
# generic object (usually a Hash), return directly
|
197
|
+
value
|
198
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
199
|
+
inner_type = Regexp.last_match[:inner_type]
|
200
|
+
value.map { |v| _deserialize(inner_type, v) }
|
201
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
202
|
+
k_type = Regexp.last_match[:k_type]
|
203
|
+
v_type = Regexp.last_match[:v_type]
|
204
|
+
{}.tap do |hash|
|
205
|
+
value.each do |k, v|
|
206
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
207
|
+
end
|
208
|
+
end
|
209
|
+
else # model
|
210
|
+
# models (e.g. Pet) or oneOf
|
211
|
+
klass = TogaiClient.const_get(type)
|
212
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
213
|
+
end
|
214
|
+
end
|
215
|
+
|
216
|
+
# Returns the string representation of the object
|
217
|
+
# @return [String] String presentation of the object
|
218
|
+
def to_s
|
219
|
+
to_hash.to_s
|
220
|
+
end
|
221
|
+
|
222
|
+
# to_body is an alias to to_hash (backward compatibility)
|
223
|
+
# @return [Hash] Returns the object in the form of hash
|
224
|
+
def to_body
|
225
|
+
to_hash
|
226
|
+
end
|
227
|
+
|
228
|
+
# Returns the object in the form of hash
|
229
|
+
# @return [Hash] Returns the object in the form of hash
|
230
|
+
def to_hash
|
231
|
+
hash = {}
|
232
|
+
self.class.attribute_map.each_pair do |attr, param|
|
233
|
+
value = self.send(attr)
|
234
|
+
if value.nil?
|
235
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
236
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
237
|
+
end
|
238
|
+
|
239
|
+
hash[param] = _to_hash(value)
|
240
|
+
end
|
241
|
+
hash
|
242
|
+
end
|
243
|
+
|
244
|
+
# Outputs non-array value in the form of hash
|
245
|
+
# For object, use to_hash. Otherwise, just return the value
|
246
|
+
# @param [Object] value Any valid value
|
247
|
+
# @return [Hash] Returns the value in the form of hash
|
248
|
+
def _to_hash(value)
|
249
|
+
if value.is_a?(Array)
|
250
|
+
value.compact.map { |v| _to_hash(v) }
|
251
|
+
elsif value.is_a?(Hash)
|
252
|
+
{}.tap do |hash|
|
253
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
254
|
+
end
|
255
|
+
elsif value.respond_to? :to_hash
|
256
|
+
value.to_hash
|
257
|
+
else
|
258
|
+
value
|
259
|
+
end
|
260
|
+
end
|
261
|
+
|
262
|
+
end
|
263
|
+
|
264
|
+
end
|
@@ -14,12 +14,16 @@ require 'date'
|
|
14
14
|
require 'time'
|
15
15
|
|
16
16
|
module TogaiClient
|
17
|
-
# Represents a pricing
|
18
|
-
class
|
17
|
+
# Represents a pricing priceType (rates + slabs) for usage price plan
|
18
|
+
class SlabUsage
|
19
19
|
attr_accessor :rate
|
20
20
|
|
21
21
|
attr_accessor :start_after
|
22
22
|
|
23
|
+
attr_accessor :price_type
|
24
|
+
|
25
|
+
attr_accessor :config
|
26
|
+
|
23
27
|
attr_accessor :order
|
24
28
|
|
25
29
|
# Attribute mapping from ruby-style variable name to JSON key.
|
@@ -27,6 +31,8 @@ module TogaiClient
|
|
27
31
|
{
|
28
32
|
:'rate' => :'rate',
|
29
33
|
:'start_after' => :'startAfter',
|
34
|
+
:'price_type' => :'priceType',
|
35
|
+
:'config' => :'config',
|
30
36
|
:'order' => :'order'
|
31
37
|
}
|
32
38
|
end
|
@@ -41,6 +47,8 @@ module TogaiClient
|
|
41
47
|
{
|
42
48
|
:'rate' => :'Float',
|
43
49
|
:'start_after' => :'Float',
|
50
|
+
:'price_type' => :'PriceType',
|
51
|
+
:'config' => :'Hash<String, String>',
|
44
52
|
:'order' => :'Integer'
|
45
53
|
}
|
46
54
|
end
|
@@ -55,13 +63,13 @@ module TogaiClient
|
|
55
63
|
# @param [Hash] attributes Model attributes in the form of hash
|
56
64
|
def initialize(attributes = {})
|
57
65
|
if (!attributes.is_a?(Hash))
|
58
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `TogaiClient::
|
66
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `TogaiClient::SlabUsage` initialize method"
|
59
67
|
end
|
60
68
|
|
61
69
|
# check to see if the attribute exists and convert string to symbol for hash key
|
62
70
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
63
71
|
if (!self.class.attribute_map.key?(k.to_sym))
|
64
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `TogaiClient::
|
72
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `TogaiClient::SlabUsage`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
65
73
|
end
|
66
74
|
h[k.to_sym] = v
|
67
75
|
}
|
@@ -74,6 +82,16 @@ module TogaiClient
|
|
74
82
|
self.start_after = attributes[:'start_after']
|
75
83
|
end
|
76
84
|
|
85
|
+
if attributes.key?(:'price_type')
|
86
|
+
self.price_type = attributes[:'price_type']
|
87
|
+
end
|
88
|
+
|
89
|
+
if attributes.key?(:'config')
|
90
|
+
if (value = attributes[:'config']).is_a?(Hash)
|
91
|
+
self.config = value
|
92
|
+
end
|
93
|
+
end
|
94
|
+
|
77
95
|
if attributes.key?(:'order')
|
78
96
|
self.order = attributes[:'order']
|
79
97
|
end
|
@@ -91,6 +109,10 @@ module TogaiClient
|
|
91
109
|
invalid_properties.push('invalid value for "start_after", start_after cannot be nil.')
|
92
110
|
end
|
93
111
|
|
112
|
+
if @price_type.nil?
|
113
|
+
invalid_properties.push('invalid value for "price_type", price_type cannot be nil.')
|
114
|
+
end
|
115
|
+
|
94
116
|
if @order.nil?
|
95
117
|
invalid_properties.push('invalid value for "order", order cannot be nil.')
|
96
118
|
end
|
@@ -111,6 +133,7 @@ module TogaiClient
|
|
111
133
|
def valid?
|
112
134
|
return false if @rate.nil?
|
113
135
|
return false if @start_after.nil?
|
136
|
+
return false if @price_type.nil?
|
114
137
|
return false if @order.nil?
|
115
138
|
return false if @order > 10
|
116
139
|
return false if @order < 1
|
@@ -142,6 +165,8 @@ module TogaiClient
|
|
142
165
|
self.class == o.class &&
|
143
166
|
rate == o.rate &&
|
144
167
|
start_after == o.start_after &&
|
168
|
+
price_type == o.price_type &&
|
169
|
+
config == o.config &&
|
145
170
|
order == o.order
|
146
171
|
end
|
147
172
|
|
@@ -154,7 +179,7 @@ module TogaiClient
|
|
154
179
|
# Calculates hash code according to all attributes.
|
155
180
|
# @return [Integer] Hash code
|
156
181
|
def hash
|
157
|
-
[rate, start_after, order].hash
|
182
|
+
[rate, start_after, price_type, config, order].hash
|
158
183
|
end
|
159
184
|
|
160
185
|
# Builds the object from hash
|
@@ -102,10 +102,6 @@ module TogaiClient
|
|
102
102
|
invalid_properties.push('invalid value for "billing_address", the character length must be smaller than or equal to 1000.')
|
103
103
|
end
|
104
104
|
|
105
|
-
if !@billing_address.nil? && @billing_address.to_s.length < 50
|
106
|
-
invalid_properties.push('invalid value for "billing_address", the character length must be great than or equal to 50.')
|
107
|
-
end
|
108
|
-
|
109
105
|
invalid_properties
|
110
106
|
end
|
111
107
|
|
@@ -116,7 +112,6 @@ module TogaiClient
|
|
116
112
|
return false if !@name.nil? && @name.to_s.length < 3
|
117
113
|
return false if !@primary_email.nil? && @primary_email.to_s.length > 255
|
118
114
|
return false if !@billing_address.nil? && @billing_address.to_s.length > 1000
|
119
|
-
return false if !@billing_address.nil? && @billing_address.to_s.length < 50
|
120
115
|
true
|
121
116
|
end
|
122
117
|
|
@@ -151,10 +146,6 @@ module TogaiClient
|
|
151
146
|
fail ArgumentError, 'invalid value for "billing_address", the character length must be smaller than or equal to 1000.'
|
152
147
|
end
|
153
148
|
|
154
|
-
if !billing_address.nil? && billing_address.to_s.length < 50
|
155
|
-
fail ArgumentError, 'invalid value for "billing_address", the character length must be great than or equal to 50.'
|
156
|
-
end
|
157
|
-
|
158
149
|
@billing_address = billing_address
|
159
150
|
end
|
160
151
|
|
@@ -19,16 +19,13 @@ module TogaiClient
|
|
19
19
|
# Description of price plan
|
20
20
|
attr_accessor :description
|
21
21
|
|
22
|
-
attr_accessor :
|
23
|
-
|
24
|
-
attr_accessor :rate_card
|
22
|
+
attr_accessor :price_plan_details
|
25
23
|
|
26
24
|
# Attribute mapping from ruby-style variable name to JSON key.
|
27
25
|
def self.attribute_map
|
28
26
|
{
|
29
27
|
:'description' => :'description',
|
30
|
-
:'
|
31
|
-
:'rate_card' => :'rateCard'
|
28
|
+
:'price_plan_details' => :'pricePlanDetails'
|
32
29
|
}
|
33
30
|
end
|
34
31
|
|
@@ -41,8 +38,7 @@ module TogaiClient
|
|
41
38
|
def self.openapi_types
|
42
39
|
{
|
43
40
|
:'description' => :'String',
|
44
|
-
:'
|
45
|
-
:'rate_card' => :'RateCard'
|
41
|
+
:'price_plan_details' => :'PricePlanDetailsOverride'
|
46
42
|
}
|
47
43
|
end
|
48
44
|
|
@@ -71,12 +67,8 @@ module TogaiClient
|
|
71
67
|
self.description = attributes[:'description']
|
72
68
|
end
|
73
69
|
|
74
|
-
if attributes.key?(:'
|
75
|
-
self.
|
76
|
-
end
|
77
|
-
|
78
|
-
if attributes.key?(:'rate_card')
|
79
|
-
self.rate_card = attributes[:'rate_card']
|
70
|
+
if attributes.key?(:'price_plan_details')
|
71
|
+
self.price_plan_details = attributes[:'price_plan_details']
|
80
72
|
end
|
81
73
|
end
|
82
74
|
|
@@ -114,8 +106,7 @@ module TogaiClient
|
|
114
106
|
return true if self.equal?(o)
|
115
107
|
self.class == o.class &&
|
116
108
|
description == o.description &&
|
117
|
-
|
118
|
-
rate_card == o.rate_card
|
109
|
+
price_plan_details == o.price_plan_details
|
119
110
|
end
|
120
111
|
|
121
112
|
# @see the `==` method
|
@@ -127,7 +118,7 @@ module TogaiClient
|
|
127
118
|
# Calculates hash code according to all attributes.
|
128
119
|
# @return [Integer] Hash code
|
129
120
|
def hash
|
130
|
-
[description,
|
121
|
+
[description, price_plan_details].hash
|
131
122
|
end
|
132
123
|
|
133
124
|
# Builds the object from hash
|
@@ -132,11 +132,6 @@ module TogaiClient
|
|
132
132
|
invalid_properties.push('invalid value for "email", the character length must be smaller than or equal to 100.')
|
133
133
|
end
|
134
134
|
|
135
|
-
pattern = Regexp.new(/^[A-Za-z0-9_+]{8,100}$/)
|
136
|
-
if @email !~ pattern
|
137
|
-
invalid_properties.push("invalid value for \"email\", must conform to the pattern #{pattern}.")
|
138
|
-
end
|
139
|
-
|
140
135
|
if !@phone.nil? && @phone.to_s.length > 30
|
141
136
|
invalid_properties.push('invalid value for "phone", the character length must be smaller than or equal to 30.')
|
142
137
|
end
|
@@ -155,7 +150,6 @@ module TogaiClient
|
|
155
150
|
return false if @password.to_s.length > 100
|
156
151
|
return false if @email.nil?
|
157
152
|
return false if @email.to_s.length > 100
|
158
|
-
return false if @email !~ Regexp.new(/^[A-Za-z0-9_+]{8,100}$/)
|
159
153
|
return false if !@phone.nil? && @phone.to_s.length > 30
|
160
154
|
true
|
161
155
|
end
|
@@ -214,11 +208,6 @@ module TogaiClient
|
|
214
208
|
fail ArgumentError, 'invalid value for "email", the character length must be smaller than or equal to 100.'
|
215
209
|
end
|
216
210
|
|
217
|
-
pattern = Regexp.new(/^[A-Za-z0-9_+]{8,100}$/)
|
218
|
-
if email !~ pattern
|
219
|
-
fail ArgumentError, "invalid value for \"email\", must conform to the pattern #{pattern}."
|
220
|
-
end
|
221
|
-
|
222
211
|
@email = email
|
223
212
|
end
|
224
213
|
|
data/lib/togai_client/version.rb
CHANGED
data/lib/togai_client.rb
CHANGED
@@ -24,8 +24,7 @@ require 'togai_client/models/add_account_aliases_request'
|
|
24
24
|
require 'togai_client/models/associate_price_plan_request'
|
25
25
|
require 'togai_client/models/associate_price_plan_response'
|
26
26
|
require 'togai_client/models/base_success_response'
|
27
|
-
require 'togai_client/models/
|
28
|
-
require 'togai_client/models/bundle_strategy_usage_meters_value'
|
27
|
+
require 'togai_client/models/bundle'
|
29
28
|
require 'togai_client/models/computation'
|
30
29
|
require 'togai_client/models/create_account_request'
|
31
30
|
require 'togai_client/models/create_customer_request'
|
@@ -73,17 +72,25 @@ require 'togai_client/models/metric_query_response'
|
|
73
72
|
require 'togai_client/models/pagination_options'
|
74
73
|
require 'togai_client/models/plan_override'
|
75
74
|
require 'togai_client/models/price_plan'
|
75
|
+
require 'togai_client/models/price_plan_details'
|
76
|
+
require 'togai_client/models/price_plan_details_override'
|
76
77
|
require 'togai_client/models/price_plan_list_data'
|
77
78
|
require 'togai_client/models/price_plan_paginated_response'
|
78
|
-
require 'togai_client/models/
|
79
|
-
require 'togai_client/models/
|
79
|
+
require 'togai_client/models/price_type'
|
80
|
+
require 'togai_client/models/pricing_cycle_config'
|
81
|
+
require 'togai_client/models/pricing_cycle_config_start_offset'
|
82
|
+
require 'togai_client/models/pricing_model'
|
80
83
|
require 'togai_client/models/pricing_schedule'
|
81
84
|
require 'togai_client/models/rate_card'
|
82
|
-
require 'togai_client/models/
|
83
|
-
require 'togai_client/models/
|
85
|
+
require 'togai_client/models/rate_card_bundle_aggregation'
|
86
|
+
require 'togai_client/models/rate_card_type'
|
87
|
+
require 'togai_client/models/rate_config_bundle'
|
88
|
+
require 'togai_client/models/rate_config_usage'
|
84
89
|
require 'togai_client/models/remove_account_aliases_request'
|
85
90
|
require 'togai_client/models/signup_request'
|
86
91
|
require 'togai_client/models/signup_response'
|
92
|
+
require 'togai_client/models/slab_bundle'
|
93
|
+
require 'togai_client/models/slab_usage'
|
87
94
|
require 'togai_client/models/status_response'
|
88
95
|
require 'togai_client/models/status_response_headers'
|
89
96
|
require 'togai_client/models/update_account_request'
|
@@ -93,7 +100,6 @@ require 'togai_client/models/update_price_plan_request'
|
|
93
100
|
require 'togai_client/models/update_usage_meter_request'
|
94
101
|
require 'togai_client/models/usage_meter'
|
95
102
|
require 'togai_client/models/usage_meter_paginated_response'
|
96
|
-
require 'togai_client/models/usage_strategy'
|
97
103
|
require 'togai_client/models/user_details'
|
98
104
|
|
99
105
|
# APIs
|