Skip to content

Commit

Permalink
Merge pull request #53 from luizalabs/feature/add-block-object-method
Browse files Browse the repository at this point in the history
feat: add block object method
  • Loading branch information
pedrospoljaric-luizalabs authored May 26, 2023
2 parents dd0da71 + 1452dec commit 93654f8
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions correios/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -725,3 +725,13 @@ def calculate_delivery_time(
def cancel_object(self, posting_card_number: Union[int, str], tracking_code: str):
posting_card_number = str(posting_card_number)
self._auth_call("cancelarObjeto", posting_card_number, tracking_code)

def block_object(self, posting_card_number: Union[int, str], tracking_code: str):
posting_card_number = str(posting_card_number)
self._auth_call(
"bloquearObjeto",
numeroEtiqueta=tracking_code,
idPlp=posting_card_number,
tipoBloqueio="FRAUDE_BLOQUEIO",
acao="DEVOLVIDO_AO_REMETENTE"
)

0 comments on commit 93654f8

Please sign in to comment.