jamm 1.3.0 → 1.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/jamm/api/api/customer_api.rb +82 -52
- data/lib/jamm/api/api/healthcheck_api.rb +18 -15
- data/lib/jamm/api/api/payment_api.rb +113 -62
- data/lib/jamm/api/api/webhook_service_api.rb +41 -28
- data/lib/jamm/api/api_client.rb +74 -66
- data/lib/jamm/api/api_error.rb +16 -16
- data/lib/jamm/api/configuration.rb +42 -34
- data/lib/jamm/api/models/apiv1_error.rb +56 -44
- data/lib/jamm/api/models/apiv1_status.rb +57 -47
- data/lib/jamm/api/models/customer_service_update_customer_body.rb +107 -69
- data/lib/jamm/api/models/googlerpc_status.rb +61 -45
- data/lib/jamm/api/models/protobuf_any.rb +42 -35
- data/lib/jamm/api/models/v1_add_charge_request.rb +59 -44
- data/lib/jamm/api/models/v1_add_charge_response.rb +59 -44
- data/lib/jamm/api/models/v1_bank.rb +150 -95
- data/lib/jamm/api/models/v1_bank_assets.rb +60 -47
- data/lib/jamm/api/models/v1_bank_branch.rb +83 -56
- data/lib/jamm/api/models/v1_bank_information.rb +71 -51
- data/lib/jamm/api/models/v1_bank_quota.rb +99 -64
- data/lib/jamm/api/models/v1_bank_scheduled_maintenance_period.rb +75 -52
- data/lib/jamm/api/models/v1_buyer.rb +104 -76
- data/lib/jamm/api/models/v1_charge.rb +67 -52
- data/lib/jamm/api/models/v1_charge_message.rb +151 -93
- data/lib/jamm/api/models/v1_charge_message_status.rb +17 -18
- data/lib/jamm/api/models/v1_charge_result.rb +152 -93
- data/lib/jamm/api/models/v1_contract.rb +64 -52
- data/lib/jamm/api/models/v1_contract_message.rb +67 -48
- data/lib/jamm/api/models/v1_contract_status.rb +20 -21
- data/lib/jamm/api/models/v1_create_contract_with_charge_request.rb +59 -44
- data/lib/jamm/api/models/v1_create_contract_with_charge_response.rb +67 -48
- data/lib/jamm/api/models/v1_create_contract_without_charge_request.rb +51 -40
- data/lib/jamm/api/models/v1_create_contract_without_charge_response.rb +59 -44
- data/lib/jamm/api/models/v1_create_customer_request.rb +42 -35
- data/lib/jamm/api/models/v1_create_customer_response.rb +42 -35
- data/lib/jamm/api/models/v1_customer.rb +91 -60
- data/lib/jamm/api/models/v1_delete_customer_response.rb +42 -35
- data/lib/jamm/api/models/v1_deposit_type.rb +14 -15
- data/lib/jamm/api/models/v1_error_detail.rb +57 -44
- data/lib/jamm/api/models/v1_error_response.rb +46 -38
- data/lib/jamm/api/models/v1_error_type.rb +30 -31
- data/lib/jamm/api/models/v1_event_type.rb +20 -21
- data/lib/jamm/api/models/v1_get_bank_response.rb +42 -35
- data/lib/jamm/api/models/v1_get_branch_response.rb +42 -35
- data/lib/jamm/api/models/v1_get_branches_response.rb +44 -36
- data/lib/jamm/api/models/v1_get_charge_response.rb +51 -40
- data/lib/jamm/api/models/v1_get_charges_response.rb +60 -45
- data/lib/jamm/api/models/v1_get_contract_response.rb +51 -40
- data/lib/jamm/api/models/v1_get_customer_response.rb +42 -35
- data/lib/jamm/api/models/v1_get_major_banks_response.rb +59 -44
- data/lib/jamm/api/models/v1_initial_charge.rb +61 -48
- data/lib/jamm/api/models/v1_kyc_status.rb +16 -17
- data/lib/jamm/api/models/v1_merchant.rb +51 -40
- data/lib/jamm/api/models/v1_merchant_customer.rb +51 -40
- data/lib/jamm/api/models/v1_merchant_webhook_message.rb +75 -57
- data/lib/jamm/api/models/v1_message_response.rb +67 -48
- data/lib/jamm/api/models/v1_off_session_payment_request.rb +51 -40
- data/lib/jamm/api/models/v1_off_session_payment_response.rb +51 -40
- data/lib/jamm/api/models/v1_on_session_payment_data.rb +67 -48
- data/lib/jamm/api/models/v1_on_session_payment_error.rb +55 -45
- data/lib/jamm/api/models/v1_on_session_payment_error_code.rb +21 -22
- data/lib/jamm/api/models/v1_on_session_payment_request.rb +67 -48
- data/lib/jamm/api/models/v1_on_session_payment_response.rb +59 -44
- data/lib/jamm/api/models/v1_pagination.rb +51 -40
- data/lib/jamm/api/models/v1_payment_authorization_status.rb +14 -15
- data/lib/jamm/api/models/v1_payment_link.rb +57 -44
- data/lib/jamm/api/models/v1_ping_response.rb +42 -35
- data/lib/jamm/api/models/v1_search_banks_response.rb +44 -36
- data/lib/jamm/api/models/v1_search_branches_response.rb +44 -36
- data/lib/jamm/api/models/v1_update_customer_response.rb +42 -35
- data/lib/jamm/api/models/v1_url.rb +48 -39
- data/lib/jamm/api/models/v1_user_account_message.rb +67 -48
- data/lib/jamm/api/models/v1_withdraw_request.rb +51 -40
- data/lib/jamm/api/models/v1_withdraw_response.rb +51 -40
- data/lib/jamm/api/version.rb +11 -11
- data/lib/jamm/api.rb +10 -10
- data/lib/jamm/charge.rb +12 -0
- data/lib/jamm/deprecation.rb +13 -0
- data/lib/jamm/payment.rb +61 -0
- data/lib/jamm/version.rb +1 -1
- data/lib/jamm.rb +2 -0
- metadata +4 -2
@@ -1,14 +1,14 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
#
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
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
|
-
|
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
|
-
|
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
|
-
|
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
|
-
|
81
|
-
|
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
|
-
|
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
|
-
|
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
|
-
|
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
|
-
|
142
|
-
|
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
|
-
|
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
|
-
|
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
|
-
|
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
|
-
|
203
|
-
|
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
|
-
|
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
|
-
|
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
|
-
|
261
|
-
|
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
|
-
|
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
|
-
|
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]
|
294
|
-
query_params[:'pagination.pageToken'] = opts[:pagination_page_token]
|
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
|
-
|
325
|
-
|
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
|
-
|
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
|
-
|
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
|
-
|
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
|
-
|
386
|
-
|
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
|
-
|
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
|
-
|
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
|
-
|
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
|
-
|
447
|
-
|
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
|
-
|
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
|
-
|
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
|
-
|
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
|
-
|
508
|
-
|
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
|
-
|
2
|
-
|
3
|
-
|
4
|
-
#
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
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
|
-
|
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
|
-
|
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
|
-
|
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
|
-
|
79
|
-
|
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
|
-
|
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
|
-
|
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
|
-
|
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
|
-
|
138
|
-
|
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
|