Skip to content

Commit

Permalink
compat: bring back legacy report methods
Browse files Browse the repository at this point in the history
  • Loading branch information
650elx committed Oct 14, 2024
1 parent 4b59d43 commit 339ade0
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions sinch/domains/verification/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,42 @@ def report_phone_call_by_identity(
)
)

def report_by_id(
self,
id: str,
verification_report_request: dict
) -> ReportVerificationByIdResponse:
"""
This method is not supported anymore.
It should be used only for backward compatibility reasons.
"""
return self._sinch.configuration.transport.request(
ReportVerificationByIdEndpoint(
request_data=ReportVerificationByIdRequest(
id,
verification_report_request
)
)
)

def report_by_identity(
self,
endpoint,
verification_report_request
) -> ReportVerificationByIdentityResponse:
"""
This method is not supported anymore.
It should be used only for backward compatibility reasons.
"""
return self._sinch.configuration.transport.request(
ReportVerificationByIdentityEndpoint(
request_data=ReportVerificationByIdentityRequest(
endpoint,
verification_report_request
)
)
)


class VerificationStatus:
def __init__(self, sinch):
Expand Down

0 comments on commit 339ade0

Please sign in to comment.