Skip to content

Commit 8cccc20

Browse files
Update generated code for v2261 and
1 parent f4ff610 commit 8cccc20

32 files changed

Lines changed: 2361 additions & 42 deletions

CODEGEN_VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
408233d08775bb0592b02d35e578c71ef48d39a2
1+
6a1eb046657923602071d7707e99ce8a004a8216

src/main/java/com/stripe/StripeEventNotificationHandler.java

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -338,6 +338,8 @@
338338
import com.stripe.events.V2IamStripeAccessGrantUpdatedEventNotification;
339339
import com.stripe.events.V2MoneyManagementAdjustmentCreatedEventNotification;
340340
import com.stripe.events.V2MoneyManagementFinancialAccountCreatedEventNotification;
341+
import com.stripe.events.V2MoneyManagementFinancialAccountStatementCreatedEventNotification;
342+
import com.stripe.events.V2MoneyManagementFinancialAccountStatementRestatedEventNotification;
341343
import com.stripe.events.V2MoneyManagementFinancialAccountUpdatedEventNotification;
342344
import com.stripe.events.V2MoneyManagementFinancialAddressActivatedEventNotification;
343345
import com.stripe.events.V2MoneyManagementFinancialAddressFailedEventNotification;
@@ -2550,6 +2552,18 @@ public StripeEventNotificationHandler onV2MoneyManagementFinancialAccountUpdated
25502552
return this;
25512553
}
25522554

2555+
public StripeEventNotificationHandler onV2MoneyManagementFinancialAccountStatementCreated(
2556+
Callback<V2MoneyManagementFinancialAccountStatementCreatedEventNotification> callback) {
2557+
this.register("v2.money_management.financial_account_statement.created", callback);
2558+
return this;
2559+
}
2560+
2561+
public StripeEventNotificationHandler onV2MoneyManagementFinancialAccountStatementRestated(
2562+
Callback<V2MoneyManagementFinancialAccountStatementRestatedEventNotification> callback) {
2563+
this.register("v2.money_management.financial_account_statement.restated", callback);
2564+
return this;
2565+
}
2566+
25532567
public StripeEventNotificationHandler onV2MoneyManagementFinancialAddressActivated(
25542568
Callback<V2MoneyManagementFinancialAddressActivatedEventNotification> callback) {
25552569
this.register("v2.money_management.financial_address.activated", callback);
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
// File generated from our OpenAPI spec
2+
package com.stripe.events;
3+
4+
import com.google.gson.annotations.SerializedName;
5+
import com.stripe.exception.StripeException;
6+
import com.stripe.model.v2.core.Event;
7+
import com.stripe.model.v2.core.Event.RelatedObject;
8+
import com.stripe.model.v2.moneymanagement.FinancialAccountStatement;
9+
import lombok.Getter;
10+
import lombok.Setter;
11+
12+
@Getter
13+
public final class V2MoneyManagementFinancialAccountStatementCreatedEvent extends Event {
14+
/** Data for the v2.money_management.financial_account_statement.created event. */
15+
@SerializedName("data")
16+
V2MoneyManagementFinancialAccountStatementCreatedEvent.EventData data;
17+
18+
@Getter
19+
@Setter
20+
public static final class EventData {
21+
/** The ID of the Financial Account this statement belongs to. */
22+
@SerializedName("financial_account")
23+
String financialAccount;
24+
}
25+
26+
@SerializedName("related_object")
27+
28+
/** Object containing the reference to API resource relevant to the event. */
29+
RelatedObject relatedObject;
30+
31+
/** Retrieves the related object from the API. Make an API request on every call. */
32+
public FinancialAccountStatement fetchRelatedObject() throws StripeException {
33+
return (FinancialAccountStatement) super.fetchRelatedObject(this.relatedObject);
34+
}
35+
}
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
// File generated from our OpenAPI spec
2+
package com.stripe.events;
3+
4+
import com.google.gson.annotations.SerializedName;
5+
import com.stripe.exception.StripeException;
6+
import com.stripe.model.v2.core.Event.RelatedObject;
7+
import com.stripe.model.v2.core.EventNotification;
8+
import com.stripe.model.v2.moneymanagement.FinancialAccountStatement;
9+
import lombok.Getter;
10+
11+
@Getter
12+
public final class V2MoneyManagementFinancialAccountStatementCreatedEventNotification
13+
extends EventNotification {
14+
@SerializedName("related_object")
15+
16+
/** Object containing the reference to API resource relevant to the event. */
17+
RelatedObject relatedObject;
18+
19+
/** Retrieves the related object from the API. Make an API request on every call. */
20+
public FinancialAccountStatement fetchRelatedObject() throws StripeException {
21+
return (FinancialAccountStatement) super.fetchRelatedObject(this.relatedObject);
22+
}
23+
/** Retrieve the corresponding full event from the Stripe API. */
24+
@Override
25+
public V2MoneyManagementFinancialAccountStatementCreatedEvent fetchEvent()
26+
throws StripeException {
27+
return (V2MoneyManagementFinancialAccountStatementCreatedEvent) super.fetchEvent();
28+
}
29+
}
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
// File generated from our OpenAPI spec
2+
package com.stripe.events;
3+
4+
import com.google.gson.annotations.SerializedName;
5+
import com.stripe.exception.StripeException;
6+
import com.stripe.model.v2.core.Event;
7+
import com.stripe.model.v2.core.Event.RelatedObject;
8+
import com.stripe.model.v2.moneymanagement.FinancialAccountStatement;
9+
import lombok.Getter;
10+
import lombok.Setter;
11+
12+
@Getter
13+
public final class V2MoneyManagementFinancialAccountStatementRestatedEvent extends Event {
14+
/** Data for the v2.money_management.financial_account_statement.restated event. */
15+
@SerializedName("data")
16+
V2MoneyManagementFinancialAccountStatementRestatedEvent.EventData data;
17+
18+
@Getter
19+
@Setter
20+
public static final class EventData {
21+
/** The ID of the Financial Account this statement belongs to. */
22+
@SerializedName("financial_account")
23+
String financialAccount;
24+
/** The ID of the new statement that replaces the original. */
25+
@SerializedName("restatement_id")
26+
String restatementId;
27+
}
28+
29+
@SerializedName("related_object")
30+
31+
/** Object containing the reference to API resource relevant to the event. */
32+
RelatedObject relatedObject;
33+
34+
/** Retrieves the related object from the API. Make an API request on every call. */
35+
public FinancialAccountStatement fetchRelatedObject() throws StripeException {
36+
return (FinancialAccountStatement) super.fetchRelatedObject(this.relatedObject);
37+
}
38+
}
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
// File generated from our OpenAPI spec
2+
package com.stripe.events;
3+
4+
import com.google.gson.annotations.SerializedName;
5+
import com.stripe.exception.StripeException;
6+
import com.stripe.model.v2.core.Event.RelatedObject;
7+
import com.stripe.model.v2.core.EventNotification;
8+
import com.stripe.model.v2.moneymanagement.FinancialAccountStatement;
9+
import lombok.Getter;
10+
11+
@Getter
12+
public final class V2MoneyManagementFinancialAccountStatementRestatedEventNotification
13+
extends EventNotification {
14+
@SerializedName("related_object")
15+
16+
/** Object containing the reference to API resource relevant to the event. */
17+
RelatedObject relatedObject;
18+
19+
/** Retrieves the related object from the API. Make an API request on every call. */
20+
public FinancialAccountStatement fetchRelatedObject() throws StripeException {
21+
return (FinancialAccountStatement) super.fetchRelatedObject(this.relatedObject);
22+
}
23+
/** Retrieve the corresponding full event from the Stripe API. */
24+
@Override
25+
public V2MoneyManagementFinancialAccountStatementRestatedEvent fetchEvent()
26+
throws StripeException {
27+
return (V2MoneyManagementFinancialAccountStatementRestatedEvent) super.fetchEvent();
28+
}
29+
}

src/main/java/com/stripe/events/V2PaymentsOffSessionPaymentAttemptFailedEvent.java

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,22 @@
77
import com.stripe.model.v2.core.Event.RelatedObject;
88
import com.stripe.model.v2.payments.OffSessionPayment;
99
import lombok.Getter;
10+
import lombok.Setter;
1011

1112
@Getter
1213
public final class V2PaymentsOffSessionPaymentAttemptFailedEvent extends Event {
14+
/** Data for the v2.payments.off_session_payment.attempt_failed event. */
15+
@SerializedName("data")
16+
V2PaymentsOffSessionPaymentAttemptFailedEvent.EventData data;
17+
18+
@Getter
19+
@Setter
20+
public static final class EventData {
21+
/** The ID of the payment attempt record associated with this failed attempt. */
22+
@SerializedName("payment_attempt_record")
23+
String paymentAttemptRecord;
24+
}
25+
1326
@SerializedName("related_object")
1427

1528
/** Object containing the reference to API resource relevant to the event. */

src/main/java/com/stripe/events/V2PaymentsOffSessionPaymentFailedEvent.java

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,25 @@
77
import com.stripe.model.v2.core.Event.RelatedObject;
88
import com.stripe.model.v2.payments.OffSessionPayment;
99
import lombok.Getter;
10+
import lombok.Setter;
1011

1112
@Getter
1213
public final class V2PaymentsOffSessionPaymentFailedEvent extends Event {
14+
/** Data for the v2.payments.off_session_payment.failed event. */
15+
@SerializedName("data")
16+
V2PaymentsOffSessionPaymentFailedEvent.EventData data;
17+
18+
@Getter
19+
@Setter
20+
public static final class EventData {
21+
/**
22+
* The ID of the payment attempt record associated with this terminal failure. Equal to the
23+
* {@code latest_payment_attempt_record} on the Off-Session Payment object.
24+
*/
25+
@SerializedName("payment_attempt_record")
26+
String paymentAttemptRecord;
27+
}
28+
1329
@SerializedName("related_object")
1430

1531
/** Object containing the reference to API resource relevant to the event. */

src/main/java/com/stripe/model/v2/EventDataClassLookup.java

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,8 @@ public final class EventDataClassLookup {
166166
classLookup.put("v2.core.connection_session", com.stripe.model.v2.core.ConnectionSession.class);
167167
classLookup.put("v2.core.event", com.stripe.model.v2.core.Event.class);
168168
classLookup.put("v2.core.event_destination", com.stripe.model.v2.core.EventDestination.class);
169+
classLookup.put("v2.core.fee_batch", com.stripe.model.v2.core.FeeBatch.class);
170+
classLookup.put("v2.core.fee_entry", com.stripe.model.v2.core.FeeEntry.class);
169171

170172
classLookup.put(
171173
"v2.core.vault.gb_bank_account", com.stripe.model.v2.core.vault.GbBankAccount.class);
@@ -190,9 +192,15 @@ public final class EventDataClassLookup {
190192
classLookup.put(
191193
"v2.money_management.currency_conversion",
192194
com.stripe.model.v2.moneymanagement.CurrencyConversion.class);
195+
classLookup.put(
196+
"v2.money_management.debit_dispute",
197+
com.stripe.model.v2.moneymanagement.DebitDispute.class);
193198
classLookup.put(
194199
"v2.money_management.financial_account",
195200
com.stripe.model.v2.moneymanagement.FinancialAccount.class);
201+
classLookup.put(
202+
"v2.money_management.financial_account_statement",
203+
com.stripe.model.v2.moneymanagement.FinancialAccountStatement.class);
196204
classLookup.put(
197205
"v2.money_management.financial_address",
198206
com.stripe.model.v2.moneymanagement.FinancialAddress.class);
@@ -1035,6 +1043,12 @@ public final class EventDataClassLookup {
10351043
eventClassLookup.put(
10361044
"v2.money_management.financial_account.updated",
10371045
com.stripe.events.V2MoneyManagementFinancialAccountUpdatedEvent.class);
1046+
eventClassLookup.put(
1047+
"v2.money_management.financial_account_statement.created",
1048+
com.stripe.events.V2MoneyManagementFinancialAccountStatementCreatedEvent.class);
1049+
eventClassLookup.put(
1050+
"v2.money_management.financial_account_statement.restated",
1051+
com.stripe.events.V2MoneyManagementFinancialAccountStatementRestatedEvent.class);
10381052
eventClassLookup.put(
10391053
"v2.money_management.financial_address.activated",
10401054
com.stripe.events.V2MoneyManagementFinancialAddressActivatedEvent.class);

src/main/java/com/stripe/model/v2/EventNotificationClassLookup.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -941,6 +941,13 @@ public final class EventNotificationClassLookup {
941941
eventClassLookup.put(
942942
"v2.money_management.financial_account.updated",
943943
com.stripe.events.V2MoneyManagementFinancialAccountUpdatedEventNotification.class);
944+
eventClassLookup.put(
945+
"v2.money_management.financial_account_statement.created",
946+
com.stripe.events.V2MoneyManagementFinancialAccountStatementCreatedEventNotification.class);
947+
eventClassLookup.put(
948+
"v2.money_management.financial_account_statement.restated",
949+
com.stripe.events.V2MoneyManagementFinancialAccountStatementRestatedEventNotification
950+
.class);
944951
eventClassLookup.put(
945952
"v2.money_management.financial_address.activated",
946953
com.stripe.events.V2MoneyManagementFinancialAddressActivatedEventNotification.class);

0 commit comments

Comments
 (0)