Class: BillForward::Organisation
- Inherits:
-
MutableEntity
- Object
- BillingEntity
- InsertableEntity
- MutableEntity
- BillForward::Organisation
- Defined in:
- lib/bill_forward/entities/organisation.rb
Overview
This entity exposes the following child entities via method_missing:
APIConfiguration[] .apiConfigurations
Instance Attribute Summary
Attributes inherited from BillingEntity
Class Method Summary collapse
Methods inherited from MutableEntity
Methods inherited from InsertableEntity
Methods inherited from BillingEntity
#[], #[]=, #_dump, _load, build_entity, build_entity_array, #camel_case_lower, get_all, get_by_id, #initialize, #method_missing, request_ambiguous, request_first_heterotyped, request_many_heterotyped, #serialize, #serialize_field, singleton_client, #state_params, #to_json, #to_ordered_hash, #to_s, #to_unordered_hash
Constructor Details
This class inherits a constructor from BillForward::MutableEntity
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class BillForward::BillingEntity
Class Method Details
.get_mine(options = {}, customClient = nil) ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/bill_forward/entities/organisation.rb', line 9 def get_mine( = {}, customClient = nil) client = customClient client = singleton_client if client.nil? route = resource_path.path endpoint = 'mine' url_full = "#{route}/#{endpoint}" response = client.get(url_full) results = response["results"] # maybe use build_entity_array here for consistency entity_array = Array.new # maybe it's an empty array, but that's okay too. results.each do |value| entity = self.new(value, client) entity_array.push(entity) end entity_array end |