@@ -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