diff --git a/src/Bot/Model/Response/FullFileResponse.php b/src/Bot/Model/Response/FullFileResponse.php index fc62147..85fdf2b 100644 --- a/src/Bot/Model/Response/FullFileResponse.php +++ b/src/Bot/Model/Response/FullFileResponse.php @@ -10,6 +10,7 @@ namespace RetailCrm\Mg\Bot\Model\Response; +use JMS\Serializer\Annotation\SerializedName; use JMS\Serializer\Annotation\Accessor; use JMS\Serializer\Annotation\SkipWhenEmpty; use JMS\Serializer\Annotation\Type; @@ -55,6 +56,7 @@ class FullFileResponse implements ModelInterface * @var string $url * * @Type("string") + * @SerializedName("Url") * @Accessor(getter="getUrl",setter="setUrl") * @SkipWhenEmpty() */ diff --git a/tests/Bot/Tests/FileTest.php b/tests/Bot/Tests/FileTest.php index d90e584..7dad144 100644 --- a/tests/Bot/Tests/FileTest.php +++ b/tests/Bot/Tests/FileTest.php @@ -116,5 +116,8 @@ class FileTest extends TestCase self::assertInstanceOf(FullFileResponse::class, $response); self::assertEquals($fileId, $response->getId()); + + $fileUrl = 'https://s3.eu-central-1.amazonaws.com/mg-node-files/files/21/b2bdba90-166c-4e0a-829d-69f26a09fd2a'; + self::assertEquals($fileUrl, $response->getUrl()); } }