Class: Dhis2::Api::Version227::DataElement
- Includes:
- BulkCreatable, Creatable, Deletable, Findable, Listable, Shared::SaveValidator, Updatable
- Defined in:
- lib/dhis2/api/version227/data_element.rb
Constant Summary collapse
- Schema =
Dry::Validation.Schema do required(:name).filled required(:short_name).filled required(:aggregation_type).value( included_in?: ::Dhis2::Api::Version227::Constants.aggregation_types ) required(:domain_type).value( included_in?: ::Dhis2::Api::Version227::Constants.domain_types ) required(:value_type).value( included_in?: ::Dhis2::Api::Version227::Constants.value_types ) end
Class Method Summary collapse
Methods included from Shared::SaveValidator
Methods included from Deletable
Methods included from Updatable
Methods included from BulkCreatable
Methods included from Creatable
Methods included from Findable
Methods included from Listable
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
29 30 31 32 33 34 35 36 37 38 |
# File 'lib/dhis2/api/version227/data_element.rb', line 29 def self.creation_defaults(args) { aggregation_type: "SUM", code: args[:short_name], domain_type: "AGGREGATE", type: "int", value_type: "NUMBER", zero_is_significant: true } end |