Skip to content

Commit 6ad8b31

Browse files
Codegen from openapi eba69d9
1 parent 65f1e02 commit 6ad8b31

File tree

4 files changed

+24
-22
lines changed

4 files changed

+24
-22
lines changed

Diff for: src/main/java/com/stripe/model/Plan.java

+5-2
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,16 @@ public class Plan extends ApiResource implements HasId, MetadataStore<Plan> {
3737
@SerializedName("aggregate_usage")
3838
String aggregateUsage;
3939

40-
/** The unit amount in %s to be charged, represented as a whole integer if possible. */
40+
/**
41+
* The unit amount in %s to be charged, represented as a whole integer if possible. Only set if
42+
* {@code billing_scheme=per_unit}.
43+
*/
4144
@SerializedName("amount")
4245
Long amount;
4346

4447
/**
4548
* The unit amount in %s to be charged, represented as a decimal string with at most 12 decimal
46-
* places.
49+
* places. Only set if {@code billing_scheme=per_unit}.
4750
*/
4851
@SerializedName("amount_decimal")
4952
BigDecimal amountDecimal;

Diff for: src/main/java/com/stripe/model/Price.java

+5-2
Original file line numberDiff line numberDiff line change
@@ -131,13 +131,16 @@ public class Price extends ApiResource implements HasId, MetadataStore<Price> {
131131
@SerializedName("type")
132132
String type;
133133

134-
/** The unit amount in %s to be charged, represented as a whole integer if possible. */
134+
/**
135+
* The unit amount in %s to be charged, represented as a whole integer if possible. Only set if
136+
* {@code billing_scheme=per_unit}.
137+
*/
135138
@SerializedName("unit_amount")
136139
Long unitAmount;
137140

138141
/**
139142
* The unit amount in %s to be charged, represented as a decimal string with at most 12 decimal
140-
* places.
143+
* places. Only set if {@code billing_scheme=per_unit}.
141144
*/
142145
@SerializedName("unit_amount_decimal")
143146
BigDecimal unitAmountDecimal;

Diff for: src/main/java/com/stripe/model/billingportal/Configuration.java

+12-12
Original file line numberDiff line numberDiff line change
@@ -133,41 +133,37 @@ public static Configuration create(ConfigurationCreateParams params, RequestOpti
133133
}
134134

135135
/** Updates a configuration that describes the functionality of the customer portal. */
136-
public static Configuration update(String configuration, Map<String, Object> params)
137-
throws StripeException {
138-
return update(configuration, params, (RequestOptions) null);
136+
public Configuration update(Map<String, Object> params) throws StripeException {
137+
return update(params, (RequestOptions) null);
139138
}
140139

141140
/** Updates a configuration that describes the functionality of the customer portal. */
142-
public static Configuration update(
143-
String configuration, Map<String, Object> params, RequestOptions options)
141+
public Configuration update(Map<String, Object> params, RequestOptions options)
144142
throws StripeException {
145143
String url =
146144
String.format(
147145
"%s%s",
148146
Stripe.getApiBase(),
149147
String.format(
150-
"/v1/billing_portal/configurations/%s", ApiResource.urlEncodeId(configuration)));
148+
"/v1/billing_portal/configurations/%s", ApiResource.urlEncodeId(this.getId())));
151149
return ApiResource.request(
152150
ApiResource.RequestMethod.POST, url, params, Configuration.class, options);
153151
}
154152

155153
/** Updates a configuration that describes the functionality of the customer portal. */
156-
public static Configuration update(String configuration, ConfigurationUpdateParams params)
157-
throws StripeException {
158-
return update(configuration, params, (RequestOptions) null);
154+
public Configuration update(ConfigurationUpdateParams params) throws StripeException {
155+
return update(params, (RequestOptions) null);
159156
}
160157

161158
/** Updates a configuration that describes the functionality of the customer portal. */
162-
public static Configuration update(
163-
String configuration, ConfigurationUpdateParams params, RequestOptions options)
159+
public Configuration update(ConfigurationUpdateParams params, RequestOptions options)
164160
throws StripeException {
165161
String url =
166162
String.format(
167163
"%s%s",
168164
Stripe.getApiBase(),
169165
String.format(
170-
"/v1/billing_portal/configurations/%s", ApiResource.urlEncodeId(configuration)));
166+
"/v1/billing_portal/configurations/%s", ApiResource.urlEncodeId(this.getId())));
171167
return ApiResource.request(
172168
ApiResource.RequestMethod.POST, url, params, Configuration.class, options);
173169
}
@@ -338,6 +334,10 @@ public static class SubscriptionUpdate extends StripeObject {
338334
@Setter
339335
@EqualsAndHashCode(callSuper = false)
340336
public static class SubscriptionUpdateProduct extends StripeObject {
337+
/** The list of price IDs which, when subscribed to, a subscription can be updated. */
338+
@SerializedName("prices")
339+
List<String> prices;
340+
341341
/** The product ID. */
342342
@SerializedName("product")
343343
String product;

Diff for: src/main/java/com/stripe/param/billingportal/SessionCreateParams.java

+2-6
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,7 @@ public class SessionCreateParams extends ApiRequestParams {
5050

5151
/**
5252
* The default URL to redirect customers to when they click on the portal's link to return to your
53-
* website. This field is required if the configuration's <a
54-
* href="https://stripe.com/docs/api/customer_portal/configuration#portal_configuration_object-default_return_url">{@code
55-
* default_return_url}</a> is not set.
53+
* website.
5654
*/
5755
@SerializedName("return_url")
5856
String returnUrl;
@@ -184,9 +182,7 @@ public Builder setOnBehalfOf(String onBehalfOf) {
184182

185183
/**
186184
* The default URL to redirect customers to when they click on the portal's link to return to
187-
* your website. This field is required if the configuration's <a
188-
* href="https://stripe.com/docs/api/customer_portal/configuration#portal_configuration_object-default_return_url">{@code
189-
* default_return_url}</a> is not set.
185+
* your website.
190186
*/
191187
public Builder setReturnUrl(String returnUrl) {
192188
this.returnUrl = returnUrl;

0 commit comments

Comments
 (0)