def status(self, buy_order: str): ValidationUtil.has_text_with_max_length(buy_order, ApiConstants.BUY_ORDER_LENGTH, "buy_order") try: endpoint = MallTransaction.STATUS_ENDPOINT.format(buy_order) return RequestService.get(endpoint, self.options) except TransbankError as e: raise TransactionStatusError(e.message, e.code)
def status(self, token: str): ValidationUtil.has_text_with_max_length(token, ApiConstants.TOKEN_LENGTH, "token") try: endpoint = Transaction.STATUS_ENDPOINT.format(token) return RequestService.get(endpoint, self.options) except TransbankError as e: raise TransactionStatusError(e.message, e.code)