Advertiser   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
eloc 6
c 1
b 0
f 0
dl 0
loc 27
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A info() 0 8 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Promopult\TikTokMarketingApi\Service;
6
7
/**
8
 * @psalm-suppress UnusedClass
9
 */
10
final class Advertiser extends \Promopult\TikTokMarketingApi\AbstractService
11
{
12
    /**
13
     * Getting Advertiser account information
14
     *
15
     * @param array $advertiserIds  List of advertiser IDs being queried.
16
     *                              Advertiser ID can be obtained through the Get Authorized Advertiser interface.
17
     *
18
     * @param array $fields         A list of information to be returned. If not specified, all information is returned
19
     *                              by default. Optional values include:promotion_area, telephone, contacter, currency,
20
     *                              phonenumber, timezone, id, role, company, status, description, reason, address,
21
     *                              name, language, industry, license_no, email, license_url, country, balance,
22
     *                              create_time.
23
     * @return array
24
     *
25
     * @throws \Throwable
26
     *
27
     * @see https://ads.tiktok.com/marketing_api/docs?id=100579
28
     */
29
    public function info(array $advertiserIds, array $fields)
30
    {
31
        return $this->requestApi(
32
            'GET',
33
            '/open_api/v1.3/advertiser/info/',
34
            [
35
                'advertiser_ids' => $advertiserIds,
36
                'fields' => $fields
37
            ]
38
        );
39
    }
40
}
41