Class: LockstepSdk::SyncEntityResultModel
- Inherits:
-
Object
- Object
- LockstepSdk::SyncEntityResultModel
- Defined in:
- lib/lockstep_sdk/models/sync_entity_result_model.rb
Overview
Contains information about a sync process for an entity.
Instance Attribute Summary collapse
-
#delete_count ⇒ Int32
The number of entities deleted.
-
#error_count ⇒ Int32
The number of errors encountered during sync.
-
#errors ⇒ Object
The errors encountered during sync keyed by ERP key.
-
#insert_count ⇒ Int32
The number of entities inserted.
-
#skip_count ⇒ Int32
The number of entities skipped.
-
#skips ⇒ Object
The records that were skipped during sync keyed by ERP key.
-
#update_count ⇒ Int32
The number of entities updated.
Instance Method Summary collapse
-
#as_json(options = {}) ⇒ object
This object as a JSON key-value structure.
-
#initialize(params = {}) ⇒ SyncEntityResultModel
constructor
Initialize the SyncEntityResultModel using the provided prototype.
-
#to_json(*options) ⇒ String
This object converted to a JSON string.
Constructor Details
#initialize(params = {}) ⇒ SyncEntityResultModel
Initialize the SyncEntityResultModel using the provided prototype
25 26 27 28 29 30 31 32 33 |
# File 'lib/lockstep_sdk/models/sync_entity_result_model.rb', line 25 def initialize(params = {}) @insert_count = params.dig(:insert_count) @update_count = params.dig(:update_count) @delete_count = params.dig(:delete_count) @skip_count = params.dig(:skip_count) @error_count = params.dig(:error_count) @errors = params.dig(:errors) @skips = params.dig(:skips) end |
Instance Attribute Details
#delete_count ⇒ Int32
Returns The number of entities deleted.
45 46 47 |
# File 'lib/lockstep_sdk/models/sync_entity_result_model.rb', line 45 def delete_count @delete_count end |
#error_count ⇒ Int32
Returns The number of errors encountered during sync.
53 54 55 |
# File 'lib/lockstep_sdk/models/sync_entity_result_model.rb', line 53 def error_count @error_count end |
#errors ⇒ Object
Returns The errors encountered during sync keyed by ERP key.
57 58 59 |
# File 'lib/lockstep_sdk/models/sync_entity_result_model.rb', line 57 def errors @errors end |
#insert_count ⇒ Int32
Returns The number of entities inserted.
37 38 39 |
# File 'lib/lockstep_sdk/models/sync_entity_result_model.rb', line 37 def insert_count @insert_count end |
#skip_count ⇒ Int32
Returns The number of entities skipped.
49 50 51 |
# File 'lib/lockstep_sdk/models/sync_entity_result_model.rb', line 49 def skip_count @skip_count end |
#skips ⇒ Object
Returns The records that were skipped during sync keyed by ERP key.
61 62 63 |
# File 'lib/lockstep_sdk/models/sync_entity_result_model.rb', line 61 def skips @skips end |
#update_count ⇒ Int32
Returns The number of entities updated.
41 42 43 |
# File 'lib/lockstep_sdk/models/sync_entity_result_model.rb', line 41 def update_count @update_count end |
Instance Method Details
#as_json(options = {}) ⇒ object
Returns This object as a JSON key-value structure.
65 66 67 68 69 70 71 72 73 74 75 |
# File 'lib/lockstep_sdk/models/sync_entity_result_model.rb', line 65 def as_json(={}) { 'insertCount' => @insert_count, 'updateCount' => @update_count, 'deleteCount' => @delete_count, 'skipCount' => @skip_count, 'errorCount' => @error_count, 'errors' => @errors, 'skips' => @skips, } end |
#to_json(*options) ⇒ String
Returns This object converted to a JSON string.
79 80 81 |
# File 'lib/lockstep_sdk/models/sync_entity_result_model.rb', line 79 def to_json(*) "[#{as_json(*).to_json(*)}]" end |