Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Overseas Bundle Laravel Package

answear/overseas-bundle

View on GitHub
Deep Wiki
Context7

Overseas pickup point bundle

Overseas integration for Symfony.
Documentation of the API can be found here: https://api.overseas.hr/apiinfo

Installation

  • install with Composer
composer require git@github.com:answear/overseas-bundle.git

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

Setup

  • provide required config data: environment and apiKey
# config/packages/answear_overseas.yaml
answear_overseas:
    environment: test|prod
    apiKey: yourApiKey
    logger: yourCustomLoggerService #default: null

Logger service must implement Psr\Log\LoggerInterface interface.

Usage

Get ParcelShops

@see https://api.overseas.hr/apiinfo#parcelshops

/** @var \Answear\OverseasBundle\Service\ParcelShopsService $parcelShopService **/
$parcelShopService->get();

will return \Answear\OverseasBundle\Response\DTO\ParcelShop[] array.

Get Places

@see https://api.overseas.hr/apiinfo#places

$zipCode = 12345;
$name = 'name';
$approx = true;

/** @var \Answear\OverseasBundle\Service\PlacesService $placesService **/
$placesService->get($zipCode, $name, $approx);

will return \Answear\OverseasBundle\Response\DTO\Place[] array narrowed down to params. or simply

$placesService->get();

to get all places.

Error handling

  • Answear\OverseasBundle\Exception\ServiceUnavailableException for all GuzzleException
  • MalformedResponseException for partner other errors
  • Answear\OverseasBundle\Exception\BadRequestException if validation failed or for error response

Final notes

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

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
codifyo/ts-generator-bundle
andydefer/laravel-cluster
testo/fiber
mintobit/jobqueue
a4sex/maintenance-bundle
a4sex/entity-date-update
a4sex/client-identifier
a4sex/base-utilites
a4sex/key-value-storage
a4sex/micro-status
chilldev/dependency-injection-extra
datinglibre/datinglibre-app-api
biberltd/corebundle
bricre/symfony-bundle-test
biberltd/logbundle
dominium/http-adapter-bundle
dominium/google-analytics
a4sex/auto-clean-entity
christhompsontldr/laravel-inky
spatie/mailcoach-vapor