From 4be89169bbc9b66d2ed2f7a161fff8199f35ad4a Mon Sep 17 00:00:00 2001 From: ksvirkou-hubspot Date: Fri, 16 Dec 2022 15:16:06 +0300 Subject: [PATCH] add postal mail discovery --- lib/Discovery/Crm/Objects/Discovery.php | 1 + .../Crm/Objects/PostalMail/Discovery.php | 21 +++++++++++ .../Discovery/Crm/Objects/DiscoverySpec.php | 2 ++ .../Crm/Objects/PostalMail/DiscoverySpec.php | 35 +++++++++++++++++++ 4 files changed, 59 insertions(+) create mode 100644 lib/Discovery/Crm/Objects/PostalMail/Discovery.php create mode 100644 tests/spec/Discovery/Crm/Objects/PostalMail/DiscoverySpec.php diff --git a/lib/Discovery/Crm/Objects/Discovery.php b/lib/Discovery/Crm/Objects/Discovery.php index e091e394..96fd8867 100644 --- a/lib/Discovery/Crm/Objects/Discovery.php +++ b/lib/Discovery/Crm/Objects/Discovery.php @@ -21,6 +21,7 @@ * @method FeedbackSubmissions\Discovery feedbackSubmissions() * @method Meetings\Discovery meetings() * @method Notes\Discovery notes() + * @method PostalMail\Discovery postalMail() * @method PublicObjectApi publicObjectApi() * @method SearchApi searchApi() * @method Tasks\Discovery tasks() diff --git a/lib/Discovery/Crm/Objects/PostalMail/Discovery.php b/lib/Discovery/Crm/Objects/PostalMail/Discovery.php new file mode 100644 index 00000000..dd3c5291 --- /dev/null +++ b/lib/Discovery/Crm/Objects/PostalMail/Discovery.php @@ -0,0 +1,21 @@ +feedbackSubmissions()->shouldHaveType(FeedbackSubmissionsDiscovery::class); $this->meetings()->shouldHaveType(MeetingsDiscovery::class); $this->notes()->shouldHaveType(NotesDiscovery::class); + $this->postalMail()->shouldHaveType(PostalMailDiscovery::class); $this->publicObjectApi()->shouldHaveType(PublicObjectApi::class); $this->searchApi()->shouldHaveType(SearchApi::class); $this->tasks()->shouldHaveType(TasksDiscovery::class); diff --git a/tests/spec/Discovery/Crm/Objects/PostalMail/DiscoverySpec.php b/tests/spec/Discovery/Crm/Objects/PostalMail/DiscoverySpec.php new file mode 100644 index 00000000..c71fd26e --- /dev/null +++ b/tests/spec/Discovery/Crm/Objects/PostalMail/DiscoverySpec.php @@ -0,0 +1,35 @@ +beConstructedWith($client, $config); + } + + public function it_is_initializable() + { + $this->shouldHaveType(Discovery::class); + } + + public function it_creates_clients() + { + $this->associationsApi()->shouldHaveType(AssociationsApi::class); + $this->basicApi()->shouldHaveType(BasicApi::class); + $this->batchApi()->shouldHaveType(BatchApi::class); + $this->publicObjectApi()->shouldHaveType(PublicObjectApi::class); + $this->searchApi()->shouldHaveType(SearchApi::class); + } +}