wallee-ruby-sdk 2.2.3 → 2.2.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (62) hide show
  1. checksums.yaml +4 -4
  2. data/LICENSE +1 -1
  3. data/README.md +1 -1
  4. data/lib/wallee-ruby-sdk.rb +17 -5
  5. data/lib/wallee-ruby-sdk/api/payment_terminal_till_service_api.rb +99 -0
  6. data/lib/wallee-ruby-sdk/api/shopify_subscription_service_api.rb +124 -0
  7. data/lib/wallee-ruby-sdk/api/shopify_transaction_service_api.rb +213 -0
  8. data/lib/wallee-ruby-sdk/api/subscriber_service_api.rb +3 -3
  9. data/lib/wallee-ruby-sdk/api/subscription_service_api.rb +67 -0
  10. data/lib/wallee-ruby-sdk/api/token_service_api.rb +126 -0
  11. data/lib/wallee-ruby-sdk/api_client.rb +5 -3
  12. data/lib/wallee-ruby-sdk/configuration.rb +2 -2
  13. data/lib/wallee-ruby-sdk/models/abstract_account_update.rb +11 -1
  14. data/lib/wallee-ruby-sdk/models/{abstract_shopify_subscription_product_active.rb → abstract_shopify_subscription_product_update.rb} +2 -12
  15. data/lib/wallee-ruby-sdk/models/abstract_space_update.rb +11 -1
  16. data/lib/wallee-ruby-sdk/models/abstract_transaction_pending.rb +59 -1
  17. data/lib/wallee-ruby-sdk/models/abstract_webhook_url_update.rb +24 -0
  18. data/lib/wallee-ruby-sdk/models/account.rb +31 -1
  19. data/lib/wallee-ruby-sdk/models/account_create.rb +11 -1
  20. data/lib/wallee-ruby-sdk/models/account_update.rb +11 -1
  21. data/lib/wallee-ruby-sdk/models/charge_attempt.rb +11 -1
  22. data/lib/wallee-ruby-sdk/models/payment_connector_configuration.rb +13 -1
  23. data/lib/wallee-ruby-sdk/models/sales_channel.rb +34 -4
  24. data/lib/wallee-ruby-sdk/models/shopify_additional_line_item_data.rb +35 -0
  25. data/lib/wallee-ruby-sdk/models/shopify_integration.rb +73 -31
  26. data/lib/wallee-ruby-sdk/models/shopify_integration_payment_app_version.rb +34 -0
  27. data/lib/wallee-ruby-sdk/models/{shopify_integration_app_version.rb → shopify_integration_subscription_app_version.rb} +3 -3
  28. data/lib/wallee-ruby-sdk/models/shopify_subscriber_creation.rb +216 -0
  29. data/lib/wallee-ruby-sdk/models/shopify_subscription.rb +51 -7
  30. data/lib/wallee-ruby-sdk/models/shopify_subscription_address.rb +0 -60
  31. data/lib/wallee-ruby-sdk/models/shopify_subscription_address_create.rb +546 -0
  32. data/lib/wallee-ruby-sdk/models/shopify_subscription_creation_request.rb +353 -0
  33. data/lib/wallee-ruby-sdk/models/shopify_subscription_model_billing_configuration.rb +261 -0
  34. data/lib/wallee-ruby-sdk/models/{shopify_subscription_edit_model_item.rb → shopify_subscription_model_item.rb} +2 -2
  35. data/lib/wallee-ruby-sdk/models/{shopify_subscription_edit_model_tax_line.rb → shopify_subscription_model_tax_line.rb} +1 -1
  36. data/lib/wallee-ruby-sdk/models/shopify_subscription_product_create.rb +9 -14
  37. data/lib/wallee-ruby-sdk/models/{shopify_subscription_product_active.rb → shopify_subscription_product_update.rb} +2 -12
  38. data/lib/wallee-ruby-sdk/models/shopify_subscription_update_addresses_request.rb +211 -0
  39. data/lib/wallee-ruby-sdk/models/shopify_subscription_update_request.rb +11 -81
  40. data/lib/wallee-ruby-sdk/models/space.rb +31 -1
  41. data/lib/wallee-ruby-sdk/models/space_create.rb +11 -1
  42. data/lib/wallee-ruby-sdk/models/space_update.rb +11 -1
  43. data/lib/wallee-ruby-sdk/models/subscription.rb +11 -1
  44. data/lib/wallee-ruby-sdk/models/subscription_charge.rb +48 -0
  45. data/lib/wallee-ruby-sdk/models/subscription_charge_create.rb +48 -0
  46. data/lib/wallee-ruby-sdk/models/subscription_create_request.rb +1 -1
  47. data/lib/wallee-ruby-sdk/models/subscription_product_version.rb +11 -1
  48. data/lib/wallee-ruby-sdk/models/subscription_product_version_pending.rb +14 -4
  49. data/lib/wallee-ruby-sdk/models/subscription_update_request.rb +206 -0
  50. data/lib/wallee-ruby-sdk/models/tax_calculation.rb +35 -0
  51. data/lib/wallee-ruby-sdk/models/transaction.rb +69 -1
  52. data/lib/wallee-ruby-sdk/models/transaction_completion.rb +26 -1
  53. data/lib/wallee-ruby-sdk/models/transaction_completion_behavior.rb +36 -0
  54. data/lib/wallee-ruby-sdk/models/transaction_completion_request.rb +26 -1
  55. data/lib/wallee-ruby-sdk/models/transaction_create.rb +59 -1
  56. data/lib/wallee-ruby-sdk/models/transaction_pending.rb +59 -1
  57. data/lib/wallee-ruby-sdk/models/webhook_url.rb +24 -0
  58. data/lib/wallee-ruby-sdk/models/webhook_url_create.rb +24 -0
  59. data/lib/wallee-ruby-sdk/models/webhook_url_update.rb +24 -0
  60. data/lib/wallee-ruby-sdk/version.rb +1 -1
  61. data/wallee-ruby-sdk.gemspec +3 -2
  62. metadata +45 -14
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ef6e6caea394f9511ea86e3e9b23aa4c1d7ecd0d6c8fadad7b8c827efbb602a7
4
- data.tar.gz: 20b360747a20786e98eab9205f58f06fe6055c5c238ce6afec8c2ad0c631a081
3
+ metadata.gz: 12d2947ae67c618d5b5e6100e679a7d33aee0d25ce1ab6b9eb306dedbfe1a3d2
4
+ data.tar.gz: 9b123391b875891887cae25e0edc85266961890b63822fd7a0edee0bad065ebb
5
5
  SHA512:
6
- metadata.gz: 0ea0e5e59e05f45deb28b272f720a85662ca4209e0ee2483f536d9f9d8e9efd20ccb2870178883b03a99a84b0fee8289b2122917a2db760fa467d2bad293abac
7
- data.tar.gz: c869fad5a8c86fec15ad4c33f66d96fbb25e5428a029e7edf4b322f68386db86cc35af3b6d87d99a23d91356df68b4133a1e208f234833e59abad9a7b3539224
6
+ metadata.gz: 82b2a3642f0badf09180b3dc7a45b41247fe7e002ba0f207a0ca022ce531a06043ef0f01a3b41ebb7e7e6ecaca3508fddea78ae6249f3399678b6130e2168f5d
7
+ data.tar.gz: a17cf091235fc97f89098c37b86ef472e7c7adb6fab110689b9f7fff2f90c4920ff584bc91538324ca9821b16740f64d4f969d6ca2ef10c47bd93f2b2387cdf9
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 customweb GmbH
189
+ Copyright 2020 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.
data/README.md CHANGED
@@ -128,7 +128,7 @@ transaction = Wallee::TransactionCreate.new({
128
128
  })
129
129
 
130
130
  transaction = transaction_service.create(space_id, transaction)
131
- payment_page_url = transaction_payment_page_service.payment_page(space_id, transaction.id)
131
+ payment_page_url = transaction_payment_page_service.payment_page_url(space_id, transaction.id)
132
132
  # redirect to payment_page_url
133
133
  ```
134
134
 
@@ -31,7 +31,7 @@ require 'wallee-ruby-sdk/models/abstract_debt_collection_case_update'
31
31
  require 'wallee-ruby-sdk/models/abstract_human_user_update'
32
32
  require 'wallee-ruby-sdk/models/abstract_payment_link_update'
33
33
  require 'wallee-ruby-sdk/models/abstract_refund_comment_active'
34
- require 'wallee-ruby-sdk/models/abstract_shopify_subscription_product_active'
34
+ require 'wallee-ruby-sdk/models/abstract_shopify_subscription_product_update'
35
35
  require 'wallee-ruby-sdk/models/abstract_space_update'
36
36
  require 'wallee-ruby-sdk/models/abstract_subscriber_update'
37
37
  require 'wallee-ruby-sdk/models/abstract_subscription_affiliate_update'
@@ -195,16 +195,22 @@ require 'wallee-ruby-sdk/models/role'
195
195
  require 'wallee-ruby-sdk/models/sales_channel'
196
196
  require 'wallee-ruby-sdk/models/scope'
197
197
  require 'wallee-ruby-sdk/models/server_error'
198
+ require 'wallee-ruby-sdk/models/shopify_additional_line_item_data'
198
199
  require 'wallee-ruby-sdk/models/shopify_integration'
199
- require 'wallee-ruby-sdk/models/shopify_integration_app_version'
200
+ require 'wallee-ruby-sdk/models/shopify_integration_payment_app_version'
201
+ require 'wallee-ruby-sdk/models/shopify_integration_subscription_app_version'
200
202
  require 'wallee-ruby-sdk/models/shopify_recurring_order_state'
201
203
  require 'wallee-ruby-sdk/models/shopify_recurring_order_update_request'
202
204
  require 'wallee-ruby-sdk/models/shopify_subscriber'
205
+ require 'wallee-ruby-sdk/models/shopify_subscriber_creation'
203
206
  require 'wallee-ruby-sdk/models/shopify_subscriber_state'
204
207
  require 'wallee-ruby-sdk/models/shopify_subscription'
208
+ require 'wallee-ruby-sdk/models/shopify_subscription_address_create'
205
209
  require 'wallee-ruby-sdk/models/shopify_subscription_billing_interval_unit'
206
- require 'wallee-ruby-sdk/models/shopify_subscription_edit_model_item'
207
- require 'wallee-ruby-sdk/models/shopify_subscription_edit_model_tax_line'
210
+ require 'wallee-ruby-sdk/models/shopify_subscription_creation_request'
211
+ require 'wallee-ruby-sdk/models/shopify_subscription_model_billing_configuration'
212
+ require 'wallee-ruby-sdk/models/shopify_subscription_model_item'
213
+ require 'wallee-ruby-sdk/models/shopify_subscription_model_tax_line'
208
214
  require 'wallee-ruby-sdk/models/shopify_subscription_product'
209
215
  require 'wallee-ruby-sdk/models/shopify_subscription_product_pricing_option'
210
216
  require 'wallee-ruby-sdk/models/shopify_subscription_product_state'
@@ -214,6 +220,7 @@ require 'wallee-ruby-sdk/models/shopify_subscription_suspension_create'
214
220
  require 'wallee-ruby-sdk/models/shopify_subscription_suspension_initiator'
215
221
  require 'wallee-ruby-sdk/models/shopify_subscription_suspension_state'
216
222
  require 'wallee-ruby-sdk/models/shopify_subscription_suspension_type'
223
+ require 'wallee-ruby-sdk/models/shopify_subscription_update_addresses_request'
217
224
  require 'wallee-ruby-sdk/models/shopify_subscription_update_request'
218
225
  require 'wallee-ruby-sdk/models/shopify_subscription_version'
219
226
  require 'wallee-ruby-sdk/models/shopify_subscription_version_item'
@@ -275,9 +282,11 @@ require 'wallee-ruby-sdk/models/subscription_suspension_create'
275
282
  require 'wallee-ruby-sdk/models/subscription_suspension_reason'
276
283
  require 'wallee-ruby-sdk/models/subscription_suspension_state'
277
284
  require 'wallee-ruby-sdk/models/subscription_update'
285
+ require 'wallee-ruby-sdk/models/subscription_update_request'
278
286
  require 'wallee-ruby-sdk/models/subscription_version'
279
287
  require 'wallee-ruby-sdk/models/subscription_version_state'
280
288
  require 'wallee-ruby-sdk/models/tax'
289
+ require 'wallee-ruby-sdk/models/tax_calculation'
281
290
  require 'wallee-ruby-sdk/models/tax_class'
282
291
  require 'wallee-ruby-sdk/models/tax_create'
283
292
  require 'wallee-ruby-sdk/models/tenant_database'
@@ -289,6 +298,7 @@ require 'wallee-ruby-sdk/models/tokenization_mode'
289
298
  require 'wallee-ruby-sdk/models/transaction'
290
299
  require 'wallee-ruby-sdk/models/transaction_aware_entity'
291
300
  require 'wallee-ruby-sdk/models/transaction_comment'
301
+ require 'wallee-ruby-sdk/models/transaction_completion_behavior'
292
302
  require 'wallee-ruby-sdk/models/transaction_completion_mode'
293
303
  require 'wallee-ruby-sdk/models/transaction_completion_request'
294
304
  require 'wallee-ruby-sdk/models/transaction_completion_state'
@@ -343,8 +353,8 @@ require 'wallee-ruby-sdk/models/refund_comment_active'
343
353
  require 'wallee-ruby-sdk/models/refund_comment_create'
344
354
  require 'wallee-ruby-sdk/models/shopify_recurring_order'
345
355
  require 'wallee-ruby-sdk/models/shopify_subscription_address'
346
- require 'wallee-ruby-sdk/models/shopify_subscription_product_active'
347
356
  require 'wallee-ruby-sdk/models/shopify_subscription_product_create'
357
+ require 'wallee-ruby-sdk/models/shopify_subscription_product_update'
348
358
  require 'wallee-ruby-sdk/models/shopify_transaction'
349
359
  require 'wallee-ruby-sdk/models/space_create'
350
360
  require 'wallee-ruby-sdk/models/space_update'
@@ -420,6 +430,7 @@ require 'wallee-ruby-sdk/api/payment_method_service_api'
420
430
  require 'wallee-ruby-sdk/api/payment_processor_configuration_service_api'
421
431
  require 'wallee-ruby-sdk/api/payment_processor_service_api'
422
432
  require 'wallee-ruby-sdk/api/payment_terminal_service_api'
433
+ require 'wallee-ruby-sdk/api/payment_terminal_till_service_api'
423
434
  require 'wallee-ruby-sdk/api/permission_service_api'
424
435
  require 'wallee-ruby-sdk/api/refund_comment_service_api'
425
436
  require 'wallee-ruby-sdk/api/refund_service_api'
@@ -429,6 +440,7 @@ require 'wallee-ruby-sdk/api/shopify_subscription_product_service_api'
429
440
  require 'wallee-ruby-sdk/api/shopify_subscription_service_api'
430
441
  require 'wallee-ruby-sdk/api/shopify_subscription_suspension_service_api'
431
442
  require 'wallee-ruby-sdk/api/shopify_subscription_version_service_api'
443
+ require 'wallee-ruby-sdk/api/shopify_transaction_service_api'
432
444
  require 'wallee-ruby-sdk/api/space_service_api'
433
445
  require 'wallee-ruby-sdk/api/static_value_service_api'
434
446
  require 'wallee-ruby-sdk/api/subscriber_service_api'
@@ -0,0 +1,99 @@
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 PaymentTerminalTillService
22
+ attr_accessor :api_client
23
+
24
+ def initialize(api_client = ApiClient.default)
25
+ @api_client = api_client
26
+ end
27
+
28
+ # Perform Payment Terminal Transaction
29
+ # Starts a payment terminal transaction and waits for its completion. If the call returns with a long polling timeout status, you may try again. The processing of the transaction will be picked up where it was left off.
30
+ # @param space_id
31
+ # @param transaction_id The ID of the transaction which is used to process with the terminal.
32
+ # @param terminal_id The ID of the terminal which should be used to process the transaction.
33
+ # @param [Hash] opts the optional parameters
34
+ # @option opts [String] :language The language in which the messages should be rendered in.
35
+ # @return [Transaction]
36
+ def perform_transaction(space_id, transaction_id, terminal_id, opts = {})
37
+ data, _status_code, _headers = perform_transaction_with_http_info(space_id, transaction_id, terminal_id, opts)
38
+ return data
39
+ end
40
+
41
+ # Perform Payment Terminal Transaction
42
+ # Starts a payment terminal transaction and waits for its completion. If the call returns with a long polling timeout status, you may try again. The processing of the transaction will be picked up where it was left off.
43
+ # @param space_id
44
+ # @param transaction_id The ID of the transaction which is used to process with the terminal.
45
+ # @param terminal_id The ID of the terminal which should be used to process the transaction.
46
+ # @param [Hash] opts the optional parameters
47
+ # @option opts [String] :language The language in which the messages should be rendered in.
48
+ # @return [Array<(Transaction, Fixnum, Hash)>] Transaction data, response status code and response headers
49
+ def perform_transaction_with_http_info(space_id, transaction_id, terminal_id, opts = {})
50
+ if @api_client.config.debugging
51
+ @api_client.config.logger.debug "Calling API: PaymentTerminalTillService.perform_transaction ..."
52
+ end
53
+ # verify the required parameter 'space_id' is set
54
+ fail ArgumentError, "Missing the required parameter 'space_id' when calling PaymentTerminalTillService.perform_transaction" if space_id.nil?
55
+ # verify the required parameter 'transaction_id' is set
56
+ fail ArgumentError, "Missing the required parameter 'transaction_id' when calling PaymentTerminalTillService.perform_transaction" if transaction_id.nil?
57
+ # verify the required parameter 'terminal_id' is set
58
+ fail ArgumentError, "Missing the required parameter 'terminal_id' when calling PaymentTerminalTillService.perform_transaction" if terminal_id.nil?
59
+ # resource path
60
+ local_var_path = "/payment-terminal-till/perform-transaction".sub('{format}','json')
61
+
62
+ # query parameters
63
+ query_params = {}
64
+ query_params[:'spaceId'] = space_id
65
+ query_params[:'transactionId'] = transaction_id
66
+ query_params[:'terminalId'] = terminal_id
67
+ query_params[:'language'] = opts[:'language'] if !opts[:'language'].nil?
68
+
69
+ # header parameters
70
+ header_params = {}
71
+
72
+ # HTTP header 'Accept' (if needed)
73
+ local_header_accept = ['application/json;charset=utf-8']
74
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
75
+
76
+ # HTTP header 'Content-Type'
77
+ local_header_content_type = ['application/json;charset=utf-8']
78
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
79
+
80
+ # form parameters
81
+ form_params = {}
82
+
83
+ # http body (model)
84
+ post_body = nil
85
+ auth_names = []
86
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
87
+ :header_params => header_params,
88
+ :query_params => query_params,
89
+ :form_params => form_params,
90
+ :body => post_body,
91
+ :auth_names => auth_names,
92
+ :return_type => 'Transaction')
93
+ if @api_client.config.debugging
94
+ @api_client.config.logger.debug "API called: PaymentTerminalTillService#perform_transaction\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
95
+ end
96
+ return data, status_code, headers
97
+ end
98
+ end
99
+ end
@@ -85,6 +85,68 @@ module Wallee
85
85
  return data, status_code, headers
86
86
  end
87
87
 
88
+ # Create
89
+ # This operation allows to create a Shopify subscription.
90
+ # @param space_id
91
+ # @param creation_request
92
+ # @param [Hash] opts the optional parameters
93
+ # @return [ShopifySubscriptionVersion]
94
+ def create(space_id, creation_request, opts = {})
95
+ data, _status_code, _headers = create_with_http_info(space_id, creation_request, opts)
96
+ return data
97
+ end
98
+
99
+ # Create
100
+ # This operation allows to create a Shopify subscription.
101
+ # @param space_id
102
+ # @param creation_request
103
+ # @param [Hash] opts the optional parameters
104
+ # @return [Array<(ShopifySubscriptionVersion, Fixnum, Hash)>] ShopifySubscriptionVersion data, response status code and response headers
105
+ def create_with_http_info(space_id, creation_request, opts = {})
106
+ if @api_client.config.debugging
107
+ @api_client.config.logger.debug "Calling API: ShopifySubscriptionService.create ..."
108
+ end
109
+ # verify the required parameter 'space_id' is set
110
+ fail ArgumentError, "Missing the required parameter 'space_id' when calling ShopifySubscriptionService.create" if space_id.nil?
111
+ # verify the required parameter 'creation_request' is set
112
+ fail ArgumentError, "Missing the required parameter 'creation_request' when calling ShopifySubscriptionService.create" if creation_request.nil?
113
+ # resource path
114
+ local_var_path = "/shopify-subscription/create".sub('{format}','json')
115
+
116
+ # query parameters
117
+ query_params = {}
118
+ query_params[:'spaceId'] = space_id
119
+
120
+ # header parameters
121
+ header_params = {}
122
+
123
+ # HTTP header 'Accept' (if needed)
124
+ local_header_accept = ['application/json;charset=utf-8']
125
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
126
+
127
+ # HTTP header 'Content-Type'
128
+ local_header_content_type = ['application/json;charset=utf-8']
129
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
130
+
131
+ # form parameters
132
+ form_params = {}
133
+
134
+ # http body (model)
135
+ post_body = @api_client.object_to_http_body(creation_request)
136
+ auth_names = []
137
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
138
+ :header_params => header_params,
139
+ :query_params => query_params,
140
+ :form_params => form_params,
141
+ :body => post_body,
142
+ :auth_names => auth_names,
143
+ :return_type => 'ShopifySubscriptionVersion')
144
+ if @api_client.config.debugging
145
+ @api_client.config.logger.debug "API called: ShopifySubscriptionService#create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
146
+ end
147
+ return data, status_code, headers
148
+ end
149
+
88
150
  # Read
89
151
  # Reads the entity with the given 'id' and returns it.
90
152
  # @param space_id
@@ -338,5 +400,67 @@ module Wallee
338
400
  end
339
401
  return data, status_code, headers
340
402
  end
403
+
404
+ # Update Addresses
405
+ # This operation allows to update a Shopify subscription addresses.
406
+ # @param space_id
407
+ # @param update_request
408
+ # @param [Hash] opts the optional parameters
409
+ # @return [ShopifySubscriptionVersion]
410
+ def update_addresses(space_id, update_request, opts = {})
411
+ data, _status_code, _headers = update_addresses_with_http_info(space_id, update_request, opts)
412
+ return data
413
+ end
414
+
415
+ # Update Addresses
416
+ # This operation allows to update a Shopify subscription addresses.
417
+ # @param space_id
418
+ # @param update_request
419
+ # @param [Hash] opts the optional parameters
420
+ # @return [Array<(ShopifySubscriptionVersion, Fixnum, Hash)>] ShopifySubscriptionVersion data, response status code and response headers
421
+ def update_addresses_with_http_info(space_id, update_request, opts = {})
422
+ if @api_client.config.debugging
423
+ @api_client.config.logger.debug "Calling API: ShopifySubscriptionService.update_addresses ..."
424
+ end
425
+ # verify the required parameter 'space_id' is set
426
+ fail ArgumentError, "Missing the required parameter 'space_id' when calling ShopifySubscriptionService.update_addresses" if space_id.nil?
427
+ # verify the required parameter 'update_request' is set
428
+ fail ArgumentError, "Missing the required parameter 'update_request' when calling ShopifySubscriptionService.update_addresses" if update_request.nil?
429
+ # resource path
430
+ local_var_path = "/shopify-subscription/update-addresses".sub('{format}','json')
431
+
432
+ # query parameters
433
+ query_params = {}
434
+ query_params[:'spaceId'] = space_id
435
+
436
+ # header parameters
437
+ header_params = {}
438
+
439
+ # HTTP header 'Accept' (if needed)
440
+ local_header_accept = ['application/json;charset=utf-8']
441
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
442
+
443
+ # HTTP header 'Content-Type'
444
+ local_header_content_type = ['application/json;charset=utf-8']
445
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
446
+
447
+ # form parameters
448
+ form_params = {}
449
+
450
+ # http body (model)
451
+ post_body = @api_client.object_to_http_body(update_request)
452
+ auth_names = []
453
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
454
+ :header_params => header_params,
455
+ :query_params => query_params,
456
+ :form_params => form_params,
457
+ :body => post_body,
458
+ :auth_names => auth_names,
459
+ :return_type => 'ShopifySubscriptionVersion')
460
+ if @api_client.config.debugging
461
+ @api_client.config.logger.debug "API called: ShopifySubscriptionService#update_addresses\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
462
+ end
463
+ return data, status_code, headers
464
+ end
341
465
  end
342
466
  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 ShopifyTransactionService
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: ShopifyTransactionService.count ..."
48
+ end
49
+ # verify the required parameter 'space_id' is set
50
+ fail ArgumentError, "Missing the required parameter 'space_id' when calling ShopifyTransactionService.count" if space_id.nil?
51
+ # resource path
52
+ local_var_path = "/shopify-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: ShopifyTransactionService#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 Shopify transaction which should be returned.
92
+ # @param [Hash] opts the optional parameters
93
+ # @return [ShopifyTransaction]
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 Shopify transaction which should be returned.
103
+ # @param [Hash] opts the optional parameters
104
+ # @return [Array<(ShopifyTransaction, Fixnum, Hash)>] ShopifyTransaction 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: ShopifyTransactionService.read ..."
108
+ end
109
+ # verify the required parameter 'space_id' is set
110
+ fail ArgumentError, "Missing the required parameter 'space_id' when calling ShopifyTransactionService.read" if space_id.nil?
111
+ # verify the required parameter 'id' is set
112
+ fail ArgumentError, "Missing the required parameter 'id' when calling ShopifyTransactionService.read" if id.nil?
113
+ # resource path
114
+ local_var_path = "/shopify-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 => 'ShopifyTransaction')
145
+ if @api_client.config.debugging
146
+ @api_client.config.logger.debug "API called: ShopifyTransactionService#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 Shopify transactions which are returned by the search.
155
+ # @param [Hash] opts the optional parameters
156
+ # @return [Array<ShopifyTransaction>]
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 Shopify transactions which are returned by the search.
166
+ # @param [Hash] opts the optional parameters
167
+ # @return [Array<(Array<ShopifyTransaction>, Fixnum, Hash)>] Array<ShopifyTransaction> 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: ShopifyTransactionService.search ..."
171
+ end
172
+ # verify the required parameter 'space_id' is set
173
+ fail ArgumentError, "Missing the required parameter 'space_id' when calling ShopifyTransactionService.search" if space_id.nil?
174
+ # verify the required parameter 'query' is set
175
+ fail ArgumentError, "Missing the required parameter 'query' when calling ShopifyTransactionService.search" if query.nil?
176
+ # resource path
177
+ local_var_path = "/shopify-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<ShopifyTransaction>')
207
+ if @api_client.config.debugging
208
+ @api_client.config.logger.debug "API called: ShopifyTransactionService#search\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
209
+ end
210
+ return data, status_code, headers
211
+ end
212
+ end
213
+ end