/**
  * Constructor
  */
 public function __construct($accessToken, $type = 'company', $name, $countryId)
 {
     parent::__construct($accessToken);
     $this->type = $type;
     $this->name = $name;
     $this->countryId = $countryId;
 }
 /**
  * Constructor
  */
 public function __construct($accessToken, $vatReturnId, $entryDate, $accountId)
 {
     parent::__construct($accessToken);
     $this->vatReturnId = $vatReturnId;
     $this->entryDate = $entryDate;
     $this->accountId = $accountId;
 }
 /**
  * Constructor
  */
 public function __construct($accessToken, $taxRateId, $share, $source, $accountId)
 {
     parent::__construct($accessToken);
     $this->taxRateId = $taxRateId;
     $this->share = $share;
     $this->source = $source;
     $this->accountId = $accountId;
 }
 /**
  * Constructor
  */
 public function __construct($accessToken, $invoiceId, $entryDate, $flatFee, $percentageFee)
 {
     parent::__construct($accessToken);
     $this->invoiceId = $invoiceId;
     $this->entryDate = $entryDate;
     $this->flatFee = $flatFee;
     $this->percentageFee = $percentageFee;
 }
 /**
  * Constructor
  */
 public function __construct($accessToken, $billId, $accountId, $description, $amount)
 {
     parent::__construct($accessToken);
     $this->billId = $billId;
     $this->accountId = $accountId;
     $this->description = $description;
     $this->amount = $amount;
 }
 /**
  * Constructor
  */
 public function __construct($accessToken, $schemeId, $daysPastDue, $subject, $body)
 {
     parent::__construct($accessToken);
     $this->schemeId = $schemeId;
     $this->daysPastDue = $daysPastDue;
     $this->subject = $subject;
     $this->body = $body;
 }
 /**
  * Constructor
  */
 public function __construct($accessToken, $contactId, $entryDate, $paymentDate, $currencyId)
 {
     parent::__construct($accessToken);
     $this->contactId = $contactId;
     $this->entryDate = $entryDate;
     $this->paymentDate = $paymentDate;
     $this->currencyId = $currencyId;
 }
 /**
  * Constructor
  */
 public function __construct($accessToken, $contactId, $recurringInterval, $recurringUnit, $recurringValue, $nextInvoiceDate)
 {
     parent::__construct($accessToken);
     $this->contactId = $contactId;
     $this->recurringInterval = $recurringInterval;
     $this->recurringUnit = $recurringUnit;
     $this->recurringValue = $recurringValue;
     $this->nextInvoiceDate = $nextInvoiceDate;
 }
 /**
  * Constructor
  */
 public function __construct($accessToken, $contactId, $feeCurrencyId, $contactPersonId, $emailSubject, $emailBody)
 {
     parent::__construct($accessToken);
     $this->contactId = $contactId;
     $this->feeCurrencyId = $feeCurrencyId;
     $this->contactPersonId = $contactPersonId;
     $this->emailSubject = $emailSubject;
     $this->emailBody = $emailBody;
 }
 /**
  * Constructor
  */
 public function __construct($accessToken, $name, $invoiceSubject, $invoiceBody, $invoiceReminderSubject, $invoiceReminderBody, $contactEmailTemplate)
 {
     parent::__construct($accessToken);
     $this->name = $name;
     $this->invoiceSubject = $invoiceSubject;
     $this->invoiceBody = $invoiceBody;
     $this->invoiceReminderSubject = $invoiceReminderSubject;
     $this->invoiceReminderBody = $invoiceReminderBody;
     $this->contactEmailTemplate = $contactEmailTemplate;
 }
 /**
  * Constructor
  */
 public function __construct($accessToken, $entryDate, $cashSide, $cashAccountId, $cashExchangeRate, $feeAccountId, array $associations)
 {
     parent::__construct($accessToken);
     $this->entryDate = $entryDate;
     $this->cashSide = $cashSide;
     $this->cashAccountId = $cashAccountId;
     $this->cashExchangeRate = $cashExchangeRate;
     $this->feeAccountId = $feeAccountId;
     $this->associations = $associations;
 }
 /**
  * @param $accessToken string
  * @param $name string
  * @param $countryId string
  * @param $baseCurrencyId string
  * @param $fiscalYearEndMonth integer
  * @param \DateTime|string $firstFiscalYearStart
  * @param \DateTime|string $firstFiscalYearEnd
  * @param $subscriptionPeriod string (enum)
  * @param $localeId string The organization's default locale. Will be used for all contacts unless overridden on a contact level.
  * @param $emailAttachmentDeliveryMode string (enum) Whether to deliver attachments by link to customer portal or with email attachments.
  * @param $vatPeriod string (enum)
  */
 public function __construct($accessToken, $name, $countryId, $baseCurrencyId, $fiscalYearEndMonth, $firstFiscalYearStart, $firstFiscalYearEnd, $subscriptionPeriod, $localeId, $emailAttachmentDeliveryMode, $vatPeriod)
 {
     parent::__construct($accessToken);
     $this->name = $name;
     $this->countryId = $countryId;
     $this->baseCurrencyId = $baseCurrencyId;
     $this->fiscalYearEndMonth = $fiscalYearEndMonth;
     $this->firstFiscalYearStart = $firstFiscalYearStart instanceof \DateTime ? $firstFiscalYearStart : new \DateTime($firstFiscalYearStart);
     $this->firstFiscalYearEnd = $firstFiscalYearEnd instanceof \DateTime ? $firstFiscalYearEnd : new \DateTime($firstFiscalYearEnd);
     $this->subscriptionPeriod = $subscriptionPeriod;
     $this->localeId = $localeId;
     $this->emailAttachmentDeliveryMode = $emailAttachmentDeliveryMode;
     $this->vatPeriod = $vatPeriod;
 }
 /**
  * Constructor
  */
 public function __construct($accessToken, $name, $rate)
 {
     parent::__construct($accessToken);
     $this->name = $name;
     $this->rate = $rate;
 }
 /**
  * Delete an object of this type with the specified ID.
  *
  * @param $accessToken string
  * @param $id string
  * @return null
  */
 public static function deleteById($accessToken, $id)
 {
     return parent::_deleteById($accessToken, $id);
 }
 /**
  * Constructor
  */
 public function __construct($accessToken, $isTransactionSummaryEnabled, $name)
 {
     parent::__construct($accessToken);
     $this->isTransactionSummaryEnabled = $isTransactionSummaryEnabled;
     $this->name = $name;
 }
 /**
  * Constructor
  */
 public function __construct($accessToken, $productId, $unitPrice)
 {
     parent::__construct($accessToken);
     $this->productId = $productId;
     $this->unitPrice = $unitPrice;
 }
 /**
  * Send invoice through mail (via BB API).
  *
  * @param $contactPersonId
  * @param $emailSubject
  * @param $emailBody
  * @return object result information (only if successful)
  * @throws BbException if the invoice has not been saved
  */
 public function mail($contactPersonId, $emailSubject, $emailBody)
 {
     if (!$this->id) {
         throw new BbException('The invoice cannot be mailed, because it has not been saved.');
     }
     $data = array('email' => array('contactPersonId' => $contactPersonId, 'emailSubject' => $emailSubject, 'emailBody' => $emailBody));
     return parent::request('POST', 'v2/invoices/' . $this->id . '/emails', $this->accessToken, (object) $data);
 }
 /**
  * Constructor
  */
 public function __construct($accessToken, $contactId, $name)
 {
     parent::__construct($accessToken);
     $this->contactId = $contactId;
     $this->name = $name;
 }
 /**
  * Constructor
  */
 public function __construct($accessToken, $reminderId, $invoiceId)
 {
     parent::__construct($accessToken);
     $this->reminderId = $reminderId;
     $this->invoiceId = $invoiceId;
 }
 /**
  * List all objects of the type
  *
  * @param $accessToken
  * @return BbObject[]
  */
 static function getAll($accessToken)
 {
     return parent::_getAll($accessToken);
 }
 /**
  * Constructor
  */
 public function __construct($accessToken, $message, array $associations)
 {
     parent::__construct($accessToken);
     $this->message = $message;
     $this->associations = $associations;
 }
 /**
  * Constructor
  */
 public function __construct($accessToken, $entryDate)
 {
     parent::__construct($accessToken);
     $this->entryDate = $entryDate;
 }
 /**
  * Constructor
  */
 public function __construct($accessToken, $name, $accountId)
 {
     parent::__construct($accessToken);
     $this->name = $name;
     $this->accountId = $accountId;
 }
 /**
  * Constructor
  */
 public function __construct($accessToken, $name, $groupId)
 {
     parent::__construct($accessToken);
     $this->name = $name;
     $this->groupId = $groupId;
 }
 /**
  * Constructor
  */
 public function __construct($accessToken)
 {
     parent::__construct($accessToken);
 }
 /**
  * Constructor
  */
 public function __construct($accessToken, $accountId, $type)
 {
     parent::__construct($accessToken);
     $this->accountId = $accountId;
     $this->type = $type;
 }
 /**
  * Update (save) the object on the server.
  */
 public function save()
 {
     return parent::_save();
 }
 /**
  * Constructor
  */
 public function __construct($accessToken, $matchId, $subject)
 {
     parent::__construct($accessToken);
     $this->matchId = $matchId;
     $this->subject = $subject;
 }