public Delete ( string customerId, Stripe.StripeRequestOptions requestOptions = null ) : |
||
customerId | string | |
requestOptions | Stripe.StripeRequestOptions | |
return |
public virtual StripeDeleted Delete(string customerId, StripeRequestOptions requestOptions = null)
{
return Mapper<StripeDeleted>.MapFromJson(
Requestor.Delete($"{Urls.Customers}/{customerId}",
SetupRequestOptions(requestOptions))
);
}
public void CleanCustomers() { try { StripeCustomerService stripeService = new StripeCustomerService("sk_0JDG46M1ff0yZRqZjz9CNKtW2Aj14"); var options = new StripeCustomerListOptions(); options.Limit = 10000; var customers = stripeService.List(options); foreach (var customer in customers) { stripeService.Delete(customer.Id); } } catch { } }