Skip to content

Commit

Permalink
task#98 Add paysystem adm persontype support
Browse files Browse the repository at this point in the history
  • Loading branch information
camaxtly committed Feb 18, 2018
1 parent 0082cd7 commit d450087
Show file tree
Hide file tree
Showing 2 changed files with 150 additions and 0 deletions.
75 changes: 75 additions & 0 deletions src/classes/crm/invoice/paysystem.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
<?php

namespace Bitrix24\CRM\Invoice;

use Bitrix24\Bitrix24Entity;

/**
* Class PaySystem
*/
class PaySystem extends Bitrix24Entity
{
/**
* @link https://dev.1c-bitrix.ru/rest_help/crm/invoice/crm_paysystem_list.php
*
* @param array $order - order of task items
* @param array $filter - filter array
*
* @return array
*
* @throws \Bitrix24\Exceptions\Bitrix24ApiException
* @throws \Bitrix24\Exceptions\Bitrix24EmptyResponseException
* @throws \Bitrix24\Exceptions\Bitrix24Exception
* @throws \Bitrix24\Exceptions\Bitrix24IoException
* @throws \Bitrix24\Exceptions\Bitrix24MethodNotFoundException
* @throws \Bitrix24\Exceptions\Bitrix24PaymentRequiredException
* @throws \Bitrix24\Exceptions\Bitrix24PortalDeletedException
* @throws \Bitrix24\Exceptions\Bitrix24PortalRenamedException
* @throws \Bitrix24\Exceptions\Bitrix24SecurityException
* @throws \Bitrix24\Exceptions\Bitrix24TokenIsExpiredException
* @throws \Bitrix24\Exceptions\Bitrix24TokenIsInvalidException
* @throws \Bitrix24\Exceptions\Bitrix24WrongClientException
*/
public function getList($order = array(), $filter = array())
{
$fullResult = $this->client->call(
'crm.paysystem.list',
array(
'order' => $order,
'filter' => $filter,
)
);

return $fullResult;
}


/**
* @link https://dev.1c-bitrix.ru/rest_help/crm/invoice/crm_paysystem_fields.php
*
* @return array
*
* @throws \Bitrix24\Exceptions\Bitrix24ApiException
* @throws \Bitrix24\Exceptions\Bitrix24EmptyResponseException
* @throws \Bitrix24\Exceptions\Bitrix24Exception
* @throws \Bitrix24\Exceptions\Bitrix24IoException
* @throws \Bitrix24\Exceptions\Bitrix24MethodNotFoundException
* @throws \Bitrix24\Exceptions\Bitrix24PaymentRequiredException
* @throws \Bitrix24\Exceptions\Bitrix24PortalDeletedException
* @throws \Bitrix24\Exceptions\Bitrix24PortalRenamedException
* @throws \Bitrix24\Exceptions\Bitrix24SecurityException
* @throws \Bitrix24\Exceptions\Bitrix24TokenIsExpiredException
* @throws \Bitrix24\Exceptions\Bitrix24TokenIsInvalidException
* @throws \Bitrix24\Exceptions\Bitrix24WrongClientException
*
*/
public function fields()
{
$fullResult = $this->client->call(
'crm.paysystem.fields',
array()
);

return $fullResult;
}
}
75 changes: 75 additions & 0 deletions src/classes/crm/invoice/persontype.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
<?php

namespace Bitrix24\CRM\Invoice;

use Bitrix24\Bitrix24Entity;

/**
* Class PersonType
*/
class PersonType extends Bitrix24Entity
{
/**
* @link https://dev.1c-bitrix.ru/rest_help/crm/invoice/crm_persontype_list.php
*
* @param array $order - order of task items
* @param array $filter - filter array
*
* @return array
*
* @throws \Bitrix24\Exceptions\Bitrix24ApiException
* @throws \Bitrix24\Exceptions\Bitrix24EmptyResponseException
* @throws \Bitrix24\Exceptions\Bitrix24Exception
* @throws \Bitrix24\Exceptions\Bitrix24IoException
* @throws \Bitrix24\Exceptions\Bitrix24MethodNotFoundException
* @throws \Bitrix24\Exceptions\Bitrix24PaymentRequiredException
* @throws \Bitrix24\Exceptions\Bitrix24PortalDeletedException
* @throws \Bitrix24\Exceptions\Bitrix24PortalRenamedException
* @throws \Bitrix24\Exceptions\Bitrix24SecurityException
* @throws \Bitrix24\Exceptions\Bitrix24TokenIsExpiredException
* @throws \Bitrix24\Exceptions\Bitrix24TokenIsInvalidException
* @throws \Bitrix24\Exceptions\Bitrix24WrongClientException
*/
public function getList($order = array(), $filter = array())
{
$fullResult = $this->client->call(
'crm.persontype.list',
array(
'order' => $order,
'filter' => $filter,
)
);

return $fullResult;
}


/**
* @link https://dev.1c-bitrix.ru/rest_help/crm/invoice/crm_persontype_fields.php
*
* @return array
*
* @throws \Bitrix24\Exceptions\Bitrix24ApiException
* @throws \Bitrix24\Exceptions\Bitrix24EmptyResponseException
* @throws \Bitrix24\Exceptions\Bitrix24Exception
* @throws \Bitrix24\Exceptions\Bitrix24IoException
* @throws \Bitrix24\Exceptions\Bitrix24MethodNotFoundException
* @throws \Bitrix24\Exceptions\Bitrix24PaymentRequiredException
* @throws \Bitrix24\Exceptions\Bitrix24PortalDeletedException
* @throws \Bitrix24\Exceptions\Bitrix24PortalRenamedException
* @throws \Bitrix24\Exceptions\Bitrix24SecurityException
* @throws \Bitrix24\Exceptions\Bitrix24TokenIsExpiredException
* @throws \Bitrix24\Exceptions\Bitrix24TokenIsInvalidException
* @throws \Bitrix24\Exceptions\Bitrix24WrongClientException
*
*/
public function fields()
{
$fullResult = $this->client->call(
'crm.persontype.fields',
array()
);

return $fullResult;
}
}

0 comments on commit d450087

Please sign in to comment.