Class: Dorsale::BillingMachine::SmallData::FilterForQuotations

Inherits:
SmallData::Filter show all
Defined in:
app/models/dorsale/billing_machine/small_data/filter_for_quotations.rb

Constant Summary collapse

STRATEGIES =
{
  "customer_guid"      => FilterStrategyByCustomer.new("quotations"),
  "bm_time_period"     => FilterStrategyByTimePeriod.new("quotations"),
  "bm_quotation_state" => FilterStrategyByState.new("quotations"),
}

Instance Method Summary collapse

Methods inherited from SmallData::Filter

#apply, #get, #initialize, #read, #set, #store

Constructor Details

This class inherits a constructor from Dorsale::SmallData::Filter

Instance Method Details

#bm_quotation_stateObject



27
28
29
# File 'app/models/dorsale/billing_machine/small_data/filter_for_quotations.rb', line 27

def bm_quotation_state
  get(__method__)
end

#bm_time_periodObject



23
24
25
# File 'app/models/dorsale/billing_machine/small_data/filter_for_quotations.rb', line 23

def bm_time_period
  get(__method__)
end

#customer_guidObject



19
20
21
# File 'app/models/dorsale/billing_machine/small_data/filter_for_quotations.rb', line 19

def customer_guid
  get(__method__)
end

#strategy(key) ⇒ Object



11
12
13
# File 'app/models/dorsale/billing_machine/small_data/filter_for_quotations.rb', line 11

def strategy key
  STRATEGIES[key]
end

#targetObject



15
16
17
# File 'app/models/dorsale/billing_machine/small_data/filter_for_quotations.rb', line 15

def target
  "quotations"
end