Class: Zaala::API::AuthorizationResponse

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

Class Method Summary collapse

Class Method Details

.from_message(h) ⇒ Object



665
666
667
668
669
670
671
672
# File 'lib/zaala/api/types.rb', line 665

def self.from_message(h)
  AuthorizationResponse.new({
    identifier: Zaala::API::ResponseIdentifier.from_message(h[:identifier]),
    decision: Zaala::API::Decision.from_message(h[:decision]),
    installment_plan: h[:installmentPlan] ? Zaala::API::InstallmentPlan.from_message(h[:installmentPlan]) : nil,
    info: h[:info] ? Zaala::API::Info.from_message(h[:info]) : nil,
  })
end