postfinancecheckout-ruby-sdk 6.3.0 → 6.4.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 +55 -13
  3. data/LICENSE +1 -1
  4. data/README.md +22 -0
  5. data/lib/postfinancecheckout-ruby-sdk/api_client.rb +1 -1
  6. data/lib/postfinancecheckout-ruby-sdk/models/bogus_express_checkout_approval_request.rb +230 -0
  7. data/lib/postfinancecheckout-ruby-sdk/models/bogus_express_checkout_payment_data.rb +241 -0
  8. data/lib/postfinancecheckout-ruby-sdk/models/express_checkout_approval_response.rb +270 -0
  9. data/lib/postfinancecheckout-ruby-sdk/models/express_checkout_create_response.rb +13 -4
  10. data/lib/postfinancecheckout-ruby-sdk/models/express_checkout_session.rb +39 -1
  11. data/lib/postfinancecheckout-ruby-sdk/models/express_checkout_session_create.rb +21 -1
  12. data/lib/postfinancecheckout-ruby-sdk/models/express_checkout_shipping_address_change_request.rb +239 -0
  13. data/lib/postfinancecheckout-ruby-sdk/models/express_checkout_shipping_address_change_response.rb +241 -0
  14. data/lib/postfinancecheckout-ruby-sdk/models/express_checkout_shipping_method_change_request.rb +231 -0
  15. data/lib/postfinancecheckout-ruby-sdk/models/express_checkout_shipping_method_change_response.rb +241 -0
  16. data/lib/postfinancecheckout-ruby-sdk/models/express_checkout_shipping_option.rb +1 -1
  17. data/lib/postfinancecheckout-ruby-sdk/models/refund.rb +13 -1
  18. data/lib/postfinancecheckout-ruby-sdk/models/refund_create.rb +13 -1
  19. data/lib/postfinancecheckout-ruby-sdk/models/scope.rb +15 -15
  20. data/lib/postfinancecheckout-ruby-sdk/models/subscription_update_request.rb +45 -22
  21. data/lib/postfinancecheckout-ruby-sdk/models/transaction_completion.rb +13 -1
  22. data/lib/postfinancecheckout-ruby-sdk/models/transaction_completion_details.rb +26 -4
  23. data/lib/postfinancecheckout-ruby-sdk/models/transaction_user_interface_type.rb +2 -1
  24. data/lib/postfinancecheckout-ruby-sdk/service/bogus_express_checkout_service.rb +114 -0
  25. data/lib/postfinancecheckout-ruby-sdk/service/express_checkout_service.rb +162 -0
  26. data/lib/postfinancecheckout-ruby-sdk/version.rb +1 -1
  27. data/lib/postfinancecheckout-ruby-sdk.rb +8 -0
  28. data/test/test_querying.rb +11 -0
  29. metadata +10 -2
@@ -0,0 +1,241 @@
1
+ =begin
2
+ # PostFinance Ruby SDK
3
+ #
4
+ # This library allows to interact with the PostFinance payment service.
5
+ #
6
+ # Copyright owner: Wallee AG
7
+ # Website: https://www.postfinance.ch/en/private.html
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 PostfinancecheckoutRubySdk
27
+ class ExpressCheckoutShippingMethodChangeResponse
28
+ attr_accessor :line_items
29
+
30
+ attr_accessor :order_total
31
+
32
+ # Attribute mapping from ruby-style variable name to JSON key.
33
+ def self.attribute_map
34
+ {
35
+ :'line_items' => :'lineItems',
36
+ :'order_total' => :'orderTotal'
37
+ }
38
+ end
39
+
40
+ # Returns attribute mapping this model knows about
41
+ def self.acceptable_attribute_map
42
+ attribute_map
43
+ end
44
+
45
+ # Returns all the JSON keys this model knows about
46
+ def self.acceptable_attributes
47
+ acceptable_attribute_map.values
48
+ end
49
+
50
+ # Attribute type mapping.
51
+ def self.openapi_types
52
+ {
53
+ :'line_items' => :'Array<LineItem>',
54
+ :'order_total' => :'Float'
55
+ }
56
+ end
57
+
58
+ # List of attributes with nullable: true
59
+ def self.openapi_nullable
60
+ Set.new([
61
+ ])
62
+ end
63
+
64
+ # Initializes the object
65
+ # @param [Hash] attributes Model attributes in the form of hash
66
+ def initialize(attributes = {})
67
+ if (!attributes.is_a?(Hash))
68
+ fail ArgumentError, "The input argument (attributes) must be a hash in `PostfinancecheckoutRubySdk::ExpressCheckoutShippingMethodChangeResponse` initialize method"
69
+ end
70
+
71
+ # check to see if the attribute exists and convert string to symbol for hash key
72
+ acceptable_attribute_map = self.class.acceptable_attribute_map
73
+ attributes = attributes.each_with_object({}) { |(k, v), h|
74
+ if (!acceptable_attribute_map.key?(k.to_sym))
75
+ fail ArgumentError, "`#{k}` is not a valid attribute in `PostfinancecheckoutRubySdk::ExpressCheckoutShippingMethodChangeResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
76
+ end
77
+ h[k.to_sym] = v
78
+ }
79
+
80
+ if attributes.key?(:'line_items')
81
+ if (value = attributes[:'line_items']).is_a?(Array)
82
+ self.line_items = value
83
+ end
84
+ end
85
+
86
+ if attributes.key?(:'order_total')
87
+ self.order_total = attributes[:'order_total']
88
+ end
89
+ end
90
+
91
+ # Show invalid properties with the reasons. Usually used together with valid?
92
+ # @return Array for valid properties with the reasons
93
+ def list_invalid_properties
94
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
95
+ invalid_properties = Array.new
96
+ invalid_properties
97
+ end
98
+
99
+ # Check to see if the all the properties in the model are valid
100
+ # @return true if the model is valid
101
+ def valid?
102
+ warn '[DEPRECATED] the `valid?` method is obsolete'
103
+ true
104
+ end
105
+
106
+ # Checks equality by comparing each attribute.
107
+ # @param [Object] Object to be compared
108
+ def ==(o)
109
+ return true if self.equal?(o)
110
+ self.class == o.class &&
111
+ line_items == o.line_items &&
112
+ order_total == o.order_total
113
+ end
114
+
115
+ # @see the `==` method
116
+ # @param [Object] Object to be compared
117
+ def eql?(o)
118
+ self == o
119
+ end
120
+
121
+ # Calculates hash code according to all attributes.
122
+ # @return [Integer] Hash code
123
+ def hash
124
+ [line_items, order_total].hash
125
+ end
126
+
127
+ # Builds the object from hash
128
+ # @param [Hash] attributes Model attributes in the form of hash
129
+ # @return [Object] Returns the model itself
130
+ def self.build_from_hash(attributes)
131
+ return nil unless attributes.is_a?(Hash)
132
+ attributes = attributes.transform_keys(&:to_sym)
133
+ transformed_hash = {}
134
+ openapi_types.each_pair do |key, type|
135
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
136
+ transformed_hash["#{key}"] = nil
137
+ elsif type =~ /\AArray<(.*)>/i
138
+ # check to ensure the input is an array given that the attribute
139
+ # is documented as an array but the input is not
140
+ if attributes[attribute_map[key]].is_a?(Array)
141
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
142
+ end
143
+ elsif !attributes[attribute_map[key]].nil?
144
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
145
+ end
146
+ end
147
+ new(transformed_hash)
148
+ end
149
+
150
+ # Deserializes the data based on type
151
+ # @param string type Data type
152
+ # @param string value Value to be deserialized
153
+ # @return [Object] Deserialized data
154
+ def self._deserialize(type, value)
155
+ case type.to_sym
156
+ when :Time
157
+ Time.parse(value)
158
+ when :Date
159
+ Date.parse(value)
160
+ when :String
161
+ value.to_s
162
+ when :Integer
163
+ value.to_i
164
+ when :Float
165
+ value.to_f
166
+ when :Boolean
167
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
168
+ true
169
+ else
170
+ false
171
+ end
172
+ when :Object
173
+ # generic object (usually a Hash), return directly
174
+ value
175
+ when /\AArray<(?<inner_type>.+)>\z/
176
+ inner_type = Regexp.last_match[:inner_type]
177
+ value.map { |v| _deserialize(inner_type, v) }
178
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
179
+ k_type = Regexp.last_match[:k_type]
180
+ v_type = Regexp.last_match[:v_type]
181
+ {}.tap do |hash|
182
+ value.each do |k, v|
183
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
184
+ end
185
+ end
186
+ else # model
187
+ # models (e.g. Pet) or oneOf
188
+ klass = PostfinancecheckoutRubySdk.const_get(type)
189
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
190
+ end
191
+ end
192
+
193
+ # Returns the string representation of the object
194
+ # @return [String] String presentation of the object
195
+ def to_s
196
+ to_hash.to_s
197
+ end
198
+
199
+ # to_body is an alias to to_hash (backward compatibility)
200
+ # @return [Hash] Returns the object in the form of hash
201
+ def to_body
202
+ to_hash
203
+ end
204
+
205
+ # Returns the object in the form of hash
206
+ # @return [Hash] Returns the object in the form of hash
207
+ def to_hash
208
+ hash = {}
209
+ self.class.attribute_map.each_pair do |attr, param|
210
+ value = self.send(attr)
211
+ if value.nil?
212
+ is_nullable = self.class.openapi_nullable.include?(attr)
213
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
214
+ end
215
+
216
+ hash[param] = _to_hash(value)
217
+ end
218
+ hash
219
+ end
220
+
221
+ # Outputs non-array value in the form of hash
222
+ # For object, use to_hash. Otherwise, just return the value
223
+ # @param [Object] value Any valid value
224
+ # @return [Hash] Returns the value in the form of hash
225
+ def _to_hash(value)
226
+ if value.is_a?(Array)
227
+ value.compact.map { |v| _to_hash(v) }
228
+ elsif value.is_a?(Hash)
229
+ {}.tap do |hash|
230
+ value.each { |k, v| hash[k] = _to_hash(v) }
231
+ end
232
+ elsif value.respond_to? :to_hash
233
+ value.to_hash
234
+ else
235
+ value
236
+ end
237
+ end
238
+
239
+ end
240
+
241
+ end
@@ -31,7 +31,7 @@ module PostfinancecheckoutRubySdk
31
31
  # Description of the option
32
32
  attr_accessor :description
33
33
 
34
- # Currency of the option
34
+ # Currency code (ISO-4217) of this shipping option.
35
35
  attr_accessor :currency
36
36
 
37
37
  # Identifier of the option.
@@ -52,6 +52,9 @@ module PostfinancecheckoutRubySdk
52
52
  # The line items included in the refund, representing the reductions.
53
53
  attr_accessor :line_items
54
54
 
55
+ # Allow to store additional information about the object.
56
+ attr_accessor :meta_data
57
+
55
58
  # The date and time when the refund succeeded.
56
59
  attr_accessor :succeeded_on
57
60
 
@@ -151,6 +154,7 @@ module PostfinancecheckoutRubySdk
151
154
  :'type' => :'type',
152
155
  :'created_on' => :'createdOn',
153
156
  :'line_items' => :'lineItems',
157
+ :'meta_data' => :'metaData',
154
158
  :'succeeded_on' => :'succeededOn',
155
159
  :'reduced_line_items' => :'reducedLineItems',
156
160
  :'id' => :'id',
@@ -199,6 +203,7 @@ module PostfinancecheckoutRubySdk
199
203
  :'type' => :'RefundType',
200
204
  :'created_on' => :'Time',
201
205
  :'line_items' => :'Array<LineItem>',
206
+ :'meta_data' => :'Hash<String, String>',
202
207
  :'succeeded_on' => :'Time',
203
208
  :'reduced_line_items' => :'Array<LineItem>',
204
209
  :'id' => :'Integer',
@@ -291,6 +296,12 @@ module PostfinancecheckoutRubySdk
291
296
  end
292
297
  end
293
298
 
299
+ if attributes.key?(:'meta_data')
300
+ if (value = attributes[:'meta_data']).is_a?(Hash)
301
+ self.meta_data = value
302
+ end
303
+ end
304
+
294
305
  if attributes.key?(:'succeeded_on')
295
306
  self.succeeded_on = attributes[:'succeeded_on']
296
307
  end
@@ -525,6 +536,7 @@ module PostfinancecheckoutRubySdk
525
536
  type == o.type &&
526
537
  created_on == o.created_on &&
527
538
  line_items == o.line_items &&
539
+ meta_data == o.meta_data &&
528
540
  succeeded_on == o.succeeded_on &&
529
541
  reduced_line_items == o.reduced_line_items &&
530
542
  id == o.id &&
@@ -559,7 +571,7 @@ module PostfinancecheckoutRubySdk
559
571
  # Calculates hash code according to all attributes.
560
572
  # @return [Integer] Hash code
561
573
  def hash
562
- [total_settled_amount, reductions, base_line_items, processing_on, taxes, language, type, created_on, line_items, succeeded_on, reduced_line_items, id, state, merchant_reference, completion, amount, planned_purge_date, external_id, time_zone, version, labels, linked_space_id, timeout_on, environment, created_by, next_update_on, updated_invoice, failure_reason, total_applied_fees, failed_on, transaction, processor_reference].hash
574
+ [total_settled_amount, reductions, base_line_items, processing_on, taxes, language, type, created_on, line_items, meta_data, succeeded_on, reduced_line_items, id, state, merchant_reference, completion, amount, planned_purge_date, external_id, time_zone, version, labels, linked_space_id, timeout_on, environment, created_by, next_update_on, updated_invoice, failure_reason, total_applied_fees, failed_on, transaction, processor_reference].hash
563
575
  end
564
576
 
565
577
  # Builds the object from hash
@@ -29,6 +29,9 @@ module PostfinancecheckoutRubySdk
29
29
  # The transaction completion that the refund belongs to.
30
30
  attr_accessor :completion
31
31
 
32
+ # Allow to store additional information about the object.
33
+ attr_accessor :meta_data
34
+
32
35
  # The total monetary amount of the refund, representing the exact credit issued to the customer.
33
36
  attr_accessor :amount
34
37
 
@@ -72,6 +75,7 @@ module PostfinancecheckoutRubySdk
72
75
  def self.attribute_map
73
76
  {
74
77
  :'completion' => :'completion',
78
+ :'meta_data' => :'metaData',
75
79
  :'amount' => :'amount',
76
80
  :'reductions' => :'reductions',
77
81
  :'external_id' => :'externalId',
@@ -95,6 +99,7 @@ module PostfinancecheckoutRubySdk
95
99
  def self.openapi_types
96
100
  {
97
101
  :'completion' => :'Integer',
102
+ :'meta_data' => :'Hash<String, String>',
98
103
  :'amount' => :'Float',
99
104
  :'reductions' => :'Array<LineItemReductionCreate>',
100
105
  :'external_id' => :'String',
@@ -130,6 +135,12 @@ module PostfinancecheckoutRubySdk
130
135
  self.completion = attributes[:'completion']
131
136
  end
132
137
 
138
+ if attributes.key?(:'meta_data')
139
+ if (value = attributes[:'meta_data']).is_a?(Hash)
140
+ self.meta_data = value
141
+ end
142
+ end
143
+
133
144
  if attributes.key?(:'amount')
134
145
  self.amount = attributes[:'amount']
135
146
  end
@@ -271,6 +282,7 @@ module PostfinancecheckoutRubySdk
271
282
  return true if self.equal?(o)
272
283
  self.class == o.class &&
273
284
  completion == o.completion &&
285
+ meta_data == o.meta_data &&
274
286
  amount == o.amount &&
275
287
  reductions == o.reductions &&
276
288
  external_id == o.external_id &&
@@ -288,7 +300,7 @@ module PostfinancecheckoutRubySdk
288
300
  # Calculates hash code according to all attributes.
289
301
  # @return [Integer] Hash code
290
302
  def hash
291
- [completion, amount, reductions, external_id, type, merchant_reference, transaction].hash
303
+ [completion, meta_data, amount, reductions, external_id, type, merchant_reference, transaction].hash
292
304
  end
293
305
 
294
306
  # Builds the object from hash
@@ -239,20 +239,20 @@ module PostfinancecheckoutRubySdk
239
239
  invalid_properties.push('invalid value for "port", must be greater than or equal to 1.')
240
240
  end
241
241
 
242
- if !@preprod_domain_name.nil? && @preprod_domain_name.to_s.length > 40
243
- invalid_properties.push('invalid value for "preprod_domain_name", the character length must be smaller than or equal to 40.')
242
+ if !@preprod_domain_name.nil? && @preprod_domain_name.to_s.length > 100
243
+ invalid_properties.push('invalid value for "preprod_domain_name", the character length must be smaller than or equal to 100.')
244
244
  end
245
245
 
246
- if !@domain_name.nil? && @domain_name.to_s.length > 40
247
- invalid_properties.push('invalid value for "domain_name", the character length must be smaller than or equal to 40.')
246
+ if !@domain_name.nil? && @domain_name.to_s.length > 100
247
+ invalid_properties.push('invalid value for "domain_name", the character length must be smaller than or equal to 100.')
248
248
  end
249
249
 
250
250
  if !@name.nil? && @name.to_s.length > 50
251
251
  invalid_properties.push('invalid value for "name", the character length must be smaller than or equal to 50.')
252
252
  end
253
253
 
254
- if !@sandbox_domain_name.nil? && @sandbox_domain_name.to_s.length > 40
255
- invalid_properties.push('invalid value for "sandbox_domain_name", the character length must be smaller than or equal to 40.')
254
+ if !@sandbox_domain_name.nil? && @sandbox_domain_name.to_s.length > 100
255
+ invalid_properties.push('invalid value for "sandbox_domain_name", the character length must be smaller than or equal to 100.')
256
256
  end
257
257
 
258
258
  invalid_properties
@@ -265,10 +265,10 @@ module PostfinancecheckoutRubySdk
265
265
  return false if !@machine_name.nil? && @machine_name.to_s.length > 50
266
266
  return false if !@machine_name.nil? && @machine_name !~ Regexp.new(/([A-Z][A-Za-z0-9]+)(_([A-Z][A-Za-z0-9]+))*/)
267
267
  return false if !@port.nil? && @port < 1
268
- return false if !@preprod_domain_name.nil? && @preprod_domain_name.to_s.length > 40
269
- return false if !@domain_name.nil? && @domain_name.to_s.length > 40
268
+ return false if !@preprod_domain_name.nil? && @preprod_domain_name.to_s.length > 100
269
+ return false if !@domain_name.nil? && @domain_name.to_s.length > 100
270
270
  return false if !@name.nil? && @name.to_s.length > 50
271
- return false if !@sandbox_domain_name.nil? && @sandbox_domain_name.to_s.length > 40
271
+ return false if !@sandbox_domain_name.nil? && @sandbox_domain_name.to_s.length > 100
272
272
  true
273
273
  end
274
274
 
@@ -322,8 +322,8 @@ module PostfinancecheckoutRubySdk
322
322
  fail ArgumentError, 'preprod_domain_name cannot be nil'
323
323
  end
324
324
 
325
- if preprod_domain_name.to_s.length > 40
326
- fail ArgumentError, 'invalid value for "preprod_domain_name", the character length must be smaller than or equal to 40.'
325
+ if preprod_domain_name.to_s.length > 100
326
+ fail ArgumentError, 'invalid value for "preprod_domain_name", the character length must be smaller than or equal to 100.'
327
327
  end
328
328
 
329
329
  @preprod_domain_name = preprod_domain_name
@@ -336,8 +336,8 @@ module PostfinancecheckoutRubySdk
336
336
  fail ArgumentError, 'domain_name cannot be nil'
337
337
  end
338
338
 
339
- if domain_name.to_s.length > 40
340
- fail ArgumentError, 'invalid value for "domain_name", the character length must be smaller than or equal to 40.'
339
+ if domain_name.to_s.length > 100
340
+ fail ArgumentError, 'invalid value for "domain_name", the character length must be smaller than or equal to 100.'
341
341
  end
342
342
 
343
343
  @domain_name = domain_name
@@ -364,8 +364,8 @@ module PostfinancecheckoutRubySdk
364
364
  fail ArgumentError, 'sandbox_domain_name cannot be nil'
365
365
  end
366
366
 
367
- if sandbox_domain_name.to_s.length > 40
368
- fail ArgumentError, 'invalid value for "sandbox_domain_name", the character length must be smaller than or equal to 40.'
367
+ if sandbox_domain_name.to_s.length > 100
368
+ fail ArgumentError, 'invalid value for "sandbox_domain_name", the character length must be smaller than or equal to 100.'
369
369
  end
370
370
 
371
371
  @sandbox_domain_name = sandbox_domain_name
@@ -25,13 +25,25 @@ require 'time'
25
25
 
26
26
  module PostfinancecheckoutRubySdk
27
27
  class SubscriptionUpdateRequest
28
- # A description used to identify the subscription.
29
- attr_accessor :description
28
+ # The configurations of the subscription's components.
29
+ attr_accessor :component_configurations
30
+
31
+ # The product to subscribe to.
32
+ attr_accessor :product
33
+
34
+ # The three-letter code (ISO 4217 format) of the currency used to invoice the customer. Must be one of the currencies supported by the product.
35
+ attr_accessor :currency
36
+
37
+ # Whether the subscriptions' termination periods should be respected.
38
+ attr_accessor :respect_termination_period
30
39
 
31
40
  # Attribute mapping from ruby-style variable name to JSON key.
32
41
  def self.attribute_map
33
42
  {
34
- :'description' => :'description'
43
+ :'component_configurations' => :'componentConfigurations',
44
+ :'product' => :'product',
45
+ :'currency' => :'currency',
46
+ :'respect_termination_period' => :'respectTerminationPeriod'
35
47
  }
36
48
  end
37
49
 
@@ -48,7 +60,10 @@ module PostfinancecheckoutRubySdk
48
60
  # Attribute type mapping.
49
61
  def self.openapi_types
50
62
  {
51
- :'description' => :'String'
63
+ :'component_configurations' => :'Array<SubscriptionComponentReferenceConfiguration>',
64
+ :'product' => :'Integer',
65
+ :'currency' => :'String',
66
+ :'respect_termination_period' => :'Boolean'
52
67
  }
53
68
  end
54
69
 
@@ -74,8 +89,22 @@ module PostfinancecheckoutRubySdk
74
89
  h[k.to_sym] = v
75
90
  }
76
91
 
77
- if attributes.key?(:'description')
78
- self.description = attributes[:'description']
92
+ if attributes.key?(:'component_configurations')
93
+ if (value = attributes[:'component_configurations']).is_a?(Array)
94
+ self.component_configurations = value
95
+ end
96
+ end
97
+
98
+ if attributes.key?(:'product')
99
+ self.product = attributes[:'product']
100
+ end
101
+
102
+ if attributes.key?(:'currency')
103
+ self.currency = attributes[:'currency']
104
+ end
105
+
106
+ if attributes.key?(:'respect_termination_period')
107
+ self.respect_termination_period = attributes[:'respect_termination_period']
79
108
  end
80
109
  end
81
110
 
@@ -84,10 +113,6 @@ module PostfinancecheckoutRubySdk
84
113
  def list_invalid_properties
85
114
  warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
86
115
  invalid_properties = Array.new
87
- if !@description.nil? && @description.to_s.length > 200
88
- invalid_properties.push('invalid value for "description", the character length must be smaller than or equal to 200.')
89
- end
90
-
91
116
  invalid_properties
92
117
  end
93
118
 
@@ -95,22 +120,17 @@ module PostfinancecheckoutRubySdk
95
120
  # @return true if the model is valid
96
121
  def valid?
97
122
  warn '[DEPRECATED] the `valid?` method is obsolete'
98
- return false if !@description.nil? && @description.to_s.length > 200
99
123
  true
100
124
  end
101
125
 
102
126
  # Custom attribute writer method with validation
103
- # @param [Object] description Value to be assigned
104
- def description=(description)
105
- if description.nil?
106
- fail ArgumentError, 'description cannot be nil'
107
- end
108
-
109
- if description.to_s.length > 200
110
- fail ArgumentError, 'invalid value for "description", the character length must be smaller than or equal to 200.'
127
+ # @param [Object] component_configurations Value to be assigned
128
+ def component_configurations=(component_configurations)
129
+ if component_configurations.nil?
130
+ fail ArgumentError, 'component_configurations cannot be nil'
111
131
  end
112
132
 
113
- @description = description
133
+ @component_configurations = component_configurations
114
134
  end
115
135
 
116
136
  # Checks equality by comparing each attribute.
@@ -118,7 +138,10 @@ module PostfinancecheckoutRubySdk
118
138
  def ==(o)
119
139
  return true if self.equal?(o)
120
140
  self.class == o.class &&
121
- description == o.description
141
+ component_configurations == o.component_configurations &&
142
+ product == o.product &&
143
+ currency == o.currency &&
144
+ respect_termination_period == o.respect_termination_period
122
145
  end
123
146
 
124
147
  # @see the `==` method
@@ -130,7 +153,7 @@ module PostfinancecheckoutRubySdk
130
153
  # Calculates hash code according to all attributes.
131
154
  # @return [Integer] Hash code
132
155
  def hash
133
- [description].hash
156
+ [component_configurations, product, currency, respect_termination_period].hash
134
157
  end
135
158
 
136
159
  # Builds the object from hash
@@ -53,6 +53,9 @@ module PostfinancecheckoutRubySdk
53
53
 
54
54
  attr_accessor :mode
55
55
 
56
+ # Allow to store additional information about the object.
57
+ attr_accessor :meta_data
58
+
56
59
  # The date and time when the transaction completion succeeded.
57
60
  attr_accessor :succeeded_on
58
61
 
@@ -149,6 +152,7 @@ module PostfinancecheckoutRubySdk
149
152
  :'created_on' => :'createdOn',
150
153
  :'line_items' => :'lineItems',
151
154
  :'mode' => :'mode',
155
+ :'meta_data' => :'metaData',
152
156
  :'succeeded_on' => :'succeededOn',
153
157
  :'id' => :'id',
154
158
  :'state' => :'state',
@@ -196,6 +200,7 @@ module PostfinancecheckoutRubySdk
196
200
  :'created_on' => :'Time',
197
201
  :'line_items' => :'Array<LineItem>',
198
202
  :'mode' => :'TransactionCompletionMode',
203
+ :'meta_data' => :'Hash<String, String>',
199
204
  :'succeeded_on' => :'Time',
200
205
  :'id' => :'Integer',
201
206
  :'state' => :'TransactionCompletionState',
@@ -288,6 +293,12 @@ module PostfinancecheckoutRubySdk
288
293
  self.mode = attributes[:'mode']
289
294
  end
290
295
 
296
+ if attributes.key?(:'meta_data')
297
+ if (value = attributes[:'meta_data']).is_a?(Hash)
298
+ self.meta_data = value
299
+ end
300
+ end
301
+
291
302
  if attributes.key?(:'succeeded_on')
292
303
  self.succeeded_on = attributes[:'succeeded_on']
293
304
  end
@@ -514,6 +525,7 @@ module PostfinancecheckoutRubySdk
514
525
  created_on == o.created_on &&
515
526
  line_items == o.line_items &&
516
527
  mode == o.mode &&
528
+ meta_data == o.meta_data &&
517
529
  succeeded_on == o.succeeded_on &&
518
530
  id == o.id &&
519
531
  state == o.state &&
@@ -546,7 +558,7 @@ module PostfinancecheckoutRubySdk
546
558
  # Calculates hash code according to all attributes.
547
559
  # @return [Integer] Hash code
548
560
  def hash
549
- [line_item_version, statement_descriptor, base_line_items, processing_on, invoice_merchant_reference, language, remaining_line_items, created_on, line_items, mode, succeeded_on, id, state, linked_transaction, payment_information, amount, last_completion, planned_purge_date, external_id, time_zone, space_view_id, version, labels, linked_space_id, timeout_on, created_by, next_update_on, failure_reason, tax_amount, failed_on, processor_reference].hash
561
+ [line_item_version, statement_descriptor, base_line_items, processing_on, invoice_merchant_reference, language, remaining_line_items, created_on, line_items, mode, meta_data, succeeded_on, id, state, linked_transaction, payment_information, amount, last_completion, planned_purge_date, external_id, time_zone, space_view_id, version, labels, linked_space_id, timeout_on, created_by, next_update_on, failure_reason, tax_amount, failed_on, processor_reference].hash
550
562
  end
551
563
 
552
564
  # Builds the object from hash