[FIX] account_statement_import_online_gocardless: Slash at the end

Some of the API endpoints need it, like token renew. You get if not
405 HTTP code.

It includes also a typo fix in a method name.
This commit is contained in:
Pedro M. Baeza
2024-08-11 13:44:59 +02:00
committed by Enric Tobella
parent 37bfe4f578
commit 01a032a858

View File

@@ -61,7 +61,7 @@ class OnlineBankStatementProvider(models.Model):
self, endpoint, request_type="get", params=None, data=None, basic_auth=False self, endpoint, request_type="get", params=None, data=None, basic_auth=False
): ):
content = {} content = {}
url = url_join(GOCARDLESS_API, endpoint) url = url_join(GOCARDLESS_API, endpoint) + "/"
response = getattr(requests, request_type)( response = getattr(requests, request_type)(
url, url,
data=data, data=data,
@@ -143,9 +143,9 @@ class OnlineBankStatementProvider(models.Model):
"view_mode": "form", "view_mode": "form",
"target": "new", "target": "new",
} }
return self._gocardless_select_bank_instituion() return self._gocardless_select_bank_institution()
def _gocardless_select_bank_instituion(self): def _gocardless_select_bank_institution(self):
"""Ask for the GoCardless bank instituion and continue full linkage.""" """Ask for the GoCardless bank instituion and continue full linkage."""
country = ( country = (
self.journal_id.bank_account_id.company_id or self.journal_id.company_id self.journal_id.bank_account_id.company_id or self.journal_id.company_id