Class: Pike13::CLI::Commands::Desk::EventOccurrence
- Inherits:
-
Base
- Object
- Thor
- Base
- Pike13::CLI::Commands::Desk::EventOccurrence
show all
- Defined in:
- lib/pike13/cli/commands/desk/event_occurrence.rb
Class Method Summary
collapse
Instance Method Summary
collapse
Methods inherited from Base
format_options, handle_argument_error, printable_commands
included
Class Method Details
.base_usage ⇒ Object
Override base_usage to match the actual subcommand registration
9
10
11
|
# File 'lib/pike13/cli/commands/desk/event_occurrence.rb', line 9
def self.base_usage
"desk event_occurrences"
end
|
Instance Method Details
#eligibilities(id) ⇒ Object
56
57
58
59
60
61
62
63
64
|
# File 'lib/pike13/cli/commands/desk/event_occurrence.rb', line 56
def eligibilities(id)
handle_error do
params = { id: id }
params[:person_ids] = options[:person_ids] if options[:person_ids]
result = Pike13::Desk::EventOccurrence.enrollment_eligibilities(**params)
output(result)
end
end
|
#get(id) ⇒ Object
37
38
39
40
41
42
|
# File 'lib/pike13/cli/commands/desk/event_occurrence.rb', line 37
def get(id)
handle_error do
result = Pike13::Desk::EventOccurrence.find(id)
output(result)
end
end
|
#list ⇒ Object
24
25
26
27
28
29
30
31
32
33
|
# File 'lib/pike13/cli/commands/desk/event_occurrence.rb', line 24
def list
validate_event_occurrence_date_formats
handle_error do
params = build_event_occurrence_params
result = with_progress("Fetching event occurrences") do
Pike13::Desk::EventOccurrence.all(**params)
end
output(result)
end
end
|
#summary ⇒ Object
46
47
48
49
50
51
|
# File 'lib/pike13/cli/commands/desk/event_occurrence.rb', line 46
def summary
handle_error do
result = Pike13::Desk::EventOccurrence.summary
output(result)
end
end
|