Sha256: 25a51e62355fe7b32a4f514f3f03c50bfc5ece11ab6030a75fd610895d5d6887
Contents?: true
Size: 1.78 KB
Versions: 35
Compression:
Stored size: 1.78 KB
Contents
module OpenStax module Accounts module Api module V1 class ApplicationAccountRepresenter < 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 account with this application", required: true } property :application_id, type: Integer, schema_info: { description: "The associated application's unique ID number", required: true } property :account, as: :user, instance: ->(*) do OpenStax::Accounts::Account.new.tap{ |account| account.syncing = true } end, decorator: AccountRepresenter, schema_info: { description: "The associated account", required: true } property :unread_updates, type: Integer, schema_info: { description: "The number of profile updates from the associated account unread by the associated application", required: true } property :default_contact_info_id, type: Integer, schema_info: { description: "The ID of the associated account's default contact info" } end end end end end
Version data entries
35 entries across 35 versions & 1 rubygems