Class: CardDB::BulkImportResult
Instance Attribute Summary
Attributes inherited from Resource
#client, #data
Instance Method Summary
collapse
Methods inherited from Resource
#[], #initialize, #key?, #to_h, #to_json
Instance Method Details
#created_fields ⇒ Object
1270
1271
1272
|
# File 'lib/carddb/collection.rb', line 1270
def created_fields
@created_fields ||= (data['createdFields'] || []).map { |field| ObjectField.new(field, client: client) }
end
|
#errors ⇒ Object
1266
1267
1268
|
# File 'lib/carddb/collection.rb', line 1266
def errors
@errors ||= (data['errors'] || []).map { |error| BulkRecordError.new(error, client: client) }
end
|
#inserted ⇒ Object
1256
1257
1258
|
# File 'lib/carddb/collection.rb', line 1256
def inserted
@inserted ||= (data['inserted'] || []).map { |record| Record.new(record, client: client) }
end
|
#skipped ⇒ Object
1264
|
# File 'lib/carddb/collection.rb', line 1264
def skipped = data['skipped']
|
#stats ⇒ Object
1274
1275
1276
|
# File 'lib/carddb/collection.rb', line 1274
def stats
@stats ||= data['stats'] ? ImportStats.new(data['stats'], client: client) : nil
end
|
#updated ⇒ Object
1260
1261
1262
|
# File 'lib/carddb/collection.rb', line 1260
def updated
@updated ||= (data['updated'] || []).map { |record| Record.new(record, client: client) }
end
|