wallee-ruby-sdk 7.0.0 → 8.0.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.
Files changed (29) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +16 -16
  3. data/README.md +38 -1
  4. data/lib/wallee-ruby-sdk/api_client.rb +1 -1
  5. data/lib/wallee-ruby-sdk/models/charge_attempt_projection.rb +13 -4
  6. data/lib/wallee-ruby-sdk/models/express_checkout_session.rb +449 -0
  7. data/lib/wallee-ruby-sdk/models/express_checkout_session_create.rb +381 -0
  8. data/lib/wallee-ruby-sdk/models/express_checkout_session_create_response.rb +241 -0
  9. data/lib/wallee-ruby-sdk/models/express_checkout_session_process_request.rb +329 -0
  10. data/lib/wallee-ruby-sdk/models/express_checkout_session_process_response.rb +231 -0
  11. data/lib/wallee-ruby-sdk/models/express_checkout_session_state.rb +53 -0
  12. data/lib/wallee-ruby-sdk/models/express_checkout_shipping_option.rb +303 -0
  13. data/lib/wallee-ruby-sdk/models/express_checkout_wallet_type.rb +255 -0
  14. data/lib/wallee-ruby-sdk/models/fulfillment_state.rb +2 -1
  15. data/lib/wallee-ruby-sdk/models/merchant_application_submit_request_dto.rb +232 -0
  16. data/lib/wallee-ruby-sdk/models/merchant_application_submitted_dto.rb +273 -0
  17. data/lib/wallee-ruby-sdk/models/{payment_terminal_update.rb → payment_terminal_update_request.rb} +15 -41
  18. data/lib/wallee-ruby-sdk/models/subscription_partial_update_request.rb +250 -0
  19. data/lib/wallee-ruby-sdk/models/subscription_update_request.rb +45 -22
  20. data/lib/wallee-ruby-sdk/models/transaction_amounts.rb +257 -0
  21. data/lib/wallee-ruby-sdk/models/walleejoin_create_partnership_api_request_dto.rb +20 -1
  22. data/lib/wallee-ruby-sdk/service/express_checkout_session_service.rb +255 -0
  23. data/lib/wallee-ruby-sdk/service/merchant_applications_service.rb +151 -0
  24. data/lib/wallee-ruby-sdk/service/payment_terminals_service.rb +9 -9
  25. data/lib/wallee-ruby-sdk/service/subscriptions_service.rb +9 -9
  26. data/lib/wallee-ruby-sdk/version.rb +1 -1
  27. data/lib/wallee-ruby-sdk.rb +14 -1
  28. data/wallee-ruby-sdk.gemspec +3 -3
  29. metadata +962 -931
@@ -0,0 +1,232 @@
1
+ =begin
2
+ # Wallee AG Ruby SDK
3
+ #
4
+ # This library allows to interact with the Wallee AG payment service.
5
+ #
6
+ # Copyright owner: Wallee AG
7
+ # Website: https://en.wallee.com
8
+ # Developer email: ecosystem-team@wallee.com
9
+ #
10
+ # Licensed under the Apache License, Version 2.0 (the "License");
11
+ # you may not use this file except in compliance with the License.
12
+ # You may obtain a copy of the License at
13
+ #
14
+ # http://www.apache.org/licenses/LICENSE-2.0
15
+ #
16
+ # Unless required by applicable law or agreed to in writing, software
17
+ # distributed under the License is distributed on an "AS IS" BASIS,
18
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19
+ # See the License for the specific language governing permissions and
20
+ # limitations under the License.
21
+ =end
22
+
23
+ require 'date'
24
+ require 'time'
25
+
26
+ module WalleeRubySdk
27
+ # The confirmation required to submit a merchant application.
28
+ class MerchantApplicationSubmitRequestDto
29
+ # Whether the merchant accepts the terms and conditions required for submission.
30
+ attr_accessor :accepted_wallee_terms
31
+
32
+ # Attribute mapping from ruby-style variable name to JSON key.
33
+ def self.attribute_map
34
+ {
35
+ :'accepted_wallee_terms' => :'acceptedWalleeTerms'
36
+ }
37
+ end
38
+
39
+ # Returns attribute mapping this model knows about
40
+ def self.acceptable_attribute_map
41
+ attribute_map
42
+ end
43
+
44
+ # Returns all the JSON keys this model knows about
45
+ def self.acceptable_attributes
46
+ acceptable_attribute_map.values
47
+ end
48
+
49
+ # Attribute type mapping.
50
+ def self.openapi_types
51
+ {
52
+ :'accepted_wallee_terms' => :'Boolean'
53
+ }
54
+ end
55
+
56
+ # List of attributes with nullable: true
57
+ def self.openapi_nullable
58
+ Set.new([
59
+ ])
60
+ end
61
+
62
+ # Initializes the object
63
+ # @param [Hash] attributes Model attributes in the form of hash
64
+ def initialize(attributes = {})
65
+ if (!attributes.is_a?(Hash))
66
+ fail ArgumentError, "The input argument (attributes) must be a hash in `WalleeRubySdk::MerchantApplicationSubmitRequestDto` initialize method"
67
+ end
68
+
69
+ # check to see if the attribute exists and convert string to symbol for hash key
70
+ acceptable_attribute_map = self.class.acceptable_attribute_map
71
+ attributes = attributes.each_with_object({}) { |(k, v), h|
72
+ if (!acceptable_attribute_map.key?(k.to_sym))
73
+ fail ArgumentError, "`#{k}` is not a valid attribute in `WalleeRubySdk::MerchantApplicationSubmitRequestDto`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
74
+ end
75
+ h[k.to_sym] = v
76
+ }
77
+
78
+ if attributes.key?(:'accepted_wallee_terms')
79
+ self.accepted_wallee_terms = attributes[:'accepted_wallee_terms']
80
+ end
81
+ end
82
+
83
+ # Show invalid properties with the reasons. Usually used together with valid?
84
+ # @return Array for valid properties with the reasons
85
+ def list_invalid_properties
86
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
87
+ invalid_properties = Array.new
88
+ invalid_properties
89
+ end
90
+
91
+ # Check to see if the all the properties in the model are valid
92
+ # @return true if the model is valid
93
+ def valid?
94
+ warn '[DEPRECATED] the `valid?` method is obsolete'
95
+ true
96
+ end
97
+
98
+ # Checks equality by comparing each attribute.
99
+ # @param [Object] Object to be compared
100
+ def ==(o)
101
+ return true if self.equal?(o)
102
+ self.class == o.class &&
103
+ accepted_wallee_terms == o.accepted_wallee_terms
104
+ end
105
+
106
+ # @see the `==` method
107
+ # @param [Object] Object to be compared
108
+ def eql?(o)
109
+ self == o
110
+ end
111
+
112
+ # Calculates hash code according to all attributes.
113
+ # @return [Integer] Hash code
114
+ def hash
115
+ [accepted_wallee_terms].hash
116
+ end
117
+
118
+ # Builds the object from hash
119
+ # @param [Hash] attributes Model attributes in the form of hash
120
+ # @return [Object] Returns the model itself
121
+ def self.build_from_hash(attributes)
122
+ return nil unless attributes.is_a?(Hash)
123
+ attributes = attributes.transform_keys(&:to_sym)
124
+ transformed_hash = {}
125
+ openapi_types.each_pair do |key, type|
126
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
127
+ transformed_hash["#{key}"] = nil
128
+ elsif type =~ /\AArray<(.*)>/i
129
+ # check to ensure the input is an array given that the attribute
130
+ # is documented as an array but the input is not
131
+ if attributes[attribute_map[key]].is_a?(Array)
132
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
133
+ end
134
+ elsif !attributes[attribute_map[key]].nil?
135
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
136
+ end
137
+ end
138
+ new(transformed_hash)
139
+ end
140
+
141
+ # Deserializes the data based on type
142
+ # @param string type Data type
143
+ # @param string value Value to be deserialized
144
+ # @return [Object] Deserialized data
145
+ def self._deserialize(type, value)
146
+ case type.to_sym
147
+ when :Time
148
+ Time.parse(value)
149
+ when :Date
150
+ Date.parse(value)
151
+ when :String
152
+ value.to_s
153
+ when :Integer
154
+ value.to_i
155
+ when :Float
156
+ value.to_f
157
+ when :Boolean
158
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
159
+ true
160
+ else
161
+ false
162
+ end
163
+ when :Object
164
+ # generic object (usually a Hash), return directly
165
+ value
166
+ when /\AArray<(?<inner_type>.+)>\z/
167
+ inner_type = Regexp.last_match[:inner_type]
168
+ value.map { |v| _deserialize(inner_type, v) }
169
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
170
+ k_type = Regexp.last_match[:k_type]
171
+ v_type = Regexp.last_match[:v_type]
172
+ {}.tap do |hash|
173
+ value.each do |k, v|
174
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
175
+ end
176
+ end
177
+ else # model
178
+ # models (e.g. Pet) or oneOf
179
+ klass = WalleeRubySdk.const_get(type)
180
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
181
+ end
182
+ end
183
+
184
+ # Returns the string representation of the object
185
+ # @return [String] String presentation of the object
186
+ def to_s
187
+ to_hash.to_s
188
+ end
189
+
190
+ # to_body is an alias to to_hash (backward compatibility)
191
+ # @return [Hash] Returns the object in the form of hash
192
+ def to_body
193
+ to_hash
194
+ end
195
+
196
+ # Returns the object in the form of hash
197
+ # @return [Hash] Returns the object in the form of hash
198
+ def to_hash
199
+ hash = {}
200
+ self.class.attribute_map.each_pair do |attr, param|
201
+ value = self.send(attr)
202
+ if value.nil?
203
+ is_nullable = self.class.openapi_nullable.include?(attr)
204
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
205
+ end
206
+
207
+ hash[param] = _to_hash(value)
208
+ end
209
+ hash
210
+ end
211
+
212
+ # Outputs non-array value in the form of hash
213
+ # For object, use to_hash. Otherwise, just return the value
214
+ # @param [Object] value Any valid value
215
+ # @return [Hash] Returns the value in the form of hash
216
+ def _to_hash(value)
217
+ if value.is_a?(Array)
218
+ value.compact.map { |v| _to_hash(v) }
219
+ elsif value.is_a?(Hash)
220
+ {}.tap do |hash|
221
+ value.each { |k, v| hash[k] = _to_hash(v) }
222
+ end
223
+ elsif value.respond_to? :to_hash
224
+ value.to_hash
225
+ else
226
+ value
227
+ end
228
+ end
229
+
230
+ end
231
+
232
+ end
@@ -0,0 +1,273 @@
1
+ =begin
2
+ # Wallee AG Ruby SDK
3
+ #
4
+ # This library allows to interact with the Wallee AG payment service.
5
+ #
6
+ # Copyright owner: Wallee AG
7
+ # Website: https://en.wallee.com
8
+ # Developer email: ecosystem-team@wallee.com
9
+ #
10
+ # Licensed under the Apache License, Version 2.0 (the "License");
11
+ # you may not use this file except in compliance with the License.
12
+ # You may obtain a copy of the License at
13
+ #
14
+ # http://www.apache.org/licenses/LICENSE-2.0
15
+ #
16
+ # Unless required by applicable law or agreed to in writing, software
17
+ # distributed under the License is distributed on an "AS IS" BASIS,
18
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19
+ # See the License for the specific language governing permissions and
20
+ # limitations under the License.
21
+ =end
22
+
23
+ require 'date'
24
+ require 'time'
25
+
26
+ module WalleeRubySdk
27
+ # The result of submitting a merchant application.
28
+ class MerchantApplicationSubmittedDto
29
+ attr_accessor :application_state
30
+
31
+ # The ID of the organization created by submitting the application.
32
+ attr_accessor :payment_facilitator_organization_id
33
+
34
+ # The ID of the submitted merchant application.
35
+ attr_accessor :merchant_application_id
36
+
37
+ class EnumAttributeValidator
38
+ attr_reader :datatype
39
+ attr_reader :allowable_values
40
+
41
+ def initialize(datatype, allowable_values)
42
+ @allowable_values = allowable_values.map do |value|
43
+ case datatype.to_s
44
+ when /Integer/i
45
+ value.to_i
46
+ when /Float/i
47
+ value.to_f
48
+ else
49
+ value
50
+ end
51
+ end
52
+ end
53
+
54
+ def valid?(value)
55
+ !value || allowable_values.include?(value)
56
+ end
57
+ end
58
+
59
+ # Attribute mapping from ruby-style variable name to JSON key.
60
+ def self.attribute_map
61
+ {
62
+ :'application_state' => :'applicationState',
63
+ :'payment_facilitator_organization_id' => :'paymentFacilitatorOrganizationId',
64
+ :'merchant_application_id' => :'merchantApplicationId'
65
+ }
66
+ end
67
+
68
+ # Returns attribute mapping this model knows about
69
+ def self.acceptable_attribute_map
70
+ attribute_map
71
+ end
72
+
73
+ # Returns all the JSON keys this model knows about
74
+ def self.acceptable_attributes
75
+ acceptable_attribute_map.values
76
+ end
77
+
78
+ # Attribute type mapping.
79
+ def self.openapi_types
80
+ {
81
+ :'application_state' => :'MerchantApplicationState',
82
+ :'payment_facilitator_organization_id' => :'Integer',
83
+ :'merchant_application_id' => :'Integer'
84
+ }
85
+ end
86
+
87
+ # List of attributes with nullable: true
88
+ def self.openapi_nullable
89
+ Set.new([
90
+ ])
91
+ end
92
+
93
+ # Initializes the object
94
+ # @param [Hash] attributes Model attributes in the form of hash
95
+ def initialize(attributes = {})
96
+ if (!attributes.is_a?(Hash))
97
+ fail ArgumentError, "The input argument (attributes) must be a hash in `WalleeRubySdk::MerchantApplicationSubmittedDto` initialize method"
98
+ end
99
+
100
+ # check to see if the attribute exists and convert string to symbol for hash key
101
+ acceptable_attribute_map = self.class.acceptable_attribute_map
102
+ attributes = attributes.each_with_object({}) { |(k, v), h|
103
+ if (!acceptable_attribute_map.key?(k.to_sym))
104
+ fail ArgumentError, "`#{k}` is not a valid attribute in `WalleeRubySdk::MerchantApplicationSubmittedDto`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
105
+ end
106
+ h[k.to_sym] = v
107
+ }
108
+
109
+ if attributes.key?(:'application_state')
110
+ self.application_state = attributes[:'application_state']
111
+ end
112
+
113
+ if attributes.key?(:'payment_facilitator_organization_id')
114
+ self.payment_facilitator_organization_id = attributes[:'payment_facilitator_organization_id']
115
+ end
116
+
117
+ if attributes.key?(:'merchant_application_id')
118
+ self.merchant_application_id = attributes[:'merchant_application_id']
119
+ end
120
+ end
121
+
122
+ # Show invalid properties with the reasons. Usually used together with valid?
123
+ # @return Array for valid properties with the reasons
124
+ def list_invalid_properties
125
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
126
+ invalid_properties = Array.new
127
+ invalid_properties
128
+ end
129
+
130
+ # Check to see if the all the properties in the model are valid
131
+ # @return true if the model is valid
132
+ def valid?
133
+ warn '[DEPRECATED] the `valid?` method is obsolete'
134
+ true
135
+ end
136
+
137
+ # Checks equality by comparing each attribute.
138
+ # @param [Object] Object to be compared
139
+ def ==(o)
140
+ return true if self.equal?(o)
141
+ self.class == o.class &&
142
+ application_state == o.application_state &&
143
+ payment_facilitator_organization_id == o.payment_facilitator_organization_id &&
144
+ merchant_application_id == o.merchant_application_id
145
+ end
146
+
147
+ # @see the `==` method
148
+ # @param [Object] Object to be compared
149
+ def eql?(o)
150
+ self == o
151
+ end
152
+
153
+ # Calculates hash code according to all attributes.
154
+ # @return [Integer] Hash code
155
+ def hash
156
+ [application_state, payment_facilitator_organization_id, merchant_application_id].hash
157
+ end
158
+
159
+ # Builds the object from hash
160
+ # @param [Hash] attributes Model attributes in the form of hash
161
+ # @return [Object] Returns the model itself
162
+ def self.build_from_hash(attributes)
163
+ return nil unless attributes.is_a?(Hash)
164
+ attributes = attributes.transform_keys(&:to_sym)
165
+ transformed_hash = {}
166
+ openapi_types.each_pair do |key, type|
167
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
168
+ transformed_hash["#{key}"] = nil
169
+ elsif type =~ /\AArray<(.*)>/i
170
+ # check to ensure the input is an array given that the attribute
171
+ # is documented as an array but the input is not
172
+ if attributes[attribute_map[key]].is_a?(Array)
173
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
174
+ end
175
+ elsif !attributes[attribute_map[key]].nil?
176
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
177
+ end
178
+ end
179
+ new(transformed_hash)
180
+ end
181
+
182
+ # Deserializes the data based on type
183
+ # @param string type Data type
184
+ # @param string value Value to be deserialized
185
+ # @return [Object] Deserialized data
186
+ def self._deserialize(type, value)
187
+ case type.to_sym
188
+ when :Time
189
+ Time.parse(value)
190
+ when :Date
191
+ Date.parse(value)
192
+ when :String
193
+ value.to_s
194
+ when :Integer
195
+ value.to_i
196
+ when :Float
197
+ value.to_f
198
+ when :Boolean
199
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
200
+ true
201
+ else
202
+ false
203
+ end
204
+ when :Object
205
+ # generic object (usually a Hash), return directly
206
+ value
207
+ when /\AArray<(?<inner_type>.+)>\z/
208
+ inner_type = Regexp.last_match[:inner_type]
209
+ value.map { |v| _deserialize(inner_type, v) }
210
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
211
+ k_type = Regexp.last_match[:k_type]
212
+ v_type = Regexp.last_match[:v_type]
213
+ {}.tap do |hash|
214
+ value.each do |k, v|
215
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
216
+ end
217
+ end
218
+ else # model
219
+ # models (e.g. Pet) or oneOf
220
+ klass = WalleeRubySdk.const_get(type)
221
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
222
+ end
223
+ end
224
+
225
+ # Returns the string representation of the object
226
+ # @return [String] String presentation of the object
227
+ def to_s
228
+ to_hash.to_s
229
+ end
230
+
231
+ # to_body is an alias to to_hash (backward compatibility)
232
+ # @return [Hash] Returns the object in the form of hash
233
+ def to_body
234
+ to_hash
235
+ end
236
+
237
+ # Returns the object in the form of hash
238
+ # @return [Hash] Returns the object in the form of hash
239
+ def to_hash
240
+ hash = {}
241
+ self.class.attribute_map.each_pair do |attr, param|
242
+ value = self.send(attr)
243
+ if value.nil?
244
+ is_nullable = self.class.openapi_nullable.include?(attr)
245
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
246
+ end
247
+
248
+ hash[param] = _to_hash(value)
249
+ end
250
+ hash
251
+ end
252
+
253
+ # Outputs non-array value in the form of hash
254
+ # For object, use to_hash. Otherwise, just return the value
255
+ # @param [Object] value Any valid value
256
+ # @return [Hash] Returns the value in the form of hash
257
+ def _to_hash(value)
258
+ if value.is_a?(Array)
259
+ value.compact.map { |v| _to_hash(v) }
260
+ elsif value.is_a?(Hash)
261
+ {}.tap do |hash|
262
+ value.each { |k, v| hash[k] = _to_hash(v) }
263
+ end
264
+ elsif value.respond_to? :to_hash
265
+ value.to_hash
266
+ else
267
+ value
268
+ end
269
+ end
270
+
271
+ end
272
+
273
+ end
@@ -24,16 +24,20 @@ require 'date'
24
24
  require 'time'
25
25
 
26
26
  module WalleeRubySdk
27
- class PaymentTerminalUpdate
27
+ class PaymentTerminalUpdateRequest
28
+ # The configuration that is assigned to the terminal and determines how it works.
29
+ attr_accessor :configuration
30
+
28
31
  # The name used to identify the payment terminal.
29
32
  attr_accessor :name
30
33
 
31
- # The version number indicates the version of the entity. The version is incremented whenever the entity is changed.
34
+ # The version is used for optimistic locking and incremented whenever the payment terminal is updated.
32
35
  attr_accessor :version
33
36
 
34
37
  # Attribute mapping from ruby-style variable name to JSON key.
35
38
  def self.attribute_map
36
39
  {
40
+ :'configuration' => :'configuration',
37
41
  :'name' => :'name',
38
42
  :'version' => :'version'
39
43
  }
@@ -52,6 +56,7 @@ module WalleeRubySdk
52
56
  # Attribute type mapping.
53
57
  def self.openapi_types
54
58
  {
59
+ :'configuration' => :'Integer',
55
60
  :'name' => :'String',
56
61
  :'version' => :'Integer'
57
62
  }
@@ -67,26 +72,28 @@ module WalleeRubySdk
67
72
  # @param [Hash] attributes Model attributes in the form of hash
68
73
  def initialize(attributes = {})
69
74
  if (!attributes.is_a?(Hash))
70
- fail ArgumentError, "The input argument (attributes) must be a hash in `WalleeRubySdk::PaymentTerminalUpdate` initialize method"
75
+ fail ArgumentError, "The input argument (attributes) must be a hash in `WalleeRubySdk::PaymentTerminalUpdateRequest` initialize method"
71
76
  end
72
77
 
73
78
  # check to see if the attribute exists and convert string to symbol for hash key
74
79
  acceptable_attribute_map = self.class.acceptable_attribute_map
75
80
  attributes = attributes.each_with_object({}) { |(k, v), h|
76
81
  if (!acceptable_attribute_map.key?(k.to_sym))
77
- fail ArgumentError, "`#{k}` is not a valid attribute in `WalleeRubySdk::PaymentTerminalUpdate`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
82
+ fail ArgumentError, "`#{k}` is not a valid attribute in `WalleeRubySdk::PaymentTerminalUpdateRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
78
83
  end
79
84
  h[k.to_sym] = v
80
85
  }
81
86
 
87
+ if attributes.key?(:'configuration')
88
+ self.configuration = attributes[:'configuration']
89
+ end
90
+
82
91
  if attributes.key?(:'name')
83
92
  self.name = attributes[:'name']
84
93
  end
85
94
 
86
95
  if attributes.key?(:'version')
87
96
  self.version = attributes[:'version']
88
- else
89
- self.version = nil
90
97
  end
91
98
  end
92
99
 
@@ -95,14 +102,6 @@ module WalleeRubySdk
95
102
  def list_invalid_properties
96
103
  warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
97
104
  invalid_properties = Array.new
98
- if !@name.nil? && @name.to_s.length > 100
99
- invalid_properties.push('invalid value for "name", the character length must be smaller than or equal to 100.')
100
- end
101
-
102
- if @version.nil?
103
- invalid_properties.push('invalid value for "version", version cannot be nil.')
104
- end
105
-
106
105
  invalid_properties
107
106
  end
108
107
 
@@ -110,40 +109,15 @@ module WalleeRubySdk
110
109
  # @return true if the model is valid
111
110
  def valid?
112
111
  warn '[DEPRECATED] the `valid?` method is obsolete'
113
- return false if !@name.nil? && @name.to_s.length > 100
114
- return false if @version.nil?
115
112
  true
116
113
  end
117
114
 
118
- # Custom attribute writer method with validation
119
- # @param [Object] name Value to be assigned
120
- def name=(name)
121
- if name.nil?
122
- fail ArgumentError, 'name cannot be nil'
123
- end
124
-
125
- if name.to_s.length > 100
126
- fail ArgumentError, 'invalid value for "name", the character length must be smaller than or equal to 100.'
127
- end
128
-
129
- @name = name
130
- end
131
-
132
- # Custom attribute writer method with validation
133
- # @param [Object] version Value to be assigned
134
- def version=(version)
135
- if version.nil?
136
- fail ArgumentError, 'version cannot be nil'
137
- end
138
-
139
- @version = version
140
- end
141
-
142
115
  # Checks equality by comparing each attribute.
143
116
  # @param [Object] Object to be compared
144
117
  def ==(o)
145
118
  return true if self.equal?(o)
146
119
  self.class == o.class &&
120
+ configuration == o.configuration &&
147
121
  name == o.name &&
148
122
  version == o.version
149
123
  end
@@ -157,7 +131,7 @@ module WalleeRubySdk
157
131
  # Calculates hash code according to all attributes.
158
132
  # @return [Integer] Hash code
159
133
  def hash
160
- [name, version].hash
134
+ [configuration, name, version].hash
161
135
  end
162
136
 
163
137
  # Builds the object from hash