Skip to content

Commit

Permalink
Merge pull request #1859 from stripe/latest-codegen-beta
Browse files Browse the repository at this point in the history
Update generated code for beta
  • Loading branch information
stripe-openapi[bot] authored Sep 5, 2024
2 parents 0f4d563 + 7fca437 commit 682fb42
Show file tree
Hide file tree
Showing 16 changed files with 4,614 additions and 4,394 deletions.
8,702 changes: 4,351 additions & 4,351 deletions CHANGELOG.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v1232
v1247
2 changes: 1 addition & 1 deletion src/main/java/com/stripe/ApiVersion.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@

final class ApiVersion {
public static final String CURRENT = "2024-06-20";
public static final String PREVIEW_CURRENT = "2024-08-21.preview-v2";
public static final String PREVIEW_CURRENT = "2024-09-05.preview-v2";
}
41 changes: 21 additions & 20 deletions src/main/java/com/stripe/model/Event.java
Original file line number Diff line number Diff line change
Expand Up @@ -115,26 +115,27 @@ public class Event extends ApiResource implements HasId {
* account.external_account.updated}, {@code account.updated}, {@code account_notice.created},
* {@code account_notice.updated}, {@code application_fee.created}, {@code
* application_fee.refund.updated}, {@code application_fee.refunded}, {@code balance.available},
* {@code billing.alert.triggered}, {@code billing_portal.configuration.created}, {@code
* billing_portal.configuration.updated}, {@code billing_portal.session.created}, {@code
* capability.updated}, {@code capital.financing_offer.accepted}, {@code
* capital.financing_offer.canceled}, {@code capital.financing_offer.created}, {@code
* capital.financing_offer.expired}, {@code capital.financing_offer.fully_repaid}, {@code
* capital.financing_offer.paid_out}, {@code capital.financing_offer.rejected}, {@code
* capital.financing_offer.replacement_created}, {@code capital.financing_transaction.created},
* {@code cash_balance.funds_available}, {@code charge.captured}, {@code charge.dispute.closed},
* {@code charge.dispute.created}, {@code charge.dispute.funds_reinstated}, {@code
* charge.dispute.funds_withdrawn}, {@code charge.dispute.updated}, {@code charge.expired}, {@code
* charge.failed}, {@code charge.pending}, {@code charge.refund.updated}, {@code charge.refunded},
* {@code charge.succeeded}, {@code charge.updated}, {@code
* checkout.session.async_payment_failed}, {@code checkout.session.async_payment_succeeded},
* {@code checkout.session.completed}, {@code checkout.session.expired}, {@code
* climate.order.canceled}, {@code climate.order.created}, {@code climate.order.delayed}, {@code
* climate.order.delivered}, {@code climate.order.product_substituted}, {@code
* climate.product.created}, {@code climate.product.pricing_updated}, {@code coupon.created},
* {@code coupon.deleted}, {@code coupon.updated}, {@code credit_note.created}, {@code
* credit_note.updated}, {@code credit_note.voided}, {@code customer.created}, {@code
* customer.deleted}, {@code customer.discount.created}, {@code customer.discount.deleted}, {@code
* {@code billing.alert.triggered}, {@code billing.meter_error_report.triggered}, {@code
* billing_portal.configuration.created}, {@code billing_portal.configuration.updated}, {@code
* billing_portal.session.created}, {@code capability.updated}, {@code
* capital.financing_offer.accepted}, {@code capital.financing_offer.canceled}, {@code
* capital.financing_offer.created}, {@code capital.financing_offer.expired}, {@code
* capital.financing_offer.fully_repaid}, {@code capital.financing_offer.paid_out}, {@code
* capital.financing_offer.rejected}, {@code capital.financing_offer.replacement_created}, {@code
* capital.financing_transaction.created}, {@code cash_balance.funds_available}, {@code
* charge.captured}, {@code charge.dispute.closed}, {@code charge.dispute.created}, {@code
* charge.dispute.funds_reinstated}, {@code charge.dispute.funds_withdrawn}, {@code
* charge.dispute.updated}, {@code charge.expired}, {@code charge.failed}, {@code charge.pending},
* {@code charge.refund.updated}, {@code charge.refunded}, {@code charge.succeeded}, {@code
* charge.updated}, {@code checkout.session.async_payment_failed}, {@code
* checkout.session.async_payment_succeeded}, {@code checkout.session.completed}, {@code
* checkout.session.expired}, {@code climate.order.canceled}, {@code climate.order.created},
* {@code climate.order.delayed}, {@code climate.order.delivered}, {@code
* climate.order.product_substituted}, {@code climate.product.created}, {@code
* climate.product.pricing_updated}, {@code coupon.created}, {@code coupon.deleted}, {@code
* coupon.updated}, {@code credit_note.created}, {@code credit_note.updated}, {@code
* credit_note.voided}, {@code customer.created}, {@code customer.deleted}, {@code
* customer.discount.created}, {@code customer.discount.deleted}, {@code
* customer.discount.updated}, {@code customer.source.created}, {@code customer.source.deleted},
* {@code customer.source.expiring}, {@code customer.source.updated}, {@code
* customer.subscription.collection_paused}, {@code customer.subscription.collection_resumed},
Expand Down
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 @@ -819,7 +819,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 @@ -843,7 +845,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 @@ -867,7 +871,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 @@ -891,7 +897,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 @@ -920,7 +928,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 @@ -944,7 +954,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 @@ -327,8 +327,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
156 changes: 156 additions & 0 deletions src/main/java/com/stripe/param/AccountSessionCreateParams.java
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,9 @@ public static class Components {
@SerializedName("payouts_list")
PayoutsList payoutsList;

@SerializedName("recipients")
Recipients recipients;

/** Configuration for the tax registrations embedded component. */
@SerializedName("tax_registrations")
TaxRegistrations taxRegistrations;
Expand Down Expand Up @@ -254,6 +257,7 @@ private Components(
Payments payments,
Payouts payouts,
PayoutsList payoutsList,
Recipients recipients,
TaxRegistrations taxRegistrations,
TaxSettings taxSettings) {
this.accountManagement = accountManagement;
Expand All @@ -277,6 +281,7 @@ private Components(
this.payments = payments;
this.payouts = payouts;
this.payoutsList = payoutsList;
this.recipients = recipients;
this.taxRegistrations = taxRegistrations;
this.taxSettings = taxSettings;
}
Expand Down Expand Up @@ -328,6 +333,8 @@ public static class Builder {

private PayoutsList payoutsList;

private Recipients recipients;

private TaxRegistrations taxRegistrations;

private TaxSettings taxSettings;
Expand Down Expand Up @@ -356,6 +363,7 @@ public AccountSessionCreateParams.Components build() {
this.payments,
this.payouts,
this.payoutsList,
this.recipients,
this.taxRegistrations,
this.taxSettings);
}
Expand Down Expand Up @@ -521,6 +529,11 @@ public Builder setPayoutsList(AccountSessionCreateParams.Components.PayoutsList
return this;
}

public Builder setRecipients(AccountSessionCreateParams.Components.Recipients recipients) {
this.recipients = recipients;
return this;
}

/** Configuration for the tax registrations embedded component. */
public Builder setTaxRegistrations(
AccountSessionCreateParams.Components.TaxRegistrations taxRegistrations) {
Expand Down Expand Up @@ -4024,6 +4037,149 @@ public Builder putAllExtraParam(Map<String, Object> map) {
}
}

@Getter
public static class Recipients {
/** <strong>Required.</strong> Whether the embedded component is enabled. */
@SerializedName("enabled")
Boolean enabled;

/**
* Map of extra parameters for custom features not available in this client library. The
* content in this map is not serialized under this field's {@code @SerializedName} value.
* Instead, each key/value pair is serialized as if the key is a root-level field (serialized)
* name in this param object. Effectively, this map is flattened to its parent instance.
*/
@SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
Map<String, Object> extraParams;

/** The list of features enabled in the embedded component. */
@SerializedName("features")
Features features;

private Recipients(Boolean enabled, Map<String, Object> extraParams, Features features) {
this.enabled = enabled;
this.extraParams = extraParams;
this.features = features;
}

public static Builder builder() {
return new Builder();
}

public static class Builder {
private Boolean enabled;

private Map<String, Object> extraParams;

private Features features;

/** Finalize and obtain parameter instance from this builder. */
public AccountSessionCreateParams.Components.Recipients build() {
return new AccountSessionCreateParams.Components.Recipients(
this.enabled, this.extraParams, this.features);
}

/** <strong>Required.</strong> Whether the embedded component is enabled. */
public Builder setEnabled(Boolean enabled) {
this.enabled = enabled;
return this;
}

/**
* Add a key/value pair to `extraParams` map. A map is initialized for the first
* `put/putAll` call, and subsequent calls add additional key/value pairs to the original
* map. See {@link AccountSessionCreateParams.Components.Recipients#extraParams} for the
* field documentation.
*/
public Builder putExtraParam(String key, Object value) {
if (this.extraParams == null) {
this.extraParams = new HashMap<>();
}
this.extraParams.put(key, value);
return this;
}

/**
* Add all map key/value pairs to `extraParams` map. A map is initialized for the first
* `put/putAll` call, and subsequent calls add additional key/value pairs to the original
* map. See {@link AccountSessionCreateParams.Components.Recipients#extraParams} for the
* field documentation.
*/
public Builder putAllExtraParam(Map<String, Object> map) {
if (this.extraParams == null) {
this.extraParams = new HashMap<>();
}
this.extraParams.putAll(map);
return this;
}

/** The list of features enabled in the embedded component. */
public Builder setFeatures(
AccountSessionCreateParams.Components.Recipients.Features features) {
this.features = features;
return this;
}
}

@Getter
public static class Features {
/**
* Map of extra parameters for custom features not available in this client library. The
* content in this map is not serialized under this field's {@code @SerializedName} value.
* Instead, each key/value pair is serialized as if the key is a root-level field
* (serialized) name in this param object. Effectively, this map is flattened to its parent
* instance.
*/
@SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
Map<String, Object> extraParams;

private Features(Map<String, Object> extraParams) {
this.extraParams = extraParams;
}

public static Builder builder() {
return new Builder();
}

public static class Builder {
private Map<String, Object> extraParams;

/** Finalize and obtain parameter instance from this builder. */
public AccountSessionCreateParams.Components.Recipients.Features build() {
return new AccountSessionCreateParams.Components.Recipients.Features(this.extraParams);
}

/**
* Add a key/value pair to `extraParams` map. A map is initialized for the first
* `put/putAll` call, and subsequent calls add additional key/value pairs to the original
* map. See {@link AccountSessionCreateParams.Components.Recipients.Features#extraParams}
* for the field documentation.
*/
public Builder putExtraParam(String key, Object value) {
if (this.extraParams == null) {
this.extraParams = new HashMap<>();
}
this.extraParams.put(key, value);
return this;
}

/**
* Add all map key/value pairs to `extraParams` map. A map is initialized for the first
* `put/putAll` call, and subsequent calls add additional key/value pairs to the original
* map. See {@link AccountSessionCreateParams.Components.Recipients.Features#extraParams}
* for the field documentation.
*/
public Builder putAllExtraParam(Map<String, Object> map) {
if (this.extraParams == null) {
this.extraParams = new HashMap<>();
}
this.extraParams.putAll(map);
return this;
}
}
}
}

@Getter
public static class TaxRegistrations {
/** <strong>Required.</strong> Whether the embedded component is enabled. */
Expand Down
3 changes: 3 additions & 0 deletions src/main/java/com/stripe/param/PaymentLinkCreateParams.java
Original file line number Diff line number Diff line change
Expand Up @@ -5703,6 +5703,9 @@ public enum PaymentMethodType implements ApiRequestParams.EnumParam {
@SerializedName("link")
LINK("link"),

@SerializedName("mb_way")
MB_WAY("mb_way"),

@SerializedName("mobilepay")
MOBILEPAY("mobilepay"),

Expand Down
3 changes: 3 additions & 0 deletions src/main/java/com/stripe/param/PaymentLinkUpdateParams.java
Original file line number Diff line number Diff line change
Expand Up @@ -5152,6 +5152,9 @@ public enum PaymentMethodType implements ApiRequestParams.EnumParam {
@SerializedName("link")
LINK("link"),

@SerializedName("mb_way")
MB_WAY("mb_way"),

@SerializedName("mobilepay")
MOBILEPAY("mobilepay"),

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -639,6 +639,9 @@ public enum EnabledEvent implements ApiRequestParams.EnumParam {
@SerializedName("billing.alert.triggered")
BILLING__ALERT__TRIGGERED("billing.alert.triggered"),

@SerializedName("billing.meter_error_report.triggered")
BILLING__METER_ERROR_REPORT__TRIGGERED("billing.meter_error_report.triggered"),

@SerializedName("billing_portal.configuration.created")
BILLING_PORTAL__CONFIGURATION__CREATED("billing_portal.configuration.created"),

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -303,6 +303,9 @@ public enum EnabledEvent implements ApiRequestParams.EnumParam {
@SerializedName("billing.alert.triggered")
BILLING__ALERT__TRIGGERED("billing.alert.triggered"),

@SerializedName("billing.meter_error_report.triggered")
BILLING__METER_ERROR_REPORT__TRIGGERED("billing.meter_error_report.triggered"),

@SerializedName("billing_portal.configuration.created")
BILLING_PORTAL__CONFIGURATION__CREATED("billing_portal.configuration.created"),

Expand Down
Loading

0 comments on commit 682fb42

Please sign in to comment.