1
0
Fork 0
mirror of synced 2025-04-19 17:00:56 +00:00

Compare commits

..

16 commits

Author SHA1 Message Date
AlexBergal
b8f4cfa149
Lost Boolean params while Request signing (#10) 2021-07-09 13:44:23 +03:00
Alex Lushpai
f919a3a99f
Double filtering seems to be overkill 2021-07-09 11:22:37 +03:00
AlexBergal
9e601738ac
Double filtering will loose some params 2021-06-21 21:56:48 +07:00
Alex Lushpai
bd81c1d8fc
Merge pull request #9 from Neur0toxine/remove-incorrect-status
Remove incorrect status
2021-04-14 17:57:52 +03:00
fdac0ae49a Remove incorrect status 2021-04-14 17:55:21 +03:00
altqq885
0eff0e82a8
Product methods implementation
* aliexpress.solution.product.list.get
* aliexpress.solution.product.list.get
* aliexpress.solution.product.info.get (not all fields in response data)
* aliexpress.solution.batch.product.inventory.update
* aliexpress.solution.batch.product.price.update
2021-03-04 14:59:18 +03:00
Akolzin Dmitry
b0e69213da
deleted dependency by internal abstract class (#7)
Co-authored-by: Akolzin Dmitry <akolzin@retailcrm.ru>
2021-01-20 14:40:16 +03:00
8887145377
use PST timezone as default for all DateTime instances from AliExpress API (#6) 2020-12-31 13:59:03 +03:00
Alex Lushpai
1206a69bef
Validate AppData, easier client instantiation 2020-12-29 12:38:21 +03:00
Alex Lushpai
53ae13b180
Use PST instead of America/Los_Angeles
use PST instead of America/Los_Angeles
2020-12-29 12:37:39 +03:00
d4a3cf8d42 validate AppData, easier client instantiation for those who don't want to look into the complex inner logic 2020-12-28 17:49:26 +03:00
0179575dea use PST instead of America/Los_Angeles 2020-12-28 15:53:37 +03:00
Alex Lushpai
d13cf5f5ca
update product name, cleanup annotations (#3) 2020-12-15 13:28:59 +03:00
Akolzin Dmitry
927fefdc32
Move CI to Gihub Actions (#2) 2020-11-26 14:55:30 +03:00
Alex Lushpai
6e0559ab33
Update order statuses enum 2020-10-28 15:51:25 +03:00
9e810fc409 update order statuses enum 2020-10-28 14:05:04 +03:00
218 changed files with 1864 additions and 1550 deletions

34
.github/workflows/ci.yml vendored Normal file
View file

@ -0,0 +1,34 @@
name: ci
on:
push:
branches:
- '**'
tags-ignore:
- '*.*'
pull_request:
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
php-version: ['7.3', '7.4']
steps:
- uses: actions/checkout@v2
- name: Setup PHP ${{ matrix.php-version }}
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
coverage: pcov
- name: Composer cache
uses: actions/cache@v2
with:
path: ${{ env.HOME }}/.composer/cache
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
- name: Install dependencies
run: composer install -o
- name: Run tests
run: composer run-script ci
- name: Coverage
run: bash <(curl -s https://codecov.io/bash)

View file

@ -1,19 +0,0 @@
language: php
cache:
directories:
- $HOME/.composer/cache
php:
- '7.3'
- '7.4'
before_script:
- cp .env.dist .env
- flags="-o"
- composer install $flags
script: composer run-script ci
after_success:
- bash <(curl -s https://codecov.io/bash)

22
LICENSE
View file

@ -1,7 +1,21 @@
Copyright © 2020 RetailDriver
The MIT License (MIT)
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
Copyright (c) 2020 RetailDriver LLC
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE

View file

@ -1,31 +1,29 @@
[![Build Status](https://img.shields.io/travis/retailcrm/aliexpress-top-client/master.svg?style=flat-square)](https://travis-ci.org/retailcrm/aliexpress-top-client)
[![Coverage](https://img.shields.io/codecov/c/gh/retailcrm/aliexpress-top-client/master.svg?style=flat-square)](https://codecov.io/gh/retailcrm/aliexpress-top-client)
[![Latest stable](https://img.shields.io/packagist/v/retailcrm/aliexpress-top-client.svg?style=flat-square)](https://packagist.org/packages/retailcrm/aliexpress-top-client)
[![PHP from Packagist](https://img.shields.io/packagist/php-v/retailcrm/aliexpress-top-client.svg?style=flat-square)](https://packagist.org/packages/retailcrm/aliexpress-top-client)
[![Build Status](https://github.com/retailcrm/aliexpress-top-client/workflows/ci/badge.svg)](https://github.com/retailcrm/aliexpress-top-client/actions)
[![Coverage](https://img.shields.io/codecov/c/gh/retailcrm/aliexpress-top-client/master.svg?logo=codecov)](https://codecov.io/gh/retailcrm/aliexpress-top-client)
[![Latest stable](https://img.shields.io/packagist/v/retailcrm/aliexpress-top-client.svg)](https://packagist.org/packages/retailcrm/aliexpress-top-client)
[![PHP from Packagist](https://img.shields.io/packagist/php-v/retailcrm/aliexpress-top-client.svg)](https://packagist.org/packages/retailcrm/aliexpress-top-client)
# AliExpress TOP API client
API client implementation for AliExpress TOP.
## Usage
1. This library uses `php-http/httplug` under the hood. If you don't want to bother with details, just install library and it's dependencies through Composer:
1. This library uses `php-http/httplug` under the hood. If you don't want to bother with details, just install library and it's dependencies via Composer:
```sh
composer require php-http/curl-client nyholm/psr7 php-http/message retailcrm/aliexpress-top-client
```
Details about those third-party libraries and why you need to install them can be found [here](http://docs.php-http.org/en/latest/httplug/users.html).
2. Instantiate client like that:
2. Instantiate client using `TopClientFactory`:
```php
use RetailCrm\Component\AppData;
use RetailCrm\Builder\TopClientBuilder;
use RetailCrm\Builder\ContainerBuilder;
use RetailCrm\Component\Authenticator\TokenAuthenticator;
use RetailCrm\Factory\TopClientFactory;
$appData = new AppData(AppData::OVERSEAS_ENDPOINT, 'appKey', 'appSecret');
$client = TopClientBuilder::create()
->setContainer(ContainerBuilder::create()->build())
->setAppData($appData)
->setAuthenticator(new TokenAuthenticator('session token here'))
->build();
$client = TopClientFactory::createClient(
AppData::OVERSEAS_ENDPOINT,
'appKey',
'appSecret',
'session token here'
);
```
3. Create and fill request data. All requests and responses use the same naming: part of the namespace is the first word in the request name, and everything else is in the request DTO class name. Requests live under `RetailCrm\Model\Request` namespace, and responses can be found in the `RetailCrm\Model\Response` namespace.
@ -75,5 +73,21 @@ $client = TopClientBuilder::create()
->build();
```
Logger should implement `Psr\Log\LoggerInterface` (PSR-3), HTTP client should implement `Psr\Http\TopClient\TopClientInterface` (PSR-18), HTTP objects must be compliant to PSR-7.
You can use your own container if you want to - it must be compliant to PSR-11. This is strongly discouraged because it'll be much easier to just integrate library with your own application, and your own DI system.
The simplest example of client initialization without using `TopClientFactory` looks like this:
```php
use RetailCrm\Component\AppData;
use RetailCrm\Builder\TopClientBuilder;
use RetailCrm\Builder\ContainerBuilder;
use RetailCrm\Component\Authenticator\TokenAuthenticator;
$appData = new AppData(AppData::OVERSEAS_ENDPOINT, 'appKey', 'appSecret');
$client = TopClientBuilder::create()
->setContainer(ContainerBuilder::create()->build())
->setAppData($appData)
->setAuthenticator(new TokenAuthenticator('session token here'))
->build();
```
In fact, `TopClientFactory` works just like this under the hood.
You can use your own container - it must be compliant to PSR-11. This is strongly discouraged because it'll be much easier to just integrate library with your own application, and your own DI system.

View file

@ -2,16 +2,16 @@
"name": "retailcrm/aliexpress-top-client",
"description": "API client implementation for AliExpress TOP.",
"type": "library",
"keywords": ["API", "retailCRM", "REST", "AliExpress"],
"homepage": "http://www.retailcrm.ru/",
"keywords": ["API", "RetailCRM", "REST", "AliExpress"],
"homepage": "http://www.retailcrm.pro/",
"authors": [
{
"name": "RetailDriver LLC",
"email": "integration@retailcrm.ru"
"email": "support@retailcrm.pro"
}
],
"support": {
"email": "support@retailcrm.ru"
"email": "support@retailcrm.pro"
},
"autoload": {
"psr-4": { "RetailCrm\\": "src/" }

View file

@ -4,10 +4,6 @@
*
* @category AuthorizationUriBuilder
* @package RetailCrm\Builder
* @author RetailCRM <integration@retailcrm.ru>
* @license http://retailcrm.ru Proprietary
* @link http://retailcrm.ru
* @see http://help.retailcrm.ru
*/
namespace RetailCrm\Builder;
@ -21,10 +17,6 @@ use RetailCrm\Interfaces\BuilderInterface;
*
* @category AuthorizationUriBuilder
* @package RetailCrm\Builder
* @author RetailDriver LLC <integration@retailcrm.ru>
* @license MIT https://mit-license.org
* @link http://retailcrm.ru
* @see https://help.retailcrm.ru
*/
class AuthorizationUriBuilder implements BuilderInterface
{

View file

@ -5,10 +5,6 @@
*
* @category ContainerBuilder
* @package RetailCrm\Builder
* @author RetailCRM <integration@retailcrm.ru>
* @license MIT https://mit-license.org
* @link http://retailcrm.ru
* @see http://help.retailcrm.ru
*/
namespace RetailCrm\Builder;
@ -50,10 +46,6 @@ use Symfony\Component\Validator\Validator\ValidatorInterface;
*
* @category ContainerBuilder
* @package RetailCrm\Builder
* @author RetailDriver LLC <integration@retailcrm.ru>
* @license MIT https://mit-license.org
* @link http://retailcrm.ru
* @see https://help.retailcrm.ru
*
* ContainerBuilder should be like that.
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)

View file

@ -5,10 +5,6 @@
*
* @category TopClientBuilder
* @package RetailCrm\Builder
* @author RetailCRM <integration@retailcrm.ru>
* @license MIT https://mit-license.org
* @link http://retailcrm.ru
* @see http://help.retailcrm.ru
*/
namespace RetailCrm\Builder;
@ -29,10 +25,6 @@ use RetailCrm\Traits\ContainerAwareTrait;
*
* @category TopClientBuilder
* @package RetailCrm\Builder
* @author RetailDriver LLC <integration@retailcrm.ru>
* @license MIT https://mit-license.org
* @link http://retailcrm.ru
* @see https://help.retailcrm.ru
*/
class TopClientBuilder implements ContainerAwareInterface, BuilderInterface
{

View file

@ -5,10 +5,6 @@
*
* @category AppData
* @package RetailCrm\Component
* @author RetailCRM <integration@retailcrm.ru>
* @license MIT https://mit-license.org
* @link http://retailcrm.ru
* @see http://help.retailcrm.ru
*/
namespace RetailCrm\Component;
@ -20,10 +16,6 @@ use Symfony\Component\Validator\Constraints as Assert;
*
* @category AppData
* @package RetailCrm\Component
* @author RetailDriver LLC <integration@retailcrm.ru>
* @license MIT https://mit-license.org
* @link http://retailcrm.ru
* @see https://help.retailcrm.ru
*/
class AppData implements AppDataInterface
{
@ -34,7 +26,7 @@ class AppData implements AppDataInterface
/**
* @var string $serviceUrl
* @Assert\Url()
* @Assert\Choice(choices=Client::AVAILABLE_ENDPOINTS, message="Invalid endpoint provided.")
* @Assert\Choice(choices=AppData::AVAILABLE_ENDPOINTS, message="Invalid endpoint provided.")
*/
protected $serviceUrl;

View file

@ -4,10 +4,6 @@
*
* @category TokenAuthenticator
* @package RetailCrm\Component\Authenticator
* @author RetailCRM <integration@retailcrm.ru>
* @license http://retailcrm.ru Proprietary
* @link http://retailcrm.ru
* @see http://help.retailcrm.ru
*/
namespace RetailCrm\Component\Authenticator;
@ -20,10 +16,6 @@ use RetailCrm\Model\Request\BaseRequest;
*
* @category TokenAuthenticator
* @package RetailCrm\Component\Authenticator
* @author RetailDriver LLC <integration@retailcrm.ru>
* @license MIT https://mit-license.org
* @link http://retailcrm.ru
* @see https://help.retailcrm.ru
*/
class TokenAuthenticator implements AuthenticatorInterface
{

View file

@ -5,10 +5,6 @@
*
* @category Constants
* @package RetailCrm\Component
* @author RetailCRM <integration@retailcrm.ru>
* @license MIT https://mit-license.org
* @link http://retailcrm.ru
* @see http://help.retailcrm.ru
*/
namespace RetailCrm\Component;
@ -17,10 +13,6 @@ namespace RetailCrm\Component;
*
* @category Constants
* @package RetailCrm\Component
* @author RetailDriver LLC <integration@retailcrm.ru>
* @license MIT https://mit-license.org
* @link http://retailcrm.ru
* @see https://help.retailcrm.ru
*/
class Constants
{

View file

@ -4,10 +4,6 @@
*
* @category ConstraintViolationListTransformer
* @package RetailCrm\Component
* @author RetailCRM <integration@retailcrm.ru>
* @license http://retailcrm.ru Proprietary
* @link http://retailcrm.ru
* @see http://help.retailcrm.ru
*/
namespace RetailCrm\Component;
@ -19,10 +15,6 @@ use Symfony\Component\Validator\ConstraintViolationListInterface;
*
* @category ConstraintViolationListTransformer
* @package RetailCrm\Component
* @author RetailDriver LLC <integration@retailcrm.ru>
* @license https://retailcrm.ru Proprietary
* @link http://retailcrm.ru
* @see https://help.retailcrm.ru
*/
class ConstraintViolationListTransformer
{

View file

@ -5,10 +5,6 @@
*
* @category Container
* @package RetailCrm\Component\DependencyInjection
* @author RetailCRM <integration@retailcrm.ru>
* @license MIT https://mit-license.org
* @link http://retailcrm.ru
* @see http://help.retailcrm.ru
*/
namespace RetailCrm\Component\DependencyInjection;
@ -29,10 +25,6 @@ use Throwable;
* @category Container
* @package RetailCrm\Component\DependencyInjection
* @author Evgeniy Zyubin <mail@devanych.ru>
* @author RetailDriver LLC <integration@retailcrm.ru>
* @license MIT https://mit-license.org
* @link http://retailcrm.ru
* @see https://help.retailcrm.ru
*/
final class Container implements ContainerInterface
{

View file

@ -5,10 +5,6 @@
*
* @category ContainerException
* @package RetailCrm\Component\DependencyInjection\Exception
* @author RetailCRM <integration@retailcrm.ru>
* @license MIT https://mit-license.org
* @link http://retailcrm.ru
* @see http://help.retailcrm.ru
*/
namespace RetailCrm\Component\DependencyInjection\Exception;
@ -21,10 +17,6 @@ use LogicException;
* @category ContainerException
* @package RetailCrm\Component\DependencyInjection\Exception
* @author Evgeniy Zyubin <mail@devanych.ru>
* @author RetailDriver LLC <integration@retailcrm.ru>
* @license MIT https://mit-license.org
* @link http://retailcrm.ru
* @see https://help.retailcrm.ru
*/
class ContainerException extends LogicException implements ContainerExceptionInterface
{

View file

@ -5,10 +5,6 @@
*
* @category NotFoundException
* @package RetailCrm\Component\DependencyInjection\Exception
* @author RetailCRM <integration@retailcrm.ru>
* @license MIT https://mit-license.org
* @link http://retailcrm.ru
* @see http://help.retailcrm.ru
*/
namespace RetailCrm\Component\DependencyInjection\Exception;
@ -21,10 +17,6 @@ use InvalidArgumentException;
* @category NotFoundException
* @package RetailCrm\Component\DependencyInjection\Exception
* @author Evgeniy Zyubin <mail@devanych.ru>
* @author RetailDriver LLC <integration@retailcrm.ru>
* @license MIT https://mit-license.org
* @link http://retailcrm.ru
* @see https://help.retailcrm.ru
*/
class NotFoundException extends InvalidArgumentException implements NotFoundExceptionInterface
{

View file

@ -5,10 +5,6 @@
*
* @category FactoryInterface
* @package RetailCrm\Component\DependencyInjection
* @author RetailCRM <integration@retailcrm.ru>
* @license MIT https://mit-license.org
* @link http://retailcrm.ru
* @see http://help.retailcrm.ru
*/
namespace RetailCrm\Component\DependencyInjection;
@ -20,10 +16,6 @@ use Psr\Container\ContainerInterface;
* @category FactoryInterface
* @package RetailCrm\Component\DependencyInjection
* @author Evgeniy Zyubin <mail@devanych.ru>
* @author RetailDriver LLC <integration@retailcrm.ru>
* @license MIT https://mit-license.org
* @link http://retailcrm.ru
* @see https://help.retailcrm.ru
*/
interface FactoryInterface
{

View file

@ -5,10 +5,6 @@
*
* @category Environment
* @package RetailCrm\Component
* @author RetailCRM <integration@retailcrm.ru>
* @license MIT https://mit-license.org
* @link http://retailcrm.ru
* @see http://help.retailcrm.ru
*/
namespace RetailCrm\Component;
@ -19,10 +15,6 @@ use InvalidArgumentException;
*
* @category Environment
* @package RetailCrm\Component
* @author RetailDriver LLC <integration@retailcrm.ru>
* @license MIT https://mit-license.org
* @link http://retailcrm.ru
* @see https://help.retailcrm.ru
*/
class Environment
{

View file

@ -5,10 +5,6 @@
*
* @category FactoryException
* @package RetailCrm\Component\Exception
* @author RetailCRM <integration@retailcrm.ru>
* @license MIT https://mit-license.org
* @link http://retailcrm.ru
* @see http://help.retailcrm.ru
*/
namespace RetailCrm\Component\Exception;
@ -17,10 +13,6 @@ namespace RetailCrm\Component\Exception;
*
* @category FactoryException
* @package RetailCrm\Component\Exception
* @author RetailDriver LLC <integration@retailcrm.ru>
* @license MIT https://mit-license.org
* @link http://retailcrm.ru
* @see https://help.retailcrm.ru
*/
class FactoryException extends \Exception
{

View file

@ -5,10 +5,6 @@
*
* @category NotImplementedException
* @package RetailCrm\Component\Exception
* @author RetailCRM <integration@retailcrm.ru>
* @license MIT https://mit-license.org
* @link http://retailcrm.ru
* @see http://help.retailcrm.ru
*/
namespace RetailCrm\Component\Exception;
@ -17,10 +13,6 @@ namespace RetailCrm\Component\Exception;
*
* @category NotImplementedException
* @package RetailCrm\Component\Exception
* @author RetailDriver LLC <integration@retailcrm.ru>
* @license MIT https://mit-license.org
* @link http://retailcrm.ru
* @see https://help.retailcrm.ru
*/
class NotImplementedException extends \Exception
{

View file

@ -4,10 +4,6 @@
*
* @category OAuthTokenFetcherException
* @package RetailCrm\Component\Exception
* @author RetailCRM <integration@retailcrm.ru>
* @license http://retailcrm.ru Proprietary
* @link http://retailcrm.ru
* @see http://help.retailcrm.ru
*/
namespace RetailCrm\Component\Exception;
@ -19,10 +15,6 @@ use Exception;
*
* @category OAuthTokenFetcherException
* @package RetailCrm\Component\Exception
* @author RetailDriver LLC <integration@retailcrm.ru>
* @license https://retailcrm.ru Proprietary
* @link http://retailcrm.ru
* @see https://help.retailcrm.ru
*/
class OAuthTokenFetcherException extends Exception
{

View file

@ -5,10 +5,6 @@
*
* @category TopApiException
* @package RetailCrm\Component\Exception
* @author RetailCRM <integration@retailcrm.ru>
* @license MIT
* @link http://retailcrm.ru
* @see http://help.retailcrm.ru
*/
namespace RetailCrm\Component\Exception;
@ -21,10 +17,6 @@ use Throwable;
*
* @category TopApiException
* @package RetailCrm\Component\Exception
* @author RetailDriver LLC <integration@retailcrm.ru>
* @license MIT
* @link http://retailcrm.ru
* @see https://help.retailcrm.ru
*/
class TopApiException extends Exception
{

View file

@ -5,10 +5,6 @@
*
* @category TopClientException
* @package RetailCrm\Component\Exception
* @author RetailCRM <integration@retailcrm.ru>
* @license MIT
* @link http://retailcrm.ru
* @see http://help.retailcrm.ru
*/
namespace RetailCrm\Component\Exception;
@ -19,10 +15,6 @@ use Exception;
*
* @category TopClientException
* @package RetailCrm\Component\Exception
* @author RetailDriver LLC <integration@retailcrm.ru>
* @license MIT
* @link http://retailcrm.ru
* @see https://help.retailcrm.ru
*/
class TopClientException extends Exception
{

View file

@ -5,10 +5,6 @@
*
* @category ValidationException
* @package RetailCrm\Component\Exception
* @author RetailCRM <integration@retailcrm.ru>
* @license MIT https://mit-license.org
* @link http://retailcrm.ru
* @see http://help.retailcrm.ru
*/
namespace RetailCrm\Component\Exception;
@ -20,10 +16,6 @@ use Throwable;
*
* @category ValidationException
* @package RetailCrm\Component\Exception
* @author RetailDriver LLC <integration@retailcrm.ru>
* @license MIT https://mit-license.org
* @link http://retailcrm.ru
* @see https://help.retailcrm.ru
*/
class ValidationException extends \Exception
{

View file

@ -0,0 +1,54 @@
<?php
/**
* PHP version 7.3
*
* @category TimezoneDeserializeSubscriber
* @package RetailCrm\Component\JMS\EventSubscriber
*/
namespace RetailCrm\Component\JMS\EventSubscriber;
use DateTime;
use DateTimeInterface;
use DateTimeZone;
use JMS\Serializer\EventDispatcher\EventSubscriberInterface;
use JMS\Serializer\EventDispatcher\ObjectEvent;
/**
* Class TimezoneDeserializeSubscriber
*
* @category TimezoneDeserializeSubscriber
* @package RetailCrm\Component\JMS\EventSubscriber
*/
class TimezoneDeserializeSubscriber implements EventSubscriberInterface
{
private const RFC3339_WITHOUT_TZ = 'Y-m-d\TH:i:s';
/**
* @inheritDoc
*/
public static function getSubscribedEvents(): array
{
return [[
'event' => 'serializer.post_deserialize',
'method' => 'onPostDeserialize',
]];
}
public function onPostDeserialize(ObjectEvent $event): void
{
$object = $event->getObject();
foreach (get_object_vars($object) as $property => $value) {
if ($value instanceof DateTimeInterface
&& $value->getTimezone()->getName() === 'UTC'
) {
$object->$property = DateTime::createFromFormat(
self::RFC3339_WITHOUT_TZ,
$value->format(self::RFC3339_WITHOUT_TZ),
new DateTimeZone('PST')
);
}
}
}
}

View file

@ -4,10 +4,6 @@
*
* @category JsonDeserializationVisitorFactory
* @package RetailCrm\Component\JMS\Factory
* @author RetailCRM <integration@retailcrm.ru>
* @license http://retailcrm.ru Proprietary
* @link http://retailcrm.ru
* @see http://help.retailcrm.ru
*/
namespace RetailCrm\Component\JMS\Factory;
@ -21,10 +17,6 @@ use JMS\Serializer\Visitor\Factory\DeserializationVisitorFactory;
*
* @category JsonDeserializationVisitorFactory
* @package RetailCrm\Component\JMS\Factory
* @author RetailDriver LLC <integration@retailcrm.ru>
* @license MIT https://mit-license.org
* @link http://retailcrm.ru
* @see https://help.retailcrm.ru
*/
class JsonDeserializationVisitorFactory implements DeserializationVisitorFactory
{

View file

@ -4,10 +4,6 @@
*
* @category JsonDeserializationVisitor
* @package RetailCrm\Component\JMS\Visitor\Deserialization
* @author RetailCRM <integration@retailcrm.ru>
* @license http://retailcrm.ru Proprietary
* @link http://retailcrm.ru
* @see http://help.retailcrm.ru
*/
namespace RetailCrm\Component\JMS\Visitor\Deserialization;
@ -16,6 +12,7 @@ use JMS\Serializer\AbstractVisitor;
use JMS\Serializer\Exception\LogicException;
use JMS\Serializer\Exception\NotAcceptableException;
use JMS\Serializer\Exception\RuntimeException;
use JMS\Serializer\GraphNavigatorInterface;
use JMS\Serializer\Metadata\ClassMetadata;
use JMS\Serializer\Metadata\PropertyMetadata;
use JMS\Serializer\Visitor\DeserializationVisitorInterface;
@ -27,12 +24,8 @@ use SplStack;
*
* @category JsonDeserializationVisitor
* @package RetailCrm\Component\JMS\Visitor\Deserialization
* @author RetailDriver LLC <integration@retailcrm.ru>
* @license MIT https://mit-license.org
* @link http://retailcrm.ru
* @see https://help.retailcrm.ru
*/
class JsonDeserializationVisitor extends AbstractVisitor implements DeserializationVisitorInterface
class JsonDeserializationVisitor implements DeserializationVisitorInterface
{
/**
* @var int
@ -54,6 +47,11 @@ class JsonDeserializationVisitor extends AbstractVisitor implements Deserializat
*/
private $currentObject;
/**
* @var GraphNavigatorInterface
*/
protected $navigator;
public function __construct(
int $options = 0,
int $depth = 512
@ -316,4 +314,9 @@ class JsonDeserializationVisitor extends AbstractVisitor implements Deserializat
throw new RuntimeException('Could not decode JSON.');
}
}
public function setNavigator(GraphNavigatorInterface $navigator): void
{
$this->navigator = $navigator;
}
}

View file

@ -5,10 +5,6 @@
*
* @category AbstractLogger
* @package RetailCrm\Component\Logger
* @author RetailCRM <integration@retailcrm.ru>
* @license MIT https://mit-license.org
* @link http://retailcrm.ru
* @see http://help.retailcrm.ru
*/
namespace RetailCrm\Component\Logger;
@ -19,10 +15,6 @@ use Psr\Log\AbstractLogger as BaseAbstractLogger;
*
* @category AbstractLogger
* @package RetailCrm\Component\Logger
* @author RetailDriver LLC <integration@retailcrm.ru>
* @license MIT https://mit-license.org
* @link http://retailcrm.ru
* @see https://help.retailcrm.ru
*/
abstract class AbstractLogger extends BaseAbstractLogger
{

View file

@ -5,10 +5,6 @@
*
* @category FileLogger
* @package RetailCrm\Component\Logger
* @author RetailCRM <integration@retailcrm.ru>
* @license MIT https://mit-license.org
* @link http://retailcrm.ru
* @see http://help.retailcrm.ru
*/
namespace RetailCrm\Component\Logger;
@ -17,10 +13,6 @@ namespace RetailCrm\Component\Logger;
*
* @category FileLogger
* @package RetailCrm\Component\Logger
* @author RetailDriver LLC <integration@retailcrm.ru>
* @license MIT https://mit-license.org
* @link http://retailcrm.ru
* @see https://help.retailcrm.ru
*/
class FileLogger extends AbstractLogger
{

View file

@ -5,10 +5,6 @@
*
* @category StdioLogger
* @package RetailCrm\Component\Logger
* @author RetailCRM <integration@retailcrm.ru>
* @license MIT https://mit-license.org
* @link http://retailcrm.ru
* @see http://help.retailcrm.ru
*/
namespace RetailCrm\Component\Logger;
@ -17,10 +13,6 @@ namespace RetailCrm\Component\Logger;
*
* @category StdioLogger
* @package RetailCrm\Component\Logger
* @author RetailDriver LLC <integration@retailcrm.ru>
* @license MIT https://mit-license.org
* @link http://retailcrm.ru
* @see https://help.retailcrm.ru
*/
class StdoutLogger extends AbstractLogger
{

View file

@ -4,10 +4,6 @@
*
* @category OAuthTokenFetcher
* @package RetailCrm\Component
* @author RetailCRM <integration@retailcrm.ru>
* @license http://retailcrm.ru Proprietary
* @link http://retailcrm.ru
* @see http://help.retailcrm.ru
*/
namespace RetailCrm\Component;
@ -31,10 +27,6 @@ use RetailCrm\Model\Response\OAuthTokenFetcherResponse;
*
* @category OAuthTokenFetcher
* @package RetailCrm\Component
* @author RetailDriver LLC <integration@retailcrm.ru>
* @license https://retailcrm.ru Proprietary
* @link http://retailcrm.ru
* @see https://help.retailcrm.ru
*/
class OAuthTokenFetcher
{

View file

@ -5,10 +5,6 @@
*
* @category ServiceLocator
* @package RetailCrm\Component
* @author RetailCRM <integration@retailcrm.ru>
* @license MIT https://mit-license.org
* @link http://retailcrm.ru
* @see http://help.retailcrm.ru
*/
namespace RetailCrm\Component;
@ -23,10 +19,6 @@ use RetailCrm\Traits\ContainerAwareTrait;
*
* @category ServiceLocator
* @package RetailCrm\Component
* @author RetailDriver LLC <integration@retailcrm.ru>
* @license MIT https://mit-license.org
* @link http://retailcrm.ru
* @see https://help.retailcrm.ru
*/
class ServiceLocator implements ContainerAwareInterface
{

View file

@ -4,10 +4,6 @@
*
* @category ProductSchemaStorage
* @package RetailCrm\Component\Storage
* @author RetailCRM <integration@retailcrm.ru>
* @license http://retailcrm.ru Proprietary
* @link http://retailcrm.ru
* @see http://help.retailcrm.ru
*/
namespace RetailCrm\Component\Storage;
@ -29,10 +25,6 @@ use RetailCrm\Model\Response\ErrorResponseBody;
*
* @category ProductSchemaStorage
* @package RetailCrm\Component\Storage
* @author RetailDriver LLC <integration@retailcrm.ru>
* @license https://retailcrm.ru Proprietary
* @link http://retailcrm.ru
* @see https://help.retailcrm.ru
*/
class ProductSchemaStorage
{

View file

@ -4,10 +4,6 @@
*
* @category Timezone
* @package RetailCrm\Component\Validator\Constraints
* @author RetailCRM <integration@retailcrm.ru>
* @license http://retailcrm.ru Proprietary
* @link http://retailcrm.ru
* @see http://help.retailcrm.ru
*/
namespace RetailCrm\Component\Validator\Constraints;
@ -19,17 +15,13 @@ use Symfony\Component\Validator\Constraint;
*
* @category Timezone
* @package RetailCrm\Component\Validator\Constraints
* @author RetailDriver LLC <integration@retailcrm.ru>
* @license https://retailcrm.ru Proprietary
* @link http://retailcrm.ru
* @see https://help.retailcrm.ru
*
* @Annotation
* @Target({"PROPERTY", "METHOD", "ANNOTATION"})
*/
class Timezone extends Constraint
{
public $timezone = 'America/Los_Angeles';
public $timezone = 'PST';
public $message = 'Invalid timezone provided. Got {{ provided }}, should be {{ expected }}.';
/**

View file

@ -4,10 +4,6 @@
*
* @category TimezoneValidator
* @package RetailCrm\Component\Validator\Constraints
* @author RetailCRM <integration@retailcrm.ru>
* @license http://retailcrm.ru Proprietary
* @link http://retailcrm.ru
* @see http://help.retailcrm.ru
*/
namespace RetailCrm\Component\Validator\Constraints;
@ -23,10 +19,6 @@ use Symfony\Component\Validator\Exception\UnexpectedValueException;
*
* @category TimezoneValidator
* @package RetailCrm\Component\Validator\Constraints
* @author RetailDriver LLC <integration@retailcrm.ru>
* @license https://retailcrm.ru Proprietary
* @link http://retailcrm.ru
* @see https://help.retailcrm.ru
*/
class TimezoneValidator extends ConstraintValidator
{

View file

@ -5,10 +5,6 @@
*
* @category FileItemFactory
* @package RetailCrm\Factory
* @author RetailCRM <integration@retailcrm.ru>
* @license MIT https://mit-license.org
* @link http://retailcrm.ru
* @see http://help.retailcrm.ru
*/
namespace RetailCrm\Factory;
@ -22,10 +18,6 @@ use RetailCrm\Model\FileItem;
*
* @category FileItemFactory
* @package RetailCrm\Factory
* @author RetailDriver LLC <integration@retailcrm.ru>
* @license MIT https://mit-license.org
* @link http://retailcrm.ru
* @see https://help.retailcrm.ru
*/
class FileItemFactory implements FileItemFactoryInterface
{

View file

@ -4,10 +4,6 @@
*
* @category OAuthTokenFetcherFactory
* @package RetailCrm\Factory
* @author RetailCRM <integration@retailcrm.ru>
* @license http://retailcrm.ru Proprietary
* @link http://retailcrm.ru
* @see http://help.retailcrm.ru
*/
namespace RetailCrm\Factory;
@ -25,10 +21,6 @@ use RetailCrm\Interfaces\ParametrizedFactoryInterface;
*
* @category OAuthTokenFetcherFactory
* @package RetailCrm\Factory
* @author RetailDriver LLC <integration@retailcrm.ru>
* @license https://retailcrm.ru Proprietary
* @link http://retailcrm.ru
* @see https://help.retailcrm.ru
*/
class OAuthTokenFetcherFactory implements ParametrizedFactoryInterface
{

View file

@ -4,10 +4,6 @@
*
* @category ProductSchemaStorageFactory
* @package RetailCrm\Factory
* @author RetailCRM <integration@retailcrm.ru>
* @license http://retailcrm.ru Proprietary
* @link http://retailcrm.ru
* @see http://help.retailcrm.ru
*/
namespace RetailCrm\Factory;
@ -22,10 +18,6 @@ use RetailCrm\Interfaces\TopClientInterface;
*
* @category ProductSchemaStorageFactory
* @package RetailCrm\Factory
* @author RetailDriver LLC <integration@retailcrm.ru>
* @license https://retailcrm.ru Proprietary
* @link http://retailcrm.ru
* @see https://help.retailcrm.ru
*/
class ProductSchemaStorageFactory implements FactoryInterface
{

View file

@ -5,10 +5,6 @@
*
* @category SerializationContextFactory
* @package RetailCrm\Factory
* @author RetailCRM <integration@retailcrm.ru>
* @license MIT https://mit-license.org
* @link http://retailcrm.ru
* @see http://help.retailcrm.ru
*/
namespace RetailCrm\Factory;
@ -20,10 +16,6 @@ use JMS\Serializer\SerializationContext;
*
* @category SerializationContextFactory
* @package RetailCrm\Factory
* @author RetailDriver LLC <integration@retailcrm.ru>
* @license MIT https://mit-license.org
* @link http://retailcrm.ru
* @see https://help.retailcrm.ru
*/
class SerializationContextFactory implements SerializationContextFactoryInterface
{

View file

@ -5,13 +5,12 @@
*
* @category SerializerFactory
* @package RetailCrm\Factory
* @author RetailCRM <integration@retailcrm.ru>
* @license MIT https://mit-license.org
* @link http://retailcrm.ru
* @see http://help.retailcrm.ru
*/
namespace RetailCrm\Factory;
use JMS\Serializer\Annotation\PostDeserialize;
use JMS\Serializer\EventDispatcher\EventDispatcher;
use JMS\Serializer\EventDispatcher\ObjectEvent;
use JMS\Serializer\GraphNavigatorInterface;
use JMS\Serializer\Handler\HandlerRegistry;
use JMS\Serializer\Serializer;
@ -20,6 +19,7 @@ use JMS\Serializer\SerializerInterface;
use JMS\Serializer\Visitor\Factory\JsonSerializationVisitorFactory;
use Psr\Container\ContainerInterface;
use RetailCrm\Component\Constants;
use RetailCrm\Component\JMS\EventSubscriber\TimezoneDeserializeSubscriber;
use RetailCrm\Component\JMS\Factory\JsonDeserializationVisitorFactory;
use RetailCrm\Interfaces\FactoryInterface;
use Symfony\Component\ExpressionLanguage\ExpressionLanguage;
@ -30,10 +30,6 @@ use JMS\Serializer\Expression\ExpressionEvaluator;
*
* @category SerializerFactory
* @package RetailCrm\Factory
* @author RetailDriver LLC <integration@retailcrm.ru>
* @license MIT https://mit-license.org
* @link http://retailcrm.ru
* @see https://help.retailcrm.ru
*/
class SerializerFactory implements FactoryInterface
{
@ -108,6 +104,9 @@ class SerializerFactory implements FactoryInterface
$returnNull
);
})->addDefaultHandlers()
->configureListeners(function (EventDispatcher $dispatcher) {
$dispatcher->addSubscriber(new TimezoneDeserializeSubscriber());
})
->setSerializationVisitor('json', new JsonSerializationVisitorFactory())
->setDeserializationVisitor('json', new JsonDeserializationVisitorFactory())
->setSerializationContextFactory(new SerializationContextFactory())

View file

@ -0,0 +1,53 @@
<?php
/**
* PHP version 7.3
*
* @category TopClientFactory
* @package RetailCrm\Factory
*/
namespace RetailCrm\Factory;
use RetailCrm\Builder\ContainerBuilder;
use RetailCrm\Builder\TopClientBuilder;
use RetailCrm\Component\AppData;
use RetailCrm\Component\Authenticator\TokenAuthenticator;
use RetailCrm\TopClient\TopClient;
/**
* Class TopClientFactory
*
* @category TopClientFactory
* @package RetailCrm\Factory
*/
class TopClientFactory
{
/**
* Create new TopClient
*
* @param string $serviceUrl
* @param string $appKey
* @param string $appSecret
* @param string $token
*
* @return \RetailCrm\TopClient\TopClient
* @throws \RetailCrm\Component\Exception\ValidationException
*/
public static function createClient(
string $serviceUrl,
string $appKey,
string $appSecret,
string $token = ''
): TopClient {
$appData = new AppData($serviceUrl, $appKey, $appSecret);
$builder = TopClientBuilder::create()
->setContainer(ContainerBuilder::create()->build())
->setAppData($appData);
if ('' !== $token) {
$builder->setAuthenticator(new TokenAuthenticator($token));
}
return $builder->build();
}
}

View file

@ -5,10 +5,6 @@
*
* @category TopRequestFactory
* @package RetailCrm\Factory
* @author RetailCRM <integration@retailcrm.ru>
* @license MIT https://mit-license.org
* @link http://retailcrm.ru
* @see http://help.retailcrm.ru
*/
namespace RetailCrm\Factory;
@ -35,10 +31,6 @@ use UnexpectedValueException;
*
* @category TopRequestFactory
* @package RetailCrm\Factory
* @author RetailDriver LLC <integration@retailcrm.ru>
* @license MIT https://mit-license.org
* @link http://retailcrm.ru
* @see https://help.retailcrm.ru
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
*/
class TopRequestFactory implements TopRequestFactoryInterface
@ -272,6 +264,8 @@ class TopRequestFactory implements TopRequestFactoryInterface
*
* @return string|resource|null
* @todo Arrays will be encoded to JSON. Is this correct? Press X to doubt.
*
* @SuppressWarnings(PHPMD.CyclomaticComplexity)
*/
private function castValue($value)
{
@ -282,6 +276,7 @@ class TopRequestFactory implements TopRequestFactoryInterface
case 'NULL':
return $value;
case 'boolean':
return $value ? 'true' : 'false';
case 'integer':
case 'double':
case 'string':

View file

@ -5,10 +5,6 @@
*
* @category AppDataInterface
* @package RetailCrm\Interfaces
* @author RetailCRM <integration@retailcrm.ru>
* @license MIT https://mit-license.org
* @link http://retailcrm.ru
* @see http://help.retailcrm.ru
*/
namespace RetailCrm\Interfaces;
@ -18,10 +14,6 @@ namespace RetailCrm\Interfaces;
*
* @category AppDataInterface
* @package RetailCrm\Interfaces
* @author RetailDriver LLC <integration@retailcrm.ru>
* @license MIT https://mit-license.org
* @link http://retailcrm.ru
* @see https://help.retailcrm.ru
*/
interface AppDataInterface
{

View file

@ -5,10 +5,6 @@
*
* @category AuthenticatorInterface
* @package RetailCrm\Interfaces
* @author RetailCRM <integration@retailcrm.ru>
* @license MIT https://mit-license.org
* @link http://retailcrm.ru
* @see http://help.retailcrm.ru
*/
namespace RetailCrm\Interfaces;
@ -20,10 +16,6 @@ use RetailCrm\Model\Request\BaseRequest;
*
* @category AuthenticatorInterface
* @package RetailCrm\Interfaces
* @author RetailDriver LLC <integration@retailcrm.ru>
* @license MIT https://mit-license.org
* @link http://retailcrm.ru
* @see https://help.retailcrm.ru
*/
interface AuthenticatorInterface
{

View file

@ -5,10 +5,6 @@
*
* @category BuilderInterface
* @package RetailCrm\Interfaces
* @author RetailCRM <integration@retailcrm.ru>
* @license MIT https://mit-license.org
* @link http://retailcrm.ru
* @see http://help.retailcrm.ru
*/
namespace RetailCrm\Interfaces;
@ -18,10 +14,6 @@ namespace RetailCrm\Interfaces;
*
* @category BuilderInterface
* @package RetailCrm\Interfaces
* @author RetailDriver LLC <integration@retailcrm.ru>
* @license MIT https://mit-license.org
* @link http://retailcrm.ru
* @see https://help.retailcrm.ru
*/
interface BuilderInterface
{

View file

@ -5,10 +5,6 @@
*
* @category ContainerAwareInterface
* @package RetailCrm\Interfaces
* @author RetailCRM <integration@retailcrm.ru>
* @license MIT https://mit-license.org
* @link http://retailcrm.ru
* @see http://help.retailcrm.ru
*/
namespace RetailCrm\Interfaces;
@ -20,10 +16,6 @@ use Psr\Container\ContainerInterface;
*
* @category ContainerAwareInterface
* @package RetailCrm\Interfaces
* @author RetailDriver LLC <integration@retailcrm.ru>
* @license MIT https://mit-license.org
* @link http://retailcrm.ru
* @see https://help.retailcrm.ru
*/
interface ContainerAwareInterface
{

View file

@ -5,10 +5,6 @@
*
* @category FactoryInterface
* @package RetailCrm\Interfaces
* @author RetailCRM <integration@retailcrm.ru>
* @license MIT https://mit-license.org
* @link http://retailcrm.ru
* @see http://help.retailcrm.ru
*/
namespace RetailCrm\Interfaces;
@ -18,10 +14,6 @@ namespace RetailCrm\Interfaces;
*
* @category FactoryInterface
* @package RetailCrm\Interfaces
* @author RetailDriver LLC <integration@retailcrm.ru>
* @license MIT https://mit-license.org
* @link http://retailcrm.ru
* @see https://help.retailcrm.ru
*/
interface FactoryInterface
{

View file

@ -5,10 +5,6 @@
*
* @category FactoryInterface
* @package RetailCrm\Interfaces
* @author RetailCRM <integration@retailcrm.ru>
* @license MIT https://mit-license.org
* @link http://retailcrm.ru
* @see http://help.retailcrm.ru
*/
namespace RetailCrm\Interfaces;
@ -18,10 +14,6 @@ namespace RetailCrm\Interfaces;
*
* @category FileItemFactoryInterface
* @package RetailCrm\Interfaces
* @author RetailDriver LLC <integration@retailcrm.ru>
* @license MIT https://mit-license.org
* @link http://retailcrm.ru
* @see https://help.retailcrm.ru
*/
interface FileItemFactoryInterface
{

View file

@ -5,10 +5,6 @@
*
* @category FileItemInterface
* @package RetailCrm\Interfaces
* @author RetailCRM <integration@retailcrm.ru>
* @license MIT https://mit-license.org
* @link http://retailcrm.ru
* @see http://help.retailcrm.ru
*/
namespace RetailCrm\Interfaces;
@ -20,10 +16,6 @@ use Psr\Http\Message\StreamInterface;
*
* @category FileItemInterface
* @package RetailCrm\Interfaces
* @author RetailDriver LLC <integration@retailcrm.ru>
* @license MIT https://mit-license.org
* @link http://retailcrm.ru
* @see https://help.retailcrm.ru
*/
interface FileItemInterface
{

View file

@ -5,10 +5,6 @@
*
* @category ParametrizedFactoryInterface
* @package RetailCrm\Interfaces
* @author RetailCRM <integration@retailcrm.ru>
* @license MIT https://mit-license.org
* @link http://retailcrm.ru
* @see http://help.retailcrm.ru
*/
namespace RetailCrm\Interfaces;
@ -18,10 +14,6 @@ namespace RetailCrm\Interfaces;
*
* @category ParametrizedFactoryInterface
* @package RetailCrm\Interfaces
* @author RetailDriver LLC <integration@retailcrm.ru>
* @license MIT https://mit-license.org
* @link http://retailcrm.ru
* @see https://help.retailcrm.ru
*/
interface ParametrizedFactoryInterface
{

View file

@ -5,10 +5,6 @@
*
* @category RequestDtoInterface
* @package RetailCrm\Interfaces
* @author RetailCRM <integration@retailcrm.ru>
* @license MIT https://mit-license.org
* @link http://retailcrm.ru
* @see http://help.retailcrm.ru
*/
namespace RetailCrm\Interfaces;
@ -18,10 +14,6 @@ namespace RetailCrm\Interfaces;
*
* @category RequestDtoInterface
* @package RetailCrm\Interfaces
* @author RetailDriver LLC <integration@retailcrm.ru>
* @license MIT https://mit-license.org
* @link http://retailcrm.ru
* @see https://help.retailcrm.ru
*/
interface RequestDtoInterface
{

View file

@ -5,10 +5,6 @@
*
* @category RequestSignerInterface
* @package RetailCrm\Interfaces
* @author RetailCRM <integration@retailcrm.ru>
* @license MIT https://mit-license.org
* @link http://retailcrm.ru
* @see http://help.retailcrm.ru
*/
namespace RetailCrm\Interfaces;
@ -18,10 +14,6 @@ namespace RetailCrm\Interfaces;
*
* @category RequestSignerInterface
* @package RetailCrm\Interfaces
* @author RetailDriver LLC <integration@retailcrm.ru>
* @license MIT https://mit-license.org
* @link http://retailcrm.ru
* @see https://help.retailcrm.ru
*/
interface RequestSignerInterface
{

View file

@ -5,10 +5,6 @@
*
* @category RequestTimestampProviderInterface
* @package RetailCrm\Interfaces
* @author RetailCRM <integration@retailcrm.ru>
* @license MIT https://mit-license.org
* @link http://retailcrm.ru
* @see http://help.retailcrm.ru
*/
namespace RetailCrm\Interfaces;
@ -20,10 +16,6 @@ use RetailCrm\Model\Request\BaseRequest;
*
* @category RequestTimestampProviderInterface
* @package RetailCrm\Interfaces
* @author RetailDriver LLC <integration@retailcrm.ru>
* @license MIT https://mit-license.org
* @link http://retailcrm.ru
* @see https://help.retailcrm.ru
*/
interface RequestTimestampProviderInterface
{

View file

@ -5,10 +5,6 @@
*
* @category TopClientInterface
* @package RetailCrm\Interfaces
* @author RetailCRM <integration@retailcrm.ru>
* @license MIT https://mit-license.org
* @link http://retailcrm.ru
* @see http://help.retailcrm.ru
*/
namespace RetailCrm\Interfaces;
@ -22,10 +18,6 @@ use RetailCrm\Model\Response\TopResponseInterface;
*
* @category ContainerBuilder
* @package RetailCrm\Interfaces
* @author RetailDriver LLC <integration@retailcrm.ru>
* @license MIT https://mit-license.org
* @link http://retailcrm.ru
* @see https://help.retailcrm.ru
*
*/
interface TopClientInterface

View file

@ -5,10 +5,6 @@
*
* @category TopRequestFactoryInterface
* @package RetailCrm\Interfaces
* @author RetailCRM <integration@retailcrm.ru>
* @license MIT https://mit-license.org
* @link http://retailcrm.ru
* @see http://help.retailcrm.ru
*/
namespace RetailCrm\Interfaces;
@ -21,10 +17,6 @@ use RetailCrm\Model\Request\BaseRequest;
*
* @category TopRequestFactoryInterface
* @package RetailCrm\Interfaces
* @author RetailDriver LLC <integration@retailcrm.ru>
* @license MIT https://mit-license.org
* @link http://retailcrm.ru
* @see https://help.retailcrm.ru
*/
interface TopRequestFactoryInterface
{

View file

@ -4,10 +4,6 @@
*
* @category CategoryInfo
* @package RetailCrm\Model\Entity
* @author RetailCRM <integration@retailcrm.ru>
* @license http://retailcrm.ru Proprietary
* @link http://retailcrm.ru
* @see http://help.retailcrm.ru
*/
namespace RetailCrm\Model\Entity;
@ -19,10 +15,6 @@ use JMS\Serializer\Annotation as JMS;
*
* @category CategoryInfo
* @package RetailCrm\Model\Entity
* @author RetailDriver LLC <integration@retailcrm.ru>
* @license MIT https://mit-license.org
* @link http://retailcrm.ru
* @see https://help.retailcrm.ru
*/
class CategoryInfo
{

View file

@ -4,10 +4,6 @@
*
* @category OrderDto
* @package RetailCrm\Model\Entity
* @author RetailCRM <integration@retailcrm.ru>
* @license http://retailcrm.ru Proprietary
* @link http://retailcrm.ru
* @see http://help.retailcrm.ru
*/
namespace RetailCrm\Model\Entity;
@ -20,10 +16,6 @@ use JMS\Serializer\Annotation as JMS;
*
* @category OrderDto
* @package RetailCrm\Model\Entity
* @author RetailDriver LLC <integration@retailcrm.ru>
* @license https://retailcrm.ru Proprietary
* @link http://retailcrm.ru
* @see https://help.retailcrm.ru
* @SuppressWarnings(PHPMD.TooManyFields)
*/
class OrderDto

View file

@ -4,10 +4,6 @@
*
* @category OrderProductDto
* @package RetailCrm\Model\Entity
* @author RetailCRM <integration@retailcrm.ru>
* @license http://retailcrm.ru Proprietary
* @link http://retailcrm.ru
* @see http://help.retailcrm.ru
*/
namespace RetailCrm\Model\Entity;
@ -20,10 +16,6 @@ use JMS\Serializer\Annotation as JMS;
*
* @category OrderProductDto
* @package RetailCrm\Model\Entity
* @author RetailDriver LLC <integration@retailcrm.ru>
* @license https://retailcrm.ru Proprietary
* @link http://retailcrm.ru
* @see https://help.retailcrm.ru
* @SuppressWarnings(PHPMD.TooManyFields)
*/
class OrderProductDto

View file

@ -4,10 +4,6 @@
*
* @category OrderProductDtoList
* @package RetailCrm\Model\Entity
* @author RetailCRM <integration@retailcrm.ru>
* @license http://retailcrm.ru Proprietary
* @link http://retailcrm.ru
* @see http://help.retailcrm.ru
*/
namespace RetailCrm\Model\Entity;
@ -19,10 +15,6 @@ use JMS\Serializer\Annotation as JMS;
*
* @category OrderProductDtoList
* @package RetailCrm\Model\Entity
* @author RetailDriver LLC <integration@retailcrm.ru>
* @license https://retailcrm.ru Proprietary
* @link http://retailcrm.ru
* @see https://help.retailcrm.ru
*/
class OrderProductDtoList
{

View file

@ -4,10 +4,6 @@
*
* @category SimpleMoney
* @package RetailCrm\Model\Entity
* @author RetailCRM <integration@retailcrm.ru>
* @license http://retailcrm.ru Proprietary
* @link http://retailcrm.ru
* @see http://help.retailcrm.ru
*/
namespace RetailCrm\Model\Entity;
@ -19,10 +15,6 @@ use JMS\Serializer\Annotation as JMS;
*
* @category SimpleMoney
* @package RetailCrm\Model\Entity
* @author RetailDriver LLC <integration@retailcrm.ru>
* @license https://retailcrm.ru Proprietary
* @link http://retailcrm.ru
* @see https://help.retailcrm.ru
*/
class SimpleMoney
{

View file

@ -4,10 +4,6 @@
*
* @category AvailableResponseFormats
* @package RetailCrm\Model\Enum
* @author RetailCRM <integration@retailcrm.ru>
* @license http://retailcrm.ru Proprietary
* @link http://retailcrm.ru
* @see http://help.retailcrm.ru
*/
namespace RetailCrm\Model\Enum;
@ -17,10 +13,6 @@ namespace RetailCrm\Model\Enum;
*
* @category AvailableResponseFormats
* @package RetailCrm\Model\Enum
* @author RetailDriver LLC <integration@retailcrm.ru>
* @license MIT https://mit-license.org
* @link http://retailcrm.ru
* @see https://help.retailcrm.ru
*/
class AvailableResponseFormats
{

View file

@ -4,10 +4,6 @@
*
* @category AvailableSignMethods
* @package RetailCrm\Model\Enum
* @author RetailCRM <integration@retailcrm.ru>
* @license http://retailcrm.ru Proprietary
* @link http://retailcrm.ru
* @see http://help.retailcrm.ru
*/
namespace RetailCrm\Model\Enum;
@ -17,10 +13,6 @@ namespace RetailCrm\Model\Enum;
*
* @category AvailableSignMethods
* @package RetailCrm\Model\Enum
* @author RetailDriver LLC <integration@retailcrm.ru>
* @license MIT https://mit-license.org
* @link http://retailcrm.ru
* @see https://help.retailcrm.ru
*/
class AvailableSignMethods
{

View file

@ -4,10 +4,6 @@
*
* @category BizTypes
* @package RetailCrm\Model\Enum
* @author RetailCRM <integration@retailcrm.ru>
* @license http://retailcrm.ru Proprietary
* @link http://retailcrm.ru
* @see http://help.retailcrm.ru
*/
namespace RetailCrm\Model\Enum;
@ -17,10 +13,6 @@ namespace RetailCrm\Model\Enum;
*
* @category BizTypes
* @package RetailCrm\Model\Enum
* @author RetailDriver LLC <integration@retailcrm.ru>
* @license https://retailcrm.ru Proprietary
* @link http://retailcrm.ru
* @see https://help.retailcrm.ru
*/
class BizTypes
{

View file

@ -4,10 +4,6 @@
*
* @category CategoryForecastSupportedLanguages
* @package RetailCrm\Model\Enum
* @author RetailCRM <integration@retailcrm.ru>
* @license http://retailcrm.ru Proprietary
* @link http://retailcrm.ru
* @see http://help.retailcrm.ru
*/
namespace RetailCrm\Model\Enum;
@ -17,10 +13,6 @@ namespace RetailCrm\Model\Enum;
*
* @category CategoryForecastSupportedLanguages
* @package RetailCrm\Model\Enum
* @author RetailDriver LLC <integration@retailcrm.ru>
* @license MIT https://mit-license.org
* @link http://retailcrm.ru
* @see https://help.retailcrm.ru
*/
class CategoryForecastSupportedLanguages
{

View file

@ -4,10 +4,6 @@
*
* @category DropshippingAreas
* @package RetailCrm\Model\Enum
* @author RetailCRM <integration@retailcrm.ru>
* @license http://retailcrm.ru Proprietary
* @link http://retailcrm.ru
* @see http://help.retailcrm.ru
*/
namespace RetailCrm\Model\Enum;
@ -17,10 +13,6 @@ namespace RetailCrm\Model\Enum;
*
* @category DropshippingAreas
* @package RetailCrm\Model\Enum
* @author RetailDriver LLC <integration@retailcrm.ru>
* @license https://retailcrm.ru Proprietary
* @link http://retailcrm.ru
* @see https://help.retailcrm.ru
*/
class DropshippingAreas
{

View file

@ -4,10 +4,6 @@
*
* @category FeedOperationTypes
* @package RetailCrm\Model\Enum
* @author RetailCRM <integration@retailcrm.ru>
* @license http://retailcrm.ru Proprietary
* @link http://retailcrm.ru
* @see http://help.retailcrm.ru
*/
namespace RetailCrm\Model\Enum;
@ -17,10 +13,6 @@ namespace RetailCrm\Model\Enum;
*
* @category FeedOperationTypes
* @package RetailCrm\Model\Enum
* @author RetailDriver LLC <integration@retailcrm.ru>
* @license MIT https://mit-license.org
* @link http://retailcrm.ru
* @see https://help.retailcrm.ru
*/
class FeedOperationTypes
{

View file

@ -4,10 +4,6 @@
*
* @category FeedStatuses
* @package RetailCrm\Model\Enum
* @author RetailCRM <integration@retailcrm.ru>
* @license http://retailcrm.ru Proprietary
* @link http://retailcrm.ru
* @see http://help.retailcrm.ru
*/
namespace RetailCrm\Model\Enum;
@ -17,10 +13,6 @@ namespace RetailCrm\Model\Enum;
*
* @category FeedStatuses
* @package RetailCrm\Model\Enum
* @author RetailDriver LLC <integration@retailcrm.ru>
* @license MIT https://mit-license.org
* @link http://retailcrm.ru
* @see https://help.retailcrm.ru
*/
class FeedStatuses
{

View file

@ -4,10 +4,6 @@
*
* @category FrozenStatuses
* @package RetailCrm\Model\Enum
* @author RetailCRM <integration@retailcrm.ru>
* @license http://retailcrm.ru Proprietary
* @link http://retailcrm.ru
* @see http://help.retailcrm.ru
*/
namespace RetailCrm\Model\Enum;
@ -17,10 +13,6 @@ namespace RetailCrm\Model\Enum;
*
* @category FrozenStatuses
* @package RetailCrm\Model\Enum
* @author RetailDriver LLC <integration@retailcrm.ru>
* @license https://retailcrm.ru Proprietary
* @link http://retailcrm.ru
* @see https://help.retailcrm.ru
*/
class FrozenStatuses
{

View file

@ -4,10 +4,6 @@
*
* @category FundsStatuses
* @package RetailCrm\Model\Enum
* @author RetailCRM <integration@retailcrm.ru>
* @license http://retailcrm.ru Proprietary
* @link http://retailcrm.ru
* @see http://help.retailcrm.ru
*/
namespace RetailCrm\Model\Enum;
@ -17,10 +13,6 @@ namespace RetailCrm\Model\Enum;
*
* @category FundsStatuses
* @package RetailCrm\Model\Enum
* @author RetailDriver LLC <integration@retailcrm.ru>
* @license https://retailcrm.ru Proprietary
* @link http://retailcrm.ru
* @see https://help.retailcrm.ru
*/
class FundsStatuses
{

View file

@ -4,10 +4,6 @@
*
* @category IssueStatuses
* @package RetailCrm\Model\Enum
* @author RetailCRM <integration@retailcrm.ru>
* @license http://retailcrm.ru Proprietary
* @link http://retailcrm.ru
* @see http://help.retailcrm.ru
*/
namespace RetailCrm\Model\Enum;
@ -17,10 +13,6 @@ namespace RetailCrm\Model\Enum;
*
* @category IssueStatuses
* @package RetailCrm\Model\Enum
* @author RetailDriver LLC <integration@retailcrm.ru>
* @license https://retailcrm.ru Proprietary
* @link http://retailcrm.ru
* @see https://help.retailcrm.ru
*/
class IssueStatuses
{

View file

@ -4,10 +4,6 @@
*
* @category LogisticsStatuses
* @package RetailCrm\Model\Enum
* @author RetailCRM <integration@retailcrm.ru>
* @license http://retailcrm.ru Proprietary
* @link http://retailcrm.ru
* @see http://help.retailcrm.ru
*/
namespace RetailCrm\Model\Enum;
@ -17,10 +13,6 @@ namespace RetailCrm\Model\Enum;
*
* @category LogisticsStatuses
* @package RetailCrm\Model\Enum
* @author RetailDriver LLC <integration@retailcrm.ru>
* @license https://retailcrm.ru Proprietary
* @link http://retailcrm.ru
* @see https://help.retailcrm.ru
*/
class LogisticsStatuses
{

View file

@ -4,10 +4,6 @@
*
* @category OfflinePickupTypes
* @package RetailCrm\Model\Enum
* @author RetailCRM <integration@retailcrm.ru>
* @license http://retailcrm.ru Proprietary
* @link http://retailcrm.ru
* @see http://help.retailcrm.ru
*/
namespace RetailCrm\Model\Enum;
@ -17,10 +13,6 @@ namespace RetailCrm\Model\Enum;
*
* @category OfflinePickupTypes
* @package RetailCrm\Model\Enum
* @author RetailDriver LLC <integration@retailcrm.ru>
* @license https://retailcrm.ru Proprietary
* @link http://retailcrm.ru
* @see https://help.retailcrm.ru
*/
class OfflinePickupTypes
{

View file

@ -4,10 +4,6 @@
*
* @category OrderStatuses
* @package RetailCrm\Model\Enum
* @author RetailCRM <integration@retailcrm.ru>
* @license http://retailcrm.ru Proprietary
* @link http://retailcrm.ru
* @see http://help.retailcrm.ru
*/
namespace RetailCrm\Model\Enum;
@ -17,10 +13,6 @@ namespace RetailCrm\Model\Enum;
*
* @category OrderStatuses
* @package RetailCrm\Model\Enum
* @author RetailDriver LLC <integration@retailcrm.ru>
* @license https://retailcrm.ru Proprietary
* @link http://retailcrm.ru
* @see https://help.retailcrm.ru
*/
class OrderStatuses
{
@ -40,7 +32,7 @@ class OrderStatuses
public const WAIT_BUYER_ACCEPT_GOODS = 'WAIT_BUYER_ACCEPT_GOODS';
// Buyer accepted, funds is in processing.
public const FUND_PROCESSING = 'FUND_PROCESSING';
public const PAYMENT_PROCESSING = 'PAYMENT_PROCESSING';
// Order is involved in the dispute.
public const IN_ISSUE = 'IN_ISSUE';
@ -51,12 +43,18 @@ class OrderStatuses
// Waiting for payment amount confirmation from seller.
public const WAIT_SELLER_EXAMINE_MONEY = 'WAIT_SELLER_EXAMINE_MONEY';
// Payment will be marked as completed in 24 hours.
// Payment was successful, but order is in risk control now.
public const RISK_CONTROL = 'RISK_CONTROL';
// Risk control resulted in hold, buyer should approve the payment.
public const RISK_CONTROL_HOLD = 'RISK_CONTROL_HOLD';
// Order is closed, no further actions needed.
public const FINISH = 'FINISH';
// Order is closed and now stored in the archive.
public const ARCHIVE = 'ARCHIVE';
// List of all order statuses.
public const STATUSES_LIST = [
self::PLACE_ORDER_SUCCESS,
@ -64,11 +62,13 @@ class OrderStatuses
self::WAIT_SELLER_SEND_GOODS,
self::SELLER_PART_SEND_GOODS,
self::WAIT_BUYER_ACCEPT_GOODS,
self::FUND_PROCESSING,
self::PAYMENT_PROCESSING,
self::IN_ISSUE,
self::IN_FROZEN,
self::WAIT_SELLER_EXAMINE_MONEY,
self::RISK_CONTROL,
self::FINISH
self::RISK_CONTROL_HOLD,
self::FINISH,
self::ARCHIVE
];
}

View file

@ -4,10 +4,6 @@
*
* @category ShippingTypes
* @package RetailCrm\Model\Enum
* @author RetailCRM <integration@retailcrm.ru>
* @license http://retailcrm.ru Proprietary
* @link http://retailcrm.ru
* @see http://help.retailcrm.ru
*/
namespace RetailCrm\Model\Enum;
@ -17,10 +13,6 @@ namespace RetailCrm\Model\Enum;
*
* @category ShippingTypes
* @package RetailCrm\Model\Enum
* @author RetailDriver LLC <integration@retailcrm.ru>
* @license https://retailcrm.ru Proprietary
* @link http://retailcrm.ru
* @see https://help.retailcrm.ru
*/
class ShippingTypes
{

View file

@ -5,10 +5,6 @@
*
* @category FileItem
* @package RetailCrm\Model
* @author RetailCRM <integration@retailcrm.ru>
* @license MIT https://mit-license.org
* @link http://retailcrm.ru
* @see http://help.retailcrm.ru
*/
namespace RetailCrm\Model;
@ -20,10 +16,6 @@ use RetailCrm\Interfaces\FileItemInterface;
*
* @category FileItem
* @package RetailCrm\Model
* @author RetailDriver LLC <integration@retailcrm.ru>
* @license MIT https://mit-license.org
* @link http://retailcrm.ru
* @see https://help.retailcrm.ru
*/
class FileItem implements FileItemInterface
{

View file

@ -4,10 +4,6 @@
*
* @category FeedPricesUpdateDto
* @package RetailCrm\Model\Request\AliExpress\Data
* @author RetailCRM <integration@retailcrm.ru>
* @license http://retailcrm.ru Proprietary
* @link http://retailcrm.ru
* @see http://help.retailcrm.ru
*/
namespace RetailCrm\Model\Request\AliExpress\Data;
@ -20,10 +16,6 @@ use RetailCrm\Interfaces\RequestDtoInterface;
*
* @category FeedPricesUpdateDto
* @package RetailCrm\Model\Request\AliExpress\Data
* @author RetailDriver LLC <integration@retailcrm.ru>
* @license https://retailcrm.ru Proprietary
* @link http://retailcrm.ru
* @see https://help.retailcrm.ru
*/
class FeedPricesUpdateDto implements RequestDtoInterface
{

View file

@ -4,10 +4,6 @@
*
* @category FeedStocksUpdateDto
* @package RetailCrm\Model\Request\AliExpress\Data
* @author RetailCRM <integration@retailcrm.ru>
* @license http://retailcrm.ru Proprietary
* @link http://retailcrm.ru
* @see http://help.retailcrm.ru
*/
namespace RetailCrm\Model\Request\AliExpress\Data;
@ -20,10 +16,6 @@ use RetailCrm\Interfaces\RequestDtoInterface;
*
* @category FeedStocksUpdateDto
* @package RetailCrm\Model\Request\AliExpress\Data
* @author RetailDriver LLC <integration@retailcrm.ru>
* @license https://retailcrm.ru Proprietary
* @link http://retailcrm.ru
* @see https://help.retailcrm.ru
*/
class FeedStocksUpdateDto implements RequestDtoInterface
{

View file

@ -4,10 +4,6 @@
*
* @category MaillingAddressRequestDto
* @package RetailCrm\Model\Request\AliExpress\Data
* @author RetailCRM <integration@retailcrm.ru>
* @license http://retailcrm.ru Proprietary
* @link http://retailcrm.ru
* @see http://help.retailcrm.ru
*/
namespace RetailCrm\Model\Request\AliExpress\Data;
@ -21,10 +17,6 @@ use Symfony\Component\Validator\Constraints as Assert;
*
* @category MaillingAddressRequestDto
* @package RetailCrm\Model\Request\AliExpress\Data
* @author RetailDriver LLC <integration@retailcrm.ru>
* @license https://retailcrm.ru Proprietary
* @link http://retailcrm.ru
* @see https://help.retailcrm.ru
* @SuppressWarnings(PHPMD.TooManyFields)
*/
class MaillingAddressRequestDto

View file

@ -0,0 +1,39 @@
<?php
/**
* PHP version 7.3
*
* @category MultipleProductInventoriesUpdateListQuery
* @package RetailCrm\Model\Request\AliExpress\Data
*/
namespace RetailCrm\Model\Request\AliExpress\Data;
use JMS\Serializer\Annotation as JMS;
use Symfony\Component\Validator\Constraints as Assert;
/**
* Class MultipleProductInventoriesUpdateListQuery
*
* @category MultipleProductInventoriesUpdateListQuery
* @package RetailCrm\Model\Request\AliExpress\Data
*/
class MultipleProductInventoriesUpdateListQuery
{
/**
* @var int $productId
*
* @JMS\Type("int")
* @JMS\SerializedName("product_id")
* @Assert\NotNull()
*/
public $productId;
/**
* @var \RetailCrm\Model\Request\AliExpress\Data\SkuStocksUpdateItemDto[] $multipleSkuUpdateList
*
* @JMS\Type("array<RetailCrm\Model\Request\AliExpress\Data\SkuStocksUpdateItemDto>")
* @JMS\SerializedName("multiple_sku_update_list")
* @Assert\NotNull()
*/
public $multipleSkuUpdateList;
}

View file

@ -0,0 +1,36 @@
<?php
/**
* PHP version 7.3
*
* @category MultipleProductUpdateListQuery
* @package RetailCrm\Model\Request\AliExpress\Data
*/
namespace RetailCrm\Model\Request\AliExpress\Data;
use JMS\Serializer\Annotation as JMS;
/**
* Class MultipleProductUpdateListQuery
*
* @category MultipleProductUpdateListQuery
* @package RetailCrm\Model\Request\AliExpress\Data
*/
class MultipleProductUpdateListQuery
{
/**
* @var int $productId
*
* @JMS\Type("int")
* @JMS\SerializedName("product_id")
*/
public $productId;
/**
* @var \RetailCrm\Model\Request\AliExpress\Data\SkuPricesUpdateItemDto[] $multipleSkuUpdateList
*
* @JMS\Type("array<RetailCrm\Model\Request\AliExpress\Data\SkuPricesUpdateItemDto>")
* @JMS\SerializedName("multiple_sku_update_list")
*/
public $multipleSkuUpdateList;
}

View file

@ -4,10 +4,6 @@
*
* @category OrderQuery
* @package RetailCrm\Model\Request\AliExpress\Data
* @author RetailCRM <integration@retailcrm.ru>
* @license http://retailcrm.ru Proprietary
* @link http://retailcrm.ru
* @see http://help.retailcrm.ru
*/
namespace RetailCrm\Model\Request\AliExpress\Data;
@ -22,10 +18,6 @@ use RetailCrm\Component\Validator\Constraints as TopAssert;
*
* @category OrderQuery
* @package RetailCrm\Model\Request\AliExpress\Data
* @author RetailDriver LLC <integration@retailcrm.ru>
* @license https://retailcrm.ru Proprietary
* @link http://retailcrm.ru
* @see https://help.retailcrm.ru
*/
class OrderQuery
{
@ -36,7 +28,7 @@ class OrderQuery
*
* @JMS\Type("DateTime<'Y-m-d H:i:s'>")
* @JMS\SerializedName("create_date_end")
* @TopAssert\Timezone("America/Los_Angeles")
* @TopAssert\Timezone("PST")
*/
public $createDateEnd;
@ -45,7 +37,7 @@ class OrderQuery
*
* @JMS\Type("DateTime<'Y-m-d H:i:s'>")
* @JMS\SerializedName("create_date_start")
* @TopAssert\Timezone("America/Los_Angeles")
* @TopAssert\Timezone("PST")
*/
public $createDateStart;
@ -54,7 +46,7 @@ class OrderQuery
*
* @JMS\Type("DateTime<'Y-m-d H:i:s'>")
* @JMS\SerializedName("modified_date_start")
* @TopAssert\Timezone("America/Los_Angeles")
* @TopAssert\Timezone("PST")
*/
public $modifiedDateStart;
@ -90,7 +82,7 @@ class OrderQuery
*
* @JMS\Type("DateTime<'Y-m-d H:i:s'>")
* @JMS\SerializedName("modified_date_end")
* @TopAssert\Timezone("America/Los_Angeles")
* @TopAssert\Timezone("PST")
*/
public $modifiedDateEnd;

View file

@ -4,10 +4,6 @@
*
* @category PlaceOrderRequest4OpenApiDto
* @package RetailCrm\Model\Request\AliExpress\Data
* @author RetailCRM <integration@retailcrm.ru>
* @license http://retailcrm.ru Proprietary
* @link http://retailcrm.ru
* @see http://help.retailcrm.ru
*/
namespace RetailCrm\Model\Request\AliExpress\Data;
@ -20,10 +16,6 @@ use Symfony\Component\Validator\Constraints as Assert;
*
* @category PlaceOrderRequest4OpenApiDto
* @package RetailCrm\Model\Request\AliExpress\Data
* @author RetailDriver LLC <integration@retailcrm.ru>
* @license https://retailcrm.ru Proprietary
* @link http://retailcrm.ru
* @see https://help.retailcrm.ru
*/
class PlaceOrderRequest4OpenApiDto
{

View file

@ -4,10 +4,6 @@
*
* @category ProductBaseItem
* @package RetailCrm\Model\Request\AliExpress\Data
* @author RetailCRM <integration@retailcrm.ru>
* @license http://retailcrm.ru Proprietary
* @link http://retailcrm.ru
* @see http://help.retailcrm.ru
*/
namespace RetailCrm\Model\Request\AliExpress\Data;
@ -19,10 +15,6 @@ use JMS\Serializer\Annotation as JMS;
*
* @category ProductBaseItem
* @package RetailCrm\Model\Request\AliExpress\Data
* @author RetailDriver LLC <integration@retailcrm.ru>
* @license https://retailcrm.ru Proprietary
* @link http://retailcrm.ru
* @see https://help.retailcrm.ru
*/
class ProductBaseItem
{

View file

@ -0,0 +1,160 @@
<?php
/**
* PHP version 7.3
*
* @category ProductGetQuery
* @package RetailCrm\Model\Request\AliExpress\Data
*/
namespace RetailCrm\Model\Request\AliExpress\Data;
use DateTime;
use JMS\Serializer\Annotation as JMS;
use Symfony\Component\Validator\Constraints as Assert;
use RetailCrm\Component\Validator\Constraints as TopAssert;
/**
* Class ProductGetQuery
*
* @category ProductGetQuery
* @package RetailCrm\Model\Request\AliExpress\Data
* @SuppressWarnings(PHPMD.TooManyFields)
*/
class ProductGetQuery
{
/**
* @var DateTime $gmtCreateEnd
*
* @JMS\Type("DateTime<'Y-m-d H:i:s'>")
* @JMS\SerializedName("gmt_create_end")
* @TopAssert\Timezone("PST")
*/
public $gmtCreateEnd;
/**
* @var DateTime $gmtCreateStart
*
* @JMS\Type("DateTime<'Y-m-d H:i:s'>")
* @JMS\SerializedName("gmt_create_start")
* @TopAssert\Timezone("PST")
*/
public $gmtCreateStart;
/**
* @var DateTime $gmtModifiedStart
*
* @JMS\Type("DateTime<'Y-m-d H:i:s'>")
* @JMS\SerializedName("gmt_modified_start")
* @TopAssert\Timezone("PST")
*/
public $modifiedDateStart;
/**
* @var int $pageSize
*
* @JMS\Type("int")
* @JMS\SerializedName("page_size")
* @Assert\GreaterThan(0)
*/
public $pageSize;
/**
* @var DateTime $gmtModifiedEnd
*
* @JMS\Type("DateTime<'Y-m-d H:i:s'>")
* @JMS\SerializedName("gmt_modified_end")
* @TopAssert\Timezone("PST")
*/
public $gmtModifiedEnd;
/**
* @var int $currentPage
*
* @JMS\Type("int")
* @JMS\SerializedName("current_page")
* @Assert\GreaterThan(0)
*/
public $currentPage;
/**
* @var string $skuCode
*
* @JMS\Type("string")
* @JMS\SerializedName("sku_code")
*/
public $skuCode;
/**
* @var int $productId
*
* @JMS\Type("int")
* @JMS\SerializedName("product_id")
*/
public $productId;
/**
* @var int $groupId
*
* @JMS\Type("int")
* @JMS\SerializedName("group_id")
*/
public $groupId;
/**
* @var string $productStatusType
*
* @JMS\Type("string")
* @JMS\SerializedName("product_status_type")
* @Assert\Choice({"onSelling", "offline", "auditing", "editingRequired"})
* @Assert\NotBlank()
*/
public $productStatusType;
/**
* @var string $subject
*
* @JMS\Type("string")
* @JMS\SerializedName("subject")
*/
public $subject;
/**
* @var string $wsDisplay
*
* @JMS\Type("string")
* @JMS\SerializedName("ws_display")
*/
public $wsDisplay;
/**
* @var string $haveNationalQuote
*
* @JMS\Type("string")
* @JMS\SerializedName("have_national_quote")
*/
public $haveNationalQuote;
/**
* @var string $ownerMemberId
*
* @JMS\Type("string")
* @JMS\SerializedName("owner_member_id")
*/
public $ownerMemberId;
/**
* @var int $offlineTime
*
* @JMS\Type("int")
* @JMS\SerializedName("off_line_time")
*/
public $offlineTime;
/**
* @var int[] $exceptedProductIds
*
* @JMS\Type("array<int>")
* @JMS\SerializedName("excepted_product_ids")
*/
public $exceptedProductIds;
}

View file

@ -4,10 +4,6 @@
*
* @category SingleItemRequestDto
* @package RetailCrm\Model\Request\AliExpress\Data
* @author RetailCRM <integration@retailcrm.ru>
* @license http://retailcrm.ru Proprietary
* @link http://retailcrm.ru
* @see http://help.retailcrm.ru
*/
namespace RetailCrm\Model\Request\AliExpress\Data;
@ -19,10 +15,6 @@ use JMS\Serializer\Annotation as JMS;
*
* @category SingleItemRequestDto
* @package RetailCrm\Model\Request\AliExpress\Data
* @author RetailDriver LLC <integration@retailcrm.ru>
* @license MIT https://mit-license.org
* @link http://retailcrm.ru
* @see https://help.retailcrm.ru
*/
class SingleItemRequestDto
{

View file

@ -4,10 +4,6 @@
*
* @category SingleOrderQuery
* @package RetailCrm\Model\Request\AliExpress\Data
* @author RetailCRM <integration@retailcrm.ru>
* @license http://retailcrm.ru Proprietary
* @link http://retailcrm.ru
* @see http://help.retailcrm.ru
*/
namespace RetailCrm\Model\Request\AliExpress\Data;
@ -19,10 +15,6 @@ use JMS\Serializer\Annotation as JMS;
*
* @category SingleOrderQuery
* @package RetailCrm\Model\Request\AliExpress\Data
* @author RetailDriver LLC <integration@retailcrm.ru>
* @license https://retailcrm.ru Proprietary
* @link http://retailcrm.ru
* @see https://help.retailcrm.ru
*/
class SingleOrderQuery
{

View file

@ -4,10 +4,6 @@
*
* @category SkuPricesUpdateItemDto
* @package RetailCrm\Model\Request\AliExpress\Data
* @author RetailCRM <integration@retailcrm.ru>
* @license http://retailcrm.ru Proprietary
* @link http://retailcrm.ru
* @see http://help.retailcrm.ru
*/
namespace RetailCrm\Model\Request\AliExpress\Data;
@ -19,10 +15,6 @@ use JMS\Serializer\Annotation as JMS;
*
* @category SkuPricesUpdateItemDto
* @package RetailCrm\Model\Request\AliExpress\Data
* @author RetailDriver LLC <integration@retailcrm.ru>
* @license https://retailcrm.ru Proprietary
* @link http://retailcrm.ru
* @see https://help.retailcrm.ru
*/
class SkuPricesUpdateItemDto
{

View file

@ -4,10 +4,6 @@
*
* @category SkuStocksUpdateItemDto
* @package RetailCrm\Model\Request\AliExpress\Data
* @author RetailCRM <integration@retailcrm.ru>
* @license http://retailcrm.ru Proprietary
* @link http://retailcrm.ru
* @see http://help.retailcrm.ru
*/
namespace RetailCrm\Model\Request\AliExpress\Data;
@ -19,10 +15,6 @@ use JMS\Serializer\Annotation as JMS;
*
* @category SkuStocksUpdateItemDto
* @package RetailCrm\Model\Request\AliExpress\Data
* @author RetailDriver LLC <integration@retailcrm.ru>
* @license https://retailcrm.ru Proprietary
* @link http://retailcrm.ru
* @see https://help.retailcrm.ru
*/
class SkuStocksUpdateItemDto
{

View file

@ -4,10 +4,6 @@
*
* @category LogisticsDsTrackingInfoQuery
* @package RetailCrm\Model\Request\AliExpress
* @author RetailCRM <integration@retailcrm.ru>
* @license http://retailcrm.ru Proprietary
* @link http://retailcrm.ru
* @see http://help.retailcrm.ru
*/
namespace RetailCrm\Model\Request\AliExpress;
@ -22,10 +18,6 @@ use RetailCrm\Model\Response\AliExpress\LogisticsDsTrackingInfoQueryResponse;
*
* @category LogisticsDsTrackingInfoQuery
* @package RetailCrm\Model\Request\AliExpress
* @author RetailDriver LLC <integration@retailcrm.ru>
* @license https://retailcrm.ru Proprietary
* @link http://retailcrm.ru
* @see https://help.retailcrm.ru
*/
class LogisticsDsTrackingInfoQuery extends BaseRequest
{

View file

@ -4,10 +4,6 @@
*
* @category LogisticsRedefiningListLogisticsService
* @package RetailCrm\Model\Request\AliExpress
* @author RetailCRM <integration@retailcrm.ru>
* @license http://retailcrm.ru Proprietary
* @link http://retailcrm.ru
* @see http://help.retailcrm.ru
*/
namespace RetailCrm\Model\Request\AliExpress;
@ -20,10 +16,6 @@ use RetailCrm\Model\Response\AliExpress\LogisticsRedefiningListLogisticsServiceR
*
* @category LogisticsRedefiningListLogisticsService
* @package RetailCrm\Model\Request\AliExpress
* @author RetailDriver LLC <integration@retailcrm.ru>
* @license https://retailcrm.ru Proprietary
* @link http://retailcrm.ru
* @see https://help.retailcrm.ru
*/
class LogisticsRedefiningListLogisticsService extends BaseRequest
{

View file

@ -4,10 +4,6 @@
*
* @category PostproductRedefiningCategoryForecastResponse
* @package RetailCrm\Model\Request\AliExpress
* @author RetailCRM <integration@retailcrm.ru>
* @license http://retailcrm.ru Proprietary
* @link http://retailcrm.ru
* @see http://help.retailcrm.ru
*/
namespace RetailCrm\Model\Request\AliExpress;
@ -22,10 +18,6 @@ use Symfony\Component\Validator\Constraints as Assert;
*
* @category PostproductRedefiningCategoryForecastResponse
* @package RetailCrm\Model\Request\AliExpress
* @author RetailDriver LLC <integration@retailcrm.ru>
* @license MIT https://mit-license.org
* @link http://retailcrm.ru
* @see https://help.retailcrm.ru
*/
class PostproductRedefiningCategoryForecast extends BaseRequest
{

View file

@ -4,10 +4,6 @@
*
* @category PostproductRedefiningFindAEProductByIdForDropshipper
* @package RetailCrm\Model\Request\AliExpress
* @author RetailCRM <integration@retailcrm.ru>
* @license http://retailcrm.ru Proprietary
* @link http://retailcrm.ru
* @see http://help.retailcrm.ru
*/
namespace RetailCrm\Model\Request\AliExpress;
@ -21,10 +17,6 @@ use RetailCrm\Model\Response\AliExpress\PostproductRedefiningFindAEProductByIdFo
*
* @category PostproductRedefiningFindAEProductByIdForDropshipper
* @package RetailCrm\Model\Request\AliExpress
* @author RetailDriver LLC <integration@retailcrm.ru>
* @license https://retailcrm.ru Proprietary
* @link http://retailcrm.ru
* @see https://help.retailcrm.ru
*/
class PostproductRedefiningFindAEProductByIdForDropshipper extends BaseRequest
{

View file

@ -0,0 +1,50 @@
<?php
/**
* PHP version 7.3
*
* @category SolutionBatchProductInventoryUpdate
* @package RetailCrm\Model\Request\AliExpress
*/
namespace RetailCrm\Model\Request\AliExpress;
use JMS\Serializer\Annotation as JMS;
use RetailCrm\Model\Request\BaseRequest;
use RetailCrm\Model\Response\AliExpress\SolutionBatchProductInventoryUpdateResponse;
use Symfony\Component\Validator\Constraints as Assert;
/**
* Class SolutionBatchProductInventoryUpdate
*
* @category SolutionBatchProductInventoryUpdate
* @package RetailCrm\Model\Request\AliExpress
*/
class SolutionBatchProductInventoryUpdate extends BaseRequest
{
/**
* @see https://developers.aliexpress.com/en/doc.htm?docId=45135&docType=2&ocId=45140
*
* @var \RetailCrm\Model\Request\AliExpress\Data\MultipleProductInventoriesUpdateListQuery $mutipleProductUpdateList
*
* @JMS\Type("RetailCrm\Model\Request\AliExpress\Data\MultipleProductInventoriesUpdateListQuery")
* @JMS\SerializedName("mutiple_product_update_list")
* @Assert\NotNull()
*/
public $mutipleProductUpdateList;
/**
* @inheritDoc
*/
public function getMethod(): string
{
return 'aliexpress.solution.batch.product.inventory.update';
}
/**
* @inheritDoc
*/
public function getExpectedResponse(): string
{
return SolutionBatchProductInventoryUpdateResponse::class;
}
}

View file

@ -0,0 +1,48 @@
<?php
/**
* PHP version 7.3
*
* @category SolutionBatchProductPriceUpdate
* @package RetailCrm\Model\Request\AliExpress
*/
namespace RetailCrm\Model\Request\AliExpress;
use JMS\Serializer\Annotation as JMS;
use RetailCrm\Model\Request\BaseRequest;
use RetailCrm\Model\Response\AliExpress\SolutionBatchProductPriceUpdateResponse;
/**
* Class SolutionBatchProductPriceUpdate
*
* @category SolutionBatchProductPriceUpdate
* @package RetailCrm\Model\Request\AliExpress
*/
class SolutionBatchProductPriceUpdate extends BaseRequest
{
/**
* @see https://developers.aliexpress.com/en/doc.htm?docId=45140&docType=2&ocId=45140
*
* @var \RetailCrm\Model\Request\AliExpress\Data\MultipleProductUpdateListQuery $mutipleProductUpdateList
*
* @JMS\Type("RetailCrm\Model\Request\AliExpress\Data\MultipleProductUpdateListQuery")
* @JMS\SerializedName("mutiple_product_update_list")
*/
public $mutipleProductUpdateList;
/**
* @inheritDoc
*/
public function getMethod(): string
{
return 'aliexpress.solution.batch.product.price.update';
}
/**
* @inheritDoc
*/
public function getExpectedResponse(): string
{
return SolutionBatchProductPriceUpdateResponse::class;
}
}

View file

@ -4,10 +4,6 @@
*
* @category SolutionFeedListGet
* @package RetailCrm\Model\Request\AliExpress
* @author RetailCRM <integration@retailcrm.ru>
* @license http://retailcrm.ru Proprietary
* @link http://retailcrm.ru
* @see http://help.retailcrm.ru
*/
namespace RetailCrm\Model\Request\AliExpress;
@ -21,10 +17,6 @@ use RetailCrm\Model\Response\AliExpress\SolutionFeedListGetResponse;
*
* @category SolutionFeedListGet
* @package RetailCrm\Model\Request\AliExpress
* @author RetailDriver LLC <integration@retailcrm.ru>
* @license MIT https://mit-license.org
* @link http://retailcrm.ru
* @see https://help.retailcrm.ru
*/
class SolutionFeedListGet extends BaseRequest
{

View file

@ -4,10 +4,6 @@
*
* @category SolutionFeedQuery
* @package RetailCrm\Model\Request\AliExpress
* @author RetailCRM <integration@retailcrm.ru>
* @license http://retailcrm.ru Proprietary
* @link http://retailcrm.ru
* @see http://help.retailcrm.ru
*/
namespace RetailCrm\Model\Request\AliExpress;
@ -21,10 +17,6 @@ use RetailCrm\Model\Response\AliExpress\SolutionFeedQueryResponse;
*
* @category SolutionFeedQuery
* @package RetailCrm\Model\Request\AliExpress
* @author RetailDriver LLC <integration@retailcrm.ru>
* @license MIT https://mit-license.org
* @link http://retailcrm.ru
* @see https://help.retailcrm.ru
*/
class SolutionFeedQuery extends BaseRequest
{

View file

@ -4,10 +4,6 @@
*
* @category SolutionFeedSubmit
* @package RetailCrm\Model\Request\AliExpress
* @author RetailCRM <integration@retailcrm.ru>
* @license http://retailcrm.ru Proprietary
* @link http://retailcrm.ru
* @see http://help.retailcrm.ru
*/
namespace RetailCrm\Model\Request\AliExpress;
@ -23,10 +19,6 @@ use Symfony\Component\Validator\Constraints as Assert;
*
* @category SolutionFeedSubmit
* @package RetailCrm\Model\Request\AliExpress
* @author RetailDriver LLC <integration@retailcrm.ru>
* @license MIT https://mit-license.org
* @link http://retailcrm.ru
* @see https://help.retailcrm.ru
*/
class SolutionFeedSubmit extends BaseRequest
{

View file

@ -4,10 +4,6 @@
*
* @category SolutionMerchantProfileGet
* @package RetailCrm\Model\Request\AliExpress
* @author RetailCRM <integration@retailcrm.ru>
* @license http://retailcrm.ru Proprietary
* @link http://retailcrm.ru
* @see http://help.retailcrm.ru
*/
namespace RetailCrm\Model\Request\AliExpress;
@ -20,10 +16,6 @@ use RetailCrm\Model\Response\AliExpress\SolutionMerchantProfileGetResponse;
*
* @category SolutionMerchantProfileGet
* @package RetailCrm\Model\Request\AliExpress
* @author RetailDriver LLC <integration@retailcrm.ru>
* @license https://retailcrm.ru Proprietary
* @link http://retailcrm.ru
* @see https://help.retailcrm.ru
*/
class SolutionMerchantProfileGet extends BaseRequest
{

View file

@ -4,10 +4,6 @@
*
* @category SolutionOrderFulfill
* @package RetailCrm\Model\Request\AliExpress
* @author RetailCRM <integration@retailcrm.ru>
* @license http://retailcrm.ru Proprietary
* @link http://retailcrm.ru
* @see http://help.retailcrm.ru
*/
namespace RetailCrm\Model\Request\AliExpress;
@ -22,10 +18,6 @@ use RetailCrm\Model\Response\AliExpress\SolutionOrderFulfillResponse;
*
* @category SolutionOrderFulfill
* @package RetailCrm\Model\Request\AliExpress
* @author RetailDriver LLC <integration@retailcrm.ru>
* @license https://retailcrm.ru Proprietary
* @link http://retailcrm.ru
* @see https://help.retailcrm.ru
*/
class SolutionOrderFulfill extends BaseRequest
{

View file

@ -4,10 +4,6 @@
*
* @category SolutionOrderGet
* @package RetailCrm\Model\Request\AliExpress
* @author RetailCRM <integration@retailcrm.ru>
* @license http://retailcrm.ru Proprietary
* @link http://retailcrm.ru
* @see http://help.retailcrm.ru
*/
namespace RetailCrm\Model\Request\AliExpress;
@ -21,10 +17,6 @@ use RetailCrm\Model\Response\AliExpress\SolutionOrderGetResponse;
*
* @category SolutionOrderGet
* @package RetailCrm\Model\Request\AliExpress
* @author RetailDriver LLC <integration@retailcrm.ru>
* @license https://retailcrm.ru Proprietary
* @link http://retailcrm.ru
* @see https://help.retailcrm.ru
*/
class SolutionOrderGet extends BaseRequest
{

View file

@ -4,10 +4,6 @@
*
* @category SolutionOrderReceiptInfoGet
* @package RetailCrm\Model\Request\AliExpress
* @author RetailCRM <integration@retailcrm.ru>
* @license http://retailcrm.ru Proprietary
* @link http://retailcrm.ru
* @see http://help.retailcrm.ru
*/
namespace RetailCrm\Model\Request\AliExpress;
@ -21,10 +17,6 @@ use RetailCrm\Model\Response\AliExpress\SolutionOrderReceiptInfoGetResponse;
*
* @category SolutionOrderReceiptInfoGet
* @package RetailCrm\Model\Request\AliExpress
* @author RetailDriver LLC <integration@retailcrm.ru>
* @license https://retailcrm.ru Proprietary
* @link http://retailcrm.ru
* @see https://help.retailcrm.ru
*/
class SolutionOrderReceiptInfoGet extends BaseRequest
{

Some files were not shown because too many files have changed in this diff Show more