Class: Worldline::Connect::SDK::V1::Domain::RiskAssessment
- Inherits:
-
Domain::DataObject
- Object
- Domain::DataObject
- Worldline::Connect::SDK::V1::Domain::RiskAssessment
- Defined in:
- lib/worldline/connect/sdk/v1/domain/risk_assessment.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#fraud_fields ⇒ Worldline::Connect::SDK::V1::Domain::FraudFields
The current value of fraud_fields.
-
#merchant ⇒ Worldline::Connect::SDK::V1::Domain::MerchantRiskAssessment
The current value of merchant.
-
#order ⇒ Worldline::Connect::SDK::V1::Domain::OrderRiskAssessment
The current value of order.
-
#payment_product_id ⇒ Integer
The current value of payment_product_id.
Instance Method Summary collapse
Methods inherited from Domain::DataObject
Instance Attribute Details
#fraud_fields ⇒ Worldline::Connect::SDK::V1::Domain::FraudFields
Returns the current value of fraud_fields.
19 20 21 |
# File 'lib/worldline/connect/sdk/v1/domain/risk_assessment.rb', line 19 def fraud_fields @fraud_fields end |
#merchant ⇒ Worldline::Connect::SDK::V1::Domain::MerchantRiskAssessment
Returns the current value of merchant.
19 20 21 |
# File 'lib/worldline/connect/sdk/v1/domain/risk_assessment.rb', line 19 def merchant @merchant end |
#order ⇒ Worldline::Connect::SDK::V1::Domain::OrderRiskAssessment
Returns the current value of order.
19 20 21 |
# File 'lib/worldline/connect/sdk/v1/domain/risk_assessment.rb', line 19 def order @order end |
#payment_product_id ⇒ Integer
Returns the current value of payment_product_id.
19 20 21 |
# File 'lib/worldline/connect/sdk/v1/domain/risk_assessment.rb', line 19 def payment_product_id @payment_product_id end |
Instance Method Details
#from_hash(hash) ⇒ Object
39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 |
# File 'lib/worldline/connect/sdk/v1/domain/risk_assessment.rb', line 39 def from_hash(hash) super if hash.has_key? 'fraudFields' raise TypeError, "value '%s' is not a Hash" % [hash['fraudFields']] unless hash['fraudFields'].is_a? Hash @fraud_fields = Worldline::Connect::SDK::V1::Domain::FraudFields.new_from_hash(hash['fraudFields']) end if hash.has_key? 'merchant' raise TypeError, "value '%s' is not a Hash" % [hash['merchant']] unless hash['merchant'].is_a? Hash @merchant = Worldline::Connect::SDK::V1::Domain::MerchantRiskAssessment.new_from_hash(hash['merchant']) end if hash.has_key? 'order' raise TypeError, "value '%s' is not a Hash" % [hash['order']] unless hash['order'].is_a? Hash @order = Worldline::Connect::SDK::V1::Domain::OrderRiskAssessment.new_from_hash(hash['order']) end if hash.has_key? 'paymentProductId' @payment_product_id = hash['paymentProductId'] end end |
#to_h ⇒ Hash
30 31 32 33 34 35 36 37 |
# File 'lib/worldline/connect/sdk/v1/domain/risk_assessment.rb', line 30 def to_h hash = super hash['fraudFields'] = @fraud_fields.to_h unless @fraud_fields.nil? hash['merchant'] = @merchant.to_h unless @merchant.nil? hash['order'] = @order.to_h unless @order.nil? hash['paymentProductId'] = @payment_product_id unless @payment_product_id.nil? hash end |