/** * set mailspool entry as read by recipient * * @param int|MailspoolType $mailspool * @return MailspoolType */ public function readByRecipient($mailspool) { $mailSpoolId = Type::getIdentifier($mailspool); return $this->call('setMailspoolReadForEntry', ['mailspoolid' => $mailSpoolId]); }
/** * spools a newsletter * * @param int|NewsletterType $newsletter * * @return int */ public function spool($newsletter) { $newsletterId = Type::getIdentifier($newsletter); return $this->call('spoolNewsletter', ['newsletterid' => $newsletterId]); }
/** * modifies the state of a refund * * @param string $method * @param string $paramName * @param int|\Rokde\Gsales\Api\Contracts\IdentifierInterface $identifier * * @return \Rokde\Gsales\Api\Types\Type */ protected function modifyState($method, $paramName, $identifier) { $id = Type::getIdentifier($identifier); return $this->call($method, [$paramName => $id]); }
/** * creates an invoice from all queue entries for a given customer * * @param int|CustomerType $customer * * @return InvoiceType */ public function createInvoice($customer) { $customerId = Type::getIdentifier($customer); return $this->call('createInvoiceFromQueueForCustomer', ['customerid' => $customerId]); }
/** * returns pdf file of delivery * * @param $delivery * * @return File */ public function pdf($delivery) { $deliveryId = Type::getIdentifier($delivery); return $this->call('getDeliveryPDF', ['deliveryid' => $deliveryId]); }
/** * disables the customer frontend login, using the customer id * * @param Customer|int $customer * * @return bool */ public function disableLoginById($customer) { $customerId = Type::getIdentifier($customer); return $this->call('disableCustomerFrontendLoginById', ['customerid' => $customerId]); }
/** * removes end date of contract * * @param int|ContractType $contract * * @return ContractType * * @since api 2.3 * @see http://www.gsales.de/api_documentation.pdf#9.5.13 */ public function removeEndDate($contract) { $contractId = Type::getIdentifier($contract); return $this->call('updateContractEndDate', ['contractid' => $contractId]); }
/** * returns pdf file of invoice * * @param $invoice * * @return File */ public function pdf($invoice) { $invoiceId = Type::getIdentifier($invoice); return $this->call('getInvoicePDF', ['invoiceid' => $invoiceId]); }
/** * returns pdf for offer * * @param OfferType|int $offer * * @return File */ public function pdf($offer) { $offerId = Type::getIdentifier($offer); return $this->call('getOfferPDF', ['offerid' => $offerId]); }
/** * deletes a comment * * @param int|\Rokde\Gsales\Api\Types\CommentType $comment * * @return bool */ public function delete($comment) { $commentId = Type::getIdentifier($comment); return $this->call('deleteComment', ['commentid' => $commentId]); }
/** * deletes an article * * @param int|ArticleType $article * * @return bool */ public function delete($article) { $articleId = Type::getIdentifier($article); return $this->call('deleteArticle', ['articleid' => $articleId]); }
/** * removes a role from user * * @param int|UserType $user * @param int|RoleType $role * * @return \Rokde\Gsales\Api\Types\RoleType[] */ public function removeRole($user, $role) { $userId = Type::getIdentifier($user); $roleId = Type::getIdentifier($role); return $this->call('removeRoleFromUser', ['userid' => $userId, 'roleid' => $roleId]); }
/** * deletes a customer * * @param Customer|int $customer * * @return bool */ public function delete($customer) { $customerId = Type::getIdentifier($customer); return $this->call('deleteCustomer', ['customerid' => $customerId]); }
/** * returns pdf for refund * * @param RefundType|int $refund * * @return File */ public function pdf($refund) { $refundId = Type::getIdentifier($refund); return $this->call('getOfferPDF', ['refundid' => $refundId]); }