Class: CyberSource::DecisionManagerApi

Inherits:
Object
  • Object
show all
Defined in:
lib/cybersource_rest_client/api/decision_manager_api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default, config) ⇒ DecisionManagerApi

Returns a new instance of DecisionManagerApi.



18
19
20
21
# File 'lib/cybersource_rest_client/api/decision_manager_api.rb', line 18

def initialize(api_client = ApiClient.default, config)
  @api_client = api_client
  @api_client.set_configuration(config)
end

Instance Attribute Details

#api_clientObject

Returns the value of attribute api_client.



16
17
18
# File 'lib/cybersource_rest_client/api/decision_manager_api.rb', line 16

def api_client
  @api_client
end

Instance Method Details

#action_decision_manager_case(id, case_management_actions_request, opts = {}) ⇒ InlineResponse200

Take action on a DM post-transactional case Take action on a DM post-transactional case

Parameters:

  • id

    An unique identification number generated by Cybersource to identify the submitted request.

  • case_management_actions_request
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



30
31
32
33
# File 'lib/cybersource_rest_client/api/decision_manager_api.rb', line 30

def action_decision_manager_case(id, case_management_actions_request, opts = {})
  data, status_code, headers = action_decision_manager_case_with_http_info(id, case_management_actions_request, opts)
  return data, status_code, headers
end

#action_decision_manager_case_with_http_info(id, case_management_actions_request, opts = {}) ⇒ Array<(InlineResponse200, Fixnum, Hash)>

Take action on a DM post-transactional case Take action on a DM post-transactional case

Parameters:

  • id

    An unique identification number generated by Cybersource to identify the submitted request.

  • case_management_actions_request
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(InlineResponse200, Fixnum, Hash)>)

    InlineResponse200 data, response status code and response headers



41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
# File 'lib/cybersource_rest_client/api/decision_manager_api.rb', line 41

def action_decision_manager_case_with_http_info(id, case_management_actions_request, opts = {})

  if @api_client.config.debugging
      begin
        raise
            @api_client.config.logger.debug 'Calling API: DecisionManagerApi.action_decision_manager_case ...'
        rescue
            puts 'Cannot write to log'
        end
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling DecisionManagerApi.action_decision_manager_case"
  end
  # verify the required parameter 'case_management_actions_request' is set
  if @api_client.config.client_side_validation && case_management_actions_request.nil?
    fail ArgumentError, "Missing the required parameter 'case_management_actions_request' when calling DecisionManagerApi.action_decision_manager_case"
  end
  # resource path
  local_var_path = 'risk/v1/decisions/{id}/actions'.sub('{' + 'id' + '}', id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(case_management_actions_request)
  sdk_tracker = SdkTracker.new
  post_body = sdk_tracker.insert_developer_id_tracker(post_body, 'CaseManagementActionsRequest', @api_client.config.host, @api_client.merchantconfig.defaultDeveloperId)
  auth_names = []
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'InlineResponse200')
  if @api_client.config.debugging
    begin
    raise
        @api_client.config.logger.debug "API called: DecisionManagerApi#action_decision_manager_case\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
    rescue
        puts 'Cannot write to log'
    end
  end
  return data, status_code, headers
end

#add_negative(type, add_negative_list_request, opts = {}) ⇒ RiskV1UpdatePost201Response

List Management This call adds/deletes/converts the request information in the negative list. Provide the list to be updated as the path parameter. This value can be ‘postiive’, ‘negative’ or ‘review’.

Parameters:

  • type

    The list to be updated. It can be &#39;positive&#39;, &#39;negative&#39; or &#39;review&#39;.

  • add_negative_list_request
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



105
106
107
108
# File 'lib/cybersource_rest_client/api/decision_manager_api.rb', line 105

def add_negative(type, add_negative_list_request, opts = {})
  data, status_code, headers = add_negative_with_http_info(type, add_negative_list_request, opts)
  return data, status_code, headers
end

#add_negative_with_http_info(type, add_negative_list_request, opts = {}) ⇒ Array<(RiskV1UpdatePost201Response, Fixnum, Hash)>

List Management This call adds/deletes/converts the request information in the negative list. Provide the list to be updated as the path parameter. This value can be &#39;postiive&#39;, &#39;negative&#39; or &#39;review&#39;.

Parameters:

  • type

    The list to be updated. It can be &#39;positive&#39;, &#39;negative&#39; or &#39;review&#39;.

  • add_negative_list_request
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
# File 'lib/cybersource_rest_client/api/decision_manager_api.rb', line 116

def add_negative_with_http_info(type, add_negative_list_request, opts = {})

  if @api_client.config.debugging
      begin
        raise
            @api_client.config.logger.debug 'Calling API: DecisionManagerApi.add_negative ...'
        rescue
            puts 'Cannot write to log'
        end
  end
  # verify the required parameter 'type' is set
  if @api_client.config.client_side_validation && type.nil?
    fail ArgumentError, "Missing the required parameter 'type' when calling DecisionManagerApi.add_negative"
  end
  # verify the required parameter 'add_negative_list_request' is set
  if @api_client.config.client_side_validation && add_negative_list_request.nil?
    fail ArgumentError, "Missing the required parameter 'add_negative_list_request' when calling DecisionManagerApi.add_negative"
  end
  # resource path
  local_var_path = 'risk/v1/lists/{type}/entries'.sub('{' + 'type' + '}', type.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/hal+json;charset=utf-8'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json;charset=utf-8'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(add_negative_list_request)
  sdk_tracker = SdkTracker.new
  post_body = sdk_tracker.insert_developer_id_tracker(post_body, 'AddNegativeListRequest', @api_client.config.host, @api_client.merchantconfig.defaultDeveloperId)
  auth_names = []
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'RiskV1UpdatePost201Response')
  if @api_client.config.debugging
    begin
    raise
        @api_client.config.logger.debug "API called: DecisionManagerApi#add_negative\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
    rescue
        puts 'Cannot write to log'
    end
  end
  return data, status_code, headers
end

#comment_decision_manager_case(id, case_management_comments_request, opts = {}) ⇒ InlineResponse201

Add a comment to a DM post-transactional case Add a comment to a DM post-transactional case

Parameters:

  • id

    An unique identification number generated by Cybersource to identify the submitted request.

  • case_management_comments_request
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



180
181
182
183
# File 'lib/cybersource_rest_client/api/decision_manager_api.rb', line 180

def comment_decision_manager_case(id, case_management_comments_request, opts = {})
  data, status_code, headers = comment_decision_manager_case_with_http_info(id, case_management_comments_request, opts)
  return data, status_code, headers
end

#comment_decision_manager_case_with_http_info(id, case_management_comments_request, opts = {}) ⇒ Array<(InlineResponse201, Fixnum, Hash)>

Add a comment to a DM post-transactional case Add a comment to a DM post-transactional case

Parameters:

  • id

    An unique identification number generated by Cybersource to identify the submitted request.

  • case_management_comments_request
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(InlineResponse201, Fixnum, Hash)>)

    InlineResponse201 data, response status code and response headers



191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
# File 'lib/cybersource_rest_client/api/decision_manager_api.rb', line 191

def comment_decision_manager_case_with_http_info(id, case_management_comments_request, opts = {})

  if @api_client.config.debugging
      begin
        raise
            @api_client.config.logger.debug 'Calling API: DecisionManagerApi.comment_decision_manager_case ...'
        rescue
            puts 'Cannot write to log'
        end
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling DecisionManagerApi.comment_decision_manager_case"
  end
  # verify the required parameter 'case_management_comments_request' is set
  if @api_client.config.client_side_validation && case_management_comments_request.nil?
    fail ArgumentError, "Missing the required parameter 'case_management_comments_request' when calling DecisionManagerApi.comment_decision_manager_case"
  end
  # resource path
  local_var_path = 'risk/v1/decisions/{id}/comments'.sub('{' + 'id' + '}', id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(case_management_comments_request)
  sdk_tracker = SdkTracker.new
  post_body = sdk_tracker.insert_developer_id_tracker(post_body, 'CaseManagementCommentsRequest', @api_client.config.host, @api_client.merchantconfig.defaultDeveloperId)
  auth_names = []
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'InlineResponse201')
  if @api_client.config.debugging
    begin
    raise
        @api_client.config.logger.debug "API called: DecisionManagerApi#comment_decision_manager_case\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
    rescue
        puts 'Cannot write to log'
    end
  end
  return data, status_code, headers
end

#create_bundled_decision_manager_case(create_bundled_decision_manager_case_request, opts = {}) ⇒ RiskV1DecisionsPost201Response

Create Decision Manager Decision Manager can help you automate and streamline your fraud operations. Decision Manager will return a decision based on the request values.

Parameters:

  • create_bundled_decision_manager_case_request
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



254
255
256
257
# File 'lib/cybersource_rest_client/api/decision_manager_api.rb', line 254

def create_bundled_decision_manager_case(create_bundled_decision_manager_case_request, opts = {})
  data, status_code, headers = create_bundled_decision_manager_case_with_http_info(create_bundled_decision_manager_case_request, opts)
  return data, status_code, headers
end

#create_bundled_decision_manager_case_with_http_info(create_bundled_decision_manager_case_request, opts = {}) ⇒ Array<(RiskV1DecisionsPost201Response, Fixnum, Hash)>

Create Decision Manager Decision Manager can help you automate and streamline your fraud operations. Decision Manager will return a decision based on the request values.

Parameters:

  • create_bundled_decision_manager_case_request
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
# File 'lib/cybersource_rest_client/api/decision_manager_api.rb', line 264

def create_bundled_decision_manager_case_with_http_info(create_bundled_decision_manager_case_request, opts = {})

  if @api_client.config.debugging
      begin
        raise
            @api_client.config.logger.debug 'Calling API: DecisionManagerApi.create_bundled_decision_manager_case ...'
        rescue
            puts 'Cannot write to log'
        end
  end
  # verify the required parameter 'create_bundled_decision_manager_case_request' is set
  if @api_client.config.client_side_validation && create_bundled_decision_manager_case_request.nil?
    fail ArgumentError, "Missing the required parameter 'create_bundled_decision_manager_case_request' when calling DecisionManagerApi.create_bundled_decision_manager_case"
  end
  # resource path
  local_var_path = 'risk/v1/decisions'

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/hal+json;charset=utf-8'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json;charset=utf-8'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(create_bundled_decision_manager_case_request)
  sdk_tracker = SdkTracker.new
  post_body = sdk_tracker.insert_developer_id_tracker(post_body, 'CreateBundledDecisionManagerCaseRequest', @api_client.config.host, @api_client.merchantconfig.defaultDeveloperId)
  auth_names = []
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'RiskV1DecisionsPost201Response')
  if @api_client.config.debugging
    begin
    raise
        @api_client.config.logger.debug "API called: DecisionManagerApi#create_bundled_decision_manager_case\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
    rescue
        puts 'Cannot write to log'
    end
  end
  return data, status_code, headers
end

#fraud_update(id, fraud_marking_action_request, opts = {}) ⇒ RiskV1UpdatePost201Response

Fraud Marking This can be used to - 1. Add known fraudulent data to the fraud history 2. Remove data added to history with Transaction Marking Tool or by uploading chargeback files 3. Remove chargeback data from history that was automatically added. For detailed information, contact your Cybersource representative Place the request ID of the transaction you want to mark as suspect (or remove from history) as the path parameter in this request.

Parameters:

  • id

    Request ID of the transaction that you want to mark as suspect or remove from history.

  • fraud_marking_action_request
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



324
325
326
327
# File 'lib/cybersource_rest_client/api/decision_manager_api.rb', line 324

def fraud_update(id, fraud_marking_action_request, opts = {})
  data, status_code, headers = fraud_update_with_http_info(id, fraud_marking_action_request, opts)
  return data, status_code, headers
end

#fraud_update_with_http_info(id, fraud_marking_action_request, opts = {}) ⇒ Array<(RiskV1UpdatePost201Response, Fixnum, Hash)>

Fraud Marking This can be used to - 1. Add known fraudulent data to the fraud history 2. Remove data added to history with Transaction Marking Tool or by uploading chargeback files 3. Remove chargeback data from history that was automatically added. For detailed information, contact your Cybersource representative Place the request ID of the transaction you want to mark as suspect (or remove from history) as the path parameter in this request.

Parameters:

  • id

    Request ID of the transaction that you want to mark as suspect or remove from history.

  • fraud_marking_action_request
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
# File 'lib/cybersource_rest_client/api/decision_manager_api.rb', line 335

def fraud_update_with_http_info(id, fraud_marking_action_request, opts = {})

  if @api_client.config.debugging
      begin
        raise
            @api_client.config.logger.debug 'Calling API: DecisionManagerApi.fraud_update ...'
        rescue
            puts 'Cannot write to log'
        end
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling DecisionManagerApi.fraud_update"
  end
  # verify the required parameter 'fraud_marking_action_request' is set
  if @api_client.config.client_side_validation && fraud_marking_action_request.nil?
    fail ArgumentError, "Missing the required parameter 'fraud_marking_action_request' when calling DecisionManagerApi.fraud_update"
  end
  # resource path
  local_var_path = 'risk/v1/decisions/{id}/marking'.sub('{' + 'id' + '}', id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/hal+json;charset=utf-8'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json;charset=utf-8'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(fraud_marking_action_request)
  sdk_tracker = SdkTracker.new
  post_body = sdk_tracker.insert_developer_id_tracker(post_body, 'FraudMarkingActionRequest', @api_client.config.host, @api_client.merchantconfig.defaultDeveloperId)
  auth_names = []
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'RiskV1UpdatePost201Response')
  if @api_client.config.debugging
    begin
    raise
        @api_client.config.logger.debug "API called: DecisionManagerApi#fraud_update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
    rescue
        puts 'Cannot write to log'
    end
  end
  return data, status_code, headers
end