Sha256: f0d76fae6e21fadfbdde03200940aea6b102550507d8506447ef3eb120f6f045

Contents?: true

Size: 1.31 KB

Versions: 2

Compression:

Stored size: 1.31 KB

Contents

# 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

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
oneaccess-1.3.1 lib/oneaccess/data_object/representer/user_entitlement_request.rb
oneaccess-1.3.0 lib/oneaccess/data_object/representer/user_entitlement_request.rb