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
1283
1284
1285
|
# File 'lib/carddb/collection.rb', line 1283
def created_fields
@created_fields ||= (data['createdFields'] || []).map { |field| ObjectField.new(field, client: client) }
end
|
#errors ⇒ Object
1279
1280
1281
|
# File 'lib/carddb/collection.rb', line 1279
def errors
@errors ||= (data['errors'] || []).map { |error| BulkRecordError.new(error, client: client) }
end
|
#inserted ⇒ Object
1269
1270
1271
|
# File 'lib/carddb/collection.rb', line 1269
def inserted
@inserted ||= (data['inserted'] || []).map { |record| Record.new(record, client: client) }
end
|
#skipped ⇒ Object
1277
|
# File 'lib/carddb/collection.rb', line 1277
def skipped = data['skipped']
|
#stats ⇒ Object
1287
1288
1289
|
# File 'lib/carddb/collection.rb', line 1287
def stats
@stats ||= data['stats'] ? ImportStats.new(data['stats'], client: client) : nil
end
|
#updated ⇒ Object
1273
1274
1275
|
# File 'lib/carddb/collection.rb', line 1273
def updated
@updated ||= (data['updated'] || []).map { |record| Record.new(record, client: client) }
end
|