Sha256: 6ce3179c487e31d89924ac49b73294c8c2a6429a321f6c3685df28b09945529e

Contents?: true

Size: 1.13 KB

Versions: 31

Compression:

Stored size: 1.13 KB

Contents

require 'virtus'
require 'libis/tools/extend/hash'

module Libis
  module Services
    module Rosetta
      class DepositActivity
        # noinspection RubyResolve
        include Virtus.model nullify_blank: true

        STATUS = %w'Inprocess Incomplete Rejected Draft Approved Declined'

        attribute :deposit_activity_id, Integer
        attribute :creation_date, String
        attribute :status, String
        attribute :title, String
        attribute :producer_agent_id, Integer
        attribute :submit_date, String
        attribute :update_date, String
        attribute :sip_id, Integer
        attribute :producer_id, Integer
        attribute :sip_reason, String

        def to_hash
          super.cleanup
        end

      end

      class DepositActivityList
        # noinspection RubyResolve
        include Virtus.model nullify_blank: true

        attribute :total_records, String
        attribute :records, Array(DepositActivity)

        def to_hash
          {
              total_records: total_records,
              records: records.map {|record| record.to_hash}
          }
        end

      end

    end
  end
end

Version data entries

31 entries across 31 versions & 1 rubygems

Version Path
libis-services-1.1.0 lib/libis/services/rosetta/deposit_activity.rb
libis-services-1.0.13 lib/libis/services/rosetta/deposit_activity.rb
libis-services-1.0.12 lib/libis/services/rosetta/deposit_activity.rb
libis-services-1.0.11 lib/libis/services/rosetta/deposit_activity.rb
libis-services-1.0.10 lib/libis/services/rosetta/deposit_activity.rb
libis-services-1.0.7 lib/libis/services/rosetta/deposit_activity.rb
libis-services-1.0.6 lib/libis/services/rosetta/deposit_activity.rb
libis-services-1.0.5 lib/libis/services/rosetta/deposit_activity.rb
libis-services-1.0.2 lib/libis/services/rosetta/deposit_activity.rb
libis-services-1.0.1 lib/libis/services/rosetta/deposit_activity.rb
libis-services-1.0.0 lib/libis/services/rosetta/deposit_activity.rb
libis-services-0.2.1 lib/libis/services/rosetta/deposit_activity.rb
libis-services-0.2.0 lib/libis/services/rosetta/deposit_activity.rb
libis-services-0.1.18 lib/libis/services/rosetta/deposit_activity.rb
libis-services-0.1.17 lib/libis/services/rosetta/deposit_activity.rb
libis-services-0.1.16 lib/libis/services/rosetta/deposit_activity.rb
libis-services-0.1.15 lib/libis/services/rosetta/deposit_activity.rb
libis-services-0.1.14 lib/libis/services/rosetta/deposit_activity.rb
libis-services-0.1.13 lib/libis/services/rosetta/deposit_activity.rb
libis-services-0.1.12 lib/libis/services/rosetta/deposit_activity.rb