use of com.stripe.model.DeletedCoupon in project stripe-java by stripe.
the class CouponTest method testCouponDelete.
@Test
public void testCouponDelete() throws StripeException {
Coupon createdCoupon = Coupon.create(getUniqueCouponParams());
DeletedCoupon deletedCoupon = createdCoupon.delete();
assertTrue(deletedCoupon.getDeleted());
assertEquals(deletedCoupon.getId(), createdCoupon.getId());
}
use of com.stripe.model.DeletedCoupon in project stripe-java by stripe.
the class CouponTest method testCouponDeletePerCallAPIKey.
@Test
public void testCouponDeletePerCallAPIKey() throws StripeException {
Coupon createdCoupon = Coupon.create(getUniqueCouponParams(), Stripe.apiKey);
DeletedCoupon deletedCoupon = createdCoupon.delete(Stripe.apiKey);
assertTrue(deletedCoupon.getDeleted());
assertEquals(deletedCoupon.getId(), createdCoupon.getId());
}
Aggregations