vrpayment-ruby-sdk 6.3.0 → 6.4.0

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