Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CODEGEN_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
c250368ba89214c80bc8de3e4fc5d2094c5502cc
8c8709034677788a8c86b775cd16f40ecb5fb7db
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v2153
v2156
12 changes: 12 additions & 0 deletions src/main/java/com/stripe/StripeClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -520,6 +520,18 @@ public com.stripe.service.ForwardingService forwarding() {
return new com.stripe.service.ForwardingService(this.getResponseGetter());
}

/**
* @deprecated StripeClient.frMealVouchersOnboardings() is deprecated, use
* StripeClient.v1().frMealVouchersOnboardings() instead. All functionality under it has been
* copied over to StripeClient.v1().frMealVouchersOnboardings(). See <a
* href="https://github.com/stripe/stripe-java/wiki/v1-namespace-in-StripeClient">migration
* guide</a> for more on this and tips on migrating to the new v1 namespace.
*/
@Deprecated
public com.stripe.service.FrMealVouchersOnboardingService frMealVouchersOnboardings() {
return new com.stripe.service.FrMealVouchersOnboardingService(this.getResponseGetter());
}

/**
* @deprecated StripeClient.fxQuotes() is deprecated, use StripeClient.v1().fxQuotes() instead.
* All functionality under it has been copied over to StripeClient.v1().fxQuotes(). See <a
Expand Down
37 changes: 37 additions & 0 deletions src/main/java/com/stripe/model/Coupon.java
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,9 @@ public class Coupon extends ApiResource implements HasId, MetadataStore<Coupon>
@SerializedName("script")
Script script;

@SerializedName("service_period")
ServicePeriod servicePeriod;

/** Number of times this coupon has been applied to a customer. */
@SerializedName("times_redeemed")
Long timesRedeemed;
Expand Down Expand Up @@ -444,10 +447,44 @@ public static class Script extends StripeObject implements HasId {
String id;
}

/**
* For more details about ServicePeriod, please refer to the <a
* href="https://docs.stripe.com/api">API Reference.</a>
*/
@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
public static class ServicePeriod extends StripeObject {
@SerializedName("interval")
String interval;

@SerializedName("interval_count")
Long intervalCount;

@SerializedName("iterations")
Iterations iterations;

/**
* For more details about Iterations, please refer to the <a
* href="https://docs.stripe.com/api">API Reference.</a>
*/
@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
public static class Iterations extends StripeObject {
@SerializedName("count")
Long count;

@SerializedName("type")
String type;
}
}

@Override
public void setResponseGetter(StripeResponseGetter responseGetter) {
super.setResponseGetter(responseGetter);
trySetResponseGetter(appliesTo, responseGetter);
trySetResponseGetter(script, responseGetter);
trySetResponseGetter(servicePeriod, responseGetter);
}
}
20 changes: 20 additions & 0 deletions src/main/java/com/stripe/model/Discount.java
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,9 @@ public class Discount extends StripeObject implements HasId {
@SerializedName("schedule")
String schedule;

@SerializedName("service_period_details")
ServicePeriodDetails servicePeriodDetails;

@SerializedName("source")
Source source;

Expand Down Expand Up @@ -149,6 +152,23 @@ public void setPromotionCodeObject(PromotionCode expandableObject) {
new ExpandableField<PromotionCode>(expandableObject.getId(), expandableObject);
}

/**
* For more details about ServicePeriodDetails, please refer to the <a
* href="https://docs.stripe.com/api">API Reference.</a>
*/
@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
public static class ServicePeriodDetails extends StripeObject {
/** The date that the service period was anchored to. */
@SerializedName("service_period_anchored_at")
Long servicePeriodAnchoredAt;

/** The date that the service period started. */
@SerializedName("start_date")
Long startDate;
}

/**
* For more details about Source, please refer to the <a href="https://docs.stripe.com/api">API
* Reference.</a>
Expand Down
1 change: 1 addition & 0 deletions src/main/java/com/stripe/model/EventDataClassLookup.java
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ public final class EventDataClassLookup {
classLookup.put("fee_refund", com.stripe.model.FeeRefund.class);
classLookup.put("file", com.stripe.model.File.class);
classLookup.put("file_link", com.stripe.model.FileLink.class);
classLookup.put("fr_meal_vouchers_onboarding", com.stripe.model.FrMealVouchersOnboarding.class);
classLookup.put("funding_instructions", com.stripe.model.FundingInstructions.class);
classLookup.put("fx_quote", com.stripe.model.FxQuote.class);
classLookup.put("invoice", com.stripe.model.Invoice.class);
Expand Down
Loading