Class: Tenk::Projects::Phases

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

Overview

The API methods for Phases, which represent a part of a project with its own budget and resources

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:



49
50
51
# File 'lib/projects/phases.rb', line 49

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

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

Get a single Assignment for this project

Parameters:

  • project_id (Integer)

    the id of the project

  • phase_id (Integer)

    the id of the phase

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

    the query parameters to add to the get request

Returns:

  • (Hashie::Mash)

    the response as a Hashie::Mash

See Also:



40
41
42
# File 'lib/projects/phases.rb', line 40

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

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

List Phases 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:



30
31
32
# File 'lib/projects/phases.rb', line 30

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

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

Update an Assignment for this project

Parameters:

  • project_id (Integer)

    the id of the project

  • phase_id (Integer)

    the id of the phase

  • 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:



59
60
61
# File 'lib/projects/phases.rb', line 59

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