module Rexpense::Resources::Participant

Public Instance Methods

leave_participant(resource_id) click to toggle source

Get resource participants tags

API

Method: GET /api/v1/reimbursements/:id/participants Method: GET /api/v1/expenses/:id/participants Method: GET /api/v1/advancements/:id/participants

Documentation: developers.rexpense.com/api/advancement_participants#destroy Documentation: developers.rexpense.com/api/expense_participants#destroy Documentation: developers.rexpense.com/api/reimbursement_participants#destroy

# File lib/rexpense/resources/nested_endpoints/participant.rb, line 31
def leave_participant(resource_id)
  http.delete(participants_endpoint(resource_id)) do |response|
    true
  end
end
participants(resource_id) click to toggle source

Get resource participants tags

API

Method: GET /api/v1/reimbursements/:id/participants Method: GET /api/v1/expenses/:id/participants Method: GET /api/v1/advancements/:id/participants

Documentation: developers.rexpense.com/api/participants#index Documentation: developers.rexpense.com/api/expense_participants#index Documentation: developers.rexpense.com/api/reimbursement_participants#index

# File lib/rexpense/resources/nested_endpoints/participant.rb, line 14
def participants(resource_id)
  http.get(participants_endpoint(resource_id)) do |response|
    Rexpense::Entities::UserCollection.build response
  end
end

Private Instance Methods

participants_endpoint(resource_id) click to toggle source
# File lib/rexpense/resources/nested_endpoints/participant.rb, line 39
def participants_endpoint(resource_id)
  "#{endpoint_base}/#{resource_id}/participants"
end