Class: Tenk::Projects::TimeEntries

Inherits:
ProjectResource show all
Defined in:
lib/projects/time_entries.rb

Overview

API methods for TimeEntries of a project

Defined Under Namespace

Classes: CreateRequest, GetRequest, ListRequest, UpdateRequest

Instance Method Summary collapse

Methods inherited from ProjectResource

#delete, #initialize, #resource_root

Constructor Details

This class inherits a constructor from Tenk::Projects::ProjectResource

Instance Method Details

#create(project_id, opts = {}) ⇒ Hashie::Mash

Create a new Assignment for this project

Parameters:

  • project_id (Integer)

    the id of the project

  • opts (Hash) (defaults to: {})

    the post parameters to add to the create request

Returns:

  • (Hashie::Mash)

    the API response as a Hashie::Mash

See Also:



44
45
46
# File 'lib/projects/time_entries.rb', line 44

def create(project_id, opts = {})
  super(project_id, CreateRequest.new(opts))
end

#get(project_id, time_entry_id, opts = {}) ⇒ Hashie::Mash

Get a single Assignment for this project

Parameters:

  • project_id (Integer)

    the id of the project

  • time_entry_id (Integer)

    the id of the time entry

  • opts (Hash) (defaults to: {})

    the query parameters to add to the get request

Returns:

  • (Hashie::Mash)

    the response as a Hashie::Mash

See Also:



35
36
37
# File 'lib/projects/time_entries.rb', line 35

def get(project_id, time_entry_id, opts = {})
  super(project_id, time_entry_id, GetRequest.new(opts))
end

#list(project_id, opts = {}) ⇒ Hashie::Mash

List TimeEntries for a single project

Parameters:

  • project_id (Integer)

    the id of the project

  • opts (Hash) (defaults to: {})

    the query parameters to add to list request

Returns:

  • (Hashie::Mash)

    the API response as a Hashie::Mash

See Also:



25
26
27
# File 'lib/projects/time_entries.rb', line 25

def list(project_id, opts = {})
  super(project_id, ListRequest.new(opts))
end

#update(project_id, time_entry_id, opts = {}) ⇒ Hashie::Mash

Update an Assignment for this project

Parameters:

  • project_id (Integer)

    the id of the project

  • time_entry_id (Integer)

    the id of the time entry

  • opts (Hash) (defaults to: {})

    the post parameters to add to the create request

Returns:

  • (Hashie::Mash)

    the API response as a Hashie::Mash

See Also:



54
55
56
# File 'lib/projects/time_entries.rb', line 54

def update(project_id, time_entry_id, opts = {})
  super(project_id, time_entry_id, UpdateRequest.new(opts))
end