From b434c7a21689dd3eadf44d81b14edbac4327e529 Mon Sep 17 00:00:00 2001 From: ksvirkou-hubspot Date: Wed, 13 Dec 2023 14:33:27 +0300 Subject: [PATCH] CRM Lists --- lib/Discovery/Crm/Discovery.php | 5 ++-- lib/Discovery/Crm/Lists/Discovery.php | 13 +++++++++ tests/spec/Discovery/Crm/DiscoverySpec.php | 1 + .../Discovery/Crm/Lists/DiscoverySpec.php | 28 +++++++++++++++++++ 4 files changed, 44 insertions(+), 3 deletions(-) create mode 100644 lib/Discovery/Crm/Lists/Discovery.php create mode 100644 tests/spec/Discovery/Crm/Lists/DiscoverySpec.php diff --git a/lib/Discovery/Crm/Discovery.php b/lib/Discovery/Crm/Discovery.php index 0af22eede..d0db150fd 100644 --- a/lib/Discovery/Crm/Discovery.php +++ b/lib/Discovery/Crm/Discovery.php @@ -12,6 +12,7 @@ * @method Extensions\Discovery extensions() * @method Imports\Discovery imports() * @method LineItems\Discovery lineItems() + * @method Lists\Discovery lists() * @method Objects\Discovery objects() * @method Owners\Discovery owners() * @method Pipelines\Discovery pipelines() @@ -22,6 +23,4 @@ * @method Tickets\Discovery tickets() * @method Timeline\Discovery timeline() */ -class Discovery extends DiscoveryBase -{ -} +class Discovery extends DiscoveryBase {} diff --git a/lib/Discovery/Crm/Lists/Discovery.php b/lib/Discovery/Crm/Lists/Discovery.php new file mode 100644 index 000000000..d5f71f905 --- /dev/null +++ b/lib/Discovery/Crm/Lists/Discovery.php @@ -0,0 +1,13 @@ +extensions()->shouldHaveType(\HubSpot\Discovery\Crm\Extensions\Discovery::class); $this->imports()->shouldHaveType(\HubSpot\Discovery\Crm\Imports\Discovery::class); $this->lineItems()->shouldHaveType(\HubSpot\Discovery\Crm\LineItems\Discovery::class); + $this->lists()->shouldHaveType(\HubSpot\Discovery\Crm\Lists\Discovery::class); $this->objects()->shouldHaveType(\HubSpot\Discovery\Crm\Objects\Discovery::class); $this->owners()->shouldHaveType(\HubSpot\Discovery\Crm\Owners\Discovery::class); $this->pipelines()->shouldHaveType(\HubSpot\Discovery\Crm\Pipelines\Discovery::class); diff --git a/tests/spec/Discovery/Crm/Lists/DiscoverySpec.php b/tests/spec/Discovery/Crm/Lists/DiscoverySpec.php new file mode 100644 index 000000000..fc9267ecc --- /dev/null +++ b/tests/spec/Discovery/Crm/Lists/DiscoverySpec.php @@ -0,0 +1,28 @@ +beConstructedWith($client, $config); + } + + public function it_is_initializable() + { + $this->shouldHaveType(\HubSpot\Discovery\Crm\Lists\Discovery::class); + } + + public function it_creates_clients() + { + $this->listsApi()->shouldHaveType(ListsApi::class); + $this->membershipsApi()->shouldHaveType(MembershipsApi::class); + } +}