Class: Worldline::Connect::SDK::V1::Domain::CybersourceDecisionManager
- Inherits:
-
Domain::DataObject
- Object
- Domain::DataObject
- Worldline::Connect::SDK::V1::Domain::CybersourceDecisionManager
- Defined in:
- lib/worldline/connect/sdk/v1/domain/cybersource_decision_manager.rb
Instance Attribute Summary collapse
-
#clause_name ⇒ String
The current value of clause_name.
-
#fraud_score ⇒ Integer
The current value of fraud_score.
-
#policy_applied ⇒ String
The current value of policy_applied.
-
#reason_codes ⇒ Array<String>
The current value of reason_codes.
Instance Method Summary collapse
Methods inherited from Domain::DataObject
Instance Attribute Details
#clause_name ⇒ String
Returns the current value of clause_name.
16 17 18 |
# File 'lib/worldline/connect/sdk/v1/domain/cybersource_decision_manager.rb', line 16 def clause_name @clause_name end |
#fraud_score ⇒ Integer
Returns the current value of fraud_score.
16 17 18 |
# File 'lib/worldline/connect/sdk/v1/domain/cybersource_decision_manager.rb', line 16 def fraud_score @fraud_score end |
#policy_applied ⇒ String
Returns the current value of policy_applied.
16 17 18 |
# File 'lib/worldline/connect/sdk/v1/domain/cybersource_decision_manager.rb', line 16 def policy_applied @policy_applied end |
#reason_codes ⇒ Array<String>
Returns the current value of reason_codes.
16 17 18 |
# File 'lib/worldline/connect/sdk/v1/domain/cybersource_decision_manager.rb', line 16 def reason_codes @reason_codes end |
Instance Method Details
#from_hash(hash) ⇒ Object
36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 |
# File 'lib/worldline/connect/sdk/v1/domain/cybersource_decision_manager.rb', line 36 def from_hash(hash) super if hash.has_key? 'clauseName' @clause_name = hash['clauseName'] end if hash.has_key? 'fraudScore' @fraud_score = hash['fraudScore'] end if hash.has_key? 'policyApplied' @policy_applied = hash['policyApplied'] end if hash.has_key? 'reasonCodes' raise TypeError, "value '%s' is not an Array" % [hash['reasonCodes']] unless hash['reasonCodes'].is_a? Array @reason_codes = [] hash['reasonCodes'].each do |e| @reason_codes << e end end end |
#to_h ⇒ Hash
27 28 29 30 31 32 33 34 |
# File 'lib/worldline/connect/sdk/v1/domain/cybersource_decision_manager.rb', line 27 def to_h hash = super hash['clauseName'] = @clause_name unless @clause_name.nil? hash['fraudScore'] = @fraud_score unless @fraud_score.nil? hash['policyApplied'] = @policy_applied unless @policy_applied.nil? hash['reasonCodes'] = @reason_codes unless @reason_codes.nil? hash end |