Class: Dhis2::Api::ImportSummary
- Inherits:
-
Object
- Object
- Dhis2::Api::ImportSummary
- Defined in:
- lib/dhis2/api/import_summary.rb
Instance Method Summary collapse
- #bulk_success? ⇒ Boolean
- #creation_success? ⇒ Boolean
- #ignored_count ⇒ Object
- #imported_count ⇒ Object
-
#initialize(hash) ⇒ ImportSummary
constructor
A new instance of ImportSummary.
- #raw_status ⇒ Object
- #reference ⇒ Object
- #update_success? ⇒ Boolean
- #updated_count ⇒ Object
Constructor Details
#initialize(hash) ⇒ ImportSummary
Returns a new instance of ImportSummary.
6 7 8 |
# File 'lib/dhis2/api/import_summary.rb', line 6 def initialize(hash) @hash = hash end |
Instance Method Details
#bulk_success? ⇒ Boolean
22 23 24 |
# File 'lib/dhis2/api/import_summary.rb', line 22 def bulk_success? base_success? end |
#creation_success? ⇒ Boolean
14 15 16 |
# File 'lib/dhis2/api/import_summary.rb', line 14 def creation_success? base_success? && only_updates_and_imports? end |
#ignored_count ⇒ Object
34 35 36 |
# File 'lib/dhis2/api/import_summary.rb', line 34 def ignored_count import_count["ignored"] end |
#imported_count ⇒ Object
26 27 28 |
# File 'lib/dhis2/api/import_summary.rb', line 26 def imported_count import_count["imported"] end |
#raw_status ⇒ Object
38 39 40 |
# File 'lib/dhis2/api/import_summary.rb', line 38 def raw_status hash end |
#reference ⇒ Object
10 11 12 |
# File 'lib/dhis2/api/import_summary.rb', line 10 def reference hash["reference"] end |
#update_success? ⇒ Boolean
18 19 20 |
# File 'lib/dhis2/api/import_summary.rb', line 18 def update_success? base_success? && only_updates_and_imports? end |
#updated_count ⇒ Object
30 31 32 |
# File 'lib/dhis2/api/import_summary.rb', line 30 def updated_count import_count["updated"] end |