Sha256: e6bdc9c761578e7ab0f8877a1748fd8fb745d34682bd1fa60e16908d6ba899f1
Contents?: true
Size: 861 Bytes
Versions: 8
Compression:
Stored size: 861 Bytes
Contents
# frozen_string_literal: true module Dhis2 module Api module Version228 class DataSet < ::Dhis2::Api::Base include ::Dhis2::Api::Listable include ::Dhis2::Api::Findable include ::Dhis2::Api::Creatable include ::Dhis2::Api::BulkCreatable include ::Dhis2::Api::Updatable include ::Dhis2::Api::Deletable include ::Dhis2::Api::Shared::SaveValidator include ::Dhis2::Api::Shared::DataSet Schema = Dry::Validation.Schema do required(:name).filled required(:period_type).value( included_in?: ::Dhis2::Api::Version228::Constants.period_types ) end def self.creation_defaults(args) { code: args[:short_name], period_type: "Monthly" } end end end end end
Version data entries
8 entries across 8 versions & 1 rubygems