meraproject/module/integration/bitrix24/model.php

79 lines
1.6 KiB
PHP
Raw Normal View History

<?php
namespace integration;
use integration\bitrix24\src\crest;
define("C_REST_CLIENT_ID",'local.5fe46ed9d816b8.11088541');
define("C_REST_CLIENT_SECRET",'Mp6aJ0wqRs5Ai78sM6SihV5FsgeFkTkcg5ZX26YktTW9oJfdSG');
//include __DIR__.'/src/crest.php';
class Bitrix24 {
static function crmCurrencyList(){
return CRest::call(
'crm.currency.list',
[]
);
}
static function crmLeadFields(){
return CRest::call(
'crm.lead.fields',
[]
);
}
static function crmDealFields(){
return CRest::call(
'crm.deal.fields',
[]
);
}
static function crmProductRowFields(){
return CRest::call(
'crm.productrow.fields',
[]
);
}
static function crmDealGet($id){
return CRest::call(
'crm.deal.get',
[
'id'=>$id
]
);
}
static function crmDealProductRowsGet($id){
return CRest::call(
'crm.deal.productrows.get',
[
'id'=>$id
]
);
}
static function fdatetime($x){
$h = date('H');
return date('Y-m-d').'T'.($h<10?'0':'').$h.date(':i:s').'+03:00';
}
static function test(){
$client_id = 'local.5fead9dae0df76.26701771';
$client_server = 'UzAKF55Ar3zTdzCiUXiOWtGmeYlNMQ306gwtfJ2T2FgRh4l30u';
}
static function installApp(){
CRest::installApp();
}
static function checkServer(){
CRest::checkServer();
}
}