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