Search in sources :

Example 1 with DeletedPlan

use of com.stripe.model.DeletedPlan in project stripe-java by stripe.

the class PlanTest method testPlanDeletePerCallAPIKey.

@Test
public void testPlanDeletePerCallAPIKey() throws StripeException {
    Plan createdPlan = Plan.create(getUniquePlanParams(), Stripe.apiKey);
    DeletedPlan deletedPlan = createdPlan.delete(Stripe.apiKey);
    assertTrue(deletedPlan.getDeleted());
    assertEquals(deletedPlan.getId(), createdPlan.getId());
}
Also used : DeletedPlan(com.stripe.model.DeletedPlan) Plan(com.stripe.model.Plan) DeletedPlan(com.stripe.model.DeletedPlan) BaseStripeFunctionalTest(com.stripe.BaseStripeFunctionalTest) Test(org.junit.Test)

Example 2 with DeletedPlan

use of com.stripe.model.DeletedPlan in project stripe-java by stripe.

the class PlanTest method testPlanDelete.

@Test
public void testPlanDelete() throws StripeException {
    Plan createdPlan = Plan.create(getUniquePlanParams());
    DeletedPlan deletedPlan = createdPlan.delete();
    assertTrue(deletedPlan.getDeleted());
    assertEquals(deletedPlan.getId(), createdPlan.getId());
}
Also used : DeletedPlan(com.stripe.model.DeletedPlan) Plan(com.stripe.model.Plan) DeletedPlan(com.stripe.model.DeletedPlan) BaseStripeFunctionalTest(com.stripe.BaseStripeFunctionalTest) Test(org.junit.Test)

Aggregations

BaseStripeFunctionalTest (com.stripe.BaseStripeFunctionalTest)2 DeletedPlan (com.stripe.model.DeletedPlan)2 Plan (com.stripe.model.Plan)2 Test (org.junit.Test)2