Class: CardDB::DatasetImportPreview
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
#dataset_id ⇒ Object
1432
|
# File 'lib/carddb/collection.rb', line 1432
def dataset_id = data['datasetId']
|
#dataset_key ⇒ Object
1430
|
# File 'lib/carddb/collection.rb', line 1430
def dataset_key = data['datasetKey']
|
#dataset_name ⇒ Object
1431
|
# File 'lib/carddb/collection.rb', line 1431
def dataset_name = data['datasetName']
|
#exists? ⇒ Boolean
1433
|
# File 'lib/carddb/collection.rb', line 1433
def exists? = !!data['exists']
|
#field_mappings ⇒ Object
1437
1438
1439
|
# File 'lib/carddb/collection.rb', line 1437
def field_mappings
@field_mappings ||= (data['fieldMappings'] || []).map { |mapping| FieldMapping.new(mapping, client: client) }
end
|
#record_count ⇒ Object
1434
|
# File 'lib/carddb/collection.rb', line 1434
def record_count = data['recordCount']
|
#sample_records ⇒ Object
1435
|
# File 'lib/carddb/collection.rb', line 1435
def sample_records = data['sampleRecords'] || []
|
#warnings ⇒ Object
1441
1442
1443
|
# File 'lib/carddb/collection.rb', line 1441
def warnings
@warnings ||= (data['warnings'] || []).map { |warning| ImportWarning.new(warning, client: client) }
end
|