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
1087
|
# File 'lib/carddb/collection.rb', line 1087
def account_id = data['accountId']
|
#assets ⇒ Object
1129
1130
1131
|
# File 'lib/carddb/collection.rb', line 1129
def assets
@assets ||= (data['assets'] || []).map { |asset| ImportJobAsset.new(asset, client: client) }
end
|
#completed? ⇒ Boolean
1110
|
# File 'lib/carddb/collection.rb', line 1110
def completed? = status == 'COMPLETED'
|
#completed_at ⇒ Object
1102
|
# File 'lib/carddb/collection.rb', line 1102
def completed_at = parse_time(data['completedAt'])
|
#created_at ⇒ Object
1103
|
# File 'lib/carddb/collection.rb', line 1103
def created_at = parse_time(data['createdAt'])
|
#created_fields ⇒ Object
1121
1122
1123
|
# File 'lib/carddb/collection.rb', line 1121
def created_fields
@created_fields ||= (data['createdFields'] || []).map { |field| ObjectField.new(field, client: client) }
end
|
#dataset ⇒ Object
1117
1118
1119
|
# File 'lib/carddb/collection.rb', line 1117
def dataset
@dataset ||= data['dataset'] ? Dataset.new(data['dataset'], client: client) : nil
end
|
#dataset_id ⇒ Object
1086
|
# File 'lib/carddb/collection.rb', line 1086
def dataset_id = data['datasetId']
|
#error_message ⇒ Object
1100
|
# File 'lib/carddb/collection.rb', line 1100
def error_message = data['errorMessage']
|
#errors ⇒ Object
1125
1126
1127
|
# File 'lib/carddb/collection.rb', line 1125
def errors
@errors ||= (data['errors'] || []).map { |error| BulkRecordError.new(error, client: client) }
end
|
#failed? ⇒ Boolean
1111
|
# File 'lib/carddb/collection.rb', line 1111
def failed? = status == 'FAILED'
|
#failed_count ⇒ Object
1099
|
# File 'lib/carddb/collection.rb', line 1099
def failed_count = data['failedCount']
|
#file_id ⇒ Object
1092
|
# File 'lib/carddb/collection.rb', line 1092
def file_id = data['fileId']
|
1091
|
# File 'lib/carddb/collection.rb', line 1091
def format = data['format']
|
#id ⇒ Object
1084
|
# File 'lib/carddb/collection.rb', line 1084
def id = data['id']
|
#images_completed ⇒ Object
1108
|
# File 'lib/carddb/collection.rb', line 1108
def images_completed = data['imagesCompleted']
|
#images_failed ⇒ Object
1109
|
# File 'lib/carddb/collection.rb', line 1109
def images_failed = data['imagesFailed']
|
#images_pending ⇒ Object
1107
|
# File 'lib/carddb/collection.rb', line 1107
def images_pending = data['imagesPending']
|
#inserted_count ⇒ Object
1096
|
# File 'lib/carddb/collection.rb', line 1096
def inserted_count = data['insertedCount']
|
#last_checkpoint_index ⇒ Object
1105
|
# File 'lib/carddb/collection.rb', line 1105
def last_checkpoint_index = data['lastCheckpointIndex']
|
#mode ⇒ Object
1089
|
# File 'lib/carddb/collection.rb', line 1089
def mode = data['mode']
|
#on_conflict ⇒ Object
1090
|
# File 'lib/carddb/collection.rb', line 1090
def on_conflict = data['onConflict']
|
#processed_records ⇒ Object
1095
|
# File 'lib/carddb/collection.rb', line 1095
def processed_records = data['processedRecords']
|
#progress ⇒ Object
1093
|
# File 'lib/carddb/collection.rb', line 1093
def progress = data['progress']
|
#publisher ⇒ Object
1113
1114
1115
|
# File 'lib/carddb/collection.rb', line 1113
def publisher
@publisher ||= data['publisher'] ? Publisher.new(data['publisher'], client: client) : nil
end
|
#publisher_id ⇒ Object
1085
|
# File 'lib/carddb/collection.rb', line 1085
def publisher_id = data['publisherId']
|
#resumed? ⇒ Boolean
1106
|
# File 'lib/carddb/collection.rb', line 1106
def resumed? = !!data['isResumed']
|
#skipped_count ⇒ Object
1098
|
# File 'lib/carddb/collection.rb', line 1098
def skipped_count = data['skippedCount']
|
#started_at ⇒ Object
1101
|
# File 'lib/carddb/collection.rb', line 1101
def started_at = parse_time(data['startedAt'])
|
#status ⇒ Object
1088
|
# File 'lib/carddb/collection.rb', line 1088
def status = data['status']
|
#total_records ⇒ Object
1094
|
# File 'lib/carddb/collection.rb', line 1094
def total_records = data['totalRecords']
|
#updated_at ⇒ Object
1104
|
# File 'lib/carddb/collection.rb', line 1104
def updated_at = parse_time(data['updatedAt'])
|
#updated_count ⇒ Object
1097
|
# File 'lib/carddb/collection.rb', line 1097
def updated_count = data['updatedCount']
|