wallee-ruby-sdk 2.2.3 → 3.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/LICENSE +1 -1
- data/README.md +1 -1
- data/lib/wallee-ruby-sdk.rb +63 -8
- 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 +170 -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/shopify_subscription_service_api.rb +124 -0
- data/lib/wallee-ruby-sdk/api/shopify_transaction_service_api.rb +213 -0
- data/lib/wallee-ruby-sdk/api/subscriber_service_api.rb +3 -3
- data/lib/wallee-ruby-sdk/api/subscription_service_api.rb +67 -0
- data/lib/wallee-ruby-sdk/api/token_service_api.rb +189 -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 +7 -4
- data/lib/wallee-ruby-sdk/configuration.rb +2 -2
- data/lib/wallee-ruby-sdk/models/abstract_account_update.rb +11 -1
- data/lib/wallee-ruby-sdk/models/abstract_payment_link_update.rb +15 -15
- data/lib/wallee-ruby-sdk/models/{abstract_shopify_subscription_product_active.rb → abstract_shopify_subscription_product_update.rb} +2 -12
- data/lib/wallee-ruby-sdk/models/abstract_space_update.rb +11 -1
- data/lib/wallee-ruby-sdk/models/abstract_subscription_product_active.rb +11 -1
- data/lib/wallee-ruby-sdk/models/abstract_transaction_pending.rb +59 -1
- data/lib/wallee-ruby-sdk/models/abstract_webhook_url_update.rb +24 -0
- data/lib/wallee-ruby-sdk/models/account.rb +31 -1
- data/lib/wallee-ruby-sdk/models/account_create.rb +11 -1
- data/lib/wallee-ruby-sdk/models/account_update.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_attempt.rb +11 -1
- 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_connector_configuration.rb +13 -1
- 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/sales_channel.rb +34 -4
- data/lib/wallee-ruby-sdk/models/shopify_additional_line_item_data.rb +35 -0
- data/lib/wallee-ruby-sdk/models/shopify_integration.rb +73 -31
- data/lib/wallee-ruby-sdk/models/shopify_integration_payment_app_version.rb +34 -0
- data/lib/wallee-ruby-sdk/models/{shopify_integration_app_version.rb → shopify_integration_subscription_app_version.rb} +3 -3
- 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_subscriber_creation.rb +216 -0
- data/lib/wallee-ruby-sdk/models/shopify_subscription.rb +61 -7
- data/lib/wallee-ruby-sdk/models/shopify_subscription_address.rb +0 -60
- data/lib/wallee-ruby-sdk/models/{payment_terminal_contact_address.rb → shopify_subscription_address_create.rb} +152 -2
- data/lib/wallee-ruby-sdk/models/shopify_subscription_creation_request.rb +363 -0
- data/lib/wallee-ruby-sdk/models/shopify_subscription_model_billing_configuration.rb +271 -0
- data/lib/wallee-ruby-sdk/models/{shopify_subscription_edit_model_item.rb → shopify_subscription_model_item.rb} +2 -2
- data/lib/wallee-ruby-sdk/models/{shopify_subscription_edit_model_tax_line.rb → shopify_subscription_model_tax_line.rb} +1 -1
- data/lib/wallee-ruby-sdk/models/shopify_subscription_product_create.rb +9 -14
- data/lib/wallee-ruby-sdk/models/{shopify_subscription_product_active.rb → shopify_subscription_product_update.rb} +2 -12
- data/lib/wallee-ruby-sdk/models/shopify_subscription_update_addresses_request.rb +211 -0
- data/lib/wallee-ruby-sdk/models/shopify_subscription_update_request.rb +11 -81
- data/lib/wallee-ruby-sdk/models/shopify_subscription_version.rb +11 -1
- data/lib/wallee-ruby-sdk/models/space.rb +31 -1
- data/lib/wallee-ruby-sdk/models/space_create.rb +11 -1
- data/lib/wallee-ruby-sdk/models/space_update.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.rb +11 -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 +49 -1
- data/lib/wallee-ruby-sdk/models/subscription_charge_create.rb +49 -1
- data/lib/wallee-ruby-sdk/models/subscription_create_request.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/subscription_product_version.rb +11 -1
- data/lib/wallee-ruby-sdk/models/subscription_product_version_pending.rb +14 -4
- data/lib/wallee-ruby-sdk/models/subscription_update_request.rb +206 -0
- data/lib/wallee-ruby-sdk/models/tax_calculation.rb +35 -0
- 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 +132 -4
- data/lib/wallee-ruby-sdk/models/transaction_completion.rb +26 -1
- data/lib/wallee-ruby-sdk/models/transaction_completion_behavior.rb +36 -0
- data/lib/wallee-ruby-sdk/models/transaction_completion_request.rb +26 -1
- data/lib/wallee-ruby-sdk/models/transaction_create.rb +59 -1
- data/lib/wallee-ruby-sdk/models/transaction_pending.rb +59 -1
- 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 +35 -1
- data/lib/wallee-ruby-sdk/models/webhook_url_create.rb +24 -0
- data/lib/wallee-ruby-sdk/models/webhook_url_update.rb +24 -0
- data/lib/wallee-ruby-sdk/version.rb +1 -1
- data/test/condition_type_service_test.rb +22 -0
- data/wallee-ruby-sdk.gemspec +3 -2
- metadata +93 -17
|
@@ -50,6 +50,9 @@ module Wallee
|
|
|
50
50
|
#
|
|
51
51
|
attr_accessor :two_factor_required
|
|
52
52
|
|
|
53
|
+
#
|
|
54
|
+
attr_accessor :web_app_enabled
|
|
55
|
+
|
|
53
56
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
54
57
|
def self.attribute_map
|
|
55
58
|
{
|
|
@@ -62,7 +65,8 @@ module Wallee
|
|
|
62
65
|
:'parent' => :'parent',
|
|
63
66
|
:'path_to_root' => :'pathToRoot',
|
|
64
67
|
:'title' => :'title',
|
|
65
|
-
:'two_factor_required' => :'twoFactorRequired'
|
|
68
|
+
:'two_factor_required' => :'twoFactorRequired',
|
|
69
|
+
:'web_app_enabled' => :'webAppEnabled'
|
|
66
70
|
}
|
|
67
71
|
end
|
|
68
72
|
|
|
@@ -78,7 +82,8 @@ module Wallee
|
|
|
78
82
|
:'parent' => :'Integer',
|
|
79
83
|
:'path_to_root' => :'Array<Integer>',
|
|
80
84
|
:'title' => :'Hash<String, String>',
|
|
81
|
-
:'two_factor_required' => :'BOOLEAN'
|
|
85
|
+
:'two_factor_required' => :'BOOLEAN',
|
|
86
|
+
:'web_app_enabled' => :'BOOLEAN'
|
|
82
87
|
}
|
|
83
88
|
end
|
|
84
89
|
|
|
@@ -137,6 +142,10 @@ module Wallee
|
|
|
137
142
|
if attributes.has_key?(:'twoFactorRequired')
|
|
138
143
|
self.two_factor_required = attributes[:'twoFactorRequired']
|
|
139
144
|
end
|
|
145
|
+
|
|
146
|
+
if attributes.has_key?(:'webAppEnabled')
|
|
147
|
+
self.web_app_enabled = attributes[:'webAppEnabled']
|
|
148
|
+
end
|
|
140
149
|
end
|
|
141
150
|
|
|
142
151
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
@@ -166,7 +175,8 @@ module Wallee
|
|
|
166
175
|
parent == o.parent &&
|
|
167
176
|
path_to_root == o.path_to_root &&
|
|
168
177
|
title == o.title &&
|
|
169
|
-
two_factor_required == o.two_factor_required
|
|
178
|
+
two_factor_required == o.two_factor_required &&
|
|
179
|
+
web_app_enabled == o.web_app_enabled
|
|
170
180
|
end
|
|
171
181
|
|
|
172
182
|
# @see the `==` method
|
|
@@ -178,7 +188,7 @@ module Wallee
|
|
|
178
188
|
# Calculates hash code according to all attributes.
|
|
179
189
|
# @return [Fixnum] Hash code
|
|
180
190
|
def hash
|
|
181
|
-
[description, feature, group, id, leaf, name, parent, path_to_root, title, two_factor_required].hash
|
|
191
|
+
[description, feature, group, id, leaf, name, parent, path_to_root, title, two_factor_required, web_app_enabled].hash
|
|
182
192
|
end
|
|
183
193
|
|
|
184
194
|
# Builds the object from hash
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
The wallee API allows an easy interaction with the wallee web service.
|
|
3
|
+
|
|
4
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
you may not use this file except in compliance with the License.
|
|
6
|
+
You may obtain a copy of the License at
|
|
7
|
+
|
|
8
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
|
|
10
|
+
Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
See the License for the specific language governing permissions and
|
|
14
|
+
limitations under the License.
|
|
15
|
+
|
|
16
|
+
=end
|
|
17
|
+
|
|
18
|
+
require 'date'
|
|
19
|
+
|
|
20
|
+
module Wallee
|
|
21
|
+
class RecurringIndicator
|
|
22
|
+
|
|
23
|
+
REGULAR_TRANSACTION = 'REGULAR_TRANSACTION'.freeze
|
|
24
|
+
INITIAL_RECURRING_TRANSACTION = 'INITIAL_RECURRING_TRANSACTION'.freeze
|
|
25
|
+
MERCHANT_INITIATED_RECURRING_TRANSACTION = 'MERCHANT_INITIATED_RECURRING_TRANSACTION'.freeze
|
|
26
|
+
CUSTOMER_INITIATED_RECURRING_TRANSACTION = 'CUSTOMER_INITIATED_RECURRING_TRANSACTION'.freeze
|
|
27
|
+
|
|
28
|
+
# Builds the enum from string
|
|
29
|
+
# @param [String] The enum value in the form of the string
|
|
30
|
+
# @return [String] The enum value
|
|
31
|
+
def build_from_hash(value)
|
|
32
|
+
constantValues = RecurringIndicator.constants.select { |c| RecurringIndicator::const_get(c) == value }
|
|
33
|
+
raise "Invalid ENUM value #{value} for class #RecurringIndicator" if constantValues.empty?
|
|
34
|
+
value
|
|
35
|
+
end
|
|
36
|
+
end
|
|
37
|
+
end
|
|
@@ -0,0 +1,281 @@
|
|
|
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 RefundBankTransaction
|
|
23
|
+
# The ID is the primary key of the entity. The ID identifies the entity uniquely.
|
|
24
|
+
attr_accessor :id
|
|
25
|
+
|
|
26
|
+
# The linked space id holds the ID of the space to which the entity belongs to.
|
|
27
|
+
attr_accessor :linked_space_id
|
|
28
|
+
|
|
29
|
+
#
|
|
30
|
+
attr_accessor :linked_transaction
|
|
31
|
+
|
|
32
|
+
#
|
|
33
|
+
attr_accessor :bank_transaction
|
|
34
|
+
|
|
35
|
+
#
|
|
36
|
+
attr_accessor :language
|
|
37
|
+
|
|
38
|
+
#
|
|
39
|
+
attr_accessor :refund
|
|
40
|
+
|
|
41
|
+
# Specify the posting amount in the refund's currency.
|
|
42
|
+
attr_accessor :refund_currency_amount
|
|
43
|
+
|
|
44
|
+
#
|
|
45
|
+
attr_accessor :refund_currency_value_amount
|
|
46
|
+
|
|
47
|
+
#
|
|
48
|
+
attr_accessor :space_view_id
|
|
49
|
+
|
|
50
|
+
# The version number indicates the version of the entity. The version is incremented whenever the entity is changed.
|
|
51
|
+
attr_accessor :version
|
|
52
|
+
|
|
53
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
54
|
+
def self.attribute_map
|
|
55
|
+
{
|
|
56
|
+
:'id' => :'id',
|
|
57
|
+
:'linked_space_id' => :'linkedSpaceId',
|
|
58
|
+
:'linked_transaction' => :'linkedTransaction',
|
|
59
|
+
:'bank_transaction' => :'bankTransaction',
|
|
60
|
+
:'language' => :'language',
|
|
61
|
+
:'refund' => :'refund',
|
|
62
|
+
:'refund_currency_amount' => :'refundCurrencyAmount',
|
|
63
|
+
:'refund_currency_value_amount' => :'refundCurrencyValueAmount',
|
|
64
|
+
:'space_view_id' => :'spaceViewId',
|
|
65
|
+
:'version' => :'version'
|
|
66
|
+
}
|
|
67
|
+
end
|
|
68
|
+
|
|
69
|
+
# Attribute type mapping.
|
|
70
|
+
def self.swagger_types
|
|
71
|
+
{
|
|
72
|
+
:'id' => :'Integer',
|
|
73
|
+
:'linked_space_id' => :'Integer',
|
|
74
|
+
:'linked_transaction' => :'Integer',
|
|
75
|
+
:'bank_transaction' => :'BankTransaction',
|
|
76
|
+
:'language' => :'String',
|
|
77
|
+
:'refund' => :'Refund',
|
|
78
|
+
:'refund_currency_amount' => :'Float',
|
|
79
|
+
:'refund_currency_value_amount' => :'Float',
|
|
80
|
+
:'space_view_id' => :'Integer',
|
|
81
|
+
:'version' => :'Integer'
|
|
82
|
+
}
|
|
83
|
+
end
|
|
84
|
+
|
|
85
|
+
# Initializes the object
|
|
86
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
87
|
+
def initialize(attributes = {})
|
|
88
|
+
return unless attributes.is_a?(Hash)
|
|
89
|
+
|
|
90
|
+
# convert string to symbol for hash key
|
|
91
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
|
92
|
+
|
|
93
|
+
if attributes.has_key?(:'id')
|
|
94
|
+
self.id = attributes[:'id']
|
|
95
|
+
end
|
|
96
|
+
|
|
97
|
+
if attributes.has_key?(:'linkedSpaceId')
|
|
98
|
+
self.linked_space_id = attributes[:'linkedSpaceId']
|
|
99
|
+
end
|
|
100
|
+
|
|
101
|
+
if attributes.has_key?(:'linkedTransaction')
|
|
102
|
+
self.linked_transaction = attributes[:'linkedTransaction']
|
|
103
|
+
end
|
|
104
|
+
|
|
105
|
+
if attributes.has_key?(:'bankTransaction')
|
|
106
|
+
self.bank_transaction = attributes[:'bankTransaction']
|
|
107
|
+
end
|
|
108
|
+
|
|
109
|
+
if attributes.has_key?(:'language')
|
|
110
|
+
self.language = attributes[:'language']
|
|
111
|
+
end
|
|
112
|
+
|
|
113
|
+
if attributes.has_key?(:'refund')
|
|
114
|
+
self.refund = attributes[:'refund']
|
|
115
|
+
end
|
|
116
|
+
|
|
117
|
+
if attributes.has_key?(:'refundCurrencyAmount')
|
|
118
|
+
self.refund_currency_amount = attributes[:'refundCurrencyAmount']
|
|
119
|
+
end
|
|
120
|
+
|
|
121
|
+
if attributes.has_key?(:'refundCurrencyValueAmount')
|
|
122
|
+
self.refund_currency_value_amount = attributes[:'refundCurrencyValueAmount']
|
|
123
|
+
end
|
|
124
|
+
|
|
125
|
+
if attributes.has_key?(:'spaceViewId')
|
|
126
|
+
self.space_view_id = attributes[:'spaceViewId']
|
|
127
|
+
end
|
|
128
|
+
|
|
129
|
+
if attributes.has_key?(:'version')
|
|
130
|
+
self.version = attributes[:'version']
|
|
131
|
+
end
|
|
132
|
+
end
|
|
133
|
+
|
|
134
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
135
|
+
# @return Array for valid properties with the reasons
|
|
136
|
+
def list_invalid_properties
|
|
137
|
+
invalid_properties = Array.new
|
|
138
|
+
invalid_properties
|
|
139
|
+
end
|
|
140
|
+
|
|
141
|
+
# Check to see if the all the properties in the model are valid
|
|
142
|
+
# @return true if the model is valid
|
|
143
|
+
def valid?
|
|
144
|
+
true
|
|
145
|
+
end
|
|
146
|
+
|
|
147
|
+
# Checks equality by comparing each attribute.
|
|
148
|
+
# @param [Object] Object to be compared
|
|
149
|
+
def ==(o)
|
|
150
|
+
return true if self.equal?(o)
|
|
151
|
+
self.class == o.class &&
|
|
152
|
+
id == o.id &&
|
|
153
|
+
linked_space_id == o.linked_space_id &&
|
|
154
|
+
linked_transaction == o.linked_transaction &&
|
|
155
|
+
bank_transaction == o.bank_transaction &&
|
|
156
|
+
language == o.language &&
|
|
157
|
+
refund == o.refund &&
|
|
158
|
+
refund_currency_amount == o.refund_currency_amount &&
|
|
159
|
+
refund_currency_value_amount == o.refund_currency_value_amount &&
|
|
160
|
+
space_view_id == o.space_view_id &&
|
|
161
|
+
version == o.version
|
|
162
|
+
end
|
|
163
|
+
|
|
164
|
+
# @see the `==` method
|
|
165
|
+
# @param [Object] Object to be compared
|
|
166
|
+
def eql?(o)
|
|
167
|
+
self == o
|
|
168
|
+
end
|
|
169
|
+
|
|
170
|
+
# Calculates hash code according to all attributes.
|
|
171
|
+
# @return [Fixnum] Hash code
|
|
172
|
+
def hash
|
|
173
|
+
[id, linked_space_id, linked_transaction, bank_transaction, language, refund, refund_currency_amount, refund_currency_value_amount, space_view_id, version].hash
|
|
174
|
+
end
|
|
175
|
+
|
|
176
|
+
# Builds the object from hash
|
|
177
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
178
|
+
# @return [Object] Returns the model itself
|
|
179
|
+
def build_from_hash(attributes)
|
|
180
|
+
return nil unless attributes.is_a?(Hash)
|
|
181
|
+
self.class.swagger_types.each_pair do |key, type|
|
|
182
|
+
if type =~ /\AArray<(.*)>/i
|
|
183
|
+
# check to ensure the input is an array given that the attribute
|
|
184
|
+
# is documented as an array but the input is not
|
|
185
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
186
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
|
|
187
|
+
end
|
|
188
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
189
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
|
190
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
|
191
|
+
end
|
|
192
|
+
|
|
193
|
+
self
|
|
194
|
+
end
|
|
195
|
+
|
|
196
|
+
# Deserializes the data based on type
|
|
197
|
+
# @param string type Data type
|
|
198
|
+
# @param string value Value to be deserialized
|
|
199
|
+
# @return [Object] Deserialized data
|
|
200
|
+
def _deserialize(type, value)
|
|
201
|
+
case type.to_sym
|
|
202
|
+
when :DateTime
|
|
203
|
+
DateTime.parse(value)
|
|
204
|
+
when :Date
|
|
205
|
+
Date.parse(value)
|
|
206
|
+
when :String
|
|
207
|
+
value.to_s
|
|
208
|
+
when :Integer
|
|
209
|
+
value.to_i
|
|
210
|
+
when :Float
|
|
211
|
+
value.to_f
|
|
212
|
+
when :BOOLEAN
|
|
213
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
214
|
+
true
|
|
215
|
+
else
|
|
216
|
+
false
|
|
217
|
+
end
|
|
218
|
+
when :Object
|
|
219
|
+
# generic object (usually a Hash), return directly
|
|
220
|
+
value
|
|
221
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
222
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
223
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
224
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
225
|
+
k_type = Regexp.last_match[:k_type]
|
|
226
|
+
v_type = Regexp.last_match[:v_type]
|
|
227
|
+
{}.tap do |hash|
|
|
228
|
+
value.each do |k, v|
|
|
229
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
230
|
+
end
|
|
231
|
+
end
|
|
232
|
+
else # model
|
|
233
|
+
temp_model = Wallee.const_get(type).new
|
|
234
|
+
temp_model.build_from_hash(value)
|
|
235
|
+
end
|
|
236
|
+
end
|
|
237
|
+
|
|
238
|
+
# Returns the string representation of the object
|
|
239
|
+
# @return [String] String presentation of the object
|
|
240
|
+
def to_s
|
|
241
|
+
to_hash.to_s
|
|
242
|
+
end
|
|
243
|
+
|
|
244
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
245
|
+
# @return [Hash] Returns the object in the form of hash
|
|
246
|
+
def to_body
|
|
247
|
+
to_hash
|
|
248
|
+
end
|
|
249
|
+
|
|
250
|
+
# Returns the object in the form of hash
|
|
251
|
+
# @return [Hash] Returns the object in the form of hash
|
|
252
|
+
def to_hash
|
|
253
|
+
hash = {}
|
|
254
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
255
|
+
value = self.send(attr)
|
|
256
|
+
next if value.nil?
|
|
257
|
+
hash[param] = _to_hash(value)
|
|
258
|
+
end
|
|
259
|
+
hash
|
|
260
|
+
end
|
|
261
|
+
|
|
262
|
+
# Outputs non-array value in the form of hash
|
|
263
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
264
|
+
# @param [Object] value Any valid value
|
|
265
|
+
# @return [Hash] Returns the value in the form of hash
|
|
266
|
+
def _to_hash(value)
|
|
267
|
+
if value.is_a?(Array)
|
|
268
|
+
value.compact.map{ |v| _to_hash(v) }
|
|
269
|
+
elsif value.is_a?(Hash)
|
|
270
|
+
{}.tap do |hash|
|
|
271
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
272
|
+
end
|
|
273
|
+
elsif value.respond_to? :to_hash
|
|
274
|
+
value.to_hash
|
|
275
|
+
else
|
|
276
|
+
value
|
|
277
|
+
end
|
|
278
|
+
end
|
|
279
|
+
|
|
280
|
+
end
|
|
281
|
+
end
|
|
@@ -0,0 +1,293 @@
|
|
|
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 RefundRecoveryBankTransaction
|
|
23
|
+
# The ID is the primary key of the entity. The ID identifies the entity uniquely.
|
|
24
|
+
attr_accessor :id
|
|
25
|
+
|
|
26
|
+
# The linked space id holds the ID of the space to which the entity belongs to.
|
|
27
|
+
attr_accessor :linked_space_id
|
|
28
|
+
|
|
29
|
+
#
|
|
30
|
+
attr_accessor :linked_transaction
|
|
31
|
+
|
|
32
|
+
#
|
|
33
|
+
attr_accessor :bank_transaction
|
|
34
|
+
|
|
35
|
+
#
|
|
36
|
+
attr_accessor :language
|
|
37
|
+
|
|
38
|
+
# The line items contain the items which could be recovered.
|
|
39
|
+
attr_accessor :line_items
|
|
40
|
+
|
|
41
|
+
#
|
|
42
|
+
attr_accessor :refund
|
|
43
|
+
|
|
44
|
+
# Specify the posting amount in the refund's currency.
|
|
45
|
+
attr_accessor :refund_currency_amount
|
|
46
|
+
|
|
47
|
+
#
|
|
48
|
+
attr_accessor :refund_currency_value_amount
|
|
49
|
+
|
|
50
|
+
#
|
|
51
|
+
attr_accessor :space_view_id
|
|
52
|
+
|
|
53
|
+
# The version number indicates the version of the entity. The version is incremented whenever the entity is changed.
|
|
54
|
+
attr_accessor :version
|
|
55
|
+
|
|
56
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
57
|
+
def self.attribute_map
|
|
58
|
+
{
|
|
59
|
+
:'id' => :'id',
|
|
60
|
+
:'linked_space_id' => :'linkedSpaceId',
|
|
61
|
+
:'linked_transaction' => :'linkedTransaction',
|
|
62
|
+
:'bank_transaction' => :'bankTransaction',
|
|
63
|
+
:'language' => :'language',
|
|
64
|
+
:'line_items' => :'lineItems',
|
|
65
|
+
:'refund' => :'refund',
|
|
66
|
+
:'refund_currency_amount' => :'refundCurrencyAmount',
|
|
67
|
+
:'refund_currency_value_amount' => :'refundCurrencyValueAmount',
|
|
68
|
+
:'space_view_id' => :'spaceViewId',
|
|
69
|
+
:'version' => :'version'
|
|
70
|
+
}
|
|
71
|
+
end
|
|
72
|
+
|
|
73
|
+
# Attribute type mapping.
|
|
74
|
+
def self.swagger_types
|
|
75
|
+
{
|
|
76
|
+
:'id' => :'Integer',
|
|
77
|
+
:'linked_space_id' => :'Integer',
|
|
78
|
+
:'linked_transaction' => :'Integer',
|
|
79
|
+
:'bank_transaction' => :'BankTransaction',
|
|
80
|
+
:'language' => :'String',
|
|
81
|
+
:'line_items' => :'Array<LineItem>',
|
|
82
|
+
:'refund' => :'Refund',
|
|
83
|
+
:'refund_currency_amount' => :'Float',
|
|
84
|
+
:'refund_currency_value_amount' => :'Float',
|
|
85
|
+
:'space_view_id' => :'Integer',
|
|
86
|
+
:'version' => :'Integer'
|
|
87
|
+
}
|
|
88
|
+
end
|
|
89
|
+
|
|
90
|
+
# Initializes the object
|
|
91
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
92
|
+
def initialize(attributes = {})
|
|
93
|
+
return unless attributes.is_a?(Hash)
|
|
94
|
+
|
|
95
|
+
# convert string to symbol for hash key
|
|
96
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
|
97
|
+
|
|
98
|
+
if attributes.has_key?(:'id')
|
|
99
|
+
self.id = attributes[:'id']
|
|
100
|
+
end
|
|
101
|
+
|
|
102
|
+
if attributes.has_key?(:'linkedSpaceId')
|
|
103
|
+
self.linked_space_id = attributes[:'linkedSpaceId']
|
|
104
|
+
end
|
|
105
|
+
|
|
106
|
+
if attributes.has_key?(:'linkedTransaction')
|
|
107
|
+
self.linked_transaction = attributes[:'linkedTransaction']
|
|
108
|
+
end
|
|
109
|
+
|
|
110
|
+
if attributes.has_key?(:'bankTransaction')
|
|
111
|
+
self.bank_transaction = attributes[:'bankTransaction']
|
|
112
|
+
end
|
|
113
|
+
|
|
114
|
+
if attributes.has_key?(:'language')
|
|
115
|
+
self.language = attributes[:'language']
|
|
116
|
+
end
|
|
117
|
+
|
|
118
|
+
if attributes.has_key?(:'lineItems')
|
|
119
|
+
if (value = attributes[:'lineItems']).is_a?(Array)
|
|
120
|
+
self.line_items = value
|
|
121
|
+
end
|
|
122
|
+
end
|
|
123
|
+
|
|
124
|
+
if attributes.has_key?(:'refund')
|
|
125
|
+
self.refund = attributes[:'refund']
|
|
126
|
+
end
|
|
127
|
+
|
|
128
|
+
if attributes.has_key?(:'refundCurrencyAmount')
|
|
129
|
+
self.refund_currency_amount = attributes[:'refundCurrencyAmount']
|
|
130
|
+
end
|
|
131
|
+
|
|
132
|
+
if attributes.has_key?(:'refundCurrencyValueAmount')
|
|
133
|
+
self.refund_currency_value_amount = attributes[:'refundCurrencyValueAmount']
|
|
134
|
+
end
|
|
135
|
+
|
|
136
|
+
if attributes.has_key?(:'spaceViewId')
|
|
137
|
+
self.space_view_id = attributes[:'spaceViewId']
|
|
138
|
+
end
|
|
139
|
+
|
|
140
|
+
if attributes.has_key?(:'version')
|
|
141
|
+
self.version = attributes[:'version']
|
|
142
|
+
end
|
|
143
|
+
end
|
|
144
|
+
|
|
145
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
146
|
+
# @return Array for valid properties with the reasons
|
|
147
|
+
def list_invalid_properties
|
|
148
|
+
invalid_properties = Array.new
|
|
149
|
+
invalid_properties
|
|
150
|
+
end
|
|
151
|
+
|
|
152
|
+
# Check to see if the all the properties in the model are valid
|
|
153
|
+
# @return true if the model is valid
|
|
154
|
+
def valid?
|
|
155
|
+
true
|
|
156
|
+
end
|
|
157
|
+
|
|
158
|
+
# Checks equality by comparing each attribute.
|
|
159
|
+
# @param [Object] Object to be compared
|
|
160
|
+
def ==(o)
|
|
161
|
+
return true if self.equal?(o)
|
|
162
|
+
self.class == o.class &&
|
|
163
|
+
id == o.id &&
|
|
164
|
+
linked_space_id == o.linked_space_id &&
|
|
165
|
+
linked_transaction == o.linked_transaction &&
|
|
166
|
+
bank_transaction == o.bank_transaction &&
|
|
167
|
+
language == o.language &&
|
|
168
|
+
line_items == o.line_items &&
|
|
169
|
+
refund == o.refund &&
|
|
170
|
+
refund_currency_amount == o.refund_currency_amount &&
|
|
171
|
+
refund_currency_value_amount == o.refund_currency_value_amount &&
|
|
172
|
+
space_view_id == o.space_view_id &&
|
|
173
|
+
version == o.version
|
|
174
|
+
end
|
|
175
|
+
|
|
176
|
+
# @see the `==` method
|
|
177
|
+
# @param [Object] Object to be compared
|
|
178
|
+
def eql?(o)
|
|
179
|
+
self == o
|
|
180
|
+
end
|
|
181
|
+
|
|
182
|
+
# Calculates hash code according to all attributes.
|
|
183
|
+
# @return [Fixnum] Hash code
|
|
184
|
+
def hash
|
|
185
|
+
[id, linked_space_id, linked_transaction, bank_transaction, language, line_items, refund, refund_currency_amount, refund_currency_value_amount, space_view_id, version].hash
|
|
186
|
+
end
|
|
187
|
+
|
|
188
|
+
# Builds the object from hash
|
|
189
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
190
|
+
# @return [Object] Returns the model itself
|
|
191
|
+
def build_from_hash(attributes)
|
|
192
|
+
return nil unless attributes.is_a?(Hash)
|
|
193
|
+
self.class.swagger_types.each_pair do |key, type|
|
|
194
|
+
if type =~ /\AArray<(.*)>/i
|
|
195
|
+
# check to ensure the input is an array given that the attribute
|
|
196
|
+
# is documented as an array but the input is not
|
|
197
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
198
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
|
|
199
|
+
end
|
|
200
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
201
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
|
202
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
|
203
|
+
end
|
|
204
|
+
|
|
205
|
+
self
|
|
206
|
+
end
|
|
207
|
+
|
|
208
|
+
# Deserializes the data based on type
|
|
209
|
+
# @param string type Data type
|
|
210
|
+
# @param string value Value to be deserialized
|
|
211
|
+
# @return [Object] Deserialized data
|
|
212
|
+
def _deserialize(type, value)
|
|
213
|
+
case type.to_sym
|
|
214
|
+
when :DateTime
|
|
215
|
+
DateTime.parse(value)
|
|
216
|
+
when :Date
|
|
217
|
+
Date.parse(value)
|
|
218
|
+
when :String
|
|
219
|
+
value.to_s
|
|
220
|
+
when :Integer
|
|
221
|
+
value.to_i
|
|
222
|
+
when :Float
|
|
223
|
+
value.to_f
|
|
224
|
+
when :BOOLEAN
|
|
225
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
226
|
+
true
|
|
227
|
+
else
|
|
228
|
+
false
|
|
229
|
+
end
|
|
230
|
+
when :Object
|
|
231
|
+
# generic object (usually a Hash), return directly
|
|
232
|
+
value
|
|
233
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
234
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
235
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
236
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
237
|
+
k_type = Regexp.last_match[:k_type]
|
|
238
|
+
v_type = Regexp.last_match[:v_type]
|
|
239
|
+
{}.tap do |hash|
|
|
240
|
+
value.each do |k, v|
|
|
241
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
242
|
+
end
|
|
243
|
+
end
|
|
244
|
+
else # model
|
|
245
|
+
temp_model = Wallee.const_get(type).new
|
|
246
|
+
temp_model.build_from_hash(value)
|
|
247
|
+
end
|
|
248
|
+
end
|
|
249
|
+
|
|
250
|
+
# Returns the string representation of the object
|
|
251
|
+
# @return [String] String presentation of the object
|
|
252
|
+
def to_s
|
|
253
|
+
to_hash.to_s
|
|
254
|
+
end
|
|
255
|
+
|
|
256
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
257
|
+
# @return [Hash] Returns the object in the form of hash
|
|
258
|
+
def to_body
|
|
259
|
+
to_hash
|
|
260
|
+
end
|
|
261
|
+
|
|
262
|
+
# Returns the object in the form of hash
|
|
263
|
+
# @return [Hash] Returns the object in the form of hash
|
|
264
|
+
def to_hash
|
|
265
|
+
hash = {}
|
|
266
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
267
|
+
value = self.send(attr)
|
|
268
|
+
next if value.nil?
|
|
269
|
+
hash[param] = _to_hash(value)
|
|
270
|
+
end
|
|
271
|
+
hash
|
|
272
|
+
end
|
|
273
|
+
|
|
274
|
+
# Outputs non-array value in the form of hash
|
|
275
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
276
|
+
# @param [Object] value Any valid value
|
|
277
|
+
# @return [Hash] Returns the value in the form of hash
|
|
278
|
+
def _to_hash(value)
|
|
279
|
+
if value.is_a?(Array)
|
|
280
|
+
value.compact.map{ |v| _to_hash(v) }
|
|
281
|
+
elsif value.is_a?(Hash)
|
|
282
|
+
{}.tap do |hash|
|
|
283
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
284
|
+
end
|
|
285
|
+
elsif value.respond_to? :to_hash
|
|
286
|
+
value.to_hash
|
|
287
|
+
else
|
|
288
|
+
value
|
|
289
|
+
end
|
|
290
|
+
end
|
|
291
|
+
|
|
292
|
+
end
|
|
293
|
+
end
|