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



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

def  = data['accountId']

#completed?Boolean

Returns:

  • (Boolean)


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

def completed? = status == 'COMPLETED'

#completed_atObject



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

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

#created_atObject



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

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

#datasetObject



1560
1561
1562
# File 'lib/carddb/collection.rb', line 1560

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

#dataset_idObject



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

def dataset_id = data['datasetId']

#download_expires_atObject



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

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

#download_urlObject



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

def download_url = data['downloadUrl']

#error_messageObject



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

def error_message = data['errorMessage']

#failed?Boolean

Returns:

  • (Boolean)


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

def failed? = status == 'FAILED'

#file_idObject



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

def file_id = data['fileId']

#filterObject



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

def filter = data['filter']

#formatObject



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

def format = data['format']

#idObject



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

def id = data['id']

#last_checkpoint_indexObject



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

def last_checkpoint_index = data['lastCheckpointIndex']

#processed_recordsObject



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

def processed_records = data['processedRecords']

#progressObject



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

def progress = data['progress']

#publisherObject



1556
1557
1558
# File 'lib/carddb/collection.rb', line 1556

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

#publisher_idObject



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

def publisher_id = data['publisherId']

#started_atObject



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

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

#statusObject



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

def status = data['status']

#total_recordsObject



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

def total_records = data['totalRecords']

#updated_atObject



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

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