deleteCustomer method
Delete all personal information that the anchor has stored about a given customer.
account
is the Stellar account ID (G...) of the customer to delete.
If account does not uniquely identify an individual customer (a shared account), the client should include the memo
and memoType
fields in the request.
This request must be authenticated (via SEP-10) as coming from the owner of the account that will be deleted - jwt
.
Implementation
Future<http.Response> deleteCustomer(
String account, String? memo, String? memoType, String jwt) async {
Uri serverURI = Uri.parse(_serviceAddress + "/customer/" + account);
_DeleteCustomerRequestBuilder requestBuilder =
_DeleteCustomerRequestBuilder(httpClient, serverURI);
final Map<String, String> fields = {};
if (memo != null) {
fields["memo"] = memo;
}
if (memoType != null) {
fields["memo_type"] = memo!;
}
http.Response response = await requestBuilder.forFields(fields).execute(jwt);
return response;
}