Skip to content

Commit cd313d4

Browse files
committed
Added SetBanned
1 parent 0387b76 commit cd313d4

1 file changed

Lines changed: 10 additions & 13 deletions

File tree

Atomx/Resources/Creative.php

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,14 @@
11
<?php namespace Atomx\Resources;
22

33
use Atomx\AtomxClient;
4+
use Atomx\Resources\Traits\NameTrait;
5+
use Atomx\Resources\Traits\StateTrait;
46
use InvalidArgumentException;
57

68
class Creative extends AtomxClient {
7-
protected $endpoint = 'creative';
8-
9-
public function setName($name)
10-
{
11-
$this->name = $name;
12-
}
13-
14-
public function setState($state)
15-
{
16-
if (!in_array($state, ['active', 'inactive']))
17-
throw new InvalidArgumentException('API: Invalid state provided');
9+
use NameTrait, StateTrait;
1810

19-
$this->state = strtoupper($state);
20-
}
11+
protected $endpoint = 'creative';
2112

2213
public function setBanner($filename, $extension)
2314
{
@@ -102,4 +93,10 @@ public function setSize($size)
10293
{
10394
$this->size_id = $size;
10495
}
96+
97+
public function setbanned($banned_id)
98+
{
99+
//if(!is_int($banned_id)) return;
100+
$this->banned_id = $banned_id;
101+
}
105102
}

0 commit comments

Comments
 (0)