diff --git a/src/BigCommerce/Api/Subscribers/SubscribersApi.php b/src/BigCommerce/Api/Subscribers/SubscribersApi.php new file mode 100644 index 00000000..4f67f4e0 --- /dev/null +++ b/src/BigCommerce/Api/Subscribers/SubscribersApi.php @@ -0,0 +1,39 @@ +getResource()); + } + + public function getAll(array $filters = [], int $page = 1, int $limit = 250): SubscribersResponse + { + return new SubscribersResponse($this->getAllResources($filters, $page, $limit)); + } +} diff --git a/src/BigCommerce/ResourceModels/Customer/Subscriber.php b/src/BigCommerce/ResourceModels/Customer/Subscriber.php new file mode 100644 index 00000000..6d93cc2f --- /dev/null +++ b/src/BigCommerce/ResourceModels/Customer/Subscriber.php @@ -0,0 +1,22 @@ +subscriber; + } + + protected function addData(stdClass $rawData): void + { + $this->subscriber = new Subscriber($rawData); + } +} diff --git a/src/BigCommerce/ResponseModels/Customer/SubscribersResponse.php b/src/BigCommerce/ResponseModels/Customer/SubscribersResponse.php new file mode 100644 index 00000000..06bcf3c3 --- /dev/null +++ b/src/BigCommerce/ResponseModels/Customer/SubscribersResponse.php @@ -0,0 +1,21 @@ +getData(); + } + protected function resourceClass(): string + { + return Subscriber::class; + } +} diff --git a/tests/BigCommerce/Api/Subscribers/SubscribersApiTest.php b/tests/BigCommerce/Api/Subscribers/SubscribersApiTest.php new file mode 100644 index 00000000..8fe6910f --- /dev/null +++ b/tests/BigCommerce/Api/Subscribers/SubscribersApiTest.php @@ -0,0 +1,18 @@ +markTestIncomplete(); + } + + public function testCanGetSubscribers(): void + { + $this->markTestIncomplete(); + } +}