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

Atol Client Laravel Package

anripuankare/atol-client

View on GitHub
Deep Wiki
Context7

ATOL PHP Client

ATOL API v3/v4 client for PHP

https://online.atol.ru/

Build Status Scrutinizer Code Quality Code Coverage Build Status

Installation

Usage is as simple as

  1. Install library

    composer require anripuankare/atol-client
    
  2. Better to use this library with symfony: https://github.com/lamoda/atol-client-bundle

  3. But you can configure it manually (you will probably need some factory:

    <?php
    
    declare(strict_types=1);
    
    namespace Lamoda\AtolClient\Tests\Helper;
    
    use GuzzleHttp\ClientInterface;
    use JMS\Serializer\Serializer;
    use Lamoda\AtolClient\Converter\ObjectConverter;
    use Lamoda\AtolClient\V3\AtolApi as AtolApiV3;
    use Lamoda\AtolClient\V4\AtolApi as AtolApiV4;
    use Symfony\Component\Validator\Validation;
    use Symfony\Component\Validator\Validator\ValidatorInterface;
    
    final class AtolApiFactory
    {
    	/**
    	 * @deprecated  	
    	 */
    	public static function createV3(
    		ClientInterface $client,
    		array $options,
    		string $baseUrl,
    		string $groupCode
    	): AtolApiV3 {
    		$objectConvertor = new ObjectConverter(
    			self::createSerializer(),
    			self::createValidator()
    		);
    
    		return new AtolApiV3(
    			$objectConvertor,
    			$client,
    			$options,
    			$baseUrl,
    			$groupCode
    		);
    	}
    
    	public static function createV4(
    		ClientInterface $client,
    		array $options,
    		string $baseUrl
    	): AtolApiV4 {
    		$objectConvertor = new ObjectConverter(
    			self::createSerializer(),
    			self::createValidator()
    		);
    
    		return new AtolApiV4(
    			$objectConvertor,
    			$client,
    			$options,
    			$baseUrl
    		);
    	}
    
    	private static function createSerializer(): Serializer
    	{
    		return SerializerBuilder::create()->build();
    	}
    
    	private static function createValidator(): ValidatorInterface
    	{
    		return Validation::createValidatorBuilder()
    			->enableAnnotationMapping()
    			->getValidator();
    	}
    }
    
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.
terminal42/code-quality-tools
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