Class: Report::OrdersOriginReport::OrdersReport::Result

Inherits:
Data
  • Object
show all
Defined in:
app/services/report/orders_origin_report/orders_report.rb

Overview

Service object: result.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(success: nil, online_orders_pie: [], online_orders_stk: [], online_orders_tb: [], online_orders_comp: [], breakdown: [], grouping: nil, date_from: nil, date_to: nil, current_year: nil, previous_year: nil) ⇒ Result

Initialize a new instance.

Parameters:

  • success (Object, nil) (defaults to: nil)
  • online_orders_pie (Array) (defaults to: [])
  • online_orders_stk (Array) (defaults to: [])
  • online_orders_tb (Array) (defaults to: [])
  • online_orders_comp (Array) (defaults to: [])
  • breakdown (Array) (defaults to: [])
  • grouping (Object, nil) (defaults to: nil)
  • date_from (Object, nil) (defaults to: nil)
  • date_to (Object, nil) (defaults to: nil)
  • current_year (Object, nil) (defaults to: nil)
  • previous_year (Object, nil) (defaults to: nil)


18
19
20
# File 'app/services/report/orders_origin_report/orders_report.rb', line 18

def initialize(success: nil, online_orders_pie: [], online_orders_stk: [], online_orders_tb: [], online_orders_comp: [], breakdown: [], grouping: nil, date_from: nil, date_to: nil, current_year: nil, previous_year: nil) = super
# Whether the command validated and ran successfully.
# @return [Boolean]

Instance Attribute Details

#breakdownObject (readonly)

Returns the value of attribute breakdown

Returns:

  • (Object)

    the current value of breakdown



5
6
7
# File 'app/services/report/orders_origin_report/orders_report.rb', line 5

def breakdown
  @breakdown
end

#current_yearObject (readonly)

Returns the value of attribute current_year

Returns:

  • (Object)

    the current value of current_year



5
6
7
# File 'app/services/report/orders_origin_report/orders_report.rb', line 5

def current_year
  @current_year
end

#date_fromObject (readonly)

Returns the value of attribute date_from

Returns:

  • (Object)

    the current value of date_from



5
6
7
# File 'app/services/report/orders_origin_report/orders_report.rb', line 5

def date_from
  @date_from
end

#date_toObject (readonly)

Returns the value of attribute date_to

Returns:

  • (Object)

    the current value of date_to



5
6
7
# File 'app/services/report/orders_origin_report/orders_report.rb', line 5

def date_to
  @date_to
end

#groupingObject (readonly)

Returns the value of attribute grouping

Returns:

  • (Object)

    the current value of grouping



5
6
7
# File 'app/services/report/orders_origin_report/orders_report.rb', line 5

def grouping
  @grouping
end

#online_orders_compObject (readonly)

Returns the value of attribute online_orders_comp

Returns:

  • (Object)

    the current value of online_orders_comp



5
6
7
# File 'app/services/report/orders_origin_report/orders_report.rb', line 5

def online_orders_comp
  @online_orders_comp
end

#online_orders_pieObject (readonly)

Returns the value of attribute online_orders_pie

Returns:

  • (Object)

    the current value of online_orders_pie



5
6
7
# File 'app/services/report/orders_origin_report/orders_report.rb', line 5

def online_orders_pie
  @online_orders_pie
end

#online_orders_stkObject (readonly)

Returns the value of attribute online_orders_stk

Returns:

  • (Object)

    the current value of online_orders_stk



5
6
7
# File 'app/services/report/orders_origin_report/orders_report.rb', line 5

def online_orders_stk
  @online_orders_stk
end

#online_orders_tbObject (readonly)

Returns the value of attribute online_orders_tb

Returns:

  • (Object)

    the current value of online_orders_tb



5
6
7
# File 'app/services/report/orders_origin_report/orders_report.rb', line 5

def online_orders_tb
  @online_orders_tb
end

#previous_yearObject (readonly)

Returns the value of attribute previous_year

Returns:

  • (Object)

    the current value of previous_year



5
6
7
# File 'app/services/report/orders_origin_report/orders_report.rb', line 5

def previous_year
  @previous_year
end

#successObject (readonly)

Returns the value of attribute success

Returns:

  • (Object)

    the current value of success



5
6
7
# File 'app/services/report/orders_origin_report/orders_report.rb', line 5

def success
  @success
end

Instance Method Details

#success?Boolean

Whether the command validated and ran successfully.

Returns:

  • (Boolean)


21
# File 'app/services/report/orders_origin_report/orders_report.rb', line 21

def success? = success