floac/laravel-ukrpost is a Laravel package for ukrposhta api integration.
It currently has 0 GitHub stars and 64 downloads on Packagist (latest version 1.0.1).
Install it with composer require floac/laravel-ukrpost.
Discover more Laravel packages by floac
or browse all Laravel packages to compare alternatives.
Last updated
composer require floac/laravel-ukrpost
Доступний функціонал:
Отримання переліку областей
Floac\Ukrpost\Facades\Dictionary::regions(string $region_ua = null);
Отримання переліку районів
Floac\Ukrpost\Facades\Dictionary::districts(string $district_ua = null, int $region_id = null);
Отримання переліку населених пунктів
Floac\Ukrpost\Facades\Dictionary::cities(string $city_ua = null, int $district_id = null, int $region_id = null);
Отримання переліку вулиць
Floac\Ukrpost\Facades\Dictionary::streets(string $street_ua = null, int $city_id = null, int $district_id = null, int $region_id = null);
Отримання переліку будинків вулиць
Floac\Ukrpost\Facades\Dictionary::houses(int $street_id, string $housenumber = null);
Отримання інформації про поштове відділення
Floac\Ukrpost\Facades\Dictionary::postOffices(string $zip_code = null, int $street_id = null, int $city_id = null, int $district_id = null, int $region_id = null);
Отримання інформації про графік роботи поштового відділення
Floac\Ukrpost\Facades\Dictionary::postOfficesOpenHours(string $zip_code, int $post_office_id = null);
Отримання інформації про найближчі поштові відділення
Floac\Ukrpost\Facades\Dictionary::postOfficesByGeolocation(float $lat, float $long, int $maxdistance = 1);
Отримання інформації про населений пункт за індексом
Floac\Ukrpost\Facades\Dictionary::citiesByPostcode(string $postcode);
Отримання адресної інформації за індексом
Floac\Ukrpost\Facades\Dictionary::addressesByPostcode(string $postcode);
Створення адреси
$api = new Floac\Ukrpost\Document\Api(
'bearerToken',
'counterpartyToken'
);
$address = new Floac\Ukrpost\Document\Models\Address($api);
$address->set(
postcode: '07401',
country: 'UA',
region: 'Київська',
city: 'Бровари',
district: 'Київський',
street: 'Котляревського',
houseNumber: '12',
apartmentNumber: '33'
);
$address->save();
Створення клієнта
$api = new Floac\Ukrpost\Document\Api(
'bearerToken',
'counterpartyToken'
);
$client = new Client($api);
$client->set(
firstName: 'Олександр',
lastName: 'Петренко',
phone: 380663443224,
address: $address,
);
$client->save();
Створення відправки
$api = new Floac\Ukrpost\Document\Api(
'bearerToken',
'counterpartyToken'
);
$document = new Document($api);
$document->save($senderClient, $recipientClient, $parcel);