feed stocks & prices models, necessary dropshipping models, authorization URI builder is usable now, client doesn't use GET requests, and etc
This commit is contained in:
parent
402c20d184
commit
cd553ef64e
@ -2,7 +2,7 @@
|
||||
"name": "retailcrm/aliexpress-top-client",
|
||||
"description": "API client implementation for AliExpress TOP.",
|
||||
"type": "library",
|
||||
"keywords": ["API", "retailCRM", "REST"],
|
||||
"keywords": ["API", "retailCRM", "REST", "AliExpress"],
|
||||
"homepage": "http://www.retailcrm.ru/",
|
||||
"authors": [
|
||||
{
|
||||
|
@ -13,6 +13,7 @@
|
||||
namespace RetailCrm\Builder;
|
||||
|
||||
use BadMethodCallException;
|
||||
use RetailCrm\Component\AuthorizationUri;
|
||||
use RetailCrm\Interfaces\BuilderInterface;
|
||||
|
||||
/**
|
||||
@ -64,16 +65,22 @@ class AuthorizationUriBuilder implements BuilderInterface
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public function build(): string
|
||||
public function build(): AuthorizationUri
|
||||
{
|
||||
return self::AUTHORIZE_URI . '?' . http_build_query($this->getParams());
|
||||
$state = $this->withState ? uniqid('aeauth', true) : null;
|
||||
|
||||
return new AuthorizationUri(
|
||||
self::AUTHORIZE_URI . '?' . http_build_query($this->getParams($state)),
|
||||
$state
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string|null $state
|
||||
*
|
||||
* @return array
|
||||
* @throws BadMethodCallException
|
||||
*/
|
||||
private function getParams(): array
|
||||
private function getParams(?string $state): array
|
||||
{
|
||||
if (empty($this->redirectUri)) {
|
||||
throw new BadMethodCallException('Redirect URI should not be empty');
|
||||
@ -84,7 +91,7 @@ class AuthorizationUriBuilder implements BuilderInterface
|
||||
'response_type' => 'code',
|
||||
'redirect_uri' => $this->redirectUri,
|
||||
'sp' => 'ae',
|
||||
'state' => $this->withState ? uniqid('aeauth', true) : null,
|
||||
'state' => $state,
|
||||
'view' => 'web'
|
||||
]);
|
||||
}
|
||||
|
60
src/Component/AuthorizationUri.php
Normal file
60
src/Component/AuthorizationUri.php
Normal file
@ -0,0 +1,60 @@
|
||||
<?php
|
||||
/**
|
||||
* PHP version 7.3
|
||||
*
|
||||
* @category AuthorizationUri
|
||||
* @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;
|
||||
|
||||
/**
|
||||
* Class AuthorizationUri
|
||||
*
|
||||
* @category AuthorizationUri
|
||||
* @package RetailCrm\Component
|
||||
* @author RetailDriver LLC <integration@retailcrm.ru>
|
||||
* @license https://retailcrm.ru Proprietary
|
||||
* @link http://retailcrm.ru
|
||||
* @see https://help.retailcrm.ru
|
||||
*/
|
||||
class AuthorizationUri
|
||||
{
|
||||
/** @var string $address */
|
||||
private $address;
|
||||
|
||||
/** @var string $state */
|
||||
private $state;
|
||||
|
||||
/**
|
||||
* AuthorizationUri constructor.
|
||||
*
|
||||
* @param string $address
|
||||
* @param string|null $state
|
||||
*/
|
||||
public function __construct(string $address, ?string $state)
|
||||
{
|
||||
$this->address = $address;
|
||||
$this->state = $state;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getAddress(): string
|
||||
{
|
||||
return $this->address;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getState(): string
|
||||
{
|
||||
return $this->state;
|
||||
}
|
||||
}
|
@ -163,23 +163,7 @@ class TopRequestFactory implements TopRequestFactoryInterface
|
||||
*/
|
||||
public function getRequestArray(BaseRequest $request): array
|
||||
{
|
||||
$requestData = $this->serializer->toArray($request);
|
||||
|
||||
foreach ($requestData as $key => $value) {
|
||||
if ($value instanceof FileItemInterface) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$requestData[$key] = $this->castValue($value);
|
||||
}
|
||||
|
||||
if (empty($requestData)) {
|
||||
throw new FactoryException('Empty request data');
|
||||
}
|
||||
|
||||
ksort($requestData);
|
||||
|
||||
return $requestData;
|
||||
return $this->processRequestArray($this->serializer->toArray($request));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -207,14 +191,15 @@ class TopRequestFactory implements TopRequestFactoryInterface
|
||||
return $this->makeMultipartRequest($appData->getServiceUrl(), $requestData);
|
||||
}
|
||||
|
||||
$queryData = http_build_query($requestData);
|
||||
$postData = http_build_query($requestData);
|
||||
|
||||
try {
|
||||
return $this->requestFactory
|
||||
->createRequest(
|
||||
'GET',
|
||||
$this->uriFactory->createUri($appData->getServiceUrl())->withQuery($queryData)
|
||||
)->withHeader('Content-Type', 'application/x-www-form-urlencoded');
|
||||
'POST',
|
||||
$this->uriFactory->createUri($appData->getServiceUrl())
|
||||
)->withBody($this->streamFactory->createStream($postData))
|
||||
->withHeader('content-type', 'application/x-www-form-urlencoded; charset=UTF-8');
|
||||
} catch (\Exception $exception) {
|
||||
throw new FactoryException(
|
||||
sprintf('Error building request: %s', $exception->getMessage()),
|
||||
@ -224,6 +209,31 @@ class TopRequestFactory implements TopRequestFactoryInterface
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array $requestData
|
||||
*
|
||||
* @return array
|
||||
* @throws \RetailCrm\Component\Exception\FactoryException
|
||||
*/
|
||||
protected function processRequestArray(array $requestData): array
|
||||
{
|
||||
foreach ($requestData as $key => $value) {
|
||||
if ($value instanceof FileItemInterface) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$requestData[$key] = $this->castValue($value);
|
||||
}
|
||||
|
||||
if (empty($requestData)) {
|
||||
throw new FactoryException('Empty request data');
|
||||
}
|
||||
|
||||
ksort($requestData);
|
||||
|
||||
return $requestData;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $endpoint
|
||||
* @param array $contents
|
||||
@ -251,7 +261,8 @@ class TopRequestFactory implements TopRequestFactoryInterface
|
||||
return $this->requestFactory
|
||||
->createRequest('POST', $this->uriFactory->createUri($endpoint))
|
||||
->withBody($stream)
|
||||
->withHeader('Content-Type', 'multipart/form-data; boundary="'.$builder->getBoundary().'"');
|
||||
->withHeader('Content-Type', 'multipart/form-data; boundary="'.$builder->getBoundary().'"')
|
||||
->withHeader('Content-Length', $stream->getSize());
|
||||
}
|
||||
|
||||
/**
|
||||
|
537
src/Model/Enum/DropshippingAreas.php
Normal file
537
src/Model/Enum/DropshippingAreas.php
Normal file
@ -0,0 +1,537 @@
|
||||
<?php
|
||||
/**
|
||||
* PHP version 7.3
|
||||
*
|
||||
* @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;
|
||||
|
||||
/**
|
||||
* Class DropshippingAreas
|
||||
*
|
||||
* @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
|
||||
{
|
||||
public const FIJI = 'FJ';
|
||||
public const FINLAND = 'FI';
|
||||
public const FRANCE = 'FR';
|
||||
public const FRANCE_METROPOLITAN = 'FX';
|
||||
public const FRENCH_GUIANA = 'GF';
|
||||
public const FRENCH_POLYNESIA = 'PF';
|
||||
public const FRENCH_SOUTHERN_TERRITORIES = 'TF';
|
||||
public const GABON = 'GA';
|
||||
public const GAMBIA = 'GM';
|
||||
public const GEORGIA = 'GE';
|
||||
public const GERMANY = 'DE';
|
||||
public const GHANA = 'GH';
|
||||
public const GIBRALTAR = 'GI';
|
||||
public const GREECE = 'GR';
|
||||
public const GREENLAND = 'GL';
|
||||
public const GRENADA = 'GD';
|
||||
public const GUADELOUPE = 'GP';
|
||||
public const GUAM = 'GU';
|
||||
public const GUATEMALA = 'GT';
|
||||
public const GUINEA = 'GN';
|
||||
public const GUINEA_BISSAU = 'GW';
|
||||
public const GUYANA = 'GY';
|
||||
public const HAITI = 'HT';
|
||||
public const HEARD_AND_MC_DONALD_ISLANDS = 'HM';
|
||||
public const HONDURAS = 'HN';
|
||||
public const HONG_KONG = 'HK';
|
||||
public const HUNGARY = 'HU';
|
||||
public const ICELAND = 'IS';
|
||||
public const INDIA = 'IN';
|
||||
public const INDONESIA = 'ID';
|
||||
public const IRAN = 'IR';
|
||||
public const IRAQ = 'IQ';
|
||||
public const IRELAND = 'IE';
|
||||
public const ISRAEL = 'IL';
|
||||
public const ITALY = 'IT';
|
||||
public const JAMAICA = 'JM';
|
||||
public const JAPAN = 'JP';
|
||||
public const JORDAN = 'JO';
|
||||
public const KAZAKHSTAN = 'KZ';
|
||||
public const KENYA = 'KE';
|
||||
public const KIRIBATI = 'KI';
|
||||
public const KUWAIT = 'KW';
|
||||
public const KYRGYZSTAN = 'KG';
|
||||
public const LAO_PEOPLES_DEMOCRATIC_REPUBLIC = 'LA';
|
||||
public const LATVIA = 'LV';
|
||||
public const LEBANON = 'LB';
|
||||
public const LESOTHO = 'LS';
|
||||
public const LIBERIA = 'LR';
|
||||
public const LIBYAN_ARAB_JAMAHIRIYA = 'LY';
|
||||
public const AFGHANISTAN = 'AF';
|
||||
public const ALBANIA = 'AL';
|
||||
public const ALGERIA = 'DZ';
|
||||
public const AMERICAN_SAMOA = 'AS';
|
||||
public const ANDORRA = 'AD';
|
||||
public const ANGOLA = 'AO';
|
||||
public const ANGUILLA = 'AI';
|
||||
public const ANTARCTICA = 'AQ';
|
||||
public const ANTIGUAAND_BARBUDA = 'AG';
|
||||
public const ARGENTINA = 'AR';
|
||||
public const ARMENIA = 'AM';
|
||||
public const ARUBA = 'AW';
|
||||
public const AUSTRALIA = 'AU';
|
||||
public const AUSTRIA = 'AT';
|
||||
public const AZERBAIJAN = 'AZ';
|
||||
public const BAHAMAS = 'BS';
|
||||
public const BAHRAIN = 'BH';
|
||||
public const BANGLADESH = 'BD';
|
||||
public const BARBADOS = 'BB';
|
||||
public const BELARUS = 'BY';
|
||||
public const BELGIUM = 'BE';
|
||||
public const BELIZE = 'BZ';
|
||||
public const BENIN = 'BJ';
|
||||
public const BERMUDA = 'BM';
|
||||
public const BHUTAN = 'BT';
|
||||
public const BOLIVIA = 'BO';
|
||||
public const BOSNIA_AND_HERZEGOVINA = 'BA';
|
||||
public const BOTSWANA = 'BW';
|
||||
public const BOUVET_ISLAND = 'BV';
|
||||
public const BRAZIL = 'BR';
|
||||
public const BRITISH_INDIAN_OCEAN_TERRITORY = 'IO';
|
||||
public const BRUNEI_DARUSSALAM = 'BN';
|
||||
public const BULGARIA = 'BG';
|
||||
public const BURKINA_FASO = 'BF';
|
||||
public const BURUNDI = 'BI';
|
||||
public const CAMBODIA = 'KH';
|
||||
public const CAMEROON = 'CM';
|
||||
public const CANADA = 'CA';
|
||||
public const CAPE_VERDE = 'CV';
|
||||
public const CAYMAN_ISLANDS = 'KY';
|
||||
public const CENTRAL_AFRICAN_REPUBLIC = 'CF';
|
||||
public const CHAD = 'TD';
|
||||
public const CHILE = 'CL';
|
||||
public const CHINA_MAINLAND = 'CN';
|
||||
public const CHRISTMAS_ISLAND = 'CX';
|
||||
public const COCOS_KEELING_ISLANDS = 'CC';
|
||||
public const COLOMBIA = 'CO';
|
||||
public const COMOROS = 'KM';
|
||||
public const THE_REPUBLIC_OF_CONGO = 'Congo';
|
||||
public const THE_DEMOCRATIC_REPUBLIC_OF_THE = 'Congo';
|
||||
public const COOK_ISLANDS = 'CK';
|
||||
public const COSTA_RICA = 'CR';
|
||||
public const COTE_D_IVOIRE = 'CI';
|
||||
public const CROATIA = 'HR';
|
||||
public const CUBA = 'CU';
|
||||
public const CYPRUS = 'CY';
|
||||
public const CZECH_REPUBLIC = 'CZ';
|
||||
public const DENMARK = 'DK';
|
||||
public const DJIBOUTI = 'DJ';
|
||||
public const DOMINICA = 'DM';
|
||||
public const DOMINICAN_REPUBLIC = 'DO';
|
||||
public const EAST_TIMOR = 'TP';
|
||||
public const ECUADOR = 'EC';
|
||||
public const EGYPT = 'EG';
|
||||
public const EL_SALVADOR = 'SV';
|
||||
public const EQUATORIAL_GUINEA = 'GQ';
|
||||
public const ERITREA = 'ER';
|
||||
public const ESTONIA = 'EE';
|
||||
public const ETHIOPIA = 'ET';
|
||||
public const FALKLAND_ISLANDS_MALVINAS = 'FK';
|
||||
public const FAROE_ISLANDS = 'FO';
|
||||
public const LIECHTENSTEIN = 'LI';
|
||||
public const LITHUANIA = 'LT';
|
||||
public const LUXEMBOURG = 'LU';
|
||||
public const MACAU = 'MO';
|
||||
public const MACEDONIA = 'MK';
|
||||
public const MADAGASCAR = 'MG';
|
||||
public const MALAWI = 'MW';
|
||||
public const MALAYSIA = 'MY';
|
||||
public const MALDIVES = 'MV';
|
||||
public const MALI = 'ML';
|
||||
public const MALTA = 'MT';
|
||||
public const MARSHALL_ISLANDS = 'MH';
|
||||
public const MARTINIQUE = 'MQ';
|
||||
public const MAURITANIA = 'MR';
|
||||
public const MAURITIUS = 'MU';
|
||||
public const MAYOTTE = 'YT';
|
||||
public const MEXICO = 'MX';
|
||||
public const MICRONESIA = 'FM';
|
||||
public const MOLDOVA = 'MD';
|
||||
public const MONACO = 'MC';
|
||||
public const MONGOLIA = 'MN';
|
||||
public const MONTSERRAT = 'MS';
|
||||
public const MOROCCO = 'MA';
|
||||
public const MOZAMBIQUE = 'MZ';
|
||||
public const MYANMAR = 'MM';
|
||||
public const NAMIBIA = 'NA';
|
||||
public const NAURU = 'NR';
|
||||
public const NEPAL = 'NP';
|
||||
public const NETHERLANDS = 'NL';
|
||||
public const NETHERLANDS_ANTILLES = 'AN';
|
||||
public const NEW_CALEDONIA = 'NC';
|
||||
public const NEW_ZEALAND = 'NZ';
|
||||
public const NICARAGUA = 'NI';
|
||||
public const NIGER = 'NE';
|
||||
public const NIGERIA = 'NG';
|
||||
public const NIUE = 'NU';
|
||||
public const NORFOLK_ISLAND = 'NF';
|
||||
public const NORTH_KOREA = 'KP';
|
||||
public const NORTHERN_MARIANA_ISLANDS = 'MP';
|
||||
public const NORWAY = 'NO';
|
||||
public const OMAN = 'OM';
|
||||
public const OTHER_COUNTRY = 'Other';
|
||||
public const PAKISTAN = 'PK';
|
||||
public const PALAU = 'PW';
|
||||
public const PALESTINE = 'PS';
|
||||
public const PANAMA = 'PA';
|
||||
public const PAPUA_NEW_GUINEA = 'PG';
|
||||
public const PARAGUAY = 'PY';
|
||||
public const PERU = 'PE';
|
||||
public const PHILIPPINES = 'PH';
|
||||
public const PITCAIRN = 'PN';
|
||||
public const POLAND = 'PL';
|
||||
public const PORTUGAL = 'PT';
|
||||
public const PUERTO_RICO = 'PR';
|
||||
public const QATAR = 'QA';
|
||||
public const REUNION = 'RE';
|
||||
public const ROMANIA = 'RO';
|
||||
public const RUSSIAN_FEDERATION = 'RU';
|
||||
public const RWANDA = 'RW';
|
||||
public const SAINT_KITTS_AND_NEVIS = 'KN';
|
||||
public const SAINT_LUCIA = 'LC';
|
||||
public const SAINT_VINCENT_AND_THE_GRENADINES = 'VC';
|
||||
public const SAMOA = 'WS';
|
||||
public const SAN_MARINO = 'SM';
|
||||
public const SAO_TOME_AND_PRINCIPE = 'ST';
|
||||
public const SAUDI_ARABIA = 'SA';
|
||||
public const SENEGAL = 'SN';
|
||||
public const SEYCHELLES = 'SC';
|
||||
public const SIERRA_LEONE = 'SL';
|
||||
public const SINGAPORE = 'SG';
|
||||
public const SLOVAKIA_SLOVAK_REPUBLIC = 'SK';
|
||||
public const SLOVENIA = 'SI';
|
||||
public const SOLOMON_ISLANDS = 'SB';
|
||||
public const SOMALIA = 'SO';
|
||||
public const SOUTH_AFRICA = 'ZA';
|
||||
public const SOUTH_KOREA = 'KR';
|
||||
public const SPAIN = 'ES';
|
||||
public const SRI_LANKA = 'LK';
|
||||
public const ST_HELENA = 'SH';
|
||||
public const ST_PIERRE_AND_MIQUELON = 'PM';
|
||||
public const SUDAN = 'SD';
|
||||
public const SURINAME = 'SR';
|
||||
public const SVALBARDAND_JAN_MAYEN_ISLANDS = 'SJ';
|
||||
public const SWAZILAND = 'SZ';
|
||||
public const SWEDEN = 'SE';
|
||||
public const SWITZERLAND = 'CH';
|
||||
public const SYRIAN_ARAB_REPUBLIC = 'SY';
|
||||
public const TAIWAN = 'TW';
|
||||
public const TAJIKISTAN = 'TJ';
|
||||
public const TANZANIA = 'TZ';
|
||||
public const THAILAND = 'TH';
|
||||
public const TOGO = 'TG';
|
||||
public const TOKELAU = 'TK';
|
||||
public const TONGA = 'TO';
|
||||
public const TRINIDADAND_TOBAGO = 'TT';
|
||||
public const TUNISIA = 'TN';
|
||||
public const TURKEY = 'TR';
|
||||
public const TURKMENISTAN = 'TM';
|
||||
public const TURKSAND_CAICOS_ISLANDS = 'TC';
|
||||
public const TUVALU = 'TV';
|
||||
public const UGANDA = 'UG';
|
||||
public const UKRAINE = 'UA';
|
||||
public const UNITED_ARAB_EMIRATES = 'AE';
|
||||
public const ISLE_OF_MAN = 'IM';
|
||||
public const UNITED_KINGDOM = 'UK';
|
||||
public const UNITED_STATES = 'US';
|
||||
public const UNITED_STATES_MINOR_OUTLYING_ISLANDS = 'UM';
|
||||
public const URUGUAY = 'UY';
|
||||
public const UZBEKISTAN = 'UZ';
|
||||
public const VANUATU = 'VU';
|
||||
public const VATICAN_CITY_STATE_HOLY_SEE = 'VA';
|
||||
public const VENEZUELA = 'VE';
|
||||
public const VIETNAM = 'VN';
|
||||
public const VIRGIN_ISLANDS_BRITISH = 'VG';
|
||||
public const VIRGIN_ISLANDS_US = 'VI';
|
||||
public const WALLIS_AND_FUTUNA_ISLANDS = 'WF';
|
||||
public const WESTERN_SAHARA = 'EH';
|
||||
public const YEMEN = 'YE';
|
||||
public const YUGOSLAVIA = 'YU';
|
||||
public const ZAMBIA = 'ZM';
|
||||
public const ZIMBABWE = 'ZW';
|
||||
public const SERBIA = 'SRB';
|
||||
public const MONTENEGRO = 'MNE';
|
||||
public const KOSOVO = 'KS';
|
||||
public const ZANZIBAR = 'EAZ';
|
||||
public const SAINT_BARTHELEMY = 'BLM';
|
||||
public const SAINT_MARTIN = 'MAF';
|
||||
public const GUERNSEY = 'GGY';
|
||||
public const JERSEY = 'JEY';
|
||||
public const SOUTH_GEORGIA_AND_THE_SOUTH_SANDWICH_ISLANDS = 'SGS';
|
||||
public const TIMOR_LESTE = 'TLS';
|
||||
public const ALAND_ISLANDS = 'ALA';
|
||||
public const ALDERNEY = 'GBA';
|
||||
public const ASCENSION_ISLAND = 'ASC';
|
||||
public const DROPSHIPPING_AREAS = [
|
||||
self::FIJI,
|
||||
self::FINLAND,
|
||||
self::FRANCE,
|
||||
self::FRANCE_METROPOLITAN,
|
||||
self::FRENCH_GUIANA,
|
||||
self::FRENCH_POLYNESIA,
|
||||
self::FRENCH_SOUTHERN_TERRITORIES,
|
||||
self::GABON,
|
||||
self::GAMBIA,
|
||||
self::GEORGIA,
|
||||
self::GERMANY,
|
||||
self::GHANA,
|
||||
self::GIBRALTAR,
|
||||
self::GREECE,
|
||||
self::GREENLAND,
|
||||
self::GRENADA,
|
||||
self::GUADELOUPE,
|
||||
self::GUAM,
|
||||
self::GUATEMALA,
|
||||
self::GUINEA,
|
||||
self::GUINEA_BISSAU,
|
||||
self::GUYANA,
|
||||
self::HAITI,
|
||||
self::HEARD_AND_MC_DONALD_ISLANDS,
|
||||
self::HONDURAS,
|
||||
self::HONG_KONG,
|
||||
self::HUNGARY,
|
||||
self::ICELAND,
|
||||
self::INDIA,
|
||||
self::INDONESIA,
|
||||
self::IRAN,
|
||||
self::IRAQ,
|
||||
self::IRELAND,
|
||||
self::ISRAEL,
|
||||
self::ITALY,
|
||||
self::JAMAICA,
|
||||
self::JAPAN,
|
||||
self::JORDAN,
|
||||
self::KAZAKHSTAN,
|
||||
self::KENYA,
|
||||
self::KIRIBATI,
|
||||
self::KUWAIT,
|
||||
self::KYRGYZSTAN,
|
||||
self::LAO_PEOPLES_DEMOCRATIC_REPUBLIC,
|
||||
self::LATVIA,
|
||||
self::LEBANON,
|
||||
self::LESOTHO,
|
||||
self::LIBERIA,
|
||||
self::LIBYAN_ARAB_JAMAHIRIYA,
|
||||
self::AFGHANISTAN,
|
||||
self::ALBANIA,
|
||||
self::ALGERIA,
|
||||
self::AMERICAN_SAMOA,
|
||||
self::ANDORRA,
|
||||
self::ANGOLA,
|
||||
self::ANGUILLA,
|
||||
self::ANTARCTICA,
|
||||
self::ANTIGUAAND_BARBUDA,
|
||||
self::ARGENTINA,
|
||||
self::ARMENIA,
|
||||
self::ARUBA,
|
||||
self::AUSTRALIA,
|
||||
self::AUSTRIA,
|
||||
self::AZERBAIJAN,
|
||||
self::BAHAMAS,
|
||||
self::BAHRAIN,
|
||||
self::BANGLADESH,
|
||||
self::BARBADOS,
|
||||
self::BELARUS,
|
||||
self::BELGIUM,
|
||||
self::BELIZE,
|
||||
self::BENIN,
|
||||
self::BERMUDA,
|
||||
self::BHUTAN,
|
||||
self::BOLIVIA,
|
||||
self::BOSNIA_AND_HERZEGOVINA,
|
||||
self::BOTSWANA,
|
||||
self::BOUVET_ISLAND,
|
||||
self::BRAZIL,
|
||||
self::BRITISH_INDIAN_OCEAN_TERRITORY,
|
||||
self::BRUNEI_DARUSSALAM,
|
||||
self::BULGARIA,
|
||||
self::BURKINA_FASO,
|
||||
self::BURUNDI,
|
||||
self::CAMBODIA,
|
||||
self::CAMEROON,
|
||||
self::CANADA,
|
||||
self::CAPE_VERDE,
|
||||
self::CAYMAN_ISLANDS,
|
||||
self::CENTRAL_AFRICAN_REPUBLIC,
|
||||
self::CHAD,
|
||||
self::CHILE,
|
||||
self::CHINA_MAINLAND,
|
||||
self::CHRISTMAS_ISLAND,
|
||||
self::COCOS_KEELING_ISLANDS,
|
||||
self::COLOMBIA,
|
||||
self::COMOROS,
|
||||
self::THE_REPUBLIC_OF_CONGO,
|
||||
self::THE_DEMOCRATIC_REPUBLIC_OF_THE,
|
||||
self::COOK_ISLANDS,
|
||||
self::COSTA_RICA,
|
||||
self::COTE_D_IVOIRE,
|
||||
self::CROATIA,
|
||||
self::CUBA,
|
||||
self::CYPRUS,
|
||||
self::CZECH_REPUBLIC,
|
||||
self::DENMARK,
|
||||
self::DJIBOUTI,
|
||||
self::DOMINICA,
|
||||
self::DOMINICAN_REPUBLIC,
|
||||
self::EAST_TIMOR,
|
||||
self::ECUADOR,
|
||||
self::EGYPT,
|
||||
self::EL_SALVADOR,
|
||||
self::EQUATORIAL_GUINEA,
|
||||
self::ERITREA,
|
||||
self::ESTONIA,
|
||||
self::ETHIOPIA,
|
||||
self::FALKLAND_ISLANDS_MALVINAS,
|
||||
self::FAROE_ISLANDS,
|
||||
self::LIECHTENSTEIN,
|
||||
self::LITHUANIA,
|
||||
self::LUXEMBOURG,
|
||||
self::MACAU,
|
||||
self::MACEDONIA,
|
||||
self::MADAGASCAR,
|
||||
self::MALAWI,
|
||||
self::MALAYSIA,
|
||||
self::MALDIVES,
|
||||
self::MALI,
|
||||
self::MALTA,
|
||||
self::MARSHALL_ISLANDS,
|
||||
self::MARTINIQUE,
|
||||
self::MAURITANIA,
|
||||
self::MAURITIUS,
|
||||
self::MAYOTTE,
|
||||
self::MEXICO,
|
||||
self::MICRONESIA,
|
||||
self::MOLDOVA,
|
||||
self::MONACO,
|
||||
self::MONGOLIA,
|
||||
self::MONTSERRAT,
|
||||
self::MOROCCO,
|
||||
self::MOZAMBIQUE,
|
||||
self::MYANMAR,
|
||||
self::NAMIBIA,
|
||||
self::NAURU,
|
||||
self::NEPAL,
|
||||
self::NETHERLANDS,
|
||||
self::NETHERLANDS_ANTILLES,
|
||||
self::NEW_CALEDONIA,
|
||||
self::NEW_ZEALAND,
|
||||
self::NICARAGUA,
|
||||
self::NIGER,
|
||||
self::NIGERIA,
|
||||
self::NIUE,
|
||||
self::NORFOLK_ISLAND,
|
||||
self::NORTH_KOREA,
|
||||
self::NORTHERN_MARIANA_ISLANDS,
|
||||
self::NORWAY,
|
||||
self::OMAN,
|
||||
self::OTHER_COUNTRY,
|
||||
self::PAKISTAN,
|
||||
self::PALAU,
|
||||
self::PALESTINE,
|
||||
self::PANAMA,
|
||||
self::PAPUA_NEW_GUINEA,
|
||||
self::PARAGUAY,
|
||||
self::PERU,
|
||||
self::PHILIPPINES,
|
||||
self::PITCAIRN,
|
||||
self::POLAND,
|
||||
self::PORTUGAL,
|
||||
self::PUERTO_RICO,
|
||||
self::QATAR,
|
||||
self::REUNION,
|
||||
self::ROMANIA,
|
||||
self::RUSSIAN_FEDERATION,
|
||||
self::RWANDA,
|
||||
self::SAINT_KITTS_AND_NEVIS,
|
||||
self::SAINT_LUCIA,
|
||||
self::SAINT_VINCENT_AND_THE_GRENADINES,
|
||||
self::SAMOA,
|
||||
self::SAN_MARINO,
|
||||
self::SAO_TOME_AND_PRINCIPE,
|
||||
self::SAUDI_ARABIA,
|
||||
self::SENEGAL,
|
||||
self::SEYCHELLES,
|
||||
self::SIERRA_LEONE,
|
||||
self::SINGAPORE,
|
||||
self::SLOVAKIA_SLOVAK_REPUBLIC,
|
||||
self::SLOVENIA,
|
||||
self::SOLOMON_ISLANDS,
|
||||
self::SOMALIA,
|
||||
self::SOUTH_AFRICA,
|
||||
self::SOUTH_KOREA,
|
||||
self::SPAIN,
|
||||
self::SRI_LANKA,
|
||||
self::ST_HELENA,
|
||||
self::ST_PIERRE_AND_MIQUELON,
|
||||
self::SUDAN,
|
||||
self::SURINAME,
|
||||
self::SVALBARDAND_JAN_MAYEN_ISLANDS,
|
||||
self::SWAZILAND,
|
||||
self::SWEDEN,
|
||||
self::SWITZERLAND,
|
||||
self::SYRIAN_ARAB_REPUBLIC,
|
||||
self::TAIWAN,
|
||||
self::TAJIKISTAN,
|
||||
self::TANZANIA,
|
||||
self::THAILAND,
|
||||
self::TOGO,
|
||||
self::TOKELAU,
|
||||
self::TONGA,
|
||||
self::TRINIDADAND_TOBAGO,
|
||||
self::TUNISIA,
|
||||
self::TURKEY,
|
||||
self::TURKMENISTAN,
|
||||
self::TURKSAND_CAICOS_ISLANDS,
|
||||
self::TUVALU,
|
||||
self::UGANDA,
|
||||
self::UKRAINE,
|
||||
self::UNITED_ARAB_EMIRATES,
|
||||
self::ISLE_OF_MAN,
|
||||
self::UNITED_KINGDOM,
|
||||
self::UNITED_STATES,
|
||||
self::UNITED_STATES_MINOR_OUTLYING_ISLANDS,
|
||||
self::URUGUAY,
|
||||
self::UZBEKISTAN,
|
||||
self::VANUATU,
|
||||
self::VATICAN_CITY_STATE_HOLY_SEE,
|
||||
self::VENEZUELA,
|
||||
self::VIETNAM,
|
||||
self::VIRGIN_ISLANDS_BRITISH,
|
||||
self::VIRGIN_ISLANDS_US,
|
||||
self::WALLIS_AND_FUTUNA_ISLANDS,
|
||||
self::WESTERN_SAHARA,
|
||||
self::YEMEN,
|
||||
self::YUGOSLAVIA,
|
||||
self::ZAMBIA,
|
||||
self::ZIMBABWE,
|
||||
self::SERBIA,
|
||||
self::MONTENEGRO,
|
||||
self::KOSOVO,
|
||||
self::ZANZIBAR,
|
||||
self::SAINT_BARTHELEMY,
|
||||
self::SAINT_MARTIN,
|
||||
self::GUERNSEY,
|
||||
self::JERSEY,
|
||||
self::SOUTH_GEORGIA_AND_THE_SOUTH_SANDWICH_ISLANDS,
|
||||
self::TIMOR_LESTE,
|
||||
self::ALAND_ISLANDS,
|
||||
self::ALDERNEY,
|
||||
self::ASCENSION_ISLAND
|
||||
];
|
||||
}
|
45
src/Model/Request/AliExpress/Data/FeedPricesUpdateDto.php
Normal file
45
src/Model/Request/AliExpress/Data/FeedPricesUpdateDto.php
Normal file
@ -0,0 +1,45 @@
|
||||
<?php
|
||||
/**
|
||||
* PHP version 7.3
|
||||
*
|
||||
* @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;
|
||||
|
||||
use JMS\Serializer\Annotation as JMS;
|
||||
use RetailCrm\Interfaces\RequestDtoInterface;
|
||||
|
||||
/**
|
||||
* Class FeedPricesUpdateDto
|
||||
*
|
||||
* @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
|
||||
{
|
||||
/**
|
||||
* @var int $aliexpressProductId
|
||||
*
|
||||
* @JMS\Type("int")
|
||||
* @JMS\SerializedName("aliexpress_product_id")
|
||||
*/
|
||||
public $aliexpressProductId;
|
||||
|
||||
/**
|
||||
* @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;
|
||||
}
|
45
src/Model/Request/AliExpress/Data/FeedStocksUpdateDto.php
Normal file
45
src/Model/Request/AliExpress/Data/FeedStocksUpdateDto.php
Normal file
@ -0,0 +1,45 @@
|
||||
<?php
|
||||
/**
|
||||
* PHP version 7.3
|
||||
*
|
||||
* @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;
|
||||
|
||||
use JMS\Serializer\Annotation as JMS;
|
||||
use RetailCrm\Interfaces\RequestDtoInterface;
|
||||
|
||||
/**
|
||||
* Class FeedStocksUpdateDto
|
||||
*
|
||||
* @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
|
||||
{
|
||||
/**
|
||||
* @var int $aliexpressProductId
|
||||
*
|
||||
* @JMS\Type("int")
|
||||
* @JMS\SerializedName("aliexpress_product_id")
|
||||
*/
|
||||
public $aliexpressProductId;
|
||||
|
||||
/**
|
||||
* @var \RetailCrm\Model\Request\AliExpress\Data\SkuStocksUpdateItemDto[] $multipleSkuUpdateList
|
||||
*
|
||||
* @JMS\Type("array<RetailCrm\Model\Request\AliExpress\Data\SkuStocksUpdateItemDto>")
|
||||
* @JMS\SerializedName("multiple_sku_update_list")
|
||||
*/
|
||||
public $multipleSkuUpdateList;
|
||||
}
|
160
src/Model/Request/AliExpress/Data/MaillingAddressRequestDto.php
Normal file
160
src/Model/Request/AliExpress/Data/MaillingAddressRequestDto.php
Normal file
@ -0,0 +1,160 @@
|
||||
<?php
|
||||
/**
|
||||
* PHP version 7.3
|
||||
*
|
||||
* @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;
|
||||
|
||||
use DateTime;
|
||||
use JMS\Serializer\Annotation as JMS;
|
||||
use Symfony\Component\Validator\Constraints as Assert;
|
||||
|
||||
/**
|
||||
* Class MaillingAddressRequestDto
|
||||
*
|
||||
* @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
|
||||
{
|
||||
/**
|
||||
* @var string $address
|
||||
*
|
||||
* @JMS\Type("string")
|
||||
* @JMS\SerializedName("address")
|
||||
* @Assert\NotBlank()
|
||||
*/
|
||||
public $address;
|
||||
|
||||
/**
|
||||
* @var string $address2
|
||||
*
|
||||
* @JMS\Type("string")
|
||||
* @JMS\SerializedName("address2")
|
||||
*/
|
||||
public $address2;
|
||||
|
||||
/**
|
||||
* @var string $city
|
||||
*
|
||||
* @JMS\Type("string")
|
||||
* @JMS\SerializedName("city")
|
||||
*/
|
||||
public $city;
|
||||
|
||||
/**
|
||||
* @var string $contactPerson
|
||||
*
|
||||
* @JMS\Type("string")
|
||||
* @JMS\SerializedName("contact_person")
|
||||
*/
|
||||
public $contactPerson;
|
||||
|
||||
/**
|
||||
* @var string $country
|
||||
*
|
||||
* @JMS\Type("string")
|
||||
* @JMS\SerializedName("country")
|
||||
*/
|
||||
public $country;
|
||||
|
||||
/**
|
||||
* @var string $cpf
|
||||
*
|
||||
* @JMS\Type("string")
|
||||
* @JMS\SerializedName("cpf")
|
||||
*/
|
||||
public $cpf;
|
||||
|
||||
/**
|
||||
* @var string $fullName
|
||||
*
|
||||
* @JMS\Type("string")
|
||||
* @JMS\SerializedName("full_name")
|
||||
*/
|
||||
public $fullName;
|
||||
|
||||
/**
|
||||
* @var string $locale
|
||||
*
|
||||
* @JMS\Type("string")
|
||||
* @JMS\SerializedName("locale")
|
||||
*/
|
||||
public $locale;
|
||||
|
||||
/**
|
||||
* @var string $mobileNo
|
||||
*
|
||||
* @JMS\Type("string")
|
||||
* @JMS\SerializedName("mobile_no")
|
||||
*/
|
||||
public $mobileNo;
|
||||
|
||||
/**
|
||||
* @var string $passportNo
|
||||
*
|
||||
* @JMS\Type("string")
|
||||
* @JMS\SerializedName("passport_no")
|
||||
*/
|
||||
public $passportNo;
|
||||
|
||||
/**
|
||||
* @var DateTime $passportNoDate
|
||||
*
|
||||
* @JMS\Type("DateTime<'Y-m-d'>")
|
||||
* @JMS\SerializedName("passport_no_date")
|
||||
*/
|
||||
public $passportNoDate;
|
||||
|
||||
/**
|
||||
* @var string $passportOrganization
|
||||
*
|
||||
* @JMS\Type("string")
|
||||
* @JMS\SerializedName("passport_organization")
|
||||
*/
|
||||
public $passportOrganization;
|
||||
|
||||
/**
|
||||
* @var string $phoneCountry
|
||||
*
|
||||
* @JMS\Type("string")
|
||||
* @JMS\SerializedName("phone_country")
|
||||
*/
|
||||
public $phoneCountry;
|
||||
|
||||
/**
|
||||
* @var string $province
|
||||
*
|
||||
* @JMS\Type("string")
|
||||
* @JMS\SerializedName("province")
|
||||
*/
|
||||
public $province;
|
||||
|
||||
/**
|
||||
* @var string $taxNumber
|
||||
*
|
||||
* @JMS\Type("string")
|
||||
* @JMS\SerializedName("tax_number")
|
||||
*/
|
||||
public $taxNumber;
|
||||
|
||||
/**
|
||||
* @var string $zip
|
||||
*
|
||||
* @JMS\Type("string")
|
||||
* @JMS\SerializedName("zip")
|
||||
*/
|
||||
public $zip;
|
||||
}
|
@ -0,0 +1,46 @@
|
||||
<?php
|
||||
/**
|
||||
* PHP version 7.3
|
||||
*
|
||||
* @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;
|
||||
|
||||
use JMS\Serializer\Annotation as JMS;
|
||||
use Symfony\Component\Validator\Constraints as Assert;
|
||||
|
||||
/**
|
||||
* Class PlaceOrderRequest4OpenApiDto
|
||||
*
|
||||
* @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
|
||||
{
|
||||
/**
|
||||
* @var MaillingAddressRequestDto $logisticsAddress
|
||||
*
|
||||
* @JMS\Type("RetailCrm\Model\Request\AliExpress\Data\MaillingAddressRequestDto")
|
||||
* @JMS\SerializedName("logistics_address")
|
||||
* @Assert\NotNull()
|
||||
*/
|
||||
public $logisticsAddress;
|
||||
|
||||
/**
|
||||
* @var \RetailCrm\Model\Request\AliExpress\Data\ProductBaseItem[] $productItems
|
||||
*
|
||||
* @JMS\Type("array<RetailCrm\Model\Request\AliExpress\Data\ProductBaseItem>")
|
||||
* @JMS\SerializedName("product_items")
|
||||
*/
|
||||
public $productItems;
|
||||
}
|
68
src/Model/Request/AliExpress/Data/ProductBaseItem.php
Normal file
68
src/Model/Request/AliExpress/Data/ProductBaseItem.php
Normal file
@ -0,0 +1,68 @@
|
||||
<?php
|
||||
/**
|
||||
* PHP version 7.3
|
||||
*
|
||||
* @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;
|
||||
|
||||
use JMS\Serializer\Annotation as JMS;
|
||||
|
||||
/**
|
||||
* Class ProductBaseItem
|
||||
*
|
||||
* @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
|
||||
{
|
||||
/**
|
||||
* @var int $productCount
|
||||
*
|
||||
* @JMS\Type("int")
|
||||
* @JMS\SerializedName("product_count")
|
||||
*/
|
||||
public $productCount;
|
||||
|
||||
/**
|
||||
* @var int $productId
|
||||
*
|
||||
* @JMS\Type("int")
|
||||
* @JMS\SerializedName("product_id")
|
||||
*/
|
||||
public $productId;
|
||||
|
||||
/**
|
||||
* @var string $skuAttr
|
||||
*
|
||||
* @JMS\Type("string")
|
||||
* @JMS\SerializedName("sku_attr")
|
||||
*/
|
||||
public $skuAttr;
|
||||
|
||||
/**
|
||||
* @var string $logisticsServiceName
|
||||
*
|
||||
* @JMS\Type("string")
|
||||
* @JMS\SerializedName("logistics_service_name")
|
||||
*/
|
||||
public $logisticsServiceName;
|
||||
|
||||
/**
|
||||
* @var string $orderMemo
|
||||
*
|
||||
* @JMS\Type("string")
|
||||
* @JMS\SerializedName("order_memo")
|
||||
*/
|
||||
public $orderMemo;
|
||||
}
|
@ -30,7 +30,7 @@ class SingleItemRequestDto
|
||||
* Any value here will be serialized to JSON before serializing entire model.
|
||||
* Only array and RequestDtoInterface are viable here.
|
||||
*
|
||||
* @var \RetailCrm\Interfaces\RequestDtoInterface $itemContent
|
||||
* @var \RetailCrm\Interfaces\RequestDtoInterface|array $itemContent
|
||||
*
|
||||
* @JMS\Type("RetailCrm\Interfaces\RequestDtoInterface")
|
||||
* @JMS\SerializedName("item_content")
|
||||
|
52
src/Model/Request/AliExpress/Data/SkuPricesUpdateItemDto.php
Normal file
52
src/Model/Request/AliExpress/Data/SkuPricesUpdateItemDto.php
Normal file
@ -0,0 +1,52 @@
|
||||
<?php
|
||||
/**
|
||||
* PHP version 7.3
|
||||
*
|
||||
* @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;
|
||||
|
||||
use JMS\Serializer\Annotation as JMS;
|
||||
|
||||
/**
|
||||
* Class SkuPricesUpdateItemDto
|
||||
*
|
||||
* @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
|
||||
{
|
||||
/**
|
||||
* @var string $skuCode
|
||||
*
|
||||
* @JMS\Type("string")
|
||||
* @JMS\SerializedName("sku_code")
|
||||
*/
|
||||
public $skuCode;
|
||||
|
||||
/**
|
||||
* @var float $price
|
||||
*
|
||||
* @JMS\Type("float")
|
||||
* @JMS\SerializedName("price")
|
||||
*/
|
||||
public $price;
|
||||
|
||||
/**
|
||||
* @var float $discountPrice
|
||||
*
|
||||
* @JMS\Type("float")
|
||||
* @JMS\SerializedName("discount_price")
|
||||
*/
|
||||
public $discountPrice;
|
||||
}
|
44
src/Model/Request/AliExpress/Data/SkuStocksUpdateItemDto.php
Normal file
44
src/Model/Request/AliExpress/Data/SkuStocksUpdateItemDto.php
Normal file
@ -0,0 +1,44 @@
|
||||
<?php
|
||||
/**
|
||||
* PHP version 7.3
|
||||
*
|
||||
* @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;
|
||||
|
||||
use JMS\Serializer\Annotation as JMS;
|
||||
|
||||
/**
|
||||
* Class SkuStocksUpdateItemDto
|
||||
*
|
||||
* @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
|
||||
{
|
||||
/**
|
||||
* @var string $skuCode
|
||||
*
|
||||
* @JMS\Type("string")
|
||||
* @JMS\SerializedName("sku_code")
|
||||
*/
|
||||
public $skuCode;
|
||||
|
||||
/**
|
||||
* @var int $inventory
|
||||
*
|
||||
* @JMS\Type("int")
|
||||
* @JMS\SerializedName("inventory")
|
||||
*/
|
||||
public $inventory;
|
||||
}
|
@ -0,0 +1,93 @@
|
||||
<?php
|
||||
/**
|
||||
* PHP version 7.3
|
||||
*
|
||||
* @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;
|
||||
|
||||
use JMS\Serializer\Annotation as JMS;
|
||||
use RetailCrm\Model\Request\BaseRequest;
|
||||
use Symfony\Component\Validator\Constraints as Assert;
|
||||
use RetailCrm\Model\Response\AliExpress\LogisticsDsTrackingInfoQueryResponse;
|
||||
|
||||
/**
|
||||
* Class LogisticsDsTrackingInfoQuery
|
||||
*
|
||||
* @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
|
||||
{
|
||||
/**
|
||||
* @var string $logisticsNo
|
||||
*
|
||||
* @JMS\Type("string")
|
||||
* @JMS\SerializedName("logistics_no")
|
||||
* @Assert\NotBlank()
|
||||
*/
|
||||
public $logisticsNo;
|
||||
|
||||
/**
|
||||
* @var string $origin
|
||||
*
|
||||
* @JMS\Type("string")
|
||||
* @JMS\SerializedName("origin")
|
||||
* @Assert\NotBlank()
|
||||
*/
|
||||
public $origin = 'ESCROW';
|
||||
|
||||
/**
|
||||
* @var string $outRef
|
||||
*
|
||||
* @JMS\Type("string")
|
||||
* @JMS\SerializedName("out_ref")
|
||||
* @Assert\NotBlank()
|
||||
*/
|
||||
public $outRef;
|
||||
|
||||
/**
|
||||
* @var string $serviceName
|
||||
*
|
||||
* @JMS\Type("string")
|
||||
* @JMS\SerializedName("service_name")
|
||||
* @Assert\NotBlank()
|
||||
*/
|
||||
public $serviceName;
|
||||
|
||||
/**
|
||||
* @var string $toArea
|
||||
*
|
||||
* @JMS\Type("string")
|
||||
* @JMS\SerializedName("to_area")
|
||||
* @Assert\NotBlank()
|
||||
* @Assert\Choice(choices=RetailCrm\Model\Enum\DropshippingAreas::DROPSHIPPING_AREAS)
|
||||
*/
|
||||
public $toArea;
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public function getMethod(): string
|
||||
{
|
||||
return 'aliexpress.logistics.ds.trackinginfo.query';
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public function getExpectedResponse(): string
|
||||
{
|
||||
return LogisticsDsTrackingInfoQueryResponse::class;
|
||||
}
|
||||
}
|
@ -0,0 +1,70 @@
|
||||
<?php
|
||||
/**
|
||||
* PHP version 7.3
|
||||
*
|
||||
* @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;
|
||||
|
||||
use JMS\Serializer\Annotation as JMS;
|
||||
use RetailCrm\Model\Request\BaseRequest;
|
||||
use RetailCrm\Model\Response\AliExpress\PostproductRedefiningFindAEProductByIdForDropshipperResponse;
|
||||
|
||||
/**
|
||||
* Class PostproductRedefiningFindAEProductByIdForDropshipper
|
||||
*
|
||||
* @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
|
||||
{
|
||||
/**
|
||||
* @var int $productId
|
||||
*
|
||||
* @JMS\Type("int")
|
||||
* @JMS\SerializedName("product_id")
|
||||
*/
|
||||
public $productId;
|
||||
|
||||
/**
|
||||
* @var string $localCountry
|
||||
*
|
||||
* @JMS\Type("string")
|
||||
* @JMS\SerializedName("local_country")
|
||||
*/
|
||||
public $localCountry;
|
||||
|
||||
/**
|
||||
* @var string $localLanguage
|
||||
*
|
||||
* @JMS\Type("string")
|
||||
* @JMS\SerializedName("local_language")
|
||||
*/
|
||||
public $localLanguage;
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public function getMethod(): string
|
||||
{
|
||||
return 'aliexpress.postproduct.redefining.findaeproductbyidfordropshipper';
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public function getExpectedResponse(): string
|
||||
{
|
||||
return PostproductRedefiningFindAEProductByIdForDropshipperResponse::class;
|
||||
}
|
||||
}
|
56
src/Model/Request/AliExpress/TradeBuyPlaceOrder.php
Normal file
56
src/Model/Request/AliExpress/TradeBuyPlaceOrder.php
Normal file
@ -0,0 +1,56 @@
|
||||
<?php
|
||||
/**
|
||||
* PHP version 7.3
|
||||
*
|
||||
* @category TradeBuyPlaceOrder
|
||||
* @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;
|
||||
|
||||
use JMS\Serializer\Annotation as JMS;
|
||||
use RetailCrm\Model\Request\BaseRequest;
|
||||
use RetailCrm\Model\Response\AliExpress\TradeBuyPlaceOrderResponse;
|
||||
use RetailCrm\Model\Request\AliExpress\Data\PlaceOrderRequest4OpenApiDto;
|
||||
|
||||
/**
|
||||
* Class TradeBuyPlaceOrder
|
||||
*
|
||||
* @category TradeBuyPlaceOrder
|
||||
* @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
|
||||
* @SuppressWarnings(PHPMD.LongVariable)
|
||||
*/
|
||||
class TradeBuyPlaceOrder extends BaseRequest
|
||||
{
|
||||
/**
|
||||
* @var PlaceOrderRequest4OpenApiDto $paramPlaceOrderRequest4OpenApiDTO
|
||||
*
|
||||
* @JMS\Type("RetailCrm\Model\Request\AliExpress\Data\PlaceOrderRequest4OpenApiDto")
|
||||
* @JMS\SerializedName("param_place_order_request4_open_api_d_t_o")
|
||||
*/
|
||||
public $paramPlaceOrderRequest4OpenApiDTO;
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public function getMethod(): string
|
||||
{
|
||||
return 'aliexpress.trade.buy.placeorder';
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public function getExpectedResponse(): string
|
||||
{
|
||||
return TradeBuyPlaceOrderResponse::class;
|
||||
}
|
||||
}
|
@ -0,0 +1,69 @@
|
||||
<?php
|
||||
/**
|
||||
* PHP version 7.3
|
||||
*
|
||||
* @category TrackingInfoDetails
|
||||
* @package RetailCrm\Model\Response\AliExpress\Data\Entity
|
||||
* @author RetailCRM <integration@retailcrm.ru>
|
||||
* @license http://retailcrm.ru Proprietary
|
||||
* @link http://retailcrm.ru
|
||||
* @see http://help.retailcrm.ru
|
||||
*/
|
||||
|
||||
namespace RetailCrm\Model\Response\AliExpress\Data\Entity;
|
||||
|
||||
use DateTime;
|
||||
use JMS\Serializer\Annotation as JMS;
|
||||
|
||||
/**
|
||||
* Class TrackingInfoDetails
|
||||
*
|
||||
* @category TrackingInfoDetails
|
||||
* @package RetailCrm\Model\Response\AliExpress\Data\Entity
|
||||
* @author RetailDriver LLC <integration@retailcrm.ru>
|
||||
* @license https://retailcrm.ru Proprietary
|
||||
* @link http://retailcrm.ru
|
||||
* @see https://help.retailcrm.ru
|
||||
*/
|
||||
class TrackingInfoDetails
|
||||
{
|
||||
/**
|
||||
* @var string $eventDesc
|
||||
*
|
||||
* @JMS\Type("string")
|
||||
* @JMS\SerializedName("event_desc")
|
||||
*/
|
||||
public $eventDesc;
|
||||
|
||||
/**
|
||||
* @var string $signedName
|
||||
*
|
||||
* @JMS\Type("string")
|
||||
* @JMS\SerializedName("signed_name")
|
||||
*/
|
||||
public $signedName;
|
||||
|
||||
/**
|
||||
* @var string $status
|
||||
*
|
||||
* @JMS\Type("string")
|
||||
* @JMS\SerializedName("status")
|
||||
*/
|
||||
public $status;
|
||||
|
||||
/**
|
||||
* @var string $address
|
||||
*
|
||||
* @JMS\Type("string")
|
||||
* @JMS\SerializedName("address")
|
||||
*/
|
||||
public $address;
|
||||
|
||||
/**
|
||||
* @var DateTime $eventDate
|
||||
*
|
||||
* @JMS\Type("DateTime<'Y-m-d'>")
|
||||
* @JMS\SerializedName("event_date")
|
||||
*/
|
||||
public $eventDate;
|
||||
}
|
@ -0,0 +1,36 @@
|
||||
<?php
|
||||
/**
|
||||
* PHP version 7.3
|
||||
*
|
||||
* @category TrackingInfoDetailsList
|
||||
* @package RetailCrm\Model\Response\AliExpress\Data\Entity
|
||||
* @author RetailCRM <integration@retailcrm.ru>
|
||||
* @license http://retailcrm.ru Proprietary
|
||||
* @link http://retailcrm.ru
|
||||
* @see http://help.retailcrm.ru
|
||||
*/
|
||||
|
||||
namespace RetailCrm\Model\Response\AliExpress\Data\Entity;
|
||||
|
||||
use JMS\Serializer\Annotation as JMS;
|
||||
|
||||
/**
|
||||
* Class TrackingInfoDetailsList
|
||||
*
|
||||
* @category TrackingInfoDetailsList
|
||||
* @package RetailCrm\Model\Response\AliExpress\Data\Entity
|
||||
* @author RetailDriver LLC <integration@retailcrm.ru>
|
||||
* @license https://retailcrm.ru Proprietary
|
||||
* @link http://retailcrm.ru
|
||||
* @see https://help.retailcrm.ru
|
||||
*/
|
||||
class TrackingInfoDetailsList
|
||||
{
|
||||
/**
|
||||
* @var \RetailCrm\Model\Response\AliExpress\Data\Entity\TrackingInfoDetails[] $details
|
||||
*
|
||||
* @JMS\Type("array<RetailCrm\Model\Response\AliExpress\Data\Entity\TrackingInfoDetails>")
|
||||
* @JMS\SerializedName("details")
|
||||
*/
|
||||
public $details;
|
||||
}
|
@ -0,0 +1,60 @@
|
||||
<?php
|
||||
/**
|
||||
* PHP version 7.3
|
||||
*
|
||||
* @category LogisticsDsTrackingInfoQueryResponseData
|
||||
* @package RetailCrm\Model\Response\AliExpress\Data
|
||||
* @author RetailCRM <integration@retailcrm.ru>
|
||||
* @license http://retailcrm.ru Proprietary
|
||||
* @link http://retailcrm.ru
|
||||
* @see http://help.retailcrm.ru
|
||||
*/
|
||||
|
||||
namespace RetailCrm\Model\Response\AliExpress\Data;
|
||||
|
||||
use JMS\Serializer\Annotation as JMS;
|
||||
|
||||
/**
|
||||
* Class LogisticsDsTrackingInfoQueryResponseData
|
||||
*
|
||||
* @category LogisticsDsTrackingInfoQueryResponseData
|
||||
* @package RetailCrm\Model\Response\AliExpress\Data
|
||||
* @author RetailDriver LLC <integration@retailcrm.ru>
|
||||
* @license https://retailcrm.ru Proprietary
|
||||
* @link http://retailcrm.ru
|
||||
* @see https://help.retailcrm.ru
|
||||
*/
|
||||
class LogisticsDsTrackingInfoQueryResponseData
|
||||
{
|
||||
/**
|
||||
* @var \RetailCrm\Model\Response\AliExpress\Data\Entity\TrackingInfoDetailsList $details
|
||||
*
|
||||
* @JMS\Type("RetailCrm\Model\Response\AliExpress\Data\Entity\TrackingInfoDetailsList")
|
||||
* @JMS\SerializedName("details")
|
||||
*/
|
||||
public $details;
|
||||
|
||||
/**
|
||||
* @var string $officialWebsite
|
||||
*
|
||||
* @JMS\Type("string")
|
||||
* @JMS\SerializedName("official_website")
|
||||
*/
|
||||
public $officialWebsite;
|
||||
|
||||
/**
|
||||
* @var string $officialWebsite
|
||||
*
|
||||
* @JMS\Type("string")
|
||||
* @JMS\SerializedName("error_desc")
|
||||
*/
|
||||
public $errorDesc;
|
||||
|
||||
/**
|
||||
* @var bool $resultSuccess
|
||||
*
|
||||
* @JMS\Type("bool")
|
||||
* @JMS\SerializedName("result_success")
|
||||
*/
|
||||
public $resultSuccess;
|
||||
}
|
@ -0,0 +1,38 @@
|
||||
<?php
|
||||
/**
|
||||
* PHP version 7.3
|
||||
*
|
||||
* @category PostproductRedefiningFindAEProductByIdForDropshipperResponseData
|
||||
* @package RetailCrm\Model\Response\AliExpress\Data
|
||||
* @author RetailCRM <integration@retailcrm.ru>
|
||||
* @license http://retailcrm.ru Proprietary
|
||||
* @link http://retailcrm.ru
|
||||
* @see http://help.retailcrm.ru
|
||||
*/
|
||||
|
||||
namespace RetailCrm\Model\Response\AliExpress\Data;
|
||||
|
||||
use JMS\Serializer\Annotation as JMS;
|
||||
use RetailCrm\Model\Response\AliExpress\Result\PostproductRedefiningFindAEProductByIdForDropshipperResponseResult;
|
||||
|
||||
/**
|
||||
* Class PostproductRedefiningFindAEProductByIdForDropshipperResponseData
|
||||
*
|
||||
* @category PostproductRedefiningFindAEProductByIdForDropshipperResponseData
|
||||
* @package RetailCrm\Model\Response\AliExpress\Data
|
||||
* @author RetailDriver LLC <integration@retailcrm.ru>
|
||||
* @license https://retailcrm.ru Proprietary
|
||||
* @link http://retailcrm.ru
|
||||
* @see https://help.retailcrm.ru
|
||||
*/
|
||||
class PostproductRedefiningFindAEProductByIdForDropshipperResponseData
|
||||
{
|
||||
/**
|
||||
* @var PostproductRedefiningFindAEProductByIdForDropshipperResponseResult $result
|
||||
*
|
||||
* phpcs:ignore
|
||||
* @JMS\Type("RetailCrm\Model\Response\AliExpress\Result\PostproductRedefiningFindAEProductByIdForDropshipperResponseResult")
|
||||
* @JMS\SerializedName("result")
|
||||
*/
|
||||
public $result;
|
||||
}
|
@ -0,0 +1,36 @@
|
||||
<?php
|
||||
/**
|
||||
* PHP version 7.3
|
||||
*
|
||||
* @category TradeBuyPlaceOrderResponseData
|
||||
* @package RetailCrm\Model\Response\AliExpress\Data
|
||||
* @author RetailCRM <integration@retailcrm.ru>
|
||||
* @license http://retailcrm.ru Proprietary
|
||||
* @link http://retailcrm.ru
|
||||
* @see http://help.retailcrm.ru
|
||||
*/
|
||||
|
||||
namespace RetailCrm\Model\Response\AliExpress\Data;
|
||||
|
||||
use JMS\Serializer\Annotation as JMS;
|
||||
|
||||
/**
|
||||
* Class TradeBuyPlaceOrderResponseData
|
||||
*
|
||||
* @category TradeBuyPlaceOrderResponseData
|
||||
* @package RetailCrm\Model\Response\AliExpress\Data
|
||||
* @author RetailDriver LLC <integration@retailcrm.ru>
|
||||
* @license https://retailcrm.ru Proprietary
|
||||
* @link http://retailcrm.ru
|
||||
* @see https://help.retailcrm.ru
|
||||
*/
|
||||
class TradeBuyPlaceOrderResponseData
|
||||
{
|
||||
/**
|
||||
* @var \RetailCrm\Model\Response\AliExpress\Result\TradeBuyPlaceOrderResponseResult $result
|
||||
*
|
||||
* @JMS\Type("RetailCrm\Model\Response\AliExpress\Result\TradeBuyPlaceOrderResponseResult")
|
||||
* @JMS\SerializedName("result")
|
||||
*/
|
||||
public $result;
|
||||
}
|
@ -0,0 +1,37 @@
|
||||
<?php
|
||||
/**
|
||||
* PHP version 7.3
|
||||
*
|
||||
* @category LogisticsDsTrackingInfoQueryResponse
|
||||
* @package RetailCrm\Model\Response\AliExpress
|
||||
* @author RetailCRM <integration@retailcrm.ru>
|
||||
* @license http://retailcrm.ru Proprietary
|
||||
* @link http://retailcrm.ru
|
||||
* @see http://help.retailcrm.ru
|
||||
*/
|
||||
|
||||
namespace RetailCrm\Model\Response\AliExpress;
|
||||
|
||||
use RetailCrm\Model\Response\BaseResponse;
|
||||
use JMS\Serializer\Annotation as JMS;
|
||||
|
||||
/**
|
||||
* Class LogisticsDsTrackingInfoQueryResponse
|
||||
*
|
||||
* @category LogisticsDsTrackingInfoQueryResponse
|
||||
* @package RetailCrm\Model\Response\AliExpress
|
||||
* @author RetailDriver LLC <integration@retailcrm.ru>
|
||||
* @license https://retailcrm.ru Proprietary
|
||||
* @link http://retailcrm.ru
|
||||
* @see https://help.retailcrm.ru
|
||||
*/
|
||||
class LogisticsDsTrackingInfoQueryResponse extends BaseResponse
|
||||
{
|
||||
/**
|
||||
* @var \RetailCrm\Model\Response\AliExpress\Data\LogisticsDsTrackingInfoQueryResponseData $responseData
|
||||
*
|
||||
* @JMS\Type("RetailCrm\Model\Response\AliExpress\Data\LogisticsDsTrackingInfoQueryResponseData")
|
||||
* @JMS\SerializedName("aliexpress_logistics_ds_trackinginfo_query_response")
|
||||
*/
|
||||
public $responseData;
|
||||
}
|
@ -0,0 +1,38 @@
|
||||
<?php
|
||||
/**
|
||||
* PHP version 7.3
|
||||
*
|
||||
* @category PostproductRedefiningFindAEProductByIdForDropshipperResponse
|
||||
* @package RetailCrm\Model\Response\AliExpress
|
||||
* @author RetailCRM <integration@retailcrm.ru>
|
||||
* @license http://retailcrm.ru Proprietary
|
||||
* @link http://retailcrm.ru
|
||||
* @see http://help.retailcrm.ru
|
||||
*/
|
||||
|
||||
namespace RetailCrm\Model\Response\AliExpress;
|
||||
|
||||
use RetailCrm\Model\Response\BaseResponse;
|
||||
use JMS\Serializer\Annotation as JMS;
|
||||
|
||||
/**
|
||||
* Class PostproductRedefiningFindAEProductByIdForDropshipperResponse
|
||||
*
|
||||
* @category PostproductRedefiningFindAEProductByIdForDropshipperResponse
|
||||
* @package RetailCrm\Model\Response\AliExpress
|
||||
* @author RetailDriver LLC <integration@retailcrm.ru>
|
||||
* @license https://retailcrm.ru Proprietary
|
||||
* @link http://retailcrm.ru
|
||||
* @see https://help.retailcrm.ru
|
||||
*/
|
||||
class PostproductRedefiningFindAEProductByIdForDropshipperResponse extends BaseResponse
|
||||
{
|
||||
/**
|
||||
* phpcs:ignore
|
||||
* @var \RetailCrm\Model\Response\AliExpress\Data\PostproductRedefiningFindAEProductByIdForDropshipperResponseData $responseData
|
||||
*
|
||||
* @JMS\Type("RetailCrm\Model\Response\AliExpress\Data\PostproductRedefiningFindAEProductByIdForDropshipperResponseData")
|
||||
* @JMS\SerializedName("aliexpress_postproduct_redefining_findaeproductbyidfordropshipper_response")
|
||||
*/
|
||||
public $responseData;
|
||||
}
|
@ -0,0 +1,36 @@
|
||||
<?php
|
||||
/**
|
||||
* PHP version 7.3
|
||||
*
|
||||
* @category AeopAeMultimedia
|
||||
* @package RetailCrm\Model\Response\AliExpress\Result\Entity
|
||||
* @author RetailCRM <integration@retailcrm.ru>
|
||||
* @license http://retailcrm.ru Proprietary
|
||||
* @link http://retailcrm.ru
|
||||
* @see http://help.retailcrm.ru
|
||||
*/
|
||||
|
||||
namespace RetailCrm\Model\Response\AliExpress\Result\Entity;
|
||||
|
||||
use JMS\Serializer\Annotation as JMS;
|
||||
|
||||
/**
|
||||
* Class AeopAeMultimedia
|
||||
*
|
||||
* @category AeopAeMultimedia
|
||||
* @package RetailCrm\Model\Response\AliExpress\Result\Entity
|
||||
* @author RetailDriver LLC <integration@retailcrm.ru>
|
||||
* @license https://retailcrm.ru Proprietary
|
||||
* @link http://retailcrm.ru
|
||||
* @see https://help.retailcrm.ru
|
||||
*/
|
||||
class AeopAeMultimedia
|
||||
{
|
||||
/**
|
||||
* @var \RetailCrm\Model\Response\AliExpress\Result\Entity\AeopAeVideoList $aeopAeVideos
|
||||
*
|
||||
* @JMS\Type("RetailCrm\Model\Response\AliExpress\Result\Entity\AeopAeVideoList")
|
||||
* @JMS\SerializedName("aeop_a_e_videos")
|
||||
*/
|
||||
public $aeopAeVideos;
|
||||
}
|
@ -0,0 +1,84 @@
|
||||
<?php
|
||||
/**
|
||||
* PHP version 7.3
|
||||
*
|
||||
* @category AeopAeProductProperty
|
||||
* @package RetailCrm\Model\Response\AliExpress\Result\Entity
|
||||
* @author RetailCRM <integration@retailcrm.ru>
|
||||
* @license http://retailcrm.ru Proprietary
|
||||
* @link http://retailcrm.ru
|
||||
* @see http://help.retailcrm.ru
|
||||
*/
|
||||
|
||||
namespace RetailCrm\Model\Response\AliExpress\Result\Entity;
|
||||
|
||||
use JMS\Serializer\Annotation as JMS;
|
||||
|
||||
/**
|
||||
* Class AeopAeProductProperty
|
||||
*
|
||||
* @category AeopAeProductProperty
|
||||
* @package RetailCrm\Model\Response\AliExpress\Result\Entity
|
||||
* @author RetailDriver LLC <integration@retailcrm.ru>
|
||||
* @license https://retailcrm.ru Proprietary
|
||||
* @link http://retailcrm.ru
|
||||
* @see https://help.retailcrm.ru
|
||||
*/
|
||||
class AeopAeProductProperty
|
||||
{
|
||||
/**
|
||||
* @var string $attrValueUnit
|
||||
*
|
||||
* @JMS\Type("string")
|
||||
* @JMS\SerializedName("attr_value_unit")
|
||||
*/
|
||||
public $attrValueUnit;
|
||||
|
||||
/**
|
||||
* @var string $attrValueStart
|
||||
*
|
||||
* @JMS\Type("string")
|
||||
* @JMS\SerializedName("attr_value_start")
|
||||
*/
|
||||
public $attrValueStart;
|
||||
|
||||
/**
|
||||
* @var int $attrValueId
|
||||
*
|
||||
* @JMS\Type("int")
|
||||
* @JMS\SerializedName("attr_value_id")
|
||||
*/
|
||||
public $attrValueId;
|
||||
|
||||
/**
|
||||
* @var int $attrValueId
|
||||
*
|
||||
* @JMS\Type("string")
|
||||
* @JMS\SerializedName("attr_value_end")
|
||||
*/
|
||||
public $attrValueEnd;
|
||||
|
||||
/**
|
||||
* @var int $attrValue
|
||||
*
|
||||
* @JMS\Type("string")
|
||||
* @JMS\SerializedName("attr_value")
|
||||
*/
|
||||
public $attrValue;
|
||||
|
||||
/**
|
||||
* @var int $attrNameId
|
||||
*
|
||||
* @JMS\Type("int")
|
||||
* @JMS\SerializedName("attr_name_id")
|
||||
*/
|
||||
public $attrNameId;
|
||||
|
||||
/**
|
||||
* @var string $attrName
|
||||
*
|
||||
* @JMS\Type("string")
|
||||
* @JMS\SerializedName("attr_name")
|
||||
*/
|
||||
public $attrName;
|
||||
}
|
@ -0,0 +1,36 @@
|
||||
<?php
|
||||
/**
|
||||
* PHP version 7.3
|
||||
*
|
||||
* @category AeopAeProductPropertyList
|
||||
* @package RetailCrm\Model\Response\AliExpress\Result\Entity
|
||||
* @author RetailCRM <integration@retailcrm.ru>
|
||||
* @license http://retailcrm.ru Proprietary
|
||||
* @link http://retailcrm.ru
|
||||
* @see http://help.retailcrm.ru
|
||||
*/
|
||||
|
||||
namespace RetailCrm\Model\Response\AliExpress\Result\Entity;
|
||||
|
||||
use JMS\Serializer\Annotation as JMS;
|
||||
|
||||
/**
|
||||
* Class AeopAeProductPropertyList
|
||||
*
|
||||
* @category AeopAeProductPropertyList
|
||||
* @package RetailCrm\Model\Response\AliExpress\Result\Entity
|
||||
* @author RetailDriver LLC <integration@retailcrm.ru>
|
||||
* @license https://retailcrm.ru Proprietary
|
||||
* @link http://retailcrm.ru
|
||||
* @see https://help.retailcrm.ru
|
||||
*/
|
||||
class AeopAeProductPropertyList
|
||||
{
|
||||
/**
|
||||
* @var \RetailCrm\Model\Response\AliExpress\Result\Entity\AeopAeProductProperty[] $aeopAeProductProperty
|
||||
*
|
||||
* @JMS\Type("array<RetailCrm\Model\Response\AliExpress\Result\Entity\AeopAeProductProperty>")
|
||||
* @JMS\SerializedName("aeop_ae_product_property")
|
||||
*/
|
||||
public $aeopAeProductProperty;
|
||||
}
|
124
src/Model/Response/AliExpress/Result/Entity/AeopAeProductSku.php
Normal file
124
src/Model/Response/AliExpress/Result/Entity/AeopAeProductSku.php
Normal file
@ -0,0 +1,124 @@
|
||||
<?php
|
||||
/**
|
||||
* PHP version 7.3
|
||||
*
|
||||
* @category AeopAeProductSku
|
||||
* @package RetailCrm\Model\Response\AliExpress\Result\Entity
|
||||
* @author RetailCRM <integration@retailcrm.ru>
|
||||
* @license http://retailcrm.ru Proprietary
|
||||
* @link http://retailcrm.ru
|
||||
* @see http://help.retailcrm.ru
|
||||
*/
|
||||
|
||||
namespace RetailCrm\Model\Response\AliExpress\Result\Entity;
|
||||
|
||||
use JMS\Serializer\Annotation as JMS;
|
||||
|
||||
/**
|
||||
* Class AeopAeProductSku
|
||||
*
|
||||
* @category AeopAeProductSku
|
||||
* @package RetailCrm\Model\Response\AliExpress\Result\Entity
|
||||
* @author RetailDriver LLC <integration@retailcrm.ru>
|
||||
* @license https://retailcrm.ru Proprietary
|
||||
* @link http://retailcrm.ru
|
||||
* @see https://help.retailcrm.ru
|
||||
*/
|
||||
class AeopAeProductSku
|
||||
{
|
||||
/**
|
||||
* @var bool $skuStock
|
||||
*
|
||||
* @JMS\Type("bool")
|
||||
* @JMS\SerializedName("sku_stock")
|
||||
*/
|
||||
public $skuStock;
|
||||
|
||||
/**
|
||||
* @var string $skuPrice
|
||||
*
|
||||
* @JMS\Type("string")
|
||||
* @JMS\SerializedName("sku_price")
|
||||
*/
|
||||
public $skuPrice;
|
||||
|
||||
/**
|
||||
* @var string $skuCode
|
||||
*
|
||||
* @JMS\Type("string")
|
||||
* @JMS\SerializedName("sku_code")
|
||||
*/
|
||||
public $skuCode;
|
||||
|
||||
/**
|
||||
* @var int $ipmSkuStock
|
||||
*
|
||||
* @JMS\Type("int")
|
||||
* @JMS\SerializedName("ipm_sku_stock")
|
||||
*/
|
||||
public $ipmSkuStock;
|
||||
|
||||
/**
|
||||
* @var string $id
|
||||
*
|
||||
* @JMS\Type("string")
|
||||
* @JMS\SerializedName("id")
|
||||
*/
|
||||
public $id;
|
||||
|
||||
/**
|
||||
* @var string $currencyCode
|
||||
*
|
||||
* @JMS\Type("string")
|
||||
* @JMS\SerializedName("currency_code")
|
||||
*/
|
||||
public $currencyCode;
|
||||
|
||||
/**
|
||||
* @var \RetailCrm\Model\Response\AliExpress\Result\Entity\AeopSkuPropertyList $aeopSkuPropertys
|
||||
*
|
||||
* @JMS\Type("RetailCrm\Model\Response\AliExpress\Result\Entity\AeopSkuPropertyList")
|
||||
* @JMS\SerializedName("aeop_s_k_u_propertys")
|
||||
*/
|
||||
public $aeopSkuPropertys;
|
||||
|
||||
/**
|
||||
* @var string $barcode
|
||||
*
|
||||
* @JMS\Type("string")
|
||||
* @JMS\SerializedName("barcode")
|
||||
*/
|
||||
public $barcode;
|
||||
|
||||
/**
|
||||
* @var string $offerSalePrice
|
||||
*
|
||||
* @JMS\Type("string")
|
||||
* @JMS\SerializedName("offer_sale_price")
|
||||
*/
|
||||
public $offerSalePrice;
|
||||
|
||||
/**
|
||||
* @var string $offerBulkSalePrice
|
||||
*
|
||||
* @JMS\Type("string")
|
||||
* @JMS\SerializedName("offer_bulk_sale_price")
|
||||
*/
|
||||
public $offerBulkSalePrice;
|
||||
|
||||
/**
|
||||
* @var int $skuBulkOrder
|
||||
*
|
||||
* @JMS\Type("int")
|
||||
* @JMS\SerializedName("sku_bulk_order")
|
||||
*/
|
||||
public $skuBulkOrder;
|
||||
|
||||
/**
|
||||
* @var int $skuAvailableStock
|
||||
*
|
||||
* @JMS\Type("int")
|
||||
* @JMS\SerializedName("s_k_u_available_stock")
|
||||
*/
|
||||
public $skuAvailableStock;
|
||||
}
|
@ -0,0 +1,36 @@
|
||||
<?php
|
||||
/**
|
||||
* PHP version 7.3
|
||||
*
|
||||
* @category AeopAeProductSkuList
|
||||
* @package RetailCrm\Model\Response\AliExpress\Result\Entity
|
||||
* @author RetailCRM <integration@retailcrm.ru>
|
||||
* @license http://retailcrm.ru Proprietary
|
||||
* @link http://retailcrm.ru
|
||||
* @see http://help.retailcrm.ru
|
||||
*/
|
||||
|
||||
namespace RetailCrm\Model\Response\AliExpress\Result\Entity;
|
||||
|
||||
use JMS\Serializer\Annotation as JMS;
|
||||
|
||||
/**
|
||||
* Class AeopAeProductSkuList
|
||||
*
|
||||
* @category AeopAeProductSkuList
|
||||
* @package RetailCrm\Model\Response\AliExpress\Result\Entity
|
||||
* @author RetailDriver LLC <integration@retailcrm.ru>
|
||||
* @license https://retailcrm.ru Proprietary
|
||||
* @link http://retailcrm.ru
|
||||
* @see https://help.retailcrm.ru
|
||||
*/
|
||||
class AeopAeProductSkuList
|
||||
{
|
||||
/**
|
||||
* @var \RetailCrm\Model\Response\AliExpress\Result\Entity\AeopAeProductSku[] $aeopAeProductSku
|
||||
*
|
||||
* @JMS\Type("array<RetailCrm\Model\Response\AliExpress\Result\Entity\AeopAeProductSku>")
|
||||
* @JMS\SerializedName("aeop_ae_product_sku")
|
||||
*/
|
||||
public $aeopAeProductSku;
|
||||
}
|
68
src/Model/Response/AliExpress/Result/Entity/AeopAeVideo.php
Normal file
68
src/Model/Response/AliExpress/Result/Entity/AeopAeVideo.php
Normal file
@ -0,0 +1,68 @@
|
||||
<?php
|
||||
/**
|
||||
* PHP version 7.3
|
||||
*
|
||||
* @category AeopAeVideo
|
||||
* @package RetailCrm\Model\Response\AliExpress\Result\Entity
|
||||
* @author RetailCRM <integration@retailcrm.ru>
|
||||
* @license http://retailcrm.ru Proprietary
|
||||
* @link http://retailcrm.ru
|
||||
* @see http://help.retailcrm.ru
|
||||
*/
|
||||
|
||||
namespace RetailCrm\Model\Response\AliExpress\Result\Entity;
|
||||
|
||||
use JMS\Serializer\Annotation as JMS;
|
||||
|
||||
/**
|
||||
* Class AeopAeVideo
|
||||
*
|
||||
* @category AeopAeVideo
|
||||
* @package RetailCrm\Model\Response\AliExpress\Result\Entity
|
||||
* @author RetailDriver LLC <integration@retailcrm.ru>
|
||||
* @license https://retailcrm.ru Proprietary
|
||||
* @link http://retailcrm.ru
|
||||
* @see https://help.retailcrm.ru
|
||||
*/
|
||||
class AeopAeVideo
|
||||
{
|
||||
/**
|
||||
* @var string $posterUrl
|
||||
*
|
||||
* @JMS\Type("string")
|
||||
* @JMS\SerializedName("poster_url")
|
||||
*/
|
||||
public $posterUrl;
|
||||
|
||||
/**
|
||||
* @var string $mediaType
|
||||
*
|
||||
* @JMS\Type("string")
|
||||
* @JMS\SerializedName("media_type")
|
||||
*/
|
||||
public $mediaType;
|
||||
|
||||
/**
|
||||
* @var string $mediaStatus
|
||||
*
|
||||
* @JMS\Type("string")
|
||||
* @JMS\SerializedName("media_status")
|
||||
*/
|
||||
public $mediaStatus;
|
||||
|
||||
/**
|
||||
* @var int $mediaId
|
||||
*
|
||||
* @JMS\Type("int")
|
||||
* @JMS\SerializedName("media_id")
|
||||
*/
|
||||
public $mediaId;
|
||||
|
||||
/**
|
||||
* @var int $aliMemberId
|
||||
*
|
||||
* @JMS\Type("int")
|
||||
* @JMS\SerializedName("ali_member_id")
|
||||
*/
|
||||
public $aliMemberId;
|
||||
}
|
@ -0,0 +1,36 @@
|
||||
<?php
|
||||
/**
|
||||
* PHP version 7.3
|
||||
*
|
||||
* @category AeopAeVideoList
|
||||
* @package RetailCrm\Model\Response\AliExpress\Result\Entity
|
||||
* @author RetailCRM <integration@retailcrm.ru>
|
||||
* @license http://retailcrm.ru Proprietary
|
||||
* @link http://retailcrm.ru
|
||||
* @see http://help.retailcrm.ru
|
||||
*/
|
||||
|
||||
namespace RetailCrm\Model\Response\AliExpress\Result\Entity;
|
||||
|
||||
use JMS\Serializer\Annotation as JMS;
|
||||
|
||||
/**
|
||||
* Class AeopAeVideoList
|
||||
*
|
||||
* @category AeopAeVideoList
|
||||
* @package RetailCrm\Model\Response\AliExpress\Result\Entity
|
||||
* @author RetailDriver LLC <integration@retailcrm.ru>
|
||||
* @license https://retailcrm.ru Proprietary
|
||||
* @link http://retailcrm.ru
|
||||
* @see https://help.retailcrm.ru
|
||||
*/
|
||||
class AeopAeVideoList
|
||||
{
|
||||
/**
|
||||
* @var \RetailCrm\Model\Response\AliExpress\Result\Entity\AeopAeVideo[] $aeopAeVideo
|
||||
*
|
||||
* @JMS\Type("array<RetailCrm\Model\Response\AliExpress\Result\Entity\AeopAeVideo>")
|
||||
* @JMS\SerializedName("aeop_ae_video")
|
||||
*/
|
||||
public $aeopAeVideo;
|
||||
}
|
@ -0,0 +1,45 @@
|
||||
<?php
|
||||
/**
|
||||
* PHP version 7.3
|
||||
*
|
||||
* @category AeopNationalQuoteConfiguration
|
||||
* @package RetailCrm\Model\Response\AliExpress\Result\Entity
|
||||
* @author RetailCRM <integration@retailcrm.ru>
|
||||
* @license http://retailcrm.ru Proprietary
|
||||
* @link http://retailcrm.ru
|
||||
* @see http://help.retailcrm.ru
|
||||
*/
|
||||
|
||||
namespace RetailCrm\Model\Response\AliExpress\Result\Entity;
|
||||
|
||||
use JMS\Serializer\Annotation as JMS;
|
||||
|
||||
/**
|
||||
* Class AeopNationalQuoteConfiguration
|
||||
*
|
||||
* @category AeopNationalQuoteConfiguration
|
||||
* @package RetailCrm\Model\Response\AliExpress\Result\Entity
|
||||
* @author RetailDriver LLC <integration@retailcrm.ru>
|
||||
* @license https://retailcrm.ru Proprietary
|
||||
* @link http://retailcrm.ru
|
||||
* @see https://help.retailcrm.ru
|
||||
*/
|
||||
class AeopNationalQuoteConfiguration
|
||||
{
|
||||
/**
|
||||
* @var string $configurationType
|
||||
*
|
||||
* @JMS\Type("string")
|
||||
* @JMS\SerializedName("configuration_type")
|
||||
*/
|
||||
public $configurationType;
|
||||
|
||||
/**
|
||||
* @var AeopNationalQuoteConfigurationItem[] $configurationData
|
||||
*
|
||||
* @JMS\Type("array<RetailCrm\Model\Response\AliExpress\Result\Entity\AeopNationalQuoteConfigurationItem>")
|
||||
* @JMS\SerializedName("configuration_data")
|
||||
* @JMS\Groups({"InlineJsonBody", "InlineJsonBodyNullIfInvalid"})
|
||||
*/
|
||||
public $configurationData;
|
||||
}
|
@ -0,0 +1,44 @@
|
||||
<?php
|
||||
/**
|
||||
* PHP version 7.3
|
||||
*
|
||||
* @category AeopNationalQuoteConfigurationItem
|
||||
* @package RetailCrm\Model\Response\AliExpress\Result\Entity
|
||||
* @author RetailCRM <integration@retailcrm.ru>
|
||||
* @license http://retailcrm.ru Proprietary
|
||||
* @link http://retailcrm.ru
|
||||
* @see http://help.retailcrm.ru
|
||||
*/
|
||||
|
||||
namespace RetailCrm\Model\Response\AliExpress\Result\Entity;
|
||||
|
||||
use JMS\Serializer\Annotation as JMS;
|
||||
|
||||
/**
|
||||
* Class AeopNationalQuoteConfigurationItem
|
||||
*
|
||||
* @category AeopNationalQuoteConfigurationItem
|
||||
* @package RetailCrm\Model\Response\AliExpress\Result\Entity
|
||||
* @author RetailDriver LLC <integration@retailcrm.ru>
|
||||
* @license https://retailcrm.ru Proprietary
|
||||
* @link http://retailcrm.ru
|
||||
* @see https://help.retailcrm.ru
|
||||
*/
|
||||
class AeopNationalQuoteConfigurationItem
|
||||
{
|
||||
/**
|
||||
* @var string $shipToCountry
|
||||
*
|
||||
* @JMS\Type("string")
|
||||
* @JMS\SerializedName("shiptoCountry")
|
||||
*/
|
||||
public $shipToCountry;
|
||||
|
||||
/**
|
||||
* @var string $percentage
|
||||
*
|
||||
* @JMS\Type("string")
|
||||
* @JMS\SerializedName("percentage")
|
||||
*/
|
||||
public $percentage;
|
||||
}
|
@ -0,0 +1,76 @@
|
||||
<?php
|
||||
/**
|
||||
* PHP version 7.3
|
||||
*
|
||||
* @category AeopSkuProperty
|
||||
* @package RetailCrm\Model\Response\AliExpress\Result\Entity
|
||||
* @author RetailCRM <integration@retailcrm.ru>
|
||||
* @license http://retailcrm.ru Proprietary
|
||||
* @link http://retailcrm.ru
|
||||
* @see http://help.retailcrm.ru
|
||||
*/
|
||||
|
||||
namespace RetailCrm\Model\Response\AliExpress\Result\Entity;
|
||||
|
||||
use JMS\Serializer\Annotation as JMS;
|
||||
|
||||
/**
|
||||
* Class AeopSkuProperty
|
||||
*
|
||||
* @category AeopSkuProperty
|
||||
* @package RetailCrm\Model\Response\AliExpress\Result\Entity
|
||||
* @author RetailDriver LLC <integration@retailcrm.ru>
|
||||
* @license https://retailcrm.ru Proprietary
|
||||
* @link http://retailcrm.ru
|
||||
* @see https://help.retailcrm.ru
|
||||
*/
|
||||
class AeopSkuProperty
|
||||
{
|
||||
/**
|
||||
* @var int $skuPropertyId
|
||||
*
|
||||
* @JMS\Type("int")
|
||||
* @JMS\SerializedName("sku_property_id")
|
||||
*/
|
||||
public $skuPropertyId;
|
||||
|
||||
/**
|
||||
* @var string $skuImage
|
||||
*
|
||||
* @JMS\Type("string")
|
||||
* @JMS\SerializedName("sku_image")
|
||||
*/
|
||||
public $skuImage;
|
||||
|
||||
/**
|
||||
* @var int $propertyValueIdLong
|
||||
*
|
||||
* @JMS\Type("int")
|
||||
* @JMS\SerializedName("property_value_id_long")
|
||||
*/
|
||||
public $propertyValueIdLong;
|
||||
|
||||
/**
|
||||
* @var string $propertyValueDefinitionName
|
||||
*
|
||||
* @JMS\Type("string")
|
||||
* @JMS\SerializedName("property_value_definition_name")
|
||||
*/
|
||||
public $propertyValueDefinitionName;
|
||||
|
||||
/**
|
||||
* @var string $skuPropertyValue
|
||||
*
|
||||
* @JMS\Type("string")
|
||||
* @JMS\SerializedName("sku_property_value")
|
||||
*/
|
||||
public $skuPropertyValue;
|
||||
|
||||
/**
|
||||
* @var string $skuPropertyName
|
||||
*
|
||||
* @JMS\Type("string")
|
||||
* @JMS\SerializedName("sku_property_name")
|
||||
*/
|
||||
public $skuPropertyName;
|
||||
}
|
@ -0,0 +1,36 @@
|
||||
<?php
|
||||
/**
|
||||
* PHP version 7.3
|
||||
*
|
||||
* @category AeopSkuPropertyList
|
||||
* @package RetailCrm\Model\Response\AliExpress\Result\Entity
|
||||
* @author RetailCRM <integration@retailcrm.ru>
|
||||
* @license http://retailcrm.ru Proprietary
|
||||
* @link http://retailcrm.ru
|
||||
* @see http://help.retailcrm.ru
|
||||
*/
|
||||
|
||||
namespace RetailCrm\Model\Response\AliExpress\Result\Entity;
|
||||
|
||||
use JMS\Serializer\Annotation as JMS;
|
||||
|
||||
/**
|
||||
* Class AeopSkuPropertyList
|
||||
*
|
||||
* @category AeopSkuPropertyList
|
||||
* @package RetailCrm\Model\Response\AliExpress\Result\Entity
|
||||
* @author RetailDriver LLC <integration@retailcrm.ru>
|
||||
* @license https://retailcrm.ru Proprietary
|
||||
* @link http://retailcrm.ru
|
||||
* @see https://help.retailcrm.ru
|
||||
*/
|
||||
class AeopSkuPropertyList
|
||||
{
|
||||
/**
|
||||
* @var \RetailCrm\Model\Response\AliExpress\Result\Entity\AeopSkuProperty[] $aeopSkuProperty
|
||||
*
|
||||
* @JMS\Type("array<RetailCrm\Model\Response\AliExpress\Result\Entity\AeopSkuProperty>")
|
||||
* @JMS\SerializedName("aeop_sku_property")
|
||||
*/
|
||||
public $aeopSkuProperty;
|
||||
}
|
@ -0,0 +1,68 @@
|
||||
<?php
|
||||
/**
|
||||
* PHP version 7.3
|
||||
*
|
||||
* @category AeopStoreInfo
|
||||
* @package RetailCrm\Model\Response\AliExpress\Result\Entity
|
||||
* @author RetailCRM <integration@retailcrm.ru>
|
||||
* @license http://retailcrm.ru Proprietary
|
||||
* @link http://retailcrm.ru
|
||||
* @see http://help.retailcrm.ru
|
||||
*/
|
||||
|
||||
namespace RetailCrm\Model\Response\AliExpress\Result\Entity;
|
||||
|
||||
use JMS\Serializer\Annotation as JMS;
|
||||
|
||||
/**
|
||||
* Class AeopStoreInfo
|
||||
*
|
||||
* @category AeopStoreInfo
|
||||
* @package RetailCrm\Model\Response\AliExpress\Result\Entity
|
||||
* @author RetailDriver LLC <integration@retailcrm.ru>
|
||||
* @license https://retailcrm.ru Proprietary
|
||||
* @link http://retailcrm.ru
|
||||
* @see https://help.retailcrm.ru
|
||||
*/
|
||||
class AeopStoreInfo
|
||||
{
|
||||
/**
|
||||
* @var string $communicationRating
|
||||
*
|
||||
* @JMS\Type("string")
|
||||
* @JMS\SerializedName("communication_rating")
|
||||
*/
|
||||
public $communicationRating;
|
||||
|
||||
/**
|
||||
* @var string $itemAsDescripedRating
|
||||
*
|
||||
* @JMS\Type("string")
|
||||
* @JMS\SerializedName("item_as_descriped_rating")
|
||||
*/
|
||||
public $itemAsDescripedRating;
|
||||
|
||||
/**
|
||||
* @var string $shippingSpeedRating
|
||||
*
|
||||
* @JMS\Type("string")
|
||||
* @JMS\SerializedName("shipping_speed_rating")
|
||||
*/
|
||||
public $shippingSpeedRating;
|
||||
|
||||
/**
|
||||
* @var int $storeId
|
||||
*
|
||||
* @JMS\Type("int")
|
||||
* @JMS\SerializedName("store_id")
|
||||
*/
|
||||
public $storeId;
|
||||
|
||||
/**
|
||||
* @var string $storeName
|
||||
*
|
||||
* @JMS\Type("string")
|
||||
* @JMS\SerializedName("store_name")
|
||||
*/
|
||||
public $storeName;
|
||||
}
|
36
src/Model/Response/AliExpress/Result/Entity/NumbersList.php
Normal file
36
src/Model/Response/AliExpress/Result/Entity/NumbersList.php
Normal file
@ -0,0 +1,36 @@
|
||||
<?php
|
||||
/**
|
||||
* PHP version 7.3
|
||||
*
|
||||
* @category NumbersList
|
||||
* @package RetailCrm\Model\Response\AliExpress\Result\Entity
|
||||
* @author RetailCRM <integration@retailcrm.ru>
|
||||
* @license http://retailcrm.ru Proprietary
|
||||
* @link http://retailcrm.ru
|
||||
* @see http://help.retailcrm.ru
|
||||
*/
|
||||
|
||||
namespace RetailCrm\Model\Response\AliExpress\Result\Entity;
|
||||
|
||||
use JMS\Serializer\Annotation as JMS;
|
||||
|
||||
/**
|
||||
* Class NumbersList
|
||||
*
|
||||
* @category NumbersList
|
||||
* @package RetailCrm\Model\Response\AliExpress\Result\Entity
|
||||
* @author RetailDriver LLC <integration@retailcrm.ru>
|
||||
* @license https://retailcrm.ru Proprietary
|
||||
* @link http://retailcrm.ru
|
||||
* @see https://help.retailcrm.ru
|
||||
*/
|
||||
class NumbersList
|
||||
{
|
||||
/**
|
||||
* @var int[] $number
|
||||
*
|
||||
* @JMS\Type("array<int>")
|
||||
* @JMS\SerializedName("number")
|
||||
*/
|
||||
public $number;
|
||||
}
|
@ -0,0 +1,306 @@
|
||||
<?php
|
||||
/**
|
||||
* PHP version 7.3
|
||||
*
|
||||
* @category PostproductRedefiningFindAEProductByIdForDropshipperResponseResult
|
||||
* @package RetailCrm\Model\Response\AliExpress\Result
|
||||
* @author RetailCRM <integration@retailcrm.ru>
|
||||
* @license http://retailcrm.ru Proprietary
|
||||
* @link http://retailcrm.ru
|
||||
* @see http://help.retailcrm.ru
|
||||
*/
|
||||
|
||||
namespace RetailCrm\Model\Response\AliExpress\Result;
|
||||
|
||||
use JMS\Serializer\Annotation as JMS;
|
||||
use RetailCrm\Model\Response\AliExpress\Result\Entity\AeopNationalQuoteConfiguration;
|
||||
use RetailCrm\Model\Response\AliExpress\Result\Interfaces\ErrorInterface;
|
||||
use RetailCrm\Model\Response\AliExpress\Result\Traits\ErrorTrait;
|
||||
|
||||
/**
|
||||
* Class PostproductRedefiningFindAEProductByIdForDropshipperResponseResult
|
||||
*
|
||||
* @category PostproductRedefiningFindAEProductByIdForDropshipperResponseResult
|
||||
* @package RetailCrm\Model\Response\AliExpress\Result
|
||||
* @author RetailDriver LLC <integration@retailcrm.ru>
|
||||
* @license https://retailcrm.ru Proprietary
|
||||
* @link http://retailcrm.ru
|
||||
* @see https://help.retailcrm.ru
|
||||
* @SuppressWarnings(PHPMD.TooManyFields)
|
||||
*/
|
||||
class PostproductRedefiningFindAEProductByIdForDropshipperResponseResult implements ErrorInterface
|
||||
{
|
||||
use ErrorTrait;
|
||||
|
||||
/**
|
||||
* @var \RetailCrm\Model\Response\AliExpress\Result\Entity\AeopAeProductSkuList $aeopAeProductSkus
|
||||
*
|
||||
* @JMS\Type("RetailCrm\Model\Response\AliExpress\Result\Entity\AeopAeProductSkuList")
|
||||
* @JMS\SerializedName("aeop_ae_product_s_k_us")
|
||||
*/
|
||||
public $aeopAeProductSkus;
|
||||
|
||||
/**
|
||||
* @var string $detail
|
||||
*
|
||||
* @JMS\Type("string")
|
||||
* @JMS\SerializedName("detail")
|
||||
*/
|
||||
public $detail;
|
||||
|
||||
/**
|
||||
* @var bool $isSuccess
|
||||
*
|
||||
* @JMS\Type("bool")
|
||||
* @JMS\SerializedName("is_success")
|
||||
*/
|
||||
public $isSuccess;
|
||||
|
||||
/**
|
||||
* @var int $productUnit
|
||||
*
|
||||
* @JMS\Type("int")
|
||||
* @JMS\SerializedName("product_unit")
|
||||
*/
|
||||
public $productUnit;
|
||||
|
||||
/**
|
||||
* @var string $wsOfflineDate
|
||||
*
|
||||
* @JMS\Type("string")
|
||||
* @JMS\SerializedName("ws_offline_date")
|
||||
*/
|
||||
public $wsOfflineDate;
|
||||
|
||||
/**
|
||||
* @var string $wsDisplay
|
||||
*
|
||||
* @JMS\Type("string")
|
||||
* @JMS\SerializedName("ws_display")
|
||||
*/
|
||||
public $wsDisplay;
|
||||
|
||||
/**
|
||||
* @var int $categoryId
|
||||
*
|
||||
* @JMS\Type("int")
|
||||
* @JMS\SerializedName("category_id")
|
||||
*/
|
||||
public $categoryId;
|
||||
|
||||
/**
|
||||
* @var \RetailCrm\Model\Response\AliExpress\Result\Entity\AeopAeMultimedia $aeopAeMultimedia
|
||||
*
|
||||
* @JMS\Type("RetailCrm\Model\Response\AliExpress\Result\Entity\AeopAeMultimedia")
|
||||
* @JMS\SerializedName("aeop_a_e_multimedia")
|
||||
*/
|
||||
public $aeopAeMultimedia;
|
||||
|
||||
/**
|
||||
* @var string $ownerMemberId
|
||||
*
|
||||
* @JMS\Type("string")
|
||||
* @JMS\SerializedName("owner_member_id")
|
||||
*/
|
||||
public $ownerMemberId;
|
||||
|
||||
/**
|
||||
* @var string $productStatusType
|
||||
*
|
||||
* @JMS\Type("string")
|
||||
* @JMS\SerializedName("product_status_type")
|
||||
*/
|
||||
public $productStatusType;
|
||||
|
||||
/**
|
||||
* @var \RetailCrm\Model\Response\AliExpress\Result\Entity\AeopAeProductPropertyList $aeopAeProductPropertys
|
||||
*
|
||||
* @JMS\Type("RetailCrm\Model\Response\AliExpress\Result\Entity\AeopAeProductPropertyList")
|
||||
* @JMS\SerializedName("aeop_ae_product_propertys")
|
||||
*/
|
||||
public $aeopAeProductPropertys;
|
||||
|
||||
/**
|
||||
* @var string $grossWeight
|
||||
*
|
||||
* @JMS\Type("string")
|
||||
* @JMS\SerializedName("gross_weight")
|
||||
*/
|
||||
public $grossWeight;
|
||||
|
||||
/**
|
||||
* @var int $deliveryTime
|
||||
*
|
||||
* @JMS\Type("int")
|
||||
* @JMS\SerializedName("delivery_time")
|
||||
*/
|
||||
public $deliveryTime;
|
||||
|
||||
/**
|
||||
* @var int $wsValidNum
|
||||
*
|
||||
* @JMS\Type("int")
|
||||
* @JMS\SerializedName("ws_valid_num")
|
||||
*/
|
||||
public $wsValidNum;
|
||||
|
||||
/**
|
||||
* @var string $gmtModified
|
||||
*
|
||||
* @JMS\Type("string")
|
||||
* @JMS\SerializedName("gmt_modified")
|
||||
*/
|
||||
public $gmtModified;
|
||||
|
||||
/**
|
||||
* @var bool $packageType
|
||||
*
|
||||
* @JMS\Type("bool")
|
||||
* @JMS\SerializedName("package_type")
|
||||
*/
|
||||
public $packageType;
|
||||
|
||||
/**
|
||||
* @var AeopNationalQuoteConfiguration $aeopNationalQuoteConfiguration
|
||||
*
|
||||
* @JMS\Type("RetailCrm\Model\Response\AliExpress\Result\Entity\AeopNationalQuoteConfiguration")
|
||||
* @JMS\SerializedName("aeop_national_quote_configuration")
|
||||
*/
|
||||
public $aeopNationalQuoteConfiguration;
|
||||
|
||||
/**
|
||||
* @var string $subject
|
||||
*
|
||||
* @JMS\Type("string")
|
||||
* @JMS\SerializedName("subject")
|
||||
*/
|
||||
public $subject;
|
||||
|
||||
/**
|
||||
* @var int $baseUnit
|
||||
*
|
||||
* @JMS\Type("int")
|
||||
* @JMS\SerializedName("base_unit")
|
||||
*/
|
||||
public $baseUnit;
|
||||
|
||||
/**
|
||||
* @var int $packageLength
|
||||
*
|
||||
* @JMS\Type("int")
|
||||
* @JMS\SerializedName("package_length")
|
||||
*/
|
||||
public $packageLength;
|
||||
|
||||
/**
|
||||
* @var string $mobileDetail
|
||||
*
|
||||
* @JMS\Type("string")
|
||||
* @JMS\SerializedName("mobile_detail")
|
||||
*/
|
||||
public $mobileDetail;
|
||||
|
||||
/**
|
||||
* @var int $packageHeight
|
||||
*
|
||||
* @JMS\Type("int")
|
||||
* @JMS\SerializedName("package_height")
|
||||
*/
|
||||
public $packageHeight;
|
||||
|
||||
/**
|
||||
* @var int $packageWidth
|
||||
*
|
||||
* @JMS\Type("int")
|
||||
* @JMS\SerializedName("package_width")
|
||||
*/
|
||||
public $packageWidth;
|
||||
|
||||
/**
|
||||
* @var string $currencyCode
|
||||
*
|
||||
* @JMS\Type("string")
|
||||
* @JMS\SerializedName("currency_code")
|
||||
*/
|
||||
public $currencyCode;
|
||||
|
||||
/**
|
||||
* @var string $gmtCreate
|
||||
*
|
||||
* @JMS\Type("string")
|
||||
* @JMS\SerializedName("gmt_create")
|
||||
*/
|
||||
public $gmtCreate;
|
||||
|
||||
/**
|
||||
* @var string $imageURLs
|
||||
*
|
||||
* @JMS\Type("string")
|
||||
* @JMS\SerializedName("image_u_r_ls")
|
||||
*/
|
||||
public $imageURLs;
|
||||
|
||||
/**
|
||||
* @var int $productId
|
||||
*
|
||||
* @JMS\Type("int")
|
||||
* @JMS\SerializedName("product_id")
|
||||
*/
|
||||
public $productId;
|
||||
|
||||
/**
|
||||
* @var string $productPrice
|
||||
*
|
||||
* @JMS\Type("string")
|
||||
* @JMS\SerializedName("product_price")
|
||||
*/
|
||||
public $productPrice;
|
||||
|
||||
/**
|
||||
* @var string $itemOfferSiteSalePrice
|
||||
*
|
||||
* @JMS\Type("string")
|
||||
* @JMS\SerializedName("item_offer_site_sale_price")
|
||||
*/
|
||||
public $itemOfferSiteSalePrice;
|
||||
|
||||
/**
|
||||
* @var int $totalAvailableStock
|
||||
*
|
||||
* @JMS\Type("int")
|
||||
* @JMS\SerializedName("total_available_stock")
|
||||
*/
|
||||
public $totalAvailableStock;
|
||||
|
||||
/**
|
||||
* @var \RetailCrm\Model\Response\AliExpress\Result\Entity\AeopStoreInfo $storeInfo
|
||||
*
|
||||
* @JMS\Type("RetailCrm\Model\Response\AliExpress\Result\Entity\AeopStoreInfo")
|
||||
* @JMS\SerializedName("store_info")
|
||||
*/
|
||||
public $storeInfo;
|
||||
|
||||
/**
|
||||
* @var int $evaluationCount
|
||||
*
|
||||
* @JMS\Type("int")
|
||||
* @JMS\SerializedName("evaluation_count")
|
||||
*/
|
||||
public $evaluationCount;
|
||||
|
||||
/**
|
||||
* @var string $evaluationCount
|
||||
*
|
||||
* @JMS\Type("string")
|
||||
* @JMS\SerializedName("avg_evaluation_rating")
|
||||
*/
|
||||
public $avgEvaluationRating;
|
||||
|
||||
/**
|
||||
* @var int $orderCount
|
||||
*
|
||||
* @JMS\Type("int")
|
||||
* @JMS\SerializedName("order_count")
|
||||
*/
|
||||
public $orderCount;
|
||||
}
|
@ -0,0 +1,60 @@
|
||||
<?php
|
||||
/**
|
||||
* PHP version 7.3
|
||||
*
|
||||
* @category TradeBuyPlaceOrderResponseResult
|
||||
* @package RetailCrm\Model\Response\AliExpress\Result
|
||||
* @author RetailCRM <integration@retailcrm.ru>
|
||||
* @license http://retailcrm.ru Proprietary
|
||||
* @link http://retailcrm.ru
|
||||
* @see http://help.retailcrm.ru
|
||||
*/
|
||||
|
||||
namespace RetailCrm\Model\Response\AliExpress\Result;
|
||||
|
||||
use JMS\Serializer\Annotation as JMS;
|
||||
|
||||
/**
|
||||
* Class TradeBuyPlaceOrderResponseResult
|
||||
*
|
||||
* @category TradeBuyPlaceOrderResponseResult
|
||||
* @package RetailCrm\Model\Response\AliExpress\Result
|
||||
* @author RetailDriver LLC <integration@retailcrm.ru>
|
||||
* @license https://retailcrm.ru Proprietary
|
||||
* @link http://retailcrm.ru
|
||||
* @see https://help.retailcrm.ru
|
||||
*/
|
||||
class TradeBuyPlaceOrderResponseResult
|
||||
{
|
||||
/**
|
||||
* @var string $errorCode
|
||||
*
|
||||
* @JMS\Type("string")
|
||||
* @JMS\SerializedName("error_code")
|
||||
*/
|
||||
public $errorCode;
|
||||
|
||||
/**
|
||||
* @var string $errorMsg
|
||||
*
|
||||
* @JMS\Type("string")
|
||||
* @JMS\SerializedName("error_msg")
|
||||
*/
|
||||
public $errorMsg;
|
||||
|
||||
/**
|
||||
* @var \RetailCrm\Model\Response\AliExpress\Result\Entity\NumbersList $orderList
|
||||
*
|
||||
* @JMS\Type("RetailCrm\Model\Response\AliExpress\Result\Entity\NumbersList")
|
||||
* @JMS\SerializedName("order_list")
|
||||
*/
|
||||
public $orderList;
|
||||
|
||||
/**
|
||||
* @var bool $isSuccess
|
||||
*
|
||||
* @JMS\Type("bool")
|
||||
* @JMS\SerializedName("is_success")
|
||||
*/
|
||||
public $isSuccess;
|
||||
}
|
37
src/Model/Response/AliExpress/TradeBuyPlaceOrderResponse.php
Normal file
37
src/Model/Response/AliExpress/TradeBuyPlaceOrderResponse.php
Normal file
@ -0,0 +1,37 @@
|
||||
<?php
|
||||
/**
|
||||
* PHP version 7.3
|
||||
*
|
||||
* @category TradeBuyPlaceOrderResponse
|
||||
* @package RetailCrm\Model\Response\AliExpress
|
||||
* @author RetailCRM <integration@retailcrm.ru>
|
||||
* @license http://retailcrm.ru Proprietary
|
||||
* @link http://retailcrm.ru
|
||||
* @see http://help.retailcrm.ru
|
||||
*/
|
||||
|
||||
namespace RetailCrm\Model\Response\AliExpress;
|
||||
|
||||
use RetailCrm\Model\Response\BaseResponse;
|
||||
use JMS\Serializer\Annotation as JMS;
|
||||
|
||||
/**
|
||||
* Class TradeBuyPlaceOrderResponse
|
||||
*
|
||||
* @category TradeBuyPlaceOrderResponse
|
||||
* @package RetailCrm\Model\Response\AliExpress
|
||||
* @author RetailDriver LLC <integration@retailcrm.ru>
|
||||
* @license https://retailcrm.ru Proprietary
|
||||
* @link http://retailcrm.ru
|
||||
* @see https://help.retailcrm.ru
|
||||
*/
|
||||
class TradeBuyPlaceOrderResponse extends BaseResponse
|
||||
{
|
||||
/**
|
||||
* @var \RetailCrm\Model\Response\AliExpress\Data\TradeBuyPlaceOrderResponseData $responseData
|
||||
*
|
||||
* @JMS\Type("RetailCrm\Model\Response\AliExpress\Data\TradeBuyPlaceOrderResponseData")
|
||||
* @JMS\SerializedName("aliexpress_trade_buy_placeorder_response")
|
||||
*/
|
||||
public $responseData;
|
||||
}
|
@ -261,6 +261,17 @@ class TopClient implements TopClientInterface
|
||||
}
|
||||
|
||||
$bodyData = self::getBodyContents($httpResponse->getBody());
|
||||
|
||||
if ($this->debugLogging()) {
|
||||
$this->logger->debug(sprintf(
|
||||
'<AliExpress TOP Client> Request %s (%s) (%s): got response %s',
|
||||
$request->getMethod(),
|
||||
$httpRequest->getUri()->__toString(),
|
||||
$httpRequest->getBody()->__toString(),
|
||||
$bodyData
|
||||
));
|
||||
}
|
||||
|
||||
/** @var BaseResponse $response */
|
||||
$response = $this->serializer->deserialize(
|
||||
$bodyData,
|
||||
@ -275,9 +286,10 @@ class TopClient implements TopClientInterface
|
||||
if (null !== $response->errorResponse) {
|
||||
if ($this->debugLogging()) {
|
||||
$this->logger->debug(sprintf(
|
||||
'<AliExpress TOP Client> Request %s (%s): got error response %s',
|
||||
'<AliExpress TOP Client> Request %s (%s) (%s): got error response %s',
|
||||
$request->getMethod(),
|
||||
$httpRequest->getUri()->__toString(),
|
||||
$httpRequest->getBody()->__toString(),
|
||||
$bodyData
|
||||
));
|
||||
}
|
||||
@ -285,15 +297,6 @@ class TopClient implements TopClientInterface
|
||||
throw new TopApiException($response->errorResponse);
|
||||
}
|
||||
|
||||
if ($this->debugLogging()) {
|
||||
$this->logger->debug(sprintf(
|
||||
'<AliExpress TOP Client> Request %s (%s): got response %s',
|
||||
$request->getMethod(),
|
||||
$httpRequest->getUri()->__toString(),
|
||||
$bodyData
|
||||
));
|
||||
}
|
||||
|
||||
return $response;
|
||||
}
|
||||
|
||||
|
@ -67,6 +67,11 @@ class RequestMatcher implements RequestMatcherInterface
|
||||
*/
|
||||
private $optionalQueryParams = [];
|
||||
|
||||
/**
|
||||
* @var array
|
||||
*/
|
||||
private $optionalPostFields = [];
|
||||
|
||||
/**
|
||||
* RequestMatcher constructor.
|
||||
*
|
||||
@ -164,6 +169,17 @@ class RequestMatcher implements RequestMatcherInterface
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array $optionalPostFields
|
||||
*
|
||||
* @return RequestMatcher
|
||||
*/
|
||||
public function setOptionalPostFields(array $optionalPostFields): RequestMatcher
|
||||
{
|
||||
$this->optionalPostFields = $optionalPostFields;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
@ -210,6 +226,15 @@ class RequestMatcher implements RequestMatcherInterface
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!empty($this->optionalPostFields)
|
||||
&& !$this->firstArrayPresentInSecond(
|
||||
$this->optionalPostFields,
|
||||
$this->getQueryData((string) $request->getBody())
|
||||
)
|
||||
) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -30,10 +30,11 @@ class AuthorizationUriBuilderTest extends TestCase
|
||||
public function testBuild()
|
||||
{
|
||||
$appData = $this->getEnvAppData();
|
||||
$builder = new AuthorizationUriBuilder($appData->getAppKey(), $appData->getRedirectUri());
|
||||
$builder = new AuthorizationUriBuilder($appData->getAppKey(), $appData->getRedirectUri(), true);
|
||||
$result = $builder->build();
|
||||
|
||||
self::assertNotFalse(strpos($result, $appData->getAppKey()));
|
||||
self::assertNotFalse(strpos($result, urlencode($appData->getRedirectUri())));
|
||||
self::assertNotFalse(strpos($result->getAddress(), $appData->getAppKey()));
|
||||
self::assertNotFalse(strpos($result->getAddress(), urlencode($appData->getRedirectUri())));
|
||||
self::assertNotEmpty($result->getState());
|
||||
}
|
||||
}
|
||||
|
@ -41,10 +41,9 @@ class TopRequestFactoryTest extends TestCase
|
||||
$uri = $request->getUri();
|
||||
$contents = self::getStreamData($request->getBody());
|
||||
|
||||
self::assertEmpty($contents);
|
||||
self::assertNotEmpty($uri->getQuery());
|
||||
self::assertFalse(stripos($uri->getQuery(), 'simplify'), $uri->getQuery());
|
||||
self::assertNotFalse(stripos($uri->getQuery(), 'SPAIN_LOCAL_CORREOS'));
|
||||
self::assertNotEmpty($contents);
|
||||
self::assertFalse(stripos($contents, 'simplify'), $uri->getQuery());
|
||||
self::assertNotFalse(stripos($contents, 'SPAIN_LOCAL_CORREOS'));
|
||||
}
|
||||
|
||||
public function testFromModelPost(): void
|
||||
|
@ -16,16 +16,24 @@ use DateTime;
|
||||
use Http\Message\RequestMatcher\CallbackRequestMatcher;
|
||||
use Psr\Http\Message\RequestInterface;
|
||||
use RetailCrm\Builder\TopClientBuilder;
|
||||
use RetailCrm\Component\Constants;
|
||||
use RetailCrm\Component\Logger\FileLogger;
|
||||
use RetailCrm\Component\Logger\StdoutLogger;
|
||||
use RetailCrm\Model\Entity\CategoryInfo;
|
||||
use RetailCrm\Model\Enum\DropshippingAreas;
|
||||
use RetailCrm\Model\Enum\FeedOperationTypes;
|
||||
use RetailCrm\Model\Enum\FeedStatuses;
|
||||
use RetailCrm\Model\Enum\OfflinePickupTypes;
|
||||
use RetailCrm\Model\Enum\OrderStatuses;
|
||||
use RetailCrm\Model\Request\AliExpress\Data\FeedStocksUpdateDto;
|
||||
use RetailCrm\Model\Request\AliExpress\Data\OrderQuery;
|
||||
use RetailCrm\Model\Request\AliExpress\Data\SingleItemRequestDto;
|
||||
use RetailCrm\Model\Request\AliExpress\Data\SingleOrderQuery;
|
||||
use RetailCrm\Model\Request\AliExpress\Data\SkuStocksUpdateItemDto;
|
||||
use RetailCrm\Model\Request\AliExpress\LogisticsDsTrackingInfoQuery;
|
||||
use RetailCrm\Model\Request\AliExpress\LogisticsRedefiningListLogisticsService;
|
||||
use RetailCrm\Model\Request\AliExpress\PostproductRedefiningCategoryForecast;
|
||||
use RetailCrm\Model\Request\AliExpress\PostproductRedefiningFindAEProductByIdForDropshipper;
|
||||
use RetailCrm\Model\Request\AliExpress\SolutionFeedListGet;
|
||||
use RetailCrm\Model\Request\AliExpress\SolutionFeedQuery;
|
||||
use RetailCrm\Model\Request\AliExpress\SolutionFeedSubmit;
|
||||
@ -39,6 +47,7 @@ use RetailCrm\Model\Response\AliExpress\Data\SolutionFeedSubmitResponseData;
|
||||
use RetailCrm\Model\Response\AliExpress\Data\SolutionSellerCategoryTreeQueryResponseData;
|
||||
use RetailCrm\Model\Response\AliExpress\Data\SolutionSellerCategoryTreeQueryResponseDataChildrenCategoryList;
|
||||
use RetailCrm\Model\Response\AliExpress\PostproductRedefiningCategoryForecastResponse;
|
||||
use RetailCrm\Model\Response\AliExpress\PostproductRedefiningFindAEProductByIdForDropshipperResponse;
|
||||
use RetailCrm\Model\Response\AliExpress\SolutionFeedListGetResponse;
|
||||
use RetailCrm\Model\Response\AliExpress\SolutionSellerCategoryTreeQueryResponse;
|
||||
use RetailCrm\Model\Response\ErrorResponseBody;
|
||||
@ -134,7 +143,7 @@ EOF;
|
||||
$mock->on(
|
||||
RequestMatcher::createMatcher('api.taobao.com')
|
||||
->setPath('/router/rest')
|
||||
->setOptionalQueryParams([
|
||||
->setOptionalPostFields([
|
||||
'app_key' => self::getEnvAppKey(),
|
||||
'method' => 'aliexpress.solution.seller.category.tree.query',
|
||||
'category_id' => '5090300',
|
||||
@ -201,7 +210,7 @@ EOF;
|
||||
$mock->on(
|
||||
RequestMatcher::createMatcher('api.taobao.com')
|
||||
->setPath('/router/rest')
|
||||
->setOptionalQueryParams([
|
||||
->setOptionalPostFields([
|
||||
'app_key' => self::getEnvAppKey(),
|
||||
'method' => 'aliexpress.postproduct.redefining.categoryforecast',
|
||||
'session' => self::getEnvToken()
|
||||
@ -254,7 +263,7 @@ EOF;
|
||||
$mock->on(
|
||||
RequestMatcher::createMatcher('api.taobao.com')
|
||||
->setPath('/router/rest')
|
||||
->setOptionalQueryParams([
|
||||
->setOptionalPostFields([
|
||||
'app_key' => self::getEnvAppKey(),
|
||||
'method' => 'aliexpress.postproduct.redefining.categoryforecast',
|
||||
'session' => self::getEnvToken()
|
||||
@ -297,7 +306,7 @@ EOF;
|
||||
$mock->on(
|
||||
RequestMatcher::createMatcher('api.taobao.com')
|
||||
->setPath('/router/rest')
|
||||
->setOptionalQueryParams([
|
||||
->setOptionalPostFields([
|
||||
'app_key' => self::getEnvAppKey(),
|
||||
'method' => 'aliexpress.solution.feed.submit',
|
||||
'session' => self::getEnvToken()
|
||||
@ -348,7 +357,7 @@ EOF;
|
||||
$mock->on(
|
||||
RequestMatcher::createMatcher('api.taobao.com')
|
||||
->setPath('/router/rest')
|
||||
->setOptionalQueryParams([
|
||||
->setOptionalPostFields([
|
||||
'app_key' => self::getEnvAppKey(),
|
||||
'method' => 'aliexpress.solution.feed.query',
|
||||
'session' => self::getEnvToken()
|
||||
@ -405,7 +414,7 @@ EOF;
|
||||
$mock->on(
|
||||
RequestMatcher::createMatcher('api.taobao.com')
|
||||
->setPath('/router/rest')
|
||||
->setOptionalQueryParams([
|
||||
->setOptionalPostFields([
|
||||
'app_key' => self::getEnvAppKey(),
|
||||
'method' => 'aliexpress.solution.feed.list.get',
|
||||
'session' => self::getEnvToken()
|
||||
@ -452,7 +461,7 @@ EOF;
|
||||
$mock->on(
|
||||
RequestMatcher::createMatcher('api.taobao.com')
|
||||
->setPath('/router/rest')
|
||||
->setOptionalQueryParams([
|
||||
->setOptionalPostFields([
|
||||
'app_key' => self::getEnvAppKey(),
|
||||
'method' => 'aliexpress.solution.product.schema.get',
|
||||
'session' => self::getEnvToken()
|
||||
@ -587,7 +596,7 @@ EOF;
|
||||
$mock->on(
|
||||
RequestMatcher::createMatcher('api.taobao.com')
|
||||
->setPath('/router/rest')
|
||||
->setOptionalQueryParams([
|
||||
->setOptionalPostFields([
|
||||
'app_key' => self::getEnvAppKey(),
|
||||
'method' => 'aliexpress.solution.order.get',
|
||||
'session' => self::getEnvToken()
|
||||
@ -652,7 +661,7 @@ EOF;
|
||||
$mock->on(
|
||||
RequestMatcher::createMatcher('api.taobao.com')
|
||||
->setPath('/router/rest')
|
||||
->setOptionalQueryParams([
|
||||
->setOptionalPostFields([
|
||||
'app_key' => self::getEnvAppKey(),
|
||||
'method' => 'aliexpress.solution.order.receiptinfo.get',
|
||||
'session' => self::getEnvToken()
|
||||
@ -707,7 +716,7 @@ EOF;
|
||||
$mock->on(
|
||||
RequestMatcher::createMatcher('api.taobao.com')
|
||||
->setPath('/router/rest')
|
||||
->setOptionalQueryParams([
|
||||
->setOptionalPostFields([
|
||||
'app_key' => self::getEnvAppKey(),
|
||||
'method' => 'aliexpress.logistics.redefining.listlogisticsservice',
|
||||
'session' => self::getEnvToken()
|
||||
@ -743,7 +752,7 @@ EOF;
|
||||
$mock->on(
|
||||
RequestMatcher::createMatcher('api.taobao.com')
|
||||
->setPath('/router/rest')
|
||||
->setOptionalQueryParams([
|
||||
->setOptionalPostFields([
|
||||
'app_key' => self::getEnvAppKey(),
|
||||
'method' => 'aliexpress.solution.order.fulfill',
|
||||
'session' => self::getEnvToken()
|
||||
@ -768,4 +777,288 @@ EOF;
|
||||
|
||||
self::assertTrue($response->responseData->result->resultSuccess);
|
||||
}
|
||||
|
||||
public function testAliexpressPostproductRedefiningFindAEProductByIdForDropshipper()
|
||||
{
|
||||
$json = <<<'EOF'
|
||||
{
|
||||
"aliexpress_postproduct_redefining_findaeproductbyidfordropshipper_response":{
|
||||
"result":{
|
||||
"aeop_ae_product_s_k_us":{
|
||||
"aeop_ae_product_sku":[
|
||||
{
|
||||
"sku_stock":true,
|
||||
"sku_price":"200.07",
|
||||
"sku_code":"cfas00978",
|
||||
"ipm_sku_stock":1234,
|
||||
"id":"\"200000182:193;200007763:201336100\"",
|
||||
"currency_code":"USD",
|
||||
"aeop_s_k_u_propertys":{
|
||||
"aeop_sku_property":[
|
||||
{
|
||||
"sku_property_id":0,
|
||||
"sku_image":"0",
|
||||
"property_value_id_long":0,
|
||||
"property_value_definition_name":"0",
|
||||
"sku_property_value":"\"blue\"",
|
||||
"sku_property_name":"\"color\""
|
||||
}
|
||||
]
|
||||
},
|
||||
"barcode":"320325455",
|
||||
"offer_sale_price":"3.3",
|
||||
"offer_bulk_sale_price":"3.2",
|
||||
"sku_bulk_order":10,
|
||||
"s_k_u_available_stock":10
|
||||
}
|
||||
]
|
||||
},
|
||||
"detail":"<div>This is a product<\/div>",
|
||||
"is_success":true,
|
||||
"product_unit":100000015,
|
||||
"ws_offline_date":"0",
|
||||
"ws_display":"expire_offline",
|
||||
"category_id":123456,
|
||||
"aeop_a_e_multimedia":{
|
||||
"aeop_a_e_videos":{
|
||||
"aeop_ae_video":[
|
||||
{
|
||||
"poster_url":"http:\/\/img01.taobaocdn.com\/bao\/uploaded\/TB1rNdGIVXXXXbTXFXXXXXXXXXX.jpg",
|
||||
"media_type":"video",
|
||||
"media_status":"approved",
|
||||
"media_id":12345678,
|
||||
"ali_member_id":1006680305
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"owner_member_id":"aliqatest01",
|
||||
"product_status_type":"onSelling",
|
||||
"aeop_ae_product_propertys":{
|
||||
"aeop_ae_product_property":[
|
||||
{
|
||||
"attr_value_unit":"piece",
|
||||
"attr_value_start":"1",
|
||||
"attr_value_id":100234,
|
||||
"attr_value_end":"10",
|
||||
"attr_value":"ABCD",
|
||||
"attr_name_id":2981,
|
||||
"attr_name":"型号"
|
||||
}
|
||||
]
|
||||
},
|
||||
"gross_weight":"40.12",
|
||||
"delivery_time":7,
|
||||
"ws_valid_num":30,
|
||||
"gmt_modified":"0",
|
||||
"error_message":"System exception",
|
||||
"package_type":true,
|
||||
"aeop_national_quote_configuration":{
|
||||
"configuration_type":"percentage",
|
||||
"configuration_data":"[{\"shiptoCountry\":\"US\",\"percentage\":\"5\"},{\"shiptoCountry\":\"RU\",\"percentage\":\"-2\"}]"
|
||||
},
|
||||
"subject":"knew odd",
|
||||
"base_unit":2,
|
||||
"package_length":10,
|
||||
"mobile_detail":"{}",
|
||||
"package_height":2,
|
||||
"package_width":12,
|
||||
"currency_code":"USD",
|
||||
"gmt_create":"0",
|
||||
"image_u_r_ls":"http:\/\/g01.a.alicdn.com\/kf\/HTB13GKLJXXXXXbYaXXXq6xXFXXXi.jpg;http:\/\/g02.a.alicdn.com\/kf\/HTB1DkaWJXXXXXb6XFXXq6xXFXXXp.jpg;http:\/\/g02.a.alicdn.com\/kf\/HTB1pMCQJXXXXXcvXVXXq6xXFXXXm.jpg;http:\/\/g03.a.alicdn.com\/kf\/HTB1QhORJXXXXXbiXVXXq6xXFXXXx.jpg;http:\/\/g02.a.alicdn.com\/kf\/HTB1q1aLJXXXXXcfaXXXq6xXFXXXv.jpg",
|
||||
"product_id":32839190109,
|
||||
"error_code":16009999,
|
||||
"product_price":"10.23",
|
||||
"item_offer_site_sale_price":"USD 5.5",
|
||||
"total_available_stock":12,
|
||||
"store_info":{
|
||||
"communication_rating":"4.8",
|
||||
"item_as_descriped_rating":"4.8",
|
||||
"shipping_speed_rating":"4.7",
|
||||
"store_id":12345,
|
||||
"store_name":"Clothes Store"
|
||||
},
|
||||
"evaluation_count":100,
|
||||
"avg_evaluation_rating":"4.7",
|
||||
"order_count":120
|
||||
}
|
||||
}
|
||||
}
|
||||
EOF;
|
||||
$mock = self::getMockClient();
|
||||
$mock->on(
|
||||
RequestMatcher::createMatcher('api.taobao.com')
|
||||
->setPath('/router/rest')
|
||||
->setOptionalPostFields([
|
||||
'app_key' => self::getEnvAppKey(),
|
||||
'method' => 'aliexpress.postproduct.redefining.findaeproductbyidfordropshipper',
|
||||
'session' => self::getEnvToken()
|
||||
]),
|
||||
$this->responseJson(200, $json)
|
||||
);
|
||||
$client = TopClientBuilder::create()
|
||||
->setContainer($this->getContainer($mock))
|
||||
->setAppData($this->getEnvAppData())
|
||||
->setAuthenticator($this->getEnvTokenAuthenticator())
|
||||
->build();
|
||||
$request = new PostproductRedefiningFindAEProductByIdForDropshipper();
|
||||
$request->productId = 1;
|
||||
|
||||
/** @var PostproductRedefiningFindAEProductByIdForDropshipperResponse $response */
|
||||
$response = $client->sendAuthenticatedRequest($request);
|
||||
|
||||
self::assertEquals(
|
||||
'http://img01.taobaocdn.com/bao/uploaded/TB1rNdGIVXXXXbTXFXXXXXXXXXX.jpg',
|
||||
$response->responseData->result->aeopAeMultimedia->aeopAeVideos->aeopAeVideo[0]->posterUrl
|
||||
);
|
||||
}
|
||||
|
||||
public function testAliexpressLogisticsDsTrackingInfoQuery()
|
||||
{
|
||||
$json = <<<'EOF'
|
||||
{
|
||||
"aliexpress_logistics_ds_trackinginfo_query_response":{
|
||||
"details":{
|
||||
"details":[
|
||||
{
|
||||
"event_desc":"BILLING INFORMATION RECEIVED",
|
||||
"signed_name":"signedName",
|
||||
"status":"status",
|
||||
"address":"address",
|
||||
"event_date":"2016-06-26"
|
||||
}
|
||||
]
|
||||
},
|
||||
"official_website":"www.ems.com",
|
||||
"error_desc":"System error",
|
||||
"result_success":true
|
||||
}
|
||||
}
|
||||
EOF;
|
||||
$mock = self::getMockClient();
|
||||
$mock->on(
|
||||
RequestMatcher::createMatcher('api.taobao.com')
|
||||
->setPath('/router/rest')
|
||||
->setOptionalPostFields([
|
||||
'app_key' => self::getEnvAppKey(),
|
||||
'method' => 'aliexpress.logistics.ds.trackinginfo.query',
|
||||
'session' => self::getEnvToken()
|
||||
]),
|
||||
$this->responseJson(200, $json)
|
||||
);
|
||||
$client = TopClientBuilder::create()
|
||||
->setContainer($this->getContainer($mock))
|
||||
->setAppData($this->getEnvAppData())
|
||||
->setAuthenticator($this->getEnvTokenAuthenticator())
|
||||
->build();
|
||||
$request = new LogisticsDsTrackingInfoQuery();
|
||||
$request->logisticsNo = '20100810142400000-0700';
|
||||
$request->outRef = '1160045240183009';
|
||||
$request->serviceName = 'UPS';
|
||||
$request->toArea = DropshippingAreas::RUSSIAN_FEDERATION;
|
||||
|
||||
/** @var \RetailCrm\Model\Response\AliExpress\LogisticsDsTrackingInfoQueryResponse $response */
|
||||
$response = $client->sendAuthenticatedRequest($request);
|
||||
|
||||
self::assertEquals(
|
||||
'BILLING INFORMATION RECEIVED',
|
||||
$response->responseData->details->details[0]->eventDesc
|
||||
);
|
||||
}
|
||||
|
||||
public function testAliexpressFeedSolutionStocksWorkflow()
|
||||
{
|
||||
$jsonFeedSubmitResponse = <<<'EOF'
|
||||
{
|
||||
"aliexpress_solution_feed_submit_response":{
|
||||
"job_id":200000000060024475
|
||||
}
|
||||
}
|
||||
EOF;
|
||||
$jsonFeedQueryResponse = <<<'EOF'
|
||||
{
|
||||
"aliexpress_solution_feed_query_response":{
|
||||
"job_id":200000000060024475,
|
||||
"success_item_count":1,
|
||||
"result_list":{
|
||||
"single_item_response_dto":[
|
||||
{
|
||||
"item_execution_result":"{\"productId\":33030372006,\"success\":true}",
|
||||
"item_content_id":"A00000000Y1"
|
||||
}
|
||||
]
|
||||
},
|
||||
"total_item_count":1
|
||||
}
|
||||
}
|
||||
EOF;
|
||||
|
||||
$requestSubmit = new SolutionFeedSubmit();
|
||||
$requestSubmit->operationType = FeedOperationTypes::PRODUCT_STOCKS_UPDATE;
|
||||
$requestSubmit->itemList = [];
|
||||
|
||||
for ($i = 0; $i < 100; $i++) {
|
||||
$dto = new SingleItemRequestDto();
|
||||
$stocks = new FeedStocksUpdateDto();
|
||||
$stocks->aliexpressProductId = 1;
|
||||
$stocks->multipleSkuUpdateList = [];
|
||||
|
||||
for ($j = 0; $j < 5; $j++) {
|
||||
$item = new SkuStocksUpdateItemDto();
|
||||
$item->skuCode = sha1(mt_rand());
|
||||
$item->inventory = mt_rand(1, 100);
|
||||
$stocks->multipleSkuUpdateList[] = $item;
|
||||
}
|
||||
|
||||
$dto->itemContentId = sha1(mt_rand());
|
||||
$dto->itemContent = $stocks;
|
||||
|
||||
$requestSubmit->itemList[] = $dto;
|
||||
}
|
||||
|
||||
$requestQuery = new SolutionFeedQuery();
|
||||
$requestQuery->jobId = 200000000060024475;
|
||||
|
||||
$mock = self::getMockClient();
|
||||
$mock->on(
|
||||
RequestMatcher::createMatcher('api.taobao.com')
|
||||
->setPath('/router/rest')
|
||||
->setOptionalPostFields([
|
||||
'app_key' => self::getEnvAppKey(),
|
||||
'method' => 'aliexpress.solution.feed.submit',
|
||||
'session' => self::getEnvToken()
|
||||
]),
|
||||
$this->responseJson(200, $jsonFeedSubmitResponse)
|
||||
);
|
||||
$mock->on(
|
||||
RequestMatcher::createMatcher('api.taobao.com')
|
||||
->setPath('/router/rest')
|
||||
->setOptionalPostFields([
|
||||
'app_key' => self::getEnvAppKey(),
|
||||
'method' => 'aliexpress.solution.feed.query',
|
||||
'session' => self::getEnvToken(),
|
||||
'job_id' => 200000000060024475
|
||||
]),
|
||||
$this->responseJson(200, $jsonFeedQueryResponse)
|
||||
);
|
||||
$client = TopClientBuilder::create()
|
||||
->setContainer($this->getContainer($mock))
|
||||
->setAppData($this->getEnvAppData())
|
||||
->setAuthenticator($this->getEnvTokenAuthenticator())
|
||||
->build();
|
||||
|
||||
/** @var \RetailCrm\Model\Response\AliExpress\SolutionFeedSubmitResponse $response */
|
||||
$responseSubmit = $client->sendAuthenticatedRequest($requestSubmit);
|
||||
|
||||
self::assertEquals('200000000060024475', $responseSubmit->responseData->jobId);
|
||||
|
||||
/** @var \RetailCrm\Model\Response\AliExpress\SolutionFeedQueryResponse $responseQuery */
|
||||
$responseQuery = $client->sendAuthenticatedRequest($requestQuery);
|
||||
|
||||
self::assertEquals(200000000060024475, $responseQuery->responseData->jobId);
|
||||
self::assertEquals(1, $responseQuery->responseData->successItemCount);
|
||||
self::assertNotNull($responseQuery->responseData->resultList);
|
||||
self::assertNotNull($responseQuery->responseData->resultList->singleItemResponseDto);
|
||||
self::assertCount(1, $responseQuery->responseData->resultList->singleItemResponseDto);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user