wallee-ruby-sdk 2.2.4 → 2.2.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.
Files changed (40) hide show
  1. checksums.yaml +4 -4
  2. data/LICENSE +1 -1
  3. data/lib/wallee-ruby-sdk.rb +23 -1
  4. data/lib/wallee-ruby-sdk/api/charge_bank_transaction_service_api.rb +213 -0
  5. data/lib/wallee-ruby-sdk/api/external_transfer_bank_transaction_service_api.rb +213 -0
  6. data/lib/wallee-ruby-sdk/api/internal_transfer_bank_transaction_service_api.rb +213 -0
  7. data/lib/wallee-ruby-sdk/api/refund_bank_transaction_service_api.rb +213 -0
  8. data/lib/wallee-ruby-sdk/api/refund_recovery_bank_transaction_service_api.rb +213 -0
  9. data/lib/wallee-ruby-sdk/api_client.rb +2 -1
  10. data/lib/wallee-ruby-sdk/models/abstract_payment_link_update.rb +15 -15
  11. data/lib/wallee-ruby-sdk/models/bank_account.rb +291 -0
  12. data/lib/wallee-ruby-sdk/models/bank_account_environment.rb +35 -0
  13. data/lib/wallee-ruby-sdk/models/bank_account_state.rb +37 -0
  14. data/lib/wallee-ruby-sdk/models/bank_account_type.rb +227 -0
  15. data/lib/wallee-ruby-sdk/models/bank_transaction.rb +387 -0
  16. data/lib/wallee-ruby-sdk/models/bank_transaction_flow_direction.rb +35 -0
  17. data/lib/wallee-ruby-sdk/models/bank_transaction_source.rb +215 -0
  18. data/lib/wallee-ruby-sdk/models/bank_transaction_state.rb +35 -0
  19. data/lib/wallee-ruby-sdk/models/bank_transaction_type.rb +215 -0
  20. data/lib/wallee-ruby-sdk/models/charge_bank_transaction.rb +291 -0
  21. data/lib/wallee-ruby-sdk/models/currency_bank_account.rb +241 -0
  22. data/lib/wallee-ruby-sdk/models/external_transfer_bank_transaction.rb +251 -0
  23. data/lib/wallee-ruby-sdk/models/internal_transfer_bank_transaction.rb +231 -0
  24. data/lib/wallee-ruby-sdk/models/payment_adjustment.rb +231 -0
  25. data/lib/wallee-ruby-sdk/models/payment_adjustment_type.rb +215 -0
  26. data/lib/wallee-ruby-sdk/models/payment_link.rb +15 -15
  27. data/lib/wallee-ruby-sdk/models/payment_link_active.rb +15 -15
  28. data/lib/wallee-ruby-sdk/models/payment_link_address_handling_mode.rb +36 -0
  29. data/lib/wallee-ruby-sdk/models/payment_link_create.rb +15 -15
  30. data/lib/wallee-ruby-sdk/models/payment_link_update.rb +15 -15
  31. data/lib/wallee-ruby-sdk/models/payment_terminal_address.rb +0 -60
  32. data/lib/wallee-ruby-sdk/models/payment_terminal_location.rb +2 -12
  33. data/lib/wallee-ruby-sdk/models/refund_bank_transaction.rb +281 -0
  34. data/lib/wallee-ruby-sdk/models/refund_recovery_bank_transaction.rb +293 -0
  35. data/lib/wallee-ruby-sdk/models/subscription_ledger_entry.rb +11 -1
  36. data/lib/wallee-ruby-sdk/models/transaction.rb +64 -4
  37. data/lib/wallee-ruby-sdk/version.rb +1 -1
  38. data/test/condition_type_service_test.rb +22 -0
  39. metadata +27 -3
  40. data/lib/wallee-ruby-sdk/models/payment_terminal_contact_address.rb +0 -396
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 12d2947ae67c618d5b5e6100e679a7d33aee0d25ce1ab6b9eb306dedbfe1a3d2
4
- data.tar.gz: 9b123391b875891887cae25e0edc85266961890b63822fd7a0edee0bad065ebb
3
+ metadata.gz: c20a715f8063a076d6344a05ff0943859508a083ec8a9c45ec2c2c43f9deff1c
4
+ data.tar.gz: 0db293b715417759f855664e641f47e9d7025a0fa36cf0b9b3aab4e487272aa1
5
5
  SHA512:
6
- metadata.gz: 82b2a3642f0badf09180b3dc7a45b41247fe7e002ba0f207a0ca022ce531a06043ef0f01a3b41ebb7e7e6ecaca3508fddea78ae6249f3399678b6130e2168f5d
7
- data.tar.gz: a17cf091235fc97f89098c37b86ef472e7c7adb6fab110689b9f7fff2f90c4920ff584bc91538324ca9821b16740f64d4f969d6ca2ef10c47bd93f2b2387cdf9
6
+ metadata.gz: 9d825ac567b0363fb226985957d5688c521b6ab8f8a922fc6a34c78f2d22725a9ab22558ee59b7f98b57fb7bd3710d55234b6ceebfc534e08ae771065b156329
7
+ data.tar.gz: 62b0dc53e44013f53f645fc2feccbec6fc7d429e6825cfff61242c39a79f179e02236bf836f6993c7a10861f5034476e436b955ad7e745179858cf6563b2627c
data/LICENSE CHANGED
@@ -186,7 +186,7 @@
186
186
  same "printed page" as the copyright notice for easier
187
187
  identification within third-party archives.
188
188
 
189
- Copyright 2020 wallee AG
189
+ Copyright 2021 wallee AG
190
190
 
191
191
  Licensed under the Apache License, Version 2.0 (the "License");
192
192
  you may not use this file except in compliance with the License.
@@ -48,6 +48,15 @@ require 'wallee-ruby-sdk/models/account_state'
48
48
  require 'wallee-ruby-sdk/models/account_type'
49
49
  require 'wallee-ruby-sdk/models/address'
50
50
  require 'wallee-ruby-sdk/models/address_create'
51
+ require 'wallee-ruby-sdk/models/bank_account'
52
+ require 'wallee-ruby-sdk/models/bank_account_environment'
53
+ require 'wallee-ruby-sdk/models/bank_account_state'
54
+ require 'wallee-ruby-sdk/models/bank_account_type'
55
+ require 'wallee-ruby-sdk/models/bank_transaction'
56
+ require 'wallee-ruby-sdk/models/bank_transaction_flow_direction'
57
+ require 'wallee-ruby-sdk/models/bank_transaction_source'
58
+ require 'wallee-ruby-sdk/models/bank_transaction_state'
59
+ require 'wallee-ruby-sdk/models/bank_transaction_type'
51
60
  require 'wallee-ruby-sdk/models/charge_attempt_environment'
52
61
  require 'wallee-ruby-sdk/models/charge_attempt_state'
53
62
  require 'wallee-ruby-sdk/models/charge_flow'
@@ -65,6 +74,7 @@ require 'wallee-ruby-sdk/models/condition_type'
65
74
  require 'wallee-ruby-sdk/models/connector_invocation_stage'
66
75
  require 'wallee-ruby-sdk/models/creation_entity_state'
67
76
  require 'wallee-ruby-sdk/models/criteria_operator'
77
+ require 'wallee-ruby-sdk/models/currency_bank_account'
68
78
  require 'wallee-ruby-sdk/models/customer'
69
79
  require 'wallee-ruby-sdk/models/customer_address'
70
80
  require 'wallee-ruby-sdk/models/customer_address_type'
@@ -100,6 +110,7 @@ require 'wallee-ruby-sdk/models/entity_query_filter_type'
100
110
  require 'wallee-ruby-sdk/models/entity_query_order_by'
101
111
  require 'wallee-ruby-sdk/models/entity_query_order_by_type'
102
112
  require 'wallee-ruby-sdk/models/environment'
113
+ require 'wallee-ruby-sdk/models/external_transfer_bank_transaction'
103
114
  require 'wallee-ruby-sdk/models/failure_category'
104
115
  require 'wallee-ruby-sdk/models/failure_reason'
105
116
  require 'wallee-ruby-sdk/models/feature'
@@ -113,6 +124,7 @@ require 'wallee-ruby-sdk/models/installment_payment_slice_state'
113
124
  require 'wallee-ruby-sdk/models/installment_payment_state'
114
125
  require 'wallee-ruby-sdk/models/installment_plan_configuration'
115
126
  require 'wallee-ruby-sdk/models/installment_plan_slice_configuration'
127
+ require 'wallee-ruby-sdk/models/internal_transfer_bank_transaction'
116
128
  require 'wallee-ruby-sdk/models/label'
117
129
  require 'wallee-ruby-sdk/models/label_descriptor'
118
130
  require 'wallee-ruby-sdk/models/label_descriptor_category'
@@ -134,6 +146,8 @@ require 'wallee-ruby-sdk/models/manual_task_state'
134
146
  require 'wallee-ruby-sdk/models/manual_task_type'
135
147
  require 'wallee-ruby-sdk/models/metric_usage'
136
148
  require 'wallee-ruby-sdk/models/one_click_payment_mode'
149
+ require 'wallee-ruby-sdk/models/payment_adjustment'
150
+ require 'wallee-ruby-sdk/models/payment_adjustment_type'
137
151
  require 'wallee-ruby-sdk/models/payment_connector'
138
152
  require 'wallee-ruby-sdk/models/payment_connector_configuration'
139
153
  require 'wallee-ruby-sdk/models/payment_connector_feature'
@@ -143,6 +157,7 @@ require 'wallee-ruby-sdk/models/payment_contract_type'
143
157
  require 'wallee-ruby-sdk/models/payment_information_hash'
144
158
  require 'wallee-ruby-sdk/models/payment_information_hash_type'
145
159
  require 'wallee-ruby-sdk/models/payment_link'
160
+ require 'wallee-ruby-sdk/models/payment_link_address_handling_mode'
146
161
  require 'wallee-ruby-sdk/models/payment_link_protection_mode'
147
162
  require 'wallee-ruby-sdk/models/payment_link_update'
148
163
  require 'wallee-ruby-sdk/models/payment_method'
@@ -331,6 +346,7 @@ require 'wallee-ruby-sdk/models/application_user_create'
331
346
  require 'wallee-ruby-sdk/models/application_user_update'
332
347
  require 'wallee-ruby-sdk/models/charge'
333
348
  require 'wallee-ruby-sdk/models/charge_attempt'
349
+ require 'wallee-ruby-sdk/models/charge_bank_transaction'
334
350
  require 'wallee-ruby-sdk/models/charge_flow_level'
335
351
  require 'wallee-ruby-sdk/models/charge_flow_level_payment_link'
336
352
  require 'wallee-ruby-sdk/models/connector_invocation'
@@ -348,9 +364,10 @@ require 'wallee-ruby-sdk/models/human_user_update'
348
364
  require 'wallee-ruby-sdk/models/installment_payment_slice'
349
365
  require 'wallee-ruby-sdk/models/payment_link_active'
350
366
  require 'wallee-ruby-sdk/models/payment_link_create'
351
- require 'wallee-ruby-sdk/models/payment_terminal_contact_address'
367
+ require 'wallee-ruby-sdk/models/refund_bank_transaction'
352
368
  require 'wallee-ruby-sdk/models/refund_comment_active'
353
369
  require 'wallee-ruby-sdk/models/refund_comment_create'
370
+ require 'wallee-ruby-sdk/models/refund_recovery_bank_transaction'
354
371
  require 'wallee-ruby-sdk/models/shopify_recurring_order'
355
372
  require 'wallee-ruby-sdk/models/shopify_subscription_address'
356
373
  require 'wallee-ruby-sdk/models/shopify_subscription_product_create'
@@ -393,6 +410,7 @@ require 'wallee-ruby-sdk/api/account_service_api'
393
410
  require 'wallee-ruby-sdk/api/application_user_service_api'
394
411
  require 'wallee-ruby-sdk/api/card_processing_service_api'
395
412
  require 'wallee-ruby-sdk/api/charge_attempt_service_api'
413
+ require 'wallee-ruby-sdk/api/charge_bank_transaction_service_api'
396
414
  require 'wallee-ruby-sdk/api/charge_flow_level_payment_link_service_api'
397
415
  require 'wallee-ruby-sdk/api/charge_flow_level_service_api'
398
416
  require 'wallee-ruby-sdk/api/charge_flow_service_api'
@@ -409,12 +427,14 @@ require 'wallee-ruby-sdk/api/debt_collector_service_api'
409
427
  require 'wallee-ruby-sdk/api/delivery_indication_service_api'
410
428
  require 'wallee-ruby-sdk/api/document_template_service_api'
411
429
  require 'wallee-ruby-sdk/api/document_template_type_service_api'
430
+ require 'wallee-ruby-sdk/api/external_transfer_bank_transaction_service_api'
412
431
  require 'wallee-ruby-sdk/api/human_user_service_api'
413
432
  require 'wallee-ruby-sdk/api/installment_payment_service_api'
414
433
  require 'wallee-ruby-sdk/api/installment_payment_slice_service_api'
415
434
  require 'wallee-ruby-sdk/api/installment_plan_calculation_service_api'
416
435
  require 'wallee-ruby-sdk/api/installment_plan_configuration_service_api'
417
436
  require 'wallee-ruby-sdk/api/installment_plan_slice_configuration_service_api'
437
+ require 'wallee-ruby-sdk/api/internal_transfer_bank_transaction_service_api'
418
438
  require 'wallee-ruby-sdk/api/label_description_group_service_api'
419
439
  require 'wallee-ruby-sdk/api/label_description_service_api'
420
440
  require 'wallee-ruby-sdk/api/language_service_api'
@@ -432,7 +452,9 @@ require 'wallee-ruby-sdk/api/payment_processor_service_api'
432
452
  require 'wallee-ruby-sdk/api/payment_terminal_service_api'
433
453
  require 'wallee-ruby-sdk/api/payment_terminal_till_service_api'
434
454
  require 'wallee-ruby-sdk/api/permission_service_api'
455
+ require 'wallee-ruby-sdk/api/refund_bank_transaction_service_api'
435
456
  require 'wallee-ruby-sdk/api/refund_comment_service_api'
457
+ require 'wallee-ruby-sdk/api/refund_recovery_bank_transaction_service_api'
436
458
  require 'wallee-ruby-sdk/api/refund_service_api'
437
459
  require 'wallee-ruby-sdk/api/shopify_recurring_order_service_api'
438
460
  require 'wallee-ruby-sdk/api/shopify_subscriber_service_api'
@@ -0,0 +1,213 @@
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 "uri"
19
+
20
+ module Wallee
21
+ class ChargeBankTransactionService
22
+ attr_accessor :api_client
23
+
24
+ def initialize(api_client = ApiClient.default)
25
+ @api_client = api_client
26
+ end
27
+
28
+ # Count
29
+ # Counts the number of items in the database as restricted by the given filter.
30
+ # @param space_id
31
+ # @param [Hash] opts the optional parameters
32
+ # @option opts [EntityQueryFilter] :filter The filter which restricts the entities which are used to calculate the count.
33
+ # @return [Integer]
34
+ def count(space_id, opts = {})
35
+ data, _status_code, _headers = count_with_http_info(space_id, opts)
36
+ return data
37
+ end
38
+
39
+ # Count
40
+ # Counts the number of items in the database as restricted by the given filter.
41
+ # @param space_id
42
+ # @param [Hash] opts the optional parameters
43
+ # @option opts [EntityQueryFilter] :filter The filter which restricts the entities which are used to calculate the count.
44
+ # @return [Array<(Integer, Fixnum, Hash)>] Integer data, response status code and response headers
45
+ def count_with_http_info(space_id, opts = {})
46
+ if @api_client.config.debugging
47
+ @api_client.config.logger.debug "Calling API: ChargeBankTransactionService.count ..."
48
+ end
49
+ # verify the required parameter 'space_id' is set
50
+ fail ArgumentError, "Missing the required parameter 'space_id' when calling ChargeBankTransactionService.count" if space_id.nil?
51
+ # resource path
52
+ local_var_path = "/charge-bank-transaction/count".sub('{format}','json')
53
+
54
+ # query parameters
55
+ query_params = {}
56
+ query_params[:'spaceId'] = space_id
57
+
58
+ # header parameters
59
+ header_params = {}
60
+
61
+ # HTTP header 'Accept' (if needed)
62
+ local_header_accept = ['application/json;charset=utf-8']
63
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
64
+
65
+ # HTTP header 'Content-Type'
66
+ local_header_content_type = ['application/json;charset=utf-8']
67
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
68
+
69
+ # form parameters
70
+ form_params = {}
71
+
72
+ # http body (model)
73
+ post_body = @api_client.object_to_http_body(opts[:'filter'])
74
+ auth_names = []
75
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
76
+ :header_params => header_params,
77
+ :query_params => query_params,
78
+ :form_params => form_params,
79
+ :body => post_body,
80
+ :auth_names => auth_names,
81
+ :return_type => 'Integer')
82
+ if @api_client.config.debugging
83
+ @api_client.config.logger.debug "API called: ChargeBankTransactionService#count\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
84
+ end
85
+ return data, status_code, headers
86
+ end
87
+
88
+ # Read
89
+ # Reads the entity with the given 'id' and returns it.
90
+ # @param space_id
91
+ # @param id The ID of the charge bank transaction which should be returned.
92
+ # @param [Hash] opts the optional parameters
93
+ # @return [ChargeBankTransaction]
94
+ def read(space_id, id, opts = {})
95
+ data, _status_code, _headers = read_with_http_info(space_id, id, opts)
96
+ return data
97
+ end
98
+
99
+ # Read
100
+ # Reads the entity with the given &#39;id&#39; and returns it.
101
+ # @param space_id
102
+ # @param id The ID of the charge bank transaction which should be returned.
103
+ # @param [Hash] opts the optional parameters
104
+ # @return [Array<(ChargeBankTransaction, Fixnum, Hash)>] ChargeBankTransaction data, response status code and response headers
105
+ def read_with_http_info(space_id, id, opts = {})
106
+ if @api_client.config.debugging
107
+ @api_client.config.logger.debug "Calling API: ChargeBankTransactionService.read ..."
108
+ end
109
+ # verify the required parameter 'space_id' is set
110
+ fail ArgumentError, "Missing the required parameter 'space_id' when calling ChargeBankTransactionService.read" if space_id.nil?
111
+ # verify the required parameter 'id' is set
112
+ fail ArgumentError, "Missing the required parameter 'id' when calling ChargeBankTransactionService.read" if id.nil?
113
+ # resource path
114
+ local_var_path = "/charge-bank-transaction/read".sub('{format}','json')
115
+
116
+ # query parameters
117
+ query_params = {}
118
+ query_params[:'spaceId'] = space_id
119
+ query_params[:'id'] = id
120
+
121
+ # header parameters
122
+ header_params = {}
123
+
124
+ # HTTP header 'Accept' (if needed)
125
+ local_header_accept = ['application/json;charset=utf-8']
126
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
127
+
128
+ # HTTP header 'Content-Type'
129
+ local_header_content_type = ['*/*']
130
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
131
+
132
+ # form parameters
133
+ form_params = {}
134
+
135
+ # http body (model)
136
+ post_body = nil
137
+ auth_names = []
138
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
139
+ :header_params => header_params,
140
+ :query_params => query_params,
141
+ :form_params => form_params,
142
+ :body => post_body,
143
+ :auth_names => auth_names,
144
+ :return_type => 'ChargeBankTransaction')
145
+ if @api_client.config.debugging
146
+ @api_client.config.logger.debug "API called: ChargeBankTransactionService#read\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
147
+ end
148
+ return data, status_code, headers
149
+ end
150
+
151
+ # Search
152
+ # Searches for the entities as specified by the given query.
153
+ # @param space_id
154
+ # @param query The query restricts the charge bank transactions which are returned by the search.
155
+ # @param [Hash] opts the optional parameters
156
+ # @return [Array<ChargeBankTransaction>]
157
+ def search(space_id, query, opts = {})
158
+ data, _status_code, _headers = search_with_http_info(space_id, query, opts)
159
+ return data
160
+ end
161
+
162
+ # Search
163
+ # Searches for the entities as specified by the given query.
164
+ # @param space_id
165
+ # @param query The query restricts the charge bank transactions which are returned by the search.
166
+ # @param [Hash] opts the optional parameters
167
+ # @return [Array<(Array<ChargeBankTransaction>, Fixnum, Hash)>] Array<ChargeBankTransaction> data, response status code and response headers
168
+ def search_with_http_info(space_id, query, opts = {})
169
+ if @api_client.config.debugging
170
+ @api_client.config.logger.debug "Calling API: ChargeBankTransactionService.search ..."
171
+ end
172
+ # verify the required parameter 'space_id' is set
173
+ fail ArgumentError, "Missing the required parameter 'space_id' when calling ChargeBankTransactionService.search" if space_id.nil?
174
+ # verify the required parameter 'query' is set
175
+ fail ArgumentError, "Missing the required parameter 'query' when calling ChargeBankTransactionService.search" if query.nil?
176
+ # resource path
177
+ local_var_path = "/charge-bank-transaction/search".sub('{format}','json')
178
+
179
+ # query parameters
180
+ query_params = {}
181
+ query_params[:'spaceId'] = space_id
182
+
183
+ # header parameters
184
+ header_params = {}
185
+
186
+ # HTTP header 'Accept' (if needed)
187
+ local_header_accept = ['application/json;charset=utf-8']
188
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
189
+
190
+ # HTTP header 'Content-Type'
191
+ local_header_content_type = ['application/json;charset=utf-8']
192
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
193
+
194
+ # form parameters
195
+ form_params = {}
196
+
197
+ # http body (model)
198
+ post_body = @api_client.object_to_http_body(query)
199
+ auth_names = []
200
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
201
+ :header_params => header_params,
202
+ :query_params => query_params,
203
+ :form_params => form_params,
204
+ :body => post_body,
205
+ :auth_names => auth_names,
206
+ :return_type => 'Array<ChargeBankTransaction>')
207
+ if @api_client.config.debugging
208
+ @api_client.config.logger.debug "API called: ChargeBankTransactionService#search\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
209
+ end
210
+ return data, status_code, headers
211
+ end
212
+ end
213
+ end
@@ -0,0 +1,213 @@
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 "uri"
19
+
20
+ module Wallee
21
+ class ExternalTransferBankTransactionService
22
+ attr_accessor :api_client
23
+
24
+ def initialize(api_client = ApiClient.default)
25
+ @api_client = api_client
26
+ end
27
+
28
+ # Count
29
+ # Counts the number of items in the database as restricted by the given filter.
30
+ # @param space_id
31
+ # @param [Hash] opts the optional parameters
32
+ # @option opts [EntityQueryFilter] :filter The filter which restricts the entities which are used to calculate the count.
33
+ # @return [Integer]
34
+ def count(space_id, opts = {})
35
+ data, _status_code, _headers = count_with_http_info(space_id, opts)
36
+ return data
37
+ end
38
+
39
+ # Count
40
+ # Counts the number of items in the database as restricted by the given filter.
41
+ # @param space_id
42
+ # @param [Hash] opts the optional parameters
43
+ # @option opts [EntityQueryFilter] :filter The filter which restricts the entities which are used to calculate the count.
44
+ # @return [Array<(Integer, Fixnum, Hash)>] Integer data, response status code and response headers
45
+ def count_with_http_info(space_id, opts = {})
46
+ if @api_client.config.debugging
47
+ @api_client.config.logger.debug "Calling API: ExternalTransferBankTransactionService.count ..."
48
+ end
49
+ # verify the required parameter 'space_id' is set
50
+ fail ArgumentError, "Missing the required parameter 'space_id' when calling ExternalTransferBankTransactionService.count" if space_id.nil?
51
+ # resource path
52
+ local_var_path = "/external-transfer-bank-transaction/count".sub('{format}','json')
53
+
54
+ # query parameters
55
+ query_params = {}
56
+ query_params[:'spaceId'] = space_id
57
+
58
+ # header parameters
59
+ header_params = {}
60
+
61
+ # HTTP header 'Accept' (if needed)
62
+ local_header_accept = ['application/json;charset=utf-8']
63
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
64
+
65
+ # HTTP header 'Content-Type'
66
+ local_header_content_type = ['application/json;charset=utf-8']
67
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
68
+
69
+ # form parameters
70
+ form_params = {}
71
+
72
+ # http body (model)
73
+ post_body = @api_client.object_to_http_body(opts[:'filter'])
74
+ auth_names = []
75
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
76
+ :header_params => header_params,
77
+ :query_params => query_params,
78
+ :form_params => form_params,
79
+ :body => post_body,
80
+ :auth_names => auth_names,
81
+ :return_type => 'Integer')
82
+ if @api_client.config.debugging
83
+ @api_client.config.logger.debug "API called: ExternalTransferBankTransactionService#count\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
84
+ end
85
+ return data, status_code, headers
86
+ end
87
+
88
+ # Read
89
+ # Reads the entity with the given 'id' and returns it.
90
+ # @param space_id
91
+ # @param id The ID of the external transfer bank transaction which should be returned.
92
+ # @param [Hash] opts the optional parameters
93
+ # @return [ExternalTransferBankTransaction]
94
+ def read(space_id, id, opts = {})
95
+ data, _status_code, _headers = read_with_http_info(space_id, id, opts)
96
+ return data
97
+ end
98
+
99
+ # Read
100
+ # Reads the entity with the given &#39;id&#39; and returns it.
101
+ # @param space_id
102
+ # @param id The ID of the external transfer bank transaction which should be returned.
103
+ # @param [Hash] opts the optional parameters
104
+ # @return [Array<(ExternalTransferBankTransaction, Fixnum, Hash)>] ExternalTransferBankTransaction data, response status code and response headers
105
+ def read_with_http_info(space_id, id, opts = {})
106
+ if @api_client.config.debugging
107
+ @api_client.config.logger.debug "Calling API: ExternalTransferBankTransactionService.read ..."
108
+ end
109
+ # verify the required parameter 'space_id' is set
110
+ fail ArgumentError, "Missing the required parameter 'space_id' when calling ExternalTransferBankTransactionService.read" if space_id.nil?
111
+ # verify the required parameter 'id' is set
112
+ fail ArgumentError, "Missing the required parameter 'id' when calling ExternalTransferBankTransactionService.read" if id.nil?
113
+ # resource path
114
+ local_var_path = "/external-transfer-bank-transaction/read".sub('{format}','json')
115
+
116
+ # query parameters
117
+ query_params = {}
118
+ query_params[:'spaceId'] = space_id
119
+ query_params[:'id'] = id
120
+
121
+ # header parameters
122
+ header_params = {}
123
+
124
+ # HTTP header 'Accept' (if needed)
125
+ local_header_accept = ['application/json;charset=utf-8']
126
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
127
+
128
+ # HTTP header 'Content-Type'
129
+ local_header_content_type = ['*/*']
130
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
131
+
132
+ # form parameters
133
+ form_params = {}
134
+
135
+ # http body (model)
136
+ post_body = nil
137
+ auth_names = []
138
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
139
+ :header_params => header_params,
140
+ :query_params => query_params,
141
+ :form_params => form_params,
142
+ :body => post_body,
143
+ :auth_names => auth_names,
144
+ :return_type => 'ExternalTransferBankTransaction')
145
+ if @api_client.config.debugging
146
+ @api_client.config.logger.debug "API called: ExternalTransferBankTransactionService#read\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
147
+ end
148
+ return data, status_code, headers
149
+ end
150
+
151
+ # Search
152
+ # Searches for the entities as specified by the given query.
153
+ # @param space_id
154
+ # @param query The query restricts the external transfer bank transactions which are returned by the search.
155
+ # @param [Hash] opts the optional parameters
156
+ # @return [Array<ExternalTransferBankTransaction>]
157
+ def search(space_id, query, opts = {})
158
+ data, _status_code, _headers = search_with_http_info(space_id, query, opts)
159
+ return data
160
+ end
161
+
162
+ # Search
163
+ # Searches for the entities as specified by the given query.
164
+ # @param space_id
165
+ # @param query The query restricts the external transfer bank transactions which are returned by the search.
166
+ # @param [Hash] opts the optional parameters
167
+ # @return [Array<(Array<ExternalTransferBankTransaction>, Fixnum, Hash)>] Array<ExternalTransferBankTransaction> data, response status code and response headers
168
+ def search_with_http_info(space_id, query, opts = {})
169
+ if @api_client.config.debugging
170
+ @api_client.config.logger.debug "Calling API: ExternalTransferBankTransactionService.search ..."
171
+ end
172
+ # verify the required parameter 'space_id' is set
173
+ fail ArgumentError, "Missing the required parameter 'space_id' when calling ExternalTransferBankTransactionService.search" if space_id.nil?
174
+ # verify the required parameter 'query' is set
175
+ fail ArgumentError, "Missing the required parameter 'query' when calling ExternalTransferBankTransactionService.search" if query.nil?
176
+ # resource path
177
+ local_var_path = "/external-transfer-bank-transaction/search".sub('{format}','json')
178
+
179
+ # query parameters
180
+ query_params = {}
181
+ query_params[:'spaceId'] = space_id
182
+
183
+ # header parameters
184
+ header_params = {}
185
+
186
+ # HTTP header 'Accept' (if needed)
187
+ local_header_accept = ['application/json;charset=utf-8']
188
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
189
+
190
+ # HTTP header 'Content-Type'
191
+ local_header_content_type = ['application/json;charset=utf-8']
192
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
193
+
194
+ # form parameters
195
+ form_params = {}
196
+
197
+ # http body (model)
198
+ post_body = @api_client.object_to_http_body(query)
199
+ auth_names = []
200
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
201
+ :header_params => header_params,
202
+ :query_params => query_params,
203
+ :form_params => form_params,
204
+ :body => post_body,
205
+ :auth_names => auth_names,
206
+ :return_type => 'Array<ExternalTransferBankTransaction>')
207
+ if @api_client.config.debugging
208
+ @api_client.config.logger.debug "API called: ExternalTransferBankTransactionService#search\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
209
+ end
210
+ return data, status_code, headers
211
+ end
212
+ end
213
+ end