use of com.stripe.model.DeletedSubscriptionItem in project stripe-java by stripe.
the class SubscriptionItemTest method testSubscriptionItemDelete.
@Test
public void testSubscriptionItemDelete() throws StripeException {
Customer customer = Customer.create(defaultCustomerParams);
Subscription subscription = createDefaultSubscription(customer);
SubscriptionItem subscriptionItem = createDefaultSubscriptionItem(subscription);
DeletedSubscriptionItem deletedSubscriptionItem = subscriptionItem.delete();
assertTrue(deletedSubscriptionItem.getDeleted());
assertEquals(deletedSubscriptionItem.getId(), subscriptionItem.getId());
}
Aggregations