diff --git a/API_VERSION b/API_VERSION index ab54b76b3e0..012d1278dbd 100644 --- a/API_VERSION +++ b/API_VERSION @@ -1 +1 @@ -2025-09-30.preview \ No newline at end of file +0de52cdca31a7c51c6d11187fc88ab23ea3a1c5b \ No newline at end of file diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index f0bb0d526f9..c6ee373b912 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v2028 \ No newline at end of file +v2031 \ No newline at end of file diff --git a/src/main/java/com/stripe/model/Payout.java b/src/main/java/com/stripe/model/Payout.java index 8285426488d..05b7d4ec829 100644 --- a/src/main/java/com/stripe/model/Payout.java +++ b/src/main/java/com/stripe/model/Payout.java @@ -573,8 +573,8 @@ public static Payout retrieve(String payout, PayoutRetrieveParams params, Reques /** * Reverses a payout by debiting the destination bank account. At this time, you can only reverse - * payouts for connected accounts to US bank accounts. If the payout is manual and in the {@code - * pending} status, use {@code /v1/payouts/:id/cancel} instead. + * payouts for connected accounts to US and Canadian bank accounts. If the payout is manual and in + * the {@code pending} status, use {@code /v1/payouts/:id/cancel} instead. * *
By requesting a reversal through {@code /v1/payouts/:id/reverse}, you confirm that the * authorized signatory of the selected bank account authorizes the debit on the bank account and @@ -586,8 +586,8 @@ public Payout reverse() throws StripeException { /** * Reverses a payout by debiting the destination bank account. At this time, you can only reverse - * payouts for connected accounts to US bank accounts. If the payout is manual and in the {@code - * pending} status, use {@code /v1/payouts/:id/cancel} instead. + * payouts for connected accounts to US and Canadian bank accounts. If the payout is manual and in + * the {@code pending} status, use {@code /v1/payouts/:id/cancel} instead. * *
By requesting a reversal through {@code /v1/payouts/:id/reverse}, you confirm that the * authorized signatory of the selected bank account authorizes the debit on the bank account and @@ -599,8 +599,8 @@ public Payout reverse(RequestOptions options) throws StripeException { /** * Reverses a payout by debiting the destination bank account. At this time, you can only reverse - * payouts for connected accounts to US bank accounts. If the payout is manual and in the {@code - * pending} status, use {@code /v1/payouts/:id/cancel} instead. + * payouts for connected accounts to US and Canadian bank accounts. If the payout is manual and in + * the {@code pending} status, use {@code /v1/payouts/:id/cancel} instead. * *
By requesting a reversal through {@code /v1/payouts/:id/reverse}, you confirm that the
* authorized signatory of the selected bank account authorizes the debit on the bank account and
@@ -612,8 +612,8 @@ public Payout reverse(Map By requesting a reversal through {@code /v1/payouts/:id/reverse}, you confirm that the
* authorized signatory of the selected bank account authorizes the debit on the bank account and
@@ -628,8 +628,8 @@ public Payout reverse(Map By requesting a reversal through {@code /v1/payouts/:id/reverse}, you confirm that the
* authorized signatory of the selected bank account authorizes the debit on the bank account and
@@ -641,8 +641,8 @@ public Payout reverse(PayoutReverseParams params) throws StripeException {
/**
* Reverses a payout by debiting the destination bank account. At this time, you can only reverse
- * payouts for connected accounts to US bank accounts. If the payout is manual and in the {@code
- * pending} status, use {@code /v1/payouts/:id/cancel} instead.
+ * payouts for connected accounts to US and Canadian bank accounts. If the payout is manual and in
+ * the {@code pending} status, use {@code /v1/payouts/:id/cancel} instead.
*
* By requesting a reversal through {@code /v1/payouts/:id/reverse}, you confirm that the
* authorized signatory of the selected bank account authorizes the debit on the bank account and
diff --git a/src/main/java/com/stripe/model/terminal/Reader.java b/src/main/java/com/stripe/model/terminal/Reader.java
index 1d0abd080f1..895eb52dc5d 100644
--- a/src/main/java/com/stripe/model/terminal/Reader.java
+++ b/src/main/java/com/stripe/model/terminal/Reader.java
@@ -84,6 +84,10 @@ public class Reader extends ApiResource implements HasId, MetadataStore By requesting a reversal through {@code /v1/payouts/:id/reverse}, you confirm that the
* authorized signatory of the selected bank account authorizes the debit on the bank account and
@@ -230,8 +230,8 @@ public Payout reverse(String payout, PayoutReverseParams params) throws StripeEx
}
/**
* Reverses a payout by debiting the destination bank account. At this time, you can only reverse
- * payouts for connected accounts to US bank accounts. If the payout is manual and in the {@code
- * pending} status, use {@code /v1/payouts/:id/cancel} instead.
+ * payouts for connected accounts to US and Canadian bank accounts. If the payout is manual and in
+ * the {@code pending} status, use {@code /v1/payouts/:id/cancel} instead.
*
* By requesting a reversal through {@code /v1/payouts/:id/reverse}, you confirm that the
* authorized signatory of the selected bank account authorizes the debit on the bank account and
@@ -242,8 +242,8 @@ public Payout reverse(String payout, RequestOptions options) throws StripeExcept
}
/**
* Reverses a payout by debiting the destination bank account. At this time, you can only reverse
- * payouts for connected accounts to US bank accounts. If the payout is manual and in the {@code
- * pending} status, use {@code /v1/payouts/:id/cancel} instead.
+ * payouts for connected accounts to US and Canadian bank accounts. If the payout is manual and in
+ * the {@code pending} status, use {@code /v1/payouts/:id/cancel} instead.
*
* By requesting a reversal through {@code /v1/payouts/:id/reverse}, you confirm that the
* authorized signatory of the selected bank account authorizes the debit on the bank account and
@@ -254,8 +254,8 @@ public Payout reverse(String payout) throws StripeException {
}
/**
* Reverses a payout by debiting the destination bank account. At this time, you can only reverse
- * payouts for connected accounts to US bank accounts. If the payout is manual and in the {@code
- * pending} status, use {@code /v1/payouts/:id/cancel} instead.
+ * payouts for connected accounts to US and Canadian bank accounts. If the payout is manual and in
+ * the {@code pending} status, use {@code /v1/payouts/:id/cancel} instead.
*
* By requesting a reversal through {@code /v1/payouts/:id/reverse}, you confirm that the
* authorized signatory of the selected bank account authorizes the debit on the bank account and
diff --git a/src/test/java/com/stripe/functional/GeneratedExamples.java b/src/test/java/com/stripe/functional/GeneratedExamples.java
index 01eae094ff4..e4a6603fa77 100644
--- a/src/test/java/com/stripe/functional/GeneratedExamples.java
+++ b/src/test/java/com/stripe/functional/GeneratedExamples.java
@@ -12807,6 +12807,73 @@ public void testPromotionCodesGet2ServicesNonNamespaced() throws StripeException
@Test
public void testPromotionCodesPost() throws StripeException {
+ PromotionCodeCreateParams params =
+ PromotionCodeCreateParams.builder()
+ .setPromotion(
+ PromotionCodeCreateParams.Promotion.builder()
+ .setType(PromotionCodeCreateParams.Promotion.Type.COUPON)
+ .setCoupon("Z4OV52SU")
+ .build())
+ .build();
+
+ PromotionCode promotionCode = PromotionCode.create(params);
+ assertNotNull(promotionCode);
+ verifyRequest(
+ BaseAddress.API,
+ ApiResource.RequestMethod.POST,
+ "/v1/promotion_codes",
+ params.toMap(),
+ null);
+ }
+
+ @Test
+ public void testPromotionCodesPostServices() throws StripeException {
+ StripeClient client = new StripeClient(networkSpy);
+
+ com.stripe.param.PromotionCodeCreateParams params =
+ com.stripe.param.PromotionCodeCreateParams.builder()
+ .setPromotion(
+ com.stripe.param.PromotionCodeCreateParams.Promotion.builder()
+ .setType(com.stripe.param.PromotionCodeCreateParams.Promotion.Type.COUPON)
+ .setCoupon("Z4OV52SU")
+ .build())
+ .build();
+
+ com.stripe.model.PromotionCode promotionCode = client.v1().promotionCodes().create(params);
+ assertNotNull(promotionCode);
+ verifyRequest(
+ BaseAddress.API,
+ ApiResource.RequestMethod.POST,
+ "/v1/promotion_codes",
+ params.toMap(),
+ null);
+ }
+
+ @Test
+ public void testPromotionCodesPostServicesNonNamespaced() throws StripeException {
+ StripeClient client = new StripeClient(networkSpy);
+
+ com.stripe.param.PromotionCodeCreateParams params =
+ com.stripe.param.PromotionCodeCreateParams.builder()
+ .setPromotion(
+ com.stripe.param.PromotionCodeCreateParams.Promotion.builder()
+ .setType(com.stripe.param.PromotionCodeCreateParams.Promotion.Type.COUPON)
+ .setCoupon("Z4OV52SU")
+ .build())
+ .build();
+
+ com.stripe.model.PromotionCode promotionCode = client.promotionCodes().create(params);
+ assertNotNull(promotionCode);
+ verifyRequest(
+ BaseAddress.API,
+ ApiResource.RequestMethod.POST,
+ "/v1/promotion_codes",
+ params.toMap(),
+ null);
+ }
+
+ @Test
+ public void testPromotionCodesPost2() throws StripeException {
PromotionCode resource = PromotionCode.retrieve("promo_xxxxxxxxxxxxx");
PromotionCodeUpdateParams params =
@@ -12823,7 +12890,7 @@ public void testPromotionCodesPost() throws StripeException {
}
@Test
- public void testPromotionCodesPostServices() throws StripeException {
+ public void testPromotionCodesPost2Services() throws StripeException {
StripeClient client = new StripeClient(networkSpy);
com.stripe.param.PromotionCodeUpdateParams params =
@@ -12843,7 +12910,7 @@ public void testPromotionCodesPostServices() throws StripeException {
}
@Test
- public void testPromotionCodesPostServicesNonNamespaced() throws StripeException {
+ public void testPromotionCodesPost2ServicesNonNamespaced() throws StripeException {
StripeClient client = new StripeClient(networkSpy);
com.stripe.param.PromotionCodeUpdateParams params =
diff --git a/src/test/java/com/stripe/functional/PromotionCodeTest.java b/src/test/java/com/stripe/functional/PromotionCodeTest.java
deleted file mode 100644
index 3252c08951d..00000000000
--- a/src/test/java/com/stripe/functional/PromotionCodeTest.java
+++ /dev/null
@@ -1,72 +0,0 @@
-package com.stripe.functional;
-
-import static org.junit.jupiter.api.Assertions.assertNotNull;
-
-import com.stripe.BaseStripeTest;
-import com.stripe.exception.StripeException;
-import com.stripe.model.PromotionCode;
-import com.stripe.model.PromotionCodeCollection;
-import com.stripe.net.ApiResource;
-import java.util.HashMap;
-import java.util.Map;
-import org.junit.jupiter.api.Test;
-
-public class PromotionCodeTest extends BaseStripeTest {
- public static final String PROMOTION_CODE_ID = "promo_123";
-
- private PromotionCode getPromotionCodeFixture() throws StripeException {
- final PromotionCode promotionCode = PromotionCode.retrieve(PROMOTION_CODE_ID);
- resetNetworkSpy();
- return promotionCode;
- }
-
- @Test
- public void testCreate() throws StripeException {
- final Map