This repository has been archived by the owner on Apr 18, 2023. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 4
Examples
Evgen Kytonin edited this page Apr 5, 2021
·
18 revisions
Страница описывает примеры использование библиотеки Justin API
include_once 'vendor/autoload.php';
use Justin\Justin;
$justin = new Justin('RU', true);
$justin->setLogin('Ваш логин')->setPassword('Ваш пароль');
print_r(
$justin->listRegions()->getRaw()
);
include_once 'vendor/autoload.php';
use Justin\Justin;
$justin = new Justin('RU', true);
$justin->setLogin('Ваш логин')->setPassword('Ваш пароль');
print_r(
$justin->listRegions()->getData()
);
include_once 'vendor/autoload.php';
use Justin\Justin;
$justin = new Justin('RU', true);
$justin->setLogin('Ваш логин')->setPassword('Ваш пароль');
print_r(
$justin->listRegions()->getStatus()
);
include_once 'vendor/autoload.php';
use Justin\Justin;
$justin = new Justin('RU', true);
$justin->setLogin('Ваш логин')->setPassword('Ваш пароль');
print_r(
$justin->listRegions()->getResult()
);
include_once 'vendor/autoload.php';
use Justin\Justin;
$justin = new Justin('RU', true);
$justin->setLogin('Ваш логин')->setPassword('Ваш пароль');
print_r(
$justin->listRegions()->getError()
);
include_once 'vendor/autoload.php';
use Justin\Justin;
$justin = new Justin('RU', true);
$justin->setLogin('Ваш логин')->setPassword('Ваш пароль');
print_r(
$justin->listRegions()->getErrors()
);
include_once 'vendor/autoload.php';
use Justin\Justin;
$justin = new Justin('RU', true);
$justin->setLogin('Ваш логин')->setPassword('Ваш пароль');
print_r(
$justin->listRegions()->getMessage()
);
include_once 'vendor/autoload.php';
use Justin\Justin;
$justin = new Justin('RU', true);
$justin->setLogin('Ваш логин')->setPassword('Ваш пароль');
print_r(
$justin->listRegions()->totalRecords()
);
include_once 'vendor/autoload.php';
use Justin\Justin;
$justin = new Justin('RU', true);
$justin->setLogin('Ваш логин')->setPassword('Ваш пароль');
print_r(
$justin->listRegions()->fields()
);
include_once 'vendor/autoload.php';
use Justin\Justin;
$justin = new Justin('RU', true);
$justin->setLogin('Ваш логин')->setPassword('Ваш пароль');
print_r(
$justin->listRegions()->fields()->first()
);
include_once 'vendor/autoload.php';
use Justin\Justin;
$justin = new Justin('RU', true);
$justin->setLogin('Ваш логин')->setPassword('Ваш пароль');
print_r(
$justin->listRegions()->fields()->last()
);
include_once 'vendor/autoload.php';
use Justin\Justin;
$justin = new Justin('RU', true);
$justin->setLogin('Ваш логин')->setPassword('Ваш пароль');
print_r(
$justin->listDepartmentsLang()->fields()->typeDepart()
);
include_once 'vendor/autoload.php';
use Justin\Justin;
$justin = new Justin('RU', true);
$justin->setLogin('Ваш логин')->setPassword('Ваш пароль');
print_r(
$justin->listDepartmentsLang()->fields()->areaRegion()
);
include_once 'vendor/autoload.php';
use Justin\Justin;
$justin = new Justin('RU', true);
$justin->setLogin('Ваш логин')->setPassword('Ваш пароль');
print_r(
$justin->listDepartmentsLang()->fields()->street()
);
include_once 'vendor/autoload.php';
use Justin\Justin;
$justin = new Justin('RU', true);
$justin->setLogin('Ваш логин')->setPassword('Ваш пароль');
print_r(
$justin->name('login')->equal('Ваш логин')->keySeller()->fields()->counterpart()
);
include_once 'vendor/autoload.php';
use Justin\Justin;
$justin = new Justin('RU', true);
$justin->setLogin('Ваш логин')->setPassword('Ваш пароль');
$justin->setKey('Ваш ключ API');
print_r(
$justin->name('orderNumber')->equal('ИД заказа
')->getStatusHistoryF()->fields()->order()
// $justin
// ->name('orderNumber')
// ->like('201810165')
// ->name('TTN')
// ->equal('75106031300725001')
// ->getStatusHistoryF()
// ->getRaw()
);
include_once 'vendor/autoload.php';
use Justin\Justin;
$justin = new Justin('RU', true);
$justin->setLogin('Ваш логин')->setPassword('Ваш пароль');
print_r(
$justin->name('orderNumber')->equal('ИД заказа
')->getStatusHistory()->fields()->order()
);
include_once 'vendor/autoload.php';
use Justin\Justin;
$justin = new Justin('RU', true);
$justin->setLogin('Ваш логин')->setPassword('Ваш пароль');
print_r(
$justin->name('orderNumber')->equal('ИД заказа
')->getStatusHistory()->fields()->statusOrder()
);
include_once 'vendor/autoload.php';
use Justin\Justin;
$justin = new Justin('RU', true);
$justin->setLogin('Ваш логин')->setPassword('Ваш пароль');
$justin->setKey('Ваш ключ API');
print_r(
$justin->name('orderNumber')->equal('ИД заказа
')->getStatusHistoryF()->fields()->senderID()
);
include_once 'vendor/autoload.php';
use Justin\Justin;
$justin = new Justin('RU', true);
$justin->setLogin('Ваш логин')->setPassword('Ваш пароль');
$justin->setKey('Ваш ключ API');
print_r(
$justin->name('orderNumber')->equal('ИД заказа
')->getStatusHistoryF()->fields()->senderID()->getUUID()
);
include_once 'vendor/autoload.php';
use Justin\Justin;
$justin = new Justin('RU', true);
$justin->setLogin('Ваш логин')->setPassword('Ваш пароль');
print_r(
$justin->listRegions()->fields()->getUUID()
);
include_once 'vendor/autoload.php';
use Justin\Justin;
$justin = new Justin('RU', true);
$justin->setLogin('Ваш логин')->setPassword('Ваш пароль');
print_r(
$justin->listCities()->fields()->getCode()
);
include_once 'vendor/autoload.php';
use Justin\Justin;
$justin = new Justin('RU', true);
$justin->setLogin('Ваш логин')->setPassword('Ваш пароль');
print_r(
$justin->listRegions()->fields()->getCode()
);
include_once 'vendor/autoload.php';
use Justin\Justin;
$justin = new Justin('RU', true);
$justin->setLogin('Ваш логин')->setPassword('Ваш пароль');
print_r(
$justin->listCities()->fields()->getDescr()
);
include_once 'vendor/autoload.php';
use Justin\Justin;
$justin = new Justin('RU', true);
$justin->setLogin('Ваш логин')->setPassword('Ваш пароль');
print_r(
$justin->listRegions()->fields()->getSCOATOU()
);
include_once 'vendor/autoload.php';
use Justin\Justin;
$justin = new Justin('RU', true);
$justin->setLogin('Ваш логин')->setPassword('Ваш пароль');
print_r(
$justin->listDepartmentsLang()->fields()->getSCOATOU('region')
// $justin->listDepartmentsLang()->fields()->getSCOATOU('city')
// $justin->listDepartmentsLang()->fields()->getSCOATOU('locality')
// $justin->listDepartmentsLang()->fields()->getSCOATOU('area')
);
include_once 'vendor/autoload.php';
use Justin\Justin;
$justin = new Justin('RU', true);
$justin->setLogin('Ваш логин')->setPassword('Ваш пароль');
print_r(
$justin->listDepartmentsLang()->fields()->getRegionSCOATOU()
);
include_once 'vendor/autoload.php';
use Justin\Justin;
$justin = new Justin('RU', true);
$justin->setLogin('Ваш логин')->setPassword('Ваш пароль');
print_r(
$justin->listDepartmentsLang()->fields()->getCitySCOATOU()
);
include_once 'vendor/autoload.php';
use Justin\Justin;
$justin = new Justin('RU', true);
$justin->setLogin('Ваш логин')->setPassword('Ваш пароль');
print_r(
$justin->listDepartmentsLang()->fields()->getLocalitySCOATOU()
);
include_once 'vendor/autoload.php';
use Justin\Justin;
$justin = new Justin('RU', true);
$justin->setLogin('Ваш логин')->setPassword('Ваш пароль');
print_r(
$justin->listDepartmentsLang()->fields()->getAreaRegionSCOATOU()
);
include_once 'vendor/autoload.php';
use Justin\Justin;
$justin = new Justin('RU', true);
$justin->setLogin('Ваш логин')->setPassword('Ваш пароль');
print_r(
$justin->listDepartments()->fields()->city()->getType()
);
include_once 'vendor/autoload.php';
use Justin\Justin;
$justin = new Justin('RU', true);
$justin->setLogin('Ваш логин')->setPassword('Ваш пароль');
print_r(
$justin->listCities()->fields()->owner()->geType()
);
include_once 'vendor/autoload.php';
use Justin\Justin;
$justin = new Justin('RU', true);
$justin->setLogin('Ваш логин')->setPassword('Ваш пароль');
print_r(
$justin->listDepartments()->fields()->branchID()
);
include_once 'vendor/autoload.php';
use Justin\Justin;
$justin = new Justin('RU', true);
$justin->setLogin('Ваш логин')->setPassword('Ваш пароль');
print_r(
$justin->listDepartments()->fields()->getAddress()
);
include_once 'vendor/autoload.php';
use Justin\Justin;
$justin = new Justin('RU', true);
$justin->setLogin('Ваш логин')->setPassword('Ваш пароль');
print_r(
$justin->listDepartments()->fields()->getPosition()
);
include_once 'vendor/autoload.php';
use Justin\Justin;
$justin = new Justin('RU', true);
$justin->setLogin('Ваш логин')->setPassword('Ваш пароль');
print_r(
$justin->listDepartments()->fields()->getWeightLimit()
);
include_once 'vendor/autoload.php';
use Justin\Justin;
$justin = new Justin('RU', true);
$justin->setLogin('Ваш логин')->setPassword('Ваш пароль');
print_r(
$justin->listDepartments()->fields()->getQuereVisit()
);
include_once 'vendor/autoload.php';
use Justin\Justin;
$justin = new Justin('RU', true);
$justin->setLogin('Ваш логин')->setPassword('Ваш пароль');
print_r(
$justin->listDepartments()->fields()->getAgent()
);
include_once 'vendor/autoload.php';
use Justin\Justin;
$justin = new Justin('RU', true);
$justin->setLogin('Ваш логин')->setPassword('Ваш пароль');
print_r(
$justin->listDepartments()->fields()->getPayCard()
);
include_once 'vendor/autoload.php';
use Justin\Justin;
$justin = new Justin('RU', true);
$justin->setLogin('Ваш логин')->setPassword('Ваш пароль');
print_r(
$justin->listDepartments()->fields()->getAcceptPay()
);
include_once 'vendor/autoload.php';
use Justin\Justin;
$justin = new Justin('RU', true);
$justin->setLogin('Ваш логин')->setPassword('Ваш пароль');
print_r(
$justin->listDepartments()->fields()->getPostmat()
);
include_once 'vendor/autoload.php';
use Justin\Justin;
$justin = new Justin('RU', true);
$justin->setLogin('Ваш логин')->setPassword('Ваш пароль');
print_r(
$justin->listDepartments()->fields()->getCodeHolding()
);
include_once 'vendor/autoload.php';
use Justin\Justin;
$justin = new Justin('RU', true);
$justin->setLogin('Ваш логин')->setPassword('Ваш пароль');
print_r(
$justin->listDepartments()->fields()->getShedulerID()
);
include_once 'vendor/autoload.php';
use Justin\Justin;
$justin = new Justin('RU', true);
$justin->setLogin('Ваш логин')->setPassword('Ваш пароль');
print_r(
$justin->listDepartments()->fields()->getID()
);
include_once 'vendor/autoload.php';
use Justin\Justin;
$justin = new Justin('RU', true);
$justin->setLogin('Ваш логин')->setPassword('Ваш пароль');
print_r(
$justin->listDepartmentsLang()->fields()->typeDepart()->getEnum()
);
include_once 'vendor/autoload.php';
use Justin\Justin;
$justin = new Justin('RU', true);
$justin->setLogin('Ваш логин')->setPassword('Ваш пароль');
print_r(
$justin->listDepartmentsLang()->fields()->typeDepart()->getValue()
);
include_once 'vendor/autoload.php';
use Justin\Justin;
$justin = new Justin('RU', true);
$justin->setLogin('Ваш логин')->setPassword('Ваш пароль');
print_r(
$justin->listDepartmentsLang()->fields()->getDepartNumber()
);
include_once 'vendor/autoload.php';
use Justin\Justin;
$justin = new Justin('RU', true);
$justin->setLogin('Ваш логин')->setPassword('Ваш пароль');
print_r(
$justin->listDepartmentsLang()->fields()->getHouseNumber()
);
include_once 'vendor/autoload.php';
use Justin\Justin;
$justin = new Justin('RU', true);
$justin->setLogin('Ваш логин')->setPassword('Ваш пароль');
print_r(
$justin->name('login')->equal('Ваш логин')->keySeller()->fields()->getLogin()
);
include_once 'vendor/autoload.php';
use Justin\Justin;
$justin = new Justin('RU', true);
$justin->setLogin('Ваш логин')->setPassword('Ваш пароль');
print_r(
$justin->name('orderNumber')->equal('ИД заказа')->getStatusHistory()->fields()->getStatusDate()
);
include_once 'vendor/autoload.php';
use Justin\Justin;
$justin = new Justin('RU', true);
$justin->setLogin('Ваш логин')->setPassword('Ваш пароль');
print_r(
$justin->name('orderNumber')->equal('ИД заказа')->getStatusHistory()->fields()->getOrderNumber()
);
include_once 'vendor/autoload.php';
use Justin\Justin;
$justin = new Justin('RU', true);
$justin->setLogin('Ваш логин')->setPassword('Ваш пароль');
print_r(
$justin->name('orderNumber')->equal('ИД заказа')->getStatusHistory()->fields()->getClientNumber()
);
include_once 'vendor/autoload.php';
use Justin\Justin;
$justin = new Justin('RU', true);
$justin->setLogin('Ваш логин')->setPassword('Ваш пароль');
print_r(
$justin->name('orderNumber')->equal('ИД заказа')->getStatusHistory()->fields()->getTTN()
);
include_once 'vendor/autoload.php';
use Justin\Justin;
$justin = new Justin('RU', true);
$justin->setLogin('Ваш логин')->setPassword('Ваш пароль');
print_r(
$justin->name('orderNumber')->equal('ИД заказа')->getStatusHistory()->fields()->getDDepartment()
);
include_once 'vendor/autoload.php';
use Justin\Justin;
$justin = new Justin('RU', true);
$justin->setLogin('Ваш логин')->setPassword('Ваш пароль');
print_r(
$justin->name('orderNumber')->equal('ИД заказа')->getStatusHistory()->fields()->getADepartment()
);
include_once 'vendor/autoload.php';
use Justin\Order;
$order = new Order('RU', true);
$order = ...
print_r(
$order->fields()->ttn()
);
include_once 'vendor/autoload.php';
use Justin\Order;
$order = new Order('RU', true);
$order = ...
print_r(
$order->fields()->number()
);
include_once 'vendor/autoload.php';
use Justin\Justin;
$justin = new Justin('RU', true);
$justin->setLogin('Ваш логин')->setPassword('Ваш пароль');
print_r(
$justin->name('Depart')->equal('1a4df005-5d8d-11e8-80be-525400fb7782')->branchSchedule()->fields()->data()
// $justin->name('Depart')->equal('1a4df005-5d8d-11e8-80be-525400fb7782')->branchSchedule()->fields()->startWork()
// $justin->name('Depart')->equal('1a4df005-5d8d-11e8-80be-525400fb7782')->branchSchedule()->fields()->workDay()
);
use Justin\Justin;
include_once 'vendor/autoload.php';
$justin = new Justin('RU', true);
$justin->setKey('Ваш ключ');
print_r(
$justin->listOrders('20190410')->fields()->numberEN()
// $justin->listOrders('20190410')->fields()->numberKIS()
// $justin->listOrders('20190410')->fields()->numberTTN()
// $justin->listOrders('20190410')->fields()->sender()
// $justin->listOrders('20190410')->fields()->receiver()
// $justin->listOrders('20190410')->fields()->phoneSender()
// $justin->listOrders('20190410')->fields()->phoneReceiver()
// $justin->listOrders('20190410')->fields()->dateStatus()
// $justin->listOrders('20190410')->fields()->statusUUID()
);
use Justin\Justin;
include_once 'vendor/autoload.php';
$justin = new Justin('RU', true);
$justin->setKey('Ваш ключ');
print_r(
$justin->orderInfo('5093')->fields()->senderCity()
// $justin->orderInfo('5093')->fields()->senderCompany()
// $justin->orderInfo('5093')->fields()->addressPickup()
// $justin->orderInfo('5093')->fields()->requirePickup()
// $justin->orderInfo('5093')->fields()->senderBranch()
// $justin->orderInfo('5093')->fields()->receiverContact()
// $justin->orderInfo('5093')->fields()->countPlace()
// $justin->orderInfo('5093')->fields()->volume()
// $justin->orderInfo('5093')->fields()->weight()
// $justin->orderInfo('5093')->fields()->costDeclared()
// $justin->orderInfo('5093')->fields()->deliveryAmount()
// $justin->orderInfo('5093')->fields()->redeliveryAmount()
// $justin->orderInfo('5093')->fields()->orderAmount()
// $justin->orderInfo('5093')->fields()->redeliveryPay()
// $justin->orderInfo('5093')->fields()->redeliveryPayer()
// $justin->orderInfo('5093')->fields()->deliveryPay()
// $justin->orderInfo('5093')->fields()->deliveryPayer()
// $justin->orderInfo('5093')->fields()->orderPay()
// $justin->orderInfo('5093')->fields()->deliveryType()
// $justin->orderInfo('5093')->fields()->codType()
// $justin->orderInfo('5093')->fields()->cardNumber()
// $justin->orderInfo('5093')->fields()->cargoList()->marking()
// $justin->orderInfo('5093')->fields()->cargoList()->width()
// $justin->orderInfo('5093')->fields()->cargoList()->height()
// $justin->orderInfo('5093')->fields()->cargoList()->depth()
// $justin->orderInfo('5093')->fields()->addDescription()
);
include_once 'vendor/autoload.php';
use Justin\Justin;
$justin = new Justin('RU', true);
$justin->setLogin('Ваш логин')->setPassword('Ваш пароль');
print_r(
$justin->branchTypes()->fields()->description()
);
include_once 'vendor/autoload.php';
use Justin\Justin;
$justin = new Justin('RU', true);
$justin->setLogin('Ваш логин')->setPassword('Ваш пароль');
print_r(
$justin->filter(
[
'name' => 'descr',
'comparison' => 'equal',
'leftValue' => 'Одесская',
]
)->listRegions()->getRaw()
);
include_once 'vendor/autoload.php';
use Justin\Justin;
$justin = new Justin('RU', true);
$justin->setLogin('Ваш логин')->setPassword('Ваш пароль');
print_r(
$justin->limit(1)->listRegions()->getRaw()
);
include_once 'vendor/autoload.php';
use Justin\Justin;
$justin = new Justin('RU', true);
$justin->setLogin('Ваш логин')->setPassword('Ваш пароль');
print_r(
$justin->name('descr')->leftValue('Одесская')->equal()->listRegions()->getRaw()
);
include_once 'vendor/autoload.php';
use Justin\Justin;
$justin = new Justin('RU', true);
$justin->setLogin('Ваш логин')->setPassword('Ваш пароль');
print_r(
$justin->name('descr')->equal('Одесская')->listRegions()->getRaw()
);
include_once 'vendor/autoload.php';
use Justin\Justin;
$justin = new Justin('RU', true);
$justin->setLogin('Ваш логин')->setPassword('Ваш пароль');
print_r(
$justin->name('descr')->not('Одесская')->listRegions()->getRaw()
);
include_once 'vendor/autoload.php';
use Justin\Justin;
$justin = new Justin('RU', true);
$justin->setLogin('Ваш логин')->setPassword('Ваш пароль');
print_r(
$justin->name('code')->less('000000008')->listRegions()->getRaw()
);
include_once 'vendor/autoload.php';
use Justin\Justin;
$justin = new Justin('RU', true);
$justin->setLogin('Ваш логин')->setPassword('Ваш пароль');
print_r(
$justin->name('code')->more('000000008')->listRegions()->getRaw()
);
include_once 'vendor/autoload.php';
use Justin\Justin;
$justin = new Justin('RU', true);
$justin->setLogin('Ваш логин')->setPassword('Ваш пароль');
print_r(
$justin->name('code')->in(['000000008', '000000009'])->listRegions()->getRaw()
);
include_once 'vendor/autoload.php';
use Justin\Justin;
$justin = new Justin('RU', true);
$justin->setLogin('Ваш логин')->setPassword('Ваш пароль');
print_r(
$justin->name('code')->between(['000000008', '000000010'])->listRegions()->getRaw()
);
include_once 'vendor/autoload.php';
use Justin\Justin;
$justin = new Justin('RU', true);
$justin->setLogin('Ваш логин')->setPassword('Ваш пароль');
print_r(
$justin->name('code')->notIn(['000000008', '000000010'])->listRegions()->getRaw()
);
include_once 'vendor/autoload.php';
use Justin\Justin;
$justin = new Justin('RU', true);
$justin->setLogin('Ваш логин')->setPassword('Ваш пароль');
print_r(
$justin->name('code')->lessEqual('000000010')->listRegions()->getRaw()
);
include_once 'vendor/autoload.php';
use Justin\Justin;
$justin = new Justin('RU', true);
$justin->setLogin('Ваш логин')->setPassword('Ваш пароль');
print_r(
$justin->name('code')->moreEqual('000000010')->listRegions()->getRaw()
);
include_once 'vendor/autoload.php';
use Justin\Justin;
$justin = new Justin('RU', true);
$justin->setLogin('Ваш логин')->setPassword('Ваш пароль');
print_r(
$justin->name('descr')->like('Одес')->listRegions()->getRaw()
);
include_once 'vendor/autoload.php';
use Justin\Justin;
$order = new Justin('RU', true);
$order->setKey('Ваш ключ API');
$newOrder = $order
->setNumber('52525')
->setDate()
->senderCityID(
'32b69b95-9018-11e8-80c1-525400fb7782'
)
->sender('ТОП ПРОДАЦЕЦ')
->senderContact('Иванов Иван')
->senderPhone('380524152299')
->addressReceipt('ул. Груша. 7')
->requirePickup(true)
->senderBranchID(
'2100102032'
)
->receiver('ТОВ Укрпочта')
->receiverContact('Петр 1')
->receiverPhone('380425831259')
->countPlace(1)
->receiverBranchID(
'2100108028'
)
->volume('0.02')
->weight('100')
->costDeclared(1500)
->deliveryAmount(0)
->redeliveryAmount(1500)
->orderAmount(1500)
->redeliveryPay(true)
->redeliveryPayer(1)
->deliveryPay(true)
->deliveryPayer(1)
->requireDelivery(false)
->orderPay(true)
->comment('Тест заказ')
->createOrder();
print_r(
$newOrder->fields()->number()
// $newOrder->fields()->ttn()
// $newOrder->getData()
// $newOrder->getResult()
// $newOrder->getRaw()
);
include_once 'vendor/autoload.php';
use Justin\Justin;
$order = new Justin('RU', true);
$order->setKey('Ваш ключ API');
$newOrder = $order->createOrder(
[
'number' => '123456',
'date' => '20171221',
'sender_city_id' => '32b69b95-9018-11e8-80c1-525400fb7782',
'sender_company' => 'УА ТОВ',
'sender_contact' => 'Петрова Ирина',
'sender_phone' => '+380991112233',
'sender_pick_up_address' => 'Степана Бандери, No 6',
'pick_up_is_required' => true,
'sender_branch' => '2100102032',
'receiver' => 'Петров Сергей',
'receiver_contact' => '',
'receiver_phone' => 'Петров Сергей',
'count_cargo_places' => 2,
'branch' => '2100108028',
'weight' => 0.1,
'volume' => 0.02,
'declared_cost' => 1500,
'delivery_amount' => 0,
'redelivery_amount' => 1500,
'order_amount' => 1500,
'redelivery_payment_is_required' => true,
'redelivery_payment_payer' => 1,
'delivery_payment_is_required' => true,
'delivery_payment_payer' => 1,
'delivery_is_required' => false,
'order_payment_is_required' => true,
'add_description' => 'Тест API'
]
);
print_r(
$newOrder->fields()->number()
// $newOrder->fields()->ttn()
// $newOrder->getData()
// $newOrder->getResult()
// $newOrder->getRaw()
);
$order = new Justin('RU', true);
$cargoList = $order
->cargoMarking('1')
->cargoWeight('1')
->cargoWidth('10')
->cargoHeight('15')
->cargoDepth('20')
->addCargo();
$order->cargoList()->createOrder();
include_once 'vendor/autoload.php';
use Justin\Justin;
use Justin\Exceptions\JustinApiException;
use Justin\Exceptions\JustinDataException;
use Justin\Exceptions\JustinFileException;
use Justin\Exceptions\JustinHttpException;
use Justin\Exceptions\JustinResponseException;
use Justin\Exceptions\JustinAuthException;
$justin = new Justin('RU', true);
$justin->setLogin('Ваш логин')->setPassword('Ваш пароль');
try {
$justin->name('code')->equal('25')->listRegions()
} catch (JustinApiException $exception) {
print_r(
$exception->getResponse()
);
} catch (JustinDataException $exception) {
print_r(
$exception->getResponse()
);
} catch (JustinResponseException $exception) {
print_r(
$exception->getResponse()
);
echo "\n";
print_r(
$exception->getRequest()
);
} catch (JustinHttpException $exception) {
print_r(
$exception->getResponse()
);
} catch (JustinFileException $exception) {
print_r(
$exception->getResponse()
);
} catch (JustinAuthException $exception) {
print_r(
$exception->getResponse()
);
}