diff --git a/src/BigCommerce/Api/Pages/PagesApi.php b/src/BigCommerce/Api/Pages/PagesApi.php index c74d604..42118f4 100644 --- a/src/BigCommerce/Api/Pages/PagesApi.php +++ b/src/BigCommerce/Api/Pages/PagesApi.php @@ -24,6 +24,8 @@ protected function maxBatchSize(): int private const PAGE_ENDPOINT = 'content/pages/%d'; private const PAGES_ENDPOINT = 'content/pages'; private const RESOURCE_NAME = 'pages'; + + public const FILTER_INCLUDE = 'include'; public function batchUpdate(array $resources): PagesResponse { @@ -45,9 +47,14 @@ protected function resourceName(): string return self::RESOURCE_NAME; } - public function get(): PageResponse + public function get(?string $include = null): PageResponse { - return new PageResponse($this->getResource()); + $params = []; + + if (!is_null($include)) { + $params[self::FILTER_INCLUDE] = $include; + } + return new PageResponse($this->getResource($params)); } public function getAll(array $filters = [], int $page = 1, int $limit = 250): PagesResponse