Пример #1
0
 /**
  * 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]);
 }
Пример #2
0
 /**
  * spools a newsletter
  *
  * @param int|NewsletterType $newsletter
  *
  * @return int
  */
 public function spool($newsletter)
 {
     $newsletterId = Type::getIdentifier($newsletter);
     return $this->call('spoolNewsletter', ['newsletterid' => $newsletterId]);
 }
Пример #3
0
 /**
  * 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]);
 }
Пример #4
0
 /**
  * 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]);
 }
Пример #5
0
 /**
  * returns pdf file of delivery
  *
  * @param $delivery
  *
  * @return File
  */
 public function pdf($delivery)
 {
     $deliveryId = Type::getIdentifier($delivery);
     return $this->call('getDeliveryPDF', ['deliveryid' => $deliveryId]);
 }
Пример #6
0
 /**
  * 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]);
 }
Пример #7
0
 /**
  * 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]);
 }
Пример #8
0
 /**
  * returns pdf file of invoice
  *
  * @param $invoice
  *
  * @return File
  */
 public function pdf($invoice)
 {
     $invoiceId = Type::getIdentifier($invoice);
     return $this->call('getInvoicePDF', ['invoiceid' => $invoiceId]);
 }
Пример #9
0
 /**
  * returns pdf for offer
  *
  * @param OfferType|int $offer
  *
  * @return File
  */
 public function pdf($offer)
 {
     $offerId = Type::getIdentifier($offer);
     return $this->call('getOfferPDF', ['offerid' => $offerId]);
 }
Пример #10
0
 /**
  * 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]);
 }
Пример #11
0
 /**
  * deletes an article
  *
  * @param int|ArticleType $article
  *
  * @return bool
  */
 public function delete($article)
 {
     $articleId = Type::getIdentifier($article);
     return $this->call('deleteArticle', ['articleid' => $articleId]);
 }
Пример #12
0
 /**
  * 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]);
 }
Пример #13
0
 /**
  * deletes a customer
  *
  * @param Customer|int $customer
  *
  * @return bool
  */
 public function delete($customer)
 {
     $customerId = Type::getIdentifier($customer);
     return $this->call('deleteCustomer', ['customerid' => $customerId]);
 }
Пример #14
0
 /**
  * returns pdf for refund
  *
  * @param RefundType|int $refund
  *
  * @return File
  */
 public function pdf($refund)
 {
     $refundId = Type::getIdentifier($refund);
     return $this->call('getOfferPDF', ['refundid' => $refundId]);
 }