2021-12-20 11:41:41 +03:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace datasets;
|
|
|
|
|
2022-01-10 12:53:00 +03:00
|
|
|
/**
|
2022-09-30 17:50:15 +03:00
|
|
|
* PHP version 7.0
|
2022-01-10 12:53:00 +03:00
|
|
|
*
|
|
|
|
* Class DataBaseRetailCrm - Data set for WC_Retailcrm_Base.
|
|
|
|
*
|
|
|
|
* @category Integration
|
|
|
|
* @author RetailCRM <integration@retailcrm.ru>
|
|
|
|
* @license http://retailcrm.ru Proprietary
|
|
|
|
* @link http://retailcrm.ru
|
|
|
|
* @see http://help.retailcrm.ru
|
|
|
|
*/
|
2021-12-20 11:41:41 +03:00
|
|
|
class DataBaseRetailCrm
|
|
|
|
{
|
2022-11-25 12:17:22 +03:00
|
|
|
public static function getResponseCustomFields()
|
|
|
|
{
|
|
|
|
return [
|
|
|
|
'success' => true,
|
|
|
|
'customFields' => [
|
|
|
|
[
|
|
|
|
'name' => 'Test_Upload',
|
|
|
|
'code' => 'test_upload',
|
|
|
|
],
|
|
|
|
[
|
|
|
|
'name' => 'test123',
|
|
|
|
'code' => 'test',
|
|
|
|
],
|
|
|
|
]
|
|
|
|
];
|
|
|
|
}
|
|
|
|
|
2021-12-20 11:41:41 +03:00
|
|
|
public static function getResponseStatuses()
|
|
|
|
{
|
2022-05-05 18:09:54 +03:00
|
|
|
return [
|
2021-12-20 11:41:41 +03:00
|
|
|
'success' => true,
|
2022-05-05 18:09:54 +03:00
|
|
|
'statuses' => [
|
|
|
|
[
|
2021-12-20 11:41:41 +03:00
|
|
|
'name' => 'status1',
|
|
|
|
'code' => 'status1',
|
|
|
|
'active' => true
|
2022-05-05 18:09:54 +03:00
|
|
|
],
|
|
|
|
[
|
2021-12-20 11:41:41 +03:00
|
|
|
'name' => 'status2',
|
|
|
|
'code' => 'status2',
|
|
|
|
'active' => false
|
2022-05-05 18:09:54 +03:00
|
|
|
]
|
|
|
|
]
|
|
|
|
];
|
2021-12-20 11:41:41 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
public static function getResponsePaymentTypes()
|
|
|
|
{
|
2022-05-05 18:09:54 +03:00
|
|
|
return [
|
2021-12-20 11:41:41 +03:00
|
|
|
'success' => true,
|
2022-05-05 18:09:54 +03:00
|
|
|
'paymentTypes' => [
|
|
|
|
[
|
2021-12-20 11:41:41 +03:00
|
|
|
'name' => 'payment1',
|
|
|
|
'code' => 'payment1',
|
|
|
|
'active' => true
|
2022-05-05 18:09:54 +03:00
|
|
|
],
|
|
|
|
[
|
2021-12-20 11:41:41 +03:00
|
|
|
'name' => 'payment2',
|
|
|
|
'code' => 'payment2',
|
|
|
|
'active' => false
|
2022-05-05 18:09:54 +03:00
|
|
|
],
|
|
|
|
[
|
|
|
|
'name' => 'payment3',
|
|
|
|
'code' => 'payment3',
|
|
|
|
'integrationModule' => [
|
|
|
|
'name' => 'test',
|
|
|
|
'active' => true,
|
|
|
|
],
|
|
|
|
'active' => true
|
|
|
|
],
|
2023-05-29 18:46:09 +03:00
|
|
|
[
|
|
|
|
'name' => 'payment4',
|
|
|
|
'code' => 'payment4',
|
|
|
|
'active' => true,
|
|
|
|
'sites' => ['prestaShop']
|
|
|
|
],
|
|
|
|
[
|
|
|
|
'name' => 'payment5',
|
|
|
|
'code' => 'payment5',
|
|
|
|
'active' => true,
|
|
|
|
'sites' => ['woocommerce']
|
|
|
|
]
|
2022-05-05 18:09:54 +03:00
|
|
|
]
|
|
|
|
];
|
2021-12-20 11:41:41 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
public static function getResponseDeliveryTypes()
|
|
|
|
{
|
2022-05-05 18:09:54 +03:00
|
|
|
return [
|
2021-12-20 11:41:41 +03:00
|
|
|
'success' => true,
|
2022-05-05 18:09:54 +03:00
|
|
|
'deliveryTypes' => [
|
|
|
|
[
|
2021-12-20 11:41:41 +03:00
|
|
|
'name' => 'delivery1',
|
|
|
|
'code' => 'delivery1',
|
|
|
|
'active' => true
|
2022-05-05 18:09:54 +03:00
|
|
|
],
|
|
|
|
[
|
2021-12-20 11:41:41 +03:00
|
|
|
'name' => 'delivery2',
|
|
|
|
'code' => 'delivery2',
|
|
|
|
'active' => false
|
2023-05-29 18:46:09 +03:00
|
|
|
],
|
|
|
|
[
|
|
|
|
'name' => 'delivery3',
|
|
|
|
'code' => 'delivery3',
|
|
|
|
'active' => true,
|
|
|
|
'sites' => ['prestaShop']
|
|
|
|
],
|
|
|
|
[
|
|
|
|
'name' => 'delivery4',
|
|
|
|
'code' => 'delivery4',
|
|
|
|
'active' => true,
|
|
|
|
'sites' => ['woocommerce']
|
2022-05-05 18:09:54 +03:00
|
|
|
]
|
|
|
|
]
|
|
|
|
];
|
2021-12-20 11:41:41 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
public static function getResponseOrderMethods()
|
|
|
|
{
|
2022-05-05 18:09:54 +03:00
|
|
|
return [
|
2021-12-20 11:41:41 +03:00
|
|
|
'success' => true,
|
2022-05-05 18:09:54 +03:00
|
|
|
'orderMethods' => [
|
|
|
|
[
|
2021-12-20 11:41:41 +03:00
|
|
|
'name' => 'orderMethod1',
|
|
|
|
'code' => 'orderMethod1',
|
|
|
|
'active' => true
|
2022-05-05 18:09:54 +03:00
|
|
|
],
|
|
|
|
[
|
2021-12-20 11:41:41 +03:00
|
|
|
'name' => 'orderMethod2',
|
|
|
|
'code' => 'orderMethod2',
|
|
|
|
'active' => false
|
2022-05-05 18:09:54 +03:00
|
|
|
]
|
|
|
|
]
|
|
|
|
];
|
2021-12-20 11:41:41 +03:00
|
|
|
}
|
2023-07-06 13:43:54 +03:00
|
|
|
|
|
|
|
public static function getResponseStoreList()
|
|
|
|
{
|
|
|
|
return [
|
|
|
|
'success' => true,
|
|
|
|
'stores' => [
|
|
|
|
[
|
|
|
|
'name' => 'main',
|
|
|
|
'code' => 'main',
|
|
|
|
'active' => true
|
|
|
|
],
|
|
|
|
[
|
|
|
|
'name' => 'woocommerce',
|
|
|
|
'code' => 'woocommerce',
|
|
|
|
'active' => true
|
|
|
|
],
|
|
|
|
[
|
|
|
|
'name' => 'prestashop',
|
|
|
|
'code' => 'prestashop',
|
|
|
|
'active' => true
|
|
|
|
]
|
|
|
|
]
|
|
|
|
];
|
|
|
|
}
|
2023-10-03 15:18:09 +03:00
|
|
|
|
|
|
|
public static function getResponseSitesList()
|
|
|
|
{
|
|
|
|
return [
|
|
|
|
'success' => true,
|
|
|
|
'sites' => ['woocommerce' => ['currency' => 'RUB']],
|
|
|
|
];
|
|
|
|
}
|
2022-05-05 18:09:54 +03:00
|
|
|
}
|