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.
Files changed (144) 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 +63 -8
  5. data/lib/wallee-ruby-sdk/api/bank_account_service_api.rb +213 -0
  6. data/lib/wallee-ruby-sdk/api/bank_transaction_service_api.rb +213 -0
  7. data/lib/wallee-ruby-sdk/api/charge_bank_transaction_service_api.rb +213 -0
  8. data/lib/wallee-ruby-sdk/api/currency_bank_account_service_api.rb +213 -0
  9. data/lib/wallee-ruby-sdk/api/external_transfer_bank_transaction_service_api.rb +213 -0
  10. data/lib/wallee-ruby-sdk/api/internal_transfer_bank_transaction_service_api.rb +213 -0
  11. data/lib/wallee-ruby-sdk/api/payment_terminal_till_service_api.rb +170 -0
  12. data/lib/wallee-ruby-sdk/api/refund_bank_transaction_service_api.rb +213 -0
  13. data/lib/wallee-ruby-sdk/api/refund_recovery_bank_transaction_service_api.rb +213 -0
  14. data/lib/wallee-ruby-sdk/api/shopify_subscriber_service_api.rb +62 -0
  15. data/lib/wallee-ruby-sdk/api/shopify_subscription_service_api.rb +124 -0
  16. data/lib/wallee-ruby-sdk/api/shopify_transaction_service_api.rb +213 -0
  17. data/lib/wallee-ruby-sdk/api/subscriber_service_api.rb +3 -3
  18. data/lib/wallee-ruby-sdk/api/subscription_service_api.rb +67 -0
  19. data/lib/wallee-ruby-sdk/api/token_service_api.rb +189 -0
  20. data/lib/wallee-ruby-sdk/api/transaction_terminal_service_api.rb +21 -32
  21. data/lib/wallee-ruby-sdk/api/web_app_service_api.rb +200 -0
  22. data/lib/wallee-ruby-sdk/api_client.rb +7 -4
  23. data/lib/wallee-ruby-sdk/configuration.rb +2 -2
  24. data/lib/wallee-ruby-sdk/models/abstract_account_update.rb +11 -1
  25. data/lib/wallee-ruby-sdk/models/abstract_payment_link_update.rb +15 -15
  26. data/lib/wallee-ruby-sdk/models/{abstract_shopify_subscription_product_active.rb → abstract_shopify_subscription_product_update.rb} +2 -12
  27. data/lib/wallee-ruby-sdk/models/abstract_space_update.rb +11 -1
  28. data/lib/wallee-ruby-sdk/models/abstract_subscription_product_active.rb +11 -1
  29. data/lib/wallee-ruby-sdk/models/abstract_transaction_pending.rb +59 -1
  30. data/lib/wallee-ruby-sdk/models/abstract_webhook_url_update.rb +24 -0
  31. data/lib/wallee-ruby-sdk/models/account.rb +31 -1
  32. data/lib/wallee-ruby-sdk/models/account_create.rb +11 -1
  33. data/lib/wallee-ruby-sdk/models/account_update.rb +11 -1
  34. data/lib/wallee-ruby-sdk/models/authenticated_card_data.rb +221 -0
  35. data/lib/wallee-ruby-sdk/models/{unencrypted_card_data.rb → authenticated_card_data_create.rb} +86 -12
  36. data/lib/wallee-ruby-sdk/models/bank_account.rb +291 -0
  37. data/lib/wallee-ruby-sdk/models/bank_account_environment.rb +35 -0
  38. data/lib/wallee-ruby-sdk/models/bank_account_state.rb +37 -0
  39. data/lib/wallee-ruby-sdk/models/bank_account_type.rb +227 -0
  40. data/lib/wallee-ruby-sdk/models/bank_transaction.rb +387 -0
  41. data/lib/wallee-ruby-sdk/models/bank_transaction_flow_direction.rb +35 -0
  42. data/lib/wallee-ruby-sdk/models/bank_transaction_source.rb +215 -0
  43. data/lib/wallee-ruby-sdk/models/bank_transaction_state.rb +35 -0
  44. data/lib/wallee-ruby-sdk/models/bank_transaction_type.rb +215 -0
  45. data/lib/wallee-ruby-sdk/models/card_authentication_response.rb +38 -0
  46. data/lib/wallee-ruby-sdk/models/card_authentication_version.rb +35 -0
  47. data/lib/wallee-ruby-sdk/models/card_cryptogram.rb +201 -0
  48. data/lib/wallee-ruby-sdk/models/card_cryptogram_create.rb +211 -0
  49. data/lib/wallee-ruby-sdk/models/card_cryptogram_type.rb +34 -0
  50. data/lib/wallee-ruby-sdk/models/cardholder_authentication.rb +231 -0
  51. data/lib/wallee-ruby-sdk/models/cardholder_authentication_create.rb +241 -0
  52. data/lib/wallee-ruby-sdk/models/charge_attempt.rb +11 -1
  53. data/lib/wallee-ruby-sdk/models/charge_bank_transaction.rb +291 -0
  54. data/lib/wallee-ruby-sdk/models/currency_bank_account.rb +241 -0
  55. data/lib/wallee-ruby-sdk/models/debt_collection_case.rb +1 -1
  56. data/lib/wallee-ruby-sdk/models/debt_collection_case_create.rb +1 -1
  57. data/lib/wallee-ruby-sdk/models/external_transfer_bank_transaction.rb +251 -0
  58. data/lib/wallee-ruby-sdk/models/internal_transfer_bank_transaction.rb +231 -0
  59. data/lib/wallee-ruby-sdk/models/payment_adjustment.rb +231 -0
  60. data/lib/wallee-ruby-sdk/models/payment_adjustment_type.rb +215 -0
  61. data/lib/wallee-ruby-sdk/models/payment_connector_configuration.rb +13 -1
  62. data/lib/wallee-ruby-sdk/models/payment_contract.rb +1 -25
  63. data/lib/wallee-ruby-sdk/models/payment_link.rb +16 -40
  64. data/lib/wallee-ruby-sdk/models/payment_link_active.rb +15 -15
  65. data/lib/wallee-ruby-sdk/models/payment_link_address_handling_mode.rb +36 -0
  66. data/lib/wallee-ruby-sdk/models/payment_link_create.rb +16 -44
  67. data/lib/wallee-ruby-sdk/models/payment_link_update.rb +15 -15
  68. data/lib/wallee-ruby-sdk/models/payment_terminal.rb +11 -1
  69. data/lib/wallee-ruby-sdk/models/payment_terminal_address.rb +0 -60
  70. data/lib/wallee-ruby-sdk/models/payment_terminal_configuration_version.rb +11 -1
  71. data/lib/wallee-ruby-sdk/models/payment_terminal_location.rb +2 -22
  72. data/lib/wallee-ruby-sdk/models/payment_terminal_receipt_type.rb +215 -0
  73. data/lib/wallee-ruby-sdk/models/permission.rb +14 -4
  74. data/lib/wallee-ruby-sdk/models/recurring_indicator.rb +37 -0
  75. data/lib/wallee-ruby-sdk/models/refund_bank_transaction.rb +281 -0
  76. data/lib/wallee-ruby-sdk/models/refund_recovery_bank_transaction.rb +293 -0
  77. data/lib/wallee-ruby-sdk/models/rendered_terminal_receipt.rb +26 -6
  78. data/lib/wallee-ruby-sdk/models/role.rb +1 -1
  79. data/lib/wallee-ruby-sdk/models/role_state.rb +37 -0
  80. data/lib/wallee-ruby-sdk/models/sales_channel.rb +34 -4
  81. data/lib/wallee-ruby-sdk/models/shopify_additional_line_item_data.rb +35 -0
  82. data/lib/wallee-ruby-sdk/models/shopify_integration.rb +73 -31
  83. data/lib/wallee-ruby-sdk/models/shopify_integration_payment_app_version.rb +34 -0
  84. data/lib/wallee-ruby-sdk/models/{shopify_integration_app_version.rb → shopify_integration_subscription_app_version.rb} +3 -3
  85. data/lib/wallee-ruby-sdk/models/shopify_subscriber.rb +1 -1
  86. data/lib/wallee-ruby-sdk/models/shopify_subscriber_active.rb +241 -0
  87. data/lib/wallee-ruby-sdk/models/shopify_subscriber_creation.rb +216 -0
  88. data/lib/wallee-ruby-sdk/models/shopify_subscription.rb +61 -7
  89. data/lib/wallee-ruby-sdk/models/shopify_subscription_address.rb +0 -60
  90. data/lib/wallee-ruby-sdk/models/{payment_terminal_contact_address.rb → shopify_subscription_address_create.rb} +152 -2
  91. data/lib/wallee-ruby-sdk/models/shopify_subscription_creation_request.rb +363 -0
  92. data/lib/wallee-ruby-sdk/models/shopify_subscription_model_billing_configuration.rb +271 -0
  93. data/lib/wallee-ruby-sdk/models/{shopify_subscription_edit_model_item.rb → shopify_subscription_model_item.rb} +2 -2
  94. data/lib/wallee-ruby-sdk/models/{shopify_subscription_edit_model_tax_line.rb → shopify_subscription_model_tax_line.rb} +1 -1
  95. data/lib/wallee-ruby-sdk/models/shopify_subscription_product_create.rb +9 -14
  96. data/lib/wallee-ruby-sdk/models/{shopify_subscription_product_active.rb → shopify_subscription_product_update.rb} +2 -12
  97. data/lib/wallee-ruby-sdk/models/shopify_subscription_update_addresses_request.rb +211 -0
  98. data/lib/wallee-ruby-sdk/models/shopify_subscription_update_request.rb +11 -81
  99. data/lib/wallee-ruby-sdk/models/shopify_subscription_version.rb +11 -1
  100. data/lib/wallee-ruby-sdk/models/space.rb +31 -1
  101. data/lib/wallee-ruby-sdk/models/space_create.rb +11 -1
  102. data/lib/wallee-ruby-sdk/models/space_update.rb +11 -1
  103. data/lib/wallee-ruby-sdk/models/subscriber.rb +1 -1
  104. data/lib/wallee-ruby-sdk/models/subscriber_create.rb +1 -1
  105. data/lib/wallee-ruby-sdk/models/subscription.rb +11 -1
  106. data/lib/wallee-ruby-sdk/models/subscription_affiliate.rb +1 -25
  107. data/lib/wallee-ruby-sdk/models/subscription_affiliate_create.rb +1 -29
  108. data/lib/wallee-ruby-sdk/models/subscription_affiliate_deleted.rb +1 -25
  109. data/lib/wallee-ruby-sdk/models/subscription_affiliate_deleting.rb +1 -25
  110. data/lib/wallee-ruby-sdk/models/subscription_charge.rb +49 -1
  111. data/lib/wallee-ruby-sdk/models/subscription_charge_create.rb +49 -1
  112. data/lib/wallee-ruby-sdk/models/subscription_create_request.rb +1 -1
  113. data/lib/wallee-ruby-sdk/models/subscription_ledger_entry.rb +12 -2
  114. data/lib/wallee-ruby-sdk/models/subscription_ledger_entry_create.rb +1 -1
  115. data/lib/wallee-ruby-sdk/models/subscription_product.rb +11 -1
  116. data/lib/wallee-ruby-sdk/models/subscription_product_active.rb +11 -1
  117. data/lib/wallee-ruby-sdk/models/subscription_product_component.rb +1 -1
  118. data/lib/wallee-ruby-sdk/models/subscription_product_component_update.rb +1 -1
  119. data/lib/wallee-ruby-sdk/models/subscription_product_create.rb +11 -1
  120. data/lib/wallee-ruby-sdk/models/subscription_product_version.rb +11 -1
  121. data/lib/wallee-ruby-sdk/models/subscription_product_version_pending.rb +14 -4
  122. data/lib/wallee-ruby-sdk/models/subscription_update_request.rb +206 -0
  123. data/lib/wallee-ruby-sdk/models/tax_calculation.rb +35 -0
  124. data/lib/wallee-ruby-sdk/models/terminal_receipt_fetch_request.rb +221 -0
  125. data/lib/wallee-ruby-sdk/models/terminal_receipt_format.rb +35 -0
  126. data/lib/wallee-ruby-sdk/models/token.rb +1 -25
  127. data/lib/wallee-ruby-sdk/models/token_create.rb +1 -29
  128. data/lib/wallee-ruby-sdk/models/tokenized_card_data.rb +211 -0
  129. data/lib/wallee-ruby-sdk/models/{unencrypted_card_data_create.rb → tokenized_card_data_create.rb} +60 -5
  130. data/lib/wallee-ruby-sdk/models/transaction.rb +132 -4
  131. data/lib/wallee-ruby-sdk/models/transaction_completion.rb +26 -1
  132. data/lib/wallee-ruby-sdk/models/transaction_completion_behavior.rb +36 -0
  133. data/lib/wallee-ruby-sdk/models/transaction_completion_request.rb +26 -1
  134. data/lib/wallee-ruby-sdk/models/transaction_create.rb +59 -1
  135. data/lib/wallee-ruby-sdk/models/transaction_pending.rb +59 -1
  136. data/lib/wallee-ruby-sdk/models/web_app_confirmation_request.rb +206 -0
  137. data/lib/wallee-ruby-sdk/models/web_app_confirmation_response.rb +231 -0
  138. data/lib/wallee-ruby-sdk/models/webhook_url.rb +35 -1
  139. data/lib/wallee-ruby-sdk/models/webhook_url_create.rb +24 -0
  140. data/lib/wallee-ruby-sdk/models/webhook_url_update.rb +24 -0
  141. data/lib/wallee-ruby-sdk/version.rb +1 -1
  142. data/test/condition_type_service_test.rb +22 -0
  143. data/wallee-ruby-sdk.gemspec +3 -2
  144. metadata +93 -17
@@ -25,6 +25,69 @@ module Wallee
25
25
  @api_client = api_client
26
26
  end
27
27
 
28
+ # Check If Token Creation Is Possible
29
+ # This operation checks if the given transaction can be used to create a token out of it.
30
+ # @param space_id
31
+ # @param transaction_id The id of the transaction for which we want to check if the token can be created or not.
32
+ # @param [Hash] opts the optional parameters
33
+ # @return [BOOLEAN]
34
+ def check_token_creation_possible(space_id, transaction_id, opts = {})
35
+ data, _status_code, _headers = check_token_creation_possible_with_http_info(space_id, transaction_id, opts)
36
+ return data
37
+ end
38
+
39
+ # Check If Token Creation Is Possible
40
+ # This operation checks if the given transaction can be used to create a token out of it.
41
+ # @param space_id
42
+ # @param transaction_id The id of the transaction for which we want to check if the token can be created or not.
43
+ # @param [Hash] opts the optional parameters
44
+ # @return [Array<(BOOLEAN, Fixnum, Hash)>] BOOLEAN data, response status code and response headers
45
+ def check_token_creation_possible_with_http_info(space_id, transaction_id, opts = {})
46
+ if @api_client.config.debugging
47
+ @api_client.config.logger.debug "Calling API: TokenService.check_token_creation_possible ..."
48
+ end
49
+ # verify the required parameter 'space_id' is set
50
+ fail ArgumentError, "Missing the required parameter 'space_id' when calling TokenService.check_token_creation_possible" if space_id.nil?
51
+ # verify the required parameter 'transaction_id' is set
52
+ fail ArgumentError, "Missing the required parameter 'transaction_id' when calling TokenService.check_token_creation_possible" if transaction_id.nil?
53
+ # resource path
54
+ local_var_path = "/token/check-token-creation-possible".sub('{format}','json')
55
+
56
+ # query parameters
57
+ query_params = {}
58
+ query_params[:'spaceId'] = space_id
59
+ query_params[:'transactionId'] = transaction_id
60
+
61
+ # header parameters
62
+ header_params = {}
63
+
64
+ # HTTP header 'Accept' (if needed)
65
+ local_header_accept = []
66
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
67
+
68
+ # HTTP header 'Content-Type'
69
+ local_header_content_type = []
70
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
71
+
72
+ # form parameters
73
+ form_params = {}
74
+
75
+ # http body (model)
76
+ post_body = nil
77
+ auth_names = []
78
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
79
+ :header_params => header_params,
80
+ :query_params => query_params,
81
+ :form_params => form_params,
82
+ :body => post_body,
83
+ :auth_names => auth_names,
84
+ :return_type => 'BOOLEAN')
85
+ if @api_client.config.debugging
86
+ @api_client.config.logger.debug "API called: TokenService#check_token_creation_possible\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
87
+ end
88
+ return data, status_code, headers
89
+ end
90
+
28
91
  # Count
29
92
  # Counts the number of items in the database as restricted by the given filter.
30
93
  # @param space_id
@@ -147,6 +210,69 @@ module Wallee
147
210
  return data, status_code, headers
148
211
  end
149
212
 
213
+ # Create Token Based On Transaction
214
+ # This operation creates a token for the given transaction and fills it with the stored payment information of the transaction.
215
+ # @param space_id
216
+ # @param transaction_id The id of the transaction for which we want to create the token.
217
+ # @param [Hash] opts the optional parameters
218
+ # @return [TokenVersion]
219
+ def create_token_based_on_transaction(space_id, transaction_id, opts = {})
220
+ data, _status_code, _headers = create_token_based_on_transaction_with_http_info(space_id, transaction_id, opts)
221
+ return data
222
+ end
223
+
224
+ # Create Token Based On Transaction
225
+ # This operation creates a token for the given transaction and fills it with the stored payment information of the transaction.
226
+ # @param space_id
227
+ # @param transaction_id The id of the transaction for which we want to create the token.
228
+ # @param [Hash] opts the optional parameters
229
+ # @return [Array<(TokenVersion, Fixnum, Hash)>] TokenVersion data, response status code and response headers
230
+ def create_token_based_on_transaction_with_http_info(space_id, transaction_id, opts = {})
231
+ if @api_client.config.debugging
232
+ @api_client.config.logger.debug "Calling API: TokenService.create_token_based_on_transaction ..."
233
+ end
234
+ # verify the required parameter 'space_id' is set
235
+ fail ArgumentError, "Missing the required parameter 'space_id' when calling TokenService.create_token_based_on_transaction" if space_id.nil?
236
+ # verify the required parameter 'transaction_id' is set
237
+ fail ArgumentError, "Missing the required parameter 'transaction_id' when calling TokenService.create_token_based_on_transaction" if transaction_id.nil?
238
+ # resource path
239
+ local_var_path = "/token/create-token-based-on-transaction".sub('{format}','json')
240
+
241
+ # query parameters
242
+ query_params = {}
243
+ query_params[:'spaceId'] = space_id
244
+ query_params[:'transactionId'] = transaction_id
245
+
246
+ # header parameters
247
+ header_params = {}
248
+
249
+ # HTTP header 'Accept' (if needed)
250
+ local_header_accept = []
251
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
252
+
253
+ # HTTP header 'Content-Type'
254
+ local_header_content_type = []
255
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
256
+
257
+ # form parameters
258
+ form_params = {}
259
+
260
+ # http body (model)
261
+ post_body = nil
262
+ auth_names = []
263
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
264
+ :header_params => header_params,
265
+ :query_params => query_params,
266
+ :form_params => form_params,
267
+ :body => post_body,
268
+ :auth_names => auth_names,
269
+ :return_type => 'TokenVersion')
270
+ if @api_client.config.debugging
271
+ @api_client.config.logger.debug "API called: TokenService#create_token_based_on_transaction\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
272
+ end
273
+ return data, status_code, headers
274
+ end
275
+
150
276
  # Create Transaction for Token Update
151
277
  # This operation creates a transaction which allows the updating of the provided token.
152
278
  # @param space_id
@@ -271,6 +397,69 @@ module Wallee
271
397
  return data, status_code, headers
272
398
  end
273
399
 
400
+ # Process Transaction
401
+ # This operation processes the given transaction by using the token associated with the transaction.
402
+ # @param space_id
403
+ # @param transaction_id The id of the transaction for which we want to check if the token can be created or not.
404
+ # @param [Hash] opts the optional parameters
405
+ # @return [Charge]
406
+ def process_transaction(space_id, transaction_id, opts = {})
407
+ data, _status_code, _headers = process_transaction_with_http_info(space_id, transaction_id, opts)
408
+ return data
409
+ end
410
+
411
+ # Process Transaction
412
+ # This operation processes the given transaction by using the token associated with the transaction.
413
+ # @param space_id
414
+ # @param transaction_id The id of the transaction for which we want to check if the token can be created or not.
415
+ # @param [Hash] opts the optional parameters
416
+ # @return [Array<(Charge, Fixnum, Hash)>] Charge data, response status code and response headers
417
+ def process_transaction_with_http_info(space_id, transaction_id, opts = {})
418
+ if @api_client.config.debugging
419
+ @api_client.config.logger.debug "Calling API: TokenService.process_transaction ..."
420
+ end
421
+ # verify the required parameter 'space_id' is set
422
+ fail ArgumentError, "Missing the required parameter 'space_id' when calling TokenService.process_transaction" if space_id.nil?
423
+ # verify the required parameter 'transaction_id' is set
424
+ fail ArgumentError, "Missing the required parameter 'transaction_id' when calling TokenService.process_transaction" if transaction_id.nil?
425
+ # resource path
426
+ local_var_path = "/token/process-transaction".sub('{format}','json')
427
+
428
+ # query parameters
429
+ query_params = {}
430
+ query_params[:'spaceId'] = space_id
431
+ query_params[:'transactionId'] = transaction_id
432
+
433
+ # header parameters
434
+ header_params = {}
435
+
436
+ # HTTP header 'Accept' (if needed)
437
+ local_header_accept = []
438
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
439
+
440
+ # HTTP header 'Content-Type'
441
+ local_header_content_type = []
442
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
443
+
444
+ # form parameters
445
+ form_params = {}
446
+
447
+ # http body (model)
448
+ post_body = nil
449
+ auth_names = []
450
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
451
+ :header_params => header_params,
452
+ :query_params => query_params,
453
+ :form_params => form_params,
454
+ :body => post_body,
455
+ :auth_names => auth_names,
456
+ :return_type => 'Charge')
457
+ if @api_client.config.debugging
458
+ @api_client.config.logger.debug "API called: TokenService#process_transaction\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
459
+ end
460
+ return data, status_code, headers
461
+ end
462
+
274
463
  # Read
275
464
  # Reads the entity with the given 'id' and returns it.
276
465
  # @param space_id
@@ -25,48 +25,37 @@ module Wallee
25
25
  @api_client = api_client
26
26
  end
27
27
 
28
- # getTerminalReceipt
29
- # Returns the PDF document for the requested terminal receipt with the given page width.
28
+ # Fetch Receipts
29
+ # Returns all receipts for the requested terminal transaction.
30
30
  # @param space_id
31
- # @param transaction_id The ID of the transaction to get the receipt for.
32
- # @param type_id
33
- # @param width
31
+ # @param request
34
32
  # @param [Hash] opts the optional parameters
35
- # @return [RenderedTerminalReceipt]
36
- def receipt(space_id, transaction_id, type_id, width, opts = {})
37
- data, _status_code, _headers = receipt_with_http_info(space_id, transaction_id, type_id, width, opts)
33
+ # @return [Array<RenderedTerminalReceipt>]
34
+ def fetch_receipts(space_id, request, opts = {})
35
+ data, _status_code, _headers = fetch_receipts_with_http_info(space_id, request, opts)
38
36
  return data
39
37
  end
40
38
 
41
- # getTerminalReceipt
42
- # Returns the PDF document for the requested terminal receipt with the given page width.
39
+ # Fetch Receipts
40
+ # Returns all receipts for the requested terminal transaction.
43
41
  # @param space_id
44
- # @param transaction_id The ID of the transaction to get the receipt for.
45
- # @param type_id
46
- # @param width
42
+ # @param request
47
43
  # @param [Hash] opts the optional parameters
48
- # @return [Array<(RenderedTerminalReceipt, Fixnum, Hash)>] RenderedTerminalReceipt data, response status code and response headers
49
- def receipt_with_http_info(space_id, transaction_id, type_id, width, opts = {})
44
+ # @return [Array<(Array<RenderedTerminalReceipt>, Fixnum, Hash)>] Array<RenderedTerminalReceipt> data, response status code and response headers
45
+ def fetch_receipts_with_http_info(space_id, request, opts = {})
50
46
  if @api_client.config.debugging
51
- @api_client.config.logger.debug "Calling API: TransactionTerminalService.receipt ..."
47
+ @api_client.config.logger.debug "Calling API: TransactionTerminalService.fetch_receipts ..."
52
48
  end
53
49
  # verify the required parameter 'space_id' is set
54
- fail ArgumentError, "Missing the required parameter 'space_id' when calling TransactionTerminalService.receipt" if space_id.nil?
55
- # verify the required parameter 'transaction_id' is set
56
- fail ArgumentError, "Missing the required parameter 'transaction_id' when calling TransactionTerminalService.receipt" if transaction_id.nil?
57
- # verify the required parameter 'type_id' is set
58
- fail ArgumentError, "Missing the required parameter 'type_id' when calling TransactionTerminalService.receipt" if type_id.nil?
59
- # verify the required parameter 'width' is set
60
- fail ArgumentError, "Missing the required parameter 'width' when calling TransactionTerminalService.receipt" if width.nil?
50
+ fail ArgumentError, "Missing the required parameter 'space_id' when calling TransactionTerminalService.fetch_receipts" if space_id.nil?
51
+ # verify the required parameter 'request' is set
52
+ fail ArgumentError, "Missing the required parameter 'request' when calling TransactionTerminalService.fetch_receipts" if request.nil?
61
53
  # resource path
62
- local_var_path = "/transaction-terminal/receipt".sub('{format}','json')
54
+ local_var_path = "/transaction-terminal/fetch-receipts".sub('{format}','json')
63
55
 
64
56
  # query parameters
65
57
  query_params = {}
66
58
  query_params[:'spaceId'] = space_id
67
- query_params[:'transactionId'] = transaction_id
68
- query_params[:'typeId'] = type_id
69
- query_params[:'width'] = width
70
59
 
71
60
  # header parameters
72
61
  header_params = {}
@@ -76,24 +65,24 @@ module Wallee
76
65
  local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
77
66
 
78
67
  # HTTP header 'Content-Type'
79
- local_header_content_type = ['*/*']
68
+ local_header_content_type = ['application/json;charset=utf-8']
80
69
  header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
81
70
 
82
71
  # form parameters
83
72
  form_params = {}
84
73
 
85
74
  # http body (model)
86
- post_body = nil
75
+ post_body = @api_client.object_to_http_body(request)
87
76
  auth_names = []
88
- data, status_code, headers = @api_client.call_api(:GET, local_var_path,
77
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
89
78
  :header_params => header_params,
90
79
  :query_params => query_params,
91
80
  :form_params => form_params,
92
81
  :body => post_body,
93
82
  :auth_names => auth_names,
94
- :return_type => 'RenderedTerminalReceipt')
83
+ :return_type => 'Array<RenderedTerminalReceipt>')
95
84
  if @api_client.config.debugging
96
- @api_client.config.logger.debug "API called: TransactionTerminalService#receipt\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
85
+ @api_client.config.logger.debug "API called: TransactionTerminalService#fetch_receipts\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
97
86
  end
98
87
  return data, status_code, headers
99
88
  end
@@ -0,0 +1,200 @@
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 WebAppService
22
+ attr_accessor :api_client
23
+
24
+ def initialize(api_client = ApiClient.default)
25
+ @api_client = api_client
26
+ end
27
+
28
+ # Check Installation
29
+ # This operation returns true when the app is installed in given space. The web app is implied by the client ID resp. user ID that is been used to invoke this operation.
30
+ # @param space_id This parameter identifies the space which should be checked if the web app is installed.
31
+ # @param [Hash] opts the optional parameters
32
+ # @return [BOOLEAN]
33
+ def check_installation(space_id, opts = {})
34
+ data, _status_code, _headers = check_installation_with_http_info(space_id, opts)
35
+ return data
36
+ end
37
+
38
+ # Check Installation
39
+ # This operation returns true when the app is installed in given space. The web app is implied by the client ID resp. user ID that is been used to invoke this operation.
40
+ # @param space_id This parameter identifies the space which should be checked if the web app is installed.
41
+ # @param [Hash] opts the optional parameters
42
+ # @return [Array<(BOOLEAN, Fixnum, Hash)>] BOOLEAN data, response status code and response headers
43
+ def check_installation_with_http_info(space_id, opts = {})
44
+ if @api_client.config.debugging
45
+ @api_client.config.logger.debug "Calling API: WebAppService.check_installation ..."
46
+ end
47
+ # verify the required parameter 'space_id' is set
48
+ fail ArgumentError, "Missing the required parameter 'space_id' when calling WebAppService.check_installation" if space_id.nil?
49
+ # resource path
50
+ local_var_path = "/web-app/check-installation".sub('{format}','json')
51
+
52
+ # query parameters
53
+ query_params = {}
54
+ query_params[:'spaceId'] = space_id
55
+
56
+ # header parameters
57
+ header_params = {}
58
+
59
+ # HTTP header 'Accept' (if needed)
60
+ local_header_accept = ['application/json;charset=utf-8']
61
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
62
+
63
+ # HTTP header 'Content-Type'
64
+ local_header_content_type = []
65
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
66
+
67
+ # form parameters
68
+ form_params = {}
69
+
70
+ # http body (model)
71
+ post_body = nil
72
+ auth_names = []
73
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
74
+ :header_params => header_params,
75
+ :query_params => query_params,
76
+ :form_params => form_params,
77
+ :body => post_body,
78
+ :auth_names => auth_names,
79
+ :return_type => 'BOOLEAN')
80
+ if @api_client.config.debugging
81
+ @api_client.config.logger.debug "API called: WebAppService#check_installation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
82
+ end
83
+ return data, status_code, headers
84
+ end
85
+
86
+ # Confirm
87
+ # This operation confirms the app installation. This method has to be invoked after the user returns to the web app. The request of the user will contain the code as a request parameter. The web app is implied by the client ID resp. user ID that is been used to invoke this operation.
88
+ # @param request
89
+ # @param [Hash] opts the optional parameters
90
+ # @return [WebAppConfirmationResponse]
91
+ def confirm(request, opts = {})
92
+ data, _status_code, _headers = confirm_with_http_info(request, opts)
93
+ return data
94
+ end
95
+
96
+ # Confirm
97
+ # This operation confirms the app installation. This method has to be invoked after the user returns to the web app. The request of the user will contain the code as a request parameter. The web app is implied by the client ID resp. user ID that is been used to invoke this operation.
98
+ # @param request
99
+ # @param [Hash] opts the optional parameters
100
+ # @return [Array<(WebAppConfirmationResponse, Fixnum, Hash)>] WebAppConfirmationResponse data, response status code and response headers
101
+ def confirm_with_http_info(request, opts = {})
102
+ if @api_client.config.debugging
103
+ @api_client.config.logger.debug "Calling API: WebAppService.confirm ..."
104
+ end
105
+ # verify the required parameter 'request' is set
106
+ fail ArgumentError, "Missing the required parameter 'request' when calling WebAppService.confirm" if request.nil?
107
+ # resource path
108
+ local_var_path = "/web-app/confirm".sub('{format}','json')
109
+
110
+ # query parameters
111
+ query_params = {}
112
+
113
+ # header parameters
114
+ header_params = {}
115
+
116
+ # HTTP header 'Accept' (if needed)
117
+ local_header_accept = ['application/json;charset=utf-8']
118
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
119
+
120
+ # HTTP header 'Content-Type'
121
+ local_header_content_type = []
122
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
123
+
124
+ # form parameters
125
+ form_params = {}
126
+
127
+ # http body (model)
128
+ post_body = @api_client.object_to_http_body(request)
129
+ auth_names = []
130
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
131
+ :header_params => header_params,
132
+ :query_params => query_params,
133
+ :form_params => form_params,
134
+ :body => post_body,
135
+ :auth_names => auth_names,
136
+ :return_type => 'WebAppConfirmationResponse')
137
+ if @api_client.config.debugging
138
+ @api_client.config.logger.debug "API called: WebAppService#confirm\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
139
+ end
140
+ return data, status_code, headers
141
+ end
142
+
143
+ # Uninstall
144
+ # This operation uninstalls the web app from the provided space. The web app is implied by the client ID resp. user ID that is been used to invoke this operation.
145
+ # @param space_id This parameter identifies the space within which the web app should be uninstalled.
146
+ # @param [Hash] opts the optional parameters
147
+ # @return [nil]
148
+ def uninstall(space_id, opts = {})
149
+ uninstall_with_http_info(space_id, opts)
150
+ return nil
151
+ end
152
+
153
+ # Uninstall
154
+ # This operation uninstalls the web app from the provided space. The web app is implied by the client ID resp. user ID that is been used to invoke this operation.
155
+ # @param space_id This parameter identifies the space within which the web app should be uninstalled.
156
+ # @param [Hash] opts the optional parameters
157
+ # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
158
+ def uninstall_with_http_info(space_id, opts = {})
159
+ if @api_client.config.debugging
160
+ @api_client.config.logger.debug "Calling API: WebAppService.uninstall ..."
161
+ end
162
+ # verify the required parameter 'space_id' is set
163
+ fail ArgumentError, "Missing the required parameter 'space_id' when calling WebAppService.uninstall" if space_id.nil?
164
+ # resource path
165
+ local_var_path = "/web-app/uninstall".sub('{format}','json')
166
+
167
+ # query parameters
168
+ query_params = {}
169
+ query_params[:'spaceId'] = space_id
170
+
171
+ # header parameters
172
+ header_params = {}
173
+
174
+ # HTTP header 'Accept' (if needed)
175
+ local_header_accept = []
176
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
177
+
178
+ # HTTP header 'Content-Type'
179
+ local_header_content_type = []
180
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
181
+
182
+ # form parameters
183
+ form_params = {}
184
+
185
+ # http body (model)
186
+ post_body = nil
187
+ auth_names = []
188
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
189
+ :header_params => header_params,
190
+ :query_params => query_params,
191
+ :form_params => form_params,
192
+ :body => post_body,
193
+ :auth_names => auth_names)
194
+ if @api_client.config.debugging
195
+ @api_client.config.logger.debug "API called: WebAppService#uninstall\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
196
+ end
197
+ return data, status_code, headers
198
+ end
199
+ end
200
+ end