wallee-ruby-sdk 2.2.5 → 3.0.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 (42) hide show
  1. checksums.yaml +4 -4
  2. data/lib/wallee-ruby-sdk.rb +22 -2
  3. data/lib/wallee-ruby-sdk/api/bank_account_service_api.rb +213 -0
  4. data/lib/wallee-ruby-sdk/api/bank_transaction_service_api.rb +213 -0
  5. data/lib/wallee-ruby-sdk/api/currency_bank_account_service_api.rb +213 -0
  6. data/lib/wallee-ruby-sdk/api/payment_terminal_till_service_api.rb +71 -0
  7. data/lib/wallee-ruby-sdk/api/shopify_subscriber_service_api.rb +62 -0
  8. data/lib/wallee-ruby-sdk/api/transaction_terminal_service_api.rb +21 -32
  9. data/lib/wallee-ruby-sdk/api/web_app_service_api.rb +200 -0
  10. data/lib/wallee-ruby-sdk/models/authenticated_card_data.rb +221 -0
  11. data/lib/wallee-ruby-sdk/models/{unencrypted_card_data.rb → authenticated_card_data_create.rb} +86 -12
  12. data/lib/wallee-ruby-sdk/models/card_authentication_response.rb +38 -0
  13. data/lib/wallee-ruby-sdk/models/card_authentication_version.rb +35 -0
  14. data/lib/wallee-ruby-sdk/models/card_cryptogram.rb +201 -0
  15. data/lib/wallee-ruby-sdk/models/card_cryptogram_create.rb +211 -0
  16. data/lib/wallee-ruby-sdk/models/card_cryptogram_type.rb +34 -0
  17. data/lib/wallee-ruby-sdk/models/cardholder_authentication.rb +231 -0
  18. data/lib/wallee-ruby-sdk/models/cardholder_authentication_create.rb +241 -0
  19. data/lib/wallee-ruby-sdk/models/charge_bank_transaction.rb +1 -1
  20. data/lib/wallee-ruby-sdk/models/payment_terminal.rb +11 -1
  21. data/lib/wallee-ruby-sdk/models/payment_terminal_configuration_version.rb +11 -1
  22. data/lib/wallee-ruby-sdk/models/payment_terminal_receipt_type.rb +215 -0
  23. data/lib/wallee-ruby-sdk/models/permission.rb +14 -4
  24. data/lib/wallee-ruby-sdk/models/recurring_indicator.rb +37 -0
  25. data/lib/wallee-ruby-sdk/models/refund_bank_transaction.rb +1 -1
  26. data/lib/wallee-ruby-sdk/models/refund_recovery_bank_transaction.rb +1 -1
  27. data/lib/wallee-ruby-sdk/models/rendered_terminal_receipt.rb +26 -6
  28. data/lib/wallee-ruby-sdk/models/shopify_subscriber_active.rb +241 -0
  29. data/lib/wallee-ruby-sdk/models/shopify_subscription.rb +11 -1
  30. data/lib/wallee-ruby-sdk/models/shopify_subscription_creation_request.rb +11 -1
  31. data/lib/wallee-ruby-sdk/models/subscription_product_component.rb +1 -1
  32. data/lib/wallee-ruby-sdk/models/subscription_product_component_update.rb +1 -1
  33. data/lib/wallee-ruby-sdk/models/tax_calculation.rb +2 -2
  34. data/lib/wallee-ruby-sdk/models/terminal_receipt_fetch_request.rb +221 -0
  35. data/lib/wallee-ruby-sdk/models/terminal_receipt_format.rb +35 -0
  36. data/lib/wallee-ruby-sdk/models/tokenized_card_data.rb +211 -0
  37. data/lib/wallee-ruby-sdk/models/{unencrypted_card_data_create.rb → tokenized_card_data_create.rb} +60 -5
  38. data/lib/wallee-ruby-sdk/models/web_app_confirmation_request.rb +206 -0
  39. data/lib/wallee-ruby-sdk/models/web_app_confirmation_response.rb +231 -0
  40. data/lib/wallee-ruby-sdk/models/webhook_url.rb +11 -1
  41. data/lib/wallee-ruby-sdk/version.rb +1 -1
  42. metadata +24 -4
@@ -0,0 +1,231 @@
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
+ # The confirmation response provides the details about the installation of the web app.
22
+ class WebAppConfirmationResponse
23
+ # The access code grants permissions to the web service API according to the OAuth standard.
24
+ attr_accessor :access_token
25
+
26
+ # The scope contains the permissions granted to the web app within the space.
27
+ attr_accessor :scope
28
+
29
+ # This is the space into which the web app is installed into.
30
+ attr_accessor :space
31
+
32
+ # The state contains the state parameter content provided when initiating the app installation.
33
+ attr_accessor :state
34
+
35
+ # The token type indicates the type of the access token. The type determines the authentication mechanism to use for accessing the web service API.
36
+ attr_accessor :token_type
37
+
38
+ # Attribute mapping from ruby-style variable name to JSON key.
39
+ def self.attribute_map
40
+ {
41
+ :'access_token' => :'access_token',
42
+ :'scope' => :'scope',
43
+ :'space' => :'space',
44
+ :'state' => :'state',
45
+ :'token_type' => :'token_type'
46
+ }
47
+ end
48
+
49
+ # Attribute type mapping.
50
+ def self.swagger_types
51
+ {
52
+ :'access_token' => :'String',
53
+ :'scope' => :'String',
54
+ :'space' => :'Space',
55
+ :'state' => :'String',
56
+ :'token_type' => :'String'
57
+ }
58
+ end
59
+
60
+ # Initializes the object
61
+ # @param [Hash] attributes Model attributes in the form of hash
62
+ def initialize(attributes = {})
63
+ return unless attributes.is_a?(Hash)
64
+
65
+ # convert string to symbol for hash key
66
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
67
+
68
+ if attributes.has_key?(:'access_token')
69
+ self.access_token = attributes[:'access_token']
70
+ end
71
+
72
+ if attributes.has_key?(:'scope')
73
+ self.scope = attributes[:'scope']
74
+ end
75
+
76
+ if attributes.has_key?(:'space')
77
+ self.space = attributes[:'space']
78
+ end
79
+
80
+ if attributes.has_key?(:'state')
81
+ self.state = attributes[:'state']
82
+ end
83
+
84
+ if attributes.has_key?(:'token_type')
85
+ self.token_type = attributes[:'token_type']
86
+ end
87
+ end
88
+
89
+ # Show invalid properties with the reasons. Usually used together with valid?
90
+ # @return Array for valid properties with the reasons
91
+ def list_invalid_properties
92
+ invalid_properties = Array.new
93
+ invalid_properties
94
+ end
95
+
96
+ # Check to see if the all the properties in the model are valid
97
+ # @return true if the model is valid
98
+ def valid?
99
+ true
100
+ end
101
+
102
+ # Checks equality by comparing each attribute.
103
+ # @param [Object] Object to be compared
104
+ def ==(o)
105
+ return true if self.equal?(o)
106
+ self.class == o.class &&
107
+ access_token == o.access_token &&
108
+ scope == o.scope &&
109
+ space == o.space &&
110
+ state == o.state &&
111
+ token_type == o.token_type
112
+ end
113
+
114
+ # @see the `==` method
115
+ # @param [Object] Object to be compared
116
+ def eql?(o)
117
+ self == o
118
+ end
119
+
120
+ # Calculates hash code according to all attributes.
121
+ # @return [Fixnum] Hash code
122
+ def hash
123
+ [access_token, scope, space, state, token_type].hash
124
+ end
125
+
126
+ # Builds the object from hash
127
+ # @param [Hash] attributes Model attributes in the form of hash
128
+ # @return [Object] Returns the model itself
129
+ def build_from_hash(attributes)
130
+ return nil unless attributes.is_a?(Hash)
131
+ self.class.swagger_types.each_pair do |key, type|
132
+ if type =~ /\AArray<(.*)>/i
133
+ # check to ensure the input is an array given that the attribute
134
+ # is documented as an array but the input is not
135
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
136
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
137
+ end
138
+ elsif !attributes[self.class.attribute_map[key]].nil?
139
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
140
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
141
+ end
142
+
143
+ self
144
+ end
145
+
146
+ # Deserializes the data based on type
147
+ # @param string type Data type
148
+ # @param string value Value to be deserialized
149
+ # @return [Object] Deserialized data
150
+ def _deserialize(type, value)
151
+ case type.to_sym
152
+ when :DateTime
153
+ DateTime.parse(value)
154
+ when :Date
155
+ Date.parse(value)
156
+ when :String
157
+ value.to_s
158
+ when :Integer
159
+ value.to_i
160
+ when :Float
161
+ value.to_f
162
+ when :BOOLEAN
163
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
164
+ true
165
+ else
166
+ false
167
+ end
168
+ when :Object
169
+ # generic object (usually a Hash), return directly
170
+ value
171
+ when /\AArray<(?<inner_type>.+)>\z/
172
+ inner_type = Regexp.last_match[:inner_type]
173
+ value.map { |v| _deserialize(inner_type, v) }
174
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
175
+ k_type = Regexp.last_match[:k_type]
176
+ v_type = Regexp.last_match[:v_type]
177
+ {}.tap do |hash|
178
+ value.each do |k, v|
179
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
180
+ end
181
+ end
182
+ else # model
183
+ temp_model = Wallee.const_get(type).new
184
+ temp_model.build_from_hash(value)
185
+ end
186
+ end
187
+
188
+ # Returns the string representation of the object
189
+ # @return [String] String presentation of the object
190
+ def to_s
191
+ to_hash.to_s
192
+ end
193
+
194
+ # to_body is an alias to to_hash (backward compatibility)
195
+ # @return [Hash] Returns the object in the form of hash
196
+ def to_body
197
+ to_hash
198
+ end
199
+
200
+ # Returns the object in the form of hash
201
+ # @return [Hash] Returns the object in the form of hash
202
+ def to_hash
203
+ hash = {}
204
+ self.class.attribute_map.each_pair do |attr, param|
205
+ value = self.send(attr)
206
+ next if value.nil?
207
+ hash[param] = _to_hash(value)
208
+ end
209
+ hash
210
+ end
211
+
212
+ # Outputs non-array value in the form of hash
213
+ # For object, use to_hash. Otherwise, just return the value
214
+ # @param [Object] value Any valid value
215
+ # @return [Hash] Returns the value in the form of hash
216
+ def _to_hash(value)
217
+ if value.is_a?(Array)
218
+ value.compact.map{ |v| _to_hash(v) }
219
+ elsif value.is_a?(Hash)
220
+ {}.tap do |hash|
221
+ value.each { |k, v| hash[k] = _to_hash(v) }
222
+ end
223
+ elsif value.respond_to? :to_hash
224
+ value.to_hash
225
+ else
226
+ value
227
+ end
228
+ end
229
+
230
+ end
231
+ end
@@ -20,6 +20,9 @@ require 'date'
20
20
  module Wallee
21
21
  #
22
22
  class WebhookUrl
23
+ # The webhook URL is managed by the application and cannot be changed via the user interface.
24
+ attr_accessor :application_managed
25
+
23
26
  # The ID is the primary key of the entity. The ID identifies the entity uniquely.
24
27
  attr_accessor :id
25
28
 
@@ -44,6 +47,7 @@ module Wallee
44
47
  # Attribute mapping from ruby-style variable name to JSON key.
45
48
  def self.attribute_map
46
49
  {
50
+ :'application_managed' => :'applicationManaged',
47
51
  :'id' => :'id',
48
52
  :'linked_space_id' => :'linkedSpaceId',
49
53
  :'name' => :'name',
@@ -57,6 +61,7 @@ module Wallee
57
61
  # Attribute type mapping.
58
62
  def self.swagger_types
59
63
  {
64
+ :'application_managed' => :'BOOLEAN',
60
65
  :'id' => :'Integer',
61
66
  :'linked_space_id' => :'Integer',
62
67
  :'name' => :'String',
@@ -75,6 +80,10 @@ module Wallee
75
80
  # convert string to symbol for hash key
76
81
  attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
77
82
 
83
+ if attributes.has_key?(:'applicationManaged')
84
+ self.application_managed = attributes[:'applicationManaged']
85
+ end
86
+
78
87
  if attributes.has_key?(:'id')
79
88
  self.id = attributes[:'id']
80
89
  end
@@ -161,6 +170,7 @@ module Wallee
161
170
  def ==(o)
162
171
  return true if self.equal?(o)
163
172
  self.class == o.class &&
173
+ application_managed == o.application_managed &&
164
174
  id == o.id &&
165
175
  linked_space_id == o.linked_space_id &&
166
176
  name == o.name &&
@@ -179,7 +189,7 @@ module Wallee
179
189
  # Calculates hash code according to all attributes.
180
190
  # @return [Fixnum] Hash code
181
191
  def hash
182
- [id, linked_space_id, name, planned_purge_date, state, url, version].hash
192
+ [application_managed, id, linked_space_id, name, planned_purge_date, state, url, version].hash
183
193
  end
184
194
 
185
195
  # Builds the object from hash
@@ -16,5 +16,5 @@ limitations under the License.
16
16
  =end
17
17
 
18
18
  module Wallee
19
- VERSION = '2.2.5'
19
+ VERSION = '3.0.0'
20
20
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wallee-ruby-sdk
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.5
4
+ version: 3.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - wallee AG
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-01-19 00:00:00.000000000 Z
11
+ date: 2021-04-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: typhoeus
@@ -84,6 +84,8 @@ files:
84
84
  - lib/wallee-ruby-sdk.rb
85
85
  - lib/wallee-ruby-sdk/api/account_service_api.rb
86
86
  - lib/wallee-ruby-sdk/api/application_user_service_api.rb
87
+ - lib/wallee-ruby-sdk/api/bank_account_service_api.rb
88
+ - lib/wallee-ruby-sdk/api/bank_transaction_service_api.rb
87
89
  - lib/wallee-ruby-sdk/api/card_processing_service_api.rb
88
90
  - lib/wallee-ruby-sdk/api/charge_attempt_service_api.rb
89
91
  - lib/wallee-ruby-sdk/api/charge_bank_transaction_service_api.rb
@@ -93,6 +95,7 @@ files:
93
95
  - lib/wallee-ruby-sdk/api/condition_type_service_api.rb
94
96
  - lib/wallee-ruby-sdk/api/country_service_api.rb
95
97
  - lib/wallee-ruby-sdk/api/country_state_service_api.rb
98
+ - lib/wallee-ruby-sdk/api/currency_bank_account_service_api.rb
96
99
  - lib/wallee-ruby-sdk/api/currency_service_api.rb
97
100
  - lib/wallee-ruby-sdk/api/customer_address_service_api.rb
98
101
  - lib/wallee-ruby-sdk/api/customer_comment_service_api.rb
@@ -176,6 +179,7 @@ files:
176
179
  - lib/wallee-ruby-sdk/api/transaction_void_service_api.rb
177
180
  - lib/wallee-ruby-sdk/api/user_account_role_service_api.rb
178
181
  - lib/wallee-ruby-sdk/api/user_space_role_service_api.rb
182
+ - lib/wallee-ruby-sdk/api/web_app_service_api.rb
179
183
  - lib/wallee-ruby-sdk/api/webhook_listener_service_api.rb
180
184
  - lib/wallee-ruby-sdk/api/webhook_url_service_api.rb
181
185
  - lib/wallee-ruby-sdk/api_client.rb
@@ -213,6 +217,8 @@ files:
213
217
  - lib/wallee-ruby-sdk/models/application_user_create.rb
214
218
  - lib/wallee-ruby-sdk/models/application_user_create_with_mac_key.rb
215
219
  - lib/wallee-ruby-sdk/models/application_user_update.rb
220
+ - lib/wallee-ruby-sdk/models/authenticated_card_data.rb
221
+ - lib/wallee-ruby-sdk/models/authenticated_card_data_create.rb
216
222
  - lib/wallee-ruby-sdk/models/bank_account.rb
217
223
  - lib/wallee-ruby-sdk/models/bank_account_environment.rb
218
224
  - lib/wallee-ruby-sdk/models/bank_account_state.rb
@@ -222,6 +228,13 @@ files:
222
228
  - lib/wallee-ruby-sdk/models/bank_transaction_source.rb
223
229
  - lib/wallee-ruby-sdk/models/bank_transaction_state.rb
224
230
  - lib/wallee-ruby-sdk/models/bank_transaction_type.rb
231
+ - lib/wallee-ruby-sdk/models/card_authentication_response.rb
232
+ - lib/wallee-ruby-sdk/models/card_authentication_version.rb
233
+ - lib/wallee-ruby-sdk/models/card_cryptogram.rb
234
+ - lib/wallee-ruby-sdk/models/card_cryptogram_create.rb
235
+ - lib/wallee-ruby-sdk/models/card_cryptogram_type.rb
236
+ - lib/wallee-ruby-sdk/models/cardholder_authentication.rb
237
+ - lib/wallee-ruby-sdk/models/cardholder_authentication_create.rb
225
238
  - lib/wallee-ruby-sdk/models/charge.rb
226
239
  - lib/wallee-ruby-sdk/models/charge_attempt.rb
227
240
  - lib/wallee-ruby-sdk/models/charge_attempt_environment.rb
@@ -361,6 +374,7 @@ files:
361
374
  - lib/wallee-ruby-sdk/models/payment_terminal_location_state.rb
362
375
  - lib/wallee-ruby-sdk/models/payment_terminal_location_version.rb
363
376
  - lib/wallee-ruby-sdk/models/payment_terminal_location_version_state.rb
377
+ - lib/wallee-ruby-sdk/models/payment_terminal_receipt_type.rb
364
378
  - lib/wallee-ruby-sdk/models/payment_terminal_state.rb
365
379
  - lib/wallee-ruby-sdk/models/payment_terminal_type.rb
366
380
  - lib/wallee-ruby-sdk/models/permission.rb
@@ -376,6 +390,7 @@ files:
376
390
  - lib/wallee-ruby-sdk/models/product_period_fee_update.rb
377
391
  - lib/wallee-ruby-sdk/models/product_setup_fee.rb
378
392
  - lib/wallee-ruby-sdk/models/product_setup_fee_update.rb
393
+ - lib/wallee-ruby-sdk/models/recurring_indicator.rb
379
394
  - lib/wallee-ruby-sdk/models/refund.rb
380
395
  - lib/wallee-ruby-sdk/models/refund_bank_transaction.rb
381
396
  - lib/wallee-ruby-sdk/models/refund_comment.rb
@@ -407,6 +422,7 @@ files:
407
422
  - lib/wallee-ruby-sdk/models/shopify_recurring_order_state.rb
408
423
  - lib/wallee-ruby-sdk/models/shopify_recurring_order_update_request.rb
409
424
  - lib/wallee-ruby-sdk/models/shopify_subscriber.rb
425
+ - lib/wallee-ruby-sdk/models/shopify_subscriber_active.rb
410
426
  - lib/wallee-ruby-sdk/models/shopify_subscriber_creation.rb
411
427
  - lib/wallee-ruby-sdk/models/shopify_subscriber_state.rb
412
428
  - lib/wallee-ruby-sdk/models/shopify_subscription.rb
@@ -513,6 +529,8 @@ files:
513
529
  - lib/wallee-ruby-sdk/models/tax_class.rb
514
530
  - lib/wallee-ruby-sdk/models/tax_create.rb
515
531
  - lib/wallee-ruby-sdk/models/tenant_database.rb
532
+ - lib/wallee-ruby-sdk/models/terminal_receipt_fetch_request.rb
533
+ - lib/wallee-ruby-sdk/models/terminal_receipt_format.rb
516
534
  - lib/wallee-ruby-sdk/models/token.rb
517
535
  - lib/wallee-ruby-sdk/models/token_create.rb
518
536
  - lib/wallee-ruby-sdk/models/token_update.rb
@@ -520,6 +538,8 @@ files:
520
538
  - lib/wallee-ruby-sdk/models/token_version_state.rb
521
539
  - lib/wallee-ruby-sdk/models/token_version_type.rb
522
540
  - lib/wallee-ruby-sdk/models/tokenization_mode.rb
541
+ - lib/wallee-ruby-sdk/models/tokenized_card_data.rb
542
+ - lib/wallee-ruby-sdk/models/tokenized_card_data_create.rb
523
543
  - lib/wallee-ruby-sdk/models/transaction.rb
524
544
  - lib/wallee-ruby-sdk/models/transaction_aware_entity.rb
525
545
  - lib/wallee-ruby-sdk/models/transaction_comment.rb
@@ -549,12 +569,12 @@ files:
549
569
  - lib/wallee-ruby-sdk/models/transaction_void_mode.rb
550
570
  - lib/wallee-ruby-sdk/models/transaction_void_state.rb
551
571
  - lib/wallee-ruby-sdk/models/two_factor_authentication_type.rb
552
- - lib/wallee-ruby-sdk/models/unencrypted_card_data.rb
553
- - lib/wallee-ruby-sdk/models/unencrypted_card_data_create.rb
554
572
  - lib/wallee-ruby-sdk/models/user.rb
555
573
  - lib/wallee-ruby-sdk/models/user_account_role.rb
556
574
  - lib/wallee-ruby-sdk/models/user_space_role.rb
557
575
  - lib/wallee-ruby-sdk/models/user_type.rb
576
+ - lib/wallee-ruby-sdk/models/web_app_confirmation_request.rb
577
+ - lib/wallee-ruby-sdk/models/web_app_confirmation_response.rb
558
578
  - lib/wallee-ruby-sdk/models/webhook_identity.rb
559
579
  - lib/wallee-ruby-sdk/models/webhook_listener.rb
560
580
  - lib/wallee-ruby-sdk/models/webhook_listener_create.rb