Class: CardDB::DeckValuation
Overview
Wrapper for current deck valuation and pricing coverage
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
#complete? ⇒ Boolean
2257
|
# File 'lib/carddb/collection.rb', line 2257
def complete? = status == 'COMPLETE'
|
#entries ⇒ Object
2269
2270
2271
|
# File 'lib/carddb/collection.rb', line 2269
def entries
@entries ||= (data['entries'] || []).map { |entry| DeckEntryValuation.new(entry, client: client) }
end
|
#metric ⇒ Object
2250
|
# File 'lib/carddb/collection.rb', line 2250
def metric = data['metric']
|
#missing_entry_count ⇒ Object
2253
|
# File 'lib/carddb/collection.rb', line 2253
def missing_entry_count = data['missingEntryCount']
|
#missing_quantity ⇒ Object
2256
|
# File 'lib/carddb/collection.rb', line 2256
def missing_quantity = data['missingQuantity']
|
#partial? ⇒ Boolean
2258
|
# File 'lib/carddb/collection.rb', line 2258
def partial? = status == 'PARTIAL'
|
#priced_entry_count ⇒ Object
2252
|
# File 'lib/carddb/collection.rb', line 2252
def priced_entry_count = data['pricedEntryCount']
|
#priced_quantity ⇒ Object
2255
|
# File 'lib/carddb/collection.rb', line 2255
def priced_quantity = data['pricedQuantity']
|
#priced_total ⇒ Object
2261
2262
2263
|
# File 'lib/carddb/collection.rb', line 2261
def priced_total
@priced_total ||= Money.new(data['pricedTotal'], client: client)
end
|
#sections ⇒ Object
2265
2266
2267
|
# File 'lib/carddb/collection.rb', line 2265
def sections
@sections ||= (data['sections'] || []).map { |section| DeckSectionValuation.new(section, client: client) }
end
|
#status ⇒ Object
2248
|
# File 'lib/carddb/collection.rb', line 2248
def status = data['status']
|
#sub_type_name ⇒ Object
2249
|
# File 'lib/carddb/collection.rb', line 2249
def sub_type_name = data['subTypeName']
|
#total_entry_count ⇒ Object
2251
|
# File 'lib/carddb/collection.rb', line 2251
def total_entry_count = data['totalEntryCount']
|
#total_quantity ⇒ Object
2254
|
# File 'lib/carddb/collection.rb', line 2254
def total_quantity = data['totalQuantity']
|
#unavailable? ⇒ Boolean
2259
|
# File 'lib/carddb/collection.rb', line 2259
def unavailable? = status == 'UNAVAILABLE'
|