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



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

def  = data['accountId']

#completed?Boolean

Returns:

  • (Boolean)


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

def completed? = status == 'COMPLETED'

#completed_atObject



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

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

#created_atObject



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

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

#datasetObject



1573
1574
1575
# File 'lib/carddb/collection.rb', line 1573

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

#dataset_idObject



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

def dataset_id = data['datasetId']

#download_expires_atObject



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

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

#download_urlObject



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

def download_url = data['downloadUrl']

#error_messageObject



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

def error_message = data['errorMessage']

#failed?Boolean

Returns:

  • (Boolean)


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

def failed? = status == 'FAILED'

#file_idObject



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

def file_id = data['fileId']

#filterObject



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

def filter = data['filter']

#formatObject



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

def format = data['format']

#idObject



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

def id = data['id']

#last_checkpoint_indexObject



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

def last_checkpoint_index = data['lastCheckpointIndex']

#processed_recordsObject



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

def processed_records = data['processedRecords']

#progressObject



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

def progress = data['progress']

#publisherObject



1569
1570
1571
# File 'lib/carddb/collection.rb', line 1569

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

#publisher_idObject



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

def publisher_id = data['publisherId']

#started_atObject



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

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

#statusObject



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

def status = data['status']

#total_recordsObject



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

def total_records = data['totalRecords']

#updated_atObject



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

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