Sha256: 127b31d6d942ff9d28194addb06feb6aa8e28dc6a7110727797651379d471e3b
Contents?: true
Size: 1.05 KB
Versions: 6
Compression:
Stored size: 1.05 KB
Contents
module Ecoportal module API class Internal class Account < Common::BaseModel passthrough :policy_group_ids, :landing_page_id, :permissions_preset, :permissions_custom, :preferences, :prefilter, :filter_tags, :login_provider_ids, :starred_ids, to: :doc def preset=(value) self.permissions_preset = value == "custom" ? nil : value end def preset self.permissions_preset.nil? ? "custom" : self.permissions_preset end def permissions return @permissions if defined?(@permissions) return @permissions = nil if doc["permissions_custom"].nil? @permissions = Internal::Permissions.new(doc["permissions_custom"]) end def preferences return @preferences if defined?(@preferences) return @preferences = nil if doc["preferences"].nil? @preferences = Internal::Preferences.new(doc["preferences"]) end end end end end require 'ecoportal/api/internal/permissions' require 'ecoportal/api/internal/preferences'
Version data entries
6 entries across 6 versions & 1 rubygems