Skip to content

Commit b576d96

Browse files
Update generated code for v2113 and
1 parent 0902639 commit b576d96

13 files changed

+135
-747
lines changed

API_VERSION

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

OPENAPI_VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v2112
1+
v2113
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
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.payments.OffSessionPayment;
9+
import lombok.Getter;
10+
11+
@Getter
12+
public final class V2PaymentsOffSessionPaymentAttemptFailedEvent extends Event {
13+
@SerializedName("related_object")
14+
15+
/** Object containing the reference to API resource relevant to the event. */
16+
RelatedObject relatedObject;
17+
18+
/** Retrieves the related object from the API. Make an API request on every call. */
19+
public OffSessionPayment fetchRelatedObject() throws StripeException {
20+
return (OffSessionPayment) super.fetchRelatedObject(this.relatedObject);
21+
}
22+
}
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
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.payments.OffSessionPayment;
9+
import lombok.Getter;
10+
11+
@Getter
12+
public final class V2PaymentsOffSessionPaymentAttemptFailedEventNotification
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 OffSessionPayment fetchRelatedObject() throws StripeException {
21+
return (OffSessionPayment) super.fetchRelatedObject(this.relatedObject);
22+
}
23+
/** Retrieve the corresponding full event from the Stripe API. */
24+
@Override
25+
public V2PaymentsOffSessionPaymentAttemptFailedEvent fetchEvent() throws StripeException {
26+
return (V2PaymentsOffSessionPaymentAttemptFailedEvent) super.fetchEvent();
27+
}
28+
}
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
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.payments.OffSessionPayment;
9+
import lombok.Getter;
10+
11+
@Getter
12+
public final class V2PaymentsOffSessionPaymentAttemptStartedEvent extends Event {
13+
@SerializedName("related_object")
14+
15+
/** Object containing the reference to API resource relevant to the event. */
16+
RelatedObject relatedObject;
17+
18+
/** Retrieves the related object from the API. Make an API request on every call. */
19+
public OffSessionPayment fetchRelatedObject() throws StripeException {
20+
return (OffSessionPayment) super.fetchRelatedObject(this.relatedObject);
21+
}
22+
}
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
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.payments.OffSessionPayment;
9+
import lombok.Getter;
10+
11+
@Getter
12+
public final class V2PaymentsOffSessionPaymentAttemptStartedEventNotification
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 OffSessionPayment fetchRelatedObject() throws StripeException {
21+
return (OffSessionPayment) super.fetchRelatedObject(this.relatedObject);
22+
}
23+
/** Retrieve the corresponding full event from the Stripe API. */
24+
@Override
25+
public V2PaymentsOffSessionPaymentAttemptStartedEvent fetchEvent() throws StripeException {
26+
return (V2PaymentsOffSessionPaymentAttemptStartedEvent) super.fetchEvent();
27+
}
28+
}

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -261,6 +261,12 @@ public final class EventDataClassLookup {
261261
eventClassLookup.put(
262262
"v2.money_management.transaction.updated",
263263
com.stripe.events.V2MoneyManagementTransactionUpdatedEvent.class);
264+
eventClassLookup.put(
265+
"v2.payments.off_session_payment.attempt_failed",
266+
com.stripe.events.V2PaymentsOffSessionPaymentAttemptFailedEvent.class);
267+
eventClassLookup.put(
268+
"v2.payments.off_session_payment.attempt_started",
269+
com.stripe.events.V2PaymentsOffSessionPaymentAttemptStartedEvent.class);
264270
eventClassLookup.put(
265271
"v2.payments.off_session_payment.authorization_attempt_failed",
266272
com.stripe.events.V2PaymentsOffSessionPaymentAuthorizationAttemptFailedEvent.class);

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,12 @@ public final class EventNotificationClassLookup {
194194
eventClassLookup.put(
195195
"v2.money_management.transaction.updated",
196196
com.stripe.events.V2MoneyManagementTransactionUpdatedEventNotification.class);
197+
eventClassLookup.put(
198+
"v2.payments.off_session_payment.attempt_failed",
199+
com.stripe.events.V2PaymentsOffSessionPaymentAttemptFailedEventNotification.class);
200+
eventClassLookup.put(
201+
"v2.payments.off_session_payment.attempt_started",
202+
com.stripe.events.V2PaymentsOffSessionPaymentAttemptStartedEventNotification.class);
197203
eventClassLookup.put(
198204
"v2.payments.off_session_payment.authorization_attempt_failed",
199205
com.stripe.events.V2PaymentsOffSessionPaymentAuthorizationAttemptFailedEventNotification

src/main/java/com/stripe/model/v2/core/Account.java

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4683,6 +4683,14 @@ public static class Responsibilities extends StripeObject {
46834683
*/
46844684
@SerializedName("losses_collector")
46854685
String lossesCollector;
4686+
4687+
/**
4688+
* A value indicating responsibility for collecting requirements on this account.
4689+
*
4690+
* <p>One of {@code application}, or {@code stripe}.
4691+
*/
4692+
@SerializedName("requirements_collector")
4693+
String requirementsCollector;
46864694
}
46874695
}
46884696

@@ -6281,14 +6289,6 @@ public static class Kanji extends StripeObject {
62816289
@Setter
62826290
@EqualsAndHashCode(callSuper = false)
62836291
public static class Requirements extends StripeObject {
6284-
/**
6285-
* A value indicating responsibility for collecting requirements on this account.
6286-
*
6287-
* <p>One of {@code application}, or {@code stripe}.
6288-
*/
6289-
@SerializedName("collector")
6290-
String collector;
6291-
62926292
/** A list of requirements for the Account. */
62936293
@SerializedName("entries")
62946294
List<Account.Requirements.Entry> entries;
@@ -6538,10 +6538,11 @@ public static class Reference extends StripeObject {
65386538
String resource;
65396539

65406540
/**
6541-
* The type of the reference. An additional hash is included with a name matching the type.
6542-
* It contains additional information specific to the type.
6541+
* The type of the reference. If the type is &quot;inquiry&quot;, the inquiry token can be
6542+
* found in the &quot;inquiry&quot; field. Otherwise the type is an API resource, the token
6543+
* for which can be found in the &quot;resource&quot; field.
65436544
*
6544-
* <p>One of {@code inquiry}, or {@code resource}.
6545+
* <p>One of {@code inquiry}, {@code payment_method}, or {@code person}.
65456546
*/
65466547
@SerializedName("type")
65476548
String type;

src/main/java/com/stripe/model/v2/payments/OffSessionPayment.java

Lines changed: 0 additions & 109 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
import com.stripe.model.StripeObject;
77
import com.stripe.v2.Amount;
88
import java.time.Instant;
9-
import java.util.List;
109
import java.util.Map;
1110
import lombok.EqualsAndHashCode;
1211
import lombok.Getter;
@@ -21,10 +20,6 @@ public class OffSessionPayment extends StripeObject implements HasId {
2120
@SerializedName("amount_capturable")
2221
Amount amountCapturable;
2322

24-
/** Provides industry-specific information about the amount. */
25-
@SerializedName("amount_details")
26-
AmountDetails amountDetails;
27-
2823
/** The “presentment amount” to be collected from the customer. */
2924
@SerializedName("amount_requested")
3025
Amount amountRequested;
@@ -41,14 +36,6 @@ public class OffSessionPayment extends StripeObject implements HasId {
4136
@SerializedName("capture")
4237
Capture capture;
4338

44-
/**
45-
* Whether the OffSessionPayment should be captured automatically or manually.
46-
*
47-
* <p>One of {@code automatic}, or {@code manual}.
48-
*/
49-
@SerializedName("capture_method")
50-
String captureMethod;
51-
5239
/** ID of the owning compartment. */
5340
@SerializedName("compartment_id")
5441
String compartmentId;
@@ -170,102 +157,6 @@ public class OffSessionPayment extends StripeObject implements HasId {
170157
@SerializedName("transfer_data")
171158
TransferData transferData;
172159

173-
/** Provides industry-specific information about the amount. */
174-
@Getter
175-
@Setter
176-
@EqualsAndHashCode(callSuper = false)
177-
public static class AmountDetails extends StripeObject {
178-
/** The amount the total transaction was discounted for. */
179-
@SerializedName("discount_amount")
180-
Long discountAmount;
181-
182-
/**
183-
* A list of line items, each containing information about a product in the PaymentIntent. There
184-
* is a maximum of 100 line items.
185-
*/
186-
@SerializedName("line_items")
187-
List<OffSessionPayment.AmountDetails.LineItem> lineItems;
188-
189-
/** Contains information about the shipping portion of the amount. */
190-
@SerializedName("shipping")
191-
Shipping shipping;
192-
193-
/** Contains information about the tax portion of the amount. */
194-
@SerializedName("tax")
195-
Tax tax;
196-
197-
/**
198-
* For more details about LineItem, please refer to the <a
199-
* href="https://docs.stripe.com/api">API Reference.</a>
200-
*/
201-
@Getter
202-
@Setter
203-
@EqualsAndHashCode(callSuper = false)
204-
public static class LineItem extends StripeObject {
205-
/** The amount an item was discounted for. Positive integer. */
206-
@SerializedName("discount_amount")
207-
Long discountAmount;
208-
209-
/** Unique identifier of the product. At most 12 characters long. */
210-
@SerializedName("product_code")
211-
String productCode;
212-
213-
/** Name of the product. At most 100 characters long. */
214-
@SerializedName("product_name")
215-
String productName;
216-
217-
/** Number of items of the product. Positive integer. */
218-
@SerializedName("quantity")
219-
Long quantity;
220-
221-
/** Contains information about the tax on the item. */
222-
@SerializedName("tax")
223-
Tax tax;
224-
225-
/** Cost of the product. Non-negative integer. */
226-
@SerializedName("unit_cost")
227-
Long unitCost;
228-
229-
/** Contains information about the tax on the item. */
230-
@Getter
231-
@Setter
232-
@EqualsAndHashCode(callSuper = false)
233-
public static class Tax extends StripeObject {
234-
/** Total portion of the amount that is for tax. */
235-
@SerializedName("total_tax_amount")
236-
Long totalTaxAmount;
237-
}
238-
}
239-
240-
/** Contains information about the shipping portion of the amount. */
241-
@Getter
242-
@Setter
243-
@EqualsAndHashCode(callSuper = false)
244-
public static class Shipping extends StripeObject {
245-
/** Portion of the amount that is for shipping. */
246-
@SerializedName("amount")
247-
Long amount;
248-
249-
/** The postal code that represents the shipping source. */
250-
@SerializedName("from_postal_code")
251-
String fromPostalCode;
252-
253-
/** The postal code that represents the shipping destination. */
254-
@SerializedName("to_postal_code")
255-
String toPostalCode;
256-
}
257-
258-
/** Contains information about the tax portion of the amount. */
259-
@Getter
260-
@Setter
261-
@EqualsAndHashCode(callSuper = false)
262-
public static class Tax extends StripeObject {
263-
/** Total portion of the amount that is for tax. */
264-
@SerializedName("total_tax_amount")
265-
Long totalTaxAmount;
266-
}
267-
}
268-
269160
/** Details about the capture configuration for the OffSessionPayment. */
270161
@Getter
271162
@Setter

0 commit comments

Comments
 (0)