Skip to content

Commit

Permalink
add postal mail discovery
Browse files Browse the repository at this point in the history
  • Loading branch information
ksvirkou-hubspot committed Dec 16, 2022
1 parent cf5b0d2 commit 4be8916
Show file tree
Hide file tree
Showing 4 changed files with 59 additions and 0 deletions.
1 change: 1 addition & 0 deletions lib/Discovery/Crm/Objects/Discovery.php
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
21 changes: 21 additions & 0 deletions lib/Discovery/Crm/Objects/PostalMail/Discovery.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<?php

namespace HubSpot\Discovery\Crm\Objects\PostalMail;

use HubSpot\Client\Crm\Objects\PostalMail\Api\AssociationsApi;
use HubSpot\Client\Crm\Objects\PostalMail\Api\BasicApi;
use HubSpot\Client\Crm\Objects\PostalMail\Api\BatchApi;
use HubSpot\Client\Crm\Objects\PostalMail\Api\PublicObjectApi;
use HubSpot\Client\Crm\Objects\PostalMail\Api\SearchApi;
use HubSpot\Discovery\DiscoveryBase;

/**
* @method AssociationsApi associationsApi()
* @method BasicApi basicApi()
* @method BatchApi batchApi()
* @method PublicObjectApi publicObjectApi()
* @method SearchApi searchApi()
*/
class Discovery extends DiscoveryBase
{
}
2 changes: 2 additions & 0 deletions tests/spec/Discovery/Crm/Objects/DiscoverySpec.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
use HubSpot\Discovery\Crm\Objects\FeedbackSubmissions\Discovery as FeedbackSubmissionsDiscovery;
use HubSpot\Discovery\Crm\Objects\Meetings\Discovery as MeetingsDiscovery;
use HubSpot\Discovery\Crm\Objects\Notes\Discovery as NotesDiscovery;
use HubSpot\Discovery\Crm\Objects\PostalMail\Discovery as PostalMailDiscovery;
use HubSpot\Discovery\Crm\Objects\Tasks\Discovery as TasksDiscovery;
use PhpSpec\ObjectBehavior;

Expand All @@ -42,6 +43,7 @@ public function it_creates_clients()
$this->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);
Expand Down
35 changes: 35 additions & 0 deletions tests/spec/Discovery/Crm/Objects/PostalMail/DiscoverySpec.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
<?php

namespace spec\HubSpot\Discovery\Crm\Objects\Notes;

use GuzzleHttp\Client;
use HubSpot\Client\Crm\Objects\Notes\Api\AssociationsApi;
use HubSpot\Client\Crm\Objects\Notes\Api\BasicApi;
use HubSpot\Client\Crm\Objects\Notes\Api\BatchApi;
use HubSpot\Client\Crm\Objects\Notes\Api\PublicObjectApi;
use HubSpot\Client\Crm\Objects\Notes\Api\SearchApi;
use HubSpot\Config;
use HubSpot\Discovery\Crm\Objects\Notes\Discovery;
use PhpSpec\ObjectBehavior;

class DiscoverySpec extends ObjectBehavior
{
public function let(Client $client, Config $config)
{
$this->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);
}
}

0 comments on commit 4be8916

Please sign in to comment.