wallee-ruby-sdk 2.2.3 → 3.0.5

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 (144) 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 +63 -8
  5. data/lib/wallee-ruby-sdk/api/bank_account_service_api.rb +213 -0
  6. data/lib/wallee-ruby-sdk/api/bank_transaction_service_api.rb +213 -0
  7. data/lib/wallee-ruby-sdk/api/charge_bank_transaction_service_api.rb +213 -0
  8. data/lib/wallee-ruby-sdk/api/currency_bank_account_service_api.rb +213 -0
  9. data/lib/wallee-ruby-sdk/api/external_transfer_bank_transaction_service_api.rb +213 -0
  10. data/lib/wallee-ruby-sdk/api/internal_transfer_bank_transaction_service_api.rb +213 -0
  11. data/lib/wallee-ruby-sdk/api/payment_terminal_till_service_api.rb +170 -0
  12. data/lib/wallee-ruby-sdk/api/refund_bank_transaction_service_api.rb +213 -0
  13. data/lib/wallee-ruby-sdk/api/refund_recovery_bank_transaction_service_api.rb +213 -0
  14. data/lib/wallee-ruby-sdk/api/shopify_subscriber_service_api.rb +62 -0
  15. data/lib/wallee-ruby-sdk/api/shopify_subscription_service_api.rb +124 -0
  16. data/lib/wallee-ruby-sdk/api/shopify_transaction_service_api.rb +213 -0
  17. data/lib/wallee-ruby-sdk/api/subscriber_service_api.rb +3 -3
  18. data/lib/wallee-ruby-sdk/api/subscription_service_api.rb +67 -0
  19. data/lib/wallee-ruby-sdk/api/token_service_api.rb +189 -0
  20. data/lib/wallee-ruby-sdk/api/transaction_terminal_service_api.rb +21 -32
  21. data/lib/wallee-ruby-sdk/api/web_app_service_api.rb +200 -0
  22. data/lib/wallee-ruby-sdk/api_client.rb +7 -4
  23. data/lib/wallee-ruby-sdk/configuration.rb +2 -2
  24. data/lib/wallee-ruby-sdk/models/abstract_account_update.rb +11 -1
  25. data/lib/wallee-ruby-sdk/models/abstract_payment_link_update.rb +15 -15
  26. data/lib/wallee-ruby-sdk/models/{abstract_shopify_subscription_product_active.rb → abstract_shopify_subscription_product_update.rb} +2 -12
  27. data/lib/wallee-ruby-sdk/models/abstract_space_update.rb +11 -1
  28. data/lib/wallee-ruby-sdk/models/abstract_subscription_product_active.rb +11 -1
  29. data/lib/wallee-ruby-sdk/models/abstract_transaction_pending.rb +59 -1
  30. data/lib/wallee-ruby-sdk/models/abstract_webhook_url_update.rb +24 -0
  31. data/lib/wallee-ruby-sdk/models/account.rb +31 -1
  32. data/lib/wallee-ruby-sdk/models/account_create.rb +11 -1
  33. data/lib/wallee-ruby-sdk/models/account_update.rb +11 -1
  34. data/lib/wallee-ruby-sdk/models/authenticated_card_data.rb +221 -0
  35. data/lib/wallee-ruby-sdk/models/{unencrypted_card_data.rb → authenticated_card_data_create.rb} +86 -12
  36. data/lib/wallee-ruby-sdk/models/bank_account.rb +291 -0
  37. data/lib/wallee-ruby-sdk/models/bank_account_environment.rb +35 -0
  38. data/lib/wallee-ruby-sdk/models/bank_account_state.rb +37 -0
  39. data/lib/wallee-ruby-sdk/models/bank_account_type.rb +227 -0
  40. data/lib/wallee-ruby-sdk/models/bank_transaction.rb +387 -0
  41. data/lib/wallee-ruby-sdk/models/bank_transaction_flow_direction.rb +35 -0
  42. data/lib/wallee-ruby-sdk/models/bank_transaction_source.rb +215 -0
  43. data/lib/wallee-ruby-sdk/models/bank_transaction_state.rb +35 -0
  44. data/lib/wallee-ruby-sdk/models/bank_transaction_type.rb +215 -0
  45. data/lib/wallee-ruby-sdk/models/card_authentication_response.rb +38 -0
  46. data/lib/wallee-ruby-sdk/models/card_authentication_version.rb +35 -0
  47. data/lib/wallee-ruby-sdk/models/card_cryptogram.rb +201 -0
  48. data/lib/wallee-ruby-sdk/models/card_cryptogram_create.rb +211 -0
  49. data/lib/wallee-ruby-sdk/models/card_cryptogram_type.rb +34 -0
  50. data/lib/wallee-ruby-sdk/models/cardholder_authentication.rb +231 -0
  51. data/lib/wallee-ruby-sdk/models/cardholder_authentication_create.rb +241 -0
  52. data/lib/wallee-ruby-sdk/models/charge_attempt.rb +11 -1
  53. data/lib/wallee-ruby-sdk/models/charge_bank_transaction.rb +291 -0
  54. data/lib/wallee-ruby-sdk/models/currency_bank_account.rb +241 -0
  55. data/lib/wallee-ruby-sdk/models/debt_collection_case.rb +1 -1
  56. data/lib/wallee-ruby-sdk/models/debt_collection_case_create.rb +1 -1
  57. data/lib/wallee-ruby-sdk/models/external_transfer_bank_transaction.rb +251 -0
  58. data/lib/wallee-ruby-sdk/models/internal_transfer_bank_transaction.rb +231 -0
  59. data/lib/wallee-ruby-sdk/models/payment_adjustment.rb +231 -0
  60. data/lib/wallee-ruby-sdk/models/payment_adjustment_type.rb +215 -0
  61. data/lib/wallee-ruby-sdk/models/payment_connector_configuration.rb +13 -1
  62. data/lib/wallee-ruby-sdk/models/payment_contract.rb +1 -25
  63. data/lib/wallee-ruby-sdk/models/payment_link.rb +16 -40
  64. data/lib/wallee-ruby-sdk/models/payment_link_active.rb +15 -15
  65. data/lib/wallee-ruby-sdk/models/payment_link_address_handling_mode.rb +36 -0
  66. data/lib/wallee-ruby-sdk/models/payment_link_create.rb +16 -44
  67. data/lib/wallee-ruby-sdk/models/payment_link_update.rb +15 -15
  68. data/lib/wallee-ruby-sdk/models/payment_terminal.rb +11 -1
  69. data/lib/wallee-ruby-sdk/models/payment_terminal_address.rb +0 -60
  70. data/lib/wallee-ruby-sdk/models/payment_terminal_configuration_version.rb +11 -1
  71. data/lib/wallee-ruby-sdk/models/payment_terminal_location.rb +2 -22
  72. data/lib/wallee-ruby-sdk/models/payment_terminal_receipt_type.rb +215 -0
  73. data/lib/wallee-ruby-sdk/models/permission.rb +14 -4
  74. data/lib/wallee-ruby-sdk/models/recurring_indicator.rb +37 -0
  75. data/lib/wallee-ruby-sdk/models/refund_bank_transaction.rb +281 -0
  76. data/lib/wallee-ruby-sdk/models/refund_recovery_bank_transaction.rb +293 -0
  77. data/lib/wallee-ruby-sdk/models/rendered_terminal_receipt.rb +26 -6
  78. data/lib/wallee-ruby-sdk/models/role.rb +1 -1
  79. data/lib/wallee-ruby-sdk/models/role_state.rb +37 -0
  80. data/lib/wallee-ruby-sdk/models/sales_channel.rb +34 -4
  81. data/lib/wallee-ruby-sdk/models/shopify_additional_line_item_data.rb +35 -0
  82. data/lib/wallee-ruby-sdk/models/shopify_integration.rb +73 -31
  83. data/lib/wallee-ruby-sdk/models/shopify_integration_payment_app_version.rb +34 -0
  84. data/lib/wallee-ruby-sdk/models/{shopify_integration_app_version.rb → shopify_integration_subscription_app_version.rb} +3 -3
  85. data/lib/wallee-ruby-sdk/models/shopify_subscriber.rb +1 -1
  86. data/lib/wallee-ruby-sdk/models/shopify_subscriber_active.rb +241 -0
  87. data/lib/wallee-ruby-sdk/models/shopify_subscriber_creation.rb +216 -0
  88. data/lib/wallee-ruby-sdk/models/shopify_subscription.rb +61 -7
  89. data/lib/wallee-ruby-sdk/models/shopify_subscription_address.rb +0 -60
  90. data/lib/wallee-ruby-sdk/models/{payment_terminal_contact_address.rb → shopify_subscription_address_create.rb} +152 -2
  91. data/lib/wallee-ruby-sdk/models/shopify_subscription_creation_request.rb +363 -0
  92. data/lib/wallee-ruby-sdk/models/shopify_subscription_model_billing_configuration.rb +271 -0
  93. data/lib/wallee-ruby-sdk/models/{shopify_subscription_edit_model_item.rb → shopify_subscription_model_item.rb} +2 -2
  94. data/lib/wallee-ruby-sdk/models/{shopify_subscription_edit_model_tax_line.rb → shopify_subscription_model_tax_line.rb} +1 -1
  95. data/lib/wallee-ruby-sdk/models/shopify_subscription_product_create.rb +9 -14
  96. data/lib/wallee-ruby-sdk/models/{shopify_subscription_product_active.rb → shopify_subscription_product_update.rb} +2 -12
  97. data/lib/wallee-ruby-sdk/models/shopify_subscription_update_addresses_request.rb +211 -0
  98. data/lib/wallee-ruby-sdk/models/shopify_subscription_update_request.rb +11 -81
  99. data/lib/wallee-ruby-sdk/models/shopify_subscription_version.rb +11 -1
  100. data/lib/wallee-ruby-sdk/models/space.rb +31 -1
  101. data/lib/wallee-ruby-sdk/models/space_create.rb +11 -1
  102. data/lib/wallee-ruby-sdk/models/space_update.rb +11 -1
  103. data/lib/wallee-ruby-sdk/models/subscriber.rb +1 -1
  104. data/lib/wallee-ruby-sdk/models/subscriber_create.rb +1 -1
  105. data/lib/wallee-ruby-sdk/models/subscription.rb +11 -1
  106. data/lib/wallee-ruby-sdk/models/subscription_affiliate.rb +1 -25
  107. data/lib/wallee-ruby-sdk/models/subscription_affiliate_create.rb +1 -29
  108. data/lib/wallee-ruby-sdk/models/subscription_affiliate_deleted.rb +1 -25
  109. data/lib/wallee-ruby-sdk/models/subscription_affiliate_deleting.rb +1 -25
  110. data/lib/wallee-ruby-sdk/models/subscription_charge.rb +49 -1
  111. data/lib/wallee-ruby-sdk/models/subscription_charge_create.rb +49 -1
  112. data/lib/wallee-ruby-sdk/models/subscription_create_request.rb +1 -1
  113. data/lib/wallee-ruby-sdk/models/subscription_ledger_entry.rb +12 -2
  114. data/lib/wallee-ruby-sdk/models/subscription_ledger_entry_create.rb +1 -1
  115. data/lib/wallee-ruby-sdk/models/subscription_product.rb +11 -1
  116. data/lib/wallee-ruby-sdk/models/subscription_product_active.rb +11 -1
  117. data/lib/wallee-ruby-sdk/models/subscription_product_component.rb +1 -1
  118. data/lib/wallee-ruby-sdk/models/subscription_product_component_update.rb +1 -1
  119. data/lib/wallee-ruby-sdk/models/subscription_product_create.rb +11 -1
  120. data/lib/wallee-ruby-sdk/models/subscription_product_version.rb +11 -1
  121. data/lib/wallee-ruby-sdk/models/subscription_product_version_pending.rb +14 -4
  122. data/lib/wallee-ruby-sdk/models/subscription_update_request.rb +206 -0
  123. data/lib/wallee-ruby-sdk/models/tax_calculation.rb +35 -0
  124. data/lib/wallee-ruby-sdk/models/terminal_receipt_fetch_request.rb +221 -0
  125. data/lib/wallee-ruby-sdk/models/terminal_receipt_format.rb +35 -0
  126. data/lib/wallee-ruby-sdk/models/token.rb +1 -25
  127. data/lib/wallee-ruby-sdk/models/token_create.rb +1 -29
  128. data/lib/wallee-ruby-sdk/models/tokenized_card_data.rb +211 -0
  129. data/lib/wallee-ruby-sdk/models/{unencrypted_card_data_create.rb → tokenized_card_data_create.rb} +60 -5
  130. data/lib/wallee-ruby-sdk/models/transaction.rb +132 -4
  131. data/lib/wallee-ruby-sdk/models/transaction_completion.rb +26 -1
  132. data/lib/wallee-ruby-sdk/models/transaction_completion_behavior.rb +36 -0
  133. data/lib/wallee-ruby-sdk/models/transaction_completion_request.rb +26 -1
  134. data/lib/wallee-ruby-sdk/models/transaction_create.rb +59 -1
  135. data/lib/wallee-ruby-sdk/models/transaction_pending.rb +59 -1
  136. data/lib/wallee-ruby-sdk/models/web_app_confirmation_request.rb +206 -0
  137. data/lib/wallee-ruby-sdk/models/web_app_confirmation_response.rb +231 -0
  138. data/lib/wallee-ruby-sdk/models/webhook_url.rb +35 -1
  139. data/lib/wallee-ruby-sdk/models/webhook_url_create.rb +24 -0
  140. data/lib/wallee-ruby-sdk/models/webhook_url_update.rb +24 -0
  141. data/lib/wallee-ruby-sdk/version.rb +1 -1
  142. data/test/condition_type_service_test.rb +22 -0
  143. data/wallee-ruby-sdk.gemspec +3 -2
  144. metadata +93 -17
@@ -38,7 +38,7 @@ module Wallee
38
38
  # The created on date indicates the date on which the entity was stored into the database.
39
39
  attr_accessor :created_on
40
40
 
41
- # 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.
41
+ # A client generated nonce which identifies the entity to be created. Subsequent creation requests with the same external ID will not create new entities but return the initially created entity instead.
42
42
  attr_accessor :external_id
43
43
 
44
44
  # The ID is the primary key of the entity. The ID identifies the entity uniquely.
@@ -180,39 +180,15 @@ module Wallee
180
180
  # @return Array for valid properties with the reasons
181
181
  def list_invalid_properties
182
182
  invalid_properties = Array.new
183
- if !@external_id.nil? && @external_id.to_s.length > 100
184
- invalid_properties.push('invalid value for "external_id", the character length must be smaller than or equal to 100.')
185
- end
186
-
187
- if !@external_id.nil? && @external_id.to_s.length < 1
188
- invalid_properties.push('invalid value for "external_id", the character length must be great than or equal to 1.')
189
- end
190
-
191
183
  invalid_properties
192
184
  end
193
185
 
194
186
  # Check to see if the all the properties in the model are valid
195
187
  # @return true if the model is valid
196
188
  def valid?
197
- return false if !@external_id.nil? && @external_id.to_s.length > 100
198
- return false if !@external_id.nil? && @external_id.to_s.length < 1
199
189
  true
200
190
  end
201
191
 
202
- # Custom attribute writer method with validation
203
- # @param [Object] external_id Value to be assigned
204
- def external_id=(external_id)
205
- if !external_id.nil? && external_id.to_s.length > 100
206
- fail ArgumentError, 'invalid value for "external_id", the character length must be smaller than or equal to 100.'
207
- end
208
-
209
- if !external_id.nil? && external_id.to_s.length < 1
210
- fail ArgumentError, 'invalid value for "external_id", the character length must be great than or equal to 1.'
211
- end
212
-
213
- @external_id = external_id
214
- end
215
-
216
192
  # Checks equality by comparing each attribute.
217
193
  # @param [Object] Object to be compared
218
194
  def ==(o)
@@ -32,13 +32,13 @@ module Wallee
32
32
  # The available from date defines the latest date on which the payment link can be used to initialize a transaction. When no date is specified there will be no restriction.
33
33
  attr_accessor :available_until
34
34
 
35
- # By making the billing address required the transaction can only be created when a billing address is provided within the request.
36
- attr_accessor :billing_address_required
35
+ # The billing address handling mode controls if the address is collected or not and how it is collected.
36
+ attr_accessor :billing_address_handling_mode
37
37
 
38
38
  # The currency defines in which currency the payment is executed in. If no currency is defined it has to be specified within the request parameter 'currency'.
39
39
  attr_accessor :currency
40
40
 
41
- # 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.
41
+ # A client generated nonce which identifies the entity to be created. Subsequent creation requests with the same external ID will not create new entities but return the initially created entity instead.
42
42
  attr_accessor :external_id
43
43
 
44
44
  # The ID is the primary key of the entity. The ID identifies the entity uniquely.
@@ -65,8 +65,8 @@ module Wallee
65
65
  # The protection mode determines if the payment link is protected against tampering and in what way.
66
66
  attr_accessor :protection_mode
67
67
 
68
- # By making the shipping address required the transaction can only be created when a shipping address is provided within the request.
69
- attr_accessor :shipping_address_required
68
+ # The shipping address handling mode controls if the address is collected or not and how it is collected.
69
+ attr_accessor :shipping_address_handling_mode
70
70
 
71
71
  #
72
72
  attr_accessor :state
@@ -84,7 +84,7 @@ module Wallee
84
84
  :'applied_space_view' => :'appliedSpaceView',
85
85
  :'available_from' => :'availableFrom',
86
86
  :'available_until' => :'availableUntil',
87
- :'billing_address_required' => :'billingAddressRequired',
87
+ :'billing_address_handling_mode' => :'billingAddressHandlingMode',
88
88
  :'currency' => :'currency',
89
89
  :'external_id' => :'externalId',
90
90
  :'id' => :'id',
@@ -95,7 +95,7 @@ module Wallee
95
95
  :'name' => :'name',
96
96
  :'planned_purge_date' => :'plannedPurgeDate',
97
97
  :'protection_mode' => :'protectionMode',
98
- :'shipping_address_required' => :'shippingAddressRequired',
98
+ :'shipping_address_handling_mode' => :'shippingAddressHandlingMode',
99
99
  :'state' => :'state',
100
100
  :'url' => :'url',
101
101
  :'version' => :'version'
@@ -109,7 +109,7 @@ module Wallee
109
109
  :'applied_space_view' => :'Integer',
110
110
  :'available_from' => :'DateTime',
111
111
  :'available_until' => :'DateTime',
112
- :'billing_address_required' => :'BOOLEAN',
112
+ :'billing_address_handling_mode' => :'PaymentLinkAddressHandlingMode',
113
113
  :'currency' => :'String',
114
114
  :'external_id' => :'String',
115
115
  :'id' => :'Integer',
@@ -120,7 +120,7 @@ module Wallee
120
120
  :'name' => :'String',
121
121
  :'planned_purge_date' => :'DateTime',
122
122
  :'protection_mode' => :'PaymentLinkProtectionMode',
123
- :'shipping_address_required' => :'BOOLEAN',
123
+ :'shipping_address_handling_mode' => :'PaymentLinkAddressHandlingMode',
124
124
  :'state' => :'CreationEntityState',
125
125
  :'url' => :'String',
126
126
  :'version' => :'Integer'
@@ -153,8 +153,8 @@ module Wallee
153
153
  self.available_until = attributes[:'availableUntil']
154
154
  end
155
155
 
156
- if attributes.has_key?(:'billingAddressRequired')
157
- self.billing_address_required = attributes[:'billingAddressRequired']
156
+ if attributes.has_key?(:'billingAddressHandlingMode')
157
+ self.billing_address_handling_mode = attributes[:'billingAddressHandlingMode']
158
158
  end
159
159
 
160
160
  if attributes.has_key?(:'currency')
@@ -199,8 +199,8 @@ module Wallee
199
199
  self.protection_mode = attributes[:'protectionMode']
200
200
  end
201
201
 
202
- if attributes.has_key?(:'shippingAddressRequired')
203
- self.shipping_address_required = attributes[:'shippingAddressRequired']
202
+ if attributes.has_key?(:'shippingAddressHandlingMode')
203
+ self.shipping_address_handling_mode = attributes[:'shippingAddressHandlingMode']
204
204
  end
205
205
 
206
206
  if attributes.has_key?(:'state')
@@ -220,14 +220,6 @@ module Wallee
220
220
  # @return Array for valid properties with the reasons
221
221
  def list_invalid_properties
222
222
  invalid_properties = Array.new
223
- if !@external_id.nil? && @external_id.to_s.length > 100
224
- invalid_properties.push('invalid value for "external_id", the character length must be smaller than or equal to 100.')
225
- end
226
-
227
- if !@external_id.nil? && @external_id.to_s.length < 1
228
- invalid_properties.push('invalid value for "external_id", the character length must be great than or equal to 1.')
229
- end
230
-
231
223
  if !@name.nil? && @name.to_s.length > 100
232
224
  invalid_properties.push('invalid value for "name", the character length must be smaller than or equal to 100.')
233
225
  end
@@ -238,26 +230,10 @@ module Wallee
238
230
  # Check to see if the all the properties in the model are valid
239
231
  # @return true if the model is valid
240
232
  def valid?
241
- return false if !@external_id.nil? && @external_id.to_s.length > 100
242
- return false if !@external_id.nil? && @external_id.to_s.length < 1
243
233
  return false if !@name.nil? && @name.to_s.length > 100
244
234
  true
245
235
  end
246
236
 
247
- # Custom attribute writer method with validation
248
- # @param [Object] external_id Value to be assigned
249
- def external_id=(external_id)
250
- if !external_id.nil? && external_id.to_s.length > 100
251
- fail ArgumentError, 'invalid value for "external_id", the character length must be smaller than or equal to 100.'
252
- end
253
-
254
- if !external_id.nil? && external_id.to_s.length < 1
255
- fail ArgumentError, 'invalid value for "external_id", the character length must be great than or equal to 1.'
256
- end
257
-
258
- @external_id = external_id
259
- end
260
-
261
237
  # Custom attribute writer method with validation
262
238
  # @param [Object] name Value to be assigned
263
239
  def name=(name)
@@ -277,7 +253,7 @@ module Wallee
277
253
  applied_space_view == o.applied_space_view &&
278
254
  available_from == o.available_from &&
279
255
  available_until == o.available_until &&
280
- billing_address_required == o.billing_address_required &&
256
+ billing_address_handling_mode == o.billing_address_handling_mode &&
281
257
  currency == o.currency &&
282
258
  external_id == o.external_id &&
283
259
  id == o.id &&
@@ -288,7 +264,7 @@ module Wallee
288
264
  name == o.name &&
289
265
  planned_purge_date == o.planned_purge_date &&
290
266
  protection_mode == o.protection_mode &&
291
- shipping_address_required == o.shipping_address_required &&
267
+ shipping_address_handling_mode == o.shipping_address_handling_mode &&
292
268
  state == o.state &&
293
269
  url == o.url &&
294
270
  version == o.version
@@ -303,7 +279,7 @@ module Wallee
303
279
  # Calculates hash code according to all attributes.
304
280
  # @return [Fixnum] Hash code
305
281
  def hash
306
- [allowed_payment_method_configurations, applied_space_view, available_from, available_until, billing_address_required, currency, external_id, id, language, line_items, linked_space_id, maximal_number_of_transactions, name, planned_purge_date, protection_mode, shipping_address_required, state, url, version].hash
282
+ [allowed_payment_method_configurations, applied_space_view, available_from, available_until, billing_address_handling_mode, currency, external_id, id, language, line_items, linked_space_id, maximal_number_of_transactions, name, planned_purge_date, protection_mode, shipping_address_handling_mode, state, url, version].hash
307
283
  end
308
284
 
309
285
  # Builds the object from hash
@@ -38,8 +38,8 @@ module Wallee
38
38
  # The available from date defines the latest date on which the payment link can be used to initialize a transaction. When no date is specified there will be no restriction.
39
39
  attr_accessor :available_until
40
40
 
41
- # By making the billing address required the transaction can only be created when a billing address is provided within the request.
42
- attr_accessor :billing_address_required
41
+ # The billing address handling mode controls if the address is collected or not and how it is collected.
42
+ attr_accessor :billing_address_handling_mode
43
43
 
44
44
  # The currency defines in which currency the payment is executed in. If no currency is defined it has to be specified within the request parameter 'currency'.
45
45
  attr_accessor :currency
@@ -56,8 +56,8 @@ module Wallee
56
56
  # The payment link name is used internally to identify the payment link. For example the name is used within search fields and hence it should be distinct and descriptive.
57
57
  attr_accessor :name
58
58
 
59
- # By making the shipping address required the transaction can only be created when a shipping address is provided within the request.
60
- attr_accessor :shipping_address_required
59
+ # The shipping address handling mode controls if the address is collected or not and how it is collected.
60
+ attr_accessor :shipping_address_handling_mode
61
61
 
62
62
  #
63
63
  attr_accessor :state
@@ -71,13 +71,13 @@ module Wallee
71
71
  :'applied_space_view' => :'appliedSpaceView',
72
72
  :'available_from' => :'availableFrom',
73
73
  :'available_until' => :'availableUntil',
74
- :'billing_address_required' => :'billingAddressRequired',
74
+ :'billing_address_handling_mode' => :'billingAddressHandlingMode',
75
75
  :'currency' => :'currency',
76
76
  :'language' => :'language',
77
77
  :'line_items' => :'lineItems',
78
78
  :'maximal_number_of_transactions' => :'maximalNumberOfTransactions',
79
79
  :'name' => :'name',
80
- :'shipping_address_required' => :'shippingAddressRequired',
80
+ :'shipping_address_handling_mode' => :'shippingAddressHandlingMode',
81
81
  :'state' => :'state'
82
82
  }
83
83
  end
@@ -91,13 +91,13 @@ module Wallee
91
91
  :'applied_space_view' => :'Integer',
92
92
  :'available_from' => :'DateTime',
93
93
  :'available_until' => :'DateTime',
94
- :'billing_address_required' => :'BOOLEAN',
94
+ :'billing_address_handling_mode' => :'PaymentLinkAddressHandlingMode',
95
95
  :'currency' => :'String',
96
96
  :'language' => :'String',
97
97
  :'line_items' => :'Array<LineItemCreate>',
98
98
  :'maximal_number_of_transactions' => :'Integer',
99
99
  :'name' => :'String',
100
- :'shipping_address_required' => :'BOOLEAN',
100
+ :'shipping_address_handling_mode' => :'PaymentLinkAddressHandlingMode',
101
101
  :'state' => :'CreationEntityState'
102
102
  }
103
103
  end
@@ -136,8 +136,8 @@ module Wallee
136
136
  self.available_until = attributes[:'availableUntil']
137
137
  end
138
138
 
139
- if attributes.has_key?(:'billingAddressRequired')
140
- self.billing_address_required = attributes[:'billingAddressRequired']
139
+ if attributes.has_key?(:'billingAddressHandlingMode')
140
+ self.billing_address_handling_mode = attributes[:'billingAddressHandlingMode']
141
141
  end
142
142
 
143
143
  if attributes.has_key?(:'currency')
@@ -162,8 +162,8 @@ module Wallee
162
162
  self.name = attributes[:'name']
163
163
  end
164
164
 
165
- if attributes.has_key?(:'shippingAddressRequired')
166
- self.shipping_address_required = attributes[:'shippingAddressRequired']
165
+ if attributes.has_key?(:'shippingAddressHandlingMode')
166
+ self.shipping_address_handling_mode = attributes[:'shippingAddressHandlingMode']
167
167
  end
168
168
 
169
169
  if attributes.has_key?(:'state')
@@ -220,13 +220,13 @@ module Wallee
220
220
  applied_space_view == o.applied_space_view &&
221
221
  available_from == o.available_from &&
222
222
  available_until == o.available_until &&
223
- billing_address_required == o.billing_address_required &&
223
+ billing_address_handling_mode == o.billing_address_handling_mode &&
224
224
  currency == o.currency &&
225
225
  language == o.language &&
226
226
  line_items == o.line_items &&
227
227
  maximal_number_of_transactions == o.maximal_number_of_transactions &&
228
228
  name == o.name &&
229
- shipping_address_required == o.shipping_address_required &&
229
+ shipping_address_handling_mode == o.shipping_address_handling_mode &&
230
230
  state == o.state
231
231
  end
232
232
 
@@ -239,7 +239,7 @@ module Wallee
239
239
  # Calculates hash code according to all attributes.
240
240
  # @return [Fixnum] Hash code
241
241
  def hash
242
- [id, version, allowed_payment_method_configurations, applied_space_view, available_from, available_until, billing_address_required, currency, language, line_items, maximal_number_of_transactions, name, shipping_address_required, state].hash
242
+ [id, version, allowed_payment_method_configurations, applied_space_view, available_from, available_until, billing_address_handling_mode, currency, language, line_items, maximal_number_of_transactions, name, shipping_address_handling_mode, state].hash
243
243
  end
244
244
 
245
245
  # 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 PaymentLinkAddressHandlingMode
22
+
23
+ NOT_REQUIRED = 'NOT_REQUIRED'.freeze
24
+ REQUIRED_IN_URL = 'REQUIRED_IN_URL'.freeze
25
+ REQUIRED_ON_PAYMENT_PAGE = 'REQUIRED_ON_PAYMENT_PAGE'.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 = PaymentLinkAddressHandlingMode.constants.select { |c| PaymentLinkAddressHandlingMode::const_get(c) == value }
32
+ raise "Invalid ENUM value #{value} for class #PaymentLinkAddressHandlingMode" if constantValues.empty?
33
+ value
34
+ end
35
+ end
36
+ end
@@ -32,8 +32,8 @@ module Wallee
32
32
  # The available from date defines the latest date on which the payment link can be used to initialize a transaction. When no date is specified there will be no restriction.
33
33
  attr_accessor :available_until
34
34
 
35
- # By making the billing address required the transaction can only be created when a billing address is provided within the request.
36
- attr_accessor :billing_address_required
35
+ # The billing address handling mode controls if the address is collected or not and how it is collected.
36
+ attr_accessor :billing_address_handling_mode
37
37
 
38
38
  # The currency defines in which currency the payment is executed in. If no currency is defined it has to be specified within the request parameter 'currency'.
39
39
  attr_accessor :currency
@@ -50,13 +50,13 @@ module Wallee
50
50
  # The payment link name is used internally to identify the payment link. For example the name is used within search fields and hence it should be distinct and descriptive.
51
51
  attr_accessor :name
52
52
 
53
- # By making the shipping address required the transaction can only be created when a shipping address is provided within the request.
54
- attr_accessor :shipping_address_required
53
+ # The shipping address handling mode controls if the address is collected or not and how it is collected.
54
+ attr_accessor :shipping_address_handling_mode
55
55
 
56
56
  #
57
57
  attr_accessor :state
58
58
 
59
- # 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.
59
+ # A client generated nonce which identifies the entity to be created. Subsequent creation requests with the same external ID will not create new entities but return the initially created entity instead.
60
60
  attr_accessor :external_id
61
61
 
62
62
  # The protection mode determines if the payment link is protected against tampering and in what way.
@@ -69,13 +69,13 @@ module Wallee
69
69
  :'applied_space_view' => :'appliedSpaceView',
70
70
  :'available_from' => :'availableFrom',
71
71
  :'available_until' => :'availableUntil',
72
- :'billing_address_required' => :'billingAddressRequired',
72
+ :'billing_address_handling_mode' => :'billingAddressHandlingMode',
73
73
  :'currency' => :'currency',
74
74
  :'language' => :'language',
75
75
  :'line_items' => :'lineItems',
76
76
  :'maximal_number_of_transactions' => :'maximalNumberOfTransactions',
77
77
  :'name' => :'name',
78
- :'shipping_address_required' => :'shippingAddressRequired',
78
+ :'shipping_address_handling_mode' => :'shippingAddressHandlingMode',
79
79
  :'state' => :'state',
80
80
  :'external_id' => :'externalId',
81
81
  :'protection_mode' => :'protectionMode'
@@ -89,13 +89,13 @@ module Wallee
89
89
  :'applied_space_view' => :'Integer',
90
90
  :'available_from' => :'DateTime',
91
91
  :'available_until' => :'DateTime',
92
- :'billing_address_required' => :'BOOLEAN',
92
+ :'billing_address_handling_mode' => :'PaymentLinkAddressHandlingMode',
93
93
  :'currency' => :'String',
94
94
  :'language' => :'String',
95
95
  :'line_items' => :'Array<LineItemCreate>',
96
96
  :'maximal_number_of_transactions' => :'Integer',
97
97
  :'name' => :'String',
98
- :'shipping_address_required' => :'BOOLEAN',
98
+ :'shipping_address_handling_mode' => :'PaymentLinkAddressHandlingMode',
99
99
  :'state' => :'CreationEntityState',
100
100
  :'external_id' => :'String',
101
101
  :'protection_mode' => :'PaymentLinkProtectionMode'
@@ -128,8 +128,8 @@ module Wallee
128
128
  self.available_until = attributes[:'availableUntil']
129
129
  end
130
130
 
131
- if attributes.has_key?(:'billingAddressRequired')
132
- self.billing_address_required = attributes[:'billingAddressRequired']
131
+ if attributes.has_key?(:'billingAddressHandlingMode')
132
+ self.billing_address_handling_mode = attributes[:'billingAddressHandlingMode']
133
133
  end
134
134
 
135
135
  if attributes.has_key?(:'currency')
@@ -154,8 +154,8 @@ module Wallee
154
154
  self.name = attributes[:'name']
155
155
  end
156
156
 
157
- if attributes.has_key?(:'shippingAddressRequired')
158
- self.shipping_address_required = attributes[:'shippingAddressRequired']
157
+ if attributes.has_key?(:'shippingAddressHandlingMode')
158
+ self.shipping_address_handling_mode = attributes[:'shippingAddressHandlingMode']
159
159
  end
160
160
 
161
161
  if attributes.has_key?(:'state')
@@ -183,14 +183,6 @@ module Wallee
183
183
  invalid_properties.push('invalid value for "external_id", external_id cannot be nil.')
184
184
  end
185
185
 
186
- if @external_id.to_s.length > 100
187
- invalid_properties.push('invalid value for "external_id", the character length must be smaller than or equal to 100.')
188
- end
189
-
190
- if @external_id.to_s.length < 1
191
- invalid_properties.push('invalid value for "external_id", the character length must be great than or equal to 1.')
192
- end
193
-
194
186
  invalid_properties
195
187
  end
196
188
 
@@ -199,8 +191,6 @@ module Wallee
199
191
  def valid?
200
192
  return false if !@name.nil? && @name.to_s.length > 100
201
193
  return false if @external_id.nil?
202
- return false if @external_id.to_s.length > 100
203
- return false if @external_id.to_s.length < 1
204
194
  true
205
195
  end
206
196
 
@@ -214,24 +204,6 @@ module Wallee
214
204
  @name = name
215
205
  end
216
206
 
217
- # Custom attribute writer method with validation
218
- # @param [Object] external_id Value to be assigned
219
- def external_id=(external_id)
220
- if external_id.nil?
221
- fail ArgumentError, 'external_id cannot be nil'
222
- end
223
-
224
- if external_id.to_s.length > 100
225
- fail ArgumentError, 'invalid value for "external_id", the character length must be smaller than or equal to 100.'
226
- end
227
-
228
- if external_id.to_s.length < 1
229
- fail ArgumentError, 'invalid value for "external_id", the character length must be great than or equal to 1.'
230
- end
231
-
232
- @external_id = external_id
233
- end
234
-
235
207
  # Checks equality by comparing each attribute.
236
208
  # @param [Object] Object to be compared
237
209
  def ==(o)
@@ -241,13 +213,13 @@ module Wallee
241
213
  applied_space_view == o.applied_space_view &&
242
214
  available_from == o.available_from &&
243
215
  available_until == o.available_until &&
244
- billing_address_required == o.billing_address_required &&
216
+ billing_address_handling_mode == o.billing_address_handling_mode &&
245
217
  currency == o.currency &&
246
218
  language == o.language &&
247
219
  line_items == o.line_items &&
248
220
  maximal_number_of_transactions == o.maximal_number_of_transactions &&
249
221
  name == o.name &&
250
- shipping_address_required == o.shipping_address_required &&
222
+ shipping_address_handling_mode == o.shipping_address_handling_mode &&
251
223
  state == o.state &&
252
224
  external_id == o.external_id &&
253
225
  protection_mode == o.protection_mode
@@ -262,7 +234,7 @@ module Wallee
262
234
  # Calculates hash code according to all attributes.
263
235
  # @return [Fixnum] Hash code
264
236
  def hash
265
- [allowed_payment_method_configurations, applied_space_view, available_from, available_until, billing_address_required, currency, language, line_items, maximal_number_of_transactions, name, shipping_address_required, state, external_id, protection_mode].hash
237
+ [allowed_payment_method_configurations, applied_space_view, available_from, available_until, billing_address_handling_mode, currency, language, line_items, maximal_number_of_transactions, name, shipping_address_handling_mode, state, external_id, protection_mode].hash
266
238
  end
267
239
 
268
240
  # Builds the object from hash