Skip to content
This repository was archived by the owner on Oct 15, 2024. It is now read-only.

Commit ab158a6

Browse files
authored
feat: added methods to get boleto print link and token from webhook
Obter Token do webhooks cadastrado
2 parents 8b13518 + d72f16c commit ab158a6

File tree

2 files changed

+43
-0
lines changed

2 files changed

+43
-0
lines changed

src/Resource/NotificationPreferences.php

+10
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,16 @@ public function getId()
8181
return $this->data->id;
8282
}
8383

84+
/**
85+
* Returns notification token.
86+
*
87+
* @return stdClass
88+
*/
89+
public function getToken()
90+
{
91+
return $this->data->token;
92+
}
93+
8494
/**
8595
* Create a new notification preference.
8696
*

src/Resource/Payment.php

+33
Original file line numberDiff line numberDiff line change
@@ -277,6 +277,39 @@ public function getHrefBoleto()
277277
return $this->getIfSet('_links')->payBoleto->redirectHref;
278278
}
279279

280+
/**
281+
* Get LineCode to Boleto
282+
* *.
283+
*
284+
* @return stdClass
285+
*/
286+
public function getLineCodeBoleto()
287+
{
288+
return $this->getIfSet('fundingInstrument')->boleto->lineCode;
289+
}
290+
291+
/**
292+
* Get href from print to Boleto
293+
* *.
294+
*
295+
* @return stdClass
296+
*/
297+
public function getHrefPrintBoleto()
298+
{
299+
return $this->getIfSet('_links')->payBoleto->printHref;
300+
}
301+
302+
/**
303+
* Get Expirate Date to Boleto
304+
* *.
305+
*
306+
* @return stdClass
307+
*/
308+
public function getExpirationDateBoleto()
309+
{
310+
return $this->getIfSet('fundingInstrument')->boleto->expirationDate;
311+
}
312+
280313
/**
281314
* Returns payment amount.
282315
*

0 commit comments

Comments
 (0)