Removes the currently applied discount on a customer.
curl https://api.stripe.com/v1/customers/cus_CBbg9PmQ9sLbmo/discount \
-u STRIPE_SECRET_KEY: \
-X DELETE
Chilkat.Rest rest = new Chilkat.Rest();
bool success;
// URL: https://api.stripe.com/v1/customers/cus_CBbg9PmQ9sLbmo/discount
bool bTls = true;
int port = 443;
bool bAutoReconnect = true;
success = rest.Connect("api.stripe.com",port,bTls,bAutoReconnect);
if (success != true) {
Debug.WriteLine("ConnectFailReason: " + Convert.ToString(rest.ConnectFailReason));
Debug.WriteLine(rest.LastErrorText);
return;
}
rest.SetAuthBasic("STRIPE_SECRET_KEY","");
Chilkat.StringBuilder sbResponseBody = new Chilkat.StringBuilder();
success = rest.FullRequestNoBodySb("DELETE","/v1/customers/cus_CBbg9PmQ9sLbmo/discount",sbResponseBody);
if (success != true) {
Debug.WriteLine(rest.LastErrorText);
return;
}
Chilkat.JsonObject jsonResponse = new Chilkat.JsonObject();
jsonResponse.LoadSb(sbResponseBody);
bool deleted;
string id;
deleted = jsonResponse.BoolOf("deleted");
id = jsonResponse.StringOf("id");
{
"deleted": true,
"id": "di_1BnETLGswQrCoh0Xe991uMc7"
}