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
1171
|
# File 'lib/carddb/collection.rb', line 1171
def dataset_id = data['datasetId']
|
#dataset_key ⇒ Object
1169
|
# File 'lib/carddb/collection.rb', line 1169
def dataset_key = data['datasetKey']
|
#dataset_name ⇒ Object
1170
|
# File 'lib/carddb/collection.rb', line 1170
def dataset_name = data['datasetName']
|
#exists? ⇒ Boolean
1172
|
# File 'lib/carddb/collection.rb', line 1172
def exists? = !!data['exists']
|
#field_mappings ⇒ Object
1176
1177
1178
|
# File 'lib/carddb/collection.rb', line 1176
def field_mappings
@field_mappings ||= (data['fieldMappings'] || []).map { |mapping| FieldMapping.new(mapping, client: client) }
end
|
#record_count ⇒ Object
1173
|
# File 'lib/carddb/collection.rb', line 1173
def record_count = data['recordCount']
|
#sample_records ⇒ Object
1174
|
# File 'lib/carddb/collection.rb', line 1174
def sample_records = data['sampleRecords'] || []
|
#warnings ⇒ Object
1180
1181
1182
|
# File 'lib/carddb/collection.rb', line 1180
def warnings
@warnings ||= (data['warnings'] || []).map { |warning| ImportWarning.new(warning, client: client) }
end
|