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
1411
|
# File 'lib/carddb/collection.rb', line 1411
def account_id = data['accountId']
|
#assets ⇒ Object
1453
1454
1455
|
# File 'lib/carddb/collection.rb', line 1453
def assets
@assets ||= (data['assets'] || []).map { |asset| ImportJobAsset.new(asset, client: client) }
end
|
#completed? ⇒ Boolean
1434
|
# File 'lib/carddb/collection.rb', line 1434
def completed? = status == 'COMPLETED'
|
#completed_at ⇒ Object
1426
|
# File 'lib/carddb/collection.rb', line 1426
def completed_at = parse_time(data['completedAt'])
|
#created_at ⇒ Object
1427
|
# File 'lib/carddb/collection.rb', line 1427
def created_at = parse_time(data['createdAt'])
|
#created_fields ⇒ Object
1445
1446
1447
|
# File 'lib/carddb/collection.rb', line 1445
def created_fields
@created_fields ||= (data['createdFields'] || []).map { |field| ObjectField.new(field, client: client) }
end
|
#dataset ⇒ Object
1441
1442
1443
|
# File 'lib/carddb/collection.rb', line 1441
def dataset
@dataset ||= data['dataset'] ? Dataset.new(data['dataset'], client: client) : nil
end
|
#dataset_id ⇒ Object
1410
|
# File 'lib/carddb/collection.rb', line 1410
def dataset_id = data['datasetId']
|
#error_message ⇒ Object
1424
|
# File 'lib/carddb/collection.rb', line 1424
def error_message = data['errorMessage']
|
#errors ⇒ Object
1449
1450
1451
|
# File 'lib/carddb/collection.rb', line 1449
def errors
@errors ||= (data['errors'] || []).map { |error| BulkRecordError.new(error, client: client) }
end
|
#failed? ⇒ Boolean
1435
|
# File 'lib/carddb/collection.rb', line 1435
def failed? = status == 'FAILED'
|
#failed_count ⇒ Object
1423
|
# File 'lib/carddb/collection.rb', line 1423
def failed_count = data['failedCount']
|
#file_id ⇒ Object
1416
|
# File 'lib/carddb/collection.rb', line 1416
def file_id = data['fileId']
|
1415
|
# File 'lib/carddb/collection.rb', line 1415
def format = data['format']
|
#id ⇒ Object
1408
|
# File 'lib/carddb/collection.rb', line 1408
def id = data['id']
|
#images_completed ⇒ Object
1432
|
# File 'lib/carddb/collection.rb', line 1432
def images_completed = data['imagesCompleted']
|
#images_failed ⇒ Object
1433
|
# File 'lib/carddb/collection.rb', line 1433
def images_failed = data['imagesFailed']
|
#images_pending ⇒ Object
1431
|
# File 'lib/carddb/collection.rb', line 1431
def images_pending = data['imagesPending']
|
#inserted_count ⇒ Object
1420
|
# File 'lib/carddb/collection.rb', line 1420
def inserted_count = data['insertedCount']
|
#last_checkpoint_index ⇒ Object
1429
|
# File 'lib/carddb/collection.rb', line 1429
def last_checkpoint_index = data['lastCheckpointIndex']
|
#mode ⇒ Object
1413
|
# File 'lib/carddb/collection.rb', line 1413
def mode = data['mode']
|
#on_conflict ⇒ Object
1414
|
# File 'lib/carddb/collection.rb', line 1414
def on_conflict = data['onConflict']
|
#processed_records ⇒ Object
1419
|
# File 'lib/carddb/collection.rb', line 1419
def processed_records = data['processedRecords']
|
#progress ⇒ Object
1417
|
# File 'lib/carddb/collection.rb', line 1417
def progress = data['progress']
|
#publisher ⇒ Object
1437
1438
1439
|
# File 'lib/carddb/collection.rb', line 1437
def publisher
@publisher ||= data['publisher'] ? Publisher.new(data['publisher'], client: client) : nil
end
|
#publisher_id ⇒ Object
1409
|
# File 'lib/carddb/collection.rb', line 1409
def publisher_id = data['publisherId']
|
#resumed? ⇒ Boolean
1430
|
# File 'lib/carddb/collection.rb', line 1430
def resumed? = !!data['isResumed']
|
#skipped_count ⇒ Object
1422
|
# File 'lib/carddb/collection.rb', line 1422
def skipped_count = data['skippedCount']
|
#started_at ⇒ Object
1425
|
# File 'lib/carddb/collection.rb', line 1425
def started_at = parse_time(data['startedAt'])
|
#status ⇒ Object
1412
|
# File 'lib/carddb/collection.rb', line 1412
def status = data['status']
|
#total_records ⇒ Object
1418
|
# File 'lib/carddb/collection.rb', line 1418
def total_records = data['totalRecords']
|
#updated_at ⇒ Object
1428
|
# File 'lib/carddb/collection.rb', line 1428
def updated_at = parse_time(data['updatedAt'])
|
#updated_count ⇒ Object
1421
|
# File 'lib/carddb/collection.rb', line 1421
def updated_count = data['updatedCount']
|