Class: Dhis2::Api::Version225::DataSet

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

Constant Summary collapse

Schema =
Dry::Validation.Schema do
  required(:name).filled
  required(:period_type).value(
    included_in?: ::Dhis2::Api::Version225::Constants.period_types
  )
  required(:category_combo).schema do
    required(:id).filled
  end
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



26
27
28
29
30
31
# File 'lib/dhis2/api/version225/data_set.rb', line 26

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