Completed
Push — master ( 6ad9e3...7a68b3 )
by Dmitry
01:36
created

Advertiser::get()   A

Complexity

Conditions 4
Paths 1

Size

Total Lines 22
Code Lines 10

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 4
eloc 10
c 1
b 0
f 0
nc 1
nop 3
dl 0
loc 22
rs 9.9332

1 Method

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