diff --git a/src/Infusionsoft/Api/Rest/RestModel.php b/src/Infusionsoft/Api/Rest/RestModel.php index 112792b..0d60eb2 100644 --- a/src/Infusionsoft/Api/Rest/RestModel.php +++ b/src/Infusionsoft/Api/Rest/RestModel.php @@ -283,6 +283,15 @@ public function first() } + public function count() + { + $this->where('limit', 1); + + $data = $this->client->restfulRequest('get', $this->getIndexUrl(), $this->where); + + return $data['count']; + } + public function all() { $data = $this->client->restfulRequest('get', $this->getIndexUrl()); diff --git a/src/Infusionsoft/Api/Rest/Traits/CannotList.php b/src/Infusionsoft/Api/Rest/Traits/CannotList.php new file mode 100644 index 0000000..03600ae --- /dev/null +++ b/src/Infusionsoft/Api/Rest/Traits/CannotList.php @@ -0,0 +1,13 @@ +client->restfulRequest('get', $this->getIndexUrl()); + + return $data; + } + +} \ No newline at end of file diff --git a/src/Infusionsoft/Infusionsoft.php b/src/Infusionsoft/Infusionsoft.php index 1e8236f..e17b55d 100644 --- a/src/Infusionsoft/Infusionsoft.php +++ b/src/Infusionsoft/Infusionsoft.php @@ -765,6 +765,11 @@ public function campaigns() return $this->getRestApi('CampaignService'); } + public function userinfo() + { + return $this->getRestApi('UserInfoService'); + } + /** * @return \Infusionsoft\Api\Rest\OpportunityService */