jamm 1.3.0 → 1.4.1

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 (84) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +1 -1
  3. data/jamm.gemspec +1 -1
  4. data/lib/jamm/api/api/customer_api.rb +82 -52
  5. data/lib/jamm/api/api/healthcheck_api.rb +18 -15
  6. data/lib/jamm/api/api/payment_api.rb +113 -62
  7. data/lib/jamm/api/api/webhook_service_api.rb +41 -28
  8. data/lib/jamm/api/api_client.rb +74 -66
  9. data/lib/jamm/api/api_error.rb +16 -16
  10. data/lib/jamm/api/configuration.rb +42 -34
  11. data/lib/jamm/api/models/apiv1_error.rb +56 -44
  12. data/lib/jamm/api/models/apiv1_status.rb +57 -47
  13. data/lib/jamm/api/models/customer_service_update_customer_body.rb +107 -69
  14. data/lib/jamm/api/models/googlerpc_status.rb +61 -45
  15. data/lib/jamm/api/models/protobuf_any.rb +42 -35
  16. data/lib/jamm/api/models/v1_add_charge_request.rb +59 -44
  17. data/lib/jamm/api/models/v1_add_charge_response.rb +59 -44
  18. data/lib/jamm/api/models/v1_bank.rb +150 -95
  19. data/lib/jamm/api/models/v1_bank_assets.rb +60 -47
  20. data/lib/jamm/api/models/v1_bank_branch.rb +83 -56
  21. data/lib/jamm/api/models/v1_bank_information.rb +71 -51
  22. data/lib/jamm/api/models/v1_bank_quota.rb +99 -64
  23. data/lib/jamm/api/models/v1_bank_scheduled_maintenance_period.rb +75 -52
  24. data/lib/jamm/api/models/v1_buyer.rb +104 -76
  25. data/lib/jamm/api/models/v1_charge.rb +67 -52
  26. data/lib/jamm/api/models/v1_charge_message.rb +151 -93
  27. data/lib/jamm/api/models/v1_charge_message_status.rb +17 -18
  28. data/lib/jamm/api/models/v1_charge_result.rb +152 -93
  29. data/lib/jamm/api/models/v1_contract.rb +64 -52
  30. data/lib/jamm/api/models/v1_contract_message.rb +67 -48
  31. data/lib/jamm/api/models/v1_contract_status.rb +20 -21
  32. data/lib/jamm/api/models/v1_create_contract_with_charge_request.rb +59 -44
  33. data/lib/jamm/api/models/v1_create_contract_with_charge_response.rb +67 -48
  34. data/lib/jamm/api/models/v1_create_contract_without_charge_request.rb +51 -40
  35. data/lib/jamm/api/models/v1_create_contract_without_charge_response.rb +59 -44
  36. data/lib/jamm/api/models/v1_create_customer_request.rb +42 -35
  37. data/lib/jamm/api/models/v1_create_customer_response.rb +42 -35
  38. data/lib/jamm/api/models/v1_customer.rb +91 -60
  39. data/lib/jamm/api/models/v1_delete_customer_response.rb +42 -35
  40. data/lib/jamm/api/models/v1_deposit_type.rb +14 -15
  41. data/lib/jamm/api/models/v1_error_detail.rb +57 -44
  42. data/lib/jamm/api/models/v1_error_response.rb +46 -38
  43. data/lib/jamm/api/models/v1_error_type.rb +30 -31
  44. data/lib/jamm/api/models/v1_event_type.rb +20 -21
  45. data/lib/jamm/api/models/v1_get_bank_response.rb +42 -35
  46. data/lib/jamm/api/models/v1_get_branch_response.rb +42 -35
  47. data/lib/jamm/api/models/v1_get_branches_response.rb +44 -36
  48. data/lib/jamm/api/models/v1_get_charge_response.rb +51 -40
  49. data/lib/jamm/api/models/v1_get_charges_response.rb +60 -45
  50. data/lib/jamm/api/models/v1_get_contract_response.rb +51 -40
  51. data/lib/jamm/api/models/v1_get_customer_response.rb +42 -35
  52. data/lib/jamm/api/models/v1_get_major_banks_response.rb +59 -44
  53. data/lib/jamm/api/models/v1_initial_charge.rb +61 -48
  54. data/lib/jamm/api/models/v1_kyc_status.rb +16 -17
  55. data/lib/jamm/api/models/v1_merchant.rb +51 -40
  56. data/lib/jamm/api/models/v1_merchant_customer.rb +51 -40
  57. data/lib/jamm/api/models/v1_merchant_webhook_message.rb +75 -57
  58. data/lib/jamm/api/models/v1_message_response.rb +67 -48
  59. data/lib/jamm/api/models/v1_off_session_payment_request.rb +51 -40
  60. data/lib/jamm/api/models/v1_off_session_payment_response.rb +51 -40
  61. data/lib/jamm/api/models/v1_on_session_payment_data.rb +67 -48
  62. data/lib/jamm/api/models/v1_on_session_payment_error.rb +55 -45
  63. data/lib/jamm/api/models/v1_on_session_payment_error_code.rb +21 -22
  64. data/lib/jamm/api/models/v1_on_session_payment_request.rb +67 -48
  65. data/lib/jamm/api/models/v1_on_session_payment_response.rb +59 -44
  66. data/lib/jamm/api/models/v1_pagination.rb +51 -40
  67. data/lib/jamm/api/models/v1_payment_authorization_status.rb +14 -15
  68. data/lib/jamm/api/models/v1_payment_link.rb +57 -44
  69. data/lib/jamm/api/models/v1_ping_response.rb +42 -35
  70. data/lib/jamm/api/models/v1_search_banks_response.rb +44 -36
  71. data/lib/jamm/api/models/v1_search_branches_response.rb +44 -36
  72. data/lib/jamm/api/models/v1_update_customer_response.rb +42 -35
  73. data/lib/jamm/api/models/v1_url.rb +48 -39
  74. data/lib/jamm/api/models/v1_user_account_message.rb +67 -48
  75. data/lib/jamm/api/models/v1_withdraw_request.rb +51 -40
  76. data/lib/jamm/api/models/v1_withdraw_response.rb +51 -40
  77. data/lib/jamm/api/version.rb +11 -11
  78. data/lib/jamm/api.rb +10 -10
  79. data/lib/jamm/charge.rb +12 -0
  80. data/lib/jamm/deprecation.rb +13 -0
  81. data/lib/jamm/payment.rb +61 -0
  82. data/lib/jamm/version.rb +1 -1
  83. data/lib/jamm.rb +2 -0
  84. metadata +5 -3
@@ -1,14 +1,14 @@
1
- # frozen_string_literal: true
2
-
3
- # #Jamm API
4
- #
5
- # No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
6
- #
7
- # The version of the OpenAPI document: 1.0
8
- #
9
- # Generated by: https://openapi-generator.tech
10
- # Generator version: 7.9.0
11
- #
1
+ =begin
2
+ #Jamm API
3
+
4
+ #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
5
+
6
+ The version of the OpenAPI document: 1.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.9.0
10
+
11
+ =end
12
12
 
13
13
  require 'cgi'
14
14
 
@@ -19,7 +19,6 @@ module Api
19
19
  def initialize(api_client = ApiClient.default)
20
20
  @api_client = api_client
21
21
  end
22
-
23
22
  # Use existing contract with charge
24
23
  # Use existing contract with charge
25
24
  # @param body [AddChargeRequest] This message represents a request to add a charge to an existing customer. It contains all necessary information to process a new payment transaction.
@@ -36,10 +35,13 @@ module Api
36
35
  # @param [Hash] opts the optional parameters
37
36
  # @return [Array<(AddChargeResponse, Integer, Hash)>] AddChargeResponse data, response status code and response headers
38
37
  def add_charge_with_http_info(body, opts = {})
39
- @api_client.config.logger.debug 'Calling API: PaymentApi.add_charge ...' if @api_client.config.debugging
38
+ if @api_client.config.debugging
39
+ @api_client.config.logger.debug 'Calling API: PaymentApi.add_charge ...'
40
+ end
40
41
  # verify the required parameter 'body' is set
41
- raise ArgumentError, "Missing the required parameter 'body' when calling PaymentApi.add_charge" if @api_client.config.client_side_validation && body.nil?
42
-
42
+ if @api_client.config.client_side_validation && body.nil?
43
+ fail ArgumentError, "Missing the required parameter 'body' when calling PaymentApi.add_charge"
44
+ end
43
45
  # resource path
44
46
  local_var_path = '/v1/add-charge'
45
47
 
@@ -52,7 +54,9 @@ module Api
52
54
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
53
55
  # HTTP header 'Content-Type'
54
56
  content_type = @api_client.select_header_content_type(['application/json'])
55
- header_params['Content-Type'] = content_type unless content_type.nil?
57
+ if !content_type.nil?
58
+ header_params['Content-Type'] = content_type
59
+ end
56
60
 
57
61
  # form parameters
58
62
  form_params = opts[:form_params] || {}
@@ -77,8 +81,10 @@ module Api
77
81
  )
78
82
 
79
83
  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
80
- @api_client.config.logger.debug "API called: PaymentApi#add_charge\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" if @api_client.config.debugging
81
- [data, status_code, headers]
84
+ if @api_client.config.debugging
85
+ @api_client.config.logger.debug "API called: PaymentApi#add_charge\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
86
+ end
87
+ return data, status_code, headers
82
88
  end
83
89
 
84
90
  # Create a contract with initial charge
@@ -97,10 +103,13 @@ module Api
97
103
  # @param [Hash] opts the optional parameters
98
104
  # @return [Array<(CreateContractWithChargeResponse, Integer, Hash)>] CreateContractWithChargeResponse data, response status code and response headers
99
105
  def create_contract_with_charge_with_http_info(body, opts = {})
100
- @api_client.config.logger.debug 'Calling API: PaymentApi.create_contract_with_charge ...' if @api_client.config.debugging
106
+ if @api_client.config.debugging
107
+ @api_client.config.logger.debug 'Calling API: PaymentApi.create_contract_with_charge ...'
108
+ end
101
109
  # verify the required parameter 'body' is set
102
- raise ArgumentError, "Missing the required parameter 'body' when calling PaymentApi.create_contract_with_charge" if @api_client.config.client_side_validation && body.nil?
103
-
110
+ if @api_client.config.client_side_validation && body.nil?
111
+ fail ArgumentError, "Missing the required parameter 'body' when calling PaymentApi.create_contract_with_charge"
112
+ end
104
113
  # resource path
105
114
  local_var_path = '/v1/contract-with-charge'
106
115
 
@@ -113,7 +122,9 @@ module Api
113
122
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
114
123
  # HTTP header 'Content-Type'
115
124
  content_type = @api_client.select_header_content_type(['application/json'])
116
- header_params['Content-Type'] = content_type unless content_type.nil?
125
+ if !content_type.nil?
126
+ header_params['Content-Type'] = content_type
127
+ end
117
128
 
118
129
  # form parameters
119
130
  form_params = opts[:form_params] || {}
@@ -138,8 +149,10 @@ module Api
138
149
  )
139
150
 
140
151
  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
141
- @api_client.config.logger.debug "API called: PaymentApi#create_contract_with_charge\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" if @api_client.config.debugging
142
- [data, status_code, headers]
152
+ if @api_client.config.debugging
153
+ @api_client.config.logger.debug "API called: PaymentApi#create_contract_with_charge\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
154
+ end
155
+ return data, status_code, headers
143
156
  end
144
157
 
145
158
  # Create a contract without initial charge (contract only)
@@ -158,10 +171,13 @@ module Api
158
171
  # @param [Hash] opts the optional parameters
159
172
  # @return [Array<(CreateContractWithoutChargeResponse, Integer, Hash)>] CreateContractWithoutChargeResponse data, response status code and response headers
160
173
  def create_contract_without_charge_with_http_info(body, opts = {})
161
- @api_client.config.logger.debug 'Calling API: PaymentApi.create_contract_without_charge ...' if @api_client.config.debugging
174
+ if @api_client.config.debugging
175
+ @api_client.config.logger.debug 'Calling API: PaymentApi.create_contract_without_charge ...'
176
+ end
162
177
  # verify the required parameter 'body' is set
163
- raise ArgumentError, "Missing the required parameter 'body' when calling PaymentApi.create_contract_without_charge" if @api_client.config.client_side_validation && body.nil?
164
-
178
+ if @api_client.config.client_side_validation && body.nil?
179
+ fail ArgumentError, "Missing the required parameter 'body' when calling PaymentApi.create_contract_without_charge"
180
+ end
165
181
  # resource path
166
182
  local_var_path = '/v1/contract-without-charge'
167
183
 
@@ -174,7 +190,9 @@ module Api
174
190
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
175
191
  # HTTP header 'Content-Type'
176
192
  content_type = @api_client.select_header_content_type(['application/json'])
177
- header_params['Content-Type'] = content_type unless content_type.nil?
193
+ if !content_type.nil?
194
+ header_params['Content-Type'] = content_type
195
+ end
178
196
 
179
197
  # form parameters
180
198
  form_params = opts[:form_params] || {}
@@ -199,8 +217,10 @@ module Api
199
217
  )
200
218
 
201
219
  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
202
- @api_client.config.logger.debug "API called: PaymentApi#create_contract_without_charge\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" if @api_client.config.debugging
203
- [data, status_code, headers]
220
+ if @api_client.config.debugging
221
+ @api_client.config.logger.debug "API called: PaymentApi#create_contract_without_charge\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
222
+ end
223
+ return data, status_code, headers
204
224
  end
205
225
 
206
226
  # Get a specific charge
@@ -219,12 +239,15 @@ module Api
219
239
  # @param [Hash] opts the optional parameters
220
240
  # @return [Array<(GetChargeResponse, Integer, Hash)>] GetChargeResponse data, response status code and response headers
221
241
  def get_charge_with_http_info(charge, opts = {})
222
- @api_client.config.logger.debug 'Calling API: PaymentApi.get_charge ...' if @api_client.config.debugging
242
+ if @api_client.config.debugging
243
+ @api_client.config.logger.debug 'Calling API: PaymentApi.get_charge ...'
244
+ end
223
245
  # verify the required parameter 'charge' is set
224
- raise ArgumentError, "Missing the required parameter 'charge' when calling PaymentApi.get_charge" if @api_client.config.client_side_validation && charge.nil?
225
-
246
+ if @api_client.config.client_side_validation && charge.nil?
247
+ fail ArgumentError, "Missing the required parameter 'charge' when calling PaymentApi.get_charge"
248
+ end
226
249
  # resource path
227
- local_var_path = '/v1/charge/{charge}'.sub('{charge}', CGI.escape(charge.to_s))
250
+ local_var_path = '/v1/charge/{charge}'.sub('{' + 'charge' + '}', CGI.escape(charge.to_s))
228
251
 
229
252
  # query parameters
230
253
  query_params = opts[:query_params] || {}
@@ -257,8 +280,10 @@ module Api
257
280
  )
258
281
 
259
282
  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
260
- @api_client.config.logger.debug "API called: PaymentApi#get_charge\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" if @api_client.config.debugging
261
- [data, status_code, headers]
283
+ if @api_client.config.debugging
284
+ @api_client.config.logger.debug "API called: PaymentApi#get_charge\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
285
+ end
286
+ return data, status_code, headers
262
287
  end
263
288
 
264
289
  # Get a list of charges
@@ -281,17 +306,20 @@ module Api
281
306
  # @option opts [String] :pagination_page_token
282
307
  # @return [Array<(GetChargesResponse, Integer, Hash)>] GetChargesResponse data, response status code and response headers
283
308
  def get_charges_with_http_info(customer, opts = {})
284
- @api_client.config.logger.debug 'Calling API: PaymentApi.get_charges ...' if @api_client.config.debugging
309
+ if @api_client.config.debugging
310
+ @api_client.config.logger.debug 'Calling API: PaymentApi.get_charges ...'
311
+ end
285
312
  # verify the required parameter 'customer' is set
286
- raise ArgumentError, "Missing the required parameter 'customer' when calling PaymentApi.get_charges" if @api_client.config.client_side_validation && customer.nil?
287
-
313
+ if @api_client.config.client_side_validation && customer.nil?
314
+ fail ArgumentError, "Missing the required parameter 'customer' when calling PaymentApi.get_charges"
315
+ end
288
316
  # resource path
289
- local_var_path = '/v1/charges/{customer}'.sub('{customer}', CGI.escape(customer.to_s))
317
+ local_var_path = '/v1/charges/{customer}'.sub('{' + 'customer' + '}', CGI.escape(customer.to_s))
290
318
 
291
319
  # query parameters
292
320
  query_params = opts[:query_params] || {}
293
- query_params[:'pagination.pageSize'] = opts[:pagination_page_size] unless opts[:pagination_page_size].nil?
294
- query_params[:'pagination.pageToken'] = opts[:pagination_page_token] unless opts[:pagination_page_token].nil?
321
+ query_params[:'pagination.pageSize'] = opts[:'pagination_page_size'] if !opts[:'pagination_page_size'].nil?
322
+ query_params[:'pagination.pageToken'] = opts[:'pagination_page_token'] if !opts[:'pagination_page_token'].nil?
295
323
 
296
324
  # header parameters
297
325
  header_params = opts[:header_params] || {}
@@ -321,8 +349,10 @@ module Api
321
349
  )
322
350
 
323
351
  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
324
- @api_client.config.logger.debug "API called: PaymentApi#get_charges\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" if @api_client.config.debugging
325
- [data, status_code, headers]
352
+ if @api_client.config.debugging
353
+ @api_client.config.logger.debug "API called: PaymentApi#get_charges\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
354
+ end
355
+ return data, status_code, headers
326
356
  end
327
357
 
328
358
  # Process payment directly without redirect
@@ -341,10 +371,13 @@ module Api
341
371
  # @param [Hash] opts the optional parameters
342
372
  # @return [Array<(OffSessionPaymentResponse, Integer, Hash)>] OffSessionPaymentResponse data, response status code and response headers
343
373
  def off_session_payment_with_http_info(body, opts = {})
344
- @api_client.config.logger.debug 'Calling API: PaymentApi.off_session_payment ...' if @api_client.config.debugging
374
+ if @api_client.config.debugging
375
+ @api_client.config.logger.debug 'Calling API: PaymentApi.off_session_payment ...'
376
+ end
345
377
  # verify the required parameter 'body' is set
346
- raise ArgumentError, "Missing the required parameter 'body' when calling PaymentApi.off_session_payment" if @api_client.config.client_side_validation && body.nil?
347
-
378
+ if @api_client.config.client_side_validation && body.nil?
379
+ fail ArgumentError, "Missing the required parameter 'body' when calling PaymentApi.off_session_payment"
380
+ end
348
381
  # resource path
349
382
  local_var_path = '/v1/payments/off-session'
350
383
 
@@ -357,7 +390,9 @@ module Api
357
390
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
358
391
  # HTTP header 'Content-Type'
359
392
  content_type = @api_client.select_header_content_type(['application/json'])
360
- header_params['Content-Type'] = content_type unless content_type.nil?
393
+ if !content_type.nil?
394
+ header_params['Content-Type'] = content_type
395
+ end
361
396
 
362
397
  # form parameters
363
398
  form_params = opts[:form_params] || {}
@@ -382,8 +417,10 @@ module Api
382
417
  )
383
418
 
384
419
  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
385
- @api_client.config.logger.debug "API called: PaymentApi#off_session_payment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" if @api_client.config.debugging
386
- [data, status_code, headers]
420
+ if @api_client.config.debugging
421
+ @api_client.config.logger.debug "API called: PaymentApi#off_session_payment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
422
+ end
423
+ return data, status_code, headers
387
424
  end
388
425
 
389
426
  # Process payment with optional redirect
@@ -402,10 +439,13 @@ module Api
402
439
  # @param [Hash] opts the optional parameters
403
440
  # @return [Array<(OnSessionPaymentResponse, Integer, Hash)>] OnSessionPaymentResponse data, response status code and response headers
404
441
  def on_session_payment_with_http_info(body, opts = {})
405
- @api_client.config.logger.debug 'Calling API: PaymentApi.on_session_payment ...' if @api_client.config.debugging
442
+ if @api_client.config.debugging
443
+ @api_client.config.logger.debug 'Calling API: PaymentApi.on_session_payment ...'
444
+ end
406
445
  # verify the required parameter 'body' is set
407
- raise ArgumentError, "Missing the required parameter 'body' when calling PaymentApi.on_session_payment" if @api_client.config.client_side_validation && body.nil?
408
-
446
+ if @api_client.config.client_side_validation && body.nil?
447
+ fail ArgumentError, "Missing the required parameter 'body' when calling PaymentApi.on_session_payment"
448
+ end
409
449
  # resource path
410
450
  local_var_path = '/v1/payments/on-session'
411
451
 
@@ -418,7 +458,9 @@ module Api
418
458
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
419
459
  # HTTP header 'Content-Type'
420
460
  content_type = @api_client.select_header_content_type(['application/json'])
421
- header_params['Content-Type'] = content_type unless content_type.nil?
461
+ if !content_type.nil?
462
+ header_params['Content-Type'] = content_type
463
+ end
422
464
 
423
465
  # form parameters
424
466
  form_params = opts[:form_params] || {}
@@ -443,8 +485,10 @@ module Api
443
485
  )
444
486
 
445
487
  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
446
- @api_client.config.logger.debug "API called: PaymentApi#on_session_payment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" if @api_client.config.debugging
447
- [data, status_code, headers]
488
+ if @api_client.config.debugging
489
+ @api_client.config.logger.debug "API called: PaymentApi#on_session_payment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
490
+ end
491
+ return data, status_code, headers
448
492
  end
449
493
 
450
494
  # Withdraw money from customer immediately, without redirect
@@ -463,10 +507,13 @@ module Api
463
507
  # @param [Hash] opts the optional parameters
464
508
  # @return [Array<(WithdrawResponse, Integer, Hash)>] WithdrawResponse data, response status code and response headers
465
509
  def withdraw_with_http_info(body, opts = {})
466
- @api_client.config.logger.debug 'Calling API: PaymentApi.withdraw ...' if @api_client.config.debugging
510
+ if @api_client.config.debugging
511
+ @api_client.config.logger.debug 'Calling API: PaymentApi.withdraw ...'
512
+ end
467
513
  # verify the required parameter 'body' is set
468
- raise ArgumentError, "Missing the required parameter 'body' when calling PaymentApi.withdraw" if @api_client.config.client_side_validation && body.nil?
469
-
514
+ if @api_client.config.client_side_validation && body.nil?
515
+ fail ArgumentError, "Missing the required parameter 'body' when calling PaymentApi.withdraw"
516
+ end
470
517
  # resource path
471
518
  local_var_path = '/v1/withdraw'
472
519
 
@@ -479,7 +526,9 @@ module Api
479
526
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
480
527
  # HTTP header 'Content-Type'
481
528
  content_type = @api_client.select_header_content_type(['application/json'])
482
- header_params['Content-Type'] = content_type unless content_type.nil?
529
+ if !content_type.nil?
530
+ header_params['Content-Type'] = content_type
531
+ end
483
532
 
484
533
  # form parameters
485
534
  form_params = opts[:form_params] || {}
@@ -504,8 +553,10 @@ module Api
504
553
  )
505
554
 
506
555
  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
507
- @api_client.config.logger.debug "API called: PaymentApi#withdraw\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" if @api_client.config.debugging
508
- [data, status_code, headers]
556
+ if @api_client.config.debugging
557
+ @api_client.config.logger.debug "API called: PaymentApi#withdraw\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
558
+ end
559
+ return data, status_code, headers
509
560
  end
510
561
  end
511
562
  end
@@ -1,14 +1,14 @@
1
- # frozen_string_literal: true
2
-
3
- # #Jamm API
4
- #
5
- # No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
6
- #
7
- # The version of the OpenAPI document: 1.0
8
- #
9
- # Generated by: https://openapi-generator.tech
10
- # Generator version: 7.9.0
11
- #
1
+ =begin
2
+ #Jamm API
3
+
4
+ #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
5
+
6
+ The version of the OpenAPI document: 1.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.9.0
10
+
11
+ =end
12
12
 
13
13
  require 'cgi'
14
14
 
@@ -19,9 +19,8 @@ module Api
19
19
  def initialize(api_client = ApiClient.default)
20
20
  @api_client = api_client
21
21
  end
22
-
23
22
  # Error placeholder. This method is not implemented on Jamm backend.
24
- # @param body [Object]
23
+ # @param body [Object]
25
24
  # @param [Hash] opts the optional parameters
26
25
  # @return [ErrorResponse]
27
26
  def webhook_service_error(body, opts = {})
@@ -30,14 +29,17 @@ module Api
30
29
  end
31
30
 
32
31
  # Error placeholder. This method is not implemented on Jamm backend.
33
- # @param body [Object]
32
+ # @param body [Object]
34
33
  # @param [Hash] opts the optional parameters
35
34
  # @return [Array<(ErrorResponse, Integer, Hash)>] ErrorResponse data, response status code and response headers
36
35
  def webhook_service_error_with_http_info(body, opts = {})
37
- @api_client.config.logger.debug 'Calling API: WebhookServiceApi.webhook_service_error ...' if @api_client.config.debugging
36
+ if @api_client.config.debugging
37
+ @api_client.config.logger.debug 'Calling API: WebhookServiceApi.webhook_service_error ...'
38
+ end
38
39
  # verify the required parameter 'body' is set
39
- raise ArgumentError, "Missing the required parameter 'body' when calling WebhookServiceApi.webhook_service_error" if @api_client.config.client_side_validation && body.nil?
40
-
40
+ if @api_client.config.client_side_validation && body.nil?
41
+ fail ArgumentError, "Missing the required parameter 'body' when calling WebhookServiceApi.webhook_service_error"
42
+ end
41
43
  # resource path
42
44
  local_var_path = '/errors'
43
45
 
@@ -50,7 +52,9 @@ module Api
50
52
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
51
53
  # HTTP header 'Content-Type'
52
54
  content_type = @api_client.select_header_content_type(['application/json'])
53
- header_params['Content-Type'] = content_type unless content_type.nil?
55
+ if !content_type.nil?
56
+ header_params['Content-Type'] = content_type
57
+ end
54
58
 
55
59
  # form parameters
56
60
  form_params = opts[:form_params] || {}
@@ -75,12 +79,14 @@ module Api
75
79
  )
76
80
 
77
81
  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
78
- @api_client.config.logger.debug "API called: WebhookServiceApi#webhook_service_error\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" if @api_client.config.debugging
79
- [data, status_code, headers]
82
+ if @api_client.config.debugging
83
+ @api_client.config.logger.debug "API called: WebhookServiceApi#webhook_service_error\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
84
+ end
85
+ return data, status_code, headers
80
86
  end
81
87
 
82
88
  # Message placeholder. This method is not implemented on Jamm backend.
83
- # @param body [Object]
89
+ # @param body [Object]
84
90
  # @param [Hash] opts the optional parameters
85
91
  # @return [MessageResponse]
86
92
  def webhook_service_message(body, opts = {})
@@ -89,14 +95,17 @@ module Api
89
95
  end
90
96
 
91
97
  # Message placeholder. This method is not implemented on Jamm backend.
92
- # @param body [Object]
98
+ # @param body [Object]
93
99
  # @param [Hash] opts the optional parameters
94
100
  # @return [Array<(MessageResponse, Integer, Hash)>] MessageResponse data, response status code and response headers
95
101
  def webhook_service_message_with_http_info(body, opts = {})
96
- @api_client.config.logger.debug 'Calling API: WebhookServiceApi.webhook_service_message ...' if @api_client.config.debugging
102
+ if @api_client.config.debugging
103
+ @api_client.config.logger.debug 'Calling API: WebhookServiceApi.webhook_service_message ...'
104
+ end
97
105
  # verify the required parameter 'body' is set
98
- raise ArgumentError, "Missing the required parameter 'body' when calling WebhookServiceApi.webhook_service_message" if @api_client.config.client_side_validation && body.nil?
99
-
106
+ if @api_client.config.client_side_validation && body.nil?
107
+ fail ArgumentError, "Missing the required parameter 'body' when calling WebhookServiceApi.webhook_service_message"
108
+ end
100
109
  # resource path
101
110
  local_var_path = '/webhooks'
102
111
 
@@ -109,7 +118,9 @@ module Api
109
118
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
110
119
  # HTTP header 'Content-Type'
111
120
  content_type = @api_client.select_header_content_type(['application/json'])
112
- header_params['Content-Type'] = content_type unless content_type.nil?
121
+ if !content_type.nil?
122
+ header_params['Content-Type'] = content_type
123
+ end
113
124
 
114
125
  # form parameters
115
126
  form_params = opts[:form_params] || {}
@@ -134,8 +145,10 @@ module Api
134
145
  )
135
146
 
136
147
  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
137
- @api_client.config.logger.debug "API called: WebhookServiceApi#webhook_service_message\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" if @api_client.config.debugging
138
- [data, status_code, headers]
148
+ if @api_client.config.debugging
149
+ @api_client.config.logger.debug "API called: WebhookServiceApi#webhook_service_message\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
150
+ end
151
+ return data, status_code, headers
139
152
  end
140
153
  end
141
154
  end