class Icalia::Event::DeserializableResource

Public Class Methods

classify_data(data) click to toggle source
# File lib/icalia-sdk-event-core/serialization/deserializable_resource.rb, line 20
def classify_data(data)
  classify_type data['type']
end
classify_type(type) click to toggle source
# File lib/icalia-sdk-event-core/serialization/deserializable_resource.rb, line 16
def classify_type(type)
  type.underscore.camelize
end
get_stand_in(id:, type:) click to toggle source
# File lib/icalia-sdk-event-core/serialization/deserializable_resource.rb, line 24
def get_stand_in(id:, type:)
  Icalia::ModelProxy.new id: id, type: type
end
get_stand_ins(rel) click to toggle source
# File lib/icalia-sdk-event-core/serialization/deserializable_resource.rb, line 28
def get_stand_ins(rel)
  if rel['data'].nil?
    Icalia::Event::ModelCollectionProxy.new rel['links']
  else
    rel['data'].map do |data|
      get_stand_in id: data['id'], type: classify_data(data)
    end
  end
end