class Quickblox::Models::Dialog

Public Class Methods

batch_build(dialogs) click to toggle source
# File lib/models.rb, line 77
def self.batch_build(dialogs)
  dialogs.map { |dialog| build(dialog) }
end
build(hash) click to toggle source
# File lib/models.rb, line 81
def self.build(hash)
  new(
    id: hash.fetch("_id"),
    occupants_ids: hash.fetch("occupants_ids"),
    type: hash.fetch("type"),
    created_at: hash.fetch("created_at"),
    updated_at: hash.fetch("updated_at")
  )
end