wallee-ruby-sdk 2.2.3 → 2.2.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (62) hide show
  1. checksums.yaml +4 -4
  2. data/LICENSE +1 -1
  3. data/README.md +1 -1
  4. data/lib/wallee-ruby-sdk.rb +17 -5
  5. data/lib/wallee-ruby-sdk/api/payment_terminal_till_service_api.rb +99 -0
  6. data/lib/wallee-ruby-sdk/api/shopify_subscription_service_api.rb +124 -0
  7. data/lib/wallee-ruby-sdk/api/shopify_transaction_service_api.rb +213 -0
  8. data/lib/wallee-ruby-sdk/api/subscriber_service_api.rb +3 -3
  9. data/lib/wallee-ruby-sdk/api/subscription_service_api.rb +67 -0
  10. data/lib/wallee-ruby-sdk/api/token_service_api.rb +126 -0
  11. data/lib/wallee-ruby-sdk/api_client.rb +5 -3
  12. data/lib/wallee-ruby-sdk/configuration.rb +2 -2
  13. data/lib/wallee-ruby-sdk/models/abstract_account_update.rb +11 -1
  14. data/lib/wallee-ruby-sdk/models/{abstract_shopify_subscription_product_active.rb → abstract_shopify_subscription_product_update.rb} +2 -12
  15. data/lib/wallee-ruby-sdk/models/abstract_space_update.rb +11 -1
  16. data/lib/wallee-ruby-sdk/models/abstract_transaction_pending.rb +59 -1
  17. data/lib/wallee-ruby-sdk/models/abstract_webhook_url_update.rb +24 -0
  18. data/lib/wallee-ruby-sdk/models/account.rb +31 -1
  19. data/lib/wallee-ruby-sdk/models/account_create.rb +11 -1
  20. data/lib/wallee-ruby-sdk/models/account_update.rb +11 -1
  21. data/lib/wallee-ruby-sdk/models/charge_attempt.rb +11 -1
  22. data/lib/wallee-ruby-sdk/models/payment_connector_configuration.rb +13 -1
  23. data/lib/wallee-ruby-sdk/models/sales_channel.rb +34 -4
  24. data/lib/wallee-ruby-sdk/models/shopify_additional_line_item_data.rb +35 -0
  25. data/lib/wallee-ruby-sdk/models/shopify_integration.rb +73 -31
  26. data/lib/wallee-ruby-sdk/models/shopify_integration_payment_app_version.rb +34 -0
  27. data/lib/wallee-ruby-sdk/models/{shopify_integration_app_version.rb → shopify_integration_subscription_app_version.rb} +3 -3
  28. data/lib/wallee-ruby-sdk/models/shopify_subscriber_creation.rb +216 -0
  29. data/lib/wallee-ruby-sdk/models/shopify_subscription.rb +51 -7
  30. data/lib/wallee-ruby-sdk/models/shopify_subscription_address.rb +0 -60
  31. data/lib/wallee-ruby-sdk/models/shopify_subscription_address_create.rb +546 -0
  32. data/lib/wallee-ruby-sdk/models/shopify_subscription_creation_request.rb +353 -0
  33. data/lib/wallee-ruby-sdk/models/shopify_subscription_model_billing_configuration.rb +261 -0
  34. data/lib/wallee-ruby-sdk/models/{shopify_subscription_edit_model_item.rb → shopify_subscription_model_item.rb} +2 -2
  35. data/lib/wallee-ruby-sdk/models/{shopify_subscription_edit_model_tax_line.rb → shopify_subscription_model_tax_line.rb} +1 -1
  36. data/lib/wallee-ruby-sdk/models/shopify_subscription_product_create.rb +9 -14
  37. data/lib/wallee-ruby-sdk/models/{shopify_subscription_product_active.rb → shopify_subscription_product_update.rb} +2 -12
  38. data/lib/wallee-ruby-sdk/models/shopify_subscription_update_addresses_request.rb +211 -0
  39. data/lib/wallee-ruby-sdk/models/shopify_subscription_update_request.rb +11 -81
  40. data/lib/wallee-ruby-sdk/models/space.rb +31 -1
  41. data/lib/wallee-ruby-sdk/models/space_create.rb +11 -1
  42. data/lib/wallee-ruby-sdk/models/space_update.rb +11 -1
  43. data/lib/wallee-ruby-sdk/models/subscription.rb +11 -1
  44. data/lib/wallee-ruby-sdk/models/subscription_charge.rb +48 -0
  45. data/lib/wallee-ruby-sdk/models/subscription_charge_create.rb +48 -0
  46. data/lib/wallee-ruby-sdk/models/subscription_create_request.rb +1 -1
  47. data/lib/wallee-ruby-sdk/models/subscription_product_version.rb +11 -1
  48. data/lib/wallee-ruby-sdk/models/subscription_product_version_pending.rb +14 -4
  49. data/lib/wallee-ruby-sdk/models/subscription_update_request.rb +206 -0
  50. data/lib/wallee-ruby-sdk/models/tax_calculation.rb +35 -0
  51. data/lib/wallee-ruby-sdk/models/transaction.rb +69 -1
  52. data/lib/wallee-ruby-sdk/models/transaction_completion.rb +26 -1
  53. data/lib/wallee-ruby-sdk/models/transaction_completion_behavior.rb +36 -0
  54. data/lib/wallee-ruby-sdk/models/transaction_completion_request.rb +26 -1
  55. data/lib/wallee-ruby-sdk/models/transaction_create.rb +59 -1
  56. data/lib/wallee-ruby-sdk/models/transaction_pending.rb +59 -1
  57. data/lib/wallee-ruby-sdk/models/webhook_url.rb +24 -0
  58. data/lib/wallee-ruby-sdk/models/webhook_url_create.rb +24 -0
  59. data/lib/wallee-ruby-sdk/models/webhook_url_update.rb +24 -0
  60. data/lib/wallee-ruby-sdk/version.rb +1 -1
  61. data/wallee-ruby-sdk.gemspec +3 -2
  62. metadata +45 -14
@@ -50,6 +50,9 @@ module Wallee
50
50
  #
51
51
  attr_accessor :failure_reason
52
52
 
53
+ #
54
+ attr_accessor :invoice_merchant_reference
55
+
53
56
  #
54
57
  attr_accessor :labels
55
58
 
@@ -120,6 +123,7 @@ module Wallee
120
123
  :'external_id' => :'externalId',
121
124
  :'failed_on' => :'failedOn',
122
125
  :'failure_reason' => :'failureReason',
126
+ :'invoice_merchant_reference' => :'invoiceMerchantReference',
123
127
  :'labels' => :'labels',
124
128
  :'language' => :'language',
125
129
  :'last_completion' => :'lastCompletion',
@@ -155,6 +159,7 @@ module Wallee
155
159
  :'external_id' => :'String',
156
160
  :'failed_on' => :'DateTime',
157
161
  :'failure_reason' => :'FailureReason',
162
+ :'invoice_merchant_reference' => :'String',
158
163
  :'labels' => :'Array<Label>',
159
164
  :'language' => :'String',
160
165
  :'last_completion' => :'BOOLEAN',
@@ -227,6 +232,10 @@ module Wallee
227
232
  self.failure_reason = attributes[:'failureReason']
228
233
  end
229
234
 
235
+ if attributes.has_key?(:'invoiceMerchantReference')
236
+ self.invoice_merchant_reference = attributes[:'invoiceMerchantReference']
237
+ end
238
+
230
239
  if attributes.has_key?(:'labels')
231
240
  if (value = attributes[:'labels']).is_a?(Array)
232
241
  self.labels = value
@@ -322,6 +331,10 @@ module Wallee
322
331
  invalid_properties.push('invalid value for "external_id", the character length must be great than or equal to 1.')
323
332
  end
324
333
 
334
+ if !@invoice_merchant_reference.nil? && @invoice_merchant_reference.to_s.length > 100
335
+ invalid_properties.push('invalid value for "invoice_merchant_reference", the character length must be smaller than or equal to 100.')
336
+ end
337
+
325
338
  invalid_properties
326
339
  end
327
340
 
@@ -330,6 +343,7 @@ module Wallee
330
343
  def valid?
331
344
  return false if !@external_id.nil? && @external_id.to_s.length > 100
332
345
  return false if !@external_id.nil? && @external_id.to_s.length < 1
346
+ return false if !@invoice_merchant_reference.nil? && @invoice_merchant_reference.to_s.length > 100
333
347
  true
334
348
  end
335
349
 
@@ -347,6 +361,16 @@ module Wallee
347
361
  @external_id = external_id
348
362
  end
349
363
 
364
+ # Custom attribute writer method with validation
365
+ # @param [Object] invoice_merchant_reference Value to be assigned
366
+ def invoice_merchant_reference=(invoice_merchant_reference)
367
+ if !invoice_merchant_reference.nil? && invoice_merchant_reference.to_s.length > 100
368
+ fail ArgumentError, 'invalid value for "invoice_merchant_reference", the character length must be smaller than or equal to 100.'
369
+ end
370
+
371
+ @invoice_merchant_reference = invoice_merchant_reference
372
+ end
373
+
350
374
  # Checks equality by comparing each attribute.
351
375
  # @param [Object] Object to be compared
352
376
  def ==(o)
@@ -362,6 +386,7 @@ module Wallee
362
386
  external_id == o.external_id &&
363
387
  failed_on == o.failed_on &&
364
388
  failure_reason == o.failure_reason &&
389
+ invoice_merchant_reference == o.invoice_merchant_reference &&
365
390
  labels == o.labels &&
366
391
  language == o.language &&
367
392
  last_completion == o.last_completion &&
@@ -392,7 +417,7 @@ module Wallee
392
417
  # Calculates hash code according to all attributes.
393
418
  # @return [Fixnum] Hash code
394
419
  def hash
395
- [id, linked_space_id, linked_transaction, amount, base_line_items, created_by, created_on, external_id, failed_on, failure_reason, labels, language, last_completion, line_item_version, line_items, mode, next_update_on, payment_information, planned_purge_date, processing_on, processor_reference, remaining_line_items, space_view_id, state, succeeded_on, tax_amount, time_zone, timeout_on, version].hash
420
+ [id, linked_space_id, linked_transaction, amount, base_line_items, created_by, created_on, external_id, failed_on, failure_reason, invoice_merchant_reference, labels, language, last_completion, line_item_version, line_items, mode, next_update_on, payment_information, planned_purge_date, processing_on, processor_reference, remaining_line_items, space_view_id, state, succeeded_on, tax_amount, time_zone, timeout_on, version].hash
396
421
  end
397
422
 
398
423
  # Builds the object from hash
@@ -0,0 +1,36 @@
1
+ =begin
2
+ The wallee API allows an easy interaction with the wallee web service.
3
+
4
+ Licensed under the Apache License, Version 2.0 (the "License");
5
+ you may not use this file except in compliance with the License.
6
+ You may obtain a copy of the License at
7
+
8
+ http://www.apache.org/licenses/LICENSE-2.0
9
+
10
+ Unless required by applicable law or agreed to in writing, software
11
+ distributed under the License is distributed on an "AS IS" BASIS,
12
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ See the License for the specific language governing permissions and
14
+ limitations under the License.
15
+
16
+ =end
17
+
18
+ require 'date'
19
+
20
+ module Wallee
21
+ class TransactionCompletionBehavior
22
+
23
+ COMPLETE_IMMEDIATELY = 'COMPLETE_IMMEDIATELY'.freeze
24
+ COMPLETE_DEFERRED = 'COMPLETE_DEFERRED'.freeze
25
+ USE_CONFIGURATION = 'USE_CONFIGURATION'.freeze
26
+
27
+ # Builds the enum from string
28
+ # @param [String] The enum value in the form of the string
29
+ # @return [String] The enum value
30
+ def build_from_hash(value)
31
+ constantValues = TransactionCompletionBehavior.constants.select { |c| TransactionCompletionBehavior::const_get(c) == value }
32
+ raise "Invalid ENUM value #{value} for class #TransactionCompletionBehavior" if constantValues.empty?
33
+ value
34
+ end
35
+ end
36
+ end
@@ -23,6 +23,9 @@ module Wallee
23
23
  # The external ID helps to identify the entity and a subsequent creation of an entity with the same ID will not create a new entity.
24
24
  attr_accessor :external_id
25
25
 
26
+ #
27
+ attr_accessor :invoice_merchant_reference
28
+
26
29
  # The last completion flag indicates if this is the last completion. After the last completion is created no further completions can be issued.
27
30
  attr_accessor :last_completion
28
31
 
@@ -36,6 +39,7 @@ module Wallee
36
39
  def self.attribute_map
37
40
  {
38
41
  :'external_id' => :'externalId',
42
+ :'invoice_merchant_reference' => :'invoiceMerchantReference',
39
43
  :'last_completion' => :'lastCompletion',
40
44
  :'line_items' => :'lineItems',
41
45
  :'transaction_id' => :'transactionId'
@@ -46,6 +50,7 @@ module Wallee
46
50
  def self.swagger_types
47
51
  {
48
52
  :'external_id' => :'String',
53
+ :'invoice_merchant_reference' => :'String',
49
54
  :'last_completion' => :'BOOLEAN',
50
55
  :'line_items' => :'Array<CompletionLineItemCreate>',
51
56
  :'transaction_id' => :'Integer'
@@ -64,6 +69,10 @@ module Wallee
64
69
  self.external_id = attributes[:'externalId']
65
70
  end
66
71
 
72
+ if attributes.has_key?(:'invoiceMerchantReference')
73
+ self.invoice_merchant_reference = attributes[:'invoiceMerchantReference']
74
+ end
75
+
67
76
  if attributes.has_key?(:'lastCompletion')
68
77
  self.last_completion = attributes[:'lastCompletion']
69
78
  end
@@ -95,6 +104,10 @@ module Wallee
95
104
  invalid_properties.push('invalid value for "external_id", the character length must be great than or equal to 1.')
96
105
  end
97
106
 
107
+ if !@invoice_merchant_reference.nil? && @invoice_merchant_reference.to_s.length > 100
108
+ invalid_properties.push('invalid value for "invoice_merchant_reference", the character length must be smaller than or equal to 100.')
109
+ end
110
+
98
111
  if @last_completion.nil?
99
112
  invalid_properties.push('invalid value for "last_completion", last_completion cannot be nil.')
100
113
  end
@@ -112,6 +125,7 @@ module Wallee
112
125
  return false if @external_id.nil?
113
126
  return false if @external_id.to_s.length > 100
114
127
  return false if @external_id.to_s.length < 1
128
+ return false if !@invoice_merchant_reference.nil? && @invoice_merchant_reference.to_s.length > 100
115
129
  return false if @last_completion.nil?
116
130
  return false if @transaction_id.nil?
117
131
  true
@@ -135,12 +149,23 @@ module Wallee
135
149
  @external_id = external_id
136
150
  end
137
151
 
152
+ # Custom attribute writer method with validation
153
+ # @param [Object] invoice_merchant_reference Value to be assigned
154
+ def invoice_merchant_reference=(invoice_merchant_reference)
155
+ if !invoice_merchant_reference.nil? && invoice_merchant_reference.to_s.length > 100
156
+ fail ArgumentError, 'invalid value for "invoice_merchant_reference", the character length must be smaller than or equal to 100.'
157
+ end
158
+
159
+ @invoice_merchant_reference = invoice_merchant_reference
160
+ end
161
+
138
162
  # Checks equality by comparing each attribute.
139
163
  # @param [Object] Object to be compared
140
164
  def ==(o)
141
165
  return true if self.equal?(o)
142
166
  self.class == o.class &&
143
167
  external_id == o.external_id &&
168
+ invoice_merchant_reference == o.invoice_merchant_reference &&
144
169
  last_completion == o.last_completion &&
145
170
  line_items == o.line_items &&
146
171
  transaction_id == o.transaction_id
@@ -155,7 +180,7 @@ module Wallee
155
180
  # Calculates hash code according to all attributes.
156
181
  # @return [Fixnum] Hash code
157
182
  def hash
158
- [external_id, last_completion, line_items, transaction_id].hash
183
+ [external_id, invoice_merchant_reference, last_completion, line_items, transaction_id].hash
159
184
  end
160
185
 
161
186
  # Builds the object from hash
@@ -29,6 +29,9 @@ module Wallee
29
29
  #
30
30
  attr_accessor :billing_address
31
31
 
32
+ # The completion behavior controls when the transaction is completed.
33
+ attr_accessor :completion_behavior
34
+
32
35
  #
33
36
  attr_accessor :currency
34
37
 
@@ -104,6 +107,7 @@ module Wallee
104
107
  :'allowed_payment_method_brands' => :'allowedPaymentMethodBrands',
105
108
  :'allowed_payment_method_configurations' => :'allowedPaymentMethodConfigurations',
106
109
  :'billing_address' => :'billingAddress',
110
+ :'completion_behavior' => :'completionBehavior',
107
111
  :'currency' => :'currency',
108
112
  :'customer_email_address' => :'customerEmailAddress',
109
113
  :'customer_id' => :'customerId',
@@ -136,6 +140,7 @@ module Wallee
136
140
  :'allowed_payment_method_brands' => :'Array<PaymentMethodBrand>',
137
141
  :'allowed_payment_method_configurations' => :'Array<Integer>',
138
142
  :'billing_address' => :'AddressCreate',
143
+ :'completion_behavior' => :'TransactionCompletionBehavior',
139
144
  :'currency' => :'String',
140
145
  :'customer_email_address' => :'String',
141
146
  :'customer_id' => :'String',
@@ -186,6 +191,10 @@ module Wallee
186
191
  self.billing_address = attributes[:'billingAddress']
187
192
  end
188
193
 
194
+ if attributes.has_key?(:'completionBehavior')
195
+ self.completion_behavior = attributes[:'completionBehavior']
196
+ end
197
+
189
198
  if attributes.has_key?(:'currency')
190
199
  self.currency = attributes[:'currency']
191
200
  end
@@ -291,6 +300,14 @@ module Wallee
291
300
  invalid_properties.push('invalid value for "customer_email_address", the character length must be smaller than or equal to 254.')
292
301
  end
293
302
 
303
+ if !@failed_url.nil? && @failed_url.to_s.length > 1000
304
+ invalid_properties.push('invalid value for "failed_url", the character length must be smaller than or equal to 1000.')
305
+ end
306
+
307
+ if !@failed_url.nil? && @failed_url.to_s.length < 9
308
+ invalid_properties.push('invalid value for "failed_url", the character length must be great than or equal to 9.')
309
+ end
310
+
294
311
  if !@invoice_merchant_reference.nil? && @invoice_merchant_reference.to_s.length > 100
295
312
  invalid_properties.push('invalid value for "invoice_merchant_reference", the character length must be smaller than or equal to 100.')
296
313
  end
@@ -307,6 +324,14 @@ module Wallee
307
324
  invalid_properties.push('invalid value for "shipping_method", the character length must be smaller than or equal to 200.')
308
325
  end
309
326
 
327
+ if !@success_url.nil? && @success_url.to_s.length > 1000
328
+ invalid_properties.push('invalid value for "success_url", the character length must be smaller than or equal to 1000.')
329
+ end
330
+
331
+ if !@success_url.nil? && @success_url.to_s.length < 9
332
+ invalid_properties.push('invalid value for "success_url", the character length must be great than or equal to 9.')
333
+ end
334
+
310
335
  if !@device_session_identifier.nil? && @device_session_identifier.to_s.length > 40
311
336
  invalid_properties.push('invalid value for "device_session_identifier", the character length must be smaller than or equal to 40.')
312
337
  end
@@ -322,10 +347,14 @@ module Wallee
322
347
  # @return true if the model is valid
323
348
  def valid?
324
349
  return false if !@customer_email_address.nil? && @customer_email_address.to_s.length > 254
350
+ return false if !@failed_url.nil? && @failed_url.to_s.length > 1000
351
+ return false if !@failed_url.nil? && @failed_url.to_s.length < 9
325
352
  return false if !@invoice_merchant_reference.nil? && @invoice_merchant_reference.to_s.length > 100
326
353
  return false if @line_items.nil?
327
354
  return false if !@merchant_reference.nil? && @merchant_reference.to_s.length > 100
328
355
  return false if !@shipping_method.nil? && @shipping_method.to_s.length > 200
356
+ return false if !@success_url.nil? && @success_url.to_s.length > 1000
357
+ return false if !@success_url.nil? && @success_url.to_s.length < 9
329
358
  return false if !@device_session_identifier.nil? && @device_session_identifier.to_s.length > 40
330
359
  return false if !@device_session_identifier.nil? && @device_session_identifier.to_s.length < 10
331
360
  true
@@ -341,6 +370,20 @@ module Wallee
341
370
  @customer_email_address = customer_email_address
342
371
  end
343
372
 
373
+ # Custom attribute writer method with validation
374
+ # @param [Object] failed_url Value to be assigned
375
+ def failed_url=(failed_url)
376
+ if !failed_url.nil? && failed_url.to_s.length > 1000
377
+ fail ArgumentError, 'invalid value for "failed_url", the character length must be smaller than or equal to 1000.'
378
+ end
379
+
380
+ if !failed_url.nil? && failed_url.to_s.length < 9
381
+ fail ArgumentError, 'invalid value for "failed_url", the character length must be great than or equal to 9.'
382
+ end
383
+
384
+ @failed_url = failed_url
385
+ end
386
+
344
387
  # Custom attribute writer method with validation
345
388
  # @param [Object] invoice_merchant_reference Value to be assigned
346
389
  def invoice_merchant_reference=(invoice_merchant_reference)
@@ -371,6 +414,20 @@ module Wallee
371
414
  @shipping_method = shipping_method
372
415
  end
373
416
 
417
+ # Custom attribute writer method with validation
418
+ # @param [Object] success_url Value to be assigned
419
+ def success_url=(success_url)
420
+ if !success_url.nil? && success_url.to_s.length > 1000
421
+ fail ArgumentError, 'invalid value for "success_url", the character length must be smaller than or equal to 1000.'
422
+ end
423
+
424
+ if !success_url.nil? && success_url.to_s.length < 9
425
+ fail ArgumentError, 'invalid value for "success_url", the character length must be great than or equal to 9.'
426
+ end
427
+
428
+ @success_url = success_url
429
+ end
430
+
374
431
  # Custom attribute writer method with validation
375
432
  # @param [Object] device_session_identifier Value to be assigned
376
433
  def device_session_identifier=(device_session_identifier)
@@ -393,6 +450,7 @@ module Wallee
393
450
  allowed_payment_method_brands == o.allowed_payment_method_brands &&
394
451
  allowed_payment_method_configurations == o.allowed_payment_method_configurations &&
395
452
  billing_address == o.billing_address &&
453
+ completion_behavior == o.completion_behavior &&
396
454
  currency == o.currency &&
397
455
  customer_email_address == o.customer_email_address &&
398
456
  customer_id == o.customer_id &&
@@ -427,7 +485,7 @@ module Wallee
427
485
  # Calculates hash code according to all attributes.
428
486
  # @return [Fixnum] Hash code
429
487
  def hash
430
- [allowed_payment_method_brands, allowed_payment_method_configurations, billing_address, currency, customer_email_address, customer_id, failed_url, invoice_merchant_reference, language, line_items, merchant_reference, meta_data, shipping_address, shipping_method, success_url, time_zone, token, tokenization_mode, auto_confirmation_enabled, charge_retry_enabled, customers_presence, device_session_identifier, emails_disabled, environment, environment_selection_strategy, space_view_id].hash
488
+ [allowed_payment_method_brands, allowed_payment_method_configurations, billing_address, completion_behavior, currency, customer_email_address, customer_id, failed_url, invoice_merchant_reference, language, line_items, merchant_reference, meta_data, shipping_address, shipping_method, success_url, time_zone, token, tokenization_mode, auto_confirmation_enabled, charge_retry_enabled, customers_presence, device_session_identifier, emails_disabled, environment, environment_selection_strategy, space_view_id].hash
431
489
  end
432
490
 
433
491
  # Builds the object from hash
@@ -29,6 +29,9 @@ module Wallee
29
29
  #
30
30
  attr_accessor :billing_address
31
31
 
32
+ # The completion behavior controls when the transaction is completed.
33
+ attr_accessor :completion_behavior
34
+
32
35
  #
33
36
  attr_accessor :currency
34
37
 
@@ -86,6 +89,7 @@ module Wallee
86
89
  :'allowed_payment_method_brands' => :'allowedPaymentMethodBrands',
87
90
  :'allowed_payment_method_configurations' => :'allowedPaymentMethodConfigurations',
88
91
  :'billing_address' => :'billingAddress',
92
+ :'completion_behavior' => :'completionBehavior',
89
93
  :'currency' => :'currency',
90
94
  :'customer_email_address' => :'customerEmailAddress',
91
95
  :'customer_id' => :'customerId',
@@ -112,6 +116,7 @@ module Wallee
112
116
  :'allowed_payment_method_brands' => :'Array<PaymentMethodBrand>',
113
117
  :'allowed_payment_method_configurations' => :'Array<Integer>',
114
118
  :'billing_address' => :'AddressCreate',
119
+ :'completion_behavior' => :'TransactionCompletionBehavior',
115
120
  :'currency' => :'String',
116
121
  :'customer_email_address' => :'String',
117
122
  :'customer_id' => :'String',
@@ -156,6 +161,10 @@ module Wallee
156
161
  self.billing_address = attributes[:'billingAddress']
157
162
  end
158
163
 
164
+ if attributes.has_key?(:'completionBehavior')
165
+ self.completion_behavior = attributes[:'completionBehavior']
166
+ end
167
+
159
168
  if attributes.has_key?(:'currency')
160
169
  self.currency = attributes[:'currency']
161
170
  end
@@ -237,6 +246,14 @@ module Wallee
237
246
  invalid_properties.push('invalid value for "customer_email_address", the character length must be smaller than or equal to 254.')
238
247
  end
239
248
 
249
+ if !@failed_url.nil? && @failed_url.to_s.length > 1000
250
+ invalid_properties.push('invalid value for "failed_url", the character length must be smaller than or equal to 1000.')
251
+ end
252
+
253
+ if !@failed_url.nil? && @failed_url.to_s.length < 9
254
+ invalid_properties.push('invalid value for "failed_url", the character length must be great than or equal to 9.')
255
+ end
256
+
240
257
  if !@invoice_merchant_reference.nil? && @invoice_merchant_reference.to_s.length > 100
241
258
  invalid_properties.push('invalid value for "invoice_merchant_reference", the character length must be smaller than or equal to 100.')
242
259
  end
@@ -249,6 +266,14 @@ module Wallee
249
266
  invalid_properties.push('invalid value for "shipping_method", the character length must be smaller than or equal to 200.')
250
267
  end
251
268
 
269
+ if !@success_url.nil? && @success_url.to_s.length > 1000
270
+ invalid_properties.push('invalid value for "success_url", the character length must be smaller than or equal to 1000.')
271
+ end
272
+
273
+ if !@success_url.nil? && @success_url.to_s.length < 9
274
+ invalid_properties.push('invalid value for "success_url", the character length must be great than or equal to 9.')
275
+ end
276
+
252
277
  if @id.nil?
253
278
  invalid_properties.push('invalid value for "id", id cannot be nil.')
254
279
  end
@@ -264,9 +289,13 @@ module Wallee
264
289
  # @return true if the model is valid
265
290
  def valid?
266
291
  return false if !@customer_email_address.nil? && @customer_email_address.to_s.length > 254
292
+ return false if !@failed_url.nil? && @failed_url.to_s.length > 1000
293
+ return false if !@failed_url.nil? && @failed_url.to_s.length < 9
267
294
  return false if !@invoice_merchant_reference.nil? && @invoice_merchant_reference.to_s.length > 100
268
295
  return false if !@merchant_reference.nil? && @merchant_reference.to_s.length > 100
269
296
  return false if !@shipping_method.nil? && @shipping_method.to_s.length > 200
297
+ return false if !@success_url.nil? && @success_url.to_s.length > 1000
298
+ return false if !@success_url.nil? && @success_url.to_s.length < 9
270
299
  return false if @id.nil?
271
300
  return false if @version.nil?
272
301
  true
@@ -282,6 +311,20 @@ module Wallee
282
311
  @customer_email_address = customer_email_address
283
312
  end
284
313
 
314
+ # Custom attribute writer method with validation
315
+ # @param [Object] failed_url Value to be assigned
316
+ def failed_url=(failed_url)
317
+ if !failed_url.nil? && failed_url.to_s.length > 1000
318
+ fail ArgumentError, 'invalid value for "failed_url", the character length must be smaller than or equal to 1000.'
319
+ end
320
+
321
+ if !failed_url.nil? && failed_url.to_s.length < 9
322
+ fail ArgumentError, 'invalid value for "failed_url", the character length must be great than or equal to 9.'
323
+ end
324
+
325
+ @failed_url = failed_url
326
+ end
327
+
285
328
  # Custom attribute writer method with validation
286
329
  # @param [Object] invoice_merchant_reference Value to be assigned
287
330
  def invoice_merchant_reference=(invoice_merchant_reference)
@@ -312,6 +355,20 @@ module Wallee
312
355
  @shipping_method = shipping_method
313
356
  end
314
357
 
358
+ # Custom attribute writer method with validation
359
+ # @param [Object] success_url Value to be assigned
360
+ def success_url=(success_url)
361
+ if !success_url.nil? && success_url.to_s.length > 1000
362
+ fail ArgumentError, 'invalid value for "success_url", the character length must be smaller than or equal to 1000.'
363
+ end
364
+
365
+ if !success_url.nil? && success_url.to_s.length < 9
366
+ fail ArgumentError, 'invalid value for "success_url", the character length must be great than or equal to 9.'
367
+ end
368
+
369
+ @success_url = success_url
370
+ end
371
+
315
372
  # Checks equality by comparing each attribute.
316
373
  # @param [Object] Object to be compared
317
374
  def ==(o)
@@ -320,6 +377,7 @@ module Wallee
320
377
  allowed_payment_method_brands == o.allowed_payment_method_brands &&
321
378
  allowed_payment_method_configurations == o.allowed_payment_method_configurations &&
322
379
  billing_address == o.billing_address &&
380
+ completion_behavior == o.completion_behavior &&
323
381
  currency == o.currency &&
324
382
  customer_email_address == o.customer_email_address &&
325
383
  customer_id == o.customer_id &&
@@ -348,7 +406,7 @@ module Wallee
348
406
  # Calculates hash code according to all attributes.
349
407
  # @return [Fixnum] Hash code
350
408
  def hash
351
- [allowed_payment_method_brands, allowed_payment_method_configurations, billing_address, currency, customer_email_address, customer_id, failed_url, invoice_merchant_reference, language, line_items, merchant_reference, meta_data, shipping_address, shipping_method, success_url, time_zone, token, tokenization_mode, id, version].hash
409
+ [allowed_payment_method_brands, allowed_payment_method_configurations, billing_address, completion_behavior, currency, customer_email_address, customer_id, failed_url, invoice_merchant_reference, language, line_items, merchant_reference, meta_data, shipping_address, shipping_method, success_url, time_zone, token, tokenization_mode, id, version].hash
352
410
  end
353
411
 
354
412
  # Builds the object from hash