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.
- checksums.yaml +4 -4
- data/LICENSE +1 -1
- data/lib/wallee-ruby-sdk.rb +46 -3
- data/lib/wallee-ruby-sdk/api/bank_account_service_api.rb +213 -0
- data/lib/wallee-ruby-sdk/api/bank_transaction_service_api.rb +213 -0
- data/lib/wallee-ruby-sdk/api/charge_bank_transaction_service_api.rb +213 -0
- data/lib/wallee-ruby-sdk/api/currency_bank_account_service_api.rb +213 -0
- data/lib/wallee-ruby-sdk/api/external_transfer_bank_transaction_service_api.rb +213 -0
- data/lib/wallee-ruby-sdk/api/internal_transfer_bank_transaction_service_api.rb +213 -0
- data/lib/wallee-ruby-sdk/api/payment_terminal_till_service_api.rb +71 -0
- data/lib/wallee-ruby-sdk/api/refund_bank_transaction_service_api.rb +213 -0
- data/lib/wallee-ruby-sdk/api/refund_recovery_bank_transaction_service_api.rb +213 -0
- data/lib/wallee-ruby-sdk/api/shopify_subscriber_service_api.rb +62 -0
- data/lib/wallee-ruby-sdk/api/token_service_api.rb +63 -0
- data/lib/wallee-ruby-sdk/api/transaction_terminal_service_api.rb +21 -32
- data/lib/wallee-ruby-sdk/api/web_app_service_api.rb +200 -0
- data/lib/wallee-ruby-sdk/api_client.rb +2 -1
- data/lib/wallee-ruby-sdk/models/abstract_payment_link_update.rb +15 -15
- data/lib/wallee-ruby-sdk/models/abstract_subscription_product_active.rb +11 -1
- data/lib/wallee-ruby-sdk/models/authenticated_card_data.rb +221 -0
- data/lib/wallee-ruby-sdk/models/{unencrypted_card_data.rb → authenticated_card_data_create.rb} +86 -12
- data/lib/wallee-ruby-sdk/models/bank_account.rb +291 -0
- data/lib/wallee-ruby-sdk/models/bank_account_environment.rb +35 -0
- data/lib/wallee-ruby-sdk/models/bank_account_state.rb +37 -0
- data/lib/wallee-ruby-sdk/models/bank_account_type.rb +227 -0
- data/lib/wallee-ruby-sdk/models/bank_transaction.rb +387 -0
- data/lib/wallee-ruby-sdk/models/bank_transaction_flow_direction.rb +35 -0
- data/lib/wallee-ruby-sdk/models/bank_transaction_source.rb +215 -0
- data/lib/wallee-ruby-sdk/models/bank_transaction_state.rb +35 -0
- data/lib/wallee-ruby-sdk/models/bank_transaction_type.rb +215 -0
- data/lib/wallee-ruby-sdk/models/card_authentication_response.rb +38 -0
- data/lib/wallee-ruby-sdk/models/card_authentication_version.rb +35 -0
- data/lib/wallee-ruby-sdk/models/card_cryptogram.rb +201 -0
- data/lib/wallee-ruby-sdk/models/card_cryptogram_create.rb +211 -0
- data/lib/wallee-ruby-sdk/models/card_cryptogram_type.rb +34 -0
- data/lib/wallee-ruby-sdk/models/cardholder_authentication.rb +231 -0
- data/lib/wallee-ruby-sdk/models/cardholder_authentication_create.rb +241 -0
- data/lib/wallee-ruby-sdk/models/charge_bank_transaction.rb +291 -0
- data/lib/wallee-ruby-sdk/models/currency_bank_account.rb +241 -0
- data/lib/wallee-ruby-sdk/models/debt_collection_case.rb +1 -1
- data/lib/wallee-ruby-sdk/models/debt_collection_case_create.rb +1 -1
- data/lib/wallee-ruby-sdk/models/external_transfer_bank_transaction.rb +251 -0
- data/lib/wallee-ruby-sdk/models/internal_transfer_bank_transaction.rb +231 -0
- data/lib/wallee-ruby-sdk/models/payment_adjustment.rb +231 -0
- data/lib/wallee-ruby-sdk/models/payment_adjustment_type.rb +215 -0
- data/lib/wallee-ruby-sdk/models/payment_contract.rb +1 -25
- data/lib/wallee-ruby-sdk/models/payment_link.rb +16 -40
- data/lib/wallee-ruby-sdk/models/payment_link_active.rb +15 -15
- data/lib/wallee-ruby-sdk/models/payment_link_address_handling_mode.rb +36 -0
- data/lib/wallee-ruby-sdk/models/payment_link_create.rb +16 -44
- data/lib/wallee-ruby-sdk/models/payment_link_update.rb +15 -15
- data/lib/wallee-ruby-sdk/models/payment_terminal.rb +11 -1
- data/lib/wallee-ruby-sdk/models/payment_terminal_address.rb +0 -60
- data/lib/wallee-ruby-sdk/models/payment_terminal_configuration_version.rb +11 -1
- data/lib/wallee-ruby-sdk/models/payment_terminal_location.rb +2 -22
- data/lib/wallee-ruby-sdk/models/payment_terminal_receipt_type.rb +215 -0
- data/lib/wallee-ruby-sdk/models/permission.rb +14 -4
- data/lib/wallee-ruby-sdk/models/recurring_indicator.rb +37 -0
- data/lib/wallee-ruby-sdk/models/refund_bank_transaction.rb +281 -0
- data/lib/wallee-ruby-sdk/models/refund_recovery_bank_transaction.rb +293 -0
- data/lib/wallee-ruby-sdk/models/rendered_terminal_receipt.rb +26 -6
- data/lib/wallee-ruby-sdk/models/role.rb +1 -1
- data/lib/wallee-ruby-sdk/models/role_state.rb +37 -0
- data/lib/wallee-ruby-sdk/models/shopify_subscriber.rb +1 -1
- data/lib/wallee-ruby-sdk/models/shopify_subscriber_active.rb +241 -0
- data/lib/wallee-ruby-sdk/models/shopify_subscription.rb +11 -1
- data/lib/wallee-ruby-sdk/models/shopify_subscription_creation_request.rb +12 -2
- data/lib/wallee-ruby-sdk/models/shopify_subscription_model_billing_configuration.rb +11 -1
- data/lib/wallee-ruby-sdk/models/shopify_subscription_version.rb +11 -1
- data/lib/wallee-ruby-sdk/models/subscriber.rb +1 -1
- data/lib/wallee-ruby-sdk/models/subscriber_create.rb +1 -1
- data/lib/wallee-ruby-sdk/models/subscription_affiliate.rb +1 -25
- data/lib/wallee-ruby-sdk/models/subscription_affiliate_create.rb +1 -29
- data/lib/wallee-ruby-sdk/models/subscription_affiliate_deleted.rb +1 -25
- data/lib/wallee-ruby-sdk/models/subscription_affiliate_deleting.rb +1 -25
- data/lib/wallee-ruby-sdk/models/subscription_charge.rb +1 -1
- data/lib/wallee-ruby-sdk/models/subscription_charge_create.rb +1 -1
- data/lib/wallee-ruby-sdk/models/subscription_ledger_entry.rb +12 -2
- data/lib/wallee-ruby-sdk/models/subscription_ledger_entry_create.rb +1 -1
- data/lib/wallee-ruby-sdk/models/subscription_product.rb +11 -1
- data/lib/wallee-ruby-sdk/models/subscription_product_active.rb +11 -1
- data/lib/wallee-ruby-sdk/models/subscription_product_component.rb +1 -1
- data/lib/wallee-ruby-sdk/models/subscription_product_component_update.rb +1 -1
- data/lib/wallee-ruby-sdk/models/subscription_product_create.rb +11 -1
- data/lib/wallee-ruby-sdk/models/tax_calculation.rb +2 -2
- data/lib/wallee-ruby-sdk/models/terminal_receipt_fetch_request.rb +221 -0
- data/lib/wallee-ruby-sdk/models/terminal_receipt_format.rb +35 -0
- data/lib/wallee-ruby-sdk/models/token.rb +1 -25
- data/lib/wallee-ruby-sdk/models/token_create.rb +1 -29
- data/lib/wallee-ruby-sdk/models/tokenized_card_data.rb +211 -0
- data/lib/wallee-ruby-sdk/models/{unencrypted_card_data_create.rb → tokenized_card_data_create.rb} +60 -5
- data/lib/wallee-ruby-sdk/models/transaction.rb +64 -4
- data/lib/wallee-ruby-sdk/models/web_app_confirmation_request.rb +206 -0
- data/lib/wallee-ruby-sdk/models/web_app_confirmation_response.rb +231 -0
- data/lib/wallee-ruby-sdk/models/webhook_url.rb +11 -1
- data/lib/wallee-ruby-sdk/version.rb +1 -1
- data/test/condition_type_service_test.rb +22 -0
- metadata +50 -5
- data/lib/wallee-ruby-sdk/models/payment_terminal_contact_address.rb +0 -396
|
@@ -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
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
require 'test/unit'
|
|
2
|
+
require 'wallee-ruby-sdk'
|
|
3
|
+
|
|
4
|
+
class TestConditionTypeAll < Test::Unit::TestCase
|
|
5
|
+
|
|
6
|
+
def test_condition_type_all
|
|
7
|
+
|
|
8
|
+
app_user_id = 512
|
|
9
|
+
app_user_key = "FKrO76r5VwJtBrqZawBspljbBNOxp5veKQQkOnZxucQ="
|
|
10
|
+
|
|
11
|
+
Wallee.configure do |config|
|
|
12
|
+
config.user_id = app_user_id
|
|
13
|
+
config.authentication_key = app_user_key
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
condition_type_service = Wallee::ConditionTypeService.new
|
|
17
|
+
|
|
18
|
+
condition_types, status_code = condition_type_service.all_with_http_info()
|
|
19
|
+
assert_equal(200, status_code)
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
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:
|
|
4
|
+
version: 3.0.6
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- wallee AG
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2021-05-20 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: typhoeus
|
|
@@ -84,14 +84,18 @@ 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
|
|
91
|
+
- lib/wallee-ruby-sdk/api/charge_bank_transaction_service_api.rb
|
|
89
92
|
- lib/wallee-ruby-sdk/api/charge_flow_level_payment_link_service_api.rb
|
|
90
93
|
- lib/wallee-ruby-sdk/api/charge_flow_level_service_api.rb
|
|
91
94
|
- lib/wallee-ruby-sdk/api/charge_flow_service_api.rb
|
|
92
95
|
- lib/wallee-ruby-sdk/api/condition_type_service_api.rb
|
|
93
96
|
- lib/wallee-ruby-sdk/api/country_service_api.rb
|
|
94
97
|
- lib/wallee-ruby-sdk/api/country_state_service_api.rb
|
|
98
|
+
- lib/wallee-ruby-sdk/api/currency_bank_account_service_api.rb
|
|
95
99
|
- lib/wallee-ruby-sdk/api/currency_service_api.rb
|
|
96
100
|
- lib/wallee-ruby-sdk/api/customer_address_service_api.rb
|
|
97
101
|
- lib/wallee-ruby-sdk/api/customer_comment_service_api.rb
|
|
@@ -102,12 +106,14 @@ files:
|
|
|
102
106
|
- lib/wallee-ruby-sdk/api/delivery_indication_service_api.rb
|
|
103
107
|
- lib/wallee-ruby-sdk/api/document_template_service_api.rb
|
|
104
108
|
- lib/wallee-ruby-sdk/api/document_template_type_service_api.rb
|
|
109
|
+
- lib/wallee-ruby-sdk/api/external_transfer_bank_transaction_service_api.rb
|
|
105
110
|
- lib/wallee-ruby-sdk/api/human_user_service_api.rb
|
|
106
111
|
- lib/wallee-ruby-sdk/api/installment_payment_service_api.rb
|
|
107
112
|
- lib/wallee-ruby-sdk/api/installment_payment_slice_service_api.rb
|
|
108
113
|
- lib/wallee-ruby-sdk/api/installment_plan_calculation_service_api.rb
|
|
109
114
|
- lib/wallee-ruby-sdk/api/installment_plan_configuration_service_api.rb
|
|
110
115
|
- lib/wallee-ruby-sdk/api/installment_plan_slice_configuration_service_api.rb
|
|
116
|
+
- lib/wallee-ruby-sdk/api/internal_transfer_bank_transaction_service_api.rb
|
|
111
117
|
- lib/wallee-ruby-sdk/api/label_description_group_service_api.rb
|
|
112
118
|
- lib/wallee-ruby-sdk/api/label_description_service_api.rb
|
|
113
119
|
- lib/wallee-ruby-sdk/api/language_service_api.rb
|
|
@@ -125,7 +131,9 @@ files:
|
|
|
125
131
|
- lib/wallee-ruby-sdk/api/payment_terminal_service_api.rb
|
|
126
132
|
- lib/wallee-ruby-sdk/api/payment_terminal_till_service_api.rb
|
|
127
133
|
- lib/wallee-ruby-sdk/api/permission_service_api.rb
|
|
134
|
+
- lib/wallee-ruby-sdk/api/refund_bank_transaction_service_api.rb
|
|
128
135
|
- lib/wallee-ruby-sdk/api/refund_comment_service_api.rb
|
|
136
|
+
- lib/wallee-ruby-sdk/api/refund_recovery_bank_transaction_service_api.rb
|
|
129
137
|
- lib/wallee-ruby-sdk/api/refund_service_api.rb
|
|
130
138
|
- lib/wallee-ruby-sdk/api/shopify_recurring_order_service_api.rb
|
|
131
139
|
- lib/wallee-ruby-sdk/api/shopify_subscriber_service_api.rb
|
|
@@ -171,6 +179,7 @@ files:
|
|
|
171
179
|
- lib/wallee-ruby-sdk/api/transaction_void_service_api.rb
|
|
172
180
|
- lib/wallee-ruby-sdk/api/user_account_role_service_api.rb
|
|
173
181
|
- lib/wallee-ruby-sdk/api/user_space_role_service_api.rb
|
|
182
|
+
- lib/wallee-ruby-sdk/api/web_app_service_api.rb
|
|
174
183
|
- lib/wallee-ruby-sdk/api/webhook_listener_service_api.rb
|
|
175
184
|
- lib/wallee-ruby-sdk/api/webhook_url_service_api.rb
|
|
176
185
|
- lib/wallee-ruby-sdk/api_client.rb
|
|
@@ -208,10 +217,29 @@ files:
|
|
|
208
217
|
- lib/wallee-ruby-sdk/models/application_user_create.rb
|
|
209
218
|
- lib/wallee-ruby-sdk/models/application_user_create_with_mac_key.rb
|
|
210
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
|
|
222
|
+
- lib/wallee-ruby-sdk/models/bank_account.rb
|
|
223
|
+
- lib/wallee-ruby-sdk/models/bank_account_environment.rb
|
|
224
|
+
- lib/wallee-ruby-sdk/models/bank_account_state.rb
|
|
225
|
+
- lib/wallee-ruby-sdk/models/bank_account_type.rb
|
|
226
|
+
- lib/wallee-ruby-sdk/models/bank_transaction.rb
|
|
227
|
+
- lib/wallee-ruby-sdk/models/bank_transaction_flow_direction.rb
|
|
228
|
+
- lib/wallee-ruby-sdk/models/bank_transaction_source.rb
|
|
229
|
+
- lib/wallee-ruby-sdk/models/bank_transaction_state.rb
|
|
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
|
|
211
238
|
- lib/wallee-ruby-sdk/models/charge.rb
|
|
212
239
|
- lib/wallee-ruby-sdk/models/charge_attempt.rb
|
|
213
240
|
- lib/wallee-ruby-sdk/models/charge_attempt_environment.rb
|
|
214
241
|
- lib/wallee-ruby-sdk/models/charge_attempt_state.rb
|
|
242
|
+
- lib/wallee-ruby-sdk/models/charge_bank_transaction.rb
|
|
215
243
|
- lib/wallee-ruby-sdk/models/charge_flow.rb
|
|
216
244
|
- lib/wallee-ruby-sdk/models/charge_flow_level.rb
|
|
217
245
|
- lib/wallee-ruby-sdk/models/charge_flow_level_configuration.rb
|
|
@@ -230,6 +258,7 @@ files:
|
|
|
230
258
|
- lib/wallee-ruby-sdk/models/connector_invocation_stage.rb
|
|
231
259
|
- lib/wallee-ruby-sdk/models/creation_entity_state.rb
|
|
232
260
|
- lib/wallee-ruby-sdk/models/criteria_operator.rb
|
|
261
|
+
- lib/wallee-ruby-sdk/models/currency_bank_account.rb
|
|
233
262
|
- lib/wallee-ruby-sdk/models/customer.rb
|
|
234
263
|
- lib/wallee-ruby-sdk/models/customer_active.rb
|
|
235
264
|
- lib/wallee-ruby-sdk/models/customer_address.rb
|
|
@@ -274,6 +303,7 @@ files:
|
|
|
274
303
|
- lib/wallee-ruby-sdk/models/entity_query_order_by.rb
|
|
275
304
|
- lib/wallee-ruby-sdk/models/entity_query_order_by_type.rb
|
|
276
305
|
- lib/wallee-ruby-sdk/models/environment.rb
|
|
306
|
+
- lib/wallee-ruby-sdk/models/external_transfer_bank_transaction.rb
|
|
277
307
|
- lib/wallee-ruby-sdk/models/failure_category.rb
|
|
278
308
|
- lib/wallee-ruby-sdk/models/failure_reason.rb
|
|
279
309
|
- lib/wallee-ruby-sdk/models/feature.rb
|
|
@@ -290,6 +320,7 @@ files:
|
|
|
290
320
|
- lib/wallee-ruby-sdk/models/installment_payment_state.rb
|
|
291
321
|
- lib/wallee-ruby-sdk/models/installment_plan_configuration.rb
|
|
292
322
|
- lib/wallee-ruby-sdk/models/installment_plan_slice_configuration.rb
|
|
323
|
+
- lib/wallee-ruby-sdk/models/internal_transfer_bank_transaction.rb
|
|
293
324
|
- lib/wallee-ruby-sdk/models/label.rb
|
|
294
325
|
- lib/wallee-ruby-sdk/models/label_descriptor.rb
|
|
295
326
|
- lib/wallee-ruby-sdk/models/label_descriptor_category.rb
|
|
@@ -311,6 +342,8 @@ files:
|
|
|
311
342
|
- lib/wallee-ruby-sdk/models/manual_task_type.rb
|
|
312
343
|
- lib/wallee-ruby-sdk/models/metric_usage.rb
|
|
313
344
|
- lib/wallee-ruby-sdk/models/one_click_payment_mode.rb
|
|
345
|
+
- lib/wallee-ruby-sdk/models/payment_adjustment.rb
|
|
346
|
+
- lib/wallee-ruby-sdk/models/payment_adjustment_type.rb
|
|
314
347
|
- lib/wallee-ruby-sdk/models/payment_connector.rb
|
|
315
348
|
- lib/wallee-ruby-sdk/models/payment_connector_configuration.rb
|
|
316
349
|
- lib/wallee-ruby-sdk/models/payment_connector_feature.rb
|
|
@@ -321,6 +354,7 @@ files:
|
|
|
321
354
|
- lib/wallee-ruby-sdk/models/payment_information_hash_type.rb
|
|
322
355
|
- lib/wallee-ruby-sdk/models/payment_link.rb
|
|
323
356
|
- lib/wallee-ruby-sdk/models/payment_link_active.rb
|
|
357
|
+
- lib/wallee-ruby-sdk/models/payment_link_address_handling_mode.rb
|
|
324
358
|
- lib/wallee-ruby-sdk/models/payment_link_create.rb
|
|
325
359
|
- lib/wallee-ruby-sdk/models/payment_link_protection_mode.rb
|
|
326
360
|
- lib/wallee-ruby-sdk/models/payment_link_update.rb
|
|
@@ -336,11 +370,11 @@ files:
|
|
|
336
370
|
- lib/wallee-ruby-sdk/models/payment_terminal_configuration_state.rb
|
|
337
371
|
- lib/wallee-ruby-sdk/models/payment_terminal_configuration_version.rb
|
|
338
372
|
- lib/wallee-ruby-sdk/models/payment_terminal_configuration_version_state.rb
|
|
339
|
-
- lib/wallee-ruby-sdk/models/payment_terminal_contact_address.rb
|
|
340
373
|
- lib/wallee-ruby-sdk/models/payment_terminal_location.rb
|
|
341
374
|
- lib/wallee-ruby-sdk/models/payment_terminal_location_state.rb
|
|
342
375
|
- lib/wallee-ruby-sdk/models/payment_terminal_location_version.rb
|
|
343
376
|
- lib/wallee-ruby-sdk/models/payment_terminal_location_version_state.rb
|
|
377
|
+
- lib/wallee-ruby-sdk/models/payment_terminal_receipt_type.rb
|
|
344
378
|
- lib/wallee-ruby-sdk/models/payment_terminal_state.rb
|
|
345
379
|
- lib/wallee-ruby-sdk/models/payment_terminal_type.rb
|
|
346
380
|
- lib/wallee-ruby-sdk/models/permission.rb
|
|
@@ -356,11 +390,14 @@ files:
|
|
|
356
390
|
- lib/wallee-ruby-sdk/models/product_period_fee_update.rb
|
|
357
391
|
- lib/wallee-ruby-sdk/models/product_setup_fee.rb
|
|
358
392
|
- lib/wallee-ruby-sdk/models/product_setup_fee_update.rb
|
|
393
|
+
- lib/wallee-ruby-sdk/models/recurring_indicator.rb
|
|
359
394
|
- lib/wallee-ruby-sdk/models/refund.rb
|
|
395
|
+
- lib/wallee-ruby-sdk/models/refund_bank_transaction.rb
|
|
360
396
|
- lib/wallee-ruby-sdk/models/refund_comment.rb
|
|
361
397
|
- lib/wallee-ruby-sdk/models/refund_comment_active.rb
|
|
362
398
|
- lib/wallee-ruby-sdk/models/refund_comment_create.rb
|
|
363
399
|
- lib/wallee-ruby-sdk/models/refund_create.rb
|
|
400
|
+
- lib/wallee-ruby-sdk/models/refund_recovery_bank_transaction.rb
|
|
364
401
|
- lib/wallee-ruby-sdk/models/refund_state.rb
|
|
365
402
|
- lib/wallee-ruby-sdk/models/refund_type.rb
|
|
366
403
|
- lib/wallee-ruby-sdk/models/rendered_document.rb
|
|
@@ -374,6 +411,7 @@ files:
|
|
|
374
411
|
- lib/wallee-ruby-sdk/models/rest_currency.rb
|
|
375
412
|
- lib/wallee-ruby-sdk/models/rest_language.rb
|
|
376
413
|
- lib/wallee-ruby-sdk/models/role.rb
|
|
414
|
+
- lib/wallee-ruby-sdk/models/role_state.rb
|
|
377
415
|
- lib/wallee-ruby-sdk/models/sales_channel.rb
|
|
378
416
|
- lib/wallee-ruby-sdk/models/scope.rb
|
|
379
417
|
- lib/wallee-ruby-sdk/models/server_error.rb
|
|
@@ -385,6 +423,7 @@ files:
|
|
|
385
423
|
- lib/wallee-ruby-sdk/models/shopify_recurring_order_state.rb
|
|
386
424
|
- lib/wallee-ruby-sdk/models/shopify_recurring_order_update_request.rb
|
|
387
425
|
- lib/wallee-ruby-sdk/models/shopify_subscriber.rb
|
|
426
|
+
- lib/wallee-ruby-sdk/models/shopify_subscriber_active.rb
|
|
388
427
|
- lib/wallee-ruby-sdk/models/shopify_subscriber_creation.rb
|
|
389
428
|
- lib/wallee-ruby-sdk/models/shopify_subscriber_state.rb
|
|
390
429
|
- lib/wallee-ruby-sdk/models/shopify_subscription.rb
|
|
@@ -491,6 +530,8 @@ files:
|
|
|
491
530
|
- lib/wallee-ruby-sdk/models/tax_class.rb
|
|
492
531
|
- lib/wallee-ruby-sdk/models/tax_create.rb
|
|
493
532
|
- lib/wallee-ruby-sdk/models/tenant_database.rb
|
|
533
|
+
- lib/wallee-ruby-sdk/models/terminal_receipt_fetch_request.rb
|
|
534
|
+
- lib/wallee-ruby-sdk/models/terminal_receipt_format.rb
|
|
494
535
|
- lib/wallee-ruby-sdk/models/token.rb
|
|
495
536
|
- lib/wallee-ruby-sdk/models/token_create.rb
|
|
496
537
|
- lib/wallee-ruby-sdk/models/token_update.rb
|
|
@@ -498,6 +539,8 @@ files:
|
|
|
498
539
|
- lib/wallee-ruby-sdk/models/token_version_state.rb
|
|
499
540
|
- lib/wallee-ruby-sdk/models/token_version_type.rb
|
|
500
541
|
- lib/wallee-ruby-sdk/models/tokenization_mode.rb
|
|
542
|
+
- lib/wallee-ruby-sdk/models/tokenized_card_data.rb
|
|
543
|
+
- lib/wallee-ruby-sdk/models/tokenized_card_data_create.rb
|
|
501
544
|
- lib/wallee-ruby-sdk/models/transaction.rb
|
|
502
545
|
- lib/wallee-ruby-sdk/models/transaction_aware_entity.rb
|
|
503
546
|
- lib/wallee-ruby-sdk/models/transaction_comment.rb
|
|
@@ -527,12 +570,12 @@ files:
|
|
|
527
570
|
- lib/wallee-ruby-sdk/models/transaction_void_mode.rb
|
|
528
571
|
- lib/wallee-ruby-sdk/models/transaction_void_state.rb
|
|
529
572
|
- lib/wallee-ruby-sdk/models/two_factor_authentication_type.rb
|
|
530
|
-
- lib/wallee-ruby-sdk/models/unencrypted_card_data.rb
|
|
531
|
-
- lib/wallee-ruby-sdk/models/unencrypted_card_data_create.rb
|
|
532
573
|
- lib/wallee-ruby-sdk/models/user.rb
|
|
533
574
|
- lib/wallee-ruby-sdk/models/user_account_role.rb
|
|
534
575
|
- lib/wallee-ruby-sdk/models/user_space_role.rb
|
|
535
576
|
- lib/wallee-ruby-sdk/models/user_type.rb
|
|
577
|
+
- lib/wallee-ruby-sdk/models/web_app_confirmation_request.rb
|
|
578
|
+
- lib/wallee-ruby-sdk/models/web_app_confirmation_response.rb
|
|
536
579
|
- lib/wallee-ruby-sdk/models/webhook_identity.rb
|
|
537
580
|
- lib/wallee-ruby-sdk/models/webhook_listener.rb
|
|
538
581
|
- lib/wallee-ruby-sdk/models/webhook_listener_create.rb
|
|
@@ -542,6 +585,7 @@ files:
|
|
|
542
585
|
- lib/wallee-ruby-sdk/models/webhook_url_create.rb
|
|
543
586
|
- lib/wallee-ruby-sdk/models/webhook_url_update.rb
|
|
544
587
|
- lib/wallee-ruby-sdk/version.rb
|
|
588
|
+
- test/condition_type_service_test.rb
|
|
545
589
|
- test/transaction_create_service_test.rb
|
|
546
590
|
- test/transaction_payment_page_service_test.rb
|
|
547
591
|
- wallee-ruby-sdk.gemspec
|
|
@@ -569,5 +613,6 @@ signing_key:
|
|
|
569
613
|
specification_version: 4
|
|
570
614
|
summary: A ruby wrapper around the wallee API.
|
|
571
615
|
test_files:
|
|
616
|
+
- test/condition_type_service_test.rb
|
|
572
617
|
- test/transaction_create_service_test.rb
|
|
573
618
|
- test/transaction_payment_page_service_test.rb
|
|
@@ -1,396 +0,0 @@
|
|
|
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 PaymentTerminalContactAddress
|
|
23
|
-
#
|
|
24
|
-
attr_accessor :city
|
|
25
|
-
|
|
26
|
-
#
|
|
27
|
-
attr_accessor :country
|
|
28
|
-
|
|
29
|
-
#
|
|
30
|
-
attr_accessor :dependent_locality
|
|
31
|
-
|
|
32
|
-
#
|
|
33
|
-
attr_accessor :email_address
|
|
34
|
-
|
|
35
|
-
#
|
|
36
|
-
attr_accessor :family_name
|
|
37
|
-
|
|
38
|
-
#
|
|
39
|
-
attr_accessor :given_name
|
|
40
|
-
|
|
41
|
-
#
|
|
42
|
-
attr_accessor :mobile_phone_number
|
|
43
|
-
|
|
44
|
-
#
|
|
45
|
-
attr_accessor :organization_name
|
|
46
|
-
|
|
47
|
-
#
|
|
48
|
-
attr_accessor :phone_number
|
|
49
|
-
|
|
50
|
-
#
|
|
51
|
-
attr_accessor :postal_state
|
|
52
|
-
|
|
53
|
-
#
|
|
54
|
-
attr_accessor :postcode
|
|
55
|
-
|
|
56
|
-
#
|
|
57
|
-
attr_accessor :salutation
|
|
58
|
-
|
|
59
|
-
# The sorting code identifies the post office at which the post box is located in.
|
|
60
|
-
attr_accessor :sorting_code
|
|
61
|
-
|
|
62
|
-
#
|
|
63
|
-
attr_accessor :street
|
|
64
|
-
|
|
65
|
-
# Attribute mapping from ruby-style variable name to JSON key.
|
|
66
|
-
def self.attribute_map
|
|
67
|
-
{
|
|
68
|
-
:'city' => :'city',
|
|
69
|
-
:'country' => :'country',
|
|
70
|
-
:'dependent_locality' => :'dependentLocality',
|
|
71
|
-
:'email_address' => :'emailAddress',
|
|
72
|
-
:'family_name' => :'familyName',
|
|
73
|
-
:'given_name' => :'givenName',
|
|
74
|
-
:'mobile_phone_number' => :'mobilePhoneNumber',
|
|
75
|
-
:'organization_name' => :'organizationName',
|
|
76
|
-
:'phone_number' => :'phoneNumber',
|
|
77
|
-
:'postal_state' => :'postalState',
|
|
78
|
-
:'postcode' => :'postcode',
|
|
79
|
-
:'salutation' => :'salutation',
|
|
80
|
-
:'sorting_code' => :'sortingCode',
|
|
81
|
-
:'street' => :'street'
|
|
82
|
-
}
|
|
83
|
-
end
|
|
84
|
-
|
|
85
|
-
# Attribute type mapping.
|
|
86
|
-
def self.swagger_types
|
|
87
|
-
{
|
|
88
|
-
:'city' => :'String',
|
|
89
|
-
:'country' => :'String',
|
|
90
|
-
:'dependent_locality' => :'String',
|
|
91
|
-
:'email_address' => :'String',
|
|
92
|
-
:'family_name' => :'String',
|
|
93
|
-
:'given_name' => :'String',
|
|
94
|
-
:'mobile_phone_number' => :'String',
|
|
95
|
-
:'organization_name' => :'String',
|
|
96
|
-
:'phone_number' => :'String',
|
|
97
|
-
:'postal_state' => :'String',
|
|
98
|
-
:'postcode' => :'String',
|
|
99
|
-
:'salutation' => :'String',
|
|
100
|
-
:'sorting_code' => :'String',
|
|
101
|
-
:'street' => :'String'
|
|
102
|
-
}
|
|
103
|
-
end
|
|
104
|
-
|
|
105
|
-
# Initializes the object
|
|
106
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
|
107
|
-
def initialize(attributes = {})
|
|
108
|
-
return unless attributes.is_a?(Hash)
|
|
109
|
-
|
|
110
|
-
# convert string to symbol for hash key
|
|
111
|
-
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
|
112
|
-
|
|
113
|
-
if attributes.has_key?(:'city')
|
|
114
|
-
self.city = attributes[:'city']
|
|
115
|
-
end
|
|
116
|
-
|
|
117
|
-
if attributes.has_key?(:'country')
|
|
118
|
-
self.country = attributes[:'country']
|
|
119
|
-
end
|
|
120
|
-
|
|
121
|
-
if attributes.has_key?(:'dependentLocality')
|
|
122
|
-
self.dependent_locality = attributes[:'dependentLocality']
|
|
123
|
-
end
|
|
124
|
-
|
|
125
|
-
if attributes.has_key?(:'emailAddress')
|
|
126
|
-
self.email_address = attributes[:'emailAddress']
|
|
127
|
-
end
|
|
128
|
-
|
|
129
|
-
if attributes.has_key?(:'familyName')
|
|
130
|
-
self.family_name = attributes[:'familyName']
|
|
131
|
-
end
|
|
132
|
-
|
|
133
|
-
if attributes.has_key?(:'givenName')
|
|
134
|
-
self.given_name = attributes[:'givenName']
|
|
135
|
-
end
|
|
136
|
-
|
|
137
|
-
if attributes.has_key?(:'mobilePhoneNumber')
|
|
138
|
-
self.mobile_phone_number = attributes[:'mobilePhoneNumber']
|
|
139
|
-
end
|
|
140
|
-
|
|
141
|
-
if attributes.has_key?(:'organizationName')
|
|
142
|
-
self.organization_name = attributes[:'organizationName']
|
|
143
|
-
end
|
|
144
|
-
|
|
145
|
-
if attributes.has_key?(:'phoneNumber')
|
|
146
|
-
self.phone_number = attributes[:'phoneNumber']
|
|
147
|
-
end
|
|
148
|
-
|
|
149
|
-
if attributes.has_key?(:'postalState')
|
|
150
|
-
self.postal_state = attributes[:'postalState']
|
|
151
|
-
end
|
|
152
|
-
|
|
153
|
-
if attributes.has_key?(:'postcode')
|
|
154
|
-
self.postcode = attributes[:'postcode']
|
|
155
|
-
end
|
|
156
|
-
|
|
157
|
-
if attributes.has_key?(:'salutation')
|
|
158
|
-
self.salutation = attributes[:'salutation']
|
|
159
|
-
end
|
|
160
|
-
|
|
161
|
-
if attributes.has_key?(:'sortingCode')
|
|
162
|
-
self.sorting_code = attributes[:'sortingCode']
|
|
163
|
-
end
|
|
164
|
-
|
|
165
|
-
if attributes.has_key?(:'street')
|
|
166
|
-
self.street = attributes[:'street']
|
|
167
|
-
end
|
|
168
|
-
end
|
|
169
|
-
|
|
170
|
-
# Show invalid properties with the reasons. Usually used together with valid?
|
|
171
|
-
# @return Array for valid properties with the reasons
|
|
172
|
-
def list_invalid_properties
|
|
173
|
-
invalid_properties = Array.new
|
|
174
|
-
if !@dependent_locality.nil? && @dependent_locality.to_s.length > 100
|
|
175
|
-
invalid_properties.push('invalid value for "dependent_locality", the character length must be smaller than or equal to 100.')
|
|
176
|
-
end
|
|
177
|
-
|
|
178
|
-
if !@email_address.nil? && @email_address.to_s.length > 254
|
|
179
|
-
invalid_properties.push('invalid value for "email_address", the character length must be smaller than or equal to 254.')
|
|
180
|
-
end
|
|
181
|
-
|
|
182
|
-
if !@mobile_phone_number.nil? && @mobile_phone_number.to_s.length > 100
|
|
183
|
-
invalid_properties.push('invalid value for "mobile_phone_number", the character length must be smaller than or equal to 100.')
|
|
184
|
-
end
|
|
185
|
-
|
|
186
|
-
if !@salutation.nil? && @salutation.to_s.length > 20
|
|
187
|
-
invalid_properties.push('invalid value for "salutation", the character length must be smaller than or equal to 20.')
|
|
188
|
-
end
|
|
189
|
-
|
|
190
|
-
if !@sorting_code.nil? && @sorting_code.to_s.length > 100
|
|
191
|
-
invalid_properties.push('invalid value for "sorting_code", the character length must be smaller than or equal to 100.')
|
|
192
|
-
end
|
|
193
|
-
|
|
194
|
-
invalid_properties
|
|
195
|
-
end
|
|
196
|
-
|
|
197
|
-
# Check to see if the all the properties in the model are valid
|
|
198
|
-
# @return true if the model is valid
|
|
199
|
-
def valid?
|
|
200
|
-
return false if !@dependent_locality.nil? && @dependent_locality.to_s.length > 100
|
|
201
|
-
return false if !@email_address.nil? && @email_address.to_s.length > 254
|
|
202
|
-
return false if !@mobile_phone_number.nil? && @mobile_phone_number.to_s.length > 100
|
|
203
|
-
return false if !@salutation.nil? && @salutation.to_s.length > 20
|
|
204
|
-
return false if !@sorting_code.nil? && @sorting_code.to_s.length > 100
|
|
205
|
-
true
|
|
206
|
-
end
|
|
207
|
-
|
|
208
|
-
# Custom attribute writer method with validation
|
|
209
|
-
# @param [Object] dependent_locality Value to be assigned
|
|
210
|
-
def dependent_locality=(dependent_locality)
|
|
211
|
-
if !dependent_locality.nil? && dependent_locality.to_s.length > 100
|
|
212
|
-
fail ArgumentError, 'invalid value for "dependent_locality", the character length must be smaller than or equal to 100.'
|
|
213
|
-
end
|
|
214
|
-
|
|
215
|
-
@dependent_locality = dependent_locality
|
|
216
|
-
end
|
|
217
|
-
|
|
218
|
-
# Custom attribute writer method with validation
|
|
219
|
-
# @param [Object] email_address Value to be assigned
|
|
220
|
-
def email_address=(email_address)
|
|
221
|
-
if !email_address.nil? && email_address.to_s.length > 254
|
|
222
|
-
fail ArgumentError, 'invalid value for "email_address", the character length must be smaller than or equal to 254.'
|
|
223
|
-
end
|
|
224
|
-
|
|
225
|
-
@email_address = email_address
|
|
226
|
-
end
|
|
227
|
-
|
|
228
|
-
# Custom attribute writer method with validation
|
|
229
|
-
# @param [Object] mobile_phone_number Value to be assigned
|
|
230
|
-
def mobile_phone_number=(mobile_phone_number)
|
|
231
|
-
if !mobile_phone_number.nil? && mobile_phone_number.to_s.length > 100
|
|
232
|
-
fail ArgumentError, 'invalid value for "mobile_phone_number", the character length must be smaller than or equal to 100.'
|
|
233
|
-
end
|
|
234
|
-
|
|
235
|
-
@mobile_phone_number = mobile_phone_number
|
|
236
|
-
end
|
|
237
|
-
|
|
238
|
-
# Custom attribute writer method with validation
|
|
239
|
-
# @param [Object] salutation Value to be assigned
|
|
240
|
-
def salutation=(salutation)
|
|
241
|
-
if !salutation.nil? && salutation.to_s.length > 20
|
|
242
|
-
fail ArgumentError, 'invalid value for "salutation", the character length must be smaller than or equal to 20.'
|
|
243
|
-
end
|
|
244
|
-
|
|
245
|
-
@salutation = salutation
|
|
246
|
-
end
|
|
247
|
-
|
|
248
|
-
# Custom attribute writer method with validation
|
|
249
|
-
# @param [Object] sorting_code Value to be assigned
|
|
250
|
-
def sorting_code=(sorting_code)
|
|
251
|
-
if !sorting_code.nil? && sorting_code.to_s.length > 100
|
|
252
|
-
fail ArgumentError, 'invalid value for "sorting_code", the character length must be smaller than or equal to 100.'
|
|
253
|
-
end
|
|
254
|
-
|
|
255
|
-
@sorting_code = sorting_code
|
|
256
|
-
end
|
|
257
|
-
|
|
258
|
-
# Checks equality by comparing each attribute.
|
|
259
|
-
# @param [Object] Object to be compared
|
|
260
|
-
def ==(o)
|
|
261
|
-
return true if self.equal?(o)
|
|
262
|
-
self.class == o.class &&
|
|
263
|
-
city == o.city &&
|
|
264
|
-
country == o.country &&
|
|
265
|
-
dependent_locality == o.dependent_locality &&
|
|
266
|
-
email_address == o.email_address &&
|
|
267
|
-
family_name == o.family_name &&
|
|
268
|
-
given_name == o.given_name &&
|
|
269
|
-
mobile_phone_number == o.mobile_phone_number &&
|
|
270
|
-
organization_name == o.organization_name &&
|
|
271
|
-
phone_number == o.phone_number &&
|
|
272
|
-
postal_state == o.postal_state &&
|
|
273
|
-
postcode == o.postcode &&
|
|
274
|
-
salutation == o.salutation &&
|
|
275
|
-
sorting_code == o.sorting_code &&
|
|
276
|
-
street == o.street
|
|
277
|
-
end
|
|
278
|
-
|
|
279
|
-
# @see the `==` method
|
|
280
|
-
# @param [Object] Object to be compared
|
|
281
|
-
def eql?(o)
|
|
282
|
-
self == o
|
|
283
|
-
end
|
|
284
|
-
|
|
285
|
-
# Calculates hash code according to all attributes.
|
|
286
|
-
# @return [Fixnum] Hash code
|
|
287
|
-
def hash
|
|
288
|
-
[city, country, dependent_locality, email_address, family_name, given_name, mobile_phone_number, organization_name, phone_number, postal_state, postcode, salutation, sorting_code, street].hash
|
|
289
|
-
end
|
|
290
|
-
|
|
291
|
-
# Builds the object from hash
|
|
292
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
|
293
|
-
# @return [Object] Returns the model itself
|
|
294
|
-
def build_from_hash(attributes)
|
|
295
|
-
return nil unless attributes.is_a?(Hash)
|
|
296
|
-
self.class.swagger_types.each_pair do |key, type|
|
|
297
|
-
if type =~ /\AArray<(.*)>/i
|
|
298
|
-
# check to ensure the input is an array given that the attribute
|
|
299
|
-
# is documented as an array but the input is not
|
|
300
|
-
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
301
|
-
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
|
|
302
|
-
end
|
|
303
|
-
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
304
|
-
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
|
305
|
-
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
|
306
|
-
end
|
|
307
|
-
|
|
308
|
-
self
|
|
309
|
-
end
|
|
310
|
-
|
|
311
|
-
# Deserializes the data based on type
|
|
312
|
-
# @param string type Data type
|
|
313
|
-
# @param string value Value to be deserialized
|
|
314
|
-
# @return [Object] Deserialized data
|
|
315
|
-
def _deserialize(type, value)
|
|
316
|
-
case type.to_sym
|
|
317
|
-
when :DateTime
|
|
318
|
-
DateTime.parse(value)
|
|
319
|
-
when :Date
|
|
320
|
-
Date.parse(value)
|
|
321
|
-
when :String
|
|
322
|
-
value.to_s
|
|
323
|
-
when :Integer
|
|
324
|
-
value.to_i
|
|
325
|
-
when :Float
|
|
326
|
-
value.to_f
|
|
327
|
-
when :BOOLEAN
|
|
328
|
-
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
329
|
-
true
|
|
330
|
-
else
|
|
331
|
-
false
|
|
332
|
-
end
|
|
333
|
-
when :Object
|
|
334
|
-
# generic object (usually a Hash), return directly
|
|
335
|
-
value
|
|
336
|
-
when /\AArray<(?<inner_type>.+)>\z/
|
|
337
|
-
inner_type = Regexp.last_match[:inner_type]
|
|
338
|
-
value.map { |v| _deserialize(inner_type, v) }
|
|
339
|
-
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
340
|
-
k_type = Regexp.last_match[:k_type]
|
|
341
|
-
v_type = Regexp.last_match[:v_type]
|
|
342
|
-
{}.tap do |hash|
|
|
343
|
-
value.each do |k, v|
|
|
344
|
-
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
345
|
-
end
|
|
346
|
-
end
|
|
347
|
-
else # model
|
|
348
|
-
temp_model = Wallee.const_get(type).new
|
|
349
|
-
temp_model.build_from_hash(value)
|
|
350
|
-
end
|
|
351
|
-
end
|
|
352
|
-
|
|
353
|
-
# Returns the string representation of the object
|
|
354
|
-
# @return [String] String presentation of the object
|
|
355
|
-
def to_s
|
|
356
|
-
to_hash.to_s
|
|
357
|
-
end
|
|
358
|
-
|
|
359
|
-
# to_body is an alias to to_hash (backward compatibility)
|
|
360
|
-
# @return [Hash] Returns the object in the form of hash
|
|
361
|
-
def to_body
|
|
362
|
-
to_hash
|
|
363
|
-
end
|
|
364
|
-
|
|
365
|
-
# Returns the object in the form of hash
|
|
366
|
-
# @return [Hash] Returns the object in the form of hash
|
|
367
|
-
def to_hash
|
|
368
|
-
hash = {}
|
|
369
|
-
self.class.attribute_map.each_pair do |attr, param|
|
|
370
|
-
value = self.send(attr)
|
|
371
|
-
next if value.nil?
|
|
372
|
-
hash[param] = _to_hash(value)
|
|
373
|
-
end
|
|
374
|
-
hash
|
|
375
|
-
end
|
|
376
|
-
|
|
377
|
-
# Outputs non-array value in the form of hash
|
|
378
|
-
# For object, use to_hash. Otherwise, just return the value
|
|
379
|
-
# @param [Object] value Any valid value
|
|
380
|
-
# @return [Hash] Returns the value in the form of hash
|
|
381
|
-
def _to_hash(value)
|
|
382
|
-
if value.is_a?(Array)
|
|
383
|
-
value.compact.map{ |v| _to_hash(v) }
|
|
384
|
-
elsif value.is_a?(Hash)
|
|
385
|
-
{}.tap do |hash|
|
|
386
|
-
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
387
|
-
end
|
|
388
|
-
elsif value.respond_to? :to_hash
|
|
389
|
-
value.to_hash
|
|
390
|
-
else
|
|
391
|
-
value
|
|
392
|
-
end
|
|
393
|
-
end
|
|
394
|
-
|
|
395
|
-
end
|
|
396
|
-
end
|