Class: CardDB::ExportJob

Inherits:
Resource show all
Defined in:
lib/carddb/collection.rb

Instance Attribute Summary

Attributes inherited from Resource

#client, #data

Instance Method Summary collapse

Methods inherited from Resource

#[], #initialize, #key?, #to_h, #to_json

Constructor Details

This class inherits a constructor from CardDB::Resource

Instance Method Details

#account_idObject



1276
# File 'lib/carddb/collection.rb', line 1276

def  = data['accountId']

#completed?Boolean

Returns:

  • (Boolean)


1292
# File 'lib/carddb/collection.rb', line 1292

def completed? = status == 'COMPLETED'

#completed_atObject



1288
# File 'lib/carddb/collection.rb', line 1288

def completed_at = parse_time(data['completedAt'])

#created_atObject



1289
# File 'lib/carddb/collection.rb', line 1289

def created_at = parse_time(data['createdAt'])

#datasetObject



1299
1300
1301
# File 'lib/carddb/collection.rb', line 1299

def dataset
  @dataset ||= data['dataset'] ? Dataset.new(data['dataset'], client: client) : nil
end

#dataset_idObject



1275
# File 'lib/carddb/collection.rb', line 1275

def dataset_id = data['datasetId']

#download_expires_atObject



1285
# File 'lib/carddb/collection.rb', line 1285

def download_expires_at = parse_time(data['downloadExpiresAt'])

#download_urlObject



1284
# File 'lib/carddb/collection.rb', line 1284

def download_url = data['downloadUrl']

#error_messageObject



1286
# File 'lib/carddb/collection.rb', line 1286

def error_message = data['errorMessage']

#failed?Boolean

Returns:

  • (Boolean)


1293
# File 'lib/carddb/collection.rb', line 1293

def failed? = status == 'FAILED'

#file_idObject



1283
# File 'lib/carddb/collection.rb', line 1283

def file_id = data['fileId']

#filterObject



1279
# File 'lib/carddb/collection.rb', line 1279

def filter = data['filter']

#formatObject



1278
# File 'lib/carddb/collection.rb', line 1278

def format = data['format']

#idObject



1273
# File 'lib/carddb/collection.rb', line 1273

def id = data['id']

#last_checkpoint_indexObject



1291
# File 'lib/carddb/collection.rb', line 1291

def last_checkpoint_index = data['lastCheckpointIndex']

#processed_recordsObject



1281
# File 'lib/carddb/collection.rb', line 1281

def processed_records = data['processedRecords']

#progressObject



1282
# File 'lib/carddb/collection.rb', line 1282

def progress = data['progress']

#publisherObject



1295
1296
1297
# File 'lib/carddb/collection.rb', line 1295

def publisher
  @publisher ||= data['publisher'] ? Publisher.new(data['publisher'], client: client) : nil
end

#publisher_idObject



1274
# File 'lib/carddb/collection.rb', line 1274

def publisher_id = data['publisherId']

#started_atObject



1287
# File 'lib/carddb/collection.rb', line 1287

def started_at = parse_time(data['startedAt'])

#statusObject



1277
# File 'lib/carddb/collection.rb', line 1277

def status = data['status']

#total_recordsObject



1280
# File 'lib/carddb/collection.rb', line 1280

def total_records = data['totalRecords']

#updated_atObject



1290
# File 'lib/carddb/collection.rb', line 1290

def updated_at = parse_time(data['updatedAt'])