Sha256: bfa0804c6fa5280836ea2cbc26688c2913cd4ec8e2af0149ef2cfc2e5e0591d9
Contents?: true
Size: 1.51 KB
Versions: 17
Compression:
Stored size: 1.51 KB
Contents
module OpenStax module Accounts module Api module V1 class ApplicationGroupRepresenter < Roar::Decorator # This representer is used to communicate with Accounts # and so must allow read/write on all properties # Do not use it in create/update APIs! include Roar::JSON property :id, type: Integer, schema_info: { description: "A unique ID number for the record that associates this group with this application", required: true } property :application_id, type: Integer, schema_info: { description: "The associated application's unique ID number", required: true } property :group, instance: ->(*) do OpenStax::Accounts::Group.new.tap{ |group| group.syncing = true } end, decorator: GroupRepresenter, schema_info: { description: "The associated group", required: true } property :unread_updates, type: Integer, schema_info: { description: "The number of updates applied to the associated group unread by the associated application", required: true } end end end end end
Version data entries
17 entries across 17 versions & 1 rubygems