Implement releasing funds

This commit is contained in:
Mark Veidemanis 2021-12-29 19:21:05 +00:00
parent d1252a1d42
commit bdd7921bc0
Signed by: m
GPG Key ID: 5ACFCEED46C0904F
1 changed files with 13 additions and 1 deletions

View File

@ -283,4 +283,16 @@ class Agora(object):
rtrn = self.create_ad(countrycode, currency)
if not rtrn:
return False
return True
yield rtrn
def release_funds(self, contact_id):
"""
Release funds for a contact_id.
:param contact_id: trade/contact ID
:type contact_id: string
:return: response dict
:rtype: dict
"""
payload = {"tradeId": contact_id, "password": settings.Agora.Pass}
rtrn = self.agora._api_call(api_method=f"contact_release/{contact_id}", http_method="POST", query_values=payload)
return rtrn