mirror of
https://github.com/anthonyaxenov/atol-online.git
synced 2024-11-22 09:14:34 +00:00
Новые классы для работы со схемами
This commit is contained in:
parent
9ce4997699
commit
1061e1d3a7
@ -35,6 +35,7 @@
|
||||
"autoload": {
|
||||
"classmap": [
|
||||
"src/AtolOnline/Api/",
|
||||
"src/AtolOnline/Api/Schemas/",
|
||||
"src/AtolOnline/Exceptions/",
|
||||
"src/AtolOnline/Entities/",
|
||||
"src/AtolOnline/Traits/",
|
||||
|
15
src/AtolOnline/Api/Schemas/AtolSchema.php
Normal file
15
src/AtolOnline/Api/Schemas/AtolSchema.php
Normal file
@ -0,0 +1,15 @@
|
||||
<?php
|
||||
|
||||
namespace AtolOnline\Api;
|
||||
|
||||
abstract class AtolSchema
|
||||
{
|
||||
/**
|
||||
* @return mixed
|
||||
*/
|
||||
public static function get()
|
||||
{
|
||||
return static::$json
|
||||
?? static::$json = json_decode(file_get_contents(static::$URL));
|
||||
}
|
||||
}
|
17
src/AtolOnline/Api/Schemas/CorrectionSchema.php
Normal file
17
src/AtolOnline/Api/Schemas/CorrectionSchema.php
Normal file
@ -0,0 +1,17 @@
|
||||
<?php
|
||||
|
||||
namespace AtolOnline\Api;
|
||||
|
||||
class CorrectionSchema extends AtolSchema
|
||||
{
|
||||
/**
|
||||
* @var
|
||||
*/
|
||||
protected static $json;
|
||||
|
||||
/**
|
||||
* Адрес схемы
|
||||
*/
|
||||
protected static $URL = 'https://online.atol.ru/possystem/v4/schema/correction';
|
||||
|
||||
}
|
17
src/AtolOnline/Api/Schemas/SellSchema.php
Normal file
17
src/AtolOnline/Api/Schemas/SellSchema.php
Normal file
@ -0,0 +1,17 @@
|
||||
<?php
|
||||
|
||||
namespace AtolOnline\Api;
|
||||
|
||||
class SellSchema extends AtolSchema
|
||||
{
|
||||
/**
|
||||
* @var
|
||||
*/
|
||||
protected static $json;
|
||||
|
||||
/**
|
||||
* Адрес схемы
|
||||
*/
|
||||
protected static $URL = 'https://online.atol.ru/possystem/v4/schema/sell';
|
||||
|
||||
}
|
Loading…
Reference in New Issue
Block a user