Class: CardDB::ImportJob
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
#account_id ⇒ Object
1361
|
# File 'lib/carddb/collection.rb', line 1361
def account_id = data['accountId']
|
#assets ⇒ Object
1403
1404
1405
|
# File 'lib/carddb/collection.rb', line 1403
def assets
@assets ||= (data['assets'] || []).map { |asset| ImportJobAsset.new(asset, client: client) }
end
|
#completed? ⇒ Boolean
1384
|
# File 'lib/carddb/collection.rb', line 1384
def completed? = status == 'COMPLETED'
|
#completed_at ⇒ Object
1376
|
# File 'lib/carddb/collection.rb', line 1376
def completed_at = parse_time(data['completedAt'])
|
#created_at ⇒ Object
1377
|
# File 'lib/carddb/collection.rb', line 1377
def created_at = parse_time(data['createdAt'])
|
#created_fields ⇒ Object
1395
1396
1397
|
# File 'lib/carddb/collection.rb', line 1395
def created_fields
@created_fields ||= (data['createdFields'] || []).map { |field| ObjectField.new(field, client: client) }
end
|
#dataset ⇒ Object
1391
1392
1393
|
# File 'lib/carddb/collection.rb', line 1391
def dataset
@dataset ||= data['dataset'] ? Dataset.new(data['dataset'], client: client) : nil
end
|
#dataset_id ⇒ Object
1360
|
# File 'lib/carddb/collection.rb', line 1360
def dataset_id = data['datasetId']
|
#error_message ⇒ Object
1374
|
# File 'lib/carddb/collection.rb', line 1374
def error_message = data['errorMessage']
|
#errors ⇒ Object
1399
1400
1401
|
# File 'lib/carddb/collection.rb', line 1399
def errors
@errors ||= (data['errors'] || []).map { |error| BulkRecordError.new(error, client: client) }
end
|
#failed? ⇒ Boolean
1385
|
# File 'lib/carddb/collection.rb', line 1385
def failed? = status == 'FAILED'
|
#failed_count ⇒ Object
1373
|
# File 'lib/carddb/collection.rb', line 1373
def failed_count = data['failedCount']
|
#file_id ⇒ Object
1366
|
# File 'lib/carddb/collection.rb', line 1366
def file_id = data['fileId']
|
1365
|
# File 'lib/carddb/collection.rb', line 1365
def format = data['format']
|
#id ⇒ Object
1358
|
# File 'lib/carddb/collection.rb', line 1358
def id = data['id']
|
#images_completed ⇒ Object
1382
|
# File 'lib/carddb/collection.rb', line 1382
def images_completed = data['imagesCompleted']
|
#images_failed ⇒ Object
1383
|
# File 'lib/carddb/collection.rb', line 1383
def images_failed = data['imagesFailed']
|
#images_pending ⇒ Object
1381
|
# File 'lib/carddb/collection.rb', line 1381
def images_pending = data['imagesPending']
|
#inserted_count ⇒ Object
1370
|
# File 'lib/carddb/collection.rb', line 1370
def inserted_count = data['insertedCount']
|
#last_checkpoint_index ⇒ Object
1379
|
# File 'lib/carddb/collection.rb', line 1379
def last_checkpoint_index = data['lastCheckpointIndex']
|
#mode ⇒ Object
1363
|
# File 'lib/carddb/collection.rb', line 1363
def mode = data['mode']
|
#on_conflict ⇒ Object
1364
|
# File 'lib/carddb/collection.rb', line 1364
def on_conflict = data['onConflict']
|
#processed_records ⇒ Object
1369
|
# File 'lib/carddb/collection.rb', line 1369
def processed_records = data['processedRecords']
|
#progress ⇒ Object
1367
|
# File 'lib/carddb/collection.rb', line 1367
def progress = data['progress']
|
#publisher ⇒ Object
1387
1388
1389
|
# File 'lib/carddb/collection.rb', line 1387
def publisher
@publisher ||= data['publisher'] ? Publisher.new(data['publisher'], client: client) : nil
end
|
#publisher_id ⇒ Object
1359
|
# File 'lib/carddb/collection.rb', line 1359
def publisher_id = data['publisherId']
|
#resumed? ⇒ Boolean
1380
|
# File 'lib/carddb/collection.rb', line 1380
def resumed? = !!data['isResumed']
|
#skipped_count ⇒ Object
1372
|
# File 'lib/carddb/collection.rb', line 1372
def skipped_count = data['skippedCount']
|
#started_at ⇒ Object
1375
|
# File 'lib/carddb/collection.rb', line 1375
def started_at = parse_time(data['startedAt'])
|
#status ⇒ Object
1362
|
# File 'lib/carddb/collection.rb', line 1362
def status = data['status']
|
#total_records ⇒ Object
1368
|
# File 'lib/carddb/collection.rb', line 1368
def total_records = data['totalRecords']
|
#updated_at ⇒ Object
1378
|
# File 'lib/carddb/collection.rb', line 1378
def updated_at = parse_time(data['updatedAt'])
|
#updated_count ⇒ Object
1371
|
# File 'lib/carddb/collection.rb', line 1371
def updated_count = data['updatedCount']
|