Module: RedmineAPIHelper::TimeEntriesAPIHelper

Included in:
Helpers
Defined in:
lib/redmine_api_helper/time_entries_api_helper.rb

Instance Method Summary collapse

Instance Method Details

#create_time_entry(**params) ⇒ Object

creates a new time_entry with params, corresponds to controller#create



54
55
56
# File 'lib/redmine_api_helper/time_entries_api_helper.rb', line 54

def create_time_entry(**params)
  create_object(:time_entry, params)
end

#destroy_time_entry(id, **params) ⇒ Object

deletes an existing time_entry with params, corresponds to controller#destroy



68
69
70
# File 'lib/redmine_api_helper/time_entries_api_helper.rb', line 68

def destroy_time_entry(id, **params)
  destroy_object(:time_entry, id, params)
end

#list_time_entries(**params) ⇒ Object

lists time_entries, corresponds to controller#index



40
41
42
# File 'lib/redmine_api_helper/time_entries_api_helper.rb', line 40

def list_time_entries(**params)
  list_objects(:time_entries, params)
end

#read_time_entry(id, **params) ⇒ Object

reads time_entry having id, corresponds to controller#show



47
48
49
# File 'lib/redmine_api_helper/time_entries_api_helper.rb', line 47

def read_time_entry(id, **params)
  read_object(:time_entry, id, params)
end

#time_entries_url(**params) ⇒ Object

reads time_entries_url from args



26
27
28
# File 'lib/redmine_api_helper/time_entries_api_helper.rb', line 26

def time_entries_url(**params)
  url_path(args.urls.Home, "time_entries", params)
end

#time_entry_url(id, **params) ⇒ Object

creates a time_entry_url



33
34
35
# File 'lib/redmine_api_helper/time_entries_api_helper.rb', line 33

def time_entry_url(id, **params)
  url_path(time_entries_url, id, params)
end

#update_time_entry(id, **params) ⇒ Object

updates an existing time_entry with params, corresponds to controller#update



61
62
63
# File 'lib/redmine_api_helper/time_entries_api_helper.rb', line 61

def update_time_entry(id, **params)
  update_object(:time_entry, id, params)
end