class Rexpense::Resources::Expense

A wrapper to Rexpense expenses API

API

Documentation: developers.rexpense.com/api/v1/expenses/

Public Instance Methods

mentionables(id) click to toggle source
# File lib/rexpense/resources/expense.rb, line 26
def mentionables(id)
  http.get("#{endpoint_base}/#{id}/mentionables") do |response|
    Rexpense::Entities::UserCollection.build response.parsed_body
  end
end
status(id) click to toggle source
# File lib/rexpense/resources/expense.rb, line 14
def status(id)
  http.get("#{search_endpoint}/#{id}/status") do |response|
    Rexpense::Entities::ExpenseStatus.new response.parsed_body
  end
end
update_status(id, params) click to toggle source
# File lib/rexpense/resources/expense.rb, line 20
def update_status(id, params)
  http.put("#{search_endpoint}/#{id}/status", body: params) do |response|
    Rexpense::Entities::ExpenseStatus.new response.parsed_body
  end
end

Private Instance Methods

endpoint_base() click to toggle source
# File lib/rexpense/resources/expense.rb, line 34
def endpoint_base
  "/expenses"
end