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
1495
|
# File 'lib/carddb/collection.rb', line 1495
def dataset_id = data['datasetId']
|
#dataset_key ⇒ Object
1493
|
# File 'lib/carddb/collection.rb', line 1493
def dataset_key = data['datasetKey']
|
#dataset_name ⇒ Object
1494
|
# File 'lib/carddb/collection.rb', line 1494
def dataset_name = data['datasetName']
|
#exists? ⇒ Boolean
1496
|
# File 'lib/carddb/collection.rb', line 1496
def exists? = !!data['exists']
|
#field_mappings ⇒ Object
1500
1501
1502
|
# File 'lib/carddb/collection.rb', line 1500
def field_mappings
@field_mappings ||= (data['fieldMappings'] || []).map { |mapping| FieldMapping.new(mapping, client: client) }
end
|
#record_count ⇒ Object
1497
|
# File 'lib/carddb/collection.rb', line 1497
def record_count = data['recordCount']
|
#sample_records ⇒ Object
1498
|
# File 'lib/carddb/collection.rb', line 1498
def sample_records = data['sampleRecords'] || []
|
#warnings ⇒ Object
1504
1505
1506
|
# File 'lib/carddb/collection.rb', line 1504
def warnings
@warnings ||= (data['warnings'] || []).map { |warning| ImportWarning.new(warning, client: client) }
end
|