Skip to content

Commit

Permalink
Merge pull request #1509 from stripe/latest-codegen-beta
Browse files Browse the repository at this point in the history
API Updates for beta branch
  • Loading branch information
pakrym-stripe committed Jan 20, 2023
2 parents 262b180 + d9c8d35 commit dce0c94
Show file tree
Hide file tree
Showing 7 changed files with 125 additions and 1 deletion.
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v219
v220
9 changes: 9 additions & 0 deletions src/main/java/com/stripe/model/QuoteLine.java
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,15 @@ public class QuoteLine extends StripeObject implements HasId {
@SerializedName("proration_behavior")
String prorationBehavior;

/**
* Timestsamp helper to end the underlying schedule early, based on the acompanying line's start
* or end date.
*
* <p>One of {@code line_ends_at}, or {@code line_starts_at}.
*/
@SerializedName("set_schedule_end")
String setScheduleEnd;

/** Details to identify the earliest timestamp where the proposed change should take effect. */
@SerializedName("starts_at")
StartsAt startsAt;
Expand Down
36 changes: 36 additions & 0 deletions src/main/java/com/stripe/param/QuoteCreateParams.java
Original file line number Diff line number Diff line change
Expand Up @@ -1342,6 +1342,13 @@ public static class Line {
@SerializedName("proration_behavior")
ProrationBehavior prorationBehavior;

/**
* Timestsamp helper to end the underlying schedule early, based on the acompanying line's start
* or end date.
*/
@SerializedName("set_schedule_end")
SetScheduleEnd setScheduleEnd;

/** Details to identify the earliest timestamp where the proposed change should take effect. */
@SerializedName("starts_at")
StartsAt startsAt;
Expand All @@ -1357,6 +1364,7 @@ private Line(
EndsAt endsAt,
Map<String, Object> extraParams,
ProrationBehavior prorationBehavior,
SetScheduleEnd setScheduleEnd,
StartsAt startsAt,
TrialSettings trialSettings) {
this.actions = actions;
Expand All @@ -1365,6 +1373,7 @@ private Line(
this.endsAt = endsAt;
this.extraParams = extraParams;
this.prorationBehavior = prorationBehavior;
this.setScheduleEnd = setScheduleEnd;
this.startsAt = startsAt;
this.trialSettings = trialSettings;
}
Expand All @@ -1386,6 +1395,8 @@ public static class Builder {

private ProrationBehavior prorationBehavior;

private SetScheduleEnd setScheduleEnd;

private StartsAt startsAt;

private TrialSettings trialSettings;
Expand All @@ -1399,6 +1410,7 @@ public QuoteCreateParams.Line build() {
this.endsAt,
this.extraParams,
this.prorationBehavior,
this.setScheduleEnd,
this.startsAt,
this.trialSettings);
}
Expand Down Expand Up @@ -1492,6 +1504,15 @@ public Builder setProrationBehavior(
return this;
}

/**
* Timestsamp helper to end the underlying schedule early, based on the acompanying line's
* start or end date.
*/
public Builder setSetScheduleEnd(QuoteCreateParams.Line.SetScheduleEnd setScheduleEnd) {
this.setScheduleEnd = setScheduleEnd;
return this;
}

/**
* Details to identify the earliest timestamp where the proposed change should take effect.
*/
Expand Down Expand Up @@ -4682,6 +4703,21 @@ public enum ProrationBehavior implements ApiRequestParams.EnumParam {
this.value = value;
}
}

public enum SetScheduleEnd implements ApiRequestParams.EnumParam {
@SerializedName("line_ends_at")
LINE_ENDS_AT("line_ends_at"),

@SerializedName("line_starts_at")
LINE_STARTS_AT("line_starts_at");

@Getter(onMethod_ = {@Override})
private final String value;

SetScheduleEnd(String value) {
this.value = value;
}
}
}

@Getter
Expand Down
36 changes: 36 additions & 0 deletions src/main/java/com/stripe/param/QuoteUpdateParams.java
Original file line number Diff line number Diff line change
Expand Up @@ -1237,6 +1237,13 @@ public static class Line {
@SerializedName("proration_behavior")
ProrationBehavior prorationBehavior;

/**
* Timestsamp helper to end the underlying schedule early, based on the acompanying line's start
* or end date.
*/
@SerializedName("set_schedule_end")
SetScheduleEnd setScheduleEnd;

/** Details to identify the earliest timestamp where the proposed change should take effect. */
@SerializedName("starts_at")
StartsAt startsAt;
Expand All @@ -1253,6 +1260,7 @@ private Line(
Map<String, Object> extraParams,
Object id,
ProrationBehavior prorationBehavior,
SetScheduleEnd setScheduleEnd,
StartsAt startsAt,
TrialSettings trialSettings) {
this.actions = actions;
Expand All @@ -1262,6 +1270,7 @@ private Line(
this.extraParams = extraParams;
this.id = id;
this.prorationBehavior = prorationBehavior;
this.setScheduleEnd = setScheduleEnd;
this.startsAt = startsAt;
this.trialSettings = trialSettings;
}
Expand All @@ -1285,6 +1294,8 @@ public static class Builder {

private ProrationBehavior prorationBehavior;

private SetScheduleEnd setScheduleEnd;

private StartsAt startsAt;

private TrialSettings trialSettings;
Expand All @@ -1299,6 +1310,7 @@ public QuoteUpdateParams.Line build() {
this.extraParams,
this.id,
this.prorationBehavior,
this.setScheduleEnd,
this.startsAt,
this.trialSettings);
}
Expand Down Expand Up @@ -1404,6 +1416,15 @@ public Builder setProrationBehavior(
return this;
}

/**
* Timestsamp helper to end the underlying schedule early, based on the acompanying line's
* start or end date.
*/
public Builder setSetScheduleEnd(QuoteUpdateParams.Line.SetScheduleEnd setScheduleEnd) {
this.setScheduleEnd = setScheduleEnd;
return this;
}

/**
* Details to identify the earliest timestamp where the proposed change should take effect.
*/
Expand Down Expand Up @@ -4706,6 +4727,21 @@ public enum ProrationBehavior implements ApiRequestParams.EnumParam {
this.value = value;
}
}

public enum SetScheduleEnd implements ApiRequestParams.EnumParam {
@SerializedName("line_ends_at")
LINE_ENDS_AT("line_ends_at"),

@SerializedName("line_starts_at")
LINE_STARTS_AT("line_starts_at");

@Getter(onMethod_ = {@Override})
private final String value;

SetScheduleEnd(String value) {
this.value = value;
}
}
}

@Getter
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,13 @@ public static class Amendment {
@SerializedName("proration_behavior")
ProrationBehavior prorationBehavior;

/**
* Ends the subscription schedule early as dictated by either the accompanying amendment's start
* or end.
*/
@SerializedName("set_schedule_end")
SetScheduleEnd setScheduleEnd;

/** Settings related to subscription trials. */
@SerializedName("trial_settings")
TrialSettings trialSettings;
Expand All @@ -243,6 +250,7 @@ private Amendment(
List<SubscriptionScheduleAmendParams.Amendment.ItemAction> itemActions,
List<SubscriptionScheduleAmendParams.Amendment.MetadataAction> metadataActions,
ProrationBehavior prorationBehavior,
SetScheduleEnd setScheduleEnd,
TrialSettings trialSettings) {
this.amendmentEnd = amendmentEnd;
this.amendmentStart = amendmentStart;
Expand All @@ -252,6 +260,7 @@ private Amendment(
this.itemActions = itemActions;
this.metadataActions = metadataActions;
this.prorationBehavior = prorationBehavior;
this.setScheduleEnd = setScheduleEnd;
this.trialSettings = trialSettings;
}

Expand All @@ -276,6 +285,8 @@ public static class Builder {

private ProrationBehavior prorationBehavior;

private SetScheduleEnd setScheduleEnd;

private TrialSettings trialSettings;

/** Finalize and obtain parameter instance from this builder. */
Expand All @@ -289,6 +300,7 @@ public SubscriptionScheduleAmendParams.Amendment build() {
this.itemActions,
this.metadataActions,
this.prorationBehavior,
this.setScheduleEnd,
this.trialSettings);
}

Expand Down Expand Up @@ -448,6 +460,16 @@ public Builder setProrationBehavior(
return this;
}

/**
* Ends the subscription schedule early as dictated by either the accompanying amendment's
* start or end.
*/
public Builder setSetScheduleEnd(
SubscriptionScheduleAmendParams.Amendment.SetScheduleEnd setScheduleEnd) {
this.setScheduleEnd = setScheduleEnd;
return this;
}

/** Settings related to subscription trials. */
public Builder setTrialSettings(
SubscriptionScheduleAmendParams.Amendment.TrialSettings trialSettings) {
Expand Down Expand Up @@ -3733,6 +3755,21 @@ public enum ProrationBehavior implements ApiRequestParams.EnumParam {
this.value = value;
}
}

public enum SetScheduleEnd implements ApiRequestParams.EnumParam {
@SerializedName("amendment_end")
AMENDMENT_END("amendment_end"),

@SerializedName("amendment_start")
AMENDMENT_START("amendment_start");

@Getter(onMethod_ = {@Override})
private final String value;

SetScheduleEnd(String value) {
this.value = value;
}
}
}

@Getter
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1003,6 +1003,9 @@ public enum EnabledEvent implements ApiRequestParams.EnumParam {
@SerializedName("quote.created")
QUOTE__CREATED("quote.created"),

@SerializedName("quote.draft")
QUOTE__DRAFT("quote.draft"),

@SerializedName("quote.finalized")
QUOTE__FINALIZED("quote.finalized"),

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -685,6 +685,9 @@ public enum EnabledEvent implements ApiRequestParams.EnumParam {
@SerializedName("quote.created")
QUOTE__CREATED("quote.created"),

@SerializedName("quote.draft")
QUOTE__DRAFT("quote.draft"),

@SerializedName("quote.finalized")
QUOTE__FINALIZED("quote.finalized"),

Expand Down

0 comments on commit dce0c94

Please sign in to comment.