@@ -55,7 +55,7 @@ public function __construct(
5555 $ api_ *** = '' ,
5656 $ delivery_token = '' ,
5757 $ environment = '' ,
58- $ config = array ('region ' => '' )
58+ $ config = array ('region ' => '' , ' branch ' => '' )
5959 ) {
6060
6161 if ($ config && $ config !== "undefined " && $ config ['region ' ] !== "undefined " && $ config ['region ' ] =="eu " ) {
@@ -65,7 +65,8 @@ public function __construct(
6565 'stack ' , array ('api_*** ' => $ api_ ***,
6666 'access_token ' => $ delivery_token ,
6767 'environment ' => $ environment ,
68- 'region ' => $ config ['region ' ] ?? '' )
68+ 'region ' => $ config ['region ' ] ?? '' ,
69+ 'branch ' => $ config ['branch ' ] ?? '' )
6970 );
7071 $ this ->environment = $ this ->header ['environment ' ];
7172 unset($ this ->header ['environment ' ]);
@@ -220,7 +221,7 @@ public function getPort()
220221 /**
221222 * This function sets API Key.
222223 *
223- * @param string $api_*** - Name of Environment
224+ * @param string $api_*** - API Key
224225 *
225226 * @return Stack
226227 * */
@@ -233,7 +234,7 @@ public function setAPIKEY($api_*** = '')
233234 /**
234235 * This function sets Delivery Token.
235236 *
236- * @param string $delivery_token - Name of Environment
237+ * @param string $delivery_token - Delivery Token
237238 *
238239 * @return Stack
239240 * */
@@ -286,6 +287,31 @@ public function getEnvironment()
286287 return $ this ->environment ;
287288 }
288289
290+
291+ /**
292+ * This function sets Branch.
293+ *
294+ * @param string $branch - Name of branch
295+ *
296+ * @return Stack
297+ * */
298+ public function setBranch ($ branch = '' )
299+ {
300+ Utility::validateInput ('branch ' , $ branch );
301+ $ this ->header ['branch ' ] = $ branch ;
302+ return $ this ;
303+ }
304+
305+ /**
306+ * This function returns Branch.
307+ *
308+ * @return string
309+ * */
310+ public function Branch ()
311+ {
312+ return $ this ->header ['branch ' ];
313+ }
314+
289315 /**
290316 * This call returns comprehensive information of all
291317 * the content types available in a particular stack in your account.
0 commit comments