Integration   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 29
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Importance

Changes 0
Metric Value
dl 0
loc 29
rs 10
c 0
b 0
f 0
wmc 2
lcom 1
cbo 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getAccountDetails() 0 5 1
A getDailyUsage() 0 5 1
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