/** * Returns all account Natures. * * @return SalesTaxRuleset[] * @throws BillyException */ public function getAll() { $response = parent::getAll(); $natures = array(); foreach ($response as $key => $ruleset) { $natures[$ruleset->id] = new SalesTaxRuleset($ruleset); } return $natures; }
/** * Returns all account groups. * * @return Product[] * @throws BillyException */ public function getAll() { $response = parent::getAll(); $products = array(); foreach ($response as $key => $product) { $products[$product->id] = new Product($product); } return $products; }
/** * Returns all account tax rules for a rule set. * * @todo: should should require a ?rulesetId=API_ID parameter. * * @return SalesTaxRule[] * @throws BillyException */ public function getAll() { $response = parent::getAll(); $taxRules = array(); foreach ($response as $key => $taxRule) { $taxRules[$taxRule->id] = new SalesTaxRule($taxRule); } return $taxRules; }
/** * Returns all account groups. * * @return Invoice[] * @throws BillyException */ public function getAll() { $response = parent::getAll(); $invoices = array(); foreach ($response as $key => $invoice) { $invoices[$invoice->id] = new Invoice($invoice); } return $invoices; }
/** * Returns all account groups. * * @return AccountGroup[] * @throws BillyException */ public function getAll() { $response = parent::getAll(); $groups = array(); foreach ($response as $key => $group) { $groups[$group->id] = new AccountGroup($group); } return $groups; }
/** * Returns all accounts. * * @return Account[] * @throws BillyException */ public function getAll() { $response = parent::getAll(); $accounts = array(); foreach ($response as $key => $account) { $accounts[$account->id] = new Account($account); } return $accounts; }
/** * Lists contacts. * * @return Contact[] * @throws BillyException */ public function getAll() { $response = parent::getAll(); $contacts = array(); foreach ($response as $key => $contact) { $contacts[$contact->id] = new Contact($contact); } return $contacts; }
/** * Returns all account groups. * * @return BankPayment[] * @throws BillyException */ public function getAll() { $response = parent::getAll(); $payments = array(); foreach ($response as $key => $payment) { $payments[$payment->id] = new BankPayment($payment); } return $payments; }
/** * Returns all account groups. * * @param integer $invoiceId Invoice ID * * @return InvoiceLine[] * @throws BillyException */ public function getAll($invoiceId) { $this->url = $this->url . '?invoiceId=' . $invoiceId; $response = parent::getAll(); $invoiceLines = array(); foreach ($response as $key => $invoiceLine) { $invoiceLines[$invoiceLine->id] = new InvoiceLine($invoiceLine); } return $invoiceLines; }