Compare commits
No commits in common. "master" and "v6.15.8" have entirely different histories.
17 changed files with 9 additions and 332 deletions
12
.github/workflows/ci.yml
vendored
12
.github/workflows/ci.yml
vendored
|
@ -17,30 +17,24 @@ jobs:
|
||||||
php-version: ['7.3', '7.4', '8.0', '8.1', '8.2', '8.3']
|
php-version: ['7.3', '7.4', '8.0', '8.1', '8.2', '8.3']
|
||||||
steps:
|
steps:
|
||||||
- name: Check out code into the workspace
|
- name: Check out code into the workspace
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
- name: Setup PHP ${{ matrix.php-version }}
|
- name: Setup PHP ${{ matrix.php-version }}
|
||||||
uses: shivammathur/setup-php@v2
|
uses: shivammathur/setup-php@v2
|
||||||
with:
|
with:
|
||||||
php-version: ${{ matrix.php-version }}
|
php-version: ${{ matrix.php-version }}
|
||||||
coverage: pcov
|
coverage: pcov
|
||||||
|
|
||||||
- name: Composer cache
|
- name: Composer cache
|
||||||
uses: actions/cache@v4
|
uses: actions/cache@v2
|
||||||
with:
|
with:
|
||||||
path: ${{ env.HOME }}/.composer/cache
|
path: ${{ env.HOME }}/.composer/cache
|
||||||
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
|
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: composer install -o
|
run: composer install -o
|
||||||
|
|
||||||
- name: Configure matchers
|
- name: Configure matchers
|
||||||
uses: mheap/phpunit-matcher-action@v1
|
uses: mheap/phpunit-matcher-action@v1
|
||||||
|
|
||||||
- name: Run tests
|
- name: Run tests
|
||||||
run: composer run-script phpunit-ci
|
run: composer run-script phpunit-ci
|
||||||
|
|
||||||
- name: Coverage
|
- name: Coverage
|
||||||
uses: codecov/codecov-action@v4
|
uses: codecov/codecov-action@v2
|
||||||
with:
|
with:
|
||||||
verbose: true
|
verbose: true
|
||||||
|
|
6
.github/workflows/code_quality.yml
vendored
6
.github/workflows/code_quality.yml
vendored
|
@ -13,7 +13,7 @@ jobs:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Check out code into the workspace
|
- name: Check out code into the workspace
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v2
|
||||||
- name: Run PHPCS
|
- name: Run PHPCS
|
||||||
uses: chekalsky/phpcs-action@v1
|
uses: chekalsky/phpcs-action@v1
|
||||||
phpmd:
|
phpmd:
|
||||||
|
@ -21,7 +21,7 @@ jobs:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Check out code into the workspace
|
- name: Check out code into the workspace
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v2
|
||||||
- name: Run PHPMD
|
- name: Run PHPMD
|
||||||
uses: GeneaLabs/action-reviewdog-phpmd@1.0.0
|
uses: GeneaLabs/action-reviewdog-phpmd@1.0.0
|
||||||
with:
|
with:
|
||||||
|
@ -35,7 +35,7 @@ jobs:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Check out code into the workspace
|
- name: Check out code into the workspace
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v2
|
||||||
- name: Run PHPStan
|
- name: Run PHPStan
|
||||||
uses: docker://oskarstark/phpstan-ga:1.8.0
|
uses: docker://oskarstark/phpstan-ga:1.8.0
|
||||||
with:
|
with:
|
||||||
|
|
4
.github/workflows/documentation.yml
vendored
4
.github/workflows/documentation.yml
vendored
|
@ -19,7 +19,7 @@ jobs:
|
||||||
pages_threshold: major_outage
|
pages_threshold: major_outage
|
||||||
- name: Check out code into the workspace
|
- name: Check out code into the workspace
|
||||||
if: success() && ${{ github.ref != 'refs/heads/master' }}
|
if: success() && ${{ github.ref != 'refs/heads/master' }}
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v2
|
||||||
- name: Setup PHP 8.3
|
- name: Setup PHP 8.3
|
||||||
if: ${{ github.ref != 'refs/heads/master' }}
|
if: ${{ github.ref != 'refs/heads/master' }}
|
||||||
uses: shivammathur/setup-php@v2
|
uses: shivammathur/setup-php@v2
|
||||||
|
@ -27,7 +27,7 @@ jobs:
|
||||||
php-version: "8.3"
|
php-version: "8.3"
|
||||||
- name: Cache phpDocumentor
|
- name: Cache phpDocumentor
|
||||||
id: cache-phpdocumentor
|
id: cache-phpdocumentor
|
||||||
uses: actions/cache@v4
|
uses: actions/cache@v2
|
||||||
with:
|
with:
|
||||||
path: phpDocumentor.phar
|
path: phpDocumentor.phar
|
||||||
key: phpdocumentor
|
key: phpdocumentor
|
||||||
|
|
|
@ -285,7 +285,6 @@ class ClientFactory implements ClientFactoryInterface, EventDispatcherAwareInter
|
||||||
->setStreamFactory($this->streamFactory)
|
->setStreamFactory($this->streamFactory)
|
||||||
->setRequestFactory($this->requestFactory)
|
->setRequestFactory($this->requestFactory)
|
||||||
->setUriFactory($this->uriFactory)
|
->setUriFactory($this->uriFactory)
|
||||||
->setEventDispatcher($this->eventDispatcher)
|
|
||||||
->appendRequestHandlers($this->requestHandlers)
|
->appendRequestHandlers($this->requestHandlers)
|
||||||
->appendResponseHandlers($this->responseHandlers)
|
->appendResponseHandlers($this->responseHandlers)
|
||||||
->build();
|
->build();
|
||||||
|
|
|
@ -369,14 +369,6 @@ class Customer implements CustomerInterface
|
||||||
*/
|
*/
|
||||||
public $subscribed;
|
public $subscribed;
|
||||||
|
|
||||||
/**
|
|
||||||
* @var \RetailCrm\Api\Model\Entity\Customers\CustomerSubscription[]
|
|
||||||
*
|
|
||||||
* @JMS\Type("array<RetailCrm\Api\Model\Entity\Customers\CustomerSubscription>")
|
|
||||||
* @JMS\SerializedName("customerSubscriptions")
|
|
||||||
*/
|
|
||||||
public $customerSubscriptions;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var \RetailCrm\Api\Model\Entity\Customers\MGCustomer[]
|
* @var \RetailCrm\Api\Model\Entity\Customers\MGCustomer[]
|
||||||
*
|
*
|
||||||
|
|
|
@ -1,46 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
/**
|
|
||||||
* PHP version 7.3
|
|
||||||
*
|
|
||||||
* @category CustomerSubscription
|
|
||||||
* @package RetailCrm\Api\Model\Entity\Customers
|
|
||||||
*/
|
|
||||||
|
|
||||||
namespace RetailCrm\Api\Model\Entity\Customers;
|
|
||||||
|
|
||||||
use DateTime;
|
|
||||||
use RetailCrm\Api\Component\Serializer\Annotation as JMS;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Class CustomerSubscription
|
|
||||||
*
|
|
||||||
* @category CustomerSubscription
|
|
||||||
* @package RetailCrm\Api\Model\Entity\Customers
|
|
||||||
*/
|
|
||||||
class CustomerSubscription
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* @var \RetailCrm\Api\Model\Entity\Customers\SubscriptionCategory
|
|
||||||
*
|
|
||||||
* @JMS\Type("RetailCrm\Api\Model\Entity\Customers\SubscriptionCategory")
|
|
||||||
* @JMS\SerializedName("subscription")
|
|
||||||
*/
|
|
||||||
public $subscription;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @var bool
|
|
||||||
*
|
|
||||||
* @JMS\Type("bool")
|
|
||||||
* @JMS\SerializedName("subscribed")
|
|
||||||
*/
|
|
||||||
public $subscribed;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @var DateTime
|
|
||||||
*
|
|
||||||
* @JMS\Type("DateTime<'Y-m-d H:i:s'>")
|
|
||||||
* @JMS\SerializedName("changedAt")
|
|
||||||
*/
|
|
||||||
public $changedAt;
|
|
||||||
}
|
|
|
@ -1,77 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
/**
|
|
||||||
* PHP version 7.3
|
|
||||||
*
|
|
||||||
* @category SubscriptionCategory
|
|
||||||
* @package RetailCrm\Api\Model\Entity\Customers
|
|
||||||
*/
|
|
||||||
|
|
||||||
namespace RetailCrm\Api\Model\Entity\Customers;
|
|
||||||
|
|
||||||
use RetailCrm\Api\Component\Serializer\Annotation as JMS;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Class SubscriptionCategory
|
|
||||||
*
|
|
||||||
* @category SubscriptionCategory
|
|
||||||
* @package RetailCrm\Api\Model\Entity\Customers
|
|
||||||
*/
|
|
||||||
class SubscriptionCategory
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* @var int
|
|
||||||
*
|
|
||||||
* @JMS\Type("int")
|
|
||||||
* @JMS\SerializedName("id")
|
|
||||||
*/
|
|
||||||
public $id;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @var string
|
|
||||||
*
|
|
||||||
* @JMS\Type("string")
|
|
||||||
* @JMS\SerializedName("channel")
|
|
||||||
*/
|
|
||||||
public $channel;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @var string
|
|
||||||
*
|
|
||||||
* @JMS\Type("string")
|
|
||||||
* @JMS\SerializedName("name")
|
|
||||||
*/
|
|
||||||
public $name;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @var string
|
|
||||||
*
|
|
||||||
* @JMS\Type("string")
|
|
||||||
* @JMS\SerializedName("code")
|
|
||||||
*/
|
|
||||||
public $code;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @var bool
|
|
||||||
*
|
|
||||||
* @JMS\Type("bool")
|
|
||||||
* @JMS\SerializedName("active")
|
|
||||||
*/
|
|
||||||
public $active;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @var bool
|
|
||||||
*
|
|
||||||
* @JMS\Type("bool")
|
|
||||||
* @JMS\SerializedName("autoSubscribe")
|
|
||||||
*/
|
|
||||||
public $autoSubscribe;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @var int
|
|
||||||
*
|
|
||||||
* @JMS\Type("int")
|
|
||||||
* @JMS\SerializedName("ordering")
|
|
||||||
*/
|
|
||||||
public $ordering;
|
|
||||||
}
|
|
|
@ -1,45 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
/**
|
|
||||||
* PHP version 7.3
|
|
||||||
*
|
|
||||||
* @category EmbedJsConfiguration
|
|
||||||
* @package RetailCrm\Api\Model\Entity\Integration\EmbedJs
|
|
||||||
*/
|
|
||||||
|
|
||||||
namespace RetailCrm\Api\Model\Entity\Integration\EmbedJs;
|
|
||||||
|
|
||||||
use RetailCrm\Api\Component\Serializer\Annotation as JMS;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Class EmbedJsConfiguration
|
|
||||||
*
|
|
||||||
* @category EmbedJsConfiguration
|
|
||||||
* @package RetailCrm\Api\Model\Entity\Integration\EmbedJs
|
|
||||||
*/
|
|
||||||
class EmbedJsConfiguration
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* @var string
|
|
||||||
*
|
|
||||||
* @JMS\Type("string")
|
|
||||||
* @JMS\SerializedName("entrypoint")
|
|
||||||
*/
|
|
||||||
public $entrypoint;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @var string
|
|
||||||
*
|
|
||||||
* @JMS\Type("string")
|
|
||||||
* @JMS\SerializedName("stylesheet")
|
|
||||||
*/
|
|
||||||
public $stylesheet;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @var string[]
|
|
||||||
*
|
|
||||||
* @JMS\Type("array<string>")
|
|
||||||
* @JMS\SerializedName("targets")
|
|
||||||
*/
|
|
||||||
public $targets;
|
|
||||||
}
|
|
|
@ -74,12 +74,4 @@ class Integrations
|
||||||
* @JMS\SerializedName("mgBot")
|
* @JMS\SerializedName("mgBot")
|
||||||
*/
|
*/
|
||||||
public $mgBot;
|
public $mgBot;
|
||||||
|
|
||||||
/**
|
|
||||||
* @var \RetailCrm\Api\Model\Entity\Integration\EmbedJs\EmbedJsConfiguration
|
|
||||||
*
|
|
||||||
* @JMS\Type("RetailCrm\Api\Model\Entity\Integration\EmbedJs\EmbedJsConfiguration")
|
|
||||||
* @JMS\SerializedName("embedJs")
|
|
||||||
*/
|
|
||||||
public $embedJs;
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -43,14 +43,6 @@ class ApiUpdateInvoiceRequest
|
||||||
*/
|
*/
|
||||||
public $amount;
|
public $amount;
|
||||||
|
|
||||||
/**
|
|
||||||
* @var float
|
|
||||||
*
|
|
||||||
* @JMS\Type("float")
|
|
||||||
* @JMS\SerializedName("discountAmount")
|
|
||||||
*/
|
|
||||||
public $discountAmount;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var string
|
* @var string
|
||||||
*
|
*
|
||||||
|
|
|
@ -91,14 +91,6 @@ class Store
|
||||||
*/
|
*/
|
||||||
public $phone;
|
public $phone;
|
||||||
|
|
||||||
/**
|
|
||||||
* @var string
|
|
||||||
*
|
|
||||||
* @JMS\Type("string")
|
|
||||||
* @JMS\SerializedName("contact")
|
|
||||||
*/
|
|
||||||
public $contact;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var string
|
* @var string
|
||||||
*
|
*
|
||||||
|
|
|
@ -170,12 +170,4 @@ class ProductOffer
|
||||||
* @JMS\SerializedName("barcode")
|
* @JMS\SerializedName("barcode")
|
||||||
*/
|
*/
|
||||||
public $barcode;
|
public $barcode;
|
||||||
|
|
||||||
/**
|
|
||||||
* @var string
|
|
||||||
*
|
|
||||||
* @JMS\Type("string")
|
|
||||||
* @JMS\SerializedName("site")
|
|
||||||
*/
|
|
||||||
public $site;
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -494,12 +494,4 @@ class CustomerFilter
|
||||||
* @Form\SerializedName("attachedTags")
|
* @Form\SerializedName("attachedTags")
|
||||||
*/
|
*/
|
||||||
public $attachedTags;
|
public $attachedTags;
|
||||||
|
|
||||||
/**
|
|
||||||
* @var \RetailCrm\Api\Model\Filter\Customers\CustomerSubscriptionFilter[]
|
|
||||||
*
|
|
||||||
* @Form\Type("array<RetailCrm\Api\Model\Filter\Customers\CustomerSubscriptionFilter>")
|
|
||||||
* @Form\SerializedName("subscriptions")
|
|
||||||
*/
|
|
||||||
public $subscriptions;
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,45 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
/**
|
|
||||||
* PHP version 7.3
|
|
||||||
*
|
|
||||||
* @category CustomerSubscriptionFilter
|
|
||||||
* @package RetailCrm\Api\Model\Filter\Customers
|
|
||||||
*/
|
|
||||||
|
|
||||||
namespace RetailCrm\Api\Model\Filter\Customers;
|
|
||||||
|
|
||||||
use RetailCrm\Api\Component\FormData\Mapping as Form;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Class CustomerSubscriptionFilter
|
|
||||||
*
|
|
||||||
* @category CustomerSubscriptionFilter
|
|
||||||
* @package RetailCrm\Api\Model\Filter\Customers
|
|
||||||
*/
|
|
||||||
class CustomerSubscriptionFilter
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* @var string
|
|
||||||
*
|
|
||||||
* @Form\Type("string")
|
|
||||||
* @Form\SerializedName("channel")
|
|
||||||
*/
|
|
||||||
public $channel;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @var string
|
|
||||||
*
|
|
||||||
* @Form\Type("string")
|
|
||||||
* @Form\SerializedName("subscription")
|
|
||||||
*/
|
|
||||||
public $subscription;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @var bool
|
|
||||||
*
|
|
||||||
* @Form\Type("bool")
|
|
||||||
* @Form\SerializedName("subscribed")
|
|
||||||
*/
|
|
||||||
public $subscribed;
|
|
||||||
}
|
|
|
@ -27,7 +27,7 @@ trait EventDispatcherAwareTrait
|
||||||
*
|
*
|
||||||
* @param \Psr\EventDispatcher\EventDispatcherInterface|null $eventDispatcher
|
* @param \Psr\EventDispatcher\EventDispatcherInterface|null $eventDispatcher
|
||||||
*
|
*
|
||||||
* @return static
|
* @return object
|
||||||
*/
|
*/
|
||||||
public function setEventDispatcher(?EventDispatcherInterface $eventDispatcher): object
|
public function setEventDispatcher(?EventDispatcherInterface $eventDispatcher): object
|
||||||
{
|
{
|
||||||
|
|
|
@ -180,33 +180,6 @@ class CustomersTest extends AbstractApiResourceGroupTestCase
|
||||||
"number": "89229112322"
|
"number": "89229112322"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"customerSubscriptions": [
|
|
||||||
{
|
|
||||||
"subscription": {
|
|
||||||
"id": 2,
|
|
||||||
"channel": "email",
|
|
||||||
"name": "Без тематики",
|
|
||||||
"code": "default_marketing",
|
|
||||||
"active": true,
|
|
||||||
"autoSubscribe": true,
|
|
||||||
"ordering": 1
|
|
||||||
},
|
|
||||||
"subscribed": true
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"subscription": {
|
|
||||||
"id": 4,
|
|
||||||
"channel": "waba",
|
|
||||||
"name": "Без тематики",
|
|
||||||
"code": "default_marketing",
|
|
||||||
"active": true,
|
|
||||||
"autoSubscribe": true,
|
|
||||||
"ordering": 1
|
|
||||||
},
|
|
||||||
"subscribed": false,
|
|
||||||
"changedAt": "2024-12-17 11:50:43"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"mgCustomers": [
|
"mgCustomers": [
|
||||||
{
|
{
|
||||||
"id": 1,
|
"id": 1,
|
||||||
|
@ -2697,33 +2670,6 @@ EOF;
|
||||||
"number": "+79094055044"
|
"number": "+79094055044"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"customerSubscriptions": [
|
|
||||||
{
|
|
||||||
"subscription": {
|
|
||||||
"id": 2,
|
|
||||||
"channel": "email",
|
|
||||||
"name": "Без тематики",
|
|
||||||
"code": "default_marketing",
|
|
||||||
"active": true,
|
|
||||||
"autoSubscribe": true,
|
|
||||||
"ordering": 1
|
|
||||||
},
|
|
||||||
"subscribed": true
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"subscription": {
|
|
||||||
"id": 4,
|
|
||||||
"channel": "waba",
|
|
||||||
"name": "Без тематики",
|
|
||||||
"code": "default_marketing",
|
|
||||||
"active": true,
|
|
||||||
"autoSubscribe": true,
|
|
||||||
"ordering": 1
|
|
||||||
},
|
|
||||||
"subscribed": false,
|
|
||||||
"changedAt": "2024-12-17 11:50:43"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"mgCustomers": [
|
"mgCustomers": [
|
||||||
{
|
{
|
||||||
"id": 1,
|
"id": 1,
|
||||||
|
|
|
@ -99,7 +99,6 @@ EOF;
|
||||||
$invoiceRequest->paymentId = 'd6458333-fff3-4fd0-9b23-4e6344451f8e';
|
$invoiceRequest->paymentId = 'd6458333-fff3-4fd0-9b23-4e6344451f8e';
|
||||||
$invoiceRequest->invoiceUuid = '5b1b2e9d-b7f1-48f4-acb9-4bfce04b30cf';
|
$invoiceRequest->invoiceUuid = '5b1b2e9d-b7f1-48f4-acb9-4bfce04b30cf';
|
||||||
$invoiceRequest->invoiceUrl = 'https://example.com/newUrl';
|
$invoiceRequest->invoiceUrl = 'https://example.com/newUrl';
|
||||||
$invoiceRequest->discountAmount = 20.0;
|
|
||||||
|
|
||||||
$request = new PaymentUpdateInvoiceRequest($invoiceRequest);
|
$request = new PaymentUpdateInvoiceRequest($invoiceRequest);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue