Class: Report::SalesCommissions::SalesCommissionsCommand
- Inherits:
-
BaseCommand
- Object
- BaseCommand
- Report::SalesCommissions::SalesCommissionsCommand
- Defined in:
- app/services/report/sales_commissions/sales_commissions_command.rb
Overview
Service object: sales commissions command.
Instance Method Summary collapse
-
#execute ⇒ Object
Run the report with the given filters and store the result.
-
#success? ⇒ Boolean
Whether the command validated and ran successfully.
Instance Method Details
#execute ⇒ Object
Run the report with the given filters and store the result.
10 11 12 13 14 |
# File 'app/services/report/sales_commissions/sales_commissions_command.rb', line 10 def execute return unless valid? @result = Report::SalesCommissions::SalesCommissions.results(attributes) end |
#success? ⇒ Boolean
Whether the command validated and ran successfully.
18 19 20 |
# File 'app/services/report/sales_commissions/sales_commissions_command.rb', line 18 def success? valid? && @result.success? end |