Integration::getDailyUsage()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 0
dl 0
loc 5
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace SevenShores\Hubspot\Resources;
4
5
class Integration extends Resource
6
{
7
    
8
    /**
9
     * Get account details
10
     *
11
     * @return \SevenShores\Hubspot\Http\Response
12
     *
13
     * @see https://developers.hubspot.com/docs/methods/get-account-details
14
     */
15
    public function getAccountDetails()
16
    {
17
        $endpoint = "https://api.hubapi.com/integrations/v1/me";
18
        return $this->client->request('get', $endpoint);
19
    }
20
    
21
    /**
22
     * Check daily API usage
23
     *
24
     * @return \SevenShores\Hubspot\Http\Response
25
     *
26
     * @see https://developers.hubspot.com/docs/methods/check-daily-api-usage
27
     */
28
    public function getDailyUsage()
29
    {
30
        $endpoint = "https://api.hubapi.com/integrations/v1/limit/daily";
31
        return $this->client->request('get', $endpoint);
32
    }
33
}
34