Class: Zaala::API::Info

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?



569
570
571
572
573
574
575
576
577
578
579
580
581
# File 'lib/zaala/api/types.rb', line 569

def self.from_message(h)
  Info.new({
    status: h[:status],
    requested: h[:requested],
    valid_until: h[:validUntil],
    is_suitable_for_delivery: h[:isSuitableForDelivery],
    invoice_status: h[:invoiceStatus],
    payment_status: h[:paymentStatus],
    dunning_level: h[:dunningLevel],
    current_balance: h[:currentBalance],
    attachments: h[:attachments],
  })
end