Class: Tenk::Approvals

Inherits:
Resource show all
Defined in:
lib/approvals.rb

Overview

API actions for Approval resource which represents an approval of a time entry or expense item

Defined Under Namespace

Classes: CreateRequest, GetRequest, ListRequest, UpdateRequest

Instance Method Summary collapse

Methods inherited from Resource

#create, #initialize, #resource_root, #update

Constructor Details

This class inherits a constructor from Tenk::Resource

Instance Method Details

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

Get one Approval from the 10k account

Parameters:

  • id (Integer)

    the id of the Approval

Returns:

  • (Hashie::Mash)

    the API response as a Hashie::Mash

See Also:



41
42
43
# File 'lib/approvals.rb', line 41

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

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

List Approvals from this 10k account

Parameters:

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

    the query parameters for the list request

Returns:

  • (Hashie::Mash)

    the API response as a Hashie::Mash

See Also:



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

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