wallee-ruby-sdk 2.2.4 → 3.0.6

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