# frozen_string_literal: true require_relative "../user_light" require_relative "../organization_light" require_relative "../sell_side_user_group_entitlement" module ONEAccess module DataObject module Representer class UserEntitlementRequest < Representable::Decorator include Representable::JSON property :id, as: :Id, type: Integer property :create_date, as: :CreateDate, parse_filter: ->(value, _) { Time.parse(value) } property :update_date, as: :UpdateDate, parse_filter: ->(value, _) { Time.parse(value) } property :notes, as: :Notes, type: String property :status, as: :Status, type: Integer property :user, as: :User, decorator: Representer::UserLight, class: DataObject::UserLight property :buy_side_org, as: :BuySideOrg, decorator: Representer::OrganizationLight, class: DataObject::OrganizationLight property :sell_side_org, as: :SellSideOrg, decorator: Representer::OrganizationLight, class: DataObject::OrganizationLight collection :sell_side_user_groups, as: :SellSideUserGroups, decorator: Representer::SellSideUserGroupEntitlement, class: DataObject::SellSideUserGroupEntitlement end end end end