Class: Rexpense::Resources::Organization
- Inherits:
-
ResourceBase
- Object
- Base
- ResourceBase
- Rexpense::Resources::Organization
- Includes:
- Membership
- Defined in:
- lib/rexpense/resources/organization.rb
Overview
A wrapper to Rexpense organizations API
- API
-
Documentation: developers.rexpense.com/api/v1/organizations/
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
Methods included from Membership
#create_membership, #destroy_membership, #find_membership, #memberships, #update_membership
Methods inherited from ResourceBase
#create, #destroy, #find, #find_all, #update
Methods inherited from Base
Constructor Details
This class inherits a constructor from Rexpense::Resources::Base
Instance Method Details
#distances_rules(id) ⇒ Object
12 13 14 15 16 |
# File 'lib/rexpense/resources/organization.rb', line 12 def distances_rules(id) http.get("#{endpoint_base}/#{id}/distances_rules") do |response| response.parsed_body.first end end |
#update_distances_rules(id, params) ⇒ Object
18 19 20 21 22 |
# File 'lib/rexpense/resources/organization.rb', line 18 def update_distances_rules(id, params) http.post("#{endpoint_base}/#{id}/distances_rules", body: params) do |response| response.parsed_body.first end end |