Skip to content

Commit dc40165

Browse files
Merge pull request #2216 from stripe/latest-codegen-private-preview
Update generated code for private-preview
2 parents 6d3ec4a + 8cccc20 commit dc40165

68 files changed

Lines changed: 3979 additions & 870 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

CODEGEN_VERSION

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

OPENAPI_VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v2256
1+
v2261

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/Invoice.java

Lines changed: 1 addition & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -2794,37 +2794,7 @@ public static class Installments extends StripeObject {
27942794
@Getter
27952795
@Setter
27962796
@EqualsAndHashCode(callSuper = false)
2797-
public static class CheckScan extends StripeObject {
2798-
@SerializedName("check_deposit_address")
2799-
CheckDepositAddress checkDepositAddress;
2800-
2801-
/**
2802-
* For more details about CheckDepositAddress, please refer to the <a
2803-
* href="https://docs.stripe.com/api">API Reference.</a>
2804-
*/
2805-
@Getter
2806-
@Setter
2807-
@EqualsAndHashCode(callSuper = false)
2808-
public static class CheckDepositAddress extends StripeObject {
2809-
@SerializedName("city")
2810-
String city;
2811-
2812-
@SerializedName("country")
2813-
String country;
2814-
2815-
@SerializedName("line1")
2816-
String line1;
2817-
2818-
@SerializedName("line2")
2819-
String line2;
2820-
2821-
@SerializedName("postal_code")
2822-
String postalCode;
2823-
2824-
@SerializedName("state")
2825-
String state;
2826-
}
2827-
}
2797+
public static class CheckScan extends StripeObject {}
28282798

28292799
/**
28302800
* For more details about CustomerBalance, please refer to the <a

0 commit comments

Comments
 (0)