Class: CardDB::DeckImportPayload
Instance Attribute Summary
Attributes inherited from Resource
#client, #data
Instance Method Summary
collapse
#ambiguous, #entries, #unmatched
Methods inherited from Resource
#[], #initialize, #key?, #to_h, #to_json
Instance Method Details
#applied? ⇒ Boolean
2404
|
# File 'lib/carddb/collection.rb', line 2404
def applied? = !!data['applied']
|
#deck ⇒ Object
2400
2401
2402
|
# File 'lib/carddb/collection.rb', line 2400
def deck
@deck ||= data['deck'] ? Deck.new(data['deck'], client: client) : nil
end
|
#detection ⇒ Object
2413
2414
2415
|
# File 'lib/carddb/collection.rb', line 2413
def detection
@detection ||= data['detection'] ? DeckImportFormatDetection.new(data['detection'], client: client) : nil
end
|
#dry_run? ⇒ Boolean
2405
|
# File 'lib/carddb/collection.rb', line 2405
def dry_run? = !!data['dryRun']
|
2407
|
# File 'lib/carddb/collection.rb', line 2407
def format = data['format']
|
2409
2410
2411
|
# File 'lib/carddb/collection.rb', line 2409
def import_format
@import_format ||= data['importFormat'] ? DeckImportFormatDefinition.new(data['importFormat'], client: client) : nil
end
|
#parse_errors ⇒ Object
2417
2418
2419
|
# File 'lib/carddb/collection.rb', line 2417
def parse_errors
@parse_errors ||= (data['parseErrors'] || []).map { |issue| DeckImportIssue.new(issue, client: client) }
end
|
#replace? ⇒ Boolean
2406
|
# File 'lib/carddb/collection.rb', line 2406
def replace? = !!data['replace']
|
#validation ⇒ Object
2421
2422
2423
|
# File 'lib/carddb/collection.rb', line 2421
def validation
@validation ||= data['validation'] ? DeckValidation.new(data['validation'], client: client) : nil
end
|