wallee-ruby-sdk 2.2.3 → 3.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/LICENSE +1 -1
- data/README.md +1 -1
- data/lib/wallee-ruby-sdk.rb +63 -8
- data/lib/wallee-ruby-sdk/api/bank_account_service_api.rb +213 -0
- data/lib/wallee-ruby-sdk/api/bank_transaction_service_api.rb +213 -0
- data/lib/wallee-ruby-sdk/api/charge_bank_transaction_service_api.rb +213 -0
- data/lib/wallee-ruby-sdk/api/currency_bank_account_service_api.rb +213 -0
- data/lib/wallee-ruby-sdk/api/external_transfer_bank_transaction_service_api.rb +213 -0
- data/lib/wallee-ruby-sdk/api/internal_transfer_bank_transaction_service_api.rb +213 -0
- data/lib/wallee-ruby-sdk/api/payment_terminal_till_service_api.rb +170 -0
- data/lib/wallee-ruby-sdk/api/refund_bank_transaction_service_api.rb +213 -0
- data/lib/wallee-ruby-sdk/api/refund_recovery_bank_transaction_service_api.rb +213 -0
- data/lib/wallee-ruby-sdk/api/shopify_subscriber_service_api.rb +62 -0
- data/lib/wallee-ruby-sdk/api/shopify_subscription_service_api.rb +124 -0
- data/lib/wallee-ruby-sdk/api/shopify_transaction_service_api.rb +213 -0
- data/lib/wallee-ruby-sdk/api/subscriber_service_api.rb +3 -3
- data/lib/wallee-ruby-sdk/api/subscription_service_api.rb +67 -0
- data/lib/wallee-ruby-sdk/api/token_service_api.rb +189 -0
- data/lib/wallee-ruby-sdk/api/transaction_terminal_service_api.rb +21 -32
- data/lib/wallee-ruby-sdk/api/web_app_service_api.rb +200 -0
- data/lib/wallee-ruby-sdk/api_client.rb +7 -4
- data/lib/wallee-ruby-sdk/configuration.rb +2 -2
- data/lib/wallee-ruby-sdk/models/abstract_account_update.rb +11 -1
- data/lib/wallee-ruby-sdk/models/abstract_payment_link_update.rb +15 -15
- data/lib/wallee-ruby-sdk/models/{abstract_shopify_subscription_product_active.rb → abstract_shopify_subscription_product_update.rb} +2 -12
- data/lib/wallee-ruby-sdk/models/abstract_space_update.rb +11 -1
- data/lib/wallee-ruby-sdk/models/abstract_subscription_product_active.rb +11 -1
- data/lib/wallee-ruby-sdk/models/abstract_transaction_pending.rb +59 -1
- data/lib/wallee-ruby-sdk/models/abstract_webhook_url_update.rb +24 -0
- data/lib/wallee-ruby-sdk/models/account.rb +31 -1
- data/lib/wallee-ruby-sdk/models/account_create.rb +11 -1
- data/lib/wallee-ruby-sdk/models/account_update.rb +11 -1
- data/lib/wallee-ruby-sdk/models/authenticated_card_data.rb +221 -0
- data/lib/wallee-ruby-sdk/models/{unencrypted_card_data.rb → authenticated_card_data_create.rb} +86 -12
- data/lib/wallee-ruby-sdk/models/bank_account.rb +291 -0
- data/lib/wallee-ruby-sdk/models/bank_account_environment.rb +35 -0
- data/lib/wallee-ruby-sdk/models/bank_account_state.rb +37 -0
- data/lib/wallee-ruby-sdk/models/bank_account_type.rb +227 -0
- data/lib/wallee-ruby-sdk/models/bank_transaction.rb +387 -0
- data/lib/wallee-ruby-sdk/models/bank_transaction_flow_direction.rb +35 -0
- data/lib/wallee-ruby-sdk/models/bank_transaction_source.rb +215 -0
- data/lib/wallee-ruby-sdk/models/bank_transaction_state.rb +35 -0
- data/lib/wallee-ruby-sdk/models/bank_transaction_type.rb +215 -0
- data/lib/wallee-ruby-sdk/models/card_authentication_response.rb +38 -0
- data/lib/wallee-ruby-sdk/models/card_authentication_version.rb +35 -0
- data/lib/wallee-ruby-sdk/models/card_cryptogram.rb +201 -0
- data/lib/wallee-ruby-sdk/models/card_cryptogram_create.rb +211 -0
- data/lib/wallee-ruby-sdk/models/card_cryptogram_type.rb +34 -0
- data/lib/wallee-ruby-sdk/models/cardholder_authentication.rb +231 -0
- data/lib/wallee-ruby-sdk/models/cardholder_authentication_create.rb +241 -0
- data/lib/wallee-ruby-sdk/models/charge_attempt.rb +11 -1
- data/lib/wallee-ruby-sdk/models/charge_bank_transaction.rb +291 -0
- data/lib/wallee-ruby-sdk/models/currency_bank_account.rb +241 -0
- data/lib/wallee-ruby-sdk/models/debt_collection_case.rb +1 -1
- data/lib/wallee-ruby-sdk/models/debt_collection_case_create.rb +1 -1
- data/lib/wallee-ruby-sdk/models/external_transfer_bank_transaction.rb +251 -0
- data/lib/wallee-ruby-sdk/models/internal_transfer_bank_transaction.rb +231 -0
- data/lib/wallee-ruby-sdk/models/payment_adjustment.rb +231 -0
- data/lib/wallee-ruby-sdk/models/payment_adjustment_type.rb +215 -0
- data/lib/wallee-ruby-sdk/models/payment_connector_configuration.rb +13 -1
- data/lib/wallee-ruby-sdk/models/payment_contract.rb +1 -25
- data/lib/wallee-ruby-sdk/models/payment_link.rb +16 -40
- data/lib/wallee-ruby-sdk/models/payment_link_active.rb +15 -15
- data/lib/wallee-ruby-sdk/models/payment_link_address_handling_mode.rb +36 -0
- data/lib/wallee-ruby-sdk/models/payment_link_create.rb +16 -44
- data/lib/wallee-ruby-sdk/models/payment_link_update.rb +15 -15
- data/lib/wallee-ruby-sdk/models/payment_terminal.rb +11 -1
- data/lib/wallee-ruby-sdk/models/payment_terminal_address.rb +0 -60
- data/lib/wallee-ruby-sdk/models/payment_terminal_configuration_version.rb +11 -1
- data/lib/wallee-ruby-sdk/models/payment_terminal_location.rb +2 -22
- data/lib/wallee-ruby-sdk/models/payment_terminal_receipt_type.rb +215 -0
- data/lib/wallee-ruby-sdk/models/permission.rb +14 -4
- data/lib/wallee-ruby-sdk/models/recurring_indicator.rb +37 -0
- data/lib/wallee-ruby-sdk/models/refund_bank_transaction.rb +281 -0
- data/lib/wallee-ruby-sdk/models/refund_recovery_bank_transaction.rb +293 -0
- data/lib/wallee-ruby-sdk/models/rendered_terminal_receipt.rb +26 -6
- data/lib/wallee-ruby-sdk/models/role.rb +1 -1
- data/lib/wallee-ruby-sdk/models/role_state.rb +37 -0
- data/lib/wallee-ruby-sdk/models/sales_channel.rb +34 -4
- data/lib/wallee-ruby-sdk/models/shopify_additional_line_item_data.rb +35 -0
- data/lib/wallee-ruby-sdk/models/shopify_integration.rb +73 -31
- data/lib/wallee-ruby-sdk/models/shopify_integration_payment_app_version.rb +34 -0
- data/lib/wallee-ruby-sdk/models/{shopify_integration_app_version.rb → shopify_integration_subscription_app_version.rb} +3 -3
- data/lib/wallee-ruby-sdk/models/shopify_subscriber.rb +1 -1
- data/lib/wallee-ruby-sdk/models/shopify_subscriber_active.rb +241 -0
- data/lib/wallee-ruby-sdk/models/shopify_subscriber_creation.rb +216 -0
- data/lib/wallee-ruby-sdk/models/shopify_subscription.rb +61 -7
- data/lib/wallee-ruby-sdk/models/shopify_subscription_address.rb +0 -60
- data/lib/wallee-ruby-sdk/models/{payment_terminal_contact_address.rb → shopify_subscription_address_create.rb} +152 -2
- data/lib/wallee-ruby-sdk/models/shopify_subscription_creation_request.rb +363 -0
- data/lib/wallee-ruby-sdk/models/shopify_subscription_model_billing_configuration.rb +271 -0
- data/lib/wallee-ruby-sdk/models/{shopify_subscription_edit_model_item.rb → shopify_subscription_model_item.rb} +2 -2
- data/lib/wallee-ruby-sdk/models/{shopify_subscription_edit_model_tax_line.rb → shopify_subscription_model_tax_line.rb} +1 -1
- data/lib/wallee-ruby-sdk/models/shopify_subscription_product_create.rb +9 -14
- data/lib/wallee-ruby-sdk/models/{shopify_subscription_product_active.rb → shopify_subscription_product_update.rb} +2 -12
- data/lib/wallee-ruby-sdk/models/shopify_subscription_update_addresses_request.rb +211 -0
- data/lib/wallee-ruby-sdk/models/shopify_subscription_update_request.rb +11 -81
- data/lib/wallee-ruby-sdk/models/shopify_subscription_version.rb +11 -1
- data/lib/wallee-ruby-sdk/models/space.rb +31 -1
- data/lib/wallee-ruby-sdk/models/space_create.rb +11 -1
- data/lib/wallee-ruby-sdk/models/space_update.rb +11 -1
- data/lib/wallee-ruby-sdk/models/subscriber.rb +1 -1
- data/lib/wallee-ruby-sdk/models/subscriber_create.rb +1 -1
- data/lib/wallee-ruby-sdk/models/subscription.rb +11 -1
- data/lib/wallee-ruby-sdk/models/subscription_affiliate.rb +1 -25
- data/lib/wallee-ruby-sdk/models/subscription_affiliate_create.rb +1 -29
- data/lib/wallee-ruby-sdk/models/subscription_affiliate_deleted.rb +1 -25
- data/lib/wallee-ruby-sdk/models/subscription_affiliate_deleting.rb +1 -25
- data/lib/wallee-ruby-sdk/models/subscription_charge.rb +49 -1
- data/lib/wallee-ruby-sdk/models/subscription_charge_create.rb +49 -1
- data/lib/wallee-ruby-sdk/models/subscription_create_request.rb +1 -1
- data/lib/wallee-ruby-sdk/models/subscription_ledger_entry.rb +12 -2
- data/lib/wallee-ruby-sdk/models/subscription_ledger_entry_create.rb +1 -1
- data/lib/wallee-ruby-sdk/models/subscription_product.rb +11 -1
- data/lib/wallee-ruby-sdk/models/subscription_product_active.rb +11 -1
- data/lib/wallee-ruby-sdk/models/subscription_product_component.rb +1 -1
- data/lib/wallee-ruby-sdk/models/subscription_product_component_update.rb +1 -1
- data/lib/wallee-ruby-sdk/models/subscription_product_create.rb +11 -1
- data/lib/wallee-ruby-sdk/models/subscription_product_version.rb +11 -1
- data/lib/wallee-ruby-sdk/models/subscription_product_version_pending.rb +14 -4
- data/lib/wallee-ruby-sdk/models/subscription_update_request.rb +206 -0
- data/lib/wallee-ruby-sdk/models/tax_calculation.rb +35 -0
- data/lib/wallee-ruby-sdk/models/terminal_receipt_fetch_request.rb +221 -0
- data/lib/wallee-ruby-sdk/models/terminal_receipt_format.rb +35 -0
- data/lib/wallee-ruby-sdk/models/token.rb +1 -25
- data/lib/wallee-ruby-sdk/models/token_create.rb +1 -29
- data/lib/wallee-ruby-sdk/models/tokenized_card_data.rb +211 -0
- data/lib/wallee-ruby-sdk/models/{unencrypted_card_data_create.rb → tokenized_card_data_create.rb} +60 -5
- data/lib/wallee-ruby-sdk/models/transaction.rb +132 -4
- data/lib/wallee-ruby-sdk/models/transaction_completion.rb +26 -1
- data/lib/wallee-ruby-sdk/models/transaction_completion_behavior.rb +36 -0
- data/lib/wallee-ruby-sdk/models/transaction_completion_request.rb +26 -1
- data/lib/wallee-ruby-sdk/models/transaction_create.rb +59 -1
- data/lib/wallee-ruby-sdk/models/transaction_pending.rb +59 -1
- data/lib/wallee-ruby-sdk/models/web_app_confirmation_request.rb +206 -0
- data/lib/wallee-ruby-sdk/models/web_app_confirmation_response.rb +231 -0
- data/lib/wallee-ruby-sdk/models/webhook_url.rb +35 -1
- data/lib/wallee-ruby-sdk/models/webhook_url_create.rb +24 -0
- data/lib/wallee-ruby-sdk/models/webhook_url_update.rb +24 -0
- data/lib/wallee-ruby-sdk/version.rb +1 -1
- data/test/condition_type_service_test.rb +22 -0
- data/wallee-ruby-sdk.gemspec +3 -2
- metadata +93 -17
@@ -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
|
@@ -0,0 +1,206 @@
|
|
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
|
+
#
|
22
|
+
class WebAppConfirmationRequest
|
23
|
+
# The user returns to the web app after granting the permission. The HTTP request contains the code. Provide it here to confirm the web app installation.
|
24
|
+
attr_accessor :code
|
25
|
+
|
26
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
27
|
+
def self.attribute_map
|
28
|
+
{
|
29
|
+
:'code' => :'code'
|
30
|
+
}
|
31
|
+
end
|
32
|
+
|
33
|
+
# Attribute type mapping.
|
34
|
+
def self.swagger_types
|
35
|
+
{
|
36
|
+
:'code' => :'String'
|
37
|
+
}
|
38
|
+
end
|
39
|
+
|
40
|
+
# Initializes the object
|
41
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
42
|
+
def initialize(attributes = {})
|
43
|
+
return unless attributes.is_a?(Hash)
|
44
|
+
|
45
|
+
# convert string to symbol for hash key
|
46
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
47
|
+
|
48
|
+
if attributes.has_key?(:'code')
|
49
|
+
self.code = attributes[:'code']
|
50
|
+
end
|
51
|
+
end
|
52
|
+
|
53
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
54
|
+
# @return Array for valid properties with the reasons
|
55
|
+
def list_invalid_properties
|
56
|
+
invalid_properties = Array.new
|
57
|
+
if !@code.nil? && @code.to_s.length > 100
|
58
|
+
invalid_properties.push('invalid value for "code", the character length must be smaller than or equal to 100.')
|
59
|
+
end
|
60
|
+
|
61
|
+
invalid_properties
|
62
|
+
end
|
63
|
+
|
64
|
+
# Check to see if the all the properties in the model are valid
|
65
|
+
# @return true if the model is valid
|
66
|
+
def valid?
|
67
|
+
return false if !@code.nil? && @code.to_s.length > 100
|
68
|
+
true
|
69
|
+
end
|
70
|
+
|
71
|
+
# Custom attribute writer method with validation
|
72
|
+
# @param [Object] code Value to be assigned
|
73
|
+
def code=(code)
|
74
|
+
if !code.nil? && code.to_s.length > 100
|
75
|
+
fail ArgumentError, 'invalid value for "code", the character length must be smaller than or equal to 100.'
|
76
|
+
end
|
77
|
+
|
78
|
+
@code = code
|
79
|
+
end
|
80
|
+
|
81
|
+
# Checks equality by comparing each attribute.
|
82
|
+
# @param [Object] Object to be compared
|
83
|
+
def ==(o)
|
84
|
+
return true if self.equal?(o)
|
85
|
+
self.class == o.class &&
|
86
|
+
code == o.code
|
87
|
+
end
|
88
|
+
|
89
|
+
# @see the `==` method
|
90
|
+
# @param [Object] Object to be compared
|
91
|
+
def eql?(o)
|
92
|
+
self == o
|
93
|
+
end
|
94
|
+
|
95
|
+
# Calculates hash code according to all attributes.
|
96
|
+
# @return [Fixnum] Hash code
|
97
|
+
def hash
|
98
|
+
[code].hash
|
99
|
+
end
|
100
|
+
|
101
|
+
# Builds the object from hash
|
102
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
103
|
+
# @return [Object] Returns the model itself
|
104
|
+
def build_from_hash(attributes)
|
105
|
+
return nil unless attributes.is_a?(Hash)
|
106
|
+
self.class.swagger_types.each_pair do |key, type|
|
107
|
+
if type =~ /\AArray<(.*)>/i
|
108
|
+
# check to ensure the input is an array given that the attribute
|
109
|
+
# is documented as an array but the input is not
|
110
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
111
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
|
112
|
+
end
|
113
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
114
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
115
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
116
|
+
end
|
117
|
+
|
118
|
+
self
|
119
|
+
end
|
120
|
+
|
121
|
+
# Deserializes the data based on type
|
122
|
+
# @param string type Data type
|
123
|
+
# @param string value Value to be deserialized
|
124
|
+
# @return [Object] Deserialized data
|
125
|
+
def _deserialize(type, value)
|
126
|
+
case type.to_sym
|
127
|
+
when :DateTime
|
128
|
+
DateTime.parse(value)
|
129
|
+
when :Date
|
130
|
+
Date.parse(value)
|
131
|
+
when :String
|
132
|
+
value.to_s
|
133
|
+
when :Integer
|
134
|
+
value.to_i
|
135
|
+
when :Float
|
136
|
+
value.to_f
|
137
|
+
when :BOOLEAN
|
138
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
139
|
+
true
|
140
|
+
else
|
141
|
+
false
|
142
|
+
end
|
143
|
+
when :Object
|
144
|
+
# generic object (usually a Hash), return directly
|
145
|
+
value
|
146
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
147
|
+
inner_type = Regexp.last_match[:inner_type]
|
148
|
+
value.map { |v| _deserialize(inner_type, v) }
|
149
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
150
|
+
k_type = Regexp.last_match[:k_type]
|
151
|
+
v_type = Regexp.last_match[:v_type]
|
152
|
+
{}.tap do |hash|
|
153
|
+
value.each do |k, v|
|
154
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
155
|
+
end
|
156
|
+
end
|
157
|
+
else # model
|
158
|
+
temp_model = Wallee.const_get(type).new
|
159
|
+
temp_model.build_from_hash(value)
|
160
|
+
end
|
161
|
+
end
|
162
|
+
|
163
|
+
# Returns the string representation of the object
|
164
|
+
# @return [String] String presentation of the object
|
165
|
+
def to_s
|
166
|
+
to_hash.to_s
|
167
|
+
end
|
168
|
+
|
169
|
+
# to_body is an alias to to_hash (backward compatibility)
|
170
|
+
# @return [Hash] Returns the object in the form of hash
|
171
|
+
def to_body
|
172
|
+
to_hash
|
173
|
+
end
|
174
|
+
|
175
|
+
# Returns the object in the form of hash
|
176
|
+
# @return [Hash] Returns the object in the form of hash
|
177
|
+
def to_hash
|
178
|
+
hash = {}
|
179
|
+
self.class.attribute_map.each_pair do |attr, param|
|
180
|
+
value = self.send(attr)
|
181
|
+
next if value.nil?
|
182
|
+
hash[param] = _to_hash(value)
|
183
|
+
end
|
184
|
+
hash
|
185
|
+
end
|
186
|
+
|
187
|
+
# Outputs non-array value in the form of hash
|
188
|
+
# For object, use to_hash. Otherwise, just return the value
|
189
|
+
# @param [Object] value Any valid value
|
190
|
+
# @return [Hash] Returns the value in the form of hash
|
191
|
+
def _to_hash(value)
|
192
|
+
if value.is_a?(Array)
|
193
|
+
value.compact.map{ |v| _to_hash(v) }
|
194
|
+
elsif value.is_a?(Hash)
|
195
|
+
{}.tap do |hash|
|
196
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
197
|
+
end
|
198
|
+
elsif value.respond_to? :to_hash
|
199
|
+
value.to_hash
|
200
|
+
else
|
201
|
+
value
|
202
|
+
end
|
203
|
+
end
|
204
|
+
|
205
|
+
end
|
206
|
+
end
|