Add scopes in credentials method
This commit is contained in:
commit
c8be9c7891
@ -21,6 +21,7 @@ use RetailCrm\Api\Model\Response\SuccessResponse;
|
|||||||
class Credentials extends SuccessResponse
|
class Credentials extends SuccessResponse
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
|
* @deprecated
|
||||||
* @var string[]
|
* @var string[]
|
||||||
*
|
*
|
||||||
* @JMS\Type("array<string>")
|
* @JMS\Type("array<string>")
|
||||||
@ -28,6 +29,14 @@ class Credentials extends SuccessResponse
|
|||||||
*/
|
*/
|
||||||
public $credentials;
|
public $credentials;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var string[]
|
||||||
|
*
|
||||||
|
* @JMS\Type("array<string>")
|
||||||
|
* @JMS\SerializedName("scopes")
|
||||||
|
*/
|
||||||
|
public $scopes;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var string
|
* @var string
|
||||||
*
|
*
|
||||||
|
@ -52,6 +52,7 @@ EOF;
|
|||||||
$json = <<<'EOF'
|
$json = <<<'EOF'
|
||||||
{
|
{
|
||||||
"success": true,
|
"success": true,
|
||||||
|
"scopes": ["order_read", "customer_read", "reference_read"],
|
||||||
"credentials": [
|
"credentials": [
|
||||||
"/api/integration-modules/{code}",
|
"/api/integration-modules/{code}",
|
||||||
"/api/integration-modules/{code}/edit"
|
"/api/integration-modules/{code}/edit"
|
||||||
@ -74,5 +75,6 @@ EOF;
|
|||||||
"/api/integration-modules/{code}",
|
"/api/integration-modules/{code}",
|
||||||
"/api/integration-modules/{code}/edit"
|
"/api/integration-modules/{code}/edit"
|
||||||
], $credentials->credentials);
|
], $credentials->credentials);
|
||||||
|
self::assertEquals(["order_read", "customer_read", "reference_read"], $credentials->scopes);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user