answear/mwl-pickup-point-bundle

API Client for MwlBundle

Installs: 1 121

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 2

Forks: 0

Open Issues: 0

Type:symfony-bundle

2.1.0 2025-06-30 10:47 UTC

This package is auto-updated.

Last update: 2025-07-01 09:57:13 UTC


README

 @@@@@@@@&  @@@@@@@@   @@@@@@@@  @@@   @@@   @@@  &@@@@@@@@  @@@@@@@@@   @@@@@@ 
@@@/   @@@  @@@   @@@ (@@   #@@  @@@   @@@   @@@  @@@    @@@ @@@   @@@* @@@     
@@@/   @@@  @@@   @@@  @@@@      @@@   @@@   @@@  @@@  @@@@  @@@   @@@* @@@     
@@@/   @@@  @@@   @@@     @@@@   @@@   @@@   @@@  @@@@@@     @@@   @@@* @@@     
@@@/   @@@  @@@   @@@ @@@   @@@@ @@@   @@@   @@@  @@@    @@@ @@@   @@@* @@@     
,@@@   @@@  @@@   @@@ @@@%  #@@@ @@@   @@@   @@@  @@@   @@@. @@@   @@@* @@@     
 %@@@@@@@@  @@@   @@@  /@@@@@@.   @@@@@@/@@@@@@    @@@@@@@    @@@@@@@@* @@@  @@@

MWL (Meest + Nova Poshta) pickup point bundle

MWL integration for Symfony.
Documentation of the API can be found here: https://documenter.getpostman.com/view/12823986/TzCTam5v

Installation

  • install with Composer
composer require answear/mwl-pickup-point-bundle

Answear\MwlBundle\AnswearMwlBundle::class => ['all' => true],
should be added automatically to your config/bundles.php file by Symfony Flex.

Setup

# config/packages/answear_mwl.yaml
answear_mwl:
    partnerKey: 'partner-key'
    secretKey: 'secret-key'

config will be passed to \Answear\MwlBundle\ConfigProvider class.

Usage

Get pickup points

use Answear\MwlBundle\Command\GetPickupPoints;
use Answear\MwlBundle\Request\GetPickupPointsRequest;

/** @var GetPickupPoints $getPickupPointsCommand */
$getPickupPointsResponse = $getPickupPointsCommand->getPickupPoints(new GetPickupPointsRequest());

Get pickup points by carriers and country codes

use Answear\MwlBundle\Command\GetPickupPointsByCarriersAndCountryCodes;
use Answear\MwlBundle\Enum\CarrierEnum;
use Answear\MwlBundle\Enum\CountryCodeEnum;
use Answear\MwlBundle\Request\GetPickupPointsByCarriersAndCountryCodesRequest;
use Answear\MwlBundle\Request\Struct\CarrierAndCountryCode;

$requestData = [
    new CarrierAndCountryCode(
        CarrierEnum::Meest,
        CountryCodeEnum::Ukraine
    ),
]

/** @var GetPickupPointsByCarriersAndCountryCodes $getPickupPointsCommand */
$getPickupPointsResponse = $getPickupPointsCommand->getPickupPointsByCarriersAndCountryCodesRequest(
    new GetPickupPointsByCarriersAndCountryCodesRequest($requestData)
);

Get cities

use Answear\MwlBundle\Command\GetCities;
use Answear\MwlBundle\Request\GetCitiesRequest;

/** @var GetCities $getCitiesCommand */
$getCitiesResponse = $getCitiesCommand->getCities(new GetCitiesRequest());

Final notes

Feel free to open pull requests with new features, improvements or bug fixes. The Answear team will be grateful for any comments.