/** * Delete a customer discount. */ public void deleteDiscount() throws StripeException { deleteDiscount((RequestOptions) null); }
@Test public void testDeleteDiscount() throws StripeException { final Customer customer = getCustomerFixture(); // stripe-mock does not support /v1/customers/%s/discount endpoint, so we stub the request stubRequest( ApiResource.RequestMethod.DELETE, String.format("/v1/customers/%s/discount", customer.getId()), null, void.class, null ); customer.deleteDiscount(); verifyRequest( ApiResource.RequestMethod.DELETE, String.format("/v1/customers/%s/discount", customer.getId()) ); } }