Beispiel #1
0
 /**
  * Return a collection of all Debt objects for this customer.
  * @return Collection
  */
 public function getDebts()
 {
     $debts = new Collection();
     foreach ((array) $this->debts as $debt) {
         $debts->add($this->phx->debt->getObject($debt->debt_id));
     }
     return $debts;
 }
Beispiel #2
0
 /**
  * Return client locations.
  * @param $id
  * @return Collection
  */
 public function locations($id)
 {
     $response = $this->post("client/{$id}/division/search", ['active' => true, 'order_by' => 'State, Name']);
     $collection = new Collection();
     foreach ($response->body() as $location) {
         $collection->add(new Location($location));
     }
     return $collection;
 }