Code Monkey home page Code Monkey logo

intime3's Introduction

Описание

Latest Stable Version Total Downloads License

PHP класс для работы с почтой Intime

Документация

Інструкція по інтеграції з веб- сервісами Ін-Тайм. API 3.0

Требование

  • PHP не ниже 5.6
  • Composer

Composer

composer require jackmartin/api3intime

Библиотеки

  1. Soap-Guzzle

Методы API

  1. Настройка подключения
  2. Получить список стран
  3. Получить информацию о стране по ID
  4. Получить список областей
  5. Получить информацию о областе по ID
  6. Получить список областей по фильтру
  7. Получить список районов
  8. Получить информацию о районе по ID
  9. Получить список районов по фильтру
  10. Получение список населенных пунктов
  11. Получить информацию о населенным пункте по ID
  12. Получить список населенных пунктов по фильтру
  13. Получение список складов / почтоматов
  14. Получить информацию о складе / почтомате по ID
  15. Получить список складов / почтоматов по фильтру
  16. Получить список описаний груза
  17. Получить описание груза по ID
  18. Получить список упаковок
  19. Получить упаковку по ID
  20. Создать заявку ТТН
  21. Получить список графика работы складов
  22. Получить график работы склада по ID
  23. Получить список историй ТТН
  24. Получить информацию ТТН

Пример

__construct()

use InTime\InTime3;

include_once 'vendor/autoload.php';

$intime = new InTime3('API_KEY');
// $intime = new InTime3('API_KEY', true, false, 30, 30);
// $intime = new InTime3('API_KEY', true, false);

get_country_list()

use InTime\InTime3;

include_once 'vendor/autoload.php';

$intime = new InTime3('API_KEY');
//$intime = new InTime3('API_KEY', false); print data stdclass format 
//$intime = new InTime3('API_KEY', false, true); debug mode

print_r($intime->get_country_list());
//{"Entry_get_country_by_id":[{"id":"213","name_ua":"УЕЛЬС","name_en":"WALES","name_ru":"УЭЛЬС","short_name_ua":"УЕЛЬС","short_name_en":"WALES","short_name_ru":"УЭЛЬС","code":"000000213","last_change":"2017-08-30T21:04:00.000+03:00","status":"1"},{"id":"214","name_ua":"УЗБЕКИСТАН","name_en":"UZBEKISTAN","name_ru":"УЗБЕКИСТАН","short_name_ua":"УЗБЕКИСТАН","short_name_en":"UZBEKISTAN","short_name_ru":"УЗБЕКИСТАН","code":"000000214","last_change":"2017-05-11T21:10:00.000+03:00","status":"1"}

get_country_id($id)

use InTime\InTime3;

include_once 'vendor/autoload.php';

$intime = new InTime3('API_KEY');

print_r($intime->get_country_id(213));

get_area_list()

use InTime\InTime3;

include_once 'vendor/autoload.php';

$intime = new InTime3('API_KEY');

print_r($intime->get_area_list());

get_area_id($id)

use InTime\InTime3;

include_once 'vendor/autoload.php';

$intime = new InTime3('API_KEY');

print_r($intime->get_area_id(1));

get_area_filter($data = array())

use InTime\InTime3;

include_once 'vendor/autoload.php';

$intime = new InTime3('API_KEY');

print_r($intime->get_area_filter(array(

    // 'id'        => 1,
    'area_name' => 'В',
    // 'country_id' => '215',

)));

get_district_list()

use InTime\InTime3;

include_once 'vendor/autoload.php';

$intime = new InTime3('API_KEY');

print_r($intime->get_district_list());

get_district_id($id)

use InTime\InTime3;

include_once 'vendor/autoload.php';

$intime = new InTime3('API_KEY');

print_r($intime->get_district_id(241));

get_district_filter($data = array())

use InTime\InTime3;

include_once 'vendor/autoload.php';

$intime = new InTime3('API_KEY');

print_r($intime->get_district_filter(array(

    // 'id' => '241',
    // 'country_id' => '215',
    'district_name' => 'Бере',

)));

get_locality_list()

use InTime\InTime3;

include_once 'vendor/autoload.php';

$intime = new InTime3('API_key');

print_r($intime->get_locality_list());

get_locality_id($id)

use InTime\InTime3;

include_once 'vendor/autoload.php';

$intime = new InTime3('API_KEY');

print_r($intime->get_locality_id(100));

get_locality_filter($data = array())

use InTime\InTime3;

include_once 'vendor/autoload.php';

$intime = new InTime3('API_KEY');

print_r($intime->get_locality_filter(array(

    // 'id' => 328,
    // 'country_id' => 215,
    // 'area_id' => 14,
    'district_id' => 416,
    // 'locality_name' => 'Сково',

)));

get_branch_list()

use InTime\InTime3;

include_once 'vendor/autoload.php';

$intime = new InTime3('API_KEY');

print_r($intime->get_branch_list());

get_branch_id($id)

use InTime\InTime3;

include_once 'vendor/autoload.php';

$intime = new InTime3('API_KEY');

print_r($intime->get_branch_id(328));

get_branch_filter($data = array())

use InTime\InTime3;

include_once 'vendor/autoload.php';

$intime = new InTime3('API_KEY');

print_r($intime->get_branch_filter(array(

    // 'id' => 328,
    // 'country_id' => 215,
    // 'area_id' => 15,
    // 'district_id' => 40,
    // 'locality_id' => 39,
    'branch_name' => 'Воло',

)));

get_goods_desc_list()

use InTime\InTime3;

include_once 'vendor/autoload.php';

$intime = new InTime3('API_KEY');

print_r($intime->get_goods_desc_list());

get_goods_desc_id($id)

use InTime\InTime3;

include_once 'vendor/autoload.php';

$intime = new InTime3('API_KEY');

print_r($intime->get_goods_desc_list());

get_box_list()

use InTime\InTime3;

include_once 'vendor/autoload.php';

$intime = new InTime3('API_KEY');

print_r($intime->get_box_list());

get_box_id($id)

use InTime\InTime3;

include_once 'vendor/autoload.php';

$intime = new InTime3('API_KEY');

print_r($intime->get_box_id(50));

declaration_create($data = array())

use InTime\InTime3;

include_once 'vendor/autoload.php';

$intime = new InTime3('API_KEY');

print_r(

	$intime->declaration_create(

		[

			...

		]

	)

);

get_branch_work_list()

use InTime\InTime3;

include_once 'vendor/autoload.php';

$intime = new InTime3('API_KEY');

print_r($intime->get_branch_work_list());

get_branch_work_id($id)

use InTime\InTime3;

include_once 'vendor/autoload.php';

$intime = new InTime3('API_KEY');

print_r($intime->get_branch_work_id(200));

declStatus($number)

use InTime\InTime3;

include_once 'vendor/autoload.php';

$intime = new InTime3('API_KEY');

print_r($intime->declStatus('NUMBER_TTN'));

getTTN($number)

use InTime\InTime3;

include_once 'vendor/autoload.php';

$intime = new InTime3('API_KEY');

print_r($intime->getTTN('NUMBER_TTN'));

intime3's People

Contributors

martinjack avatar pashkinz92 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.