use of com.stripe.model.DeletedCustomer in project stripe-java by stripe.
the class CustomerTest method testCustomerDeletePerCallAPIKey.
@Test
public void testCustomerDeletePerCallAPIKey() throws StripeException {
Customer createdCustomer = Customer.create(defaultCustomerParams, Stripe.apiKey);
DeletedCustomer deletedCustomer = createdCustomer.delete(Stripe.apiKey);
Customer deletedRetrievedCustomer = Customer.retrieve(createdCustomer.getId(), Stripe.apiKey);
assertTrue(deletedCustomer.getDeleted());
assertEquals(deletedCustomer.getId(), createdCustomer.getId());
assertTrue(deletedRetrievedCustomer.getDeleted());
}
use of com.stripe.model.DeletedCustomer in project stripe-java by stripe.
the class CustomerTest method testCustomerDelete.
@Test
public void testCustomerDelete() throws StripeException {
Customer createdCustomer = Customer.create(defaultCustomerParams);
DeletedCustomer deletedCustomer = createdCustomer.delete();
Customer deletedRetrievedCustomer = Customer.retrieve(createdCustomer.getId());
assertTrue(deletedCustomer.getDeleted());
assertEquals(deletedCustomer.getId(), createdCustomer.getId());
assertTrue(deletedRetrievedCustomer.getDeleted());
}
Aggregations