Source code for worldline.connect.sdk.v1.domain.cybersource_decision_manager
# -*- coding: utf-8 -*-
#
# This class was auto-generated from the API references found at
# https://apireference.connect.worldline-solutions.com/
#
from worldline.connect.sdk.domain.data_object import DataObject
[docs]class CybersourceDecisionManager(DataObject):
"""
| This object contains the results of the Cybersource Decision Manager assessment. Cybersource is a fraud detection tool leveraging data networks, configurable rules, intelligence, and device fingerprinting to identify risky transactions.
"""
__clause_name = None
__fraud_score = None
__policy_applied = None
__reason_codes = None
@property
def clause_name(self):
"""
| Name of the clause within the applied policy that was triggered during the evaluation of this transaction.
Type: str
"""
return self.__clause_name
@clause_name.setter
def clause_name(self, value):
self.__clause_name = value
@property
def fraud_score(self):
"""
| Result of the Cybersource Decision Manager check. This contains the normalized fraud score from a scale of 0 to 100. A higher score indicates an increased risk of fraud.
Type: int
"""
return self.__fraud_score
@fraud_score.setter
def fraud_score(self, value):
self.__fraud_score = value
@property
def policy_applied(self):
"""
| Name of the policy that was applied during the evaluation of this transaction.
Type: str
"""
return self.__policy_applied
@policy_applied.setter
def policy_applied(self, value):
self.__policy_applied = value
@property
def reason_codes(self):
"""
| List of one or more reason codes.
Type: list[str]
"""
return self.__reason_codes
@reason_codes.setter
def reason_codes(self, value):
self.__reason_codes = value
[docs] def to_dictionary(self):
dictionary = super(CybersourceDecisionManager, self).to_dictionary()
if self.clause_name is not None:
dictionary['clauseName'] = self.clause_name
if self.fraud_score is not None:
dictionary['fraudScore'] = self.fraud_score
if self.policy_applied is not None:
dictionary['policyApplied'] = self.policy_applied
if self.reason_codes is not None:
dictionary['reasonCodes'] = []
for element in self.reason_codes:
if element is not None:
dictionary['reasonCodes'].append(element)
return dictionary
[docs] def from_dictionary(self, dictionary):
super(CybersourceDecisionManager, self).from_dictionary(dictionary)
if 'clauseName' in dictionary:
self.clause_name = dictionary['clauseName']
if 'fraudScore' in dictionary:
self.fraud_score = dictionary['fraudScore']
if 'policyApplied' in dictionary:
self.policy_applied = dictionary['policyApplied']
if 'reasonCodes' in dictionary:
if not isinstance(dictionary['reasonCodes'], list):
raise TypeError('value \'{}\' is not a list'.format(dictionary['reasonCodes']))
self.reason_codes = []
for element in dictionary['reasonCodes']:
self.reason_codes.append(element)
return self