Skip to content

Commit

Permalink
Merge pull request #1775 from stripe/latest-codegen-beta
Browse files Browse the repository at this point in the history
Update generated code for beta
  • Loading branch information
stripe-openapi[bot] committed Apr 4, 2024
2 parents 18f0b5e + 5ddfeaa commit fddc0c1
Show file tree
Hide file tree
Showing 58 changed files with 3,422 additions and 521 deletions.
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v912
v932
35 changes: 33 additions & 2 deletions src/main/java/com/stripe/model/Account.java
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,9 @@ public class Account extends ApiResource implements MetadataStore<Account>, Paym
@SerializedName("requirements")
Requirements requirements;

@SerializedName("risk_controls")
RiskControls riskControls;

/** Options for customizing how the account functions within Stripe. */
@SerializedName("settings")
Settings settings;
Expand Down Expand Up @@ -757,7 +760,7 @@ public static class BusinessProfile extends StripeObject {
public static class AnnualRevenue extends StripeObject {
/**
* A non-negative integer representing the amount in the <a
* href="https://stripe.com/docs/currencies#zero-decimal">smallest currency unit</a>.
* href="https://docs.stripe.com/currencies#zero-decimal">smallest currency unit</a>.
*/
@SerializedName("amount")
Long amount;
Expand All @@ -784,7 +787,7 @@ public static class AnnualRevenue extends StripeObject {
public static class MonthlyEstimatedRevenue extends StripeObject {
/**
* A non-negative integer representing how much to charge in the <a
* href="https://stripe.com/docs/currencies#zero-decimal">smallest currency unit</a>.
* href="https://docs.stripe.com/currencies#zero-decimal">smallest currency unit</a>.
*/
@SerializedName("amount")
Long amount;
Expand Down Expand Up @@ -1866,6 +1869,33 @@ public static class Errors extends StripeObject {
}
}

@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
public static class RiskControls extends StripeObject {
@SerializedName("charges")
Charges charges;

@SerializedName("payouts")
Payouts payouts;

@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
public static class Charges extends StripeObject {
@SerializedName("pause_requested")
Boolean pauseRequested;
}

@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
public static class Payouts extends StripeObject {
@SerializedName("pause_requested")
Boolean pauseRequested;
}
}

@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
Expand Down Expand Up @@ -2350,6 +2380,7 @@ public void setResponseGetter(StripeResponseGetter responseGetter) {
trySetResponseGetter(futureRequirements, responseGetter);
trySetResponseGetter(individual, responseGetter);
trySetResponseGetter(requirements, responseGetter);
trySetResponseGetter(riskControls, responseGetter);
trySetResponseGetter(settings, responseGetter);
trySetResponseGetter(tosAcceptance, responseGetter);
}
Expand Down
110 changes: 44 additions & 66 deletions src/main/java/com/stripe/model/Invoice.java
Original file line number Diff line number Diff line change
Expand Up @@ -1174,12 +1174,10 @@ public static Invoice create(InvoiceCreateParams params, RequestOptions options)
*
* <p>You can preview the effects of updating a subscription, including a preview of what
* proration will take place. To ensure that the actual proration is calculated exactly the same
* as the previewed proration, you should pass a {@code proration_date} parameter when doing the
* actual subscription update. The value passed in should be the same as the {@code
* subscription_proration_date} returned on the upcoming invoice resource. The recommended way to
* get only the prorations being previewed is to consider only proration line items where {@code
* period[start]} is equal to the {@code subscription_proration_date} on the upcoming invoice
* resource.
* as the previewed proration, you should pass the {@code subscription_details.proration_date}
* parameter when doing the actual subscription update. The recommended way to get only the
* prorations being previewed is to consider only proration line items where {@code period[start]}
* is equal to the {@code subscription_details.proration_date} value passed in the request.
*/
public static Invoice createPreview() throws StripeException {
return createPreview((Map<String, Object>) null, (RequestOptions) null);
Expand All @@ -1198,12 +1196,10 @@ public static Invoice createPreview() throws StripeException {
*
* <p>You can preview the effects of updating a subscription, including a preview of what
* proration will take place. To ensure that the actual proration is calculated exactly the same
* as the previewed proration, you should pass a {@code proration_date} parameter when doing the
* actual subscription update. The value passed in should be the same as the {@code
* subscription_proration_date} returned on the upcoming invoice resource. The recommended way to
* get only the prorations being previewed is to consider only proration line items where {@code
* period[start]} is equal to the {@code subscription_proration_date} on the upcoming invoice
* resource.
* as the previewed proration, you should pass the {@code subscription_details.proration_date}
* parameter when doing the actual subscription update. The recommended way to get only the
* prorations being previewed is to consider only proration line items where {@code period[start]}
* is equal to the {@code subscription_details.proration_date} value passed in the request.
*/
public static Invoice createPreview(RequestOptions options) throws StripeException {
return createPreview((Map<String, Object>) null, options);
Expand All @@ -1222,12 +1218,10 @@ public static Invoice createPreview(RequestOptions options) throws StripeExcepti
*
* <p>You can preview the effects of updating a subscription, including a preview of what
* proration will take place. To ensure that the actual proration is calculated exactly the same
* as the previewed proration, you should pass a {@code proration_date} parameter when doing the
* actual subscription update. The value passed in should be the same as the {@code
* subscription_proration_date} returned on the upcoming invoice resource. The recommended way to
* get only the prorations being previewed is to consider only proration line items where {@code
* period[start]} is equal to the {@code subscription_proration_date} on the upcoming invoice
* resource.
* as the previewed proration, you should pass the {@code subscription_details.proration_date}
* parameter when doing the actual subscription update. The recommended way to get only the
* prorations being previewed is to consider only proration line items where {@code period[start]}
* is equal to the {@code subscription_details.proration_date} value passed in the request.
*/
public static Invoice createPreview(Map<String, Object> params) throws StripeException {
return createPreview(params, (RequestOptions) null);
Expand All @@ -1246,12 +1240,10 @@ public static Invoice createPreview(Map<String, Object> params) throws StripeExc
*
* <p>You can preview the effects of updating a subscription, including a preview of what
* proration will take place. To ensure that the actual proration is calculated exactly the same
* as the previewed proration, you should pass a {@code proration_date} parameter when doing the
* actual subscription update. The value passed in should be the same as the {@code
* subscription_proration_date} returned on the upcoming invoice resource. The recommended way to
* get only the prorations being previewed is to consider only proration line items where {@code
* period[start]} is equal to the {@code subscription_proration_date} on the upcoming invoice
* resource.
* as the previewed proration, you should pass the {@code subscription_details.proration_date}
* parameter when doing the actual subscription update. The recommended way to get only the
* prorations being previewed is to consider only proration line items where {@code period[start]}
* is equal to the {@code subscription_details.proration_date} value passed in the request.
*/
public static Invoice createPreview(Map<String, Object> params, RequestOptions options)
throws StripeException {
Expand All @@ -1275,12 +1267,10 @@ public static Invoice createPreview(Map<String, Object> params, RequestOptions o
*
* <p>You can preview the effects of updating a subscription, including a preview of what
* proration will take place. To ensure that the actual proration is calculated exactly the same
* as the previewed proration, you should pass a {@code proration_date} parameter when doing the
* actual subscription update. The value passed in should be the same as the {@code
* subscription_proration_date} returned on the upcoming invoice resource. The recommended way to
* get only the prorations being previewed is to consider only proration line items where {@code
* period[start]} is equal to the {@code subscription_proration_date} on the upcoming invoice
* resource.
* as the previewed proration, you should pass the {@code subscription_details.proration_date}
* parameter when doing the actual subscription update. The recommended way to get only the
* prorations being previewed is to consider only proration line items where {@code period[start]}
* is equal to the {@code subscription_details.proration_date} value passed in the request.
*/
public static Invoice createPreview(InvoiceCreatePreviewParams params) throws StripeException {
return createPreview(params, (RequestOptions) null);
Expand All @@ -1299,12 +1289,10 @@ public static Invoice createPreview(InvoiceCreatePreviewParams params) throws St
*
* <p>You can preview the effects of updating a subscription, including a preview of what
* proration will take place. To ensure that the actual proration is calculated exactly the same
* as the previewed proration, you should pass a {@code proration_date} parameter when doing the
* actual subscription update. The value passed in should be the same as the {@code
* subscription_proration_date} returned on the upcoming invoice resource. The recommended way to
* get only the prorations being previewed is to consider only proration line items where {@code
* period[start]} is equal to the {@code subscription_proration_date} on the upcoming invoice
* resource.
* as the previewed proration, you should pass the {@code subscription_details.proration_date}
* parameter when doing the actual subscription update. The recommended way to get only the
* prorations being previewed is to consider only proration line items where {@code period[start]}
* is equal to the {@code subscription_details.proration_date} value passed in the request.
*/
public static Invoice createPreview(InvoiceCreatePreviewParams params, RequestOptions options)
throws StripeException {
Expand Down Expand Up @@ -1886,12 +1874,10 @@ public Invoice sendInvoice(InvoiceSendInvoiceParams params, RequestOptions optio
*
* <p>You can preview the effects of updating a subscription, including a preview of what
* proration will take place. To ensure that the actual proration is calculated exactly the same
* as the previewed proration, you should pass a {@code proration_date} parameter when doing the
* actual subscription update. The value passed in should be the same as the {@code
* subscription_proration_date} returned on the upcoming invoice resource. The recommended way to
* get only the prorations being previewed is to consider only proration line items where {@code
* period[start]} is equal to the {@code subscription_proration_date} on the upcoming invoice
* resource.
* as the previewed proration, you should pass the {@code subscription_proration_date} parameter
* when doing the actual subscription update. The recommended way to get only the prorations being
* previewed is to consider only proration line items where {@code period[start]} is equal to the
* {@code subscription_proration_date} value passed in the request.
*/
public static Invoice upcoming() throws StripeException {
return upcoming((Map<String, Object>) null, (RequestOptions) null);
Expand All @@ -1910,12 +1896,10 @@ public static Invoice upcoming() throws StripeException {
*
* <p>You can preview the effects of updating a subscription, including a preview of what
* proration will take place. To ensure that the actual proration is calculated exactly the same
* as the previewed proration, you should pass a {@code proration_date} parameter when doing the
* actual subscription update. The value passed in should be the same as the {@code
* subscription_proration_date} returned on the upcoming invoice resource. The recommended way to
* get only the prorations being previewed is to consider only proration line items where {@code
* period[start]} is equal to the {@code subscription_proration_date} on the upcoming invoice
* resource.
* as the previewed proration, you should pass the {@code subscription_proration_date} parameter
* when doing the actual subscription update. The recommended way to get only the prorations being
* previewed is to consider only proration line items where {@code period[start]} is equal to the
* {@code subscription_proration_date} value passed in the request.
*/
public static Invoice upcoming(Map<String, Object> params) throws StripeException {
return upcoming(params, (RequestOptions) null);
Expand All @@ -1934,12 +1918,10 @@ public static Invoice upcoming(Map<String, Object> params) throws StripeExceptio
*
* <p>You can preview the effects of updating a subscription, including a preview of what
* proration will take place. To ensure that the actual proration is calculated exactly the same
* as the previewed proration, you should pass a {@code proration_date} parameter when doing the
* actual subscription update. The value passed in should be the same as the {@code
* subscription_proration_date} returned on the upcoming invoice resource. The recommended way to
* get only the prorations being previewed is to consider only proration line items where {@code
* period[start]} is equal to the {@code subscription_proration_date} on the upcoming invoice
* resource.
* as the previewed proration, you should pass the {@code subscription_proration_date} parameter
* when doing the actual subscription update. The recommended way to get only the prorations being
* previewed is to consider only proration line items where {@code period[start]} is equal to the
* {@code subscription_proration_date} value passed in the request.
*/
public static Invoice upcoming(Map<String, Object> params, RequestOptions options)
throws StripeException {
Expand All @@ -1963,12 +1945,10 @@ public static Invoice upcoming(Map<String, Object> params, RequestOptions option
*
* <p>You can preview the effects of updating a subscription, including a preview of what
* proration will take place. To ensure that the actual proration is calculated exactly the same
* as the previewed proration, you should pass a {@code proration_date} parameter when doing the
* actual subscription update. The value passed in should be the same as the {@code
* subscription_proration_date} returned on the upcoming invoice resource. The recommended way to
* get only the prorations being previewed is to consider only proration line items where {@code
* period[start]} is equal to the {@code subscription_proration_date} on the upcoming invoice
* resource.
* as the previewed proration, you should pass the {@code subscription_proration_date} parameter
* when doing the actual subscription update. The recommended way to get only the prorations being
* previewed is to consider only proration line items where {@code period[start]} is equal to the
* {@code subscription_proration_date} value passed in the request.
*/
public static Invoice upcoming(InvoiceUpcomingParams params) throws StripeException {
return upcoming(params, (RequestOptions) null);
Expand All @@ -1987,12 +1967,10 @@ public static Invoice upcoming(InvoiceUpcomingParams params) throws StripeExcept
*
* <p>You can preview the effects of updating a subscription, including a preview of what
* proration will take place. To ensure that the actual proration is calculated exactly the same
* as the previewed proration, you should pass a {@code proration_date} parameter when doing the
* actual subscription update. The value passed in should be the same as the {@code
* subscription_proration_date} returned on the upcoming invoice resource. The recommended way to
* get only the prorations being previewed is to consider only proration line items where {@code
* period[start]} is equal to the {@code subscription_proration_date} on the upcoming invoice
* resource.
* as the previewed proration, you should pass the {@code subscription_proration_date} parameter
* when doing the actual subscription update. The recommended way to get only the prorations being
* previewed is to consider only proration line items where {@code period[start]} is equal to the
* {@code subscription_proration_date} value passed in the request.
*/
public static Invoice upcoming(InvoiceUpcomingParams params, RequestOptions options)
throws StripeException {
Expand Down
47 changes: 47 additions & 0 deletions src/main/java/com/stripe/model/PaymentMethodConfiguration.java
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,9 @@ public class PaymentMethodConfiguration extends ApiResource implements HasId {
@SerializedName("wechat_pay")
WechatPay wechatPay;

@SerializedName("zip")
Zip zip;

/** Creates a payment method configuration. */
public static PaymentMethodConfiguration create(Map<String, Object> params)
throws StripeException {
Expand Down Expand Up @@ -2049,6 +2052,49 @@ public static class DisplayPreference extends StripeObject {
}
}

@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
public static class Zip extends StripeObject {
/**
* Whether this payment method may be offered at checkout. True if {@code display_preference} is
* {@code on} and the payment method's capability is active.
*/
@SerializedName("available")
Boolean available;

@SerializedName("display_preference")
DisplayPreference displayPreference;

@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
public static class DisplayPreference extends StripeObject {
/**
* For child configs, whether or not the account's preference will be observed. If {@code
* false}, the parent configuration's default is used.
*/
@SerializedName("overridable")
Boolean overridable;

/**
* The account's display preference.
*
* <p>One of {@code none}, {@code off}, or {@code on}.
*/
@SerializedName("preference")
String preference;

/**
* The effective display preference value.
*
* <p>One of {@code off}, or {@code on}.
*/
@SerializedName("value")
String value;
}
}

@Override
public void setResponseGetter(StripeResponseGetter responseGetter) {
super.setResponseGetter(responseGetter);
Expand Down Expand Up @@ -2091,5 +2137,6 @@ public void setResponseGetter(StripeResponseGetter responseGetter) {
trySetResponseGetter(upi, responseGetter);
trySetResponseGetter(usBankAccount, responseGetter);
trySetResponseGetter(wechatPay, responseGetter);
trySetResponseGetter(zip, responseGetter);
}
}
13 changes: 13 additions & 0 deletions src/main/java/com/stripe/model/SetupAttempt.java
Original file line number Diff line number Diff line change
Expand Up @@ -649,6 +649,10 @@ public static class CardPresent extends StripeObject {
@Setter(lombok.AccessLevel.NONE)
ExpandableField<PaymentMethod> generatedCard;

/** Details about payments collected offline. */
@SerializedName("offline")
Offline offline;

/** Get ID of expandable {@code generatedCard} object. */
public String getGeneratedCard() {
return (this.generatedCard != null) ? this.generatedCard.getId() : null;
Expand All @@ -667,6 +671,15 @@ public void setGeneratedCardObject(PaymentMethod expandableObject) {
this.generatedCard =
new ExpandableField<PaymentMethod>(expandableObject.getId(), expandableObject);
}

@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
public static class Offline extends StripeObject {
/** Time at which the payment was collected while offline. */
@SerializedName("stored_at")
Long storedAt;
}
}

@Getter
Expand Down

0 comments on commit fddc0c1

Please sign in to comment.