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.



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

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.



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

def api_client
  @api_client
end

Instance Method Details

#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 'positive', 'negative' or 'review'.

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

    the optional parameters

Returns:



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

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:



40
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
# File 'lib/cybersource_rest_client/api/decision_manager_api.rb', line 40

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

#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:



99
100
101
102
# File 'lib/cybersource_rest_client/api/decision_manager_api.rb', line 99

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:



109
110
111
112
113
114
115
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
# File 'lib/cybersource_rest_client/api/decision_manager_api.rb', line 109

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)
  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:



165
166
167
168
# File 'lib/cybersource_rest_client/api/decision_manager_api.rb', line 165

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:



176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
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
# File 'lib/cybersource_rest_client/api/decision_manager_api.rb', line 176

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