From e027a8c6a4eb84b411dafa7227fbfbdaef1855a0 Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Wed, 14 Jan 2026 20:42:29 +0000 Subject: [PATCH 1/3] Update generated code for v2151 and --- CODEGEN_VERSION | 2 +- OPENAPI_VERSION | 2 +- .../StripeEventNotificationHandler.java | 7 +++ ...cludingFutureRequirementsUpdatedEvent.java | 22 ++++++++ ...eRequirementsUpdatedEventNotification.java | 28 +++++++++++ .../exception/BlockedByStripeException.java | 2 +- .../com/stripe/exception/StripeException.java | 3 ++ .../stripe/model/v2/EventDataClassLookup.java | 3 ++ .../v2/EventNotificationClassLookup.java | 3 ++ .../model/v2/core/vault/GbBankAccount.java | 23 +++++++++ .../model/v2/core/vault/UsBankAccount.java | 23 +++++++++ .../v2/moneymanagement/FinancialAddress.java | 42 ++++++++++++++++ .../v2/moneymanagement/PayoutMethod.java | 30 +++++++++++ .../core/vault/UsBankAccountUpdateParams.java | 6 +-- .../service/v2/core/AccountLinkService.java | 6 ++- .../service/v2/core/AccountService.java | 50 +++++++++++-------- .../service/v2/core/AccountTokenService.java | 15 +++--- .../v2/core/accounts/PersonService.java | 40 +++++++++------ .../v2/core/accounts/PersonTokenService.java | 14 +++--- .../stripe/functional/GeneratedExamples.java | 27 +++++++++- 20 files changed, 291 insertions(+), 57 deletions(-) create mode 100644 src/main/java/com/stripe/events/V2CoreAccountIncludingFutureRequirementsUpdatedEvent.java create mode 100644 src/main/java/com/stripe/events/V2CoreAccountIncludingFutureRequirementsUpdatedEventNotification.java diff --git a/CODEGEN_VERSION b/CODEGEN_VERSION index fc0689d976d..c63a3302e6b 100644 --- a/CODEGEN_VERSION +++ b/CODEGEN_VERSION @@ -1 +1 @@ -5abe0e44caedb3474ee672265284096ec89e0fa3 +61e410d24d6de541c86c48b265b7647c164457ee \ No newline at end of file diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 1bfc0268bdf..5e8e56a7f85 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v2150 \ No newline at end of file +v2151 \ No newline at end of file diff --git a/src/main/java/com/stripe/StripeEventNotificationHandler.java b/src/main/java/com/stripe/StripeEventNotificationHandler.java index ac2d2706c08..58de6e7e026 100644 --- a/src/main/java/com/stripe/StripeEventNotificationHandler.java +++ b/src/main/java/com/stripe/StripeEventNotificationHandler.java @@ -17,6 +17,7 @@ import com.stripe.events.V2CoreAccountIncludingConfigurationStorerCapabilityStatusUpdatedEventNotification; import com.stripe.events.V2CoreAccountIncludingConfigurationStorerUpdatedEventNotification; import com.stripe.events.V2CoreAccountIncludingDefaultsUpdatedEventNotification; +import com.stripe.events.V2CoreAccountIncludingFutureRequirementsUpdatedEventNotification; import com.stripe.events.V2CoreAccountIncludingIdentityUpdatedEventNotification; import com.stripe.events.V2CoreAccountIncludingRequirementsUpdatedEventNotification; import com.stripe.events.V2CoreAccountLinkReturnedEventNotification; @@ -276,6 +277,12 @@ public StripeEventNotificationHandler onV2CoreAccountIncludingDefaultsUpdated( return this; } + public StripeEventNotificationHandler onV2CoreAccountIncludingFutureRequirementsUpdated( + Callback callback) { + this.register("v2.core.account[future_requirements].updated", callback); + return this; + } + public StripeEventNotificationHandler onV2CoreAccountIncludingIdentityUpdated( Callback callback) { this.register("v2.core.account[identity].updated", callback); diff --git a/src/main/java/com/stripe/events/V2CoreAccountIncludingFutureRequirementsUpdatedEvent.java b/src/main/java/com/stripe/events/V2CoreAccountIncludingFutureRequirementsUpdatedEvent.java new file mode 100644 index 00000000000..496147e2216 --- /dev/null +++ b/src/main/java/com/stripe/events/V2CoreAccountIncludingFutureRequirementsUpdatedEvent.java @@ -0,0 +1,22 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.core.Account; +import com.stripe.model.v2.core.Event; +import com.stripe.model.v2.core.Event.RelatedObject; +import lombok.Getter; + +@Getter +public final class V2CoreAccountIncludingFutureRequirementsUpdatedEvent extends Event { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public Account fetchRelatedObject() throws StripeException { + return (Account) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V2CoreAccountIncludingFutureRequirementsUpdatedEventNotification.java b/src/main/java/com/stripe/events/V2CoreAccountIncludingFutureRequirementsUpdatedEventNotification.java new file mode 100644 index 00000000000..31c75530fa6 --- /dev/null +++ b/src/main/java/com/stripe/events/V2CoreAccountIncludingFutureRequirementsUpdatedEventNotification.java @@ -0,0 +1,28 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.core.Account; +import com.stripe.model.v2.core.Event.RelatedObject; +import com.stripe.model.v2.core.EventNotification; +import lombok.Getter; + +@Getter +public final class V2CoreAccountIncludingFutureRequirementsUpdatedEventNotification + extends EventNotification { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public Account fetchRelatedObject() throws StripeException { + return (Account) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V2CoreAccountIncludingFutureRequirementsUpdatedEvent fetchEvent() throws StripeException { + return (V2CoreAccountIncludingFutureRequirementsUpdatedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/exception/BlockedByStripeException.java b/src/main/java/com/stripe/exception/BlockedByStripeException.java index 9cbca500927..02181d693c8 100644 --- a/src/main/java/com/stripe/exception/BlockedByStripeException.java +++ b/src/main/java/com/stripe/exception/BlockedByStripeException.java @@ -6,7 +6,7 @@ import com.stripe.model.StripeObject; import com.stripe.net.StripeResponseGetter; -/** Returned when the bank account cannot be added due to previous suspicious activity. */ +/** Returned when the payout method cannot be used due to suspicious activity. */ public final class BlockedByStripeException extends ApiException { private static final long serialVersionUID = 2L; diff --git a/src/main/java/com/stripe/exception/StripeException.java b/src/main/java/com/stripe/exception/StripeException.java index 711895cb5eb..b2cb5f2ba44 100644 --- a/src/main/java/com/stripe/exception/StripeException.java +++ b/src/main/java/com/stripe/exception/StripeException.java @@ -149,6 +149,9 @@ public static StripeException parseV2Exception( case "quota_exceeded": return com.stripe.exception.QuotaExceededException.parse( body, statusCode, requestId, responseGetter); + case "rate_limit": + return com.stripe.exception.RateLimitException.parse( + body, statusCode, requestId, responseGetter); case "recipient_not_notifiable": return com.stripe.exception.RecipientNotNotifiableException.parse( body, statusCode, requestId, responseGetter); diff --git a/src/main/java/com/stripe/model/v2/EventDataClassLookup.java b/src/main/java/com/stripe/model/v2/EventDataClassLookup.java index 96e332b98f9..54d186d5969 100644 --- a/src/main/java/com/stripe/model/v2/EventDataClassLookup.java +++ b/src/main/java/com/stripe/model/v2/EventDataClassLookup.java @@ -140,6 +140,9 @@ public final class EventDataClassLookup { eventClassLookup.put( "v2.core.account[defaults].updated", com.stripe.events.V2CoreAccountIncludingDefaultsUpdatedEvent.class); + eventClassLookup.put( + "v2.core.account[future_requirements].updated", + com.stripe.events.V2CoreAccountIncludingFutureRequirementsUpdatedEvent.class); eventClassLookup.put( "v2.core.account[identity].updated", com.stripe.events.V2CoreAccountIncludingIdentityUpdatedEvent.class); diff --git a/src/main/java/com/stripe/model/v2/EventNotificationClassLookup.java b/src/main/java/com/stripe/model/v2/EventNotificationClassLookup.java index 65801bfa2e2..88a228d73b3 100644 --- a/src/main/java/com/stripe/model/v2/EventNotificationClassLookup.java +++ b/src/main/java/com/stripe/model/v2/EventNotificationClassLookup.java @@ -66,6 +66,9 @@ public final class EventNotificationClassLookup { eventClassLookup.put( "v2.core.account[defaults].updated", com.stripe.events.V2CoreAccountIncludingDefaultsUpdatedEventNotification.class); + eventClassLookup.put( + "v2.core.account[future_requirements].updated", + com.stripe.events.V2CoreAccountIncludingFutureRequirementsUpdatedEventNotification.class); eventClassLookup.put( "v2.core.account[identity].updated", com.stripe.events.V2CoreAccountIncludingIdentityUpdatedEventNotification.class); diff --git a/src/main/java/com/stripe/model/v2/core/vault/GbBankAccount.java b/src/main/java/com/stripe/model/v2/core/vault/GbBankAccount.java index 766317d0182..d1ea223c682 100644 --- a/src/main/java/com/stripe/model/v2/core/vault/GbBankAccount.java +++ b/src/main/java/com/stripe/model/v2/core/vault/GbBankAccount.java @@ -14,6 +14,10 @@ @Setter @EqualsAndHashCode(callSuper = false) public class GbBankAccount extends StripeObject implements HasId { + /** The alternative reference for this payout method, if it's a projected payout method. */ + @SerializedName("alternative_reference") + AlternativeReference alternativeReference; + /** * Whether this bank account object was archived. Bank account objects can be archived through the * /archive API, and they will not be automatically archived by Stripe. Archived bank account @@ -76,6 +80,25 @@ public class GbBankAccount extends StripeObject implements HasId { @SerializedName("sort_code") String sortCode; + /** The alternative reference for this payout method, if it's a projected payout method. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class AlternativeReference extends StripeObject implements HasId { + /** The ID of the alternative resource being referenced. */ + @Getter(onMethod_ = {@Override}) + @SerializedName("id") + String id; + + /** + * The type of the alternative reference (e.g., external_account for V1 external accounts). + * + *

One of {@code external_account}, or {@code payment_method}. + */ + @SerializedName("type") + String type; + } + /** * Information around the status of Confirmation of Payee matching done on this bank account. * Confirmation of Payee is a name matching service that must be done before making diff --git a/src/main/java/com/stripe/model/v2/core/vault/UsBankAccount.java b/src/main/java/com/stripe/model/v2/core/vault/UsBankAccount.java index b0d0f4d2052..a4b359adc37 100644 --- a/src/main/java/com/stripe/model/v2/core/vault/UsBankAccount.java +++ b/src/main/java/com/stripe/model/v2/core/vault/UsBankAccount.java @@ -17,6 +17,10 @@ @Setter @EqualsAndHashCode(callSuper = false) public class UsBankAccount extends StripeObject implements HasId { + /** The alternative reference for this payout method, if it's a projected payout method. */ + @SerializedName("alternative_reference") + AlternativeReference alternativeReference; + /** Whether this USBankAccount object was archived. */ @SerializedName("archived") Boolean archived; @@ -81,6 +85,25 @@ public class UsBankAccount extends StripeObject implements HasId { @SerializedName("verification") Verification verification; + /** The alternative reference for this payout method, if it's a projected payout method. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class AlternativeReference extends StripeObject implements HasId { + /** The ID of the alternative resource being referenced. */ + @Getter(onMethod_ = {@Override}) + @SerializedName("id") + String id; + + /** + * The type of the alternative reference (e.g., external_account for V1 external accounts). + * + *

One of {@code external_account}, or {@code payment_method}. + */ + @SerializedName("type") + String type; + } + /** The bank account verification details. */ @Getter @Setter diff --git a/src/main/java/com/stripe/model/v2/moneymanagement/FinancialAddress.java b/src/main/java/com/stripe/model/v2/moneymanagement/FinancialAddress.java index ee321c66721..ad9b6e44d26 100644 --- a/src/main/java/com/stripe/model/v2/moneymanagement/FinancialAddress.java +++ b/src/main/java/com/stripe/model/v2/moneymanagement/FinancialAddress.java @@ -185,6 +185,14 @@ public static class SepaBankAccount extends StripeObject { @Setter @EqualsAndHashCode(callSuper = false) public static class UsBankAccount extends StripeObject { + /** The address of the account holder. */ + @SerializedName("account_holder_address") + AccountHolderAddress accountHolderAddress; + + /** The name of the account holder. */ + @SerializedName("account_holder_name") + String accountHolderName; + /** The account number of the US Bank Account. */ @SerializedName("account_number") String accountNumber; @@ -208,6 +216,40 @@ public static class UsBankAccount extends StripeObject { /** The swift code of the bank or financial institution. */ @SerializedName("swift_code") String swiftCode; + + /** The address of the account holder. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class AccountHolderAddress extends StripeObject { + /** The city of the address. */ + @SerializedName("city") + String city; + + /** The country of the address. */ + @SerializedName("country") + String country; + + /** The first line of the address. */ + @SerializedName("line1") + String line1; + + /** The second line of the address. */ + @SerializedName("line2") + String line2; + + /** The postal / zip code of the address. */ + @SerializedName("postal_code") + String postalCode; + + /** The state of the address. */ + @SerializedName("state") + String state; + + /** The town of the address. */ + @SerializedName("town") + String town; + } } } } diff --git a/src/main/java/com/stripe/model/v2/moneymanagement/PayoutMethod.java b/src/main/java/com/stripe/model/v2/moneymanagement/PayoutMethod.java index 0eae52ea66c..43acadb3ab5 100644 --- a/src/main/java/com/stripe/model/v2/moneymanagement/PayoutMethod.java +++ b/src/main/java/com/stripe/model/v2/moneymanagement/PayoutMethod.java @@ -15,6 +15,10 @@ @Setter @EqualsAndHashCode(callSuper = false) public class PayoutMethod extends StripeObject implements HasId { + /** The alternative reference for this payout method, if it's a projected payout method. */ + @SerializedName("alternative_reference") + AlternativeReference alternativeReference; + /** A set of available payout speeds for this payout method. */ @SerializedName("available_payout_speeds") List availablePayoutSpeeds; @@ -71,6 +75,25 @@ public class PayoutMethod extends StripeObject implements HasId { @SerializedName("usage_status") UsageStatus usageStatus; + /** The alternative reference for this payout method, if it's a projected payout method. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class AlternativeReference extends StripeObject implements HasId { + /** The ID of the alternative resource being referenced. */ + @Getter(onMethod_ = {@Override}) + @SerializedName("id") + String id; + + /** + * The type of the alternative reference (e.g., external_account for V1 external accounts). + * + *

One of {@code external_account}, or {@code payment_method}. + */ + @SerializedName("type") + String type; + } + /** The PayoutMethodBankAccount object details. */ @Getter @Setter @@ -147,6 +170,13 @@ public static class Card extends StripeObject { @SerializedName("exp_year") String expYear; + /** + * Uniquely identifies this particular card number. You can use this attribute to check whether + * two recipients who’ve signed up with you are using the same card number, for example. + */ + @SerializedName("fingerprint") + String fingerprint; + /** The last 4 digits of the card number. */ @SerializedName("last4") String last4; diff --git a/src/main/java/com/stripe/param/v2/core/vault/UsBankAccountUpdateParams.java b/src/main/java/com/stripe/param/v2/core/vault/UsBankAccountUpdateParams.java index ed3284594ae..af96496ca33 100644 --- a/src/main/java/com/stripe/param/v2/core/vault/UsBankAccountUpdateParams.java +++ b/src/main/java/com/stripe/param/v2/core/vault/UsBankAccountUpdateParams.java @@ -22,7 +22,7 @@ public class UsBankAccountUpdateParams extends ApiRequestParams { Map extraParams; /** - * The bank account's fedwire routing number can be provided for update it was were empty + * The bank account's Fedwire routing number can be provided for update if it was empty * previously. */ @SerializedName("fedwire_routing_number") @@ -85,7 +85,7 @@ public Builder putAllExtraParam(Map map) { } /** - * The bank account's fedwire routing number can be provided for update it was were empty + * The bank account's Fedwire routing number can be provided for update if it was empty * previously. */ public Builder setFedwireRoutingNumber(String fedwireRoutingNumber) { @@ -94,7 +94,7 @@ public Builder setFedwireRoutingNumber(String fedwireRoutingNumber) { } /** - * The bank account's fedwire routing number can be provided for update it was were empty + * The bank account's Fedwire routing number can be provided for update if it was empty * previously. */ public Builder setFedwireRoutingNumber(EmptyParam fedwireRoutingNumber) { diff --git a/src/main/java/com/stripe/service/v2/core/AccountLinkService.java b/src/main/java/com/stripe/service/v2/core/AccountLinkService.java index a47c0c59b5d..7aa70806477 100644 --- a/src/main/java/com/stripe/service/v2/core/AccountLinkService.java +++ b/src/main/java/com/stripe/service/v2/core/AccountLinkService.java @@ -1,6 +1,7 @@ // File generated from our OpenAPI spec package com.stripe.service.v2.core; +import com.stripe.exception.RateLimitException; import com.stripe.exception.StripeException; import com.stripe.model.v2.core.AccountLink; import com.stripe.net.ApiRequest; @@ -21,7 +22,8 @@ public AccountLinkService(StripeResponseGetter responseGetter) { * Creates an AccountLink object that includes a single-use URL that an account can use to access * a Stripe-hosted flow for collecting or updating required information. */ - public AccountLink create(AccountLinkCreateParams params) throws StripeException { + public AccountLink create(AccountLinkCreateParams params) + throws StripeException, RateLimitException { return create(params, (RequestOptions) null); } /** @@ -29,7 +31,7 @@ public AccountLink create(AccountLinkCreateParams params) throws StripeException * a Stripe-hosted flow for collecting or updating required information. */ public AccountLink create(AccountLinkCreateParams params, RequestOptions options) - throws StripeException { + throws StripeException, RateLimitException { String path = "/v2/core/account_links"; ApiRequest request = new ApiRequest( diff --git a/src/main/java/com/stripe/service/v2/core/AccountService.java b/src/main/java/com/stripe/service/v2/core/AccountService.java index 0ba14c9d182..2f5157cee7c 100644 --- a/src/main/java/com/stripe/service/v2/core/AccountService.java +++ b/src/main/java/com/stripe/service/v2/core/AccountService.java @@ -2,6 +2,7 @@ package com.stripe.service.v2.core; import com.google.gson.reflect.TypeToken; +import com.stripe.exception.RateLimitException; import com.stripe.exception.StripeException; import com.stripe.model.v2.StripeCollection; import com.stripe.model.v2.core.Account; @@ -24,20 +25,22 @@ public AccountService(StripeResponseGetter responseGetter) { } /** Returns a list of Accounts. */ - public StripeCollection list(AccountListParams params) throws StripeException { + public StripeCollection list(AccountListParams params) + throws StripeException, RateLimitException { return list(params, (RequestOptions) null); } /** Returns a list of Accounts. */ - public StripeCollection list(RequestOptions options) throws StripeException { + public StripeCollection list(RequestOptions options) + throws StripeException, RateLimitException { return list((AccountListParams) null, options); } /** Returns a list of Accounts. */ - public StripeCollection list() throws StripeException { + public StripeCollection list() throws StripeException, RateLimitException { return list((AccountListParams) null, (RequestOptions) null); } /** Returns a list of Accounts. */ public StripeCollection list(AccountListParams params, RequestOptions options) - throws StripeException { + throws StripeException, RateLimitException { String path = "/v2/core/accounts"; ApiRequest request = new ApiRequest( @@ -54,7 +57,7 @@ public StripeCollection list(AccountListParams params, RequestOptions o * the features an account has access to. An account can be configured as any or all of the * following configurations: Customer, Merchant and/or Recipient. */ - public Account create(AccountCreateParams params) throws StripeException { + public Account create(AccountCreateParams params) throws StripeException, RateLimitException { return create(params, (RequestOptions) null); } /** @@ -63,7 +66,7 @@ public Account create(AccountCreateParams params) throws StripeException { * the features an account has access to. An account can be configured as any or all of the * following configurations: Customer, Merchant and/or Recipient. */ - public Account create(RequestOptions options) throws StripeException { + public Account create(RequestOptions options) throws StripeException, RateLimitException { return create((AccountCreateParams) null, options); } /** @@ -72,7 +75,7 @@ public Account create(RequestOptions options) throws StripeException { * the features an account has access to. An account can be configured as any or all of the * following configurations: Customer, Merchant and/or Recipient. */ - public Account create() throws StripeException { + public Account create() throws StripeException, RateLimitException { return create((AccountCreateParams) null, (RequestOptions) null); } /** @@ -81,7 +84,8 @@ public Account create() throws StripeException { * the features an account has access to. An account can be configured as any or all of the * following configurations: Customer, Merchant and/or Recipient. */ - public Account create(AccountCreateParams params, RequestOptions options) throws StripeException { + public Account create(AccountCreateParams params, RequestOptions options) + throws StripeException, RateLimitException { String path = "/v2/core/accounts"; ApiRequest request = new ApiRequest( @@ -93,20 +97,22 @@ public Account create(AccountCreateParams params, RequestOptions options) throws return this.request(request, Account.class); } /** Retrieves the details of an Account. */ - public Account retrieve(String id, AccountRetrieveParams params) throws StripeException { + public Account retrieve(String id, AccountRetrieveParams params) + throws StripeException, RateLimitException { return retrieve(id, params, (RequestOptions) null); } /** Retrieves the details of an Account. */ - public Account retrieve(String id, RequestOptions options) throws StripeException { + public Account retrieve(String id, RequestOptions options) + throws StripeException, RateLimitException { return retrieve(id, (AccountRetrieveParams) null, options); } /** Retrieves the details of an Account. */ - public Account retrieve(String id) throws StripeException { + public Account retrieve(String id) throws StripeException, RateLimitException { return retrieve(id, (AccountRetrieveParams) null, (RequestOptions) null); } /** Retrieves the details of an Account. */ public Account retrieve(String id, AccountRetrieveParams params, RequestOptions options) - throws StripeException { + throws StripeException, RateLimitException { String path = String.format("/v2/core/accounts/%s", ApiResource.urlEncodeId(id)); ApiRequest request = new ApiRequest( @@ -118,20 +124,22 @@ public Account retrieve(String id, AccountRetrieveParams params, RequestOptions return this.request(request, Account.class); } /** Updates the details of an Account. */ - public Account update(String id, AccountUpdateParams params) throws StripeException { + public Account update(String id, AccountUpdateParams params) + throws StripeException, RateLimitException { return update(id, params, (RequestOptions) null); } /** Updates the details of an Account. */ - public Account update(String id, RequestOptions options) throws StripeException { + public Account update(String id, RequestOptions options) + throws StripeException, RateLimitException { return update(id, (AccountUpdateParams) null, options); } /** Updates the details of an Account. */ - public Account update(String id) throws StripeException { + public Account update(String id) throws StripeException, RateLimitException { return update(id, (AccountUpdateParams) null, (RequestOptions) null); } /** Updates the details of an Account. */ public Account update(String id, AccountUpdateParams params, RequestOptions options) - throws StripeException { + throws StripeException, RateLimitException { String path = String.format("/v2/core/accounts/%s", ApiResource.urlEncodeId(id)); ApiRequest request = new ApiRequest( @@ -147,7 +155,8 @@ public Account update(String id, AccountUpdateParams params, RequestOptions opti * operated on, but limited information can still be retrieved through the API in order to be able * to track their history. */ - public Account close(String id, AccountCloseParams params) throws StripeException { + public Account close(String id, AccountCloseParams params) + throws StripeException, RateLimitException { return close(id, params, (RequestOptions) null); } /** @@ -155,7 +164,8 @@ public Account close(String id, AccountCloseParams params) throws StripeExceptio * operated on, but limited information can still be retrieved through the API in order to be able * to track their history. */ - public Account close(String id, RequestOptions options) throws StripeException { + public Account close(String id, RequestOptions options) + throws StripeException, RateLimitException { return close(id, (AccountCloseParams) null, options); } /** @@ -163,7 +173,7 @@ public Account close(String id, RequestOptions options) throws StripeException { * operated on, but limited information can still be retrieved through the API in order to be able * to track their history. */ - public Account close(String id) throws StripeException { + public Account close(String id) throws StripeException, RateLimitException { return close(id, (AccountCloseParams) null, (RequestOptions) null); } /** @@ -172,7 +182,7 @@ public Account close(String id) throws StripeException { * to track their history. */ public Account close(String id, AccountCloseParams params, RequestOptions options) - throws StripeException { + throws StripeException, RateLimitException { String path = String.format("/v2/core/accounts/%s/close", ApiResource.urlEncodeId(id)); ApiRequest request = new ApiRequest( diff --git a/src/main/java/com/stripe/service/v2/core/AccountTokenService.java b/src/main/java/com/stripe/service/v2/core/AccountTokenService.java index cc7c754b89a..3eb34d7d350 100644 --- a/src/main/java/com/stripe/service/v2/core/AccountTokenService.java +++ b/src/main/java/com/stripe/service/v2/core/AccountTokenService.java @@ -1,6 +1,7 @@ // File generated from our OpenAPI spec package com.stripe.service.v2.core; +import com.stripe.exception.RateLimitException; import com.stripe.exception.StripeException; import com.stripe.model.v2.core.AccountToken; import com.stripe.net.ApiRequest; @@ -18,20 +19,21 @@ public AccountTokenService(StripeResponseGetter responseGetter) { } /** Creates an Account Token. */ - public AccountToken create(AccountTokenCreateParams params) throws StripeException { + public AccountToken create(AccountTokenCreateParams params) + throws StripeException, RateLimitException { return create(params, (RequestOptions) null); } /** Creates an Account Token. */ - public AccountToken create(RequestOptions options) throws StripeException { + public AccountToken create(RequestOptions options) throws StripeException, RateLimitException { return create((AccountTokenCreateParams) null, options); } /** Creates an Account Token. */ - public AccountToken create() throws StripeException { + public AccountToken create() throws StripeException, RateLimitException { return create((AccountTokenCreateParams) null, (RequestOptions) null); } /** Creates an Account Token. */ public AccountToken create(AccountTokenCreateParams params, RequestOptions options) - throws StripeException { + throws StripeException, RateLimitException { String path = "/v2/core/account_tokens"; ApiRequest request = new ApiRequest( @@ -43,11 +45,12 @@ public AccountToken create(AccountTokenCreateParams params, RequestOptions optio return this.request(request, AccountToken.class); } /** Retrieves an Account Token. */ - public AccountToken retrieve(String id) throws StripeException { + public AccountToken retrieve(String id) throws StripeException, RateLimitException { return retrieve(id, (RequestOptions) null); } /** Retrieves an Account Token. */ - public AccountToken retrieve(String id, RequestOptions options) throws StripeException { + public AccountToken retrieve(String id, RequestOptions options) + throws StripeException, RateLimitException { String path = String.format("/v2/core/account_tokens/%s", ApiResource.urlEncodeId(id)); ApiRequest request = new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.GET, path, null, options); diff --git a/src/main/java/com/stripe/service/v2/core/accounts/PersonService.java b/src/main/java/com/stripe/service/v2/core/accounts/PersonService.java index 1ba7615b0cc..4a1b2b957e4 100644 --- a/src/main/java/com/stripe/service/v2/core/accounts/PersonService.java +++ b/src/main/java/com/stripe/service/v2/core/accounts/PersonService.java @@ -2,6 +2,7 @@ package com.stripe.service.v2.core.accounts; import com.google.gson.reflect.TypeToken; +import com.stripe.exception.RateLimitException; import com.stripe.exception.StripeException; import com.stripe.model.v2.DeletedObject; import com.stripe.model.v2.StripeCollection; @@ -24,21 +25,23 @@ public PersonService(StripeResponseGetter responseGetter) { /** Returns a paginated list of Persons associated with an Account. */ public StripeCollection list(String accountId, PersonListParams params) - throws StripeException { + throws StripeException, RateLimitException { return list(accountId, params, (RequestOptions) null); } /** Returns a paginated list of Persons associated with an Account. */ public StripeCollection list(String accountId, RequestOptions options) - throws StripeException { + throws StripeException, RateLimitException { return list(accountId, (PersonListParams) null, options); } /** Returns a paginated list of Persons associated with an Account. */ - public StripeCollection list(String accountId) throws StripeException { + public StripeCollection list(String accountId) + throws StripeException, RateLimitException { return list(accountId, (PersonListParams) null, (RequestOptions) null); } /** Returns a paginated list of Persons associated with an Account. */ public StripeCollection list( - String accountId, PersonListParams params, RequestOptions options) throws StripeException { + String accountId, PersonListParams params, RequestOptions options) + throws StripeException, RateLimitException { String path = String.format("/v2/core/accounts/%s/persons", ApiResource.urlEncodeId(accountId)); ApiRequest request = new ApiRequest( @@ -53,21 +56,23 @@ public StripeCollection list( * Create a Person. Adds an individual to an Account's identity. You can set relationship * attributes and identity information at creation. */ - public AccountPerson create(String accountId, PersonCreateParams params) throws StripeException { + public AccountPerson create(String accountId, PersonCreateParams params) + throws StripeException, RateLimitException { return create(accountId, params, (RequestOptions) null); } /** * Create a Person. Adds an individual to an Account's identity. You can set relationship * attributes and identity information at creation. */ - public AccountPerson create(String accountId, RequestOptions options) throws StripeException { + public AccountPerson create(String accountId, RequestOptions options) + throws StripeException, RateLimitException { return create(accountId, (PersonCreateParams) null, options); } /** * Create a Person. Adds an individual to an Account's identity. You can set relationship * attributes and identity information at creation. */ - public AccountPerson create(String accountId) throws StripeException { + public AccountPerson create(String accountId) throws StripeException, RateLimitException { return create(accountId, (PersonCreateParams) null, (RequestOptions) null); } /** @@ -75,7 +80,7 @@ public AccountPerson create(String accountId) throws StripeException { * attributes and identity information at creation. */ public AccountPerson create(String accountId, PersonCreateParams params, RequestOptions options) - throws StripeException { + throws StripeException, RateLimitException { String path = String.format("/v2/core/accounts/%s/persons", ApiResource.urlEncodeId(accountId)); ApiRequest request = new ApiRequest( @@ -87,12 +92,13 @@ public AccountPerson create(String accountId, PersonCreateParams params, Request return this.request(request, AccountPerson.class); } /** Delete a Person associated with an Account. */ - public DeletedObject delete(String accountId, String id) throws StripeException { + public DeletedObject delete(String accountId, String id) + throws StripeException, RateLimitException { return delete(accountId, id, (RequestOptions) null); } /** Delete a Person associated with an Account. */ public DeletedObject delete(String accountId, String id, RequestOptions options) - throws StripeException { + throws StripeException, RateLimitException { String path = String.format( "/v2/core/accounts/%s/persons/%s", @@ -102,12 +108,13 @@ public DeletedObject delete(String accountId, String id, RequestOptions options) return this.request(request, DeletedObject.class); } /** Retrieves a Person associated with an Account. */ - public AccountPerson retrieve(String accountId, String id) throws StripeException { + public AccountPerson retrieve(String accountId, String id) + throws StripeException, RateLimitException { return retrieve(accountId, id, (RequestOptions) null); } /** Retrieves a Person associated with an Account. */ public AccountPerson retrieve(String accountId, String id, RequestOptions options) - throws StripeException { + throws StripeException, RateLimitException { String path = String.format( "/v2/core/accounts/%s/persons/%s", @@ -118,22 +125,23 @@ public AccountPerson retrieve(String accountId, String id, RequestOptions option } /** Updates a Person associated with an Account. */ public AccountPerson update(String accountId, String id, PersonUpdateParams params) - throws StripeException { + throws StripeException, RateLimitException { return update(accountId, id, params, (RequestOptions) null); } /** Updates a Person associated with an Account. */ public AccountPerson update(String accountId, String id, RequestOptions options) - throws StripeException { + throws StripeException, RateLimitException { return update(accountId, id, (PersonUpdateParams) null, options); } /** Updates a Person associated with an Account. */ - public AccountPerson update(String accountId, String id) throws StripeException { + public AccountPerson update(String accountId, String id) + throws StripeException, RateLimitException { return update(accountId, id, (PersonUpdateParams) null, (RequestOptions) null); } /** Updates a Person associated with an Account. */ public AccountPerson update( String accountId, String id, PersonUpdateParams params, RequestOptions options) - throws StripeException { + throws StripeException, RateLimitException { String path = String.format( "/v2/core/accounts/%s/persons/%s", diff --git a/src/main/java/com/stripe/service/v2/core/accounts/PersonTokenService.java b/src/main/java/com/stripe/service/v2/core/accounts/PersonTokenService.java index 4325a3193ec..b6180a4b7d7 100644 --- a/src/main/java/com/stripe/service/v2/core/accounts/PersonTokenService.java +++ b/src/main/java/com/stripe/service/v2/core/accounts/PersonTokenService.java @@ -1,6 +1,7 @@ // File generated from our OpenAPI spec package com.stripe.service.v2.core.accounts; +import com.stripe.exception.RateLimitException; import com.stripe.exception.StripeException; import com.stripe.model.v2.core.AccountPersonToken; import com.stripe.net.ApiRequest; @@ -19,22 +20,22 @@ public PersonTokenService(StripeResponseGetter responseGetter) { /** Creates a Person Token associated with an Account. */ public AccountPersonToken create(String accountId, PersonTokenCreateParams params) - throws StripeException { + throws StripeException, RateLimitException { return create(accountId, params, (RequestOptions) null); } /** Creates a Person Token associated with an Account. */ public AccountPersonToken create(String accountId, RequestOptions options) - throws StripeException { + throws StripeException, RateLimitException { return create(accountId, (PersonTokenCreateParams) null, options); } /** Creates a Person Token associated with an Account. */ - public AccountPersonToken create(String accountId) throws StripeException { + public AccountPersonToken create(String accountId) throws StripeException, RateLimitException { return create(accountId, (PersonTokenCreateParams) null, (RequestOptions) null); } /** Creates a Person Token associated with an Account. */ public AccountPersonToken create( String accountId, PersonTokenCreateParams params, RequestOptions options) - throws StripeException { + throws StripeException, RateLimitException { String path = String.format("/v2/core/accounts/%s/person_tokens", ApiResource.urlEncodeId(accountId)); ApiRequest request = @@ -47,12 +48,13 @@ public AccountPersonToken create( return this.request(request, AccountPersonToken.class); } /** Retrieves a Person Token associated with an Account. */ - public AccountPersonToken retrieve(String accountId, String id) throws StripeException { + public AccountPersonToken retrieve(String accountId, String id) + throws StripeException, RateLimitException { return retrieve(accountId, id, (RequestOptions) null); } /** Retrieves a Person Token associated with an Account. */ public AccountPersonToken retrieve(String accountId, String id, RequestOptions options) - throws StripeException { + throws StripeException, RateLimitException { String path = String.format( "/v2/core/accounts/%s/person_tokens/%s", diff --git a/src/test/java/com/stripe/functional/GeneratedExamples.java b/src/test/java/com/stripe/functional/GeneratedExamples.java index 6febffbff5a..a4f989b28b6 100644 --- a/src/test/java/com/stripe/functional/GeneratedExamples.java +++ b/src/test/java/com/stripe/functional/GeneratedExamples.java @@ -27372,7 +27372,7 @@ public void testBlockedByStripeErrorServices() throws StripeException { "/v2/core/vault/us_bank_accounts", null, null, - "{\"error\":{\"type\":\"blocked_by_stripe\",\"code\":\"blocked_payout_method_bank_account\"}}", + "{\"error\":{\"type\":\"blocked_by_stripe\",\"code\":\"blocked_payout_method\"}}", 400); StripeClient client = new StripeClient(networkSpy); @@ -27703,6 +27703,31 @@ public void testQuotaExceededErrorServices() throws StripeException { null); } + @Test + public void testRateLimitErrorServices() throws StripeException { + stubRequestReturnError( + BaseAddress.API, + ApiResource.RequestMethod.GET, + "/v2/core/accounts", + null, + null, + "{\"error\":{\"type\":\"rate_limit\",\"code\":\"account_rate_limit_exceeded\"}}", + 400); + StripeClient client = new StripeClient(networkSpy); + + com.stripe.param.v2.core.AccountListParams params = + com.stripe.param.v2.core.AccountListParams.builder().build(); + + try { + client.v2().core().accounts().list(params); + } catch (RateLimitException e) { + + } + ; + verifyRequest( + BaseAddress.API, ApiResource.RequestMethod.GET, "/v2/core/accounts", params.toMap(), null); + } + @Test public void testRecipientNotNotifiableErrorServices() throws StripeException { stubRequestReturnError( From 5fad1d27541cc1342f9d06b6e1d6bf08d4620f45 Mon Sep 17 00:00:00 2001 From: "stripe-openapi[bot]" <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Fri, 16 Jan 2026 18:43:47 +0000 Subject: [PATCH 2/3] Update generated code (#2144) * Update generated code for v2151 and * Update generated code for v2152 and --------- Co-authored-by: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> --- CODEGEN_VERSION | 2 +- OPENAPI_VERSION | 2 +- .../events/V2CoreAccountClosedEvent.java | 22 +++++++ .../V2CoreAccountClosedEventNotification.java | 27 +++++++++ .../events/V2CoreAccountCreatedEvent.java | 22 +++++++ ...V2CoreAccountCreatedEventNotification.java | 27 +++++++++ ...nCustomerCapabilityStatusUpdatedEvent.java | 40 +++++++++++++ ...abilityStatusUpdatedEventNotification.java | 31 ++++++++++ ...dingConfigurationCustomerUpdatedEvent.java | 22 +++++++ ...ationCustomerUpdatedEventNotification.java | 29 ++++++++++ ...nMerchantCapabilityStatusUpdatedEvent.java | 54 ++++++++++++++++++ ...abilityStatusUpdatedEventNotification.java | 31 ++++++++++ ...dingConfigurationMerchantUpdatedEvent.java | 22 +++++++ ...ationMerchantUpdatedEventNotification.java | 29 ++++++++++ ...RecipientCapabilityStatusUpdatedEvent.java | 42 ++++++++++++++ ...abilityStatusUpdatedEventNotification.java | 31 ++++++++++ ...ingConfigurationRecipientUpdatedEvent.java | 22 +++++++ ...tionRecipientUpdatedEventNotification.java | 29 ++++++++++ ...eAccountIncludingDefaultsUpdatedEvent.java | 22 +++++++ ...udingDefaultsUpdatedEventNotification.java | 28 +++++++++ ...cludingFutureRequirementsUpdatedEvent.java | 22 +++++++ ...eRequirementsUpdatedEventNotification.java | 28 +++++++++ ...eAccountIncludingIdentityUpdatedEvent.java | 22 +++++++ ...udingIdentityUpdatedEventNotification.java | 28 +++++++++ ...ountIncludingRequirementsUpdatedEvent.java | 22 +++++++ ...gRequirementsUpdatedEventNotification.java | 28 +++++++++ .../V2CoreAccountLinkReturnedEvent.java | 33 +++++++++++ ...eAccountLinkReturnedEventNotification.java | 13 +++++ .../V2CoreAccountPersonCreatedEvent.java | 35 ++++++++++++ ...AccountPersonCreatedEventNotification.java | 27 +++++++++ .../V2CoreAccountPersonDeletedEvent.java | 35 ++++++++++++ ...AccountPersonDeletedEventNotification.java | 27 +++++++++ .../V2CoreAccountPersonUpdatedEvent.java | 35 ++++++++++++ ...AccountPersonUpdatedEventNotification.java | 27 +++++++++ .../events/V2CoreAccountUpdatedEvent.java | 22 +++++++ ...V2CoreAccountUpdatedEventNotification.java | 27 +++++++++ .../stripe/model/v2/EventDataClassLookup.java | 47 +++++++++++++++ .../v2/EventNotificationClassLookup.java | 57 +++++++++++++++++++ 38 files changed, 1067 insertions(+), 2 deletions(-) create mode 100644 src/main/java/com/stripe/events/V2CoreAccountClosedEvent.java create mode 100644 src/main/java/com/stripe/events/V2CoreAccountClosedEventNotification.java create mode 100644 src/main/java/com/stripe/events/V2CoreAccountCreatedEvent.java create mode 100644 src/main/java/com/stripe/events/V2CoreAccountCreatedEventNotification.java create mode 100644 src/main/java/com/stripe/events/V2CoreAccountIncludingConfigurationCustomerCapabilityStatusUpdatedEvent.java create mode 100644 src/main/java/com/stripe/events/V2CoreAccountIncludingConfigurationCustomerCapabilityStatusUpdatedEventNotification.java create mode 100644 src/main/java/com/stripe/events/V2CoreAccountIncludingConfigurationCustomerUpdatedEvent.java create mode 100644 src/main/java/com/stripe/events/V2CoreAccountIncludingConfigurationCustomerUpdatedEventNotification.java create mode 100644 src/main/java/com/stripe/events/V2CoreAccountIncludingConfigurationMerchantCapabilityStatusUpdatedEvent.java create mode 100644 src/main/java/com/stripe/events/V2CoreAccountIncludingConfigurationMerchantCapabilityStatusUpdatedEventNotification.java create mode 100644 src/main/java/com/stripe/events/V2CoreAccountIncludingConfigurationMerchantUpdatedEvent.java create mode 100644 src/main/java/com/stripe/events/V2CoreAccountIncludingConfigurationMerchantUpdatedEventNotification.java create mode 100644 src/main/java/com/stripe/events/V2CoreAccountIncludingConfigurationRecipientCapabilityStatusUpdatedEvent.java create mode 100644 src/main/java/com/stripe/events/V2CoreAccountIncludingConfigurationRecipientCapabilityStatusUpdatedEventNotification.java create mode 100644 src/main/java/com/stripe/events/V2CoreAccountIncludingConfigurationRecipientUpdatedEvent.java create mode 100644 src/main/java/com/stripe/events/V2CoreAccountIncludingConfigurationRecipientUpdatedEventNotification.java create mode 100644 src/main/java/com/stripe/events/V2CoreAccountIncludingDefaultsUpdatedEvent.java create mode 100644 src/main/java/com/stripe/events/V2CoreAccountIncludingDefaultsUpdatedEventNotification.java create mode 100644 src/main/java/com/stripe/events/V2CoreAccountIncludingFutureRequirementsUpdatedEvent.java create mode 100644 src/main/java/com/stripe/events/V2CoreAccountIncludingFutureRequirementsUpdatedEventNotification.java create mode 100644 src/main/java/com/stripe/events/V2CoreAccountIncludingIdentityUpdatedEvent.java create mode 100644 src/main/java/com/stripe/events/V2CoreAccountIncludingIdentityUpdatedEventNotification.java create mode 100644 src/main/java/com/stripe/events/V2CoreAccountIncludingRequirementsUpdatedEvent.java create mode 100644 src/main/java/com/stripe/events/V2CoreAccountIncludingRequirementsUpdatedEventNotification.java create mode 100644 src/main/java/com/stripe/events/V2CoreAccountLinkReturnedEvent.java create mode 100644 src/main/java/com/stripe/events/V2CoreAccountLinkReturnedEventNotification.java create mode 100644 src/main/java/com/stripe/events/V2CoreAccountPersonCreatedEvent.java create mode 100644 src/main/java/com/stripe/events/V2CoreAccountPersonCreatedEventNotification.java create mode 100644 src/main/java/com/stripe/events/V2CoreAccountPersonDeletedEvent.java create mode 100644 src/main/java/com/stripe/events/V2CoreAccountPersonDeletedEventNotification.java create mode 100644 src/main/java/com/stripe/events/V2CoreAccountPersonUpdatedEvent.java create mode 100644 src/main/java/com/stripe/events/V2CoreAccountPersonUpdatedEventNotification.java create mode 100644 src/main/java/com/stripe/events/V2CoreAccountUpdatedEvent.java create mode 100644 src/main/java/com/stripe/events/V2CoreAccountUpdatedEventNotification.java diff --git a/CODEGEN_VERSION b/CODEGEN_VERSION index 93be1cef53b..81e38dd3bef 100644 --- a/CODEGEN_VERSION +++ b/CODEGEN_VERSION @@ -1 +1 @@ -88aa59022b32620f4d66d6196e3b42d5a0f86bbb \ No newline at end of file +c250368ba89214c80bc8de3e4fc5d2094c5502cc \ No newline at end of file diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 16739433ec7..ccb965af858 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v2140 \ No newline at end of file +v2152 \ No newline at end of file diff --git a/src/main/java/com/stripe/events/V2CoreAccountClosedEvent.java b/src/main/java/com/stripe/events/V2CoreAccountClosedEvent.java new file mode 100644 index 00000000000..05a2445690b --- /dev/null +++ b/src/main/java/com/stripe/events/V2CoreAccountClosedEvent.java @@ -0,0 +1,22 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.core.Account; +import com.stripe.model.v2.core.Event; +import com.stripe.model.v2.core.Event.RelatedObject; +import lombok.Getter; + +@Getter +public final class V2CoreAccountClosedEvent extends Event { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public Account fetchRelatedObject() throws StripeException { + return (Account) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V2CoreAccountClosedEventNotification.java b/src/main/java/com/stripe/events/V2CoreAccountClosedEventNotification.java new file mode 100644 index 00000000000..d677d1b4539 --- /dev/null +++ b/src/main/java/com/stripe/events/V2CoreAccountClosedEventNotification.java @@ -0,0 +1,27 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.core.Account; +import com.stripe.model.v2.core.Event.RelatedObject; +import com.stripe.model.v2.core.EventNotification; +import lombok.Getter; + +@Getter +public final class V2CoreAccountClosedEventNotification extends EventNotification { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public Account fetchRelatedObject() throws StripeException { + return (Account) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V2CoreAccountClosedEvent fetchEvent() throws StripeException { + return (V2CoreAccountClosedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V2CoreAccountCreatedEvent.java b/src/main/java/com/stripe/events/V2CoreAccountCreatedEvent.java new file mode 100644 index 00000000000..cbfdfc4f5d3 --- /dev/null +++ b/src/main/java/com/stripe/events/V2CoreAccountCreatedEvent.java @@ -0,0 +1,22 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.core.Account; +import com.stripe.model.v2.core.Event; +import com.stripe.model.v2.core.Event.RelatedObject; +import lombok.Getter; + +@Getter +public final class V2CoreAccountCreatedEvent extends Event { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public Account fetchRelatedObject() throws StripeException { + return (Account) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V2CoreAccountCreatedEventNotification.java b/src/main/java/com/stripe/events/V2CoreAccountCreatedEventNotification.java new file mode 100644 index 00000000000..e0529a8b8cc --- /dev/null +++ b/src/main/java/com/stripe/events/V2CoreAccountCreatedEventNotification.java @@ -0,0 +1,27 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.core.Account; +import com.stripe.model.v2.core.Event.RelatedObject; +import com.stripe.model.v2.core.EventNotification; +import lombok.Getter; + +@Getter +public final class V2CoreAccountCreatedEventNotification extends EventNotification { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public Account fetchRelatedObject() throws StripeException { + return (Account) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V2CoreAccountCreatedEvent fetchEvent() throws StripeException { + return (V2CoreAccountCreatedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V2CoreAccountIncludingConfigurationCustomerCapabilityStatusUpdatedEvent.java b/src/main/java/com/stripe/events/V2CoreAccountIncludingConfigurationCustomerCapabilityStatusUpdatedEvent.java new file mode 100644 index 00000000000..e266dd315f6 --- /dev/null +++ b/src/main/java/com/stripe/events/V2CoreAccountIncludingConfigurationCustomerCapabilityStatusUpdatedEvent.java @@ -0,0 +1,40 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.core.Account; +import com.stripe.model.v2.core.Event; +import com.stripe.model.v2.core.Event.RelatedObject; +import lombok.Getter; +import lombok.Setter; + +@Getter +public final class V2CoreAccountIncludingConfigurationCustomerCapabilityStatusUpdatedEvent + extends Event { + /** Data for the v2.core.account[configuration.customer].capability_status_updated event. */ + @SerializedName("data") + V2CoreAccountIncludingConfigurationCustomerCapabilityStatusUpdatedEvent.EventData data; + + @Getter + @Setter + public static final class EventData { + /** + * Open Enum. The capability which had its status updated. + * + *

Equal to {@code automatic_indirect_tax}. + */ + @SerializedName("updated_capability") + String updatedCapability; + } + + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public Account fetchRelatedObject() throws StripeException { + return (Account) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V2CoreAccountIncludingConfigurationCustomerCapabilityStatusUpdatedEventNotification.java b/src/main/java/com/stripe/events/V2CoreAccountIncludingConfigurationCustomerCapabilityStatusUpdatedEventNotification.java new file mode 100644 index 00000000000..c203c68e6fe --- /dev/null +++ b/src/main/java/com/stripe/events/V2CoreAccountIncludingConfigurationCustomerCapabilityStatusUpdatedEventNotification.java @@ -0,0 +1,31 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.core.Account; +import com.stripe.model.v2.core.Event.RelatedObject; +import com.stripe.model.v2.core.EventNotification; +import lombok.Getter; + +@Getter +public final +class V2CoreAccountIncludingConfigurationCustomerCapabilityStatusUpdatedEventNotification + extends EventNotification { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public Account fetchRelatedObject() throws StripeException { + return (Account) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V2CoreAccountIncludingConfigurationCustomerCapabilityStatusUpdatedEvent fetchEvent() + throws StripeException { + return (V2CoreAccountIncludingConfigurationCustomerCapabilityStatusUpdatedEvent) + super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V2CoreAccountIncludingConfigurationCustomerUpdatedEvent.java b/src/main/java/com/stripe/events/V2CoreAccountIncludingConfigurationCustomerUpdatedEvent.java new file mode 100644 index 00000000000..eaf8240c359 --- /dev/null +++ b/src/main/java/com/stripe/events/V2CoreAccountIncludingConfigurationCustomerUpdatedEvent.java @@ -0,0 +1,22 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.core.Account; +import com.stripe.model.v2.core.Event; +import com.stripe.model.v2.core.Event.RelatedObject; +import lombok.Getter; + +@Getter +public final class V2CoreAccountIncludingConfigurationCustomerUpdatedEvent extends Event { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public Account fetchRelatedObject() throws StripeException { + return (Account) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V2CoreAccountIncludingConfigurationCustomerUpdatedEventNotification.java b/src/main/java/com/stripe/events/V2CoreAccountIncludingConfigurationCustomerUpdatedEventNotification.java new file mode 100644 index 00000000000..4cf4b375336 --- /dev/null +++ b/src/main/java/com/stripe/events/V2CoreAccountIncludingConfigurationCustomerUpdatedEventNotification.java @@ -0,0 +1,29 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.core.Account; +import com.stripe.model.v2.core.Event.RelatedObject; +import com.stripe.model.v2.core.EventNotification; +import lombok.Getter; + +@Getter +public final class V2CoreAccountIncludingConfigurationCustomerUpdatedEventNotification + extends EventNotification { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public Account fetchRelatedObject() throws StripeException { + return (Account) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V2CoreAccountIncludingConfigurationCustomerUpdatedEvent fetchEvent() + throws StripeException { + return (V2CoreAccountIncludingConfigurationCustomerUpdatedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V2CoreAccountIncludingConfigurationMerchantCapabilityStatusUpdatedEvent.java b/src/main/java/com/stripe/events/V2CoreAccountIncludingConfigurationMerchantCapabilityStatusUpdatedEvent.java new file mode 100644 index 00000000000..b9d23142347 --- /dev/null +++ b/src/main/java/com/stripe/events/V2CoreAccountIncludingConfigurationMerchantCapabilityStatusUpdatedEvent.java @@ -0,0 +1,54 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.core.Account; +import com.stripe.model.v2.core.Event; +import com.stripe.model.v2.core.Event.RelatedObject; +import lombok.Getter; +import lombok.Setter; + +@Getter +public final class V2CoreAccountIncludingConfigurationMerchantCapabilityStatusUpdatedEvent + extends Event { + /** Data for the v2.core.account[configuration.merchant].capability_status_updated event. */ + @SerializedName("data") + V2CoreAccountIncludingConfigurationMerchantCapabilityStatusUpdatedEvent.EventData data; + + @Getter + @Setter + public static final class EventData { + /** + * Open Enum. The capability which had its status updated. + * + *

One of {@code ach_debit_payments}, {@code acss_debit_payments}, {@code affirm_payments}, + * {@code afterpay_clearpay_payments}, {@code alma_payments}, {@code amazon_pay_payments}, + * {@code au_becs_debit_payments}, {@code bacs_debit_payments}, {@code bancontact_payments}, + * {@code blik_payments}, {@code boleto_payments}, {@code card_payments}, {@code + * cartes_bancaires_payments}, {@code cashapp_payments}, {@code eps_payments}, {@code + * fpx_payments}, {@code gb_bank_transfer_payments}, {@code grabpay_payments}, {@code + * ideal_payments}, {@code jcb_payments}, {@code jp_bank_transfer_payments}, {@code + * kakao_pay_payments}, {@code klarna_payments}, {@code konbini_payments}, {@code + * kr_card_payments}, {@code link_payments}, {@code mobilepay_payments}, {@code + * multibanco_payments}, {@code mx_bank_transfer_payments}, {@code naver_pay_payments}, {@code + * oxxo_payments}, {@code p24_payments}, {@code payco_payments}, {@code paynow_payments}, {@code + * stripe_balance.payouts}, {@code pay_by_bank_payments}, {@code promptpay_payments}, {@code + * revolut_pay_payments}, {@code samsung_pay_payments}, {@code sepa_bank_transfer_payments}, + * {@code sepa_debit_payments}, {@code swish_payments}, {@code twint_payments}, {@code + * us_bank_transfer_payments}, or {@code zip_payments}. + */ + @SerializedName("updated_capability") + String updatedCapability; + } + + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public Account fetchRelatedObject() throws StripeException { + return (Account) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V2CoreAccountIncludingConfigurationMerchantCapabilityStatusUpdatedEventNotification.java b/src/main/java/com/stripe/events/V2CoreAccountIncludingConfigurationMerchantCapabilityStatusUpdatedEventNotification.java new file mode 100644 index 00000000000..a651119b0b6 --- /dev/null +++ b/src/main/java/com/stripe/events/V2CoreAccountIncludingConfigurationMerchantCapabilityStatusUpdatedEventNotification.java @@ -0,0 +1,31 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.core.Account; +import com.stripe.model.v2.core.Event.RelatedObject; +import com.stripe.model.v2.core.EventNotification; +import lombok.Getter; + +@Getter +public final +class V2CoreAccountIncludingConfigurationMerchantCapabilityStatusUpdatedEventNotification + extends EventNotification { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public Account fetchRelatedObject() throws StripeException { + return (Account) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V2CoreAccountIncludingConfigurationMerchantCapabilityStatusUpdatedEvent fetchEvent() + throws StripeException { + return (V2CoreAccountIncludingConfigurationMerchantCapabilityStatusUpdatedEvent) + super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V2CoreAccountIncludingConfigurationMerchantUpdatedEvent.java b/src/main/java/com/stripe/events/V2CoreAccountIncludingConfigurationMerchantUpdatedEvent.java new file mode 100644 index 00000000000..5d525b9faf3 --- /dev/null +++ b/src/main/java/com/stripe/events/V2CoreAccountIncludingConfigurationMerchantUpdatedEvent.java @@ -0,0 +1,22 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.core.Account; +import com.stripe.model.v2.core.Event; +import com.stripe.model.v2.core.Event.RelatedObject; +import lombok.Getter; + +@Getter +public final class V2CoreAccountIncludingConfigurationMerchantUpdatedEvent extends Event { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public Account fetchRelatedObject() throws StripeException { + return (Account) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V2CoreAccountIncludingConfigurationMerchantUpdatedEventNotification.java b/src/main/java/com/stripe/events/V2CoreAccountIncludingConfigurationMerchantUpdatedEventNotification.java new file mode 100644 index 00000000000..c531238467b --- /dev/null +++ b/src/main/java/com/stripe/events/V2CoreAccountIncludingConfigurationMerchantUpdatedEventNotification.java @@ -0,0 +1,29 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.core.Account; +import com.stripe.model.v2.core.Event.RelatedObject; +import com.stripe.model.v2.core.EventNotification; +import lombok.Getter; + +@Getter +public final class V2CoreAccountIncludingConfigurationMerchantUpdatedEventNotification + extends EventNotification { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public Account fetchRelatedObject() throws StripeException { + return (Account) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V2CoreAccountIncludingConfigurationMerchantUpdatedEvent fetchEvent() + throws StripeException { + return (V2CoreAccountIncludingConfigurationMerchantUpdatedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V2CoreAccountIncludingConfigurationRecipientCapabilityStatusUpdatedEvent.java b/src/main/java/com/stripe/events/V2CoreAccountIncludingConfigurationRecipientCapabilityStatusUpdatedEvent.java new file mode 100644 index 00000000000..fda9a61e76d --- /dev/null +++ b/src/main/java/com/stripe/events/V2CoreAccountIncludingConfigurationRecipientCapabilityStatusUpdatedEvent.java @@ -0,0 +1,42 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.core.Account; +import com.stripe.model.v2.core.Event; +import com.stripe.model.v2.core.Event.RelatedObject; +import lombok.Getter; +import lombok.Setter; + +@Getter +public final class V2CoreAccountIncludingConfigurationRecipientCapabilityStatusUpdatedEvent + extends Event { + /** Data for the v2.core.account[configuration.recipient].capability_status_updated event. */ + @SerializedName("data") + V2CoreAccountIncludingConfigurationRecipientCapabilityStatusUpdatedEvent.EventData data; + + @Getter + @Setter + public static final class EventData { + /** + * Open Enum. The capability which had its status updated. + * + *

One of {@code bank_accounts.local}, {@code bank_accounts.wire}, {@code cards}, {@code + * stripe_balance.payouts}, {@code stripe_balance.stripe_transfers}, or {@code + * stripe.transfers}. + */ + @SerializedName("updated_capability") + String updatedCapability; + } + + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public Account fetchRelatedObject() throws StripeException { + return (Account) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V2CoreAccountIncludingConfigurationRecipientCapabilityStatusUpdatedEventNotification.java b/src/main/java/com/stripe/events/V2CoreAccountIncludingConfigurationRecipientCapabilityStatusUpdatedEventNotification.java new file mode 100644 index 00000000000..11072827081 --- /dev/null +++ b/src/main/java/com/stripe/events/V2CoreAccountIncludingConfigurationRecipientCapabilityStatusUpdatedEventNotification.java @@ -0,0 +1,31 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.core.Account; +import com.stripe.model.v2.core.Event.RelatedObject; +import com.stripe.model.v2.core.EventNotification; +import lombok.Getter; + +@Getter +public final +class V2CoreAccountIncludingConfigurationRecipientCapabilityStatusUpdatedEventNotification + extends EventNotification { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public Account fetchRelatedObject() throws StripeException { + return (Account) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V2CoreAccountIncludingConfigurationRecipientCapabilityStatusUpdatedEvent fetchEvent() + throws StripeException { + return (V2CoreAccountIncludingConfigurationRecipientCapabilityStatusUpdatedEvent) + super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V2CoreAccountIncludingConfigurationRecipientUpdatedEvent.java b/src/main/java/com/stripe/events/V2CoreAccountIncludingConfigurationRecipientUpdatedEvent.java new file mode 100644 index 00000000000..9215345d6f4 --- /dev/null +++ b/src/main/java/com/stripe/events/V2CoreAccountIncludingConfigurationRecipientUpdatedEvent.java @@ -0,0 +1,22 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.core.Account; +import com.stripe.model.v2.core.Event; +import com.stripe.model.v2.core.Event.RelatedObject; +import lombok.Getter; + +@Getter +public final class V2CoreAccountIncludingConfigurationRecipientUpdatedEvent extends Event { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public Account fetchRelatedObject() throws StripeException { + return (Account) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V2CoreAccountIncludingConfigurationRecipientUpdatedEventNotification.java b/src/main/java/com/stripe/events/V2CoreAccountIncludingConfigurationRecipientUpdatedEventNotification.java new file mode 100644 index 00000000000..bdc8b261a09 --- /dev/null +++ b/src/main/java/com/stripe/events/V2CoreAccountIncludingConfigurationRecipientUpdatedEventNotification.java @@ -0,0 +1,29 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.core.Account; +import com.stripe.model.v2.core.Event.RelatedObject; +import com.stripe.model.v2.core.EventNotification; +import lombok.Getter; + +@Getter +public final class V2CoreAccountIncludingConfigurationRecipientUpdatedEventNotification + extends EventNotification { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public Account fetchRelatedObject() throws StripeException { + return (Account) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V2CoreAccountIncludingConfigurationRecipientUpdatedEvent fetchEvent() + throws StripeException { + return (V2CoreAccountIncludingConfigurationRecipientUpdatedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V2CoreAccountIncludingDefaultsUpdatedEvent.java b/src/main/java/com/stripe/events/V2CoreAccountIncludingDefaultsUpdatedEvent.java new file mode 100644 index 00000000000..468bd1b4a8a --- /dev/null +++ b/src/main/java/com/stripe/events/V2CoreAccountIncludingDefaultsUpdatedEvent.java @@ -0,0 +1,22 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.core.Account; +import com.stripe.model.v2.core.Event; +import com.stripe.model.v2.core.Event.RelatedObject; +import lombok.Getter; + +@Getter +public final class V2CoreAccountIncludingDefaultsUpdatedEvent extends Event { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public Account fetchRelatedObject() throws StripeException { + return (Account) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V2CoreAccountIncludingDefaultsUpdatedEventNotification.java b/src/main/java/com/stripe/events/V2CoreAccountIncludingDefaultsUpdatedEventNotification.java new file mode 100644 index 00000000000..d7e23077bfd --- /dev/null +++ b/src/main/java/com/stripe/events/V2CoreAccountIncludingDefaultsUpdatedEventNotification.java @@ -0,0 +1,28 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.core.Account; +import com.stripe.model.v2.core.Event.RelatedObject; +import com.stripe.model.v2.core.EventNotification; +import lombok.Getter; + +@Getter +public final class V2CoreAccountIncludingDefaultsUpdatedEventNotification + extends EventNotification { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public Account fetchRelatedObject() throws StripeException { + return (Account) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V2CoreAccountIncludingDefaultsUpdatedEvent fetchEvent() throws StripeException { + return (V2CoreAccountIncludingDefaultsUpdatedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V2CoreAccountIncludingFutureRequirementsUpdatedEvent.java b/src/main/java/com/stripe/events/V2CoreAccountIncludingFutureRequirementsUpdatedEvent.java new file mode 100644 index 00000000000..496147e2216 --- /dev/null +++ b/src/main/java/com/stripe/events/V2CoreAccountIncludingFutureRequirementsUpdatedEvent.java @@ -0,0 +1,22 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.core.Account; +import com.stripe.model.v2.core.Event; +import com.stripe.model.v2.core.Event.RelatedObject; +import lombok.Getter; + +@Getter +public final class V2CoreAccountIncludingFutureRequirementsUpdatedEvent extends Event { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public Account fetchRelatedObject() throws StripeException { + return (Account) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V2CoreAccountIncludingFutureRequirementsUpdatedEventNotification.java b/src/main/java/com/stripe/events/V2CoreAccountIncludingFutureRequirementsUpdatedEventNotification.java new file mode 100644 index 00000000000..31c75530fa6 --- /dev/null +++ b/src/main/java/com/stripe/events/V2CoreAccountIncludingFutureRequirementsUpdatedEventNotification.java @@ -0,0 +1,28 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.core.Account; +import com.stripe.model.v2.core.Event.RelatedObject; +import com.stripe.model.v2.core.EventNotification; +import lombok.Getter; + +@Getter +public final class V2CoreAccountIncludingFutureRequirementsUpdatedEventNotification + extends EventNotification { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public Account fetchRelatedObject() throws StripeException { + return (Account) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V2CoreAccountIncludingFutureRequirementsUpdatedEvent fetchEvent() throws StripeException { + return (V2CoreAccountIncludingFutureRequirementsUpdatedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V2CoreAccountIncludingIdentityUpdatedEvent.java b/src/main/java/com/stripe/events/V2CoreAccountIncludingIdentityUpdatedEvent.java new file mode 100644 index 00000000000..0e39b973f3e --- /dev/null +++ b/src/main/java/com/stripe/events/V2CoreAccountIncludingIdentityUpdatedEvent.java @@ -0,0 +1,22 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.core.Account; +import com.stripe.model.v2.core.Event; +import com.stripe.model.v2.core.Event.RelatedObject; +import lombok.Getter; + +@Getter +public final class V2CoreAccountIncludingIdentityUpdatedEvent extends Event { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public Account fetchRelatedObject() throws StripeException { + return (Account) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V2CoreAccountIncludingIdentityUpdatedEventNotification.java b/src/main/java/com/stripe/events/V2CoreAccountIncludingIdentityUpdatedEventNotification.java new file mode 100644 index 00000000000..fbadf63c66c --- /dev/null +++ b/src/main/java/com/stripe/events/V2CoreAccountIncludingIdentityUpdatedEventNotification.java @@ -0,0 +1,28 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.core.Account; +import com.stripe.model.v2.core.Event.RelatedObject; +import com.stripe.model.v2.core.EventNotification; +import lombok.Getter; + +@Getter +public final class V2CoreAccountIncludingIdentityUpdatedEventNotification + extends EventNotification { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public Account fetchRelatedObject() throws StripeException { + return (Account) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V2CoreAccountIncludingIdentityUpdatedEvent fetchEvent() throws StripeException { + return (V2CoreAccountIncludingIdentityUpdatedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V2CoreAccountIncludingRequirementsUpdatedEvent.java b/src/main/java/com/stripe/events/V2CoreAccountIncludingRequirementsUpdatedEvent.java new file mode 100644 index 00000000000..8772e2c6727 --- /dev/null +++ b/src/main/java/com/stripe/events/V2CoreAccountIncludingRequirementsUpdatedEvent.java @@ -0,0 +1,22 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.core.Account; +import com.stripe.model.v2.core.Event; +import com.stripe.model.v2.core.Event.RelatedObject; +import lombok.Getter; + +@Getter +public final class V2CoreAccountIncludingRequirementsUpdatedEvent extends Event { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public Account fetchRelatedObject() throws StripeException { + return (Account) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V2CoreAccountIncludingRequirementsUpdatedEventNotification.java b/src/main/java/com/stripe/events/V2CoreAccountIncludingRequirementsUpdatedEventNotification.java new file mode 100644 index 00000000000..5c0246387b5 --- /dev/null +++ b/src/main/java/com/stripe/events/V2CoreAccountIncludingRequirementsUpdatedEventNotification.java @@ -0,0 +1,28 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.core.Account; +import com.stripe.model.v2.core.Event.RelatedObject; +import com.stripe.model.v2.core.EventNotification; +import lombok.Getter; + +@Getter +public final class V2CoreAccountIncludingRequirementsUpdatedEventNotification + extends EventNotification { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public Account fetchRelatedObject() throws StripeException { + return (Account) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V2CoreAccountIncludingRequirementsUpdatedEvent fetchEvent() throws StripeException { + return (V2CoreAccountIncludingRequirementsUpdatedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V2CoreAccountLinkReturnedEvent.java b/src/main/java/com/stripe/events/V2CoreAccountLinkReturnedEvent.java new file mode 100644 index 00000000000..8853cb981fd --- /dev/null +++ b/src/main/java/com/stripe/events/V2CoreAccountLinkReturnedEvent.java @@ -0,0 +1,33 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.model.v2.core.Event; +import java.util.List; +import lombok.Getter; +import lombok.Setter; + +@Getter +public final class V2CoreAccountLinkReturnedEvent extends Event { + /** Data for the v2.core.account_link.returned event. */ + @SerializedName("data") + V2CoreAccountLinkReturnedEvent.EventData data; + + @Getter + @Setter + public static final class EventData { + /** The ID of the v2 account. */ + @SerializedName("account_id") + String accountId; + /** Configurations on the Account that was onboarded via the account link. */ + @SerializedName("configurations") + List configurations; + /** + * Open Enum. The use case type of the account link that has been completed. + * + *

One of {@code account_onboarding}, or {@code account_update}. + */ + @SerializedName("use_case") + String useCase; + } +} diff --git a/src/main/java/com/stripe/events/V2CoreAccountLinkReturnedEventNotification.java b/src/main/java/com/stripe/events/V2CoreAccountLinkReturnedEventNotification.java new file mode 100644 index 00000000000..447b6909d19 --- /dev/null +++ b/src/main/java/com/stripe/events/V2CoreAccountLinkReturnedEventNotification.java @@ -0,0 +1,13 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.stripe.exception.StripeException; +import com.stripe.model.v2.core.EventNotification; + +public final class V2CoreAccountLinkReturnedEventNotification extends EventNotification { + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V2CoreAccountLinkReturnedEvent fetchEvent() throws StripeException { + return (V2CoreAccountLinkReturnedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V2CoreAccountPersonCreatedEvent.java b/src/main/java/com/stripe/events/V2CoreAccountPersonCreatedEvent.java new file mode 100644 index 00000000000..31eb01d754c --- /dev/null +++ b/src/main/java/com/stripe/events/V2CoreAccountPersonCreatedEvent.java @@ -0,0 +1,35 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.core.AccountPerson; +import com.stripe.model.v2.core.Event; +import com.stripe.model.v2.core.Event.RelatedObject; +import lombok.Getter; +import lombok.Setter; + +@Getter +public final class V2CoreAccountPersonCreatedEvent extends Event { + /** Data for the v2.core.account_person.created event. */ + @SerializedName("data") + V2CoreAccountPersonCreatedEvent.EventData data; + + @Getter + @Setter + public static final class EventData { + /** The ID of the v2 account. */ + @SerializedName("account_id") + String accountId; + } + + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public AccountPerson fetchRelatedObject() throws StripeException { + return (AccountPerson) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V2CoreAccountPersonCreatedEventNotification.java b/src/main/java/com/stripe/events/V2CoreAccountPersonCreatedEventNotification.java new file mode 100644 index 00000000000..52159283b25 --- /dev/null +++ b/src/main/java/com/stripe/events/V2CoreAccountPersonCreatedEventNotification.java @@ -0,0 +1,27 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.core.AccountPerson; +import com.stripe.model.v2.core.Event.RelatedObject; +import com.stripe.model.v2.core.EventNotification; +import lombok.Getter; + +@Getter +public final class V2CoreAccountPersonCreatedEventNotification extends EventNotification { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public AccountPerson fetchRelatedObject() throws StripeException { + return (AccountPerson) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V2CoreAccountPersonCreatedEvent fetchEvent() throws StripeException { + return (V2CoreAccountPersonCreatedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V2CoreAccountPersonDeletedEvent.java b/src/main/java/com/stripe/events/V2CoreAccountPersonDeletedEvent.java new file mode 100644 index 00000000000..54168d8031d --- /dev/null +++ b/src/main/java/com/stripe/events/V2CoreAccountPersonDeletedEvent.java @@ -0,0 +1,35 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.core.AccountPerson; +import com.stripe.model.v2.core.Event; +import com.stripe.model.v2.core.Event.RelatedObject; +import lombok.Getter; +import lombok.Setter; + +@Getter +public final class V2CoreAccountPersonDeletedEvent extends Event { + /** Data for the v2.core.account_person.deleted event. */ + @SerializedName("data") + V2CoreAccountPersonDeletedEvent.EventData data; + + @Getter + @Setter + public static final class EventData { + /** The ID of the v2 account. */ + @SerializedName("account_id") + String accountId; + } + + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public AccountPerson fetchRelatedObject() throws StripeException { + return (AccountPerson) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V2CoreAccountPersonDeletedEventNotification.java b/src/main/java/com/stripe/events/V2CoreAccountPersonDeletedEventNotification.java new file mode 100644 index 00000000000..ccdfef19c4c --- /dev/null +++ b/src/main/java/com/stripe/events/V2CoreAccountPersonDeletedEventNotification.java @@ -0,0 +1,27 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.core.AccountPerson; +import com.stripe.model.v2.core.Event.RelatedObject; +import com.stripe.model.v2.core.EventNotification; +import lombok.Getter; + +@Getter +public final class V2CoreAccountPersonDeletedEventNotification extends EventNotification { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public AccountPerson fetchRelatedObject() throws StripeException { + return (AccountPerson) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V2CoreAccountPersonDeletedEvent fetchEvent() throws StripeException { + return (V2CoreAccountPersonDeletedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V2CoreAccountPersonUpdatedEvent.java b/src/main/java/com/stripe/events/V2CoreAccountPersonUpdatedEvent.java new file mode 100644 index 00000000000..d9f19f199c2 --- /dev/null +++ b/src/main/java/com/stripe/events/V2CoreAccountPersonUpdatedEvent.java @@ -0,0 +1,35 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.core.AccountPerson; +import com.stripe.model.v2.core.Event; +import com.stripe.model.v2.core.Event.RelatedObject; +import lombok.Getter; +import lombok.Setter; + +@Getter +public final class V2CoreAccountPersonUpdatedEvent extends Event { + /** Data for the v2.core.account_person.updated event. */ + @SerializedName("data") + V2CoreAccountPersonUpdatedEvent.EventData data; + + @Getter + @Setter + public static final class EventData { + /** The ID of the v2 account. */ + @SerializedName("account_id") + String accountId; + } + + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public AccountPerson fetchRelatedObject() throws StripeException { + return (AccountPerson) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V2CoreAccountPersonUpdatedEventNotification.java b/src/main/java/com/stripe/events/V2CoreAccountPersonUpdatedEventNotification.java new file mode 100644 index 00000000000..7d9c09bccd0 --- /dev/null +++ b/src/main/java/com/stripe/events/V2CoreAccountPersonUpdatedEventNotification.java @@ -0,0 +1,27 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.core.AccountPerson; +import com.stripe.model.v2.core.Event.RelatedObject; +import com.stripe.model.v2.core.EventNotification; +import lombok.Getter; + +@Getter +public final class V2CoreAccountPersonUpdatedEventNotification extends EventNotification { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public AccountPerson fetchRelatedObject() throws StripeException { + return (AccountPerson) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V2CoreAccountPersonUpdatedEvent fetchEvent() throws StripeException { + return (V2CoreAccountPersonUpdatedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V2CoreAccountUpdatedEvent.java b/src/main/java/com/stripe/events/V2CoreAccountUpdatedEvent.java new file mode 100644 index 00000000000..767204a5eef --- /dev/null +++ b/src/main/java/com/stripe/events/V2CoreAccountUpdatedEvent.java @@ -0,0 +1,22 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.core.Account; +import com.stripe.model.v2.core.Event; +import com.stripe.model.v2.core.Event.RelatedObject; +import lombok.Getter; + +@Getter +public final class V2CoreAccountUpdatedEvent extends Event { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public Account fetchRelatedObject() throws StripeException { + return (Account) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V2CoreAccountUpdatedEventNotification.java b/src/main/java/com/stripe/events/V2CoreAccountUpdatedEventNotification.java new file mode 100644 index 00000000000..6ecdb7e9f6d --- /dev/null +++ b/src/main/java/com/stripe/events/V2CoreAccountUpdatedEventNotification.java @@ -0,0 +1,27 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.core.Account; +import com.stripe.model.v2.core.Event.RelatedObject; +import com.stripe.model.v2.core.EventNotification; +import lombok.Getter; + +@Getter +public final class V2CoreAccountUpdatedEventNotification extends EventNotification { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public Account fetchRelatedObject() throws StripeException { + return (Account) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V2CoreAccountUpdatedEvent fetchEvent() throws StripeException { + return (V2CoreAccountUpdatedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/model/v2/EventDataClassLookup.java b/src/main/java/com/stripe/model/v2/EventDataClassLookup.java index 87f63158a96..4acab7f5e44 100644 --- a/src/main/java/com/stripe/model/v2/EventDataClassLookup.java +++ b/src/main/java/com/stripe/model/v2/EventDataClassLookup.java @@ -40,6 +40,53 @@ public final class EventDataClassLookup { com.stripe.events.V1BillingMeterErrorReportTriggeredEvent.class); eventClassLookup.put( "v1.billing.meter.no_meter_found", com.stripe.events.V1BillingMeterNoMeterFoundEvent.class); + eventClassLookup.put( + "v2.core.account.closed", com.stripe.events.V2CoreAccountClosedEvent.class); + eventClassLookup.put( + "v2.core.account.created", com.stripe.events.V2CoreAccountCreatedEvent.class); + eventClassLookup.put( + "v2.core.account.updated", com.stripe.events.V2CoreAccountUpdatedEvent.class); + eventClassLookup.put( + "v2.core.account[configuration.customer].capability_status_updated", + com.stripe.events.V2CoreAccountIncludingConfigurationCustomerCapabilityStatusUpdatedEvent + .class); + eventClassLookup.put( + "v2.core.account[configuration.customer].updated", + com.stripe.events.V2CoreAccountIncludingConfigurationCustomerUpdatedEvent.class); + eventClassLookup.put( + "v2.core.account[configuration.merchant].capability_status_updated", + com.stripe.events.V2CoreAccountIncludingConfigurationMerchantCapabilityStatusUpdatedEvent + .class); + eventClassLookup.put( + "v2.core.account[configuration.merchant].updated", + com.stripe.events.V2CoreAccountIncludingConfigurationMerchantUpdatedEvent.class); + eventClassLookup.put( + "v2.core.account[configuration.recipient].capability_status_updated", + com.stripe.events.V2CoreAccountIncludingConfigurationRecipientCapabilityStatusUpdatedEvent + .class); + eventClassLookup.put( + "v2.core.account[configuration.recipient].updated", + com.stripe.events.V2CoreAccountIncludingConfigurationRecipientUpdatedEvent.class); + eventClassLookup.put( + "v2.core.account[defaults].updated", + com.stripe.events.V2CoreAccountIncludingDefaultsUpdatedEvent.class); + eventClassLookup.put( + "v2.core.account[future_requirements].updated", + com.stripe.events.V2CoreAccountIncludingFutureRequirementsUpdatedEvent.class); + eventClassLookup.put( + "v2.core.account[identity].updated", + com.stripe.events.V2CoreAccountIncludingIdentityUpdatedEvent.class); + eventClassLookup.put( + "v2.core.account[requirements].updated", + com.stripe.events.V2CoreAccountIncludingRequirementsUpdatedEvent.class); + eventClassLookup.put( + "v2.core.account_link.returned", com.stripe.events.V2CoreAccountLinkReturnedEvent.class); + eventClassLookup.put( + "v2.core.account_person.created", com.stripe.events.V2CoreAccountPersonCreatedEvent.class); + eventClassLookup.put( + "v2.core.account_person.deleted", com.stripe.events.V2CoreAccountPersonDeletedEvent.class); + eventClassLookup.put( + "v2.core.account_person.updated", com.stripe.events.V2CoreAccountPersonUpdatedEvent.class); eventClassLookup.put( "v2.core.event_destination.ping", com.stripe.events.V2CoreEventDestinationPingEvent.class); } diff --git a/src/main/java/com/stripe/model/v2/EventNotificationClassLookup.java b/src/main/java/com/stripe/model/v2/EventNotificationClassLookup.java index ba7d9ac1b89..50c66ed6ae1 100644 --- a/src/main/java/com/stripe/model/v2/EventNotificationClassLookup.java +++ b/src/main/java/com/stripe/model/v2/EventNotificationClassLookup.java @@ -22,6 +22,63 @@ public final class EventNotificationClassLookup { eventClassLookup.put( "v1.billing.meter.no_meter_found", com.stripe.events.V1BillingMeterNoMeterFoundEventNotification.class); + eventClassLookup.put( + "v2.core.account.closed", com.stripe.events.V2CoreAccountClosedEventNotification.class); + eventClassLookup.put( + "v2.core.account.created", com.stripe.events.V2CoreAccountCreatedEventNotification.class); + eventClassLookup.put( + "v2.core.account.updated", com.stripe.events.V2CoreAccountUpdatedEventNotification.class); + eventClassLookup.put( + "v2.core.account[configuration.customer].capability_status_updated", + com.stripe.events + .V2CoreAccountIncludingConfigurationCustomerCapabilityStatusUpdatedEventNotification + .class); + eventClassLookup.put( + "v2.core.account[configuration.customer].updated", + com.stripe.events.V2CoreAccountIncludingConfigurationCustomerUpdatedEventNotification + .class); + eventClassLookup.put( + "v2.core.account[configuration.merchant].capability_status_updated", + com.stripe.events + .V2CoreAccountIncludingConfigurationMerchantCapabilityStatusUpdatedEventNotification + .class); + eventClassLookup.put( + "v2.core.account[configuration.merchant].updated", + com.stripe.events.V2CoreAccountIncludingConfigurationMerchantUpdatedEventNotification + .class); + eventClassLookup.put( + "v2.core.account[configuration.recipient].capability_status_updated", + com.stripe.events + .V2CoreAccountIncludingConfigurationRecipientCapabilityStatusUpdatedEventNotification + .class); + eventClassLookup.put( + "v2.core.account[configuration.recipient].updated", + com.stripe.events.V2CoreAccountIncludingConfigurationRecipientUpdatedEventNotification + .class); + eventClassLookup.put( + "v2.core.account[defaults].updated", + com.stripe.events.V2CoreAccountIncludingDefaultsUpdatedEventNotification.class); + eventClassLookup.put( + "v2.core.account[future_requirements].updated", + com.stripe.events.V2CoreAccountIncludingFutureRequirementsUpdatedEventNotification.class); + eventClassLookup.put( + "v2.core.account[identity].updated", + com.stripe.events.V2CoreAccountIncludingIdentityUpdatedEventNotification.class); + eventClassLookup.put( + "v2.core.account[requirements].updated", + com.stripe.events.V2CoreAccountIncludingRequirementsUpdatedEventNotification.class); + eventClassLookup.put( + "v2.core.account_link.returned", + com.stripe.events.V2CoreAccountLinkReturnedEventNotification.class); + eventClassLookup.put( + "v2.core.account_person.created", + com.stripe.events.V2CoreAccountPersonCreatedEventNotification.class); + eventClassLookup.put( + "v2.core.account_person.deleted", + com.stripe.events.V2CoreAccountPersonDeletedEventNotification.class); + eventClassLookup.put( + "v2.core.account_person.updated", + com.stripe.events.V2CoreAccountPersonUpdatedEventNotification.class); eventClassLookup.put( "v2.core.event_destination.ping", com.stripe.events.V2CoreEventDestinationPingEventNotification.class); From 1afcc9caf2304eb1eaf330482de8e2c64edd6ea3 Mon Sep 17 00:00:00 2001 From: Michael Broshi Date: Fri, 16 Jan 2026 16:24:24 -0500 Subject: [PATCH 3/3] Bump version to 31.2.0 --- CHANGELOG.md | 6 ++++++ README.md | 10 +++++----- VERSION | 2 +- gradle.properties | 2 +- src/main/java/com/stripe/Stripe.java | 2 +- 5 files changed, 14 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 39fd038c2f0..5aecbf1e132 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +## 31.2.0 - 2026-01-16 +* [#2144](https://github.com/stripe/stripe-java/pull/2144) Update generated code + * Add support for event notifications `V2CoreAccountClosedEvent`, `V2CoreAccountCreatedEvent`, `V2CoreAccountIncludingConfigurationCustomerCapabilityStatusUpdatedEvent`, `V2CoreAccountIncludingConfigurationCustomerUpdatedEvent`, `V2CoreAccountIncludingConfigurationMerchantCapabilityStatusUpdatedEvent`, `V2CoreAccountIncludingConfigurationMerchantUpdatedEvent`, `V2CoreAccountIncludingConfigurationRecipientCapabilityStatusUpdatedEvent`, `V2CoreAccountIncludingConfigurationRecipientUpdatedEvent`, `V2CoreAccountIncludingDefaultsUpdatedEvent`, `V2CoreAccountIncludingFutureRequirementsUpdatedEvent`, `V2CoreAccountIncludingIdentityUpdatedEvent`, `V2CoreAccountIncludingRequirementsUpdatedEvent`, and `V2CoreAccountUpdatedEvent` with related object `v2.core.Account` + * Add support for event notification `V2CoreAccountLinkReturnedEvent` + * Add support for event notifications `V2CoreAccountPersonCreatedEvent`, `V2CoreAccountPersonDeletedEvent`, and `V2CoreAccountPersonUpdatedEvent` with related object `v2.core.AccountPerson` + ## 31.1.0 - 2025-12-16 This release changes the pinned API version to `2025-12-15.clover`. diff --git a/README.md b/README.md index 9f002dd38f4..943116fd6ea 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Stripe Java client library -[![Maven Central](https://img.shields.io/badge/maven--central-v31.1.0-blue)](https://mvnrepository.com/artifact/com.stripe/stripe-java) +[![Maven Central](https://img.shields.io/badge/maven--central-v31.2.0-blue)](https://mvnrepository.com/artifact/com.stripe/stripe-java) [![JavaDoc](http://img.shields.io/badge/javadoc-reference-blue.svg)](https://stripe.dev/stripe-java) [![Build Status](https://github.com/stripe/stripe-java/actions/workflows/ci.yml/badge.svg?branch=master)](https://github.com/stripe/stripe-java/actions?query=branch%3Amaster) @@ -23,7 +23,7 @@ We support LTS versions of the JDK. Currently, that's Java versions: Add this dependency to your project's build file: ```groovy -implementation "com.stripe:stripe-java:31.1.0" +implementation "com.stripe:stripe-java:31.2.0" ``` ### Maven users @@ -34,7 +34,7 @@ Add this dependency to your project's POM: com.stripe stripe-java - 31.1.0 + 31.2.0 ``` @@ -43,8 +43,8 @@ Add this dependency to your project's POM: If you are not using Gradle or Maven, you will need to manually install the following JARs: 1. The Stripe JAR: - - Download the latest release version from [Maven Central](https://repo1.maven.org/maven2/com/stripe/stripe-java/31.1.0/stripe-java-31.1.0.jar) - - Current release version: 31.1.0 + - Download the latest release version from [Maven Central](https://repo1.maven.org/maven2/com/stripe/stripe-java/31.2.0/stripe-java-31.2.0.jar) + - Current release version: 31.2.0 2. Google Gson: - The Stripe JAR builds and tests with Gson version 2.10.1 diff --git a/VERSION b/VERSION index cc85ff7699a..90b07d478b0 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -31.1.0 +31.2.0 diff --git a/gradle.properties b/gradle.properties index fab8ff14e47..18deff1d62a 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,5 +1,5 @@ GROUP=com.stripe -VERSION_NAME=31.1.0 +VERSION_NAME=31.2.0 POM_URL=https://github.com/stripe/stripe-java POM_SCM_URL=git@github.com:stripe/stripe-java.git diff --git a/src/main/java/com/stripe/Stripe.java b/src/main/java/com/stripe/Stripe.java index b7cfc92f083..73cd3991d3b 100644 --- a/src/main/java/com/stripe/Stripe.java +++ b/src/main/java/com/stripe/Stripe.java @@ -14,7 +14,7 @@ public abstract class Stripe { public static final String LIVE_API_BASE = "https://api.stripe.com"; public static final String UPLOAD_API_BASE = "https://files.stripe.com"; public static final String METER_EVENTS_API_BASE = "https://meter-events.stripe.com"; - public static final String VERSION = "31.1.0"; + public static final String VERSION = "31.2.0"; public static volatile String apiKey; public static volatile String clientId;