Class: Dhis2::Api::Version228::DataSet

Inherits:
Base
  • Object
show all
Includes:
BulkCreatable, Creatable, Deletable, Findable, Listable, Shared::DataSet, Shared::SaveValidator, Updatable
Defined in:
lib/dhis2/api/version228/data_set.rb

Constant Summary collapse

Schema =
Dry::Validation.Schema do
  required(:name).filled
  required(:period_type).value(
    included_in?: ::Dhis2::Api::Version228::Constants.period_types
  )
end

Class Method Summary collapse

Methods included from Shared::DataSet

#add_data_elements, #data_element_ids

Methods included from Shared::SaveValidator

included

Methods included from Deletable

#delete

Methods included from Updatable

#update, #update_attributes

Methods included from BulkCreatable

included

Methods included from Creatable

included

Methods included from Findable

included

Methods included from Listable

included

Methods inherited from Base

#==, #initialize, resource_key, resource_name, #to_h

Constructor Details

This class inherits a constructor from Dhis2::Api::Base

Class Method Details

.creation_defaults(args) ⇒ Object



23
24
25
26
27
28
# File 'lib/dhis2/api/version228/data_set.rb', line 23

def self.creation_defaults(args)
  {
    code:        args[:short_name],
    period_type: "Monthly"
  }
end