| @@ 153-173 (lines=21) @@ | ||
| 150 | * |
|
| 151 | * @return \Bookeo\Interfaces\QueryInterface |
|
| 152 | */ |
|
| 153 | public function resources(int $itemsPerPage = 50, string $pageNavigationToken = null, int $pageNumber = 1): QueryInterface |
|
| 154 | { |
|
| 155 | if (!empty($itemsPerPage)) { |
|
| 156 | $this->appendToQuery('itemsPerPage', $itemsPerPage); |
|
| 157 | } |
|
| 158 | ||
| 159 | if (!empty($pageNavigationToken)) { |
|
| 160 | $this->appendToQuery('pageNavigationToken', $pageNavigationToken); |
|
| 161 | } |
|
| 162 | ||
| 163 | if (!empty($pageNumber)) { |
|
| 164 | $this->appendToQuery('pageNumber', $pageNumber); |
|
| 165 | } |
|
| 166 | ||
| 167 | // Set HTTP params |
|
| 168 | $this->type = 'get'; |
|
| 169 | $this->endpoint = '/settings/resources' . '?' . $this->getQuery(); |
|
| 170 | $this->response = ResourceTypesList::class; |
|
| 171 | ||
| 172 | return $this; |
|
| 173 | } |
|
| 174 | ||
| 175 | /** |
|
| 176 | * Retrieve all taxes used by this business |
|
| @@ 71-91 (lines=21) @@ | ||
| 68 | * |
|
| 69 | * @return \Bookeo\Interfaces\QueryInterface |
|
| 70 | */ |
|
| 71 | public function all(int $itemsPerPage = 100, string $pageNavigationToken = null, int $pageNumber = 1): QueryInterface |
|
| 72 | { |
|
| 73 | if (!empty($itemsPerPage)) { |
|
| 74 | $this->appendToQuery('itemsPerPage', $itemsPerPage); |
|
| 75 | } |
|
| 76 | ||
| 77 | if (!empty($pageNavigationToken)) { |
|
| 78 | $this->appendToQuery('pageNavigationToken', $pageNavigationToken); |
|
| 79 | } |
|
| 80 | ||
| 81 | if (!empty($pageNumber)) { |
|
| 82 | $this->appendToQuery('pageNumber', $pageNumber); |
|
| 83 | } |
|
| 84 | ||
| 85 | // Set HTTP params |
|
| 86 | $this->type = 'get'; |
|
| 87 | $this->endpoint = '/subaccounts' . '?' . $this->getQuery(); |
|
| 88 | $this->response = PortalSubaccountsList::class; |
|
| 89 | ||
| 90 | return $this; |
|
| 91 | } |
|
| 92 | } |
|
| 93 | ||
| @@ 242-262 (lines=21) @@ | ||
| 239 | * |
|
| 240 | * @return \Bookeo\Interfaces\QueryInterface |
|
| 241 | */ |
|
| 242 | public function linkedpeople( |
|
| 243 | int $itemsPerPage = 50, |
|
| 244 | string $pageNavigationToken = null, |
|
| 245 | int $pageNumber = 1 |
|
| 246 | ): QueryInterface { |
|
| 247 | ||
| 248 | if (!empty($itemsPerPage)) { |
|
| 249 | $this->appendToQuery('itemsPerPage', $itemsPerPage); |
|
| 250 | } |
|
| 251 | ||
| 252 | if (!empty($pageNavigationToken)) { |
|
| 253 | $this->appendToQuery('pageNavigationToken', $pageNavigationToken); |
|
| 254 | } |
|
| 255 | ||
| 256 | if (!empty($pageNumber)) { |
|
| 257 | $this->appendToQuery('pageNumber', $pageNumber); |
|
| 258 | } |
|
| 259 | ||
| 260 | // Set HTTP params |
|
| 261 | $this->type = 'get'; |
|
| 262 | $this->endpoint = '/customers/' . $this->customer_id . '/linkedpeople?' . $this->getQuery(); |
|
| 263 | $this->response = LinkedPersonList::class; |
|
| 264 | ||
| 265 | return $this; |
|