@@ -74,6 +74,10 @@ class AvailableNumbers implements FilterInterface
7474 */
7575 protected $ type ;
7676
77+ protected ?bool $ hasApplication = null ;
78+
79+ protected ?string $ applicationId = null ;
80+
7781 public function __construct (array $ filter = [])
7882 {
7983 foreach ($ filter as $ key => $ value ) {
@@ -132,6 +136,14 @@ public function __construct(array $filter = [])
132136
133137 $ this ->setFeatures ($ filter ['features ' ]);
134138 }
139+
140+ if (array_key_exists ('has_application ' , $ filter )) {
141+ $ this ->setHasApplication ((bool )$ filter ['has_application ' ]);
142+ }
143+
144+ if (array_key_exists ('application_id ' , $ filter )) {
145+ $ this ->setApplicationId ($ filter ['application_id ' ]);
146+ }
135147 }
136148
137149 /**
@@ -161,6 +173,14 @@ public function getQuery(): array
161173 $ data ['features ' ] = $ this ->getFeatures ();
162174 }
163175
176+ if ($ this ->getHasApplication () !== null ) {
177+ $ data ['has_application ' ] = $ this ->getHasApplication ();
178+ }
179+
180+ if ($ this ->getApplicationId () !== null ) {
181+ $ data ['application_id ' ] = $ this ->getApplicationId ();
182+ }
183+
164184 return $ data ;
165185 }
166186
@@ -282,4 +302,34 @@ public function setPageSize(int $pageSize): self
282302
283303 return $ this ;
284304 }
305+
306+ public function getHasApplication (): ?bool
307+ {
308+ return $ this ->hasApplication ;
309+ }
310+
311+ /**
312+ * @return $this
313+ */
314+ public function setHasApplication (bool $ hasApplication ): self
315+ {
316+ $ this ->hasApplication = $ hasApplication ;
317+
318+ return $ this ;
319+ }
320+
321+ public function getApplicationId (): ?string
322+ {
323+ return $ this ->applicationId ;
324+ }
325+
326+ /**
327+ * @return $this
328+ */
329+ public function setApplicationId (string $ applicationId ): self
330+ {
331+ $ this ->applicationId = $ applicationId ;
332+
333+ return $ this ;
334+ }
285335}
0 commit comments