/** * Get all tax rates * * @param string $filter Filter name (all, sales, purchase, inactive) * @return TaxRate_Array * @throws InvalidFilterException */ public function getAll($filter = null) { $filters = array('all', 'sales', 'purchase', 'inactive'); if (!in_array($filter, $filters)) { $message = 'Unknown filter "' . $filter . '" for TaxRates'; $message .= '; available filters: ' . implode(', ', $filters); throw new InvalidFilterException($message); } $rates = new TaxRate_Array(); foreach ($this->connector->getAll('TaxRate') as $rate) { if ($filter == 'inactive' && $rate->active || $filter != 'inactive' && !$rate->active) { continue; } if ($filter == 'sales' && $rate->taxRateType != TaxRate::RATE_TYPE_SALES) { continue; } elseif ($filter == 'purchase' && $rate->taxRateType != TaxRate::RATE_TYPE_PURCHASE) { continue; } $rates->append($rate); } return $rates; }
public function getAll() { return $this->connector->getAll('Product'); }
/** * Get all contacts * * @return Contact_Array */ public function getAll() { return $this->connector->getAll('Contact'); }
/** * Get all estimates * * @param string|integer $filter Filter name or id (advanced filters) * @param Estimate_Subject $parent * @return Estimate_Array * @throws InvalidFilterException */ public function getAll($filter = null, Estimate_Subject $parent = null) { return $this->connector->getAll('Estimate', $filter, $parent); }
/** * Get all invoices * * @param string|integer $filter Filter name or id (advanced filters) * @param Invoice_Subject $parent * @return Invoice_Array * @throws InvalidFilterException */ public function getAll($filter = null, Invoice_Subject $parent = null) { return $this->connector->getAll('Invoice', $filter, $parent); }
public function getAll() { return $this->connector->getAll('InvoiceProfile'); }
/** * Get all templates * * @param string $filter * @param RecurringTemplate_Subject $parent * @return RecurringTemplate_Array * @throws InvalidFilterException */ public function getAll($filter = null, RecurringTemplate_Subject $parent = null) { return $this->connector->getAll('RecurringTemplate', $filter, $parent); }