Skip to content

Commit babe753

Browse files
Update generated code for v2025 and 2025-09-30.clover (#2059)
Co-authored-by: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com>
1 parent 2810582 commit babe753

3 files changed

Lines changed: 81 additions & 3 deletions

File tree

src/main/java/com/stripe/param/InvoiceCreatePreviewParams.java

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7102,6 +7102,17 @@ public Builder setCancelAt(Long cancelAt) {
71027102
return this;
71037103
}
71047104

7105+
/**
7106+
* A timestamp at which the subscription should cancel. If set to a date before the current
7107+
* period ends, this will cause a proration if prorations have been enabled using {@code
7108+
* proration_behavior}. If set during a future period, this will always cause a proration for
7109+
* that period.
7110+
*/
7111+
public Builder setCancelAt(InvoiceCreatePreviewParams.SubscriptionDetails.CancelAt cancelAt) {
7112+
this.cancelAt = cancelAt;
7113+
return this;
7114+
}
7115+
71057116
/**
71067117
* A timestamp at which the subscription should cancel. If set to a date before the current
71077118
* period ends, this will cause a proration if prorations have been enabled using {@code
@@ -8465,6 +8476,21 @@ public enum BillingCycleAnchor implements ApiRequestParams.EnumParam {
84658476
}
84668477
}
84678478

8479+
public enum CancelAt implements ApiRequestParams.EnumParam {
8480+
@SerializedName("max_period_end")
8481+
MAX_PERIOD_END("max_period_end"),
8482+
8483+
@SerializedName("min_period_end")
8484+
MIN_PERIOD_END("min_period_end");
8485+
8486+
@Getter(onMethod_ = {@Override})
8487+
private final String value;
8488+
8489+
CancelAt(String value) {
8490+
this.value = value;
8491+
}
8492+
}
8493+
84688494
public enum ProrationBehavior implements ApiRequestParams.EnumParam {
84698495
@SerializedName("always_invoice")
84708496
ALWAYS_INVOICE("always_invoice"),

src/main/java/com/stripe/param/SubscriptionCreateParams.java

Lines changed: 29 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ public class SubscriptionCreateParams extends ApiRequestParams {
8181
* period.
8282
*/
8383
@SerializedName("cancel_at")
84-
Long cancelAt;
84+
Object cancelAt;
8585

8686
/**
8787
* Indicate whether this subscription should cancel at the end of the current period ({@code
@@ -312,7 +312,7 @@ private SubscriptionCreateParams(
312312
BillingCycleAnchorConfig billingCycleAnchorConfig,
313313
BillingMode billingMode,
314314
Object billingThresholds,
315-
Long cancelAt,
315+
Object cancelAt,
316316
Boolean cancelAtPeriodEnd,
317317
CollectionMethod collectionMethod,
318318
String currency,
@@ -397,7 +397,7 @@ public static class Builder {
397397

398398
private Object billingThresholds;
399399

400-
private Long cancelAt;
400+
private Object cancelAt;
401401

402402
private Boolean cancelAtPeriodEnd;
403403

@@ -618,6 +618,17 @@ public Builder setCancelAt(Long cancelAt) {
618618
return this;
619619
}
620620

621+
/**
622+
* A timestamp at which the subscription should cancel. If set to a date before the current
623+
* period ends, this will cause a proration if prorations have been enabled using {@code
624+
* proration_behavior}. If set during a future period, this will always cause a proration for
625+
* that period.
626+
*/
627+
public Builder setCancelAt(SubscriptionCreateParams.CancelAt cancelAt) {
628+
this.cancelAt = cancelAt;
629+
return this;
630+
}
631+
621632
/**
622633
* Indicate whether this subscription should cancel at the end of the current period ({@code
623634
* current_period_end}). Defaults to {@code false}.
@@ -6299,6 +6310,21 @@ public enum MissingPaymentMethod implements ApiRequestParams.EnumParam {
62996310
}
63006311
}
63016312

6313+
public enum CancelAt implements ApiRequestParams.EnumParam {
6314+
@SerializedName("max_period_end")
6315+
MAX_PERIOD_END("max_period_end"),
6316+
6317+
@SerializedName("min_period_end")
6318+
MIN_PERIOD_END("min_period_end");
6319+
6320+
@Getter(onMethod_ = {@Override})
6321+
private final String value;
6322+
6323+
CancelAt(String value) {
6324+
this.value = value;
6325+
}
6326+
}
6327+
63026328
public enum CollectionMethod implements ApiRequestParams.EnumParam {
63036329
@SerializedName("charge_automatically")
63046330
CHARGE_AUTOMATICALLY("charge_automatically"),

src/main/java/com/stripe/param/SubscriptionUpdateParams.java

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -561,6 +561,17 @@ public Builder setCancelAt(Long cancelAt) {
561561
return this;
562562
}
563563

564+
/**
565+
* A timestamp at which the subscription should cancel. If set to a date before the current
566+
* period ends, this will cause a proration if prorations have been enabled using {@code
567+
* proration_behavior}. If set during a future period, this will always cause a proration for
568+
* that period.
569+
*/
570+
public Builder setCancelAt(SubscriptionUpdateParams.CancelAt cancelAt) {
571+
this.cancelAt = cancelAt;
572+
return this;
573+
}
574+
564575
/**
565576
* A timestamp at which the subscription should cancel. If set to a date before the current
566577
* period ends, this will cause a proration if prorations have been enabled using {@code
@@ -6538,6 +6549,21 @@ public enum BillingCycleAnchor implements ApiRequestParams.EnumParam {
65386549
}
65396550
}
65406551

6552+
public enum CancelAt implements ApiRequestParams.EnumParam {
6553+
@SerializedName("max_period_end")
6554+
MAX_PERIOD_END("max_period_end"),
6555+
6556+
@SerializedName("min_period_end")
6557+
MIN_PERIOD_END("min_period_end");
6558+
6559+
@Getter(onMethod_ = {@Override})
6560+
private final String value;
6561+
6562+
CancelAt(String value) {
6563+
this.value = value;
6564+
}
6565+
}
6566+
65416567
public enum CollectionMethod implements ApiRequestParams.EnumParam {
65426568
@SerializedName("charge_automatically")
65436569
CHARGE_AUTOMATICALLY("charge_automatically"),

0 commit comments

Comments
 (0)