Skip to content

Commit bf925ff

Browse files
authored
Remove manual promotion code test (#2078)
* deleted manual PromotionCodeTest * regenerated GeneratedExamples.java
1 parent 922d825 commit bf925ff

File tree

2 files changed

+69
-74
lines changed

2 files changed

+69
-74
lines changed

src/test/java/com/stripe/functional/GeneratedExamples.java

Lines changed: 69 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12807,6 +12807,73 @@ public void testPromotionCodesGet2ServicesNonNamespaced() throws StripeException
1280712807

1280812808
@Test
1280912809
public void testPromotionCodesPost() throws StripeException {
12810+
PromotionCodeCreateParams params =
12811+
PromotionCodeCreateParams.builder()
12812+
.setPromotion(
12813+
PromotionCodeCreateParams.Promotion.builder()
12814+
.setType(PromotionCodeCreateParams.Promotion.Type.COUPON)
12815+
.setCoupon("Z4OV52SU")
12816+
.build())
12817+
.build();
12818+
12819+
PromotionCode promotionCode = PromotionCode.create(params);
12820+
assertNotNull(promotionCode);
12821+
verifyRequest(
12822+
BaseAddress.API,
12823+
ApiResource.RequestMethod.POST,
12824+
"/v1/promotion_codes",
12825+
params.toMap(),
12826+
null);
12827+
}
12828+
12829+
@Test
12830+
public void testPromotionCodesPostServices() throws StripeException {
12831+
StripeClient client = new StripeClient(networkSpy);
12832+
12833+
com.stripe.param.PromotionCodeCreateParams params =
12834+
com.stripe.param.PromotionCodeCreateParams.builder()
12835+
.setPromotion(
12836+
com.stripe.param.PromotionCodeCreateParams.Promotion.builder()
12837+
.setType(com.stripe.param.PromotionCodeCreateParams.Promotion.Type.COUPON)
12838+
.setCoupon("Z4OV52SU")
12839+
.build())
12840+
.build();
12841+
12842+
com.stripe.model.PromotionCode promotionCode = client.v1().promotionCodes().create(params);
12843+
assertNotNull(promotionCode);
12844+
verifyRequest(
12845+
BaseAddress.API,
12846+
ApiResource.RequestMethod.POST,
12847+
"/v1/promotion_codes",
12848+
params.toMap(),
12849+
null);
12850+
}
12851+
12852+
@Test
12853+
public void testPromotionCodesPostServicesNonNamespaced() throws StripeException {
12854+
StripeClient client = new StripeClient(networkSpy);
12855+
12856+
com.stripe.param.PromotionCodeCreateParams params =
12857+
com.stripe.param.PromotionCodeCreateParams.builder()
12858+
.setPromotion(
12859+
com.stripe.param.PromotionCodeCreateParams.Promotion.builder()
12860+
.setType(com.stripe.param.PromotionCodeCreateParams.Promotion.Type.COUPON)
12861+
.setCoupon("Z4OV52SU")
12862+
.build())
12863+
.build();
12864+
12865+
com.stripe.model.PromotionCode promotionCode = client.promotionCodes().create(params);
12866+
assertNotNull(promotionCode);
12867+
verifyRequest(
12868+
BaseAddress.API,
12869+
ApiResource.RequestMethod.POST,
12870+
"/v1/promotion_codes",
12871+
params.toMap(),
12872+
null);
12873+
}
12874+
12875+
@Test
12876+
public void testPromotionCodesPost2() throws StripeException {
1281012877
PromotionCode resource = PromotionCode.retrieve("promo_xxxxxxxxxxxxx");
1281112878

1281212879
PromotionCodeUpdateParams params =
@@ -12823,7 +12890,7 @@ public void testPromotionCodesPost() throws StripeException {
1282312890
}
1282412891

1282512892
@Test
12826-
public void testPromotionCodesPostServices() throws StripeException {
12893+
public void testPromotionCodesPost2Services() throws StripeException {
1282712894
StripeClient client = new StripeClient(networkSpy);
1282812895

1282912896
com.stripe.param.PromotionCodeUpdateParams params =
@@ -12843,7 +12910,7 @@ public void testPromotionCodesPostServices() throws StripeException {
1284312910
}
1284412911

1284512912
@Test
12846-
public void testPromotionCodesPostServicesNonNamespaced() throws StripeException {
12913+
public void testPromotionCodesPost2ServicesNonNamespaced() throws StripeException {
1284712914
StripeClient client = new StripeClient(networkSpy);
1284812915

1284912916
com.stripe.param.PromotionCodeUpdateParams params =

src/test/java/com/stripe/functional/PromotionCodeTest.java

Lines changed: 0 additions & 72 deletions
This file was deleted.

0 commit comments

Comments
 (0)