Skip to content

Commit

Permalink
CRM Lists
Browse files Browse the repository at this point in the history
  • Loading branch information
ksvirkou-hubspot committed Dec 13, 2023
1 parent 4c0e7f9 commit b434c7a
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 3 deletions.
5 changes: 2 additions & 3 deletions lib/Discovery/Crm/Discovery.php
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand All @@ -22,6 +23,4 @@
* @method Tickets\Discovery tickets()
* @method Timeline\Discovery timeline()
*/
class Discovery extends DiscoveryBase
{
}
class Discovery extends DiscoveryBase {}
13 changes: 13 additions & 0 deletions lib/Discovery/Crm/Lists/Discovery.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?php

namespace HubSpot\Discovery\Crm\Lists;

use HubSpot\Client\Crm\Lists\Api\ListsApi;
use HubSpot\Client\Crm\Lists\Api\MembershipsApi;
use HubSpot\Discovery\DiscoveryBase;

/**
* @method ListsApi listsApi()
* @method MembershipsApi membershipsApi()
*/
class Discovery extends DiscoveryBase {}
1 change: 1 addition & 0 deletions tests/spec/Discovery/Crm/DiscoverySpec.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ public function it_creates_clients()
$this->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);
Expand Down
28 changes: 28 additions & 0 deletions tests/spec/Discovery/Crm/Lists/DiscoverySpec.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<?php

namespace spec\HubSpot\Discovery\Crm\Lists;

use GuzzleHttp\Client;
use HubSpot\Client\Crm\Lists\Api\ListsApi;
use HubSpot\Client\Crm\Lists\Api\MembershipsApi;
use HubSpot\Config;
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(\HubSpot\Discovery\Crm\Lists\Discovery::class);
}

public function it_creates_clients()
{
$this->listsApi()->shouldHaveType(ListsApi::class);
$this->membershipsApi()->shouldHaveType(MembershipsApi::class);
}
}

0 comments on commit b434c7a

Please sign in to comment.