Class: Pike13::CLI::Commands::Report::Transactions

Inherits:
Base
  • Object
show all
Includes:
Concerns::ReportingQuery
Defined in:
lib/pike13/cli/commands/report/transactions.rb

Instance Method Summary collapse

Methods included from Concerns::ReportingQuery

included

Methods inherited from Base

base_usage, format_options, handle_argument_error, printable_commands

Methods included from ThorNestedSubcommand

included

Instance Method Details

#queryObject



13
14
15
16
17
18
19
20
21
22
# File 'lib/pike13/cli/commands/report/transactions.rb', line 13

def query
  handle_error do
    params = build_query_params
    params[:fields] ||= %w[transaction_id transaction_date payment_method transaction_amount invoice_id]
    result = with_progress("Fetching transactions report") do
      Pike13::Reporting::Transactions.query(**params)
    end
    output(result)
  end
end