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



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

def  = data['accountId']

#completed?Boolean

Returns:

  • (Boolean)


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

def completed? = status == 'COMPLETED'

#completed_atObject



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

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

#created_atObject



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

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

#datasetObject



1623
1624
1625
# File 'lib/carddb/collection.rb', line 1623

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

#dataset_idObject



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

def dataset_id = data['datasetId']

#download_expires_atObject



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

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

#download_urlObject



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

def download_url = data['downloadUrl']

#error_messageObject



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

def error_message = data['errorMessage']

#failed?Boolean

Returns:

  • (Boolean)


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

def failed? = status == 'FAILED'

#file_idObject



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

def file_id = data['fileId']

#filterObject



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

def filter = data['filter']

#formatObject



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

def format = data['format']

#idObject



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

def id = data['id']

#last_checkpoint_indexObject



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

def last_checkpoint_index = data['lastCheckpointIndex']

#processed_recordsObject



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

def processed_records = data['processedRecords']

#progressObject



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

def progress = data['progress']

#publisherObject



1619
1620
1621
# File 'lib/carddb/collection.rb', line 1619

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

#publisher_idObject



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

def publisher_id = data['publisherId']

#started_atObject



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

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

#statusObject



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

def status = data['status']

#total_recordsObject



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

def total_records = data['totalRecords']

#updated_atObject



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

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