File tree Expand file tree Collapse file tree 2 files changed +27
-3
lines changed
Expand file tree Collapse file tree 2 files changed +27
-3
lines changed Original file line number Diff line number Diff line change @@ -22,6 +22,11 @@ class Job
2222 */
2323 protected $ tag ;
2424
25+ /**
26+ * @var string|null
27+ */
28+ protected $ webhook_url ;
29+
2530 /**
2631 * @var \DateTimeImmutable
2732 */
@@ -79,6 +84,23 @@ public function setTag(?string $tag): Job
7984 return $ this ;
8085 }
8186
87+ /**
88+ * @return string|null
89+ */
90+ public function getWebhookUrl (): ?string
91+ {
92+ return $ this ->webhook_url ;
93+ }
94+
95+ /**
96+ * @param string|null $webhook_url
97+ */
98+ public function setWebhookUrl (?string $ webhook_url ): Job
99+ {
100+ $ this ->webhook_url = $ webhook_url ;
101+ return $ this ;
102+ }
103+
82104 /**
83105 * @return \DateTimeImmutable
84106 */
Original file line number Diff line number Diff line change @@ -52,8 +52,9 @@ public function create(Job $job): Job
5252 );
5353 }
5454 $ response = $ this ->httpTransport ->post ($ this ->httpTransport ->getBaseUri () . '/jobs ' , [
55- 'tasks ' => $ tasks ,
56- 'tag ' => $ job ->getTag ()
55+ 'tasks ' => $ tasks ,
56+ 'tag ' => $ job ->getTag (),
57+ 'webhook_url ' => $ job ->getWebhookUrl ()
5758 ]);
5859 return $ this ->hydrator ->hydrateObjectByResponse ($ job , $ response );
5960 }
@@ -68,7 +69,8 @@ public function create(Job $job): Job
6869 */
6970 public function refresh (Job $ job , $ query = null ): Job
7071 {
71- $ response = $ this ->httpTransport ->get ($ this ->httpTransport ->getBaseUri () . '/jobs/ ' . $ job ->getId (), $ query ?? []);
72+ $ response = $ this ->httpTransport ->get ($ this ->httpTransport ->getBaseUri () . '/jobs/ ' . $ job ->getId (),
73+ $ query ?? []);
7274 return $ this ->hydrator ->hydrateObjectByResponse ($ job , $ response );
7375 }
7476
You can’t perform that action at this time.
0 commit comments