| Total Complexity | 3 |
| Total Lines | 59 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 5 | class Product extends Octadesk |
||
| 6 | { |
||
| 7 | |||
| 8 | public function __construct($accToken) |
||
| 9 | { |
||
| 10 | $this->setAccesToken($accToken); |
||
| 11 | parent::__construct(); |
||
| 12 | } |
||
| 13 | |||
| 14 | public function findProducts(string $keywords = null, bool $onlyEnabledItems = true, int $page = 1) |
||
| 15 | { |
||
| 16 | $this->request( |
||
| 17 | "GET", |
||
| 18 | "products/search", |
||
| 19 | [ |
||
| 20 | "keywords" => $keywords, |
||
| 21 | "onlyEnabledItems" => $onlyEnabledItems, |
||
| 22 | "page" => $page, |
||
| 23 | "asSuggestion" => true |
||
| 24 | ] |
||
| 25 | ); |
||
| 26 | |||
| 27 | return $this; |
||
| 28 | } |
||
| 29 | |||
| 30 | public function createProduct() |
||
| 64 | ]; |
||
| 65 | } |
||
| 66 | } |