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
1445
|
# File 'lib/carddb/collection.rb', line 1445
def dataset_id = data['datasetId']
|
#dataset_key ⇒ Object
1443
|
# File 'lib/carddb/collection.rb', line 1443
def dataset_key = data['datasetKey']
|
#dataset_name ⇒ Object
1444
|
# File 'lib/carddb/collection.rb', line 1444
def dataset_name = data['datasetName']
|
#exists? ⇒ Boolean
1446
|
# File 'lib/carddb/collection.rb', line 1446
def exists? = !!data['exists']
|
#field_mappings ⇒ Object
1450
1451
1452
|
# File 'lib/carddb/collection.rb', line 1450
def field_mappings
@field_mappings ||= (data['fieldMappings'] || []).map { |mapping| FieldMapping.new(mapping, client: client) }
end
|
#record_count ⇒ Object
1447
|
# File 'lib/carddb/collection.rb', line 1447
def record_count = data['recordCount']
|
#sample_records ⇒ Object
1448
|
# File 'lib/carddb/collection.rb', line 1448
def sample_records = data['sampleRecords'] || []
|
#warnings ⇒ Object
1454
1455
1456
|
# File 'lib/carddb/collection.rb', line 1454
def warnings
@warnings ||= (data['warnings'] || []).map { |warning| ImportWarning.new(warning, client: client) }
end
|