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?



601
602
603
604
605
606
607
608
609
# File 'lib/zaala/api/types.rb', line 601

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