Class: Zaala::API::Decision

Inherits:
Dry::Struct
  • Object
show all
Defined in:
lib/zaala/api/types.rb

Class Method Summary collapse

Class Method Details

.from_message(h) ⇒ Object

TODO: Enum?



598
599
600
601
602
603
604
605
606
# File 'lib/zaala/api/types.rb', line 598

def self.from_message(h)
  Decision.new({
    invoice: h[:decisionInvoice],
    installment: h[:decisionInstallment],
    on_account: h[:decisionOnAccount],
    risk_taker: h[:riskTaker],
    traffic_light: h[:trafficLight],
  })
end