Skip to content

Commit 3a5d5a3

Browse files
Sep release (#102)
* Network tokenization changes * removed token_api changes * Update token_api.py * added caching * changed the cache key name * removed parenthesis from request target * sep release
1 parent 7bfd716 commit 3a5d5a3

349 files changed

Lines changed: 11091 additions & 5462 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,3 +67,5 @@ target/
6767
.travis.yml
6868
.swagger-codegen
6969
git_push.sh
70+
71+
.idea

CyberSource/__init__.py

Lines changed: 73 additions & 54 deletions
Large diffs are not rendered by default.

CyberSource/api/batches_api.py

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ def get_batch_report(self, batch_id, **kwargs):
6060
:param callback function: The callback function
6161
for asynchronous request. (optional)
6262
:param str batch_id: Unique identification number assigned to the submitted request. (required)
63-
:return: InlineResponse20014
63+
:return: InlineResponse2004
6464
If the method is called asynchronously,
6565
returns the request thread.
6666
"""
@@ -90,7 +90,7 @@ def get_batch_report_with_http_info(self, batch_id, **kwargs):
9090
:param callback function: The callback function
9191
for asynchronous request. (optional)
9292
:param str batch_id: Unique identification number assigned to the submitted request. (required)
93-
:return: InlineResponse20014
93+
:return: InlineResponse2004
9494
If the method is called asynchronously,
9595
returns the request thread.
9696
"""
@@ -158,7 +158,7 @@ def get_batch_report_with_http_info(self, batch_id, **kwargs):
158158
body=body_params,
159159
post_params=form_params,
160160
files=local_var_files,
161-
response_type='InlineResponse20014',
161+
response_type='InlineResponse2004',
162162
auth_settings=auth_settings,
163163
callback=params.get('callback'),
164164
_return_http_data_only=params.get('_return_http_data_only'),
@@ -181,7 +181,7 @@ def get_batch_status(self, batch_id, **kwargs):
181181
:param callback function: The callback function
182182
for asynchronous request. (optional)
183183
:param str batch_id: Unique identification number assigned to the submitted request. (required)
184-
:return: InlineResponse20013
184+
:return: InlineResponse2003
185185
If the method is called asynchronously,
186186
returns the request thread.
187187
"""
@@ -211,7 +211,7 @@ def get_batch_status_with_http_info(self, batch_id, **kwargs):
211211
:param callback function: The callback function
212212
for asynchronous request. (optional)
213213
:param str batch_id: Unique identification number assigned to the submitted request. (required)
214-
:return: InlineResponse20013
214+
:return: InlineResponse2003
215215
If the method is called asynchronously,
216216
returns the request thread.
217217
"""
@@ -279,7 +279,7 @@ def get_batch_status_with_http_info(self, batch_id, **kwargs):
279279
body=body_params,
280280
post_params=form_params,
281281
files=local_var_files,
282-
response_type='InlineResponse20013',
282+
response_type='InlineResponse2003',
283283
auth_settings=auth_settings,
284284
callback=params.get('callback'),
285285
_return_http_data_only=params.get('_return_http_data_only'),
@@ -305,7 +305,7 @@ def get_batches_list(self, **kwargs):
305305
:param int limit: The maximum number that can be returned in the array starting from the offset record in zero-based dataset.
306306
:param str from_date: ISO-8601 format: yyyyMMddTHHmmssZ
307307
:param str to_date: ISO-8601 format: yyyyMMddTHHmmssZ
308-
:return: InlineResponse20012
308+
:return: InlineResponse2002
309309
If the method is called asynchronously,
310310
returns the request thread.
311311
"""
@@ -338,7 +338,7 @@ def get_batches_list_with_http_info(self, **kwargs):
338338
:param int limit: The maximum number that can be returned in the array starting from the offset record in zero-based dataset.
339339
:param str from_date: ISO-8601 format: yyyyMMddTHHmmssZ
340340
:param str to_date: ISO-8601 format: yyyyMMddTHHmmssZ
341-
:return: InlineResponse20012
341+
:return: InlineResponse2002
342342
If the method is called asynchronously,
343343
returns the request thread.
344344
"""
@@ -410,7 +410,7 @@ def get_batches_list_with_http_info(self, **kwargs):
410410
body=body_params,
411411
post_params=form_params,
412412
files=local_var_files,
413-
response_type='InlineResponse20012',
413+
response_type='InlineResponse2002',
414414
auth_settings=auth_settings,
415415
callback=params.get('callback'),
416416
_return_http_data_only=params.get('_return_http_data_only'),
@@ -433,7 +433,7 @@ def post_batch(self, body, **kwargs):
433433
:param callback function: The callback function
434434
for asynchronous request. (optional)
435435
:param Body body: (required)
436-
:return: InlineResponse2022
436+
:return: InlineResponse202
437437
If the method is called asynchronously,
438438
returns the request thread.
439439
"""
@@ -463,7 +463,7 @@ def post_batch_with_http_info(self, body, **kwargs):
463463
:param callback function: The callback function
464464
for asynchronous request. (optional)
465465
:param Body body: (required)
466-
:return: InlineResponse2022
466+
:return: InlineResponse202
467467
If the method is called asynchronously,
468468
returns the request thread.
469469
"""
@@ -520,7 +520,7 @@ def post_batch_with_http_info(self, body, **kwargs):
520520
body=body_params,
521521
post_params=form_params,
522522
files=local_var_files,
523-
response_type='InlineResponse2022',
523+
response_type='InlineResponse202',
524524
auth_settings=auth_settings,
525525
callback=params.get('callback'),
526526
_return_http_data_only=params.get('_return_http_data_only'),

CyberSource/api/decision_manager_api.py

Lines changed: 240 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,126 @@ def __init__(self, merchant_config, api_client=None):
4545

4646

4747

48+
def action_decision_manager_case(self, id, case_management_actions_request, **kwargs):
49+
"""
50+
Take action on a DM post-transactional case
51+
Take action on a DM post-transactional case
52+
This method makes a synchronous HTTP request by default. To make an
53+
asynchronous HTTP request, please define a `callback` function
54+
to be invoked when receiving the response.
55+
>>> def callback_function(response):
56+
>>> pprint(response)
57+
>>>
58+
>>> thread = api.action_decision_manager_case(id, case_management_actions_request, callback=callback_function)
59+
60+
:param callback function: The callback function
61+
for asynchronous request. (optional)
62+
:param str id: An unique identification number generated by Cybersource to identify the submitted request. (required)
63+
:param CaseManagementActionsRequest case_management_actions_request: (required)
64+
:return: InlineResponse200
65+
If the method is called asynchronously,
66+
returns the request thread.
67+
"""
68+
69+
if self.api_client.mconfig.log_config.enable_log:
70+
self.logger.info("CALL TO METHOD `action_decision_manager_case` STARTED")
71+
72+
kwargs['_return_http_data_only'] = True
73+
if kwargs.get('callback'):
74+
return self.action_decision_manager_case_with_http_info(id, case_management_actions_request, **kwargs)
75+
else:
76+
(data) = self.action_decision_manager_case_with_http_info(id, case_management_actions_request, **kwargs)
77+
return data
78+
79+
def action_decision_manager_case_with_http_info(self, id, case_management_actions_request, **kwargs):
80+
"""
81+
Take action on a DM post-transactional case
82+
Take action on a DM post-transactional case
83+
This method makes a synchronous HTTP request by default. To make an
84+
asynchronous HTTP request, please define a `callback` function
85+
to be invoked when receiving the response.
86+
>>> def callback_function(response):
87+
>>> pprint(response)
88+
>>>
89+
>>> thread = api.action_decision_manager_case_with_http_info(id, case_management_actions_request, callback=callback_function)
90+
91+
:param callback function: The callback function
92+
for asynchronous request. (optional)
93+
:param str id: An unique identification number generated by Cybersource to identify the submitted request. (required)
94+
:param CaseManagementActionsRequest case_management_actions_request: (required)
95+
:return: InlineResponse200
96+
If the method is called asynchronously,
97+
returns the request thread.
98+
"""
99+
100+
all_params = ['id', 'case_management_actions_request']
101+
all_params.append('callback')
102+
all_params.append('_return_http_data_only')
103+
all_params.append('_preload_content')
104+
all_params.append('_request_timeout')
105+
106+
params = locals()
107+
for key, val in iteritems(params['kwargs']):
108+
if key not in all_params:
109+
raise TypeError(
110+
"Got an unexpected keyword argument '%s'"
111+
" to method action_decision_manager_case" % key
112+
)
113+
params[key] = val
114+
del params['kwargs']
115+
# verify the required parameter 'id' is set
116+
if ('id' not in params) or (params['id'] is None):
117+
if self.api_client.mconfig.log_config.enable_log:
118+
self.logger.error("InvalidArgumentException : Missing the required parameter `id` when calling `action_decision_manager_case`")
119+
raise ValueError("Missing the required parameter `id` when calling `action_decision_manager_case`")
120+
# verify the required parameter 'case_management_actions_request' is set
121+
if ('case_management_actions_request' not in params) or (params['case_management_actions_request'] is None):
122+
if self.api_client.mconfig.log_config.enable_log:
123+
self.logger.error("InvalidArgumentException : Missing the required parameter `case_management_actions_request` when calling `action_decision_manager_case`")
124+
raise ValueError("Missing the required parameter `case_management_actions_request` when calling `action_decision_manager_case`")
125+
126+
127+
collection_formats = {}
128+
129+
path_params = {}
130+
if 'id' in params:
131+
path_params['id'] = params['id']
132+
id=id
133+
134+
query_params = []
135+
136+
header_params = {}
137+
138+
form_params = []
139+
local_var_files = {}
140+
141+
body_params = None
142+
if 'case_management_actions_request' in params:
143+
body_params = params['case_management_actions_request']
144+
# HTTP header `Accept`
145+
header_params['Accept'] = self.api_client.select_header_accept(['application/json'])
146+
147+
# HTTP header `Content-Type`
148+
header_params['Content-Type'] = self.api_client.select_header_content_type(['application/json'])
149+
150+
# Authentication setting
151+
auth_settings = []
152+
153+
return self.api_client.call_api(f'/risk/v1/decisions/{id}/actions', 'POST',
154+
path_params,
155+
query_params,
156+
header_params,
157+
body=body_params,
158+
post_params=form_params,
159+
files=local_var_files,
160+
response_type='InlineResponse200',
161+
auth_settings=auth_settings,
162+
callback=params.get('callback'),
163+
_return_http_data_only=params.get('_return_http_data_only'),
164+
_preload_content=params.get('_preload_content', True),
165+
_request_timeout=params.get('_request_timeout'),
166+
collection_formats=collection_formats)
167+
48168
def add_negative(self, type, add_negative_list_request, **kwargs):
49169
"""
50170
List Management
@@ -165,6 +285,126 @@ def add_negative_with_http_info(self, type, add_negative_list_request, **kwargs)
165285
_request_timeout=params.get('_request_timeout'),
166286
collection_formats=collection_formats)
167287

288+
def comment_decision_manager_case(self, id, case_management_comments_request, **kwargs):
289+
"""
290+
Add a comment to a DM post-transactional case
291+
Add a comment to a DM post-transactional case
292+
This method makes a synchronous HTTP request by default. To make an
293+
asynchronous HTTP request, please define a `callback` function
294+
to be invoked when receiving the response.
295+
>>> def callback_function(response):
296+
>>> pprint(response)
297+
>>>
298+
>>> thread = api.comment_decision_manager_case(id, case_management_comments_request, callback=callback_function)
299+
300+
:param callback function: The callback function
301+
for asynchronous request. (optional)
302+
:param str id: An unique identification number generated by Cybersource to identify the submitted request. (required)
303+
:param CaseManagementCommentsRequest case_management_comments_request: (required)
304+
:return: InlineResponse201
305+
If the method is called asynchronously,
306+
returns the request thread.
307+
"""
308+
309+
if self.api_client.mconfig.log_config.enable_log:
310+
self.logger.info("CALL TO METHOD `comment_decision_manager_case` STARTED")
311+
312+
kwargs['_return_http_data_only'] = True
313+
if kwargs.get('callback'):
314+
return self.comment_decision_manager_case_with_http_info(id, case_management_comments_request, **kwargs)
315+
else:
316+
(data) = self.comment_decision_manager_case_with_http_info(id, case_management_comments_request, **kwargs)
317+
return data
318+
319+
def comment_decision_manager_case_with_http_info(self, id, case_management_comments_request, **kwargs):
320+
"""
321+
Add a comment to a DM post-transactional case
322+
Add a comment to a DM post-transactional case
323+
This method makes a synchronous HTTP request by default. To make an
324+
asynchronous HTTP request, please define a `callback` function
325+
to be invoked when receiving the response.
326+
>>> def callback_function(response):
327+
>>> pprint(response)
328+
>>>
329+
>>> thread = api.comment_decision_manager_case_with_http_info(id, case_management_comments_request, callback=callback_function)
330+
331+
:param callback function: The callback function
332+
for asynchronous request. (optional)
333+
:param str id: An unique identification number generated by Cybersource to identify the submitted request. (required)
334+
:param CaseManagementCommentsRequest case_management_comments_request: (required)
335+
:return: InlineResponse201
336+
If the method is called asynchronously,
337+
returns the request thread.
338+
"""
339+
340+
all_params = ['id', 'case_management_comments_request']
341+
all_params.append('callback')
342+
all_params.append('_return_http_data_only')
343+
all_params.append('_preload_content')
344+
all_params.append('_request_timeout')
345+
346+
params = locals()
347+
for key, val in iteritems(params['kwargs']):
348+
if key not in all_params:
349+
raise TypeError(
350+
"Got an unexpected keyword argument '%s'"
351+
" to method comment_decision_manager_case" % key
352+
)
353+
params[key] = val
354+
del params['kwargs']
355+
# verify the required parameter 'id' is set
356+
if ('id' not in params) or (params['id'] is None):
357+
if self.api_client.mconfig.log_config.enable_log:
358+
self.logger.error("InvalidArgumentException : Missing the required parameter `id` when calling `comment_decision_manager_case`")
359+
raise ValueError("Missing the required parameter `id` when calling `comment_decision_manager_case`")
360+
# verify the required parameter 'case_management_comments_request' is set
361+
if ('case_management_comments_request' not in params) or (params['case_management_comments_request'] is None):
362+
if self.api_client.mconfig.log_config.enable_log:
363+
self.logger.error("InvalidArgumentException : Missing the required parameter `case_management_comments_request` when calling `comment_decision_manager_case`")
364+
raise ValueError("Missing the required parameter `case_management_comments_request` when calling `comment_decision_manager_case`")
365+
366+
367+
collection_formats = {}
368+
369+
path_params = {}
370+
if 'id' in params:
371+
path_params['id'] = params['id']
372+
id=id
373+
374+
query_params = []
375+
376+
header_params = {}
377+
378+
form_params = []
379+
local_var_files = {}
380+
381+
body_params = None
382+
if 'case_management_comments_request' in params:
383+
body_params = params['case_management_comments_request']
384+
# HTTP header `Accept`
385+
header_params['Accept'] = self.api_client.select_header_accept(['application/json'])
386+
387+
# HTTP header `Content-Type`
388+
header_params['Content-Type'] = self.api_client.select_header_content_type(['application/json'])
389+
390+
# Authentication setting
391+
auth_settings = []
392+
393+
return self.api_client.call_api(f'/risk/v1/decisions/{id}/comments', 'POST',
394+
path_params,
395+
query_params,
396+
header_params,
397+
body=body_params,
398+
post_params=form_params,
399+
files=local_var_files,
400+
response_type='InlineResponse201',
401+
auth_settings=auth_settings,
402+
callback=params.get('callback'),
403+
_return_http_data_only=params.get('_return_http_data_only'),
404+
_preload_content=params.get('_preload_content', True),
405+
_request_timeout=params.get('_request_timeout'),
406+
collection_formats=collection_formats)
407+
168408
def create_bundled_decision_manager_case(self, create_bundled_decision_manager_case_request, **kwargs):
169409
"""
170410
Create Decision Manager

0 commit comments

Comments
 (0)