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.
Files changed (72) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +1 -1
  3. data/docs/AccountsApi.md +1 -1
  4. data/docs/AssociatePricePlanRequest.md +4 -4
  5. data/docs/Bundle.md +22 -0
  6. data/docs/CreatePricePlanRequest.md +2 -4
  7. data/docs/EventPipelineInfoPricePlansInner.md +2 -0
  8. data/docs/EventSchemaListData.md +2 -2
  9. data/docs/EventSchemaListDataAllOf.md +2 -2
  10. data/docs/GetEventResponse.md +1 -1
  11. data/docs/PlanOverride.md +2 -2
  12. data/docs/PricePlan.md +0 -2
  13. data/docs/PricePlanDetails.md +20 -0
  14. data/docs/PricePlanDetailsOverride.md +20 -0
  15. data/docs/PricePlanListData.md +2 -4
  16. data/docs/PricePlanPaginatedResponse.md +1 -1
  17. data/docs/PricePlansApi.md +1 -1
  18. data/docs/PriceType.md +15 -0
  19. data/docs/{PricingCycle.md → PricingCycleConfig.md} +3 -3
  20. data/docs/{PricingCycleStartOffset.md → PricingCycleConfigStartOffset.md} +2 -2
  21. data/docs/PricingModel.md +15 -0
  22. data/docs/PricingSchedule.md +2 -2
  23. data/docs/RateCard.md +6 -6
  24. data/docs/RateCardBundleAggregation.md +15 -0
  25. data/docs/RateCardType.md +15 -0
  26. data/docs/RateConfigBundle.md +20 -0
  27. data/docs/RateConfigUsage.md +20 -0
  28. data/docs/SlabBundle.md +24 -0
  29. data/docs/{UsageStrategy.md → SlabUsage.md} +6 -2
  30. data/docs/UpdatePricePlanRequest.md +2 -4
  31. data/examples/example.rb +222 -0
  32. data/lib/togai_client/models/associate_price_plan_request.rb +17 -7
  33. data/lib/togai_client/models/{bundle_strategy.rb → bundle.rb} +34 -85
  34. data/lib/togai_client/models/create_customer_request.rb +0 -9
  35. data/lib/togai_client/models/create_customer_response.rb +0 -9
  36. data/lib/togai_client/models/create_price_plan_request.rb +10 -24
  37. data/lib/togai_client/models/customer.rb +0 -9
  38. data/lib/togai_client/models/event_pipeline_info_price_plans_inner.rb +15 -1
  39. data/lib/togai_client/models/event_schema_list_data.rb +7 -9
  40. data/lib/togai_client/models/event_schema_list_data_all_of.rb +7 -9
  41. data/lib/togai_client/models/get_event_response.rb +5 -0
  42. data/lib/togai_client/models/ingestion_status.rb +2 -2
  43. data/lib/togai_client/models/plan_override.rb +7 -7
  44. data/lib/togai_client/models/price_plan.rb +1 -15
  45. data/lib/togai_client/models/price_plan_details.rb +259 -0
  46. data/lib/togai_client/models/price_plan_details_override.rb +245 -0
  47. data/lib/togai_client/models/price_plan_list_data.rb +10 -25
  48. data/lib/togai_client/models/price_plan_paginated_response.rb +5 -0
  49. data/lib/togai_client/models/price_type.rb +38 -0
  50. data/lib/togai_client/models/{pricing_cycle.rb → pricing_cycle_config.rb} +4 -4
  51. data/lib/togai_client/models/{pricing_cycle_start_offset.rb → pricing_cycle_config_start_offset.rb} +3 -3
  52. data/lib/togai_client/models/pricing_model.rb +37 -0
  53. data/lib/togai_client/models/pricing_schedule.rb +7 -7
  54. data/lib/togai_client/models/rate_card.rb +32 -59
  55. data/lib/togai_client/models/rate_card_bundle_aggregation.rb +39 -0
  56. data/lib/togai_client/models/rate_card_type.rb +37 -0
  57. data/lib/togai_client/models/{bundle_strategy_usage_meters_value.rb → rate_config_bundle.rb} +28 -13
  58. data/lib/togai_client/models/{rate_card_usage_value.rb → rate_config_usage.rb} +15 -98
  59. data/lib/togai_client/models/signup_request.rb +0 -11
  60. data/lib/togai_client/models/slab_bundle.rb +264 -0
  61. data/lib/togai_client/models/{usage_strategy.rb → slab_usage.rb} +30 -5
  62. data/lib/togai_client/models/update_customer_request.rb +0 -9
  63. data/lib/togai_client/models/update_price_plan_request.rb +7 -16
  64. data/lib/togai_client/models/user_details.rb +0 -11
  65. data/lib/togai_client/version.rb +1 -1
  66. data/lib/togai_client.rb +13 -7
  67. metadata +36 -23
  68. data/docs/BundleStrategy.md +0 -24
  69. data/docs/BundleStrategyUsageMetersValue.md +0 -18
  70. data/docs/RateCardBundle.md +0 -22
  71. data/docs/RateCardUsageValue.md +0 -24
  72. data/lib/togai_client/models/rate_card_bundle.rb +0 -328
@@ -14,42 +14,19 @@ require 'date'
14
14
  require 'time'
15
15
 
16
16
  module TogaiClient
17
- # Represents a rate card
18
17
  class RateCard
19
- attr_accessor :type
18
+ attr_accessor :display_name
20
19
 
21
- attr_accessor :usage_config
20
+ attr_accessor :pricing_model
22
21
 
23
- attr_accessor :bundle_config
24
-
25
- class EnumAttributeValidator
26
- attr_reader :datatype
27
- attr_reader :allowable_values
28
-
29
- def initialize(datatype, allowable_values)
30
- @allowable_values = allowable_values.map do |value|
31
- case datatype.to_s
32
- when /Integer/i
33
- value.to_i
34
- when /Float/i
35
- value.to_f
36
- else
37
- value
38
- end
39
- end
40
- end
41
-
42
- def valid?(value)
43
- !value || allowable_values.include?(value)
44
- end
45
- end
22
+ attr_accessor :rate_config
46
23
 
47
24
  # Attribute mapping from ruby-style variable name to JSON key.
48
25
  def self.attribute_map
49
26
  {
50
- :'type' => :'type',
51
- :'usage_config' => :'usageConfig',
52
- :'bundle_config' => :'bundleConfig'
27
+ :'display_name' => :'displayName',
28
+ :'pricing_model' => :'pricingModel',
29
+ :'rate_config' => :'rateConfig'
53
30
  }
54
31
  end
55
32
 
@@ -61,9 +38,9 @@ module TogaiClient
61
38
  # Attribute type mapping.
62
39
  def self.openapi_types
63
40
  {
64
- :'type' => :'String',
65
- :'usage_config' => :'Hash<String, RateCardUsageValue>',
66
- :'bundle_config' => :'RateCardBundle'
41
+ :'display_name' => :'String',
42
+ :'pricing_model' => :'PricingModel',
43
+ :'rate_config' => :'RateConfigUsage'
67
44
  }
68
45
  end
69
46
 
@@ -88,18 +65,16 @@ module TogaiClient
88
65
  h[k.to_sym] = v
89
66
  }
90
67
 
91
- if attributes.key?(:'type')
92
- self.type = attributes[:'type']
68
+ if attributes.key?(:'display_name')
69
+ self.display_name = attributes[:'display_name']
93
70
  end
94
71
 
95
- if attributes.key?(:'usage_config')
96
- if (value = attributes[:'usage_config']).is_a?(Hash)
97
- self.usage_config = value
98
- end
72
+ if attributes.key?(:'pricing_model')
73
+ self.pricing_model = attributes[:'pricing_model']
99
74
  end
100
75
 
101
- if attributes.key?(:'bundle_config')
102
- self.bundle_config = attributes[:'bundle_config']
76
+ if attributes.key?(:'rate_config')
77
+ self.rate_config = attributes[:'rate_config']
103
78
  end
104
79
  end
105
80
 
@@ -107,8 +82,16 @@ module TogaiClient
107
82
  # @return Array for valid properties with the reasons
108
83
  def list_invalid_properties
109
84
  invalid_properties = Array.new
110
- if @type.nil?
111
- invalid_properties.push('invalid value for "type", type cannot be nil.')
85
+ if @display_name.nil?
86
+ invalid_properties.push('invalid value for "display_name", display_name cannot be nil.')
87
+ end
88
+
89
+ if @pricing_model.nil?
90
+ invalid_properties.push('invalid value for "pricing_model", pricing_model cannot be nil.')
91
+ end
92
+
93
+ if @rate_config.nil?
94
+ invalid_properties.push('invalid value for "rate_config", rate_config cannot be nil.')
112
95
  end
113
96
 
114
97
  invalid_properties
@@ -117,30 +100,20 @@ module TogaiClient
117
100
  # Check to see if the all the properties in the model are valid
118
101
  # @return true if the model is valid
119
102
  def valid?
120
- return false if @type.nil?
121
- type_validator = EnumAttributeValidator.new('String', ["USAGE", "BUNDLE"])
122
- return false unless type_validator.valid?(@type)
103
+ return false if @display_name.nil?
104
+ return false if @pricing_model.nil?
105
+ return false if @rate_config.nil?
123
106
  true
124
107
  end
125
108
 
126
- # Custom attribute writer method checking allowed values (enum).
127
- # @param [Object] type Object to be assigned
128
- def type=(type)
129
- validator = EnumAttributeValidator.new('String', ["USAGE", "BUNDLE"])
130
- unless validator.valid?(type)
131
- fail ArgumentError, "invalid value for \"type\", must be one of #{validator.allowable_values}."
132
- end
133
- @type = type
134
- end
135
-
136
109
  # Checks equality by comparing each attribute.
137
110
  # @param [Object] Object to be compared
138
111
  def ==(o)
139
112
  return true if self.equal?(o)
140
113
  self.class == o.class &&
141
- type == o.type &&
142
- usage_config == o.usage_config &&
143
- bundle_config == o.bundle_config
114
+ display_name == o.display_name &&
115
+ pricing_model == o.pricing_model &&
116
+ rate_config == o.rate_config
144
117
  end
145
118
 
146
119
  # @see the `==` method
@@ -152,7 +125,7 @@ module TogaiClient
152
125
  # Calculates hash code according to all attributes.
153
126
  # @return [Integer] Hash code
154
127
  def hash
155
- [type, usage_config, bundle_config].hash
128
+ [display_name, pricing_model, rate_config].hash
156
129
  end
157
130
 
158
131
  # Builds the object from hash
@@ -0,0 +1,39 @@
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
+ class RateCardBundleAggregation
18
+ MAX = "MAX".freeze
19
+ MIN = "MIN".freeze
20
+ SUM = "SUM".freeze
21
+ AVG = "AVG".freeze
22
+
23
+ # Builds the enum from string
24
+ # @param [String] The enum value in the form of the string
25
+ # @return [String] The enum value
26
+ def self.build_from_hash(value)
27
+ new.build_from_hash(value)
28
+ end
29
+
30
+ # Builds the enum from string
31
+ # @param [String] The enum value in the form of the string
32
+ # @return [String] The enum value
33
+ def build_from_hash(value)
34
+ constantValues = RateCardBundleAggregation.constants.select { |c| RateCardBundleAggregation::const_get(c) == value }
35
+ raise "Invalid ENUM value #{value} for class #RateCardBundleAggregation" if constantValues.empty?
36
+ value
37
+ end
38
+ end
39
+ end
@@ -0,0 +1,37 @@
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
+ class RateCardType
18
+ USAGE = "USAGE".freeze
19
+ BUNDLE = "BUNDLE".freeze
20
+
21
+ # Builds the enum from string
22
+ # @param [String] The enum value in the form of the string
23
+ # @return [String] The enum value
24
+ def self.build_from_hash(value)
25
+ new.build_from_hash(value)
26
+ end
27
+
28
+ # Builds the enum from string
29
+ # @param [String] The enum value in the form of the string
30
+ # @return [String] The enum value
31
+ def build_from_hash(value)
32
+ constantValues = RateCardType.constants.select { |c| RateCardType::const_get(c) == value }
33
+ raise "Invalid ENUM value #{value} for class #RateCardType" if constantValues.empty?
34
+ value
35
+ end
36
+ end
37
+ end
@@ -14,13 +14,17 @@ require 'date'
14
14
  require 'time'
15
15
 
16
16
  module TogaiClient
17
- class BundleStrategyUsageMetersValue
18
- attr_accessor :start_after
17
+ # TODO
18
+ class RateConfigBundle
19
+ attr_accessor :usage_meter_name
20
+
21
+ attr_accessor :slab
19
22
 
20
23
  # Attribute mapping from ruby-style variable name to JSON key.
21
24
  def self.attribute_map
22
25
  {
23
- :'start_after' => :'startAfter'
26
+ :'usage_meter_name' => :'usageMeterName',
27
+ :'slab' => :'slab'
24
28
  }
25
29
  end
26
30
 
@@ -32,7 +36,8 @@ module TogaiClient
32
36
  # Attribute type mapping.
33
37
  def self.openapi_types
34
38
  {
35
- :'start_after' => :'Float'
39
+ :'usage_meter_name' => :'String',
40
+ :'slab' => :'SlabBundle'
36
41
  }
37
42
  end
38
43
 
@@ -46,19 +51,23 @@ module TogaiClient
46
51
  # @param [Hash] attributes Model attributes in the form of hash
47
52
  def initialize(attributes = {})
48
53
  if (!attributes.is_a?(Hash))
49
- fail ArgumentError, "The input argument (attributes) must be a hash in `TogaiClient::BundleStrategyUsageMetersValue` initialize method"
54
+ fail ArgumentError, "The input argument (attributes) must be a hash in `TogaiClient::RateConfigBundle` initialize method"
50
55
  end
51
56
 
52
57
  # check to see if the attribute exists and convert string to symbol for hash key
53
58
  attributes = attributes.each_with_object({}) { |(k, v), h|
54
59
  if (!self.class.attribute_map.key?(k.to_sym))
55
- fail ArgumentError, "`#{k}` is not a valid attribute in `TogaiClient::BundleStrategyUsageMetersValue`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
60
+ fail ArgumentError, "`#{k}` is not a valid attribute in `TogaiClient::RateConfigBundle`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
56
61
  end
57
62
  h[k.to_sym] = v
58
63
  }
59
64
 
60
- if attributes.key?(:'start_after')
61
- self.start_after = attributes[:'start_after']
65
+ if attributes.key?(:'usage_meter_name')
66
+ self.usage_meter_name = attributes[:'usage_meter_name']
67
+ end
68
+
69
+ if attributes.key?(:'slab')
70
+ self.slab = attributes[:'slab']
62
71
  end
63
72
  end
64
73
 
@@ -66,8 +75,12 @@ module TogaiClient
66
75
  # @return Array for valid properties with the reasons
67
76
  def list_invalid_properties
68
77
  invalid_properties = Array.new
69
- if @start_after.nil?
70
- invalid_properties.push('invalid value for "start_after", start_after cannot be nil.')
78
+ if @usage_meter_name.nil?
79
+ invalid_properties.push('invalid value for "usage_meter_name", usage_meter_name cannot be nil.')
80
+ end
81
+
82
+ if @slab.nil?
83
+ invalid_properties.push('invalid value for "slab", slab cannot be nil.')
71
84
  end
72
85
 
73
86
  invalid_properties
@@ -76,7 +89,8 @@ module TogaiClient
76
89
  # Check to see if the all the properties in the model are valid
77
90
  # @return true if the model is valid
78
91
  def valid?
79
- return false if @start_after.nil?
92
+ return false if @usage_meter_name.nil?
93
+ return false if @slab.nil?
80
94
  true
81
95
  end
82
96
 
@@ -85,7 +99,8 @@ module TogaiClient
85
99
  def ==(o)
86
100
  return true if self.equal?(o)
87
101
  self.class == o.class &&
88
- start_after == o.start_after
102
+ usage_meter_name == o.usage_meter_name &&
103
+ slab == o.slab
89
104
  end
90
105
 
91
106
  # @see the `==` method
@@ -97,7 +112,7 @@ module TogaiClient
97
112
  # Calculates hash code according to all attributes.
98
113
  # @return [Integer] Hash code
99
114
  def hash
100
- [start_after].hash
115
+ [usage_meter_name, slab].hash
101
116
  end
102
117
 
103
118
  # Builds the object from hash
@@ -14,44 +14,16 @@ require 'date'
14
14
  require 'time'
15
15
 
16
16
  module TogaiClient
17
- # Represents rate card of a price plan of usage type
18
- class RateCardUsageValue
19
- attr_accessor :name
20
-
21
- attr_accessor :rate_strategy
22
-
23
- attr_accessor :slab_strategy
17
+ # Contains all rate related configurations
18
+ class RateConfigUsage
19
+ attr_accessor :usage_meter_name
24
20
 
25
21
  attr_accessor :slabs
26
22
 
27
- class EnumAttributeValidator
28
- attr_reader :datatype
29
- attr_reader :allowable_values
30
-
31
- def initialize(datatype, allowable_values)
32
- @allowable_values = allowable_values.map do |value|
33
- case datatype.to_s
34
- when /Integer/i
35
- value.to_i
36
- when /Float/i
37
- value.to_f
38
- else
39
- value
40
- end
41
- end
42
- end
43
-
44
- def valid?(value)
45
- !value || allowable_values.include?(value)
46
- end
47
- end
48
-
49
23
  # Attribute mapping from ruby-style variable name to JSON key.
50
24
  def self.attribute_map
51
25
  {
52
- :'name' => :'name',
53
- :'rate_strategy' => :'rateStrategy',
54
- :'slab_strategy' => :'slabStrategy',
26
+ :'usage_meter_name' => :'usageMeterName',
55
27
  :'slabs' => :'slabs'
56
28
  }
57
29
  end
@@ -64,10 +36,8 @@ module TogaiClient
64
36
  # Attribute type mapping.
65
37
  def self.openapi_types
66
38
  {
67
- :'name' => :'String',
68
- :'rate_strategy' => :'String',
69
- :'slab_strategy' => :'String',
70
- :'slabs' => :'Array<UsageStrategy>'
39
+ :'usage_meter_name' => :'String',
40
+ :'slabs' => :'Array<SlabUsage>'
71
41
  }
72
42
  end
73
43
 
@@ -81,27 +51,19 @@ module TogaiClient
81
51
  # @param [Hash] attributes Model attributes in the form of hash
82
52
  def initialize(attributes = {})
83
53
  if (!attributes.is_a?(Hash))
84
- fail ArgumentError, "The input argument (attributes) must be a hash in `TogaiClient::RateCardUsageValue` initialize method"
54
+ fail ArgumentError, "The input argument (attributes) must be a hash in `TogaiClient::RateConfigUsage` initialize method"
85
55
  end
86
56
 
87
57
  # check to see if the attribute exists and convert string to symbol for hash key
88
58
  attributes = attributes.each_with_object({}) { |(k, v), h|
89
59
  if (!self.class.attribute_map.key?(k.to_sym))
90
- fail ArgumentError, "`#{k}` is not a valid attribute in `TogaiClient::RateCardUsageValue`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
60
+ fail ArgumentError, "`#{k}` is not a valid attribute in `TogaiClient::RateConfigUsage`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
91
61
  end
92
62
  h[k.to_sym] = v
93
63
  }
94
64
 
95
- if attributes.key?(:'name')
96
- self.name = attributes[:'name']
97
- end
98
-
99
- if attributes.key?(:'rate_strategy')
100
- self.rate_strategy = attributes[:'rate_strategy']
101
- end
102
-
103
- if attributes.key?(:'slab_strategy')
104
- self.slab_strategy = attributes[:'slab_strategy']
65
+ if attributes.key?(:'usage_meter_name')
66
+ self.usage_meter_name = attributes[:'usage_meter_name']
105
67
  end
106
68
 
107
69
  if attributes.key?(:'slabs')
@@ -115,26 +77,14 @@ module TogaiClient
115
77
  # @return Array for valid properties with the reasons
116
78
  def list_invalid_properties
117
79
  invalid_properties = Array.new
118
- if @name.nil?
119
- invalid_properties.push('invalid value for "name", name cannot be nil.')
120
- end
121
-
122
- if @rate_strategy.nil?
123
- invalid_properties.push('invalid value for "rate_strategy", rate_strategy cannot be nil.')
124
- end
125
-
126
- if @slab_strategy.nil?
127
- invalid_properties.push('invalid value for "slab_strategy", slab_strategy cannot be nil.')
80
+ if @usage_meter_name.nil?
81
+ invalid_properties.push('invalid value for "usage_meter_name", usage_meter_name cannot be nil.')
128
82
  end
129
83
 
130
84
  if @slabs.nil?
131
85
  invalid_properties.push('invalid value for "slabs", slabs cannot be nil.')
132
86
  end
133
87
 
134
- if @slabs.length > 10
135
- invalid_properties.push('invalid value for "slabs", number of items must be less than or equal to 10.')
136
- end
137
-
138
88
  if @slabs.length < 1
139
89
  invalid_properties.push('invalid value for "slabs", number of items must be greater than or equal to 1.')
140
90
  end
@@ -145,39 +95,12 @@ module TogaiClient
145
95
  # Check to see if the all the properties in the model are valid
146
96
  # @return true if the model is valid
147
97
  def valid?
148
- return false if @name.nil?
149
- return false if @rate_strategy.nil?
150
- rate_strategy_validator = EnumAttributeValidator.new('String', ["FLAT", "PER_UNIT"])
151
- return false unless rate_strategy_validator.valid?(@rate_strategy)
152
- return false if @slab_strategy.nil?
153
- slab_strategy_validator = EnumAttributeValidator.new('String', ["TIER"])
154
- return false unless slab_strategy_validator.valid?(@slab_strategy)
98
+ return false if @usage_meter_name.nil?
155
99
  return false if @slabs.nil?
156
- return false if @slabs.length > 10
157
100
  return false if @slabs.length < 1
158
101
  true
159
102
  end
160
103
 
161
- # Custom attribute writer method checking allowed values (enum).
162
- # @param [Object] rate_strategy Object to be assigned
163
- def rate_strategy=(rate_strategy)
164
- validator = EnumAttributeValidator.new('String', ["FLAT", "PER_UNIT"])
165
- unless validator.valid?(rate_strategy)
166
- fail ArgumentError, "invalid value for \"rate_strategy\", must be one of #{validator.allowable_values}."
167
- end
168
- @rate_strategy = rate_strategy
169
- end
170
-
171
- # Custom attribute writer method checking allowed values (enum).
172
- # @param [Object] slab_strategy Object to be assigned
173
- def slab_strategy=(slab_strategy)
174
- validator = EnumAttributeValidator.new('String', ["TIER"])
175
- unless validator.valid?(slab_strategy)
176
- fail ArgumentError, "invalid value for \"slab_strategy\", must be one of #{validator.allowable_values}."
177
- end
178
- @slab_strategy = slab_strategy
179
- end
180
-
181
104
  # Custom attribute writer method with validation
182
105
  # @param [Object] slabs Value to be assigned
183
106
  def slabs=(slabs)
@@ -185,10 +108,6 @@ module TogaiClient
185
108
  fail ArgumentError, 'slabs cannot be nil'
186
109
  end
187
110
 
188
- if slabs.length > 10
189
- fail ArgumentError, 'invalid value for "slabs", number of items must be less than or equal to 10.'
190
- end
191
-
192
111
  if slabs.length < 1
193
112
  fail ArgumentError, 'invalid value for "slabs", number of items must be greater than or equal to 1.'
194
113
  end
@@ -201,9 +120,7 @@ module TogaiClient
201
120
  def ==(o)
202
121
  return true if self.equal?(o)
203
122
  self.class == o.class &&
204
- name == o.name &&
205
- rate_strategy == o.rate_strategy &&
206
- slab_strategy == o.slab_strategy &&
123
+ usage_meter_name == o.usage_meter_name &&
207
124
  slabs == o.slabs
208
125
  end
209
126
 
@@ -216,7 +133,7 @@ module TogaiClient
216
133
  # Calculates hash code according to all attributes.
217
134
  # @return [Integer] Hash code
218
135
  def hash
219
- [name, rate_strategy, slab_strategy, slabs].hash
136
+ [usage_meter_name, slabs].hash
220
137
  end
221
138
 
222
139
  # Builds the object from hash
@@ -91,11 +91,6 @@ module TogaiClient
91
91
  invalid_properties.push('invalid value for "name", the character length must be smaller than or equal to 50.')
92
92
  end
93
93
 
94
- pattern = Regexp.new(/^[_a-zA-Z0-9-\s]{3,50}$/)
95
- if @name !~ pattern
96
- invalid_properties.push("invalid value for \"name\", must conform to the pattern #{pattern}.")
97
- end
98
-
99
94
  if !@description.nil? && @description.to_s.length > 500
100
95
  invalid_properties.push('invalid value for "description", the character length must be smaller than or equal to 500.')
101
96
  end
@@ -112,7 +107,6 @@ module TogaiClient
112
107
  def valid?
113
108
  return false if @name.nil?
114
109
  return false if @name.to_s.length > 50
115
- return false if @name !~ Regexp.new(/^[_a-zA-Z0-9-\s]{3,50}$/)
116
110
  return false if !@description.nil? && @description.to_s.length > 500
117
111
  return false if @user_details.nil?
118
112
  true
@@ -129,11 +123,6 @@ module TogaiClient
129
123
  fail ArgumentError, 'invalid value for "name", the character length must be smaller than or equal to 50.'
130
124
  end
131
125
 
132
- pattern = Regexp.new(/^[_a-zA-Z0-9-\s]{3,50}$/)
133
- if name !~ pattern
134
- fail ArgumentError, "invalid value for \"name\", must conform to the pattern #{pattern}."
135
- end
136
-
137
126
  @name = name
138
127
  end
139
128