Class: Tenk::Projects::BillRates

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

Overview

The API methods for BillRate resources

Defined Under Namespace

Classes: CreateRequest, 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 BillRate 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:



38
39
40
# File 'lib/projects/bill_rates.rb', line 38

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

#get(project_id, bill_rate_id) ⇒ Hashie::Mash

Get a single BillRate for this project

Parameters:

  • project_id (Integer)

    the id of the project

  • bill_rate_id (Integer)

    the id of the bill_rate

Returns:

  • (Hashie::Mash)

    the response as a Hashie::Mash

See Also:

  • GetRequest


29
30
31
# File 'lib/projects/bill_rates.rb', line 29

def get(project_id, bill_rate_id)
  super(project_id, bill_rate_id, {})
end

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

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



20
21
22
# File 'lib/projects/bill_rates.rb', line 20

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

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

Update an BillRate for this project

Parameters:

  • project_id (Integer)

    the id of the project

  • bill_rate_id (Integer)

    the id of the bill_rate

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



48
49
50
# File 'lib/projects/bill_rates.rb', line 48

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