Skip to content

Commit

Permalink
Update generated code (#1850)
Browse files Browse the repository at this point in the history
* Update generated code for v1232

* Update generated code for v1233

* Update generated code for v1235

* Update generated code for v1238

* Update generated code for v1238

* Update generated code for v1243

* Update generated code for v1244

* Update generated code for v1245

* Update generated code for v1246

---------

Co-authored-by: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com>
  • Loading branch information
stripe-openapi[bot] authored Sep 5, 2024
1 parent c8b6911 commit d03cf5d
Show file tree
Hide file tree
Showing 12 changed files with 77 additions and 26 deletions.
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v1230
v1246
24 changes: 18 additions & 6 deletions src/main/java/com/stripe/model/PaymentIntent.java
Original file line number Diff line number Diff line change
Expand Up @@ -803,7 +803,9 @@ public PaymentIntent capture(PaymentIntentCaptureParams params, RequestOptions o
* attempts must be initiated using a secret key. If any actions are required for the payment, the
* PaymentIntent will return to the {@code requires_confirmation} state after those actions are
* completed. Your server needs to then explicitly re-confirm the PaymentIntent to initiate the
* next payment attempt.
* next payment attempt. There is a variable upper limit on how many times a PaymentIntent can be
* confirmed. After this limit is reached, any further calls to this endpoint will transition the
* PaymentIntent to the {@code canceled} state.
*/
public PaymentIntent confirm() throws StripeException {
return confirm((Map<String, Object>) null, (RequestOptions) null);
Expand All @@ -827,7 +829,9 @@ public PaymentIntent confirm() throws StripeException {
* attempts must be initiated using a secret key. If any actions are required for the payment, the
* PaymentIntent will return to the {@code requires_confirmation} state after those actions are
* completed. Your server needs to then explicitly re-confirm the PaymentIntent to initiate the
* next payment attempt.
* next payment attempt. There is a variable upper limit on how many times a PaymentIntent can be
* confirmed. After this limit is reached, any further calls to this endpoint will transition the
* PaymentIntent to the {@code canceled} state.
*/
public PaymentIntent confirm(RequestOptions options) throws StripeException {
return confirm((Map<String, Object>) null, options);
Expand All @@ -851,7 +855,9 @@ public PaymentIntent confirm(RequestOptions options) throws StripeException {
* attempts must be initiated using a secret key. If any actions are required for the payment, the
* PaymentIntent will return to the {@code requires_confirmation} state after those actions are
* completed. Your server needs to then explicitly re-confirm the PaymentIntent to initiate the
* next payment attempt.
* next payment attempt. There is a variable upper limit on how many times a PaymentIntent can be
* confirmed. After this limit is reached, any further calls to this endpoint will transition the
* PaymentIntent to the {@code canceled} state.
*/
public PaymentIntent confirm(Map<String, Object> params) throws StripeException {
return confirm(params, (RequestOptions) null);
Expand All @@ -875,7 +881,9 @@ public PaymentIntent confirm(Map<String, Object> params) throws StripeException
* attempts must be initiated using a secret key. If any actions are required for the payment, the
* PaymentIntent will return to the {@code requires_confirmation} state after those actions are
* completed. Your server needs to then explicitly re-confirm the PaymentIntent to initiate the
* next payment attempt.
* next payment attempt. There is a variable upper limit on how many times a PaymentIntent can be
* confirmed. After this limit is reached, any further calls to this endpoint will transition the
* PaymentIntent to the {@code canceled} state.
*/
public PaymentIntent confirm(Map<String, Object> params, RequestOptions options)
throws StripeException {
Expand Down Expand Up @@ -904,7 +912,9 @@ public PaymentIntent confirm(Map<String, Object> params, RequestOptions options)
* attempts must be initiated using a secret key. If any actions are required for the payment, the
* PaymentIntent will return to the {@code requires_confirmation} state after those actions are
* completed. Your server needs to then explicitly re-confirm the PaymentIntent to initiate the
* next payment attempt.
* next payment attempt. There is a variable upper limit on how many times a PaymentIntent can be
* confirmed. After this limit is reached, any further calls to this endpoint will transition the
* PaymentIntent to the {@code canceled} state.
*/
public PaymentIntent confirm(PaymentIntentConfirmParams params) throws StripeException {
return confirm(params, (RequestOptions) null);
Expand All @@ -928,7 +938,9 @@ public PaymentIntent confirm(PaymentIntentConfirmParams params) throws StripeExc
* attempts must be initiated using a secret key. If any actions are required for the payment, the
* PaymentIntent will return to the {@code requires_confirmation} state after those actions are
* completed. Your server needs to then explicitly re-confirm the PaymentIntent to initiate the
* next payment attempt.
* next payment attempt. There is a variable upper limit on how many times a PaymentIntent can be
* confirmed. After this limit is reached, any further calls to this endpoint will transition the
* PaymentIntent to the {@code canceled} state.
*/
public PaymentIntent confirm(PaymentIntentConfirmParams params, RequestOptions options)
throws StripeException {
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/com/stripe/model/Transfer.java
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,8 @@ public class Transfer extends ApiResource
Boolean reversed;

/**
* ID of the charge or payment that was used to fund the transfer. If null, the transfer was
* funded from the available balance.
* ID of the charge that was used to fund the transfer. If null, the transfer was funded from the
* available balance.
*/
@SerializedName("source_transaction")
@Getter(lombok.AccessLevel.NONE)
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/com/stripe/model/checkout/Session.java
Original file line number Diff line number Diff line change
Expand Up @@ -309,8 +309,8 @@ public class Session extends ApiResource implements HasId, MetadataStore<Session

/**
* This parameter applies to {@code ui_mode: embedded}. Learn more about the <a
* href="https://stripe.com/docs/payments/checkout/custom-redirect-behavior">redirect behavior</a>
* of embedded sessions. Defaults to {@code always}.
* href="https://stripe.com/docs/payments/checkout/custom-success-page?payment-ui=embedded-form">redirect
* behavior</a> of embedded sessions. Defaults to {@code always}.
*
* <p>One of {@code always}, {@code if_required}, or {@code never}.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ public class InvoiceCreatePreviewParams extends ApiRequestParams {
@SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
Map<String, Object> extraParams;

/** List of invoice items to add or update in the upcoming invoice preview. */
/** List of invoice items to add or update in the upcoming invoice preview (up to 250). */
@SerializedName("invoice_items")
List<InvoiceCreatePreviewParams.InvoiceItem> invoiceItems;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ public class InvoiceUpcomingLinesListParams extends ApiRequestParams {
@SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
Map<String, Object> extraParams;

/** List of invoice items to add or update in the upcoming invoice preview. */
/** List of invoice items to add or update in the upcoming invoice preview (up to 250). */
@SerializedName("invoice_items")
List<InvoiceUpcomingLinesListParams.InvoiceItem> invoiceItems;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ public class InvoiceUpcomingLinesParams extends ApiRequestParams {
@SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
Map<String, Object> extraParams;

/** List of invoice items to add or update in the upcoming invoice preview. */
/** List of invoice items to add or update in the upcoming invoice preview (up to 250). */
@SerializedName("invoice_items")
List<InvoiceUpcomingLinesParams.InvoiceItem> invoiceItems;

Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/stripe/param/InvoiceUpcomingParams.java
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ public class InvoiceUpcomingParams extends ApiRequestParams {
@SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
Map<String, Object> extraParams;

/** List of invoice items to add or update in the upcoming invoice preview. */
/** List of invoice items to add or update in the upcoming invoice preview (up to 250). */
@SerializedName("invoice_items")
List<InvoiceUpcomingParams.InvoiceItem> invoiceItems;

Expand Down
35 changes: 33 additions & 2 deletions src/main/java/com/stripe/param/billing/AlertCreateParams.java
Original file line number Diff line number Diff line change
Expand Up @@ -176,9 +176,23 @@ public static class Filter {
@SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
Map<String, Object> extraParams;

private Filter(String customer, Map<String, Object> extraParams) {
/** Limit the scope of this rated usage alert to this subscription. */
@SerializedName("subscription")
String subscription;

/** Limit the scope of this rated usage alert to this subscription item. */
@SerializedName("subscription_item")
String subscriptionItem;

private Filter(
String customer,
Map<String, Object> extraParams,
String subscription,
String subscriptionItem) {
this.customer = customer;
this.extraParams = extraParams;
this.subscription = subscription;
this.subscriptionItem = subscriptionItem;
}

public static Builder builder() {
Expand All @@ -190,9 +204,14 @@ public static class Builder {

private Map<String, Object> extraParams;

private String subscription;

private String subscriptionItem;

/** Finalize and obtain parameter instance from this builder. */
public AlertCreateParams.Filter build() {
return new AlertCreateParams.Filter(this.customer, this.extraParams);
return new AlertCreateParams.Filter(
this.customer, this.extraParams, this.subscription, this.subscriptionItem);
}

/** Limit the scope to this alert only to this customer. */
Expand Down Expand Up @@ -226,6 +245,18 @@ public Builder putAllExtraParam(Map<String, Object> map) {
this.extraParams.putAll(map);
return this;
}

/** Limit the scope of this rated usage alert to this subscription. */
public Builder setSubscription(String subscription) {
this.subscription = subscription;
return this;
}

/** Limit the scope of this rated usage alert to this subscription item. */
public Builder setSubscriptionItem(String subscriptionItem) {
this.subscriptionItem = subscriptionItem;
return this;
}
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -270,8 +270,8 @@ public class SessionCreateParams extends ApiRequestParams {

/**
* This parameter applies to {@code ui_mode: embedded}. Learn more about the <a
* href="https://stripe.com/docs/payments/checkout/custom-redirect-behavior">redirect behavior</a>
* of embedded sessions. Defaults to {@code always}.
* href="https://stripe.com/docs/payments/checkout/custom-success-page?payment-ui=embedded-form">redirect
* behavior</a> of embedded sessions. Defaults to {@code always}.
*/
@SerializedName("redirect_on_completion")
RedirectOnCompletion redirectOnCompletion;
Expand Down Expand Up @@ -980,7 +980,7 @@ public Builder setPhoneNumberCollection(

/**
* This parameter applies to {@code ui_mode: embedded}. Learn more about the <a
* href="https://stripe.com/docs/payments/checkout/custom-redirect-behavior">redirect
* href="https://stripe.com/docs/payments/checkout/custom-success-page?payment-ui=embedded-form">redirect
* behavior</a> of embedded sessions. Defaults to {@code always}.
*/
public Builder setRedirectOnCompletion(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

@Getter
public class ReaderProcessSetupIntentParams extends ApiRequestParams {
/** <strong>Required.</strong> Customer Consent Collected */
/** Customer Consent Collected. */
@SerializedName("customer_consent_collected")
Boolean customerConsentCollected;

Expand Down Expand Up @@ -74,7 +74,7 @@ public ReaderProcessSetupIntentParams build() {
this.setupIntent);
}

/** <strong>Required.</strong> Customer Consent Collected */
/** Customer Consent Collected. */
public Builder setCustomerConsentCollected(Boolean customerConsentCollected) {
this.customerConsentCollected = customerConsentCollected;
return this;
Expand Down
16 changes: 12 additions & 4 deletions src/main/java/com/stripe/service/PaymentIntentService.java
Original file line number Diff line number Diff line change
Expand Up @@ -442,7 +442,9 @@ public PaymentIntent capture(
* attempts must be initiated using a secret key. If any actions are required for the payment, the
* PaymentIntent will return to the {@code requires_confirmation} state after those actions are
* completed. Your server needs to then explicitly re-confirm the PaymentIntent to initiate the
* next payment attempt.
* next payment attempt. There is a variable upper limit on how many times a PaymentIntent can be
* confirmed. After this limit is reached, any further calls to this endpoint will transition the
* PaymentIntent to the {@code canceled} state.
*/
public PaymentIntent confirm(String intent, PaymentIntentConfirmParams params)
throws StripeException {
Expand All @@ -466,7 +468,9 @@ public PaymentIntent confirm(String intent, PaymentIntentConfirmParams params)
* attempts must be initiated using a secret key. If any actions are required for the payment, the
* PaymentIntent will return to the {@code requires_confirmation} state after those actions are
* completed. Your server needs to then explicitly re-confirm the PaymentIntent to initiate the
* next payment attempt.
* next payment attempt. There is a variable upper limit on how many times a PaymentIntent can be
* confirmed. After this limit is reached, any further calls to this endpoint will transition the
* PaymentIntent to the {@code canceled} state.
*/
public PaymentIntent confirm(String intent, RequestOptions options) throws StripeException {
return confirm(intent, (PaymentIntentConfirmParams) null, options);
Expand All @@ -489,7 +493,9 @@ public PaymentIntent confirm(String intent, RequestOptions options) throws Strip
* attempts must be initiated using a secret key. If any actions are required for the payment, the
* PaymentIntent will return to the {@code requires_confirmation} state after those actions are
* completed. Your server needs to then explicitly re-confirm the PaymentIntent to initiate the
* next payment attempt.
* next payment attempt. There is a variable upper limit on how many times a PaymentIntent can be
* confirmed. After this limit is reached, any further calls to this endpoint will transition the
* PaymentIntent to the {@code canceled} state.
*/
public PaymentIntent confirm(String intent) throws StripeException {
return confirm(intent, (PaymentIntentConfirmParams) null, (RequestOptions) null);
Expand All @@ -512,7 +518,9 @@ public PaymentIntent confirm(String intent) throws StripeException {
* attempts must be initiated using a secret key. If any actions are required for the payment, the
* PaymentIntent will return to the {@code requires_confirmation} state after those actions are
* completed. Your server needs to then explicitly re-confirm the PaymentIntent to initiate the
* next payment attempt.
* next payment attempt. There is a variable upper limit on how many times a PaymentIntent can be
* confirmed. After this limit is reached, any further calls to this endpoint will transition the
* PaymentIntent to the {@code canceled} state.
*/
public PaymentIntent confirm(
String intent, PaymentIntentConfirmParams params, RequestOptions options)
Expand Down

0 comments on commit d03cf5d

Please sign in to comment.