From 560b29e2519cac659303540681c92eaabfdb7948 Mon Sep 17 00:00:00 2001 From: "stripe-openapi[bot]" <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Thu, 21 Sep 2023 22:46:21 +0000 Subject: [PATCH 01/25] Update generated code (#1654) * Update generated code for v533 * Update generated code for v534 * Update generated code for v535 * Update generated code for v536 * Update generated code for v539 * Update generated code for v540 * Update generated code for v542 * Update generated code for v545 --------- Co-authored-by: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Co-authored-by: anniel-stripe <97691964+anniel-stripe@users.noreply.github.com> --- OPENAPI_VERSION | 2 +- src/main/java/com/stripe/model/Account.java | 2 +- src/main/java/com/stripe/model/File.java | 89 ++++++------- src/main/java/com/stripe/model/FileLink.java | 6 +- .../java/com/stripe/model/PaymentIntent.java | 24 ++-- .../java/com/stripe/model/PaymentLink.java | 19 ++- src/main/java/com/stripe/model/Person.java | 2 +- src/main/java/com/stripe/model/TaxId.java | 9 +- .../com/stripe/model/checkout/Session.java | 19 ++- .../stripe/model/issuing/Authorization.java | 120 ++++++++--------- .../com/stripe/param/AccountCreateParams.java | 16 +-- .../com/stripe/param/AccountUpdateParams.java | 25 ++-- .../com/stripe/param/FileCreateParams.java | 20 +-- .../stripe/param/FileLinkCreateParams.java | 4 +- .../com/stripe/param/FileLinkListParams.java | 4 +- .../java/com/stripe/param/FileListParams.java | 8 +- .../param/PaymentIntentUpdateParams.java | 36 +++-- .../stripe/param/PaymentLinkCreateParams.java | 115 +++++++++++++++- .../stripe/param/PaymentLinkUpdateParams.java | 125 ++++++++++++++++-- .../param/PaymentMethodCreateParams.java | 12 +- .../param/PersonCollectionCreateParams.java | 13 +- .../com/stripe/param/PersonCreateParams.java | 13 +- .../com/stripe/param/PersonUpdateParams.java | 20 ++- .../com/stripe/param/TokenCreateParams.java | 32 +++-- .../param/checkout/SessionCreateParams.java | 115 +++++++++++++++- .../java/com/stripe/service/FileService.java | 54 ++++---- .../stripe/service/PaymentIntentService.java | 24 ++-- .../service/issuing/AuthorizationService.java | 80 +++++------ 28 files changed, 671 insertions(+), 337 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index e9281bf5d68..688708d739b 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v532 \ No newline at end of file +v545 \ No newline at end of file diff --git a/src/main/java/com/stripe/model/Account.java b/src/main/java/com/stripe/model/Account.java index c0b82b4293a..925f704032f 100644 --- a/src/main/java/com/stripe/model/Account.java +++ b/src/main/java/com/stripe/model/Account.java @@ -120,7 +120,7 @@ public class Account extends ApiResource implements MetadataStore, Paym * for information about platform prefilling and account onboarding steps. * *

Related guide: Handling + * href="https://stripe.com/docs/connect/handling-api-verification#person-information">Handling * identity verification with the API */ @SerializedName("individual") diff --git a/src/main/java/com/stripe/model/File.java b/src/main/java/com/stripe/model/File.java index bb5d7e48758..b1d37c03df7 100644 --- a/src/main/java/com/stripe/model/File.java +++ b/src/main/java/com/stripe/model/File.java @@ -18,11 +18,10 @@ import lombok.Setter; /** - * This is an object representing a file hosted on Stripe's servers. The file may have been uploaded - * by yourself using the create file request - * (for example, when uploading dispute evidence) or it may have been created by Stripe (for - * example, the results of a Sigma scheduled - * query). + * This object represents files hosted on Stripe's servers. You can upload files with the create file request (for example, when + * uploading dispute evidence). Stripe also creates files independetly (for example, the results of + * a Sigma scheduled query). * *

Related guide: File upload guide */ @@ -34,11 +33,11 @@ public class File extends ApiResource implements HasId { @SerializedName("created") Long created; - /** The time at which the file expires and is no longer available in epoch seconds. */ + /** The file expires and isn't available at this time in epoch seconds. */ @SerializedName("expires_at") Long expiresAt; - /** A filename for the file, suitable for saving to a filesystem. */ + /** The suitable name for saving the file to a filesystem. */ @SerializedName("filename") String filename; @@ -76,30 +75,29 @@ public class File extends ApiResource implements HasId { @SerializedName("purpose") String purpose; - /** The size in bytes of the file object. */ + /** The size of the file object in bytes. */ @SerializedName("size") Long size; - /** A user friendly title for the document. */ + /** A suitable title for the document. */ @SerializedName("title") String title; /** - * The type of the file returned (e.g., {@code csv}, {@code pdf}, {@code jpg}, or {@code png}). + * The returned file type (for example, {@code csv}, {@code pdf}, {@code jpg}, or {@code png}). */ @SerializedName("type") String type; - /** The URL from which the file can be downloaded using your live secret API key. */ + /** Use your live secret API key to download the file from this URL. */ @SerializedName("url") String url; /** - * To upload a file to Stripe, you’ll need to send a request of type {@code multipart/form-data}. - * The request should contain the file you would like to upload, as well as the parameters for - * creating a file. + * To upload a file to Stripe, you need to send a request of type {@code multipart/form-data}. + * Include the file you want to upload in the request, and the parameters for creating a file. * - *

All of Stripe’s officially supported Client libraries should have support for sending {@code + *

All of Stripe’s officially supported Client libraries support sending {@code * multipart/form-data}. */ public static File create(Map params) throws StripeException { @@ -107,11 +105,10 @@ public static File create(Map params) throws StripeException { } /** - * To upload a file to Stripe, you’ll need to send a request of type {@code multipart/form-data}. - * The request should contain the file you would like to upload, as well as the parameters for - * creating a file. + * To upload a file to Stripe, you need to send a request of type {@code multipart/form-data}. + * Include the file you want to upload in the request, and the parameters for creating a file. * - *

All of Stripe’s officially supported Client libraries should have support for sending {@code + *

All of Stripe’s officially supported Client libraries support sending {@code * multipart/form-data}. */ public static File create(Map params, RequestOptions options) @@ -129,11 +126,10 @@ public static File create(Map params, RequestOptions options) } /** - * To upload a file to Stripe, you’ll need to send a request of type {@code multipart/form-data}. - * The request should contain the file you would like to upload, as well as the parameters for - * creating a file. + * To upload a file to Stripe, you need to send a request of type {@code multipart/form-data}. + * Include the file you want to upload in the request, and the parameters for creating a file. * - *

All of Stripe’s officially supported Client libraries should have support for sending {@code + *

All of Stripe’s officially supported Client libraries support sending {@code * multipart/form-data}. */ public static File create(FileCreateParams params) throws StripeException { @@ -141,11 +137,10 @@ public static File create(FileCreateParams params) throws StripeException { } /** - * To upload a file to Stripe, you’ll need to send a request of type {@code multipart/form-data}. - * The request should contain the file you would like to upload, as well as the parameters for - * creating a file. + * To upload a file to Stripe, you need to send a request of type {@code multipart/form-data}. + * Include the file you want to upload in the request, and the parameters for creating a file. * - *

All of Stripe’s officially supported Client libraries should have support for sending {@code + *

All of Stripe’s officially supported Client libraries support sending {@code * multipart/form-data}. */ public static File create(FileCreateParams params, RequestOptions options) @@ -164,16 +159,16 @@ public static File create(FileCreateParams params, RequestOptions options) } /** - * Returns a list of the files that your account has access to. The files are returned sorted by - * creation date, with the most recently created files appearing first. + * Returns a list of the files that your account has access to. Stripe sorts and returns the files + * by their creation dates, placing the most recently created files at the top. */ public static FileCollection list(Map params) throws StripeException { return list(params, (RequestOptions) null); } /** - * Returns a list of the files that your account has access to. The files are returned sorted by - * creation date, with the most recently created files appearing first. + * Returns a list of the files that your account has access to. Stripe sorts and returns the files + * by their creation dates, placing the most recently created files at the top. */ public static FileCollection list(Map params, RequestOptions options) throws StripeException { @@ -190,16 +185,16 @@ public static FileCollection list(Map params, RequestOptions opt } /** - * Returns a list of the files that your account has access to. The files are returned sorted by - * creation date, with the most recently created files appearing first. + * Returns a list of the files that your account has access to. Stripe sorts and returns the files + * by their creation dates, placing the most recently created files at the top. */ public static FileCollection list(FileListParams params) throws StripeException { return list(params, (RequestOptions) null); } /** - * Returns a list of the files that your account has access to. The files are returned sorted by - * creation date, with the most recently created files appearing first. + * Returns a list of the files that your account has access to. Stripe sorts and returns the files + * by their creation dates, placing the most recently created files at the top. */ public static FileCollection list(FileListParams params, RequestOptions options) throws StripeException { @@ -217,27 +212,27 @@ public static FileCollection list(FileListParams params, RequestOptions options) } /** - * Retrieves the details of an existing file object. Supply the unique file ID from a file, and - * Stripe will return the corresponding file object. To access file contents, see the File Upload Guide. + * Retrieves the details of an existing file object. After you supply a unique file ID, Stripe + * returns the corresponding file object. Learn how to access file contents. */ public static File retrieve(String file) throws StripeException { return retrieve(file, (Map) null, (RequestOptions) null); } /** - * Retrieves the details of an existing file object. Supply the unique file ID from a file, and - * Stripe will return the corresponding file object. To access file contents, see the File Upload Guide. + * Retrieves the details of an existing file object. After you supply a unique file ID, Stripe + * returns the corresponding file object. Learn how to access file contents. */ public static File retrieve(String file, RequestOptions options) throws StripeException { return retrieve(file, (Map) null, options); } /** - * Retrieves the details of an existing file object. Supply the unique file ID from a file, and - * Stripe will return the corresponding file object. To access file contents, see the File Upload Guide. + * Retrieves the details of an existing file object. After you supply a unique file ID, Stripe + * returns the corresponding file object. Learn how to access file contents. */ public static File retrieve(String file, Map params, RequestOptions options) throws StripeException { @@ -254,9 +249,9 @@ public static File retrieve(String file, Map params, RequestOpti } /** - * Retrieves the details of an existing file object. Supply the unique file ID from a file, and - * Stripe will return the corresponding file object. To access file contents, see the File Upload Guide. + * Retrieves the details of an existing file object. After you supply a unique file ID, Stripe + * returns the corresponding file object. Learn how to access file contents. */ public static File retrieve(String file, FileRetrieveParams params, RequestOptions options) throws StripeException { diff --git a/src/main/java/com/stripe/model/FileLink.java b/src/main/java/com/stripe/model/FileLink.java index 62f722159cc..84238e2765f 100644 --- a/src/main/java/com/stripe/model/FileLink.java +++ b/src/main/java/com/stripe/model/FileLink.java @@ -20,7 +20,7 @@ /** * To share the contents of a {@code File} object with non-Stripe users, you can create a {@code - * FileLink}. {@code FileLink}s contain a URL that can be used to retrieve the contents of the file + * FileLink}. {@code FileLink}s contain a URL that you can use to retrieve the contents of the file * without authentication. */ @Getter @@ -31,11 +31,11 @@ public class FileLink extends ApiResource implements HasId, MetadataStoreDepending on which properties you update, you may need to confirm the PaymentIntent again. - * For example, updating the {@code payment_method} will always require you to confirm the + *

Depending on which properties you update, you might need to confirm the PaymentIntent again. + * For example, updating the {@code payment_method} always requires you to confirm the * PaymentIntent again. If you prefer to update and confirm at the same time, we recommend - * updating properties via the confirm API instead. */ @Override @@ -1408,10 +1408,10 @@ public PaymentIntent update(Map params) throws StripeException { /** * Updates properties on a PaymentIntent object without confirming. * - *

Depending on which properties you update, you may need to confirm the PaymentIntent again. - * For example, updating the {@code payment_method} will always require you to confirm the + *

Depending on which properties you update, you might need to confirm the PaymentIntent again. + * For example, updating the {@code payment_method} always requires you to confirm the * PaymentIntent again. If you prefer to update and confirm at the same time, we recommend - * updating properties via the confirm API instead. */ @Override @@ -1432,10 +1432,10 @@ public PaymentIntent update(Map params, RequestOptions options) /** * Updates properties on a PaymentIntent object without confirming. * - *

Depending on which properties you update, you may need to confirm the PaymentIntent again. - * For example, updating the {@code payment_method} will always require you to confirm the + *

Depending on which properties you update, you might need to confirm the PaymentIntent again. + * For example, updating the {@code payment_method} always requires you to confirm the * PaymentIntent again. If you prefer to update and confirm at the same time, we recommend - * updating properties via the confirm API instead. */ public PaymentIntent update(PaymentIntentUpdateParams params) throws StripeException { @@ -1445,10 +1445,10 @@ public PaymentIntent update(PaymentIntentUpdateParams params) throws StripeExcep /** * Updates properties on a PaymentIntent object without confirming. * - *

Depending on which properties you update, you may need to confirm the PaymentIntent again. - * For example, updating the {@code payment_method} will always require you to confirm the + *

Depending on which properties you update, you might need to confirm the PaymentIntent again. + * For example, updating the {@code payment_method} always requires you to confirm the * PaymentIntent again. If you prefer to update and confirm at the same time, we recommend - * updating properties via the confirm API instead. */ public PaymentIntent update(PaymentIntentUpdateParams params, RequestOptions options) diff --git a/src/main/java/com/stripe/model/PaymentLink.java b/src/main/java/com/stripe/model/PaymentLink.java index e8a335b7b2c..10a5323a2bc 100644 --- a/src/main/java/com/stripe/model/PaymentLink.java +++ b/src/main/java/com/stripe/model/PaymentLink.java @@ -687,11 +687,17 @@ public static class CustomText extends StripeObject { @SerializedName("submit") Submit submit; + /** + * Custom text that should be displayed in place of the default terms of service agreement text. + */ + @SerializedName("terms_of_service_acceptance") + TermsOfServiceAcceptance termsOfServiceAcceptance; + @Getter @Setter @EqualsAndHashCode(callSuper = false) public static class ShippingAddress extends StripeObject { - /** Text may be up to 1000 characters in length. */ + /** Text may be up to 1200 characters in length. */ @SerializedName("message") String message; } @@ -700,7 +706,16 @@ public static class ShippingAddress extends StripeObject { @Setter @EqualsAndHashCode(callSuper = false) public static class Submit extends StripeObject { - /** Text may be up to 1000 characters in length. */ + /** Text may be up to 1200 characters in length. */ + @SerializedName("message") + String message; + } + + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class TermsOfServiceAcceptance extends StripeObject { + /** Text may be up to 1200 characters in length. */ @SerializedName("message") String message; } diff --git a/src/main/java/com/stripe/model/Person.java b/src/main/java/com/stripe/model/Person.java index 5ab747aa8d6..9652e9bcefc 100644 --- a/src/main/java/com/stripe/model/Person.java +++ b/src/main/java/com/stripe/model/Person.java @@ -27,7 +27,7 @@ * information about platform prefilling and account onboarding steps. * *

Related guide: Handling + * href="https://stripe.com/docs/connect/handling-api-verification#person-information">Handling * identity verification with the API */ @Getter diff --git a/src/main/java/com/stripe/model/TaxId.java b/src/main/java/com/stripe/model/TaxId.java index bdd23fc36bd..f4e6029ce25 100644 --- a/src/main/java/com/stripe/model/TaxId.java +++ b/src/main/java/com/stripe/model/TaxId.java @@ -15,11 +15,12 @@ /** * You can add one or multiple tax IDs to a customer. A customer's tax IDs are displayed on - * invoices and credit notes issued for the customer. + * href="https://stripe.com/docs/api/customers">customer or account. Customer and account tax + * IDs get displayed on related invoices and credit notes. * - *

Related guide: Customer tax - * identification numbers + *

Related guides: Customer tax + * identification numbers, Account tax IDs */ @Getter @Setter diff --git a/src/main/java/com/stripe/model/checkout/Session.java b/src/main/java/com/stripe/model/checkout/Session.java index 8bdf237802d..b89f40fb009 100644 --- a/src/main/java/com/stripe/model/checkout/Session.java +++ b/src/main/java/com/stripe/model/checkout/Session.java @@ -1005,11 +1005,17 @@ public static class CustomText extends StripeObject { @SerializedName("submit") Submit submit; + /** + * Custom text that should be displayed in place of the default terms of service agreement text. + */ + @SerializedName("terms_of_service_acceptance") + TermsOfServiceAcceptance termsOfServiceAcceptance; + @Getter @Setter @EqualsAndHashCode(callSuper = false) public static class ShippingAddress extends StripeObject { - /** Text may be up to 1000 characters in length. */ + /** Text may be up to 1200 characters in length. */ @SerializedName("message") String message; } @@ -1018,7 +1024,16 @@ public static class ShippingAddress extends StripeObject { @Setter @EqualsAndHashCode(callSuper = false) public static class Submit extends StripeObject { - /** Text may be up to 1000 characters in length. */ + /** Text may be up to 1200 characters in length. */ + @SerializedName("message") + String message; + } + + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class TermsOfServiceAcceptance extends StripeObject { + /** Text may be up to 1200 characters in length. */ @SerializedName("message") String message; } diff --git a/src/main/java/com/stripe/model/issuing/Authorization.java b/src/main/java/com/stripe/model/issuing/Authorization.java index c47fad12d7a..b68a97d0973 100644 --- a/src/main/java/com/stripe/model/issuing/Authorization.java +++ b/src/main/java/com/stripe/model/issuing/Authorization.java @@ -220,48 +220,48 @@ public void setCardholderObject(Cardholder expandableObject) { } /** - * Approves a pending Issuing {@code Authorization} object. This request should be made within the - * timeout window of the real-time - * authorization flow. You can also respond directly to the webhook request to approve an - * authorization (preferred). More details can be found here. + * authorization flow. This method is deprecated. Instead, respond + * directly to the webhook request to approve an authorization. */ public Authorization approve() throws StripeException { return approve((Map) null, (RequestOptions) null); } /** - * Approves a pending Issuing {@code Authorization} object. This request should be made within the - * timeout window of the real-time - * authorization flow. You can also respond directly to the webhook request to approve an - * authorization (preferred). More details can be found here. + * authorization flow. This method is deprecated. Instead, respond + * directly to the webhook request to approve an authorization. */ public Authorization approve(RequestOptions options) throws StripeException { return approve((Map) null, options); } /** - * Approves a pending Issuing {@code Authorization} object. This request should be made within the - * timeout window of the real-time - * authorization flow. You can also respond directly to the webhook request to approve an - * authorization (preferred). More details can be found here. + * authorization flow. This method is deprecated. Instead, respond + * directly to the webhook request to approve an authorization. */ public Authorization approve(Map params) throws StripeException { return approve(params, (RequestOptions) null); } /** - * Approves a pending Issuing {@code Authorization} object. This request should be made within the - * timeout window of the real-time - * authorization flow. You can also respond directly to the webhook request to approve an - * authorization (preferred). More details can be found here. + * authorization flow. This method is deprecated. Instead, respond + * directly to the webhook request to approve an authorization. */ public Authorization approve(Map params, RequestOptions options) throws StripeException { @@ -280,24 +280,24 @@ public Authorization approve(Map params, RequestOptions options) } /** - * Approves a pending Issuing {@code Authorization} object. This request should be made within the - * timeout window of the real-time - * authorization flow. You can also respond directly to the webhook request to approve an - * authorization (preferred). More details can be found here. + * authorization flow. This method is deprecated. Instead, respond + * directly to the webhook request to approve an authorization. */ public Authorization approve(AuthorizationApproveParams params) throws StripeException { return approve(params, (RequestOptions) null); } /** - * Approves a pending Issuing {@code Authorization} object. This request should be made within the - * timeout window of the real-time - * authorization flow. You can also respond directly to the webhook request to approve an - * authorization (preferred). More details can be found here. + * authorization flow. This method is deprecated. Instead, respond + * directly to the webhook request to approve an authorization. */ public Authorization approve(AuthorizationApproveParams params, RequestOptions options) throws StripeException { @@ -317,48 +317,48 @@ public Authorization approve(AuthorizationApproveParams params, RequestOptions o } /** - * Declines a pending Issuing {@code Authorization} object. This request should be made within the - * timeout window of the real time - * authorization flow. You can also respond directly to the webhook request to decline an - * authorization (preferred). More details can be found here. + * authorization flow. This method is deprecated. Instead, respond + * directly to the webhook request to decline an authorization. */ public Authorization decline() throws StripeException { return decline((Map) null, (RequestOptions) null); } /** - * Declines a pending Issuing {@code Authorization} object. This request should be made within the - * timeout window of the real time - * authorization flow. You can also respond directly to the webhook request to decline an - * authorization (preferred). More details can be found here. + * authorization flow. This method is deprecated. Instead, respond + * directly to the webhook request to decline an authorization. */ public Authorization decline(RequestOptions options) throws StripeException { return decline((Map) null, options); } /** - * Declines a pending Issuing {@code Authorization} object. This request should be made within the - * timeout window of the real time - * authorization flow. You can also respond directly to the webhook request to decline an - * authorization (preferred). More details can be found here. + * authorization flow. This method is deprecated. Instead, respond + * directly to the webhook request to decline an authorization. */ public Authorization decline(Map params) throws StripeException { return decline(params, (RequestOptions) null); } /** - * Declines a pending Issuing {@code Authorization} object. This request should be made within the - * timeout window of the real time - * authorization flow. You can also respond directly to the webhook request to decline an - * authorization (preferred). More details can be found here. + * authorization flow. This method is deprecated. Instead, respond + * directly to the webhook request to decline an authorization. */ public Authorization decline(Map params, RequestOptions options) throws StripeException { @@ -377,24 +377,24 @@ public Authorization decline(Map params, RequestOptions options) } /** - * Declines a pending Issuing {@code Authorization} object. This request should be made within the - * timeout window of the real time - * authorization flow. You can also respond directly to the webhook request to decline an - * authorization (preferred). More details can be found here. + * authorization flow. This method is deprecated. Instead, respond + * directly to the webhook request to decline an authorization. */ public Authorization decline(AuthorizationDeclineParams params) throws StripeException { return decline(params, (RequestOptions) null); } /** - * Declines a pending Issuing {@code Authorization} object. This request should be made within the - * timeout window of the real time - * authorization flow. You can also respond directly to the webhook request to decline an - * authorization (preferred). More details can be found here. + * authorization flow. This method is deprecated. Instead, respond + * directly to the webhook request to decline an authorization. */ public Authorization decline(AuthorizationDeclineParams params, RequestOptions options) throws StripeException { diff --git a/src/main/java/com/stripe/param/AccountCreateParams.java b/src/main/java/com/stripe/param/AccountCreateParams.java index 3cb9afb6a47..17d4eaacff9 100644 --- a/src/main/java/com/stripe/param/AccountCreateParams.java +++ b/src/main/java/com/stripe/param/AccountCreateParams.java @@ -6616,7 +6616,7 @@ public static class Individual { * The government-issued ID number of the individual, as appropriate for the representative's * country. (Examples are a Social Security Number in the U.S., or a Social Insurance Number in * Canada). Instead of the number itself, you can also provide a PII token created with + * href="https://stripe.com/docs/js/tokens/create_token?type=pii">PII token created with * Stripe.js. */ @SerializedName("id_number") @@ -6626,9 +6626,8 @@ public static class Individual { * The government-issued secondary ID number of the individual, as appropriate for the * representative's country, will be used for enhanced verification checks. In Thailand, this * would be the laser code found on the back of an ID card. Instead of the number itself, you - * can also provide a PII token created with - * Stripe.js. + * can also provide a PII + * token created with Stripe.js. */ @SerializedName("id_number_secondary") String idNumberSecondary; @@ -6943,8 +6942,8 @@ public Builder setGender(String gender) { * The government-issued ID number of the individual, as appropriate for the representative's * country. (Examples are a Social Security Number in the U.S., or a Social Insurance Number * in Canada). Instead of the number itself, you can also provide a PII token created - * with Stripe.js. + * href="https://stripe.com/docs/js/tokens/create_token?type=pii">PII token created with + * Stripe.js. */ public Builder setIdNumber(String idNumber) { this.idNumber = idNumber; @@ -6955,9 +6954,8 @@ public Builder setIdNumber(String idNumber) { * The government-issued secondary ID number of the individual, as appropriate for the * representative's country, will be used for enhanced verification checks. In Thailand, this * would be the laser code found on the back of an ID card. Instead of the number itself, you - * can also provide a PII token created - * with Stripe.js. + * can also provide a PII + * token created with Stripe.js. */ public Builder setIdNumberSecondary(String idNumberSecondary) { this.idNumberSecondary = idNumberSecondary; diff --git a/src/main/java/com/stripe/param/AccountUpdateParams.java b/src/main/java/com/stripe/param/AccountUpdateParams.java index 69231b951c9..c9c1b49d0d7 100644 --- a/src/main/java/com/stripe/param/AccountUpdateParams.java +++ b/src/main/java/com/stripe/param/AccountUpdateParams.java @@ -6942,7 +6942,7 @@ public static class Individual { * The government-issued ID number of the individual, as appropriate for the representative's * country. (Examples are a Social Security Number in the U.S., or a Social Insurance Number in * Canada). Instead of the number itself, you can also provide a PII token created with + * href="https://stripe.com/docs/js/tokens/create_token?type=pii">PII token created with * Stripe.js. */ @SerializedName("id_number") @@ -6952,9 +6952,8 @@ public static class Individual { * The government-issued secondary ID number of the individual, as appropriate for the * representative's country, will be used for enhanced verification checks. In Thailand, this * would be the laser code found on the back of an ID card. Instead of the number itself, you - * can also provide a PII token created with - * Stripe.js. + * can also provide a PII + * token created with Stripe.js. */ @SerializedName("id_number_secondary") Object idNumberSecondary; @@ -7302,8 +7301,8 @@ public Builder setGender(EmptyParam gender) { * The government-issued ID number of the individual, as appropriate for the representative's * country. (Examples are a Social Security Number in the U.S., or a Social Insurance Number * in Canada). Instead of the number itself, you can also provide a PII token created - * with Stripe.js. + * href="https://stripe.com/docs/js/tokens/create_token?type=pii">PII token created with + * Stripe.js. */ public Builder setIdNumber(String idNumber) { this.idNumber = idNumber; @@ -7314,8 +7313,8 @@ public Builder setIdNumber(String idNumber) { * The government-issued ID number of the individual, as appropriate for the representative's * country. (Examples are a Social Security Number in the U.S., or a Social Insurance Number * in Canada). Instead of the number itself, you can also provide a PII token created - * with Stripe.js. + * href="https://stripe.com/docs/js/tokens/create_token?type=pii">PII token created with + * Stripe.js. */ public Builder setIdNumber(EmptyParam idNumber) { this.idNumber = idNumber; @@ -7326,9 +7325,8 @@ public Builder setIdNumber(EmptyParam idNumber) { * The government-issued secondary ID number of the individual, as appropriate for the * representative's country, will be used for enhanced verification checks. In Thailand, this * would be the laser code found on the back of an ID card. Instead of the number itself, you - * can also provide a PII token created - * with Stripe.js. + * can also provide a PII + * token created with Stripe.js. */ public Builder setIdNumberSecondary(String idNumberSecondary) { this.idNumberSecondary = idNumberSecondary; @@ -7339,9 +7337,8 @@ public Builder setIdNumberSecondary(String idNumberSecondary) { * The government-issued secondary ID number of the individual, as appropriate for the * representative's country, will be used for enhanced verification checks. In Thailand, this * would be the laser code found on the back of an ID card. Instead of the number itself, you - * can also provide a PII token created - * with Stripe.js. + * can also provide a PII + * token created with Stripe.js. */ public Builder setIdNumberSecondary(EmptyParam idNumberSecondary) { this.idNumberSecondary = idNumberSecondary; diff --git a/src/main/java/com/stripe/param/FileCreateParams.java b/src/main/java/com/stripe/param/FileCreateParams.java index d545a668034..25a4e4ff79b 100644 --- a/src/main/java/com/stripe/param/FileCreateParams.java +++ b/src/main/java/com/stripe/param/FileCreateParams.java @@ -28,14 +28,14 @@ public class FileCreateParams extends ApiRequestParams { Map extraParams; /** - * Required. A file to upload. The file should follow the specifications of RFC - * 2388 (which defines file transfers for the {@code multipart/form-data} protocol). + * Required. A file to upload. Make sure that the specifications follow RFC 2388, + * which defines file transfers for the {@code multipart/form-data} protocol. */ @SerializedName("file") transient Object file; /** - * Optional parameters to automatically create a file link for the newly created file. */ @SerializedName("file_link_data") @@ -135,8 +135,8 @@ public Builder putAllExtraParam(Map map) { } /** - * Required. A file to upload. The file should follow the specifications of RFC - * 2388 (which defines file transfers for the {@code multipart/form-data} protocol). + * Required. A file to upload. Make sure that the specifications follow RFC + * 2388, which defines file transfers for the {@code multipart/form-data} protocol. */ public Builder setFile(InputStream file) { this.file = file; @@ -144,8 +144,8 @@ public Builder setFile(InputStream file) { } /** - * Required. A file to upload. The file should follow the specifications of RFC - * 2388 (which defines file transfers for the {@code multipart/form-data} protocol). + * Required. A file to upload. Make sure that the specifications follow RFC + * 2388, which defines file transfers for the {@code multipart/form-data} protocol. */ public Builder setFile(File file) { this.file = file; @@ -153,7 +153,7 @@ public Builder setFile(File file) { } /** - * Optional parameters to automatically create a file link for the newly created file. */ public Builder setFileLinkData(FileCreateParams.FileLinkData fileLinkData) { @@ -183,7 +183,7 @@ public static class FileLinkData { @SerializedName("create") Boolean create; - /** A future timestamp after which the link will no longer be usable. */ + /** The link isn't available after this future timestamp. */ @SerializedName("expires_at") Long expiresAt; @@ -244,7 +244,7 @@ public Builder setCreate(Boolean create) { return this; } - /** A future timestamp after which the link will no longer be usable. */ + /** The link isn't available after this future timestamp. */ public Builder setExpiresAt(Long expiresAt) { this.expiresAt = expiresAt; return this; diff --git a/src/main/java/com/stripe/param/FileLinkCreateParams.java b/src/main/java/com/stripe/param/FileLinkCreateParams.java index 2e7873e5f82..290c6ad7864 100644 --- a/src/main/java/com/stripe/param/FileLinkCreateParams.java +++ b/src/main/java/com/stripe/param/FileLinkCreateParams.java @@ -16,7 +16,7 @@ public class FileLinkCreateParams extends ApiRequestParams { @SerializedName("expand") List expand; - /** A future timestamp after which the link will no longer be usable. */ + /** The link isn't usable after this future timestamp. */ @SerializedName("expires_at") Long expiresAt; @@ -108,7 +108,7 @@ public Builder addAllExpand(List elements) { return this; } - /** A future timestamp after which the link will no longer be usable. */ + /** The link isn't usable after this future timestamp. */ public Builder setExpiresAt(Long expiresAt) { this.expiresAt = expiresAt; return this; diff --git a/src/main/java/com/stripe/param/FileLinkListParams.java b/src/main/java/com/stripe/param/FileLinkListParams.java index 955e5bb6523..d599fb5b7d5 100644 --- a/src/main/java/com/stripe/param/FileLinkListParams.java +++ b/src/main/java/com/stripe/param/FileLinkListParams.java @@ -27,7 +27,7 @@ public class FileLinkListParams extends ApiRequestParams { @SerializedName("expand") List expand; - /** Filter links by their expiration status. By default, all links are returned. */ + /** Filter links by their expiration status. By default, Stripe returns all links. */ @SerializedName("expired") Boolean expired; @@ -160,7 +160,7 @@ public Builder addAllExpand(List elements) { return this; } - /** Filter links by their expiration status. By default, all links are returned. */ + /** Filter links by their expiration status. By default, Stripe returns all links. */ public Builder setExpired(Boolean expired) { this.expired = expired; return this; diff --git a/src/main/java/com/stripe/param/FileListParams.java b/src/main/java/com/stripe/param/FileListParams.java index 1c654a772cf..8bd0bc79d49 100644 --- a/src/main/java/com/stripe/param/FileListParams.java +++ b/src/main/java/com/stripe/param/FileListParams.java @@ -44,8 +44,8 @@ public class FileListParams extends ApiRequestParams { Long limit; /** - * The file purpose to filter queries by. If none is provided, files will not be filtered by - * purpose. + * Filter queries by the file purpose. If you don't provide a purpose, the queries return + * unfiltered files. */ @SerializedName("purpose") Purpose purpose; @@ -190,8 +190,8 @@ public Builder setLimit(Long limit) { } /** - * The file purpose to filter queries by. If none is provided, files will not be filtered by - * purpose. + * Filter queries by the file purpose. If you don't provide a purpose, the queries return + * unfiltered files. */ public Builder setPurpose(FileListParams.Purpose purpose) { this.purpose = purpose; diff --git a/src/main/java/com/stripe/param/PaymentIntentUpdateParams.java b/src/main/java/com/stripe/param/PaymentIntentUpdateParams.java index b2179f5125a..49169159d01 100644 --- a/src/main/java/com/stripe/param/PaymentIntentUpdateParams.java +++ b/src/main/java/com/stripe/param/PaymentIntentUpdateParams.java @@ -110,8 +110,8 @@ public class PaymentIntentUpdateParams extends ApiRequestParams { PaymentMethodOptions paymentMethodOptions; /** - * The list of payment method types (e.g. card) that this PaymentIntent is allowed to use. Use - * automatic_payment_methods to manage payment methods from the Stripe Dashboard. */ @SerializedName("payment_method_types") @@ -165,18 +165,17 @@ public class PaymentIntentUpdateParams extends ApiRequestParams { Object statementDescriptorSuffix; /** - * The parameters used to automatically create a Transfer when the payment succeeds. For more - * information, see the PaymentIntents use case for connected accounts. + * Use this parameter to automatically create a Transfer when the payment succeeds. Learn more + * about the use case for connected + * accounts. */ @SerializedName("transfer_data") TransferData transferData; /** - * A string that identifies the resulting payment as part of a group. {@code transfer_group} may - * only be provided if it has not been set. See the PaymentIntents use case for connected accounts - * for details. + * A string that identifies the resulting payment as part of a group. You can only provide {@code + * transfer_group} if it hasn't been set. Learn more about the use case for connected accounts. */ @SerializedName("transfer_group") Object transferGroup; @@ -704,10 +703,9 @@ public Builder setStatementDescriptorSuffix(EmptyParam statementDescriptorSuffix } /** - * The parameters used to automatically create a Transfer when the payment succeeds. For more - * information, see the PaymentIntents use case for connected - * accounts. + * Use this parameter to automatically create a Transfer when the payment succeeds. Learn more + * about the use case for + * connected accounts. */ public Builder setTransferData(PaymentIntentUpdateParams.TransferData transferData) { this.transferData = transferData; @@ -715,10 +713,10 @@ public Builder setTransferData(PaymentIntentUpdateParams.TransferData transferDa } /** - * A string that identifies the resulting payment as part of a group. {@code transfer_group} may - * only be provided if it has not been set. See the PaymentIntents use case for connected - * accounts for details. + * accounts. */ public Builder setTransferGroup(String transferGroup) { this.transferGroup = transferGroup; @@ -726,10 +724,10 @@ public Builder setTransferGroup(String transferGroup) { } /** - * A string that identifies the resulting payment as part of a group. {@code transfer_group} may - * only be provided if it has not been set. See the PaymentIntents use case for connected - * accounts for details. + * accounts. */ public Builder setTransferGroup(EmptyParam transferGroup) { this.transferGroup = transferGroup; diff --git a/src/main/java/com/stripe/param/PaymentLinkCreateParams.java b/src/main/java/com/stripe/param/PaymentLinkCreateParams.java index bd4bda8f0e6..ed901530828 100644 --- a/src/main/java/com/stripe/param/PaymentLinkCreateParams.java +++ b/src/main/java/com/stripe/param/PaymentLinkCreateParams.java @@ -1857,10 +1857,21 @@ public static class CustomText { @SerializedName("submit") Object submit; - private CustomText(Map extraParams, Object shippingAddress, Object submit) { + /** + * Custom text that should be displayed in place of the default terms of service agreement text. + */ + @SerializedName("terms_of_service_acceptance") + Object termsOfServiceAcceptance; + + private CustomText( + Map extraParams, + Object shippingAddress, + Object submit, + Object termsOfServiceAcceptance) { this.extraParams = extraParams; this.shippingAddress = shippingAddress; this.submit = submit; + this.termsOfServiceAcceptance = termsOfServiceAcceptance; } public static Builder builder() { @@ -1874,10 +1885,12 @@ public static class Builder { private Object submit; + private Object termsOfServiceAcceptance; + /** Finalize and obtain parameter instance from this builder. */ public PaymentLinkCreateParams.CustomText build() { return new PaymentLinkCreateParams.CustomText( - this.extraParams, this.shippingAddress, this.submit); + this.extraParams, this.shippingAddress, this.submit, this.termsOfServiceAcceptance); } /** @@ -1930,6 +1943,25 @@ public Builder setSubmit(EmptyParam submit) { this.submit = submit; return this; } + + /** + * Custom text that should be displayed in place of the default terms of service agreement + * text. + */ + public Builder setTermsOfServiceAcceptance( + PaymentLinkCreateParams.CustomText.TermsOfServiceAcceptance termsOfServiceAcceptance) { + this.termsOfServiceAcceptance = termsOfServiceAcceptance; + return this; + } + + /** + * Custom text that should be displayed in place of the default terms of service agreement + * text. + */ + public Builder setTermsOfServiceAcceptance(EmptyParam termsOfServiceAcceptance) { + this.termsOfServiceAcceptance = termsOfServiceAcceptance; + return this; + } } @Getter @@ -1943,7 +1975,7 @@ public static class ShippingAddress { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Required. Text may be up to 1000 characters in length. */ + /** Required. Text may be up to 1200 characters in length. */ @SerializedName("message") String message; @@ -1995,7 +2027,7 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Required. Text may be up to 1000 characters in length. */ + /** Required. Text may be up to 1200 characters in length. */ public Builder setMessage(String message) { this.message = message; return this; @@ -2014,7 +2046,7 @@ public static class Submit { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Required. Text may be up to 1000 characters in length. */ + /** Required. Text may be up to 1200 characters in length. */ @SerializedName("message") String message; @@ -2065,7 +2097,78 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Required. Text may be up to 1000 characters in length. */ + /** Required. Text may be up to 1200 characters in length. */ + public Builder setMessage(String message) { + this.message = message; + return this; + } + } + } + + @Getter + public static class TermsOfServiceAcceptance { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Required. Text may be up to 1200 characters in length. */ + @SerializedName("message") + String message; + + private TermsOfServiceAcceptance(Map extraParams, String message) { + this.extraParams = extraParams; + this.message = message; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private String message; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentLinkCreateParams.CustomText.TermsOfServiceAcceptance build() { + return new PaymentLinkCreateParams.CustomText.TermsOfServiceAcceptance( + this.extraParams, this.message); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentLinkCreateParams.CustomText.TermsOfServiceAcceptance#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentLinkCreateParams.CustomText.TermsOfServiceAcceptance#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Required. Text may be up to 1200 characters in length. */ public Builder setMessage(String message) { this.message = message; return this; diff --git a/src/main/java/com/stripe/param/PaymentLinkUpdateParams.java b/src/main/java/com/stripe/param/PaymentLinkUpdateParams.java index b3585039299..176990c3768 100644 --- a/src/main/java/com/stripe/param/PaymentLinkUpdateParams.java +++ b/src/main/java/com/stripe/param/PaymentLinkUpdateParams.java @@ -1576,10 +1576,21 @@ public static class CustomText { @SerializedName("submit") Object submit; - private CustomText(Map extraParams, Object shippingAddress, Object submit) { + /** + * Custom text that should be displayed in place of the default terms of service agreement text. + */ + @SerializedName("terms_of_service_acceptance") + Object termsOfServiceAcceptance; + + private CustomText( + Map extraParams, + Object shippingAddress, + Object submit, + Object termsOfServiceAcceptance) { this.extraParams = extraParams; this.shippingAddress = shippingAddress; this.submit = submit; + this.termsOfServiceAcceptance = termsOfServiceAcceptance; } public static Builder builder() { @@ -1593,10 +1604,12 @@ public static class Builder { private Object submit; + private Object termsOfServiceAcceptance; + /** Finalize and obtain parameter instance from this builder. */ public PaymentLinkUpdateParams.CustomText build() { return new PaymentLinkUpdateParams.CustomText( - this.extraParams, this.shippingAddress, this.submit); + this.extraParams, this.shippingAddress, this.submit, this.termsOfServiceAcceptance); } /** @@ -1649,6 +1662,25 @@ public Builder setSubmit(EmptyParam submit) { this.submit = submit; return this; } + + /** + * Custom text that should be displayed in place of the default terms of service agreement + * text. + */ + public Builder setTermsOfServiceAcceptance( + PaymentLinkUpdateParams.CustomText.TermsOfServiceAcceptance termsOfServiceAcceptance) { + this.termsOfServiceAcceptance = termsOfServiceAcceptance; + return this; + } + + /** + * Custom text that should be displayed in place of the default terms of service agreement + * text. + */ + public Builder setTermsOfServiceAcceptance(EmptyParam termsOfServiceAcceptance) { + this.termsOfServiceAcceptance = termsOfServiceAcceptance; + return this; + } } @Getter @@ -1662,7 +1694,7 @@ public static class ShippingAddress { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Required. Text may be up to 1000 characters in length. */ + /** Required. Text may be up to 1200 characters in length. */ @SerializedName("message") Object message; @@ -1714,13 +1746,13 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Required. Text may be up to 1000 characters in length. */ + /** Required. Text may be up to 1200 characters in length. */ public Builder setMessage(String message) { this.message = message; return this; } - /** Required. Text may be up to 1000 characters in length. */ + /** Required. Text may be up to 1200 characters in length. */ public Builder setMessage(EmptyParam message) { this.message = message; return this; @@ -1739,7 +1771,7 @@ public static class Submit { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Required. Text may be up to 1000 characters in length. */ + /** Required. Text may be up to 1200 characters in length. */ @SerializedName("message") Object message; @@ -1790,13 +1822,90 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Required. Text may be up to 1000 characters in length. */ + /** Required. Text may be up to 1200 characters in length. */ + public Builder setMessage(String message) { + this.message = message; + return this; + } + + /** Required. Text may be up to 1200 characters in length. */ + public Builder setMessage(EmptyParam message) { + this.message = message; + return this; + } + } + } + + @Getter + public static class TermsOfServiceAcceptance { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Required. Text may be up to 1200 characters in length. */ + @SerializedName("message") + Object message; + + private TermsOfServiceAcceptance(Map extraParams, Object message) { + this.extraParams = extraParams; + this.message = message; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Object message; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentLinkUpdateParams.CustomText.TermsOfServiceAcceptance build() { + return new PaymentLinkUpdateParams.CustomText.TermsOfServiceAcceptance( + this.extraParams, this.message); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentLinkUpdateParams.CustomText.TermsOfServiceAcceptance#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentLinkUpdateParams.CustomText.TermsOfServiceAcceptance#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Required. Text may be up to 1200 characters in length. */ public Builder setMessage(String message) { this.message = message; return this; } - /** Required. Text may be up to 1000 characters in length. */ + /** Required. Text may be up to 1200 characters in length. */ public Builder setMessage(EmptyParam message) { this.message = message; return this; diff --git a/src/main/java/com/stripe/param/PaymentMethodCreateParams.java b/src/main/java/com/stripe/param/PaymentMethodCreateParams.java index 2795817672a..512c02cff0f 100644 --- a/src/main/java/com/stripe/param/PaymentMethodCreateParams.java +++ b/src/main/java/com/stripe/param/PaymentMethodCreateParams.java @@ -3631,7 +3631,11 @@ public static class Token { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Required. */ + /** + * Required. For backwards compatibility, you can alternatively provide a + * Stripe token (e.g., for Apple Pay, Amex Express Checkout, or legacy Checkout) into the card + * hash with format card: {token: "tok_visa"}. + */ @SerializedName("token") String token; @@ -3680,7 +3684,11 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Required. */ + /** + * Required. For backwards compatibility, you can alternatively provide a + * Stripe token (e.g., for Apple Pay, Amex Express Checkout, or legacy Checkout) into the card + * hash with format card: {token: "tok_visa"}. + */ public Builder setToken(String token) { this.token = token; return this; diff --git a/src/main/java/com/stripe/param/PersonCollectionCreateParams.java b/src/main/java/com/stripe/param/PersonCollectionCreateParams.java index 28b47d11613..3e56363d98f 100644 --- a/src/main/java/com/stripe/param/PersonCollectionCreateParams.java +++ b/src/main/java/com/stripe/param/PersonCollectionCreateParams.java @@ -76,8 +76,8 @@ public class PersonCollectionCreateParams extends ApiRequestParams { /** * The person's ID number, as appropriate for their country. For example, a social security number * in the U.S., social insurance number in Canada, etc. Instead of the number itself, you can also - * provide a PII token - * provided by Stripe.js. + * provide a PII token provided + * by Stripe.js. */ @SerializedName("id_number") String idNumber; @@ -86,7 +86,7 @@ public class PersonCollectionCreateParams extends ApiRequestParams { * The person's secondary ID number, as appropriate for their country, will be used for enhanced * verification checks. In Thailand, this would be the laser code found on the back of an ID card. * Instead of the number itself, you can also provide a PII token provided by + * href="https://stripe.com/docs/js/tokens/create_token?type=pii">PII token provided by * Stripe.js. */ @SerializedName("id_number_secondary") @@ -477,9 +477,8 @@ public Builder setGender(String gender) { /** * The person's ID number, as appropriate for their country. For example, a social security * number in the U.S., social insurance number in Canada, etc. Instead of the number itself, you - * can also provide a PII token provided by - * Stripe.js. + * can also provide a PII + * token provided by Stripe.js. */ public Builder setIdNumber(String idNumber) { this.idNumber = idNumber; @@ -490,7 +489,7 @@ public Builder setIdNumber(String idNumber) { * The person's secondary ID number, as appropriate for their country, will be used for enhanced * verification checks. In Thailand, this would be the laser code found on the back of an ID * card. Instead of the number itself, you can also provide a PII token provided by + * href="https://stripe.com/docs/js/tokens/create_token?type=pii">PII token provided by * Stripe.js. */ public Builder setIdNumberSecondary(String idNumberSecondary) { diff --git a/src/main/java/com/stripe/param/PersonCreateParams.java b/src/main/java/com/stripe/param/PersonCreateParams.java index 0974640eb64..91f4e4173ef 100644 --- a/src/main/java/com/stripe/param/PersonCreateParams.java +++ b/src/main/java/com/stripe/param/PersonCreateParams.java @@ -76,8 +76,8 @@ public class PersonCreateParams extends ApiRequestParams { /** * The person's ID number, as appropriate for their country. For example, a social security number * in the U.S., social insurance number in Canada, etc. Instead of the number itself, you can also - * provide a PII token - * provided by Stripe.js. + * provide a PII token provided + * by Stripe.js. */ @SerializedName("id_number") String idNumber; @@ -86,7 +86,7 @@ public class PersonCreateParams extends ApiRequestParams { * The person's secondary ID number, as appropriate for their country, will be used for enhanced * verification checks. In Thailand, this would be the laser code found on the back of an ID card. * Instead of the number itself, you can also provide a PII token provided by + * href="https://stripe.com/docs/js/tokens/create_token?type=pii">PII token provided by * Stripe.js. */ @SerializedName("id_number_secondary") @@ -477,9 +477,8 @@ public Builder setGender(String gender) { /** * The person's ID number, as appropriate for their country. For example, a social security * number in the U.S., social insurance number in Canada, etc. Instead of the number itself, you - * can also provide a PII token provided by - * Stripe.js. + * can also provide a PII + * token provided by Stripe.js. */ public Builder setIdNumber(String idNumber) { this.idNumber = idNumber; @@ -490,7 +489,7 @@ public Builder setIdNumber(String idNumber) { * The person's secondary ID number, as appropriate for their country, will be used for enhanced * verification checks. In Thailand, this would be the laser code found on the back of an ID * card. Instead of the number itself, you can also provide a PII token provided by + * href="https://stripe.com/docs/js/tokens/create_token?type=pii">PII token provided by * Stripe.js. */ public Builder setIdNumberSecondary(String idNumberSecondary) { diff --git a/src/main/java/com/stripe/param/PersonUpdateParams.java b/src/main/java/com/stripe/param/PersonUpdateParams.java index 794d37d23b7..33d4d55eff8 100644 --- a/src/main/java/com/stripe/param/PersonUpdateParams.java +++ b/src/main/java/com/stripe/param/PersonUpdateParams.java @@ -76,8 +76,8 @@ public class PersonUpdateParams extends ApiRequestParams { /** * The person's ID number, as appropriate for their country. For example, a social security number * in the U.S., social insurance number in Canada, etc. Instead of the number itself, you can also - * provide a PII token - * provided by Stripe.js. + * provide a PII token provided + * by Stripe.js. */ @SerializedName("id_number") Object idNumber; @@ -86,7 +86,7 @@ public class PersonUpdateParams extends ApiRequestParams { * The person's secondary ID number, as appropriate for their country, will be used for enhanced * verification checks. In Thailand, this would be the laser code found on the back of an ID card. * Instead of the number itself, you can also provide a PII token provided by + * href="https://stripe.com/docs/js/tokens/create_token?type=pii">PII token provided by * Stripe.js. */ @SerializedName("id_number_secondary") @@ -510,9 +510,8 @@ public Builder setGender(EmptyParam gender) { /** * The person's ID number, as appropriate for their country. For example, a social security * number in the U.S., social insurance number in Canada, etc. Instead of the number itself, you - * can also provide a PII token provided by - * Stripe.js. + * can also provide a PII + * token provided by Stripe.js. */ public Builder setIdNumber(String idNumber) { this.idNumber = idNumber; @@ -522,9 +521,8 @@ public Builder setIdNumber(String idNumber) { /** * The person's ID number, as appropriate for their country. For example, a social security * number in the U.S., social insurance number in Canada, etc. Instead of the number itself, you - * can also provide a PII token provided by - * Stripe.js. + * can also provide a PII + * token provided by Stripe.js. */ public Builder setIdNumber(EmptyParam idNumber) { this.idNumber = idNumber; @@ -535,7 +533,7 @@ public Builder setIdNumber(EmptyParam idNumber) { * The person's secondary ID number, as appropriate for their country, will be used for enhanced * verification checks. In Thailand, this would be the laser code found on the back of an ID * card. Instead of the number itself, you can also provide a PII token provided by + * href="https://stripe.com/docs/js/tokens/create_token?type=pii">PII token provided by * Stripe.js. */ public Builder setIdNumberSecondary(String idNumberSecondary) { @@ -547,7 +545,7 @@ public Builder setIdNumberSecondary(String idNumberSecondary) { * The person's secondary ID number, as appropriate for their country, will be used for enhanced * verification checks. In Thailand, this would be the laser code found on the back of an ID * card. Instead of the number itself, you can also provide a PII token provided by + * href="https://stripe.com/docs/js/tokens/create_token?type=pii">PII token provided by * Stripe.js. */ public Builder setIdNumberSecondary(EmptyParam idNumberSecondary) { diff --git a/src/main/java/com/stripe/param/TokenCreateParams.java b/src/main/java/com/stripe/param/TokenCreateParams.java index 87efec87ebe..f73d47246ca 100644 --- a/src/main/java/com/stripe/param/TokenCreateParams.java +++ b/src/main/java/com/stripe/param/TokenCreateParams.java @@ -1731,8 +1731,8 @@ public static class Individual { * The government-issued ID number of the individual, as appropriate for the representative's * country. (Examples are a Social Security Number in the U.S., or a Social Insurance Number * in Canada). Instead of the number itself, you can also provide a PII token created - * with Stripe.js. + * href="https://stripe.com/docs/js/tokens/create_token?type=pii">PII token created with + * Stripe.js. */ @SerializedName("id_number") String idNumber; @@ -1741,9 +1741,8 @@ public static class Individual { * The government-issued secondary ID number of the individual, as appropriate for the * representative's country, will be used for enhanced verification checks. In Thailand, this * would be the laser code found on the back of an ID card. Instead of the number itself, you - * can also provide a PII token created - * with Stripe.js. + * can also provide a PII + * token created with Stripe.js. */ @SerializedName("id_number_secondary") String idNumberSecondary; @@ -2064,8 +2063,8 @@ public Builder setGender(String gender) { * The government-issued ID number of the individual, as appropriate for the * representative's country. (Examples are a Social Security Number in the U.S., or a Social * Insurance Number in Canada). Instead of the number itself, you can also provide a PII token created - * with Stripe.js. + * href="https://stripe.com/docs/js/tokens/create_token?type=pii">PII token created with + * Stripe.js. */ public Builder setIdNumber(String idNumber) { this.idNumber = idNumber; @@ -2077,8 +2076,8 @@ public Builder setIdNumber(String idNumber) { * representative's country, will be used for enhanced verification checks. In Thailand, * this would be the laser code found on the back of an ID card. Instead of the number * itself, you can also provide a PII token created - * with Stripe.js. + * href="https://stripe.com/docs/js/tokens/create_token?type=pii">PII token created with + * Stripe.js. */ public Builder setIdNumberSecondary(String idNumberSecondary) { this.idNumberSecondary = idNumberSecondary; @@ -3921,9 +3920,8 @@ public static class Person { /** * The person's ID number, as appropriate for their country. For example, a social security * number in the U.S., social insurance number in Canada, etc. Instead of the number itself, you - * can also provide a PII token provided by - * Stripe.js. + * can also provide a PII + * token provided by Stripe.js. */ @SerializedName("id_number") String idNumber; @@ -3932,7 +3930,7 @@ public static class Person { * The person's secondary ID number, as appropriate for their country, will be used for enhanced * verification checks. In Thailand, this would be the laser code found on the back of an ID * card. Instead of the number itself, you can also provide a PII token provided by + * href="https://stripe.com/docs/js/tokens/create_token?type=pii">PII token provided by * Stripe.js. */ @SerializedName("id_number_secondary") @@ -4281,8 +4279,8 @@ public Builder setGender(String gender) { * The person's ID number, as appropriate for their country. For example, a social security * number in the U.S., social insurance number in Canada, etc. Instead of the number itself, * you can also provide a PII token provided - * by Stripe.js. + * href="https://stripe.com/docs/js/tokens/create_token?type=pii">PII token provided by + * Stripe.js. */ public Builder setIdNumber(String idNumber) { this.idNumber = idNumber; @@ -4293,8 +4291,8 @@ public Builder setIdNumber(String idNumber) { * The person's secondary ID number, as appropriate for their country, will be used for * enhanced verification checks. In Thailand, this would be the laser code found on the back * of an ID card. Instead of the number itself, you can also provide a PII token provided - * by Stripe.js. + * href="https://stripe.com/docs/js/tokens/create_token?type=pii">PII token provided by + * Stripe.js. */ public Builder setIdNumberSecondary(String idNumberSecondary) { this.idNumberSecondary = idNumberSecondary; diff --git a/src/main/java/com/stripe/param/checkout/SessionCreateParams.java b/src/main/java/com/stripe/param/checkout/SessionCreateParams.java index f85d5fd9565..d15b85e4b71 100644 --- a/src/main/java/com/stripe/param/checkout/SessionCreateParams.java +++ b/src/main/java/com/stripe/param/checkout/SessionCreateParams.java @@ -2027,10 +2027,21 @@ public static class CustomText { @SerializedName("submit") Object submit; - private CustomText(Map extraParams, Object shippingAddress, Object submit) { + /** + * Custom text that should be displayed in place of the default terms of service agreement text. + */ + @SerializedName("terms_of_service_acceptance") + Object termsOfServiceAcceptance; + + private CustomText( + Map extraParams, + Object shippingAddress, + Object submit, + Object termsOfServiceAcceptance) { this.extraParams = extraParams; this.shippingAddress = shippingAddress; this.submit = submit; + this.termsOfServiceAcceptance = termsOfServiceAcceptance; } public static Builder builder() { @@ -2044,10 +2055,12 @@ public static class Builder { private Object submit; + private Object termsOfServiceAcceptance; + /** Finalize and obtain parameter instance from this builder. */ public SessionCreateParams.CustomText build() { return new SessionCreateParams.CustomText( - this.extraParams, this.shippingAddress, this.submit); + this.extraParams, this.shippingAddress, this.submit, this.termsOfServiceAcceptance); } /** @@ -2100,6 +2113,25 @@ public Builder setSubmit(EmptyParam submit) { this.submit = submit; return this; } + + /** + * Custom text that should be displayed in place of the default terms of service agreement + * text. + */ + public Builder setTermsOfServiceAcceptance( + SessionCreateParams.CustomText.TermsOfServiceAcceptance termsOfServiceAcceptance) { + this.termsOfServiceAcceptance = termsOfServiceAcceptance; + return this; + } + + /** + * Custom text that should be displayed in place of the default terms of service agreement + * text. + */ + public Builder setTermsOfServiceAcceptance(EmptyParam termsOfServiceAcceptance) { + this.termsOfServiceAcceptance = termsOfServiceAcceptance; + return this; + } } @Getter @@ -2113,7 +2145,7 @@ public static class ShippingAddress { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Required. Text may be up to 1000 characters in length. */ + /** Required. Text may be up to 1200 characters in length. */ @SerializedName("message") String message; @@ -2164,7 +2196,7 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Required. Text may be up to 1000 characters in length. */ + /** Required. Text may be up to 1200 characters in length. */ public Builder setMessage(String message) { this.message = message; return this; @@ -2183,7 +2215,7 @@ public static class Submit { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Required. Text may be up to 1000 characters in length. */ + /** Required. Text may be up to 1200 characters in length. */ @SerializedName("message") String message; @@ -2234,7 +2266,78 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Required. Text may be up to 1000 characters in length. */ + /** Required. Text may be up to 1200 characters in length. */ + public Builder setMessage(String message) { + this.message = message; + return this; + } + } + } + + @Getter + public static class TermsOfServiceAcceptance { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Required. Text may be up to 1200 characters in length. */ + @SerializedName("message") + String message; + + private TermsOfServiceAcceptance(Map extraParams, String message) { + this.extraParams = extraParams; + this.message = message; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private String message; + + /** Finalize and obtain parameter instance from this builder. */ + public SessionCreateParams.CustomText.TermsOfServiceAcceptance build() { + return new SessionCreateParams.CustomText.TermsOfServiceAcceptance( + this.extraParams, this.message); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link SessionCreateParams.CustomText.TermsOfServiceAcceptance#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link SessionCreateParams.CustomText.TermsOfServiceAcceptance#extraParams} for + * the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Required. Text may be up to 1200 characters in length. */ public Builder setMessage(String message) { this.message = message; return this; diff --git a/src/main/java/com/stripe/service/FileService.java b/src/main/java/com/stripe/service/FileService.java index e89912bde6d..90587f4ca8e 100644 --- a/src/main/java/com/stripe/service/FileService.java +++ b/src/main/java/com/stripe/service/FileService.java @@ -22,29 +22,29 @@ public FileService(StripeResponseGetter responseGetter) { } /** - * Returns a list of the files that your account has access to. The files are returned sorted by - * creation date, with the most recently created files appearing first. + * Returns a list of the files that your account has access to. Stripe sorts and returns the files + * by their creation dates, placing the most recently created files at the top. */ public StripeCollection list(FileListParams params) throws StripeException { return list(params, (RequestOptions) null); } /** - * Returns a list of the files that your account has access to. The files are returned sorted by - * creation date, with the most recently created files appearing first. + * Returns a list of the files that your account has access to. Stripe sorts and returns the files + * by their creation dates, placing the most recently created files at the top. */ public StripeCollection list(RequestOptions options) throws StripeException { return list((FileListParams) null, options); } /** - * Returns a list of the files that your account has access to. The files are returned sorted by - * creation date, with the most recently created files appearing first. + * Returns a list of the files that your account has access to. Stripe sorts and returns the files + * by their creation dates, placing the most recently created files at the top. */ public StripeCollection list() throws StripeException { return list((FileListParams) null, (RequestOptions) null); } /** - * Returns a list of the files that your account has access to. The files are returned sorted by - * creation date, with the most recently created files appearing first. + * Returns a list of the files that your account has access to. Stripe sorts and returns the files + * by their creation dates, placing the most recently created files at the top. */ public StripeCollection list(FileListParams params, RequestOptions options) throws StripeException { @@ -60,22 +60,20 @@ public StripeCollection list(FileListParams params, RequestOptions options ApiMode.V1); } /** - * To upload a file to Stripe, you’ll need to send a request of type {@code multipart/form-data}. - * The request should contain the file you would like to upload, as well as the parameters for - * creating a file. + * To upload a file to Stripe, you need to send a request of type {@code multipart/form-data}. + * Include the file you want to upload in the request, and the parameters for creating a file. * - *

All of Stripe’s officially supported Client libraries should have support for sending {@code + *

All of Stripe’s officially supported Client libraries support sending {@code * multipart/form-data}. */ public File create(FileCreateParams params) throws StripeException { return create(params, (RequestOptions) null); } /** - * To upload a file to Stripe, you’ll need to send a request of type {@code multipart/form-data}. - * The request should contain the file you would like to upload, as well as the parameters for - * creating a file. + * To upload a file to Stripe, you need to send a request of type {@code multipart/form-data}. + * Include the file you want to upload in the request, and the parameters for creating a file. * - *

All of Stripe’s officially supported Client libraries should have support for sending {@code + *

All of Stripe’s officially supported Client libraries support sending {@code * multipart/form-data}. */ public File create(FileCreateParams params, RequestOptions options) throws StripeException { @@ -91,33 +89,33 @@ public File create(FileCreateParams params, RequestOptions options) throws Strip ApiMode.V1); } /** - * Retrieves the details of an existing file object. Supply the unique file ID from a file, and - * Stripe will return the corresponding file object. To access file contents, see the File Upload Guide. + * Retrieves the details of an existing file object. After you supply a unique file ID, Stripe + * returns the corresponding file object. Learn how to access file contents. */ public File retrieve(String file, FileRetrieveParams params) throws StripeException { return retrieve(file, params, (RequestOptions) null); } /** - * Retrieves the details of an existing file object. Supply the unique file ID from a file, and - * Stripe will return the corresponding file object. To access file contents, see the File Upload Guide. + * Retrieves the details of an existing file object. After you supply a unique file ID, Stripe + * returns the corresponding file object. Learn how to access file contents. */ public File retrieve(String file, RequestOptions options) throws StripeException { return retrieve(file, (FileRetrieveParams) null, options); } /** - * Retrieves the details of an existing file object. Supply the unique file ID from a file, and - * Stripe will return the corresponding file object. To access file contents, see the File Upload Guide. + * Retrieves the details of an existing file object. After you supply a unique file ID, Stripe + * returns the corresponding file object. Learn how to access file contents. */ public File retrieve(String file) throws StripeException { return retrieve(file, (FileRetrieveParams) null, (RequestOptions) null); } /** - * Retrieves the details of an existing file object. Supply the unique file ID from a file, and - * Stripe will return the corresponding file object. To access file contents, see the File Upload Guide. + * Retrieves the details of an existing file object. After you supply a unique file ID, Stripe + * returns the corresponding file object. Learn how to access file contents. */ public File retrieve(String file, FileRetrieveParams params, RequestOptions options) throws StripeException { diff --git a/src/main/java/com/stripe/service/PaymentIntentService.java b/src/main/java/com/stripe/service/PaymentIntentService.java index dc8bab48407..d620e1be7ea 100644 --- a/src/main/java/com/stripe/service/PaymentIntentService.java +++ b/src/main/java/com/stripe/service/PaymentIntentService.java @@ -199,10 +199,10 @@ public PaymentIntent retrieve( /** * Updates properties on a PaymentIntent object without confirming. * - *

Depending on which properties you update, you may need to confirm the PaymentIntent again. - * For example, updating the {@code payment_method} will always require you to confirm the + *

Depending on which properties you update, you might need to confirm the PaymentIntent again. + * For example, updating the {@code payment_method} always requires you to confirm the * PaymentIntent again. If you prefer to update and confirm at the same time, we recommend - * updating properties via the confirm API instead. */ public PaymentIntent update(String intent, PaymentIntentUpdateParams params) @@ -212,10 +212,10 @@ public PaymentIntent update(String intent, PaymentIntentUpdateParams params) /** * Updates properties on a PaymentIntent object without confirming. * - *

Depending on which properties you update, you may need to confirm the PaymentIntent again. - * For example, updating the {@code payment_method} will always require you to confirm the + *

Depending on which properties you update, you might need to confirm the PaymentIntent again. + * For example, updating the {@code payment_method} always requires you to confirm the * PaymentIntent again. If you prefer to update and confirm at the same time, we recommend - * updating properties via the confirm API instead. */ public PaymentIntent update(String intent, RequestOptions options) throws StripeException { @@ -224,10 +224,10 @@ public PaymentIntent update(String intent, RequestOptions options) throws Stripe /** * Updates properties on a PaymentIntent object without confirming. * - *

Depending on which properties you update, you may need to confirm the PaymentIntent again. - * For example, updating the {@code payment_method} will always require you to confirm the + *

Depending on which properties you update, you might need to confirm the PaymentIntent again. + * For example, updating the {@code payment_method} always requires you to confirm the * PaymentIntent again. If you prefer to update and confirm at the same time, we recommend - * updating properties via the confirm API instead. */ public PaymentIntent update(String intent) throws StripeException { @@ -236,10 +236,10 @@ public PaymentIntent update(String intent) throws StripeException { /** * Updates properties on a PaymentIntent object without confirming. * - *

Depending on which properties you update, you may need to confirm the PaymentIntent again. - * For example, updating the {@code payment_method} will always require you to confirm the + *

Depending on which properties you update, you might need to confirm the PaymentIntent again. + * For example, updating the {@code payment_method} always requires you to confirm the * PaymentIntent again. If you prefer to update and confirm at the same time, we recommend - * updating properties via the confirm API instead. */ public PaymentIntent update( diff --git a/src/main/java/com/stripe/service/issuing/AuthorizationService.java b/src/main/java/com/stripe/service/issuing/AuthorizationService.java index 1ea1f6daac3..1dc7a01b9f4 100644 --- a/src/main/java/com/stripe/service/issuing/AuthorizationService.java +++ b/src/main/java/com/stripe/service/issuing/AuthorizationService.java @@ -134,47 +134,47 @@ public Authorization update( ApiMode.V1); } /** - * Approves a pending Issuing {@code Authorization} object. This request should be made within the - * timeout window of the real-time - * authorization flow. You can also respond directly to the webhook request to approve an - * authorization (preferred). More details can be found here. + * authorization flow. This method is deprecated. Instead, respond + * directly to the webhook request to approve an authorization. */ public Authorization approve(String authorization, AuthorizationApproveParams params) throws StripeException { return approve(authorization, params, (RequestOptions) null); } /** - * Approves a pending Issuing {@code Authorization} object. This request should be made within the - * timeout window of the real-time - * authorization flow. You can also respond directly to the webhook request to approve an - * authorization (preferred). More details can be found here. + * authorization flow. This method is deprecated. Instead, respond + * directly to the webhook request to approve an authorization. */ public Authorization approve(String authorization, RequestOptions options) throws StripeException { return approve(authorization, (AuthorizationApproveParams) null, options); } /** - * Approves a pending Issuing {@code Authorization} object. This request should be made within the - * timeout window of the real-time - * authorization flow. You can also respond directly to the webhook request to approve an - * authorization (preferred). More details can be found here. + * authorization flow. This method is deprecated. Instead, respond + * directly to the webhook request to approve an authorization. */ public Authorization approve(String authorization) throws StripeException { return approve(authorization, (AuthorizationApproveParams) null, (RequestOptions) null); } /** - * Approves a pending Issuing {@code Authorization} object. This request should be made within the - * timeout window of the real-time - * authorization flow. You can also respond directly to the webhook request to approve an - * authorization (preferred). More details can be found here. + * authorization flow. This method is deprecated. Instead, respond + * directly to the webhook request to approve an authorization. */ public Authorization approve( String authorization, AuthorizationApproveParams params, RequestOptions options) @@ -193,47 +193,47 @@ public Authorization approve( ApiMode.V1); } /** - * Declines a pending Issuing {@code Authorization} object. This request should be made within the - * timeout window of the real time - * authorization flow. You can also respond directly to the webhook request to decline an - * authorization (preferred). More details can be found here. + * authorization flow. This method is deprecated. Instead, respond + * directly to the webhook request to decline an authorization. */ public Authorization decline(String authorization, AuthorizationDeclineParams params) throws StripeException { return decline(authorization, params, (RequestOptions) null); } /** - * Declines a pending Issuing {@code Authorization} object. This request should be made within the - * timeout window of the real time - * authorization flow. You can also respond directly to the webhook request to decline an - * authorization (preferred). More details can be found here. + * authorization flow. This method is deprecated. Instead, respond + * directly to the webhook request to decline an authorization. */ public Authorization decline(String authorization, RequestOptions options) throws StripeException { return decline(authorization, (AuthorizationDeclineParams) null, options); } /** - * Declines a pending Issuing {@code Authorization} object. This request should be made within the - * timeout window of the real time - * authorization flow. You can also respond directly to the webhook request to decline an - * authorization (preferred). More details can be found here. + * authorization flow. This method is deprecated. Instead, respond + * directly to the webhook request to decline an authorization. */ public Authorization decline(String authorization) throws StripeException { return decline(authorization, (AuthorizationDeclineParams) null, (RequestOptions) null); } /** - * Declines a pending Issuing {@code Authorization} object. This request should be made within the - * timeout window of the real time - * authorization flow. You can also respond directly to the webhook request to decline an - * authorization (preferred). More details can be found here. + * authorization flow. This method is deprecated. Instead, respond + * directly to the webhook request to decline an authorization. */ public Authorization decline( String authorization, AuthorizationDeclineParams params, RequestOptions options) From 533a07c4ad5fbd615658bbbf3e0ac48d2602a6ff Mon Sep 17 00:00:00 2001 From: Annie Li Date: Thu, 21 Sep 2023 15:55:02 -0700 Subject: [PATCH 02/25] Bump version to 23.6.0 --- CHANGELOG.md | 15 ++++++++++----- README.md | 8 ++++---- VERSION | 2 +- gradle.properties | 2 +- src/main/java/com/stripe/Stripe.java | 2 +- 5 files changed, 17 insertions(+), 12 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0620fce7377..eb66d27539a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,11 @@ # Changelog +## 23.6.0 - 2023-09-21 +* [#1654](https://github.com/stripe/stripe-java/pull/1654) Update generated code + * Add support for `terms_of_service_acceptance` on `Checkout.Session.custom_text`, `PaymentLink.custom_text`, `PaymentLinkCreateParams.custom_text`, `PaymentLinkUpdateParams.custom_text`, and `checkout.SessionCreateParams.custom_text` +* [#1655](https://github.com/stripe/stripe-java/pull/1655) CI: Drop testing for 9, 10, 12-16 + ## 23.5.0 - 2023-09-14 * [#1647](https://github.com/stripe/stripe-java/pull/1647) Update generated code * Add support for new resource `PaymentMethodConfiguration` @@ -32,11 +37,11 @@ ## 23.2.0 - 2023-08-24 * [#1635](https://github.com/stripe/stripe-java/pull/1635) Update generated code - * Add support for `retention` on `BillingPortal.Session.flow.subscription_cancel` and `billingportal.SessionCreateParams.flow_data.subscription_cancel` - * Add support for `prefetch` on `Checkout.Session.payment_method_options.us_bank_account.financial_connections`, `FinancialConnections.Session`, `Invoice.payment_settings.payment_method_options.us_bank_account.financial_connections`, `InvoiceCreateParams.payment_settings.payment_method_options.us_bank_account.financial_connections`, `InvoiceUpdateParams.payment_settings.payment_method_options.us_bank_account.financial_connections`, `PaymentIntent.payment_method_options.us_bank_account.financial_connections`, `PaymentIntentConfirmParams.payment_method_options.us_bank_account.financial_connections`, `PaymentIntentCreateParams.payment_method_options.us_bank_account.financial_connections`, `PaymentIntentUpdateParams.payment_method_options.us_bank_account.financial_connections`, `SetupIntent.payment_method_options.us_bank_account.financial_connections`, `SetupIntentConfirmParams.payment_method_options.us_bank_account.financial_connections`, `SetupIntentCreateParams.payment_method_options.us_bank_account.financial_connections`, `SetupIntentUpdateParams.payment_method_options.us_bank_account.financial_connections`, `Subscription.payment_settings.payment_method_options.us_bank_account.financial_connections`, `SubscriptionCreateParams.payment_settings.payment_method_options.us_bank_account.financial_connections`, `SubscriptionUpdateParams.payment_settings.payment_method_options.us_bank_account.financial_connections`, `checkout.SessionCreateParams.payment_method_options.us_bank_account.financial_connections`, and `financialconnections.SessionCreateParams` - * Add support for `payment_method_details` on `Dispute` - * Change type of `PaymentIntentCreateParams.mandate_data` and `SetupIntentCreateParams.mandate_data` from `secret_key_param` to `emptyStringable(secret_key_param)` - * Change type of `PaymentIntentConfirmParams.mandate_data` and `SetupIntentConfirmParams.mandate_data` from `secret_key_param | client_key_param` to `emptyStringable(secret_key_param | client_key_param)` + * Add support for `retention` on `BillingPortal.Session.flow.subscription_cancel` and `billingportal.SessionCreateParams.flow_data.subscription_cancel` + * Add support for `prefetch` on `Checkout.Session.payment_method_options.us_bank_account.financial_connections`, `FinancialConnections.Session`, `Invoice.payment_settings.payment_method_options.us_bank_account.financial_connections`, `InvoiceCreateParams.payment_settings.payment_method_options.us_bank_account.financial_connections`, `InvoiceUpdateParams.payment_settings.payment_method_options.us_bank_account.financial_connections`, `PaymentIntent.payment_method_options.us_bank_account.financial_connections`, `PaymentIntentConfirmParams.payment_method_options.us_bank_account.financial_connections`, `PaymentIntentCreateParams.payment_method_options.us_bank_account.financial_connections`, `PaymentIntentUpdateParams.payment_method_options.us_bank_account.financial_connections`, `SetupIntent.payment_method_options.us_bank_account.financial_connections`, `SetupIntentConfirmParams.payment_method_options.us_bank_account.financial_connections`, `SetupIntentCreateParams.payment_method_options.us_bank_account.financial_connections`, `SetupIntentUpdateParams.payment_method_options.us_bank_account.financial_connections`, `Subscription.payment_settings.payment_method_options.us_bank_account.financial_connections`, `SubscriptionCreateParams.payment_settings.payment_method_options.us_bank_account.financial_connections`, `SubscriptionUpdateParams.payment_settings.payment_method_options.us_bank_account.financial_connections`, `checkout.SessionCreateParams.payment_method_options.us_bank_account.financial_connections`, and `financialconnections.SessionCreateParams` + * Add support for `payment_method_details` on `Dispute` + * Change type of `PaymentIntentCreateParams.mandate_data` and `SetupIntentCreateParams.mandate_data` from `secret_key_param` to `emptyStringable(secret_key_param)` + * Change type of `PaymentIntentConfirmParams.mandate_data` and `SetupIntentConfirmParams.mandate_data` from `secret_key_param | client_key_param` to `emptyStringable(secret_key_param | client_key_param)` * Add support for `balance_transaction` on `CustomerCashBalanceTransaction.adjusted_for_overdraft` ## 23.1.1 - 2023-08-21 diff --git a/README.md b/README.md index 352fc6e5943..7d8d98a37cc 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Stripe Java client library -[![Maven Central](https://img.shields.io/badge/maven--central-v23.5.0-blue)](https://mvnrepository.com/artifact/com.stripe/stripe-java) +[![Maven Central](https://img.shields.io/badge/maven--central-v23.6.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) [![Coverage Status](https://coveralls.io/repos/github/stripe/stripe-java/badge.svg?branch=master)](https://coveralls.io/github/stripe/stripe-java?branch=master) @@ -18,7 +18,7 @@ The official [Stripe][stripe] Java client library. Add this dependency to your project's build file: ```groovy -implementation "com.stripe:stripe-java:23.5.0" +implementation "com.stripe:stripe-java:23.6.0" ``` ### Maven users @@ -29,7 +29,7 @@ Add this dependency to your project's POM: com.stripe stripe-java - 23.5.0 + 23.6.0 ``` @@ -37,7 +37,7 @@ Add this dependency to your project's POM: You'll need to manually install the following JARs: -- [The Stripe JAR](https://search.maven.org/remotecontent?filepath=com/stripe/stripe-java/23.5.0/stripe-java-23.5.0.jar) +- [The Stripe JAR](https://search.maven.org/remotecontent?filepath=com/stripe/stripe-java/23.6.0/stripe-java-23.6.0.jar) - [Google Gson][gson] from . ### [ProGuard][proguard] diff --git a/VERSION b/VERSION index 71227902c16..0373daaf186 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -23.5.0 +23.6.0 diff --git a/gradle.properties b/gradle.properties index 5a6ed38d513..fc726c72c3e 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,5 +1,5 @@ GROUP=com.stripe -VERSION_NAME=23.5.0 +VERSION_NAME=23.6.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 d7e2ef3905e..55ae2354f34 100644 --- a/src/main/java/com/stripe/Stripe.java +++ b/src/main/java/com/stripe/Stripe.java @@ -13,7 +13,7 @@ public abstract class Stripe { public static final String CONNECT_API_BASE = "https://connect.stripe.com"; 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 VERSION = "23.5.0"; + public static final String VERSION = "23.6.0"; public static volatile String apiKey; public static volatile String clientId; From f42ad92273d319bfd0a8550062457280786f9e81 Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Fri, 22 Sep 2023 02:13:07 +0000 Subject: [PATCH 03/25] Update generated code for v546 --- OPENAPI_VERSION | 2 +- src/main/java/com/stripe/model/Mandate.java | 29 ++++++++++++--------- 2 files changed, 17 insertions(+), 14 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 688708d739b..00aae46c664 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v545 \ No newline at end of file +v546 \ No newline at end of file diff --git a/src/main/java/com/stripe/model/Mandate.java b/src/main/java/com/stripe/model/Mandate.java index 0702384d3b2..0801e25e33a 100644 --- a/src/main/java/com/stripe/model/Mandate.java +++ b/src/main/java/com/stripe/model/Mandate.java @@ -17,7 +17,8 @@ import lombok.Setter; /** - * A Mandate is a record of the permission a customer has given you to debit their payment method. + * A Mandate is a record of the permission that your customer gives you to debit their payment + * method. */ @Getter @Setter @@ -49,7 +50,7 @@ public class Mandate extends ApiResource implements HasId { @SerializedName("object") String object; - /** The account (if any) for which the mandate is intended. */ + /** The account (if any) that the mandate is intended for. */ @SerializedName("on_behalf_of") String onBehalfOf; @@ -66,7 +67,7 @@ public class Mandate extends ApiResource implements HasId { SingleUse singleUse; /** - * The status of the mandate, which indicates whether it can be used to initiate a payment. + * The mandate status indicates whether or not you can use it to initiate a payment. * *

One of {@code active}, {@code inactive}, or {@code pending}. */ @@ -145,7 +146,7 @@ public static Mandate retrieve( @Setter @EqualsAndHashCode(callSuper = false) public static class CustomerAcceptance extends StripeObject { - /** The time at which the customer accepted the Mandate. */ + /** The time that the customer accepts the mandate. */ @SerializedName("accepted_at") Long acceptedAt; @@ -156,8 +157,10 @@ public static class CustomerAcceptance extends StripeObject { Online online; /** - * The type of customer acceptance information included with the Mandate. One of {@code online} - * or {@code offline}. + * The mandate includes the type of customer acceptance information, such as: {@code online} or + * {@code offline}. + * + *

One of {@code offline}, or {@code online}. */ @SerializedName("type") String type; @@ -171,11 +174,11 @@ public static class Offline extends StripeObject {} @Setter @EqualsAndHashCode(callSuper = false) public static class Online extends StripeObject { - /** The IP address from which the Mandate was accepted by the customer. */ + /** The customer accepts the mandate from this IP address. */ @SerializedName("ip_address") String ipAddress; - /** The user agent of the browser from which the Mandate was accepted by the customer. */ + /** The customer accepts the mandate using the user agent of the browser. */ @SerializedName("user_agent") String userAgent; } @@ -215,9 +218,9 @@ public static class PaymentMethodDetails extends StripeObject { SepaDebit sepaDebit; /** - * The type of the payment method associated with this mandate. An additional hash is included - * on {@code payment_method_details} with a name matching this value. It contains mandate - * information specific to the payment method. + * This mandate corresponds with a specific payment method type. The {@code + * payment_method_details} includes an additional hash with the same name and contains mandate + * information that's specific to that payment method. */ @SerializedName("type") String type; @@ -360,11 +363,11 @@ public static class UsBankAccount extends StripeObject {} @Setter @EqualsAndHashCode(callSuper = false) public static class SingleUse extends StripeObject { - /** On a single use mandate, the amount of the payment. */ + /** The amount of the payment on a single use mandate. */ @SerializedName("amount") Long amount; - /** On a single use mandate, the currency of the payment. */ + /** The currency of the payment on a single use mandate. */ @SerializedName("currency") String currency; } From f736acbebb709296650a5ab1f644294a63e7bc08 Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Fri, 22 Sep 2023 16:47:56 +0000 Subject: [PATCH 04/25] Update generated code for v548 --- OPENAPI_VERSION | 2 +- src/main/java/com/stripe/model/SetupAttempt.java | 12 ++++++------ .../com/stripe/param/SetupAttemptListParams.java | 8 +++----- .../java/com/stripe/service/SetupAttemptService.java | 4 ++-- 4 files changed, 12 insertions(+), 14 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 00aae46c664..aa2c54c9abe 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v546 \ No newline at end of file +v548 \ No newline at end of file diff --git a/src/main/java/com/stripe/model/SetupAttempt.java b/src/main/java/com/stripe/model/SetupAttempt.java index 14325a0730b..ca3345420f0 100644 --- a/src/main/java/com/stripe/model/SetupAttempt.java +++ b/src/main/java/com/stripe/model/SetupAttempt.java @@ -18,8 +18,8 @@ /** * A SetupAttempt describes one attempted confirmation of a SetupIntent, whether that confirmation - * was successful or unsuccessful. You can use SetupAttempts to inspect details of a specific - * attempt at setting up a payment method using a SetupIntent. + * is successful or unsuccessful. You can use SetupAttempts to inspect details of a specific attempt + * at setting up a payment method using a SetupIntent. */ @Getter @Setter @@ -226,12 +226,12 @@ public void setSetupIntentObject(SetupIntent expandableObject) { this.setupIntent = new ExpandableField(expandableObject.getId(), expandableObject); } - /** Returns a list of SetupAttempts associated with a provided SetupIntent. */ + /** Returns a list of SetupAttempts that associate with a provided SetupIntent. */ public static SetupAttemptCollection list(Map params) throws StripeException { return list(params, (RequestOptions) null); } - /** Returns a list of SetupAttempts associated with a provided SetupIntent. */ + /** Returns a list of SetupAttempts that associate with a provided SetupIntent. */ public static SetupAttemptCollection list(Map params, RequestOptions options) throws StripeException { String path = "/v1/setup_attempts"; @@ -246,12 +246,12 @@ public static SetupAttemptCollection list(Map params, RequestOpt ApiMode.V1); } - /** Returns a list of SetupAttempts associated with a provided SetupIntent. */ + /** Returns a list of SetupAttempts that associate with a provided SetupIntent. */ public static SetupAttemptCollection list(SetupAttemptListParams params) throws StripeException { return list(params, (RequestOptions) null); } - /** Returns a list of SetupAttempts associated with a provided SetupIntent. */ + /** Returns a list of SetupAttempts that associate with a provided SetupIntent. */ public static SetupAttemptCollection list(SetupAttemptListParams params, RequestOptions options) throws StripeException { String path = "/v1/setup_attempts"; diff --git a/src/main/java/com/stripe/param/SetupAttemptListParams.java b/src/main/java/com/stripe/param/SetupAttemptListParams.java index 2480381f9fd..65e36d83d6c 100644 --- a/src/main/java/com/stripe/param/SetupAttemptListParams.java +++ b/src/main/java/com/stripe/param/SetupAttemptListParams.java @@ -13,7 +13,7 @@ public class SetupAttemptListParams extends ApiRequestParams { /** * A filter on the list, based on the object {@code created} field. The value can be a string with - * an integer Unix timestamp, or it can be a dictionary with a number of different query options. + * an integer Unix timestamp or a dictionary with a number of different query options. */ @SerializedName("created") Object created; @@ -113,8 +113,7 @@ public SetupAttemptListParams build() { /** * A filter on the list, based on the object {@code created} field. The value can be a string - * with an integer Unix timestamp, or it can be a dictionary with a number of different query - * options. + * with an integer Unix timestamp or a dictionary with a number of different query options. */ public Builder setCreated(SetupAttemptListParams.Created created) { this.created = created; @@ -123,8 +122,7 @@ public Builder setCreated(SetupAttemptListParams.Created created) { /** * A filter on the list, based on the object {@code created} field. The value can be a string - * with an integer Unix timestamp, or it can be a dictionary with a number of different query - * options. + * with an integer Unix timestamp or a dictionary with a number of different query options. */ public Builder setCreated(Long created) { this.created = created; diff --git a/src/main/java/com/stripe/service/SetupAttemptService.java b/src/main/java/com/stripe/service/SetupAttemptService.java index 669017d5dfe..12c7a9a3311 100644 --- a/src/main/java/com/stripe/service/SetupAttemptService.java +++ b/src/main/java/com/stripe/service/SetupAttemptService.java @@ -19,11 +19,11 @@ public SetupAttemptService(StripeResponseGetter responseGetter) { super(responseGetter); } - /** Returns a list of SetupAttempts associated with a provided SetupIntent. */ + /** Returns a list of SetupAttempts that associate with a provided SetupIntent. */ public StripeCollection list(SetupAttemptListParams params) throws StripeException { return list(params, (RequestOptions) null); } - /** Returns a list of SetupAttempts associated with a provided SetupIntent. */ + /** Returns a list of SetupAttempts that associate with a provided SetupIntent. */ public StripeCollection list(SetupAttemptListParams params, RequestOptions options) throws StripeException { String path = "/v1/setup_attempts"; From f9df76cd62040d8dee2db9b40bd684ebbaba8fda Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Fri, 22 Sep 2023 16:57:48 +0000 Subject: [PATCH 05/25] Update generated code for v548 --- .../java/com/stripe/model/capital/FinancingSummary.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/stripe/model/capital/FinancingSummary.java b/src/main/java/com/stripe/model/capital/FinancingSummary.java index f9f30564f8b..1e1ccb6e7ea 100644 --- a/src/main/java/com/stripe/model/capital/FinancingSummary.java +++ b/src/main/java/com/stripe/model/capital/FinancingSummary.java @@ -109,7 +109,7 @@ public static class Details extends StripeObject { * in milliseconds since unix epoch. */ @SerializedName("advance_paid_out_at") - BigDecimal advancePaidOutAt; + Long advancePaidOutAt; /** Currency that the financing offer is transacted in. For example, {@code usd}. */ @SerializedName("currency") @@ -136,7 +136,7 @@ public static class Details extends StripeObject { * epoch. */ @SerializedName("repayments_begin_at") - BigDecimal repaymentsBeginAt; + Long repaymentsBeginAt; /** Per-transaction rate at which Stripe will withhold funds to repay the financing. */ @SerializedName("withhold_rate") @@ -153,7 +153,7 @@ public static class CurrentRepaymentInterval extends StripeObject { * epoch. */ @SerializedName("due_at") - BigDecimal dueAt; + Long dueAt; /** The amount that has already been paid in the current repayment interval. */ @SerializedName("paid_amount") From 746dc8772c33638c9d0d56d67adc17cd2d9699e7 Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Fri, 22 Sep 2023 20:24:43 +0000 Subject: [PATCH 06/25] Update generated code for v549 --- OPENAPI_VERSION | 2 +- src/main/java/com/stripe/model/Invoice.java | 35 +++ .../com/stripe/model/QuotePreviewInvoice.java | 35 +++ .../com/stripe/param/InvoiceCreateParams.java | 234 ++++++++++++++++++ .../com/stripe/param/InvoiceUpdateParams.java | 234 ++++++++++++++++++ 5 files changed, 539 insertions(+), 1 deletion(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index aa2c54c9abe..ad4d2fcef3e 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v548 \ No newline at end of file +v549 \ No newline at end of file diff --git a/src/main/java/com/stripe/model/Invoice.java b/src/main/java/com/stripe/model/Invoice.java index 4a808a870a7..29ef934566b 100644 --- a/src/main/java/com/stripe/model/Invoice.java +++ b/src/main/java/com/stripe/model/Invoice.java @@ -494,6 +494,13 @@ public class Invoice extends ApiResource implements HasId, MetadataStoreOne of {@code a4}, {@code auto}, or {@code letter}. + */ + @SerializedName("page_size") + String pageSize; + } + } + @Getter @Setter @EqualsAndHashCode(callSuper = false) @@ -2592,6 +2626,7 @@ public void setResponseGetter(StripeResponseGetter responseGetter) { trySetResponseGetter(paymentIntent, responseGetter); trySetResponseGetter(paymentSettings, responseGetter); trySetResponseGetter(quote, responseGetter); + trySetResponseGetter(rendering, responseGetter); trySetResponseGetter(renderingOptions, responseGetter); trySetResponseGetter(shippingCost, responseGetter); trySetResponseGetter(shippingDetails, responseGetter); diff --git a/src/main/java/com/stripe/model/QuotePreviewInvoice.java b/src/main/java/com/stripe/model/QuotePreviewInvoice.java index d8c35175a33..456efef9535 100644 --- a/src/main/java/com/stripe/model/QuotePreviewInvoice.java +++ b/src/main/java/com/stripe/model/QuotePreviewInvoice.java @@ -446,6 +446,13 @@ public class QuotePreviewInvoice extends ApiResource implements HasId { @SerializedName("receipt_number") String receiptNumber; + /** + * The rendering-related settings that control how the invoice is displayed on customer-facing + * surfaces such as PDF and Hosted Invoice Page. + */ + @SerializedName("rendering") + Rendering rendering; + /** Options for invoice PDF rendering. */ @SerializedName("rendering_options") RenderingOptions renderingOptions; @@ -1292,6 +1299,33 @@ public static class FinancialConnections extends StripeObject { } } + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Rendering extends StripeObject { + /** How line-item prices and amounts will be displayed with respect to tax on invoice PDFs. */ + @SerializedName("amount_tax_display") + String amountTaxDisplay; + + /** Invoice pdf rendering options. */ + @SerializedName("pdf") + Pdf pdf; + + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Pdf extends StripeObject { + /** + * Page size of invoice pdf. Options include a4, letter, and auto. If set to auto, page size + * will be switched to a4 or letter based on customer locale. + * + *

One of {@code a4}, {@code auto}, or {@code letter}. + */ + @SerializedName("page_size") + String pageSize; + } + } + @Getter @Setter @EqualsAndHashCode(callSuper = false) @@ -1612,6 +1646,7 @@ public void setResponseGetter(StripeResponseGetter responseGetter) { trySetResponseGetter(paymentIntent, responseGetter); trySetResponseGetter(paymentSettings, responseGetter); trySetResponseGetter(quote, responseGetter); + trySetResponseGetter(rendering, responseGetter); trySetResponseGetter(renderingOptions, responseGetter); trySetResponseGetter(shippingCost, responseGetter); trySetResponseGetter(shippingDetails, responseGetter); diff --git a/src/main/java/com/stripe/param/InvoiceCreateParams.java b/src/main/java/com/stripe/param/InvoiceCreateParams.java index 896dce1fb4b..042a13462f9 100644 --- a/src/main/java/com/stripe/param/InvoiceCreateParams.java +++ b/src/main/java/com/stripe/param/InvoiceCreateParams.java @@ -184,6 +184,13 @@ public class InvoiceCreateParams extends ApiRequestParams { @SerializedName("pending_invoice_items_behavior") PendingInvoiceItemsBehavior pendingInvoiceItemsBehavior; + /** + * The rendering-related settings that control how the invoice is displayed on customer-facing + * surfaces such as PDF and Hosted Invoice Page. + */ + @SerializedName("rendering") + Rendering rendering; + /** Options for invoice PDF rendering. */ @SerializedName("rendering_options") Object renderingOptions; @@ -249,6 +256,7 @@ private InvoiceCreateParams( String onBehalfOf, PaymentSettings paymentSettings, PendingInvoiceItemsBehavior pendingInvoiceItemsBehavior, + Rendering rendering, Object renderingOptions, ShippingCost shippingCost, ShippingDetails shippingDetails, @@ -280,6 +288,7 @@ private InvoiceCreateParams( this.onBehalfOf = onBehalfOf; this.paymentSettings = paymentSettings; this.pendingInvoiceItemsBehavior = pendingInvoiceItemsBehavior; + this.rendering = rendering; this.renderingOptions = renderingOptions; this.shippingCost = shippingCost; this.shippingDetails = shippingDetails; @@ -343,6 +352,8 @@ public static class Builder { private PendingInvoiceItemsBehavior pendingInvoiceItemsBehavior; + private Rendering rendering; + private Object renderingOptions; private ShippingCost shippingCost; @@ -383,6 +394,7 @@ public InvoiceCreateParams build() { this.onBehalfOf, this.paymentSettings, this.pendingInvoiceItemsBehavior, + this.rendering, this.renderingOptions, this.shippingCost, this.shippingDetails, @@ -818,6 +830,15 @@ public Builder setPendingInvoiceItemsBehavior( return this; } + /** + * The rendering-related settings that control how the invoice is displayed on customer-facing + * surfaces such as PDF and Hosted Invoice Page. + */ + public Builder setRendering(InvoiceCreateParams.Rendering rendering) { + this.rendering = rendering; + return this; + } + /** Options for invoice PDF rendering. */ public Builder setRenderingOptions(InvoiceCreateParams.RenderingOptions renderingOptions) { this.renderingOptions = renderingOptions; @@ -3569,6 +3590,219 @@ public enum PaymentMethodType implements ApiRequestParams.EnumParam { } } + @Getter + public static class Rendering { + /** + * How line-item prices and amounts will be displayed with respect to tax on invoice PDFs. One + * of {@code exclude_tax} or {@code include_inclusive_tax}. {@code include_inclusive_tax} will + * include inclusive tax (and exclude exclusive tax) in invoice PDF amounts. {@code exclude_tax} + * will exclude all tax (inclusive and exclusive alike) from invoice PDF amounts. + */ + @SerializedName("amount_tax_display") + ApiRequestParams.EnumParam amountTaxDisplay; + + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-level field (serialized) name in this + * param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Invoice pdf rendering options. */ + @SerializedName("pdf") + Pdf pdf; + + private Rendering( + ApiRequestParams.EnumParam amountTaxDisplay, Map extraParams, Pdf pdf) { + this.amountTaxDisplay = amountTaxDisplay; + this.extraParams = extraParams; + this.pdf = pdf; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private ApiRequestParams.EnumParam amountTaxDisplay; + + private Map extraParams; + + private Pdf pdf; + + /** Finalize and obtain parameter instance from this builder. */ + public InvoiceCreateParams.Rendering build() { + return new InvoiceCreateParams.Rendering(this.amountTaxDisplay, this.extraParams, this.pdf); + } + + /** + * How line-item prices and amounts will be displayed with respect to tax on invoice PDFs. One + * of {@code exclude_tax} or {@code include_inclusive_tax}. {@code include_inclusive_tax} will + * include inclusive tax (and exclude exclusive tax) in invoice PDF amounts. {@code + * exclude_tax} will exclude all tax (inclusive and exclusive alike) from invoice PDF amounts. + */ + public Builder setAmountTaxDisplay( + InvoiceCreateParams.Rendering.AmountTaxDisplay amountTaxDisplay) { + this.amountTaxDisplay = amountTaxDisplay; + return this; + } + + /** + * How line-item prices and amounts will be displayed with respect to tax on invoice PDFs. One + * of {@code exclude_tax} or {@code include_inclusive_tax}. {@code include_inclusive_tax} will + * include inclusive tax (and exclude exclusive tax) in invoice PDF amounts. {@code + * exclude_tax} will exclude all tax (inclusive and exclusive alike) from invoice PDF amounts. + */ + public Builder setAmountTaxDisplay(EmptyParam amountTaxDisplay) { + this.amountTaxDisplay = amountTaxDisplay; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` + * call, and subsequent calls add additional key/value pairs to the original map. See {@link + * InvoiceCreateParams.Rendering#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link InvoiceCreateParams.Rendering#extraParams} for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Invoice pdf rendering options. */ + public Builder setPdf(InvoiceCreateParams.Rendering.Pdf pdf) { + this.pdf = pdf; + return this; + } + } + + @Getter + public static class Pdf { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Page size for invoice PDF. Can be set to a4, letter, or auto. If set to auto, page size + * will be switched to a4 or letter based on customer locale. + */ + @SerializedName("page_size") + PageSize pageSize; + + private Pdf(Map extraParams, PageSize pageSize) { + this.extraParams = extraParams; + this.pageSize = pageSize; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private PageSize pageSize; + + /** Finalize and obtain parameter instance from this builder. */ + public InvoiceCreateParams.Rendering.Pdf build() { + return new InvoiceCreateParams.Rendering.Pdf(this.extraParams, this.pageSize); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link InvoiceCreateParams.Rendering.Pdf#extraParams} for the field + * documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link InvoiceCreateParams.Rendering.Pdf#extraParams} for the field + * documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Page size for invoice PDF. Can be set to a4, letter, or auto. If set to auto, page size + * will be switched to a4 or letter based on customer locale. + */ + public Builder setPageSize(InvoiceCreateParams.Rendering.Pdf.PageSize pageSize) { + this.pageSize = pageSize; + return this; + } + } + + public enum PageSize implements ApiRequestParams.EnumParam { + @SerializedName("a4") + A4("a4"), + + @SerializedName("auto") + AUTO("auto"), + + @SerializedName("letter") + LETTER("letter"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + PageSize(String value) { + this.value = value; + } + } + } + + public enum AmountTaxDisplay implements ApiRequestParams.EnumParam { + @SerializedName("exclude_tax") + EXCLUDE_TAX("exclude_tax"), + + @SerializedName("include_inclusive_tax") + INCLUDE_INCLUSIVE_TAX("include_inclusive_tax"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + AmountTaxDisplay(String value) { + this.value = value; + } + } + } + @Getter public static class RenderingOptions { /** diff --git a/src/main/java/com/stripe/param/InvoiceUpdateParams.java b/src/main/java/com/stripe/param/InvoiceUpdateParams.java index aac8c4bdb4c..eba3177b3ce 100644 --- a/src/main/java/com/stripe/param/InvoiceUpdateParams.java +++ b/src/main/java/com/stripe/param/InvoiceUpdateParams.java @@ -161,6 +161,13 @@ public class InvoiceUpdateParams extends ApiRequestParams { @SerializedName("payment_settings") PaymentSettings paymentSettings; + /** + * The rendering-related settings that control how the invoice is displayed on customer-facing + * surfaces such as PDF and Hosted Invoice Page. + */ + @SerializedName("rendering") + Rendering rendering; + /** Options for invoice PDF rendering. */ @SerializedName("rendering_options") Object renderingOptions; @@ -215,6 +222,7 @@ private InvoiceUpdateParams( Object metadata, Object onBehalfOf, PaymentSettings paymentSettings, + Rendering rendering, Object renderingOptions, Object shippingCost, Object shippingDetails, @@ -241,6 +249,7 @@ private InvoiceUpdateParams( this.metadata = metadata; this.onBehalfOf = onBehalfOf; this.paymentSettings = paymentSettings; + this.rendering = rendering; this.renderingOptions = renderingOptions; this.shippingCost = shippingCost; this.shippingDetails = shippingDetails; @@ -295,6 +304,8 @@ public static class Builder { private PaymentSettings paymentSettings; + private Rendering rendering; + private Object renderingOptions; private Object shippingCost; @@ -329,6 +340,7 @@ public InvoiceUpdateParams build() { this.metadata, this.onBehalfOf, this.paymentSettings, + this.rendering, this.renderingOptions, this.shippingCost, this.shippingDetails, @@ -807,6 +819,15 @@ public Builder setPaymentSettings(InvoiceUpdateParams.PaymentSettings paymentSet return this; } + /** + * The rendering-related settings that control how the invoice is displayed on customer-facing + * surfaces such as PDF and Hosted Invoice Page. + */ + public Builder setRendering(InvoiceUpdateParams.Rendering rendering) { + this.rendering = rendering; + return this; + } + /** Options for invoice PDF rendering. */ public Builder setRenderingOptions(InvoiceUpdateParams.RenderingOptions renderingOptions) { this.renderingOptions = renderingOptions; @@ -3555,6 +3576,219 @@ public enum PaymentMethodType implements ApiRequestParams.EnumParam { } } + @Getter + public static class Rendering { + /** + * How line-item prices and amounts will be displayed with respect to tax on invoice PDFs. One + * of {@code exclude_tax} or {@code include_inclusive_tax}. {@code include_inclusive_tax} will + * include inclusive tax (and exclude exclusive tax) in invoice PDF amounts. {@code exclude_tax} + * will exclude all tax (inclusive and exclusive alike) from invoice PDF amounts. + */ + @SerializedName("amount_tax_display") + ApiRequestParams.EnumParam amountTaxDisplay; + + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-level field (serialized) name in this + * param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Invoice pdf rendering options. */ + @SerializedName("pdf") + Pdf pdf; + + private Rendering( + ApiRequestParams.EnumParam amountTaxDisplay, Map extraParams, Pdf pdf) { + this.amountTaxDisplay = amountTaxDisplay; + this.extraParams = extraParams; + this.pdf = pdf; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private ApiRequestParams.EnumParam amountTaxDisplay; + + private Map extraParams; + + private Pdf pdf; + + /** Finalize and obtain parameter instance from this builder. */ + public InvoiceUpdateParams.Rendering build() { + return new InvoiceUpdateParams.Rendering(this.amountTaxDisplay, this.extraParams, this.pdf); + } + + /** + * How line-item prices and amounts will be displayed with respect to tax on invoice PDFs. One + * of {@code exclude_tax} or {@code include_inclusive_tax}. {@code include_inclusive_tax} will + * include inclusive tax (and exclude exclusive tax) in invoice PDF amounts. {@code + * exclude_tax} will exclude all tax (inclusive and exclusive alike) from invoice PDF amounts. + */ + public Builder setAmountTaxDisplay( + InvoiceUpdateParams.Rendering.AmountTaxDisplay amountTaxDisplay) { + this.amountTaxDisplay = amountTaxDisplay; + return this; + } + + /** + * How line-item prices and amounts will be displayed with respect to tax on invoice PDFs. One + * of {@code exclude_tax} or {@code include_inclusive_tax}. {@code include_inclusive_tax} will + * include inclusive tax (and exclude exclusive tax) in invoice PDF amounts. {@code + * exclude_tax} will exclude all tax (inclusive and exclusive alike) from invoice PDF amounts. + */ + public Builder setAmountTaxDisplay(EmptyParam amountTaxDisplay) { + this.amountTaxDisplay = amountTaxDisplay; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` + * call, and subsequent calls add additional key/value pairs to the original map. See {@link + * InvoiceUpdateParams.Rendering#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link InvoiceUpdateParams.Rendering#extraParams} for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Invoice pdf rendering options. */ + public Builder setPdf(InvoiceUpdateParams.Rendering.Pdf pdf) { + this.pdf = pdf; + return this; + } + } + + @Getter + public static class Pdf { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Page size for invoice PDF. Can be set to a4, letter, or auto. If set to auto, page size + * will be switched to a4 or letter based on customer locale. + */ + @SerializedName("page_size") + PageSize pageSize; + + private Pdf(Map extraParams, PageSize pageSize) { + this.extraParams = extraParams; + this.pageSize = pageSize; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private PageSize pageSize; + + /** Finalize and obtain parameter instance from this builder. */ + public InvoiceUpdateParams.Rendering.Pdf build() { + return new InvoiceUpdateParams.Rendering.Pdf(this.extraParams, this.pageSize); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link InvoiceUpdateParams.Rendering.Pdf#extraParams} for the field + * documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link InvoiceUpdateParams.Rendering.Pdf#extraParams} for the field + * documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Page size for invoice PDF. Can be set to a4, letter, or auto. If set to auto, page size + * will be switched to a4 or letter based on customer locale. + */ + public Builder setPageSize(InvoiceUpdateParams.Rendering.Pdf.PageSize pageSize) { + this.pageSize = pageSize; + return this; + } + } + + public enum PageSize implements ApiRequestParams.EnumParam { + @SerializedName("a4") + A4("a4"), + + @SerializedName("auto") + AUTO("auto"), + + @SerializedName("letter") + LETTER("letter"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + PageSize(String value) { + this.value = value; + } + } + } + + public enum AmountTaxDisplay implements ApiRequestParams.EnumParam { + @SerializedName("exclude_tax") + EXCLUDE_TAX("exclude_tax"), + + @SerializedName("include_inclusive_tax") + INCLUDE_INCLUSIVE_TAX("include_inclusive_tax"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + AmountTaxDisplay(String value) { + this.value = value; + } + } + } + @Getter public static class RenderingOptions { /** From caa80ee017fc578e2beada0d4da0a827238f4135 Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Fri, 22 Sep 2023 20:33:36 +0000 Subject: [PATCH 07/25] Update generated code for v550 --- OPENAPI_VERSION | 2 +- src/main/java/com/stripe/model/Event.java | 12 +++++------ .../param/WebhookEndpointCreateParams.java | 21 ------------------- .../param/WebhookEndpointUpdateParams.java | 21 ------------------- 4 files changed, 6 insertions(+), 50 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index ad4d2fcef3e..d1d783f9e99 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v549 \ No newline at end of file +v550 \ No newline at end of file diff --git a/src/main/java/com/stripe/model/Event.java b/src/main/java/com/stripe/model/Event.java index 39c5673a578..58dbbbcbf15 100644 --- a/src/main/java/com/stripe/model/Event.java +++ b/src/main/java/com/stripe/model/Event.java @@ -155,7 +155,7 @@ public class Event extends ApiResource implements HasId { * issuing_cardholder.updated}, {@code issuing_dispute.closed}, {@code issuing_dispute.created}, * {@code issuing_dispute.funds_reinstated}, {@code issuing_dispute.submitted}, {@code * issuing_dispute.updated}, {@code issuing_transaction.created}, {@code - * issuing_transaction.updated}, {@code mandate.updated}, {@code order.created}, {@code + * issuing_transaction.updated}, {@code mandate.updated}, {@code * payment_intent.amount_capturable_updated}, {@code payment_intent.canceled}, {@code * payment_intent.created}, {@code payment_intent.partially_funded}, {@code * payment_intent.payment_failed}, {@code payment_intent.processing}, {@code @@ -171,16 +171,14 @@ public class Event extends ApiResource implements HasId { * quote.accept_failed}, {@code quote.accepted}, {@code quote.accepting}, {@code quote.canceled}, * {@code quote.created}, {@code quote.draft}, {@code quote.finalized}, {@code quote.reestimated}, * {@code quote.stale}, {@code radar.early_fraud_warning.created}, {@code - * radar.early_fraud_warning.updated}, {@code recipient.created}, {@code recipient.deleted}, - * {@code recipient.updated}, {@code refund.created}, {@code refund.updated}, {@code + * radar.early_fraud_warning.updated}, {@code refund.created}, {@code refund.updated}, {@code * reporting.report_run.failed}, {@code reporting.report_run.succeeded}, {@code * reporting.report_type.updated}, {@code review.closed}, {@code review.opened}, {@code * setup_intent.canceled}, {@code setup_intent.created}, {@code setup_intent.requires_action}, * {@code setup_intent.setup_failed}, {@code setup_intent.succeeded}, {@code - * sigma.scheduled_query_run.created}, {@code sku.created}, {@code sku.deleted}, {@code - * sku.updated}, {@code source.canceled}, {@code source.chargeable}, {@code source.failed}, {@code - * source.mandate_notification}, {@code source.refund_attributes_required}, {@code - * source.transaction.created}, {@code source.transaction.updated}, {@code + * sigma.scheduled_query_run.created}, {@code source.canceled}, {@code source.chargeable}, {@code + * source.failed}, {@code source.mandate_notification}, {@code source.refund_attributes_required}, + * {@code source.transaction.created}, {@code source.transaction.updated}, {@code * subscription_schedule.aborted}, {@code subscription_schedule.canceled}, {@code * subscription_schedule.completed}, {@code subscription_schedule.created}, {@code * subscription_schedule.expiring}, {@code subscription_schedule.released}, {@code diff --git a/src/main/java/com/stripe/param/WebhookEndpointCreateParams.java b/src/main/java/com/stripe/param/WebhookEndpointCreateParams.java index fe39a10d040..26138b12d6c 100644 --- a/src/main/java/com/stripe/param/WebhookEndpointCreateParams.java +++ b/src/main/java/com/stripe/param/WebhookEndpointCreateParams.java @@ -958,9 +958,6 @@ public enum EnabledEvent implements ApiRequestParams.EnumParam { @SerializedName("mandate.updated") MANDATE__UPDATED("mandate.updated"), - @SerializedName("order.created") - ORDER__CREATED("order.created"), - @SerializedName("payment_intent.amount_capturable_updated") PAYMENT_INTENT__AMOUNT_CAPTURABLE_UPDATED("payment_intent.amount_capturable_updated"), @@ -1096,15 +1093,6 @@ public enum EnabledEvent implements ApiRequestParams.EnumParam { @SerializedName("radar.early_fraud_warning.updated") RADAR__EARLY_FRAUD_WARNING__UPDATED("radar.early_fraud_warning.updated"), - @SerializedName("recipient.created") - RECIPIENT__CREATED("recipient.created"), - - @SerializedName("recipient.deleted") - RECIPIENT__DELETED("recipient.deleted"), - - @SerializedName("recipient.updated") - RECIPIENT__UPDATED("recipient.updated"), - @SerializedName("refund.created") REFUND__CREATED("refund.created"), @@ -1144,15 +1132,6 @@ public enum EnabledEvent implements ApiRequestParams.EnumParam { @SerializedName("sigma.scheduled_query_run.created") SIGMA__SCHEDULED_QUERY_RUN__CREATED("sigma.scheduled_query_run.created"), - @SerializedName("sku.created") - SKU__CREATED("sku.created"), - - @SerializedName("sku.deleted") - SKU__DELETED("sku.deleted"), - - @SerializedName("sku.updated") - SKU__UPDATED("sku.updated"), - @SerializedName("source.canceled") SOURCE__CANCELED("source.canceled"), diff --git a/src/main/java/com/stripe/param/WebhookEndpointUpdateParams.java b/src/main/java/com/stripe/param/WebhookEndpointUpdateParams.java index b843ecf8098..45f48dce8ed 100644 --- a/src/main/java/com/stripe/param/WebhookEndpointUpdateParams.java +++ b/src/main/java/com/stripe/param/WebhookEndpointUpdateParams.java @@ -631,9 +631,6 @@ public enum EnabledEvent implements ApiRequestParams.EnumParam { @SerializedName("mandate.updated") MANDATE__UPDATED("mandate.updated"), - @SerializedName("order.created") - ORDER__CREATED("order.created"), - @SerializedName("payment_intent.amount_capturable_updated") PAYMENT_INTENT__AMOUNT_CAPTURABLE_UPDATED("payment_intent.amount_capturable_updated"), @@ -769,15 +766,6 @@ public enum EnabledEvent implements ApiRequestParams.EnumParam { @SerializedName("radar.early_fraud_warning.updated") RADAR__EARLY_FRAUD_WARNING__UPDATED("radar.early_fraud_warning.updated"), - @SerializedName("recipient.created") - RECIPIENT__CREATED("recipient.created"), - - @SerializedName("recipient.deleted") - RECIPIENT__DELETED("recipient.deleted"), - - @SerializedName("recipient.updated") - RECIPIENT__UPDATED("recipient.updated"), - @SerializedName("refund.created") REFUND__CREATED("refund.created"), @@ -817,15 +805,6 @@ public enum EnabledEvent implements ApiRequestParams.EnumParam { @SerializedName("sigma.scheduled_query_run.created") SIGMA__SCHEDULED_QUERY_RUN__CREATED("sigma.scheduled_query_run.created"), - @SerializedName("sku.created") - SKU__CREATED("sku.created"), - - @SerializedName("sku.deleted") - SKU__DELETED("sku.deleted"), - - @SerializedName("sku.updated") - SKU__UPDATED("sku.updated"), - @SerializedName("source.canceled") SOURCE__CANCELED("source.canceled"), From b8062ccc92a728b4c48ac5abe74509c2b594c1b0 Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Fri, 22 Sep 2023 21:17:00 +0000 Subject: [PATCH 08/25] Update generated code for v550 --- src/main/java/com/stripe/model/Event.java | 4 +++- .../param/WebhookEndpointCreateParams.java | 23 ++++++++++++++++++- .../param/WebhookEndpointUpdateParams.java | 23 ++++++++++++++++++- 3 files changed, 47 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/stripe/model/Event.java b/src/main/java/com/stripe/model/Event.java index 58dbbbcbf15..292efe1ffe6 100644 --- a/src/main/java/com/stripe/model/Event.java +++ b/src/main/java/com/stripe/model/Event.java @@ -205,7 +205,9 @@ public class Event extends ApiResource implements HasId { * treasury.outbound_transfer.failed}, {@code treasury.outbound_transfer.posted}, {@code * treasury.outbound_transfer.returned}, {@code treasury.received_credit.created}, {@code * treasury.received_credit.failed}, {@code treasury.received_credit.succeeded}, {@code - * treasury.received_debit.created}, or {@code invoiceitem.updated}. + * treasury.received_debit.created}, {@code invoiceitem.updated}, {@code order.created}, {@code + * recipient.created}, {@code recipient.deleted}, {@code recipient.updated}, {@code sku.created}, + * {@code sku.deleted}, or {@code sku.updated}. */ @SerializedName("type") String type; diff --git a/src/main/java/com/stripe/param/WebhookEndpointCreateParams.java b/src/main/java/com/stripe/param/WebhookEndpointCreateParams.java index 26138b12d6c..583081b229b 100644 --- a/src/main/java/com/stripe/param/WebhookEndpointCreateParams.java +++ b/src/main/java/com/stripe/param/WebhookEndpointCreateParams.java @@ -1323,7 +1323,28 @@ public enum EnabledEvent implements ApiRequestParams.EnumParam { TREASURY__RECEIVED_DEBIT__CREATED("treasury.received_debit.created"), @SerializedName("invoiceitem.updated") - INVOICEITEM__UPDATED("invoiceitem.updated"); + INVOICEITEM__UPDATED("invoiceitem.updated"), + + @SerializedName("order.created") + ORDER__CREATED("order.created"), + + @SerializedName("recipient.created") + RECIPIENT__CREATED("recipient.created"), + + @SerializedName("recipient.deleted") + RECIPIENT__DELETED("recipient.deleted"), + + @SerializedName("recipient.updated") + RECIPIENT__UPDATED("recipient.updated"), + + @SerializedName("sku.created") + SKU__CREATED("sku.created"), + + @SerializedName("sku.deleted") + SKU__DELETED("sku.deleted"), + + @SerializedName("sku.updated") + SKU__UPDATED("sku.updated"); @Getter(onMethod_ = {@Override}) private final String value; diff --git a/src/main/java/com/stripe/param/WebhookEndpointUpdateParams.java b/src/main/java/com/stripe/param/WebhookEndpointUpdateParams.java index 45f48dce8ed..364af2040a3 100644 --- a/src/main/java/com/stripe/param/WebhookEndpointUpdateParams.java +++ b/src/main/java/com/stripe/param/WebhookEndpointUpdateParams.java @@ -996,7 +996,28 @@ public enum EnabledEvent implements ApiRequestParams.EnumParam { TREASURY__RECEIVED_DEBIT__CREATED("treasury.received_debit.created"), @SerializedName("invoiceitem.updated") - INVOICEITEM__UPDATED("invoiceitem.updated"); + INVOICEITEM__UPDATED("invoiceitem.updated"), + + @SerializedName("order.created") + ORDER__CREATED("order.created"), + + @SerializedName("recipient.created") + RECIPIENT__CREATED("recipient.created"), + + @SerializedName("recipient.deleted") + RECIPIENT__DELETED("recipient.deleted"), + + @SerializedName("recipient.updated") + RECIPIENT__UPDATED("recipient.updated"), + + @SerializedName("sku.created") + SKU__CREATED("sku.created"), + + @SerializedName("sku.deleted") + SKU__DELETED("sku.deleted"), + + @SerializedName("sku.updated") + SKU__UPDATED("sku.updated"); @Getter(onMethod_ = {@Override}) private final String value; From c04e585b1dde9d545be86ecb1fa028761d3cfcd0 Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Sat, 23 Sep 2023 02:12:44 +0000 Subject: [PATCH 09/25] Update generated code for v551 --- OPENAPI_VERSION | 2 +- src/main/java/com/stripe/model/Payout.java | 260 +++++++++--------- .../stripe/model/treasury/ReceivedCredit.java | 6 +- .../com/stripe/param/PayoutCreateParams.java | 44 +-- .../com/stripe/service/PayoutService.java | 144 +++++----- 5 files changed, 222 insertions(+), 234 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index d1d783f9e99..08b883915aa 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v550 \ No newline at end of file +v551 \ No newline at end of file diff --git a/src/main/java/com/stripe/model/Payout.java b/src/main/java/com/stripe/model/Payout.java index 17a969612be..d8c4eb3edad 100644 --- a/src/main/java/com/stripe/model/Payout.java +++ b/src/main/java/com/stripe/model/Payout.java @@ -24,7 +24,7 @@ * A {@code Payout} object is created when you receive funds from Stripe, or when you initiate a * payout to either a bank account or debit card of a connected Stripe account. You - * can retrieve individual payouts, as well as list all payouts. Payouts are made on varying schedules, depending on * your country and industry. * @@ -35,23 +35,22 @@ @EqualsAndHashCode(callSuper = false) public class Payout extends ApiResource implements MetadataStore, BalanceTransactionSource { /** - * Amount (in cents (or local equivalent)) to be transferred to your bank account or debit card. + * The amount (in cents (or local equivalent)) that transfers to your bank account or debit card. */ @SerializedName("amount") Long amount; /** - * Date the payout is expected to arrive in the bank. This factors in delays like weekends or bank - * holidays. + * Date that you can expect the payout to arrive in the bank. This factors in delays to account + * for weekends or bank holidays. */ @SerializedName("arrival_date") Long arrivalDate; /** - * Returns {@code true} if the payout was created by an automated payout schedule, and - * {@code false} if it was requested - * manually. + * Returns {@code true} if the payout is created by an automated payout schedule and {@code + * false} if it's requested manually. */ @SerializedName("automatic") Boolean automatic; @@ -79,16 +78,15 @@ public class Payout extends ApiResource implements MetadataStore, Balanc @SerializedName("description") String description; - /** ID of the bank account or card the payout was sent to. */ + /** ID of the bank account or card the payout is sent to. */ @SerializedName("destination") @Getter(lombok.AccessLevel.NONE) @Setter(lombok.AccessLevel.NONE) ExpandableField destination; /** - * If the payout failed or was canceled, this will be the ID of the balance transaction that - * reversed the initial balance transaction, and puts the funds from the failed payout back in - * your balance. + * If the payout fails or cancels, this is the ID of the balance transaction that reverses the + * initial balance transaction and returns the funds from the failed payout back in your balance. */ @SerializedName("failure_balance_transaction") @Getter(lombok.AccessLevel.NONE) @@ -96,14 +94,13 @@ public class Payout extends ApiResource implements MetadataStore, Balanc ExpandableField failureBalanceTransaction; /** - * Error code explaining reason for payout failure if available. See Types of payout failures for a list of - * failure codes. + * Error code that provides a reason for a payout failure, if available. View our list of failure codes. */ @SerializedName("failure_code") String failureCode; - /** Message to user further explaining reason for payout failure if available. */ + /** Message that provides the reason for a payout failure, if available. */ @SerializedName("failure_message") String failureMessage; @@ -130,9 +127,9 @@ public class Payout extends ApiResource implements MetadataStore, Balanc /** * The method used to send this payout, which can be {@code standard} or {@code instant}. {@code - * instant} is supported for payouts to debit cards and bank accounts in certain countries. (See - * Bank support for Instant - * Payouts for more information.) + * instant} is supported for payouts to debit cards and bank accounts in certain countries. Learn + * more about bank support for + * Instant Payouts. */ @SerializedName("method") String method; @@ -152,39 +149,38 @@ public class Payout extends ApiResource implements MetadataStore, Balanc ExpandableField originalPayout; /** - * If {@code completed}, the Balance - * Transactions API may be used to list all Balance Transactions that were paid out in this - * payout. + * Transactions API to list all balance transactions that are paid out in this payout. * *

One of {@code completed}, {@code in_progress}, or {@code not_applicable}. */ @SerializedName("reconciliation_status") String reconciliationStatus; - /** If the payout was reversed, this is the ID of the payout that reverses this payout. */ + /** If the payout reverses, this is the ID of the payout that reverses this payout. */ @SerializedName("reversed_by") @Getter(lombok.AccessLevel.NONE) @Setter(lombok.AccessLevel.NONE) ExpandableField reversedBy; /** - * The source balance this payout came from. One of {@code card}, {@code fpx}, or {@code - * bank_account}. + * The source balance this payout came from, which can be one of the following: {@code card}, + * {@code fpx}, or {@code bank_account}. */ @SerializedName("source_type") String sourceType; - /** Extra information about a payout to be displayed on the user's bank statement. */ + /** Extra information about a payout that displays on the user's bank statement. */ @SerializedName("statement_descriptor") String statementDescriptor; /** * Current status of the payout: {@code paid}, {@code pending}, {@code in_transit}, {@code - * canceled} or {@code failed}. A payout is {@code pending} until it is submitted to the bank, - * when it becomes {@code in_transit}. The status then changes to {@code paid} if the transaction - * goes through, or to {@code failed} or {@code canceled} (within 5 business days). Some failed - * payouts may initially show as {@code paid} but then change to {@code failed}. + * canceled} or {@code failed}. A payout is {@code pending} until it's submitted to the bank, when + * it becomes {@code in_transit}. The status changes to {@code paid} if the transaction succeeds, + * or to {@code failed} or {@code canceled} (within 5 business days). Some payouts that fail might + * initially show as {@code paid}, then change to {@code failed}. */ @SerializedName("status") String status; @@ -290,32 +286,32 @@ public void setReversedByObject(Payout expandableObject) { } /** - * A previously created payout can be canceled if it has not yet been paid out. Funds will be - * refunded to your available balance. You may not cancel automatic Stripe payouts. + * You can cancel a previously created payout if it hasn’t been paid out yet. Stripe refunds the + * funds to your available balance. You can’t cancel automatic Stripe payouts. */ public Payout cancel() throws StripeException { return cancel((Map) null, (RequestOptions) null); } /** - * A previously created payout can be canceled if it has not yet been paid out. Funds will be - * refunded to your available balance. You may not cancel automatic Stripe payouts. + * You can cancel a previously created payout if it hasn’t been paid out yet. Stripe refunds the + * funds to your available balance. You can’t cancel automatic Stripe payouts. */ public Payout cancel(RequestOptions options) throws StripeException { return cancel((Map) null, options); } /** - * A previously created payout can be canceled if it has not yet been paid out. Funds will be - * refunded to your available balance. You may not cancel automatic Stripe payouts. + * You can cancel a previously created payout if it hasn’t been paid out yet. Stripe refunds the + * funds to your available balance. You can’t cancel automatic Stripe payouts. */ public Payout cancel(Map params) throws StripeException { return cancel(params, (RequestOptions) null); } /** - * A previously created payout can be canceled if it has not yet been paid out. Funds will be - * refunded to your available balance. You may not cancel automatic Stripe payouts. + * You can cancel a previously created payout if it hasn’t been paid out yet. Stripe refunds the + * funds to your available balance. You can’t cancel automatic Stripe payouts. */ public Payout cancel(Map params, RequestOptions options) throws StripeException { String path = String.format("/v1/payouts/%s/cancel", ApiResource.urlEncodeId(this.getId())); @@ -331,16 +327,16 @@ public Payout cancel(Map params, RequestOptions options) throws } /** - * A previously created payout can be canceled if it has not yet been paid out. Funds will be - * refunded to your available balance. You may not cancel automatic Stripe payouts. + * You can cancel a previously created payout if it hasn’t been paid out yet. Stripe refunds the + * funds to your available balance. You can’t cancel automatic Stripe payouts. */ public Payout cancel(PayoutCancelParams params) throws StripeException { return cancel(params, (RequestOptions) null); } /** - * A previously created payout can be canceled if it has not yet been paid out. Funds will be - * refunded to your available balance. You may not cancel automatic Stripe payouts. + * You can cancel a previously created payout if it hasn’t been paid out yet. Stripe refunds the + * funds to your available balance. You can’t cancel automatic Stripe payouts. */ public Payout cancel(PayoutCancelParams params, RequestOptions options) throws StripeException { String path = String.format("/v1/payouts/%s/cancel", ApiResource.urlEncodeId(this.getId())); @@ -357,15 +353,15 @@ public Payout cancel(PayoutCancelParams params, RequestOptions options) throws S } /** - * To send funds to your own bank account, you create a new payout object. Your Stripe balance must be able to cover the payout - * amount, or you’ll receive an “Insufficient Funds” error. + * To send funds to your own bank account, create a new payout object. Your Stripe balance must cover the payout amount. If + * it doesn’t, you receive an “Insufficient Funds” error. * - *

If your API key is in test mode, money won’t actually be sent, though everything else will - * occur as if in live mode. + *

If your API key is in test mode, money won’t actually be sent, though every other action + * occurs as if you’re in live mode. * - *

If you are creating a manual payout on a Stripe account that uses multiple payment source - * types, you’ll need to specify the source type balance that the payout should draw from. The If you create a manual payout on a Stripe account that uses multiple payment source types, + * you need to specify the source type balance that the payout draws from. The balance object details available and * pending amounts by source type. */ @@ -374,15 +370,15 @@ public static Payout create(Map params) throws StripeException { } /** - * To send funds to your own bank account, you create a new payout object. Your Stripe balance must be able to cover the payout - * amount, or you’ll receive an “Insufficient Funds” error. + * To send funds to your own bank account, create a new payout object. Your Stripe balance must cover the payout amount. If + * it doesn’t, you receive an “Insufficient Funds” error. * - *

If your API key is in test mode, money won’t actually be sent, though everything else will - * occur as if in live mode. + *

If your API key is in test mode, money won’t actually be sent, though every other action + * occurs as if you’re in live mode. * - *

If you are creating a manual payout on a Stripe account that uses multiple payment source - * types, you’ll need to specify the source type balance that the payout should draw from. The If you create a manual payout on a Stripe account that uses multiple payment source types, + * you need to specify the source type balance that the payout draws from. The balance object details available and * pending amounts by source type. */ @@ -401,15 +397,15 @@ public static Payout create(Map params, RequestOptions options) } /** - * To send funds to your own bank account, you create a new payout object. Your Stripe balance must be able to cover the payout - * amount, or you’ll receive an “Insufficient Funds” error. + * To send funds to your own bank account, create a new payout object. Your Stripe balance must cover the payout amount. If + * it doesn’t, you receive an “Insufficient Funds” error. * - *

If your API key is in test mode, money won’t actually be sent, though everything else will - * occur as if in live mode. + *

If your API key is in test mode, money won’t actually be sent, though every other action + * occurs as if you’re in live mode. * - *

If you are creating a manual payout on a Stripe account that uses multiple payment source - * types, you’ll need to specify the source type balance that the payout should draw from. The If you create a manual payout on a Stripe account that uses multiple payment source types, + * you need to specify the source type balance that the payout draws from. The balance object details available and * pending amounts by source type. */ @@ -418,15 +414,15 @@ public static Payout create(PayoutCreateParams params) throws StripeException { } /** - * To send funds to your own bank account, you create a new payout object. Your Stripe balance must be able to cover the payout - * amount, or you’ll receive an “Insufficient Funds” error. + * To send funds to your own bank account, create a new payout object. Your Stripe balance must cover the payout amount. If + * it doesn’t, you receive an “Insufficient Funds” error. * - *

If your API key is in test mode, money won’t actually be sent, though everything else will - * occur as if in live mode. + *

If your API key is in test mode, money won’t actually be sent, though every other action + * occurs as if you’re in live mode. * - *

If you are creating a manual payout on a Stripe account that uses multiple payment source - * types, you’ll need to specify the source type balance that the payout should draw from. The If you create a manual payout on a Stripe account that uses multiple payment source types, + * you need to specify the source type balance that the payout draws from. The balance object details available and * pending amounts by source type. */ @@ -446,18 +442,18 @@ public static Payout create(PayoutCreateParams params, RequestOptions options) } /** - * Returns a list of existing payouts sent to third-party bank accounts or that Stripe has sent - * you. The payouts are returned in sorted order, with the most recently created payouts appearing - * first. + * Returns a list of existing payouts sent to third-party bank accounts or payouts that Stripe + * sent to you. The payouts return in sorted order, with the most recently created payouts + * appearing first. */ public static PayoutCollection list(Map params) throws StripeException { return list(params, (RequestOptions) null); } /** - * Returns a list of existing payouts sent to third-party bank accounts or that Stripe has sent - * you. The payouts are returned in sorted order, with the most recently created payouts appearing - * first. + * Returns a list of existing payouts sent to third-party bank accounts or payouts that Stripe + * sent to you. The payouts return in sorted order, with the most recently created payouts + * appearing first. */ public static PayoutCollection list(Map params, RequestOptions options) throws StripeException { @@ -474,18 +470,18 @@ public static PayoutCollection list(Map params, RequestOptions o } /** - * Returns a list of existing payouts sent to third-party bank accounts or that Stripe has sent - * you. The payouts are returned in sorted order, with the most recently created payouts appearing - * first. + * Returns a list of existing payouts sent to third-party bank accounts or payouts that Stripe + * sent to you. The payouts return in sorted order, with the most recently created payouts + * appearing first. */ public static PayoutCollection list(PayoutListParams params) throws StripeException { return list(params, (RequestOptions) null); } /** - * Returns a list of existing payouts sent to third-party bank accounts or that Stripe has sent - * you. The payouts are returned in sorted order, with the most recently created payouts appearing - * first. + * Returns a list of existing payouts sent to third-party bank accounts or payouts that Stripe + * sent to you. The payouts return in sorted order, with the most recently created payouts + * appearing first. */ public static PayoutCollection list(PayoutListParams params, RequestOptions options) throws StripeException { @@ -504,8 +500,7 @@ public static PayoutCollection list(PayoutListParams params, RequestOptions opti /** * Retrieves the details of an existing payout. Supply the unique payout ID from either a payout - * creation request or the payout list, and Stripe will return the corresponding payout - * information. + * creation request or the payout list. Stripe returns the corresponding payout information. */ public static Payout retrieve(String payout) throws StripeException { return retrieve(payout, (Map) null, (RequestOptions) null); @@ -513,8 +508,7 @@ public static Payout retrieve(String payout) throws StripeException { /** * Retrieves the details of an existing payout. Supply the unique payout ID from either a payout - * creation request or the payout list, and Stripe will return the corresponding payout - * information. + * creation request or the payout list. Stripe returns the corresponding payout information. */ public static Payout retrieve(String payout, RequestOptions options) throws StripeException { return retrieve(payout, (Map) null, options); @@ -522,8 +516,7 @@ public static Payout retrieve(String payout, RequestOptions options) throws Stri /** * Retrieves the details of an existing payout. Supply the unique payout ID from either a payout - * creation request or the payout list, and Stripe will return the corresponding payout - * information. + * creation request or the payout list. Stripe returns the corresponding payout information. */ public static Payout retrieve(String payout, Map params, RequestOptions options) throws StripeException { @@ -541,8 +534,7 @@ public static Payout retrieve(String payout, Map params, Request /** * Retrieves the details of an existing payout. Supply the unique payout ID from either a payout - * creation request or the payout list, and Stripe will return the corresponding payout - * information. + * creation request or the payout list. Stripe returns the corresponding payout information. */ public static Payout retrieve(String payout, PayoutRetrieveParams params, RequestOptions options) throws StripeException { @@ -560,52 +552,52 @@ public static Payout retrieve(String payout, PayoutRetrieveParams params, Reques } /** - * Reverses a payout by debiting the destination bank account. Only payouts for connected accounts - * to US bank accounts may be reversed at this time. If the payout is in the {@code pending} - * status, {@code /v1/payouts/:id/cancel} should be used instead. + * Reverses a payout by debiting the destination bank account. At this time, you can only reverse + * payouts for connected accounts to US bank accounts. If the payout is in the {@code pending} + * status, use {@code /v1/payouts/:id/cancel} instead. * - *

By requesting a reversal via {@code /v1/payouts/:id/reverse}, you confirm that the - * authorized signatory of the selected bank account has authorized the debit on the bank account - * and that no other authorization is required. + *

By requesting a reversal through {@code /v1/payouts/:id/reverse}, you confirm that the + * authorized signatory of the selected bank account authorizes the debit on the bank account and + * that no other authorization is required. */ public Payout reverse() throws StripeException { return reverse((Map) null, (RequestOptions) null); } /** - * Reverses a payout by debiting the destination bank account. Only payouts for connected accounts - * to US bank accounts may be reversed at this time. If the payout is in the {@code pending} - * status, {@code /v1/payouts/:id/cancel} should be used instead. + * Reverses a payout by debiting the destination bank account. At this time, you can only reverse + * payouts for connected accounts to US bank accounts. If the payout is in the {@code pending} + * status, use {@code /v1/payouts/:id/cancel} instead. * - *

By requesting a reversal via {@code /v1/payouts/:id/reverse}, you confirm that the - * authorized signatory of the selected bank account has authorized the debit on the bank account - * and that no other authorization is required. + *

By requesting a reversal through {@code /v1/payouts/:id/reverse}, you confirm that the + * authorized signatory of the selected bank account authorizes the debit on the bank account and + * that no other authorization is required. */ public Payout reverse(RequestOptions options) throws StripeException { return reverse((Map) null, options); } /** - * Reverses a payout by debiting the destination bank account. Only payouts for connected accounts - * to US bank accounts may be reversed at this time. If the payout is in the {@code pending} - * status, {@code /v1/payouts/:id/cancel} should be used instead. + * Reverses a payout by debiting the destination bank account. At this time, you can only reverse + * payouts for connected accounts to US bank accounts. If the payout is in the {@code pending} + * status, use {@code /v1/payouts/:id/cancel} instead. * - *

By requesting a reversal via {@code /v1/payouts/:id/reverse}, you confirm that the - * authorized signatory of the selected bank account has authorized the debit on the bank account - * and that no other authorization is required. + *

By requesting a reversal through {@code /v1/payouts/:id/reverse}, you confirm that the + * authorized signatory of the selected bank account authorizes the debit on the bank account and + * that no other authorization is required. */ public Payout reverse(Map params) throws StripeException { return reverse(params, (RequestOptions) null); } /** - * Reverses a payout by debiting the destination bank account. Only payouts for connected accounts - * to US bank accounts may be reversed at this time. If the payout is in the {@code pending} - * status, {@code /v1/payouts/:id/cancel} should be used instead. + * Reverses a payout by debiting the destination bank account. At this time, you can only reverse + * payouts for connected accounts to US bank accounts. If the payout is in the {@code pending} + * status, use {@code /v1/payouts/:id/cancel} instead. * - *

By requesting a reversal via {@code /v1/payouts/:id/reverse}, you confirm that the - * authorized signatory of the selected bank account has authorized the debit on the bank account - * and that no other authorization is required. + *

By requesting a reversal through {@code /v1/payouts/:id/reverse}, you confirm that the + * authorized signatory of the selected bank account authorizes the debit on the bank account and + * that no other authorization is required. */ public Payout reverse(Map params, RequestOptions options) throws StripeException { String path = String.format("/v1/payouts/%s/reverse", ApiResource.urlEncodeId(this.getId())); @@ -621,26 +613,26 @@ public Payout reverse(Map params, RequestOptions options) throws } /** - * Reverses a payout by debiting the destination bank account. Only payouts for connected accounts - * to US bank accounts may be reversed at this time. If the payout is in the {@code pending} - * status, {@code /v1/payouts/:id/cancel} should be used instead. + * Reverses a payout by debiting the destination bank account. At this time, you can only reverse + * payouts for connected accounts to US bank accounts. If the payout is in the {@code pending} + * status, use {@code /v1/payouts/:id/cancel} instead. * - *

By requesting a reversal via {@code /v1/payouts/:id/reverse}, you confirm that the - * authorized signatory of the selected bank account has authorized the debit on the bank account - * and that no other authorization is required. + *

By requesting a reversal through {@code /v1/payouts/:id/reverse}, you confirm that the + * authorized signatory of the selected bank account authorizes the debit on the bank account and + * that no other authorization is required. */ public Payout reverse(PayoutReverseParams params) throws StripeException { return reverse(params, (RequestOptions) null); } /** - * Reverses a payout by debiting the destination bank account. Only payouts for connected accounts - * to US bank accounts may be reversed at this time. If the payout is in the {@code pending} - * status, {@code /v1/payouts/:id/cancel} should be used instead. + * Reverses a payout by debiting the destination bank account. At this time, you can only reverse + * payouts for connected accounts to US bank accounts. If the payout is in the {@code pending} + * status, use {@code /v1/payouts/:id/cancel} instead. * - *

By requesting a reversal via {@code /v1/payouts/:id/reverse}, you confirm that the - * authorized signatory of the selected bank account has authorized the debit on the bank account - * and that no other authorization is required. + *

By requesting a reversal through {@code /v1/payouts/:id/reverse}, you confirm that the + * authorized signatory of the selected bank account authorizes the debit on the bank account and + * that no other authorization is required. */ public Payout reverse(PayoutReverseParams params, RequestOptions options) throws StripeException { String path = String.format("/v1/payouts/%s/reverse", ApiResource.urlEncodeId(this.getId())); @@ -657,8 +649,8 @@ public Payout reverse(PayoutReverseParams params, RequestOptions options) throws } /** - * Updates the specified payout by setting the values of the parameters passed. Any parameters not - * provided will be left unchanged. This request accepts only the metadata as arguments. + * Updates the specified payout by setting the values of the parameters you pass. We don’t change + * parameters that you don’t provide. This request only accepts the metadata as arguments. */ @Override public Payout update(Map params) throws StripeException { @@ -666,8 +658,8 @@ public Payout update(Map params) throws StripeException { } /** - * Updates the specified payout by setting the values of the parameters passed. Any parameters not - * provided will be left unchanged. This request accepts only the metadata as arguments. + * Updates the specified payout by setting the values of the parameters you pass. We don’t change + * parameters that you don’t provide. This request only accepts the metadata as arguments. */ @Override public Payout update(Map params, RequestOptions options) throws StripeException { @@ -684,16 +676,16 @@ public Payout update(Map params, RequestOptions options) throws } /** - * Updates the specified payout by setting the values of the parameters passed. Any parameters not - * provided will be left unchanged. This request accepts only the metadata as arguments. + * Updates the specified payout by setting the values of the parameters you pass. We don’t change + * parameters that you don’t provide. This request only accepts the metadata as arguments. */ public Payout update(PayoutUpdateParams params) throws StripeException { return update(params, (RequestOptions) null); } /** - * Updates the specified payout by setting the values of the parameters passed. Any parameters not - * provided will be left unchanged. This request accepts only the metadata as arguments. + * Updates the specified payout by setting the values of the parameters you pass. We don’t change + * parameters that you don’t provide. This request only accepts the metadata as arguments. */ public Payout update(PayoutUpdateParams params, RequestOptions options) throws StripeException { String path = String.format("/v1/payouts/%s", ApiResource.urlEncodeId(this.getId())); diff --git a/src/main/java/com/stripe/model/treasury/ReceivedCredit.java b/src/main/java/com/stripe/model/treasury/ReceivedCredit.java index aa2a49a08cd..ff19608ddc7 100644 --- a/src/main/java/com/stripe/model/treasury/ReceivedCredit.java +++ b/src/main/java/com/stripe/model/treasury/ReceivedCredit.java @@ -404,9 +404,9 @@ public static class SourceFlowDetails extends StripeObject { * A {@code Payout} object is created when you receive funds from Stripe, or when you initiate * a payout to either a bank account or debit card of a connected Stripe - * account. You can retrieve individual payouts, as well as list all payouts. Payouts are - * made on varying - * schedules, depending on your country and industry. + * account. You can retrieve individual payouts, and list all payouts. Payouts are made on + * varying schedules, + * depending on your country and industry. * *

Related guide: Receiving payouts */ diff --git a/src/main/java/com/stripe/param/PayoutCreateParams.java b/src/main/java/com/stripe/param/PayoutCreateParams.java index 271d792d01d..5e70e7bd6b0 100644 --- a/src/main/java/com/stripe/param/PayoutCreateParams.java +++ b/src/main/java/com/stripe/param/PayoutCreateParams.java @@ -28,8 +28,8 @@ public class PayoutCreateParams extends ApiRequestParams { String description; /** - * The ID of a bank account or a card to send the payout to. If no destination is supplied, the - * default external account for the specified currency will be used. + * The ID of a bank account or a card to send the payout to. If you don't provide a destination, + * we use the default external account for the specified currency. */ @SerializedName("destination") String destination; @@ -57,27 +57,27 @@ public class PayoutCreateParams extends ApiRequestParams { Map metadata; /** - * The method used to send this payout, which can be {@code standard} or {@code instant}. {@code - * instant} is supported for payouts to debit cards and bank accounts in certain countries. (See - * Bank support for Instant - * Payouts for more information.) + * The method used to send this payout, which is {@code standard} or {@code instant}. We support + * {@code instant} for payouts to debit cards and bank accounts in certain countries. Learn more + * about bank support for Instant + * Payouts. */ @SerializedName("method") Method method; /** * The balance type of your Stripe balance to draw this payout from. Balances for different - * payment sources are kept separately. You can find the amounts with the balances API. One of + * payment sources are kept separately. You can find the amounts with the Balances API. One of * {@code bank_account}, {@code card}, or {@code fpx}. */ @SerializedName("source_type") SourceType sourceType; /** - * A string to be displayed on the recipient's bank or card statement. This may be at most 22 - * characters. Attempting to use a {@code statement_descriptor} longer than 22 characters will - * return an error. Note: Most banks will truncate this information and/or display it - * inconsistently. Some may not display it at all. + * A string that displays on the recipient's bank or card statement (up to 22 characters). A + * {@code statement_descriptor} that's longer than 22 characters return an error. Most banks + * truncate this information and display it inconsistently. Some banks might not display it at + * all. */ @SerializedName("statement_descriptor") String statementDescriptor; @@ -168,8 +168,8 @@ public Builder setDescription(String description) { } /** - * The ID of a bank account or a card to send the payout to. If no destination is supplied, the - * default external account for the specified currency will be used. + * The ID of a bank account or a card to send the payout to. If you don't provide a destination, + * we use the default external account for the specified currency. */ public Builder setDestination(String destination) { this.destination = destination; @@ -255,10 +255,10 @@ public Builder putAllMetadata(Map map) { } /** - * The method used to send this payout, which can be {@code standard} or {@code instant}. {@code - * instant} is supported for payouts to debit cards and bank accounts in certain countries. (See - * Bank support for Instant - * Payouts for more information.) + * The method used to send this payout, which is {@code standard} or {@code instant}. We support + * {@code instant} for payouts to debit cards and bank accounts in certain countries. Learn more + * about bank support for + * Instant Payouts. */ public Builder setMethod(PayoutCreateParams.Method method) { this.method = method; @@ -267,7 +267,7 @@ public Builder setMethod(PayoutCreateParams.Method method) { /** * The balance type of your Stripe balance to draw this payout from. Balances for different - * payment sources are kept separately. You can find the amounts with the balances API. One of + * payment sources are kept separately. You can find the amounts with the Balances API. One of * {@code bank_account}, {@code card}, or {@code fpx}. */ public Builder setSourceType(PayoutCreateParams.SourceType sourceType) { @@ -276,10 +276,10 @@ public Builder setSourceType(PayoutCreateParams.SourceType sourceType) { } /** - * A string to be displayed on the recipient's bank or card statement. This may be at most 22 - * characters. Attempting to use a {@code statement_descriptor} longer than 22 characters will - * return an error. Note: Most banks will truncate this information and/or display it - * inconsistently. Some may not display it at all. + * A string that displays on the recipient's bank or card statement (up to 22 characters). A + * {@code statement_descriptor} that's longer than 22 characters return an error. Most banks + * truncate this information and display it inconsistently. Some banks might not display it at + * all. */ public Builder setStatementDescriptor(String statementDescriptor) { this.statementDescriptor = statementDescriptor; diff --git a/src/main/java/com/stripe/service/PayoutService.java b/src/main/java/com/stripe/service/PayoutService.java index bd4632ac4fa..618d6c6feb0 100644 --- a/src/main/java/com/stripe/service/PayoutService.java +++ b/src/main/java/com/stripe/service/PayoutService.java @@ -26,32 +26,28 @@ public PayoutService(StripeResponseGetter responseGetter) { /** * Retrieves the details of an existing payout. Supply the unique payout ID from either a payout - * creation request or the payout list, and Stripe will return the corresponding payout - * information. + * creation request or the payout list. Stripe returns the corresponding payout information. */ public Payout retrieve(String payout, PayoutRetrieveParams params) throws StripeException { return retrieve(payout, params, (RequestOptions) null); } /** * Retrieves the details of an existing payout. Supply the unique payout ID from either a payout - * creation request or the payout list, and Stripe will return the corresponding payout - * information. + * creation request or the payout list. Stripe returns the corresponding payout information. */ public Payout retrieve(String payout, RequestOptions options) throws StripeException { return retrieve(payout, (PayoutRetrieveParams) null, options); } /** * Retrieves the details of an existing payout. Supply the unique payout ID from either a payout - * creation request or the payout list, and Stripe will return the corresponding payout - * information. + * creation request or the payout list. Stripe returns the corresponding payout information. */ public Payout retrieve(String payout) throws StripeException { return retrieve(payout, (PayoutRetrieveParams) null, (RequestOptions) null); } /** * Retrieves the details of an existing payout. Supply the unique payout ID from either a payout - * creation request or the payout list, and Stripe will return the corresponding payout - * information. + * creation request or the payout list. Stripe returns the corresponding payout information. */ public Payout retrieve(String payout, PayoutRetrieveParams params, RequestOptions options) throws StripeException { @@ -67,29 +63,29 @@ public Payout retrieve(String payout, PayoutRetrieveParams params, RequestOption ApiMode.V1); } /** - * Updates the specified payout by setting the values of the parameters passed. Any parameters not - * provided will be left unchanged. This request accepts only the metadata as arguments. + * Updates the specified payout by setting the values of the parameters you pass. We don’t change + * parameters that you don’t provide. This request only accepts the metadata as arguments. */ public Payout update(String payout, PayoutUpdateParams params) throws StripeException { return update(payout, params, (RequestOptions) null); } /** - * Updates the specified payout by setting the values of the parameters passed. Any parameters not - * provided will be left unchanged. This request accepts only the metadata as arguments. + * Updates the specified payout by setting the values of the parameters you pass. We don’t change + * parameters that you don’t provide. This request only accepts the metadata as arguments. */ public Payout update(String payout, RequestOptions options) throws StripeException { return update(payout, (PayoutUpdateParams) null, options); } /** - * Updates the specified payout by setting the values of the parameters passed. Any parameters not - * provided will be left unchanged. This request accepts only the metadata as arguments. + * Updates the specified payout by setting the values of the parameters you pass. We don’t change + * parameters that you don’t provide. This request only accepts the metadata as arguments. */ public Payout update(String payout) throws StripeException { return update(payout, (PayoutUpdateParams) null, (RequestOptions) null); } /** - * Updates the specified payout by setting the values of the parameters passed. Any parameters not - * provided will be left unchanged. This request accepts only the metadata as arguments. + * Updates the specified payout by setting the values of the parameters you pass. We don’t change + * parameters that you don’t provide. This request only accepts the metadata as arguments. */ public Payout update(String payout, PayoutUpdateParams params, RequestOptions options) throws StripeException { @@ -105,33 +101,33 @@ public Payout update(String payout, PayoutUpdateParams params, RequestOptions op ApiMode.V1); } /** - * Returns a list of existing payouts sent to third-party bank accounts or that Stripe has sent - * you. The payouts are returned in sorted order, with the most recently created payouts appearing - * first. + * Returns a list of existing payouts sent to third-party bank accounts or payouts that Stripe + * sent to you. The payouts return in sorted order, with the most recently created payouts + * appearing first. */ public StripeCollection list(PayoutListParams params) throws StripeException { return list(params, (RequestOptions) null); } /** - * Returns a list of existing payouts sent to third-party bank accounts or that Stripe has sent - * you. The payouts are returned in sorted order, with the most recently created payouts appearing - * first. + * Returns a list of existing payouts sent to third-party bank accounts or payouts that Stripe + * sent to you. The payouts return in sorted order, with the most recently created payouts + * appearing first. */ public StripeCollection list(RequestOptions options) throws StripeException { return list((PayoutListParams) null, options); } /** - * Returns a list of existing payouts sent to third-party bank accounts or that Stripe has sent - * you. The payouts are returned in sorted order, with the most recently created payouts appearing - * first. + * Returns a list of existing payouts sent to third-party bank accounts or payouts that Stripe + * sent to you. The payouts return in sorted order, with the most recently created payouts + * appearing first. */ public StripeCollection list() throws StripeException { return list((PayoutListParams) null, (RequestOptions) null); } /** - * Returns a list of existing payouts sent to third-party bank accounts or that Stripe has sent - * you. The payouts are returned in sorted order, with the most recently created payouts appearing - * first. + * Returns a list of existing payouts sent to third-party bank accounts or payouts that Stripe + * sent to you. The payouts return in sorted order, with the most recently created payouts + * appearing first. */ public StripeCollection list(PayoutListParams params, RequestOptions options) throws StripeException { @@ -147,15 +143,15 @@ public StripeCollection list(PayoutListParams params, RequestOptions opt ApiMode.V1); } /** - * To send funds to your own bank account, you create a new payout object. Your Stripe balance must be able to cover the payout - * amount, or you’ll receive an “Insufficient Funds” error. + * To send funds to your own bank account, create a new payout object. Your Stripe balance must cover the payout amount. If + * it doesn’t, you receive an “Insufficient Funds” error. * - *

If your API key is in test mode, money won’t actually be sent, though everything else will - * occur as if in live mode. + *

If your API key is in test mode, money won’t actually be sent, though every other action + * occurs as if you’re in live mode. * - *

If you are creating a manual payout on a Stripe account that uses multiple payment source - * types, you’ll need to specify the source type balance that the payout should draw from. The If you create a manual payout on a Stripe account that uses multiple payment source types, + * you need to specify the source type balance that the payout draws from. The balance object details available and * pending amounts by source type. */ @@ -163,15 +159,15 @@ public Payout create(PayoutCreateParams params) throws StripeException { return create(params, (RequestOptions) null); } /** - * To send funds to your own bank account, you create a new payout object. Your Stripe balance must be able to cover the payout - * amount, or you’ll receive an “Insufficient Funds” error. + * To send funds to your own bank account, create a new payout object. Your Stripe balance must cover the payout amount. If + * it doesn’t, you receive an “Insufficient Funds” error. * - *

If your API key is in test mode, money won’t actually be sent, though everything else will - * occur as if in live mode. + *

If your API key is in test mode, money won’t actually be sent, though every other action + * occurs as if you’re in live mode. * - *

If you are creating a manual payout on a Stripe account that uses multiple payment source - * types, you’ll need to specify the source type balance that the payout should draw from. The If you create a manual payout on a Stripe account that uses multiple payment source types, + * you need to specify the source type balance that the payout draws from. The balance object details available and * pending amounts by source type. */ @@ -188,29 +184,29 @@ public Payout create(PayoutCreateParams params, RequestOptions options) throws S ApiMode.V1); } /** - * A previously created payout can be canceled if it has not yet been paid out. Funds will be - * refunded to your available balance. You may not cancel automatic Stripe payouts. + * You can cancel a previously created payout if it hasn’t been paid out yet. Stripe refunds the + * funds to your available balance. You can’t cancel automatic Stripe payouts. */ public Payout cancel(String payout, PayoutCancelParams params) throws StripeException { return cancel(payout, params, (RequestOptions) null); } /** - * A previously created payout can be canceled if it has not yet been paid out. Funds will be - * refunded to your available balance. You may not cancel automatic Stripe payouts. + * You can cancel a previously created payout if it hasn’t been paid out yet. Stripe refunds the + * funds to your available balance. You can’t cancel automatic Stripe payouts. */ public Payout cancel(String payout, RequestOptions options) throws StripeException { return cancel(payout, (PayoutCancelParams) null, options); } /** - * A previously created payout can be canceled if it has not yet been paid out. Funds will be - * refunded to your available balance. You may not cancel automatic Stripe payouts. + * You can cancel a previously created payout if it hasn’t been paid out yet. Stripe refunds the + * funds to your available balance. You can’t cancel automatic Stripe payouts. */ public Payout cancel(String payout) throws StripeException { return cancel(payout, (PayoutCancelParams) null, (RequestOptions) null); } /** - * A previously created payout can be canceled if it has not yet been paid out. Funds will be - * refunded to your available balance. You may not cancel automatic Stripe payouts. + * You can cancel a previously created payout if it hasn’t been paid out yet. Stripe refunds the + * funds to your available balance. You can’t cancel automatic Stripe payouts. */ public Payout cancel(String payout, PayoutCancelParams params, RequestOptions options) throws StripeException { @@ -226,49 +222,49 @@ public Payout cancel(String payout, PayoutCancelParams params, RequestOptions op ApiMode.V1); } /** - * Reverses a payout by debiting the destination bank account. Only payouts for connected accounts - * to US bank accounts may be reversed at this time. If the payout is in the {@code pending} - * status, {@code /v1/payouts/:id/cancel} should be used instead. + * Reverses a payout by debiting the destination bank account. At this time, you can only reverse + * payouts for connected accounts to US bank accounts. If the payout is in the {@code pending} + * status, use {@code /v1/payouts/:id/cancel} instead. * - *

By requesting a reversal via {@code /v1/payouts/:id/reverse}, you confirm that the - * authorized signatory of the selected bank account has authorized the debit on the bank account - * and that no other authorization is required. + *

By requesting a reversal through {@code /v1/payouts/:id/reverse}, you confirm that the + * authorized signatory of the selected bank account authorizes the debit on the bank account and + * that no other authorization is required. */ public Payout reverse(String payout, PayoutReverseParams params) throws StripeException { return reverse(payout, params, (RequestOptions) null); } /** - * Reverses a payout by debiting the destination bank account. Only payouts for connected accounts - * to US bank accounts may be reversed at this time. If the payout is in the {@code pending} - * status, {@code /v1/payouts/:id/cancel} should be used instead. + * Reverses a payout by debiting the destination bank account. At this time, you can only reverse + * payouts for connected accounts to US bank accounts. If the payout is in the {@code pending} + * status, use {@code /v1/payouts/:id/cancel} instead. * - *

By requesting a reversal via {@code /v1/payouts/:id/reverse}, you confirm that the - * authorized signatory of the selected bank account has authorized the debit on the bank account - * and that no other authorization is required. + *

By requesting a reversal through {@code /v1/payouts/:id/reverse}, you confirm that the + * authorized signatory of the selected bank account authorizes the debit on the bank account and + * that no other authorization is required. */ public Payout reverse(String payout, RequestOptions options) throws StripeException { return reverse(payout, (PayoutReverseParams) null, options); } /** - * Reverses a payout by debiting the destination bank account. Only payouts for connected accounts - * to US bank accounts may be reversed at this time. If the payout is in the {@code pending} - * status, {@code /v1/payouts/:id/cancel} should be used instead. + * Reverses a payout by debiting the destination bank account. At this time, you can only reverse + * payouts for connected accounts to US bank accounts. If the payout is in the {@code pending} + * status, use {@code /v1/payouts/:id/cancel} instead. * - *

By requesting a reversal via {@code /v1/payouts/:id/reverse}, you confirm that the - * authorized signatory of the selected bank account has authorized the debit on the bank account - * and that no other authorization is required. + *

By requesting a reversal through {@code /v1/payouts/:id/reverse}, you confirm that the + * authorized signatory of the selected bank account authorizes the debit on the bank account and + * that no other authorization is required. */ public Payout reverse(String payout) throws StripeException { return reverse(payout, (PayoutReverseParams) null, (RequestOptions) null); } /** - * Reverses a payout by debiting the destination bank account. Only payouts for connected accounts - * to US bank accounts may be reversed at this time. If the payout is in the {@code pending} - * status, {@code /v1/payouts/:id/cancel} should be used instead. + * Reverses a payout by debiting the destination bank account. At this time, you can only reverse + * payouts for connected accounts to US bank accounts. If the payout is in the {@code pending} + * status, use {@code /v1/payouts/:id/cancel} instead. * - *

By requesting a reversal via {@code /v1/payouts/:id/reverse}, you confirm that the - * authorized signatory of the selected bank account has authorized the debit on the bank account - * and that no other authorization is required. + *

By requesting a reversal through {@code /v1/payouts/:id/reverse}, you confirm that the + * authorized signatory of the selected bank account authorizes the debit on the bank account and + * that no other authorization is required. */ public Payout reverse(String payout, PayoutReverseParams params, RequestOptions options) throws StripeException { From b6a0a725e8f0b9c6533c4e21887a9e82833dc090 Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Mon, 25 Sep 2023 12:03:31 +0000 Subject: [PATCH 10/25] Update generated code for v552 --- OPENAPI_VERSION | 2 +- src/main/java/com/stripe/model/Refund.java | 60 +++++++++++++++++-- .../com/stripe/param/RefundCreateParams.java | 46 +++++++++++++- .../com/stripe/service/RefundService.java | 60 +++++++++++++++++-- 4 files changed, 157 insertions(+), 11 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 08b883915aa..5d756f90ce2 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v551 \ No newline at end of file +v552 \ No newline at end of file diff --git a/src/main/java/com/stripe/model/Refund.java b/src/main/java/com/stripe/model/Refund.java index c08260e6779..3a9a5503832 100644 --- a/src/main/java/com/stripe/model/Refund.java +++ b/src/main/java/com/stripe/model/Refund.java @@ -357,12 +357,38 @@ public Refund cancel(RefundCancelParams params, RequestOptions options) throws S ApiMode.V1); } - /** Create a refund. */ + /** + * When you create a new refund, you must specify a Charge or a PaymentIntent object on which to + * create it. + * + *

Creating a new refund will refund a charge that has previously been created but not yet + * refunded. Funds will be refunded to the credit or debit card that was originally charged. + * + *

You can optionally refund only part of a charge. You can do so multiple times, until the + * entire charge has been refunded. + * + *

Once entirely refunded, a charge can’t be refunded again. This method will raise an error + * when called on an already-refunded charge, or when trying to refund more money than is left on + * a charge. + */ public static Refund create(Map params) throws StripeException { return create(params, (RequestOptions) null); } - /** Create a refund. */ + /** + * When you create a new refund, you must specify a Charge or a PaymentIntent object on which to + * create it. + * + *

Creating a new refund will refund a charge that has previously been created but not yet + * refunded. Funds will be refunded to the credit or debit card that was originally charged. + * + *

You can optionally refund only part of a charge. You can do so multiple times, until the + * entire charge has been refunded. + * + *

Once entirely refunded, a charge can’t be refunded again. This method will raise an error + * when called on an already-refunded charge, or when trying to refund more money than is left on + * a charge. + */ public static Refund create(Map params, RequestOptions options) throws StripeException { String path = "/v1/refunds"; @@ -377,12 +403,38 @@ public static Refund create(Map params, RequestOptions options) ApiMode.V1); } - /** Create a refund. */ + /** + * When you create a new refund, you must specify a Charge or a PaymentIntent object on which to + * create it. + * + *

Creating a new refund will refund a charge that has previously been created but not yet + * refunded. Funds will be refunded to the credit or debit card that was originally charged. + * + *

You can optionally refund only part of a charge. You can do so multiple times, until the + * entire charge has been refunded. + * + *

Once entirely refunded, a charge can’t be refunded again. This method will raise an error + * when called on an already-refunded charge, or when trying to refund more money than is left on + * a charge. + */ public static Refund create(RefundCreateParams params) throws StripeException { return create(params, (RequestOptions) null); } - /** Create a refund. */ + /** + * When you create a new refund, you must specify a Charge or a PaymentIntent object on which to + * create it. + * + *

Creating a new refund will refund a charge that has previously been created but not yet + * refunded. Funds will be refunded to the credit or debit card that was originally charged. + * + *

You can optionally refund only part of a charge. You can do so multiple times, until the + * entire charge has been refunded. + * + *

Once entirely refunded, a charge can’t be refunded again. This method will raise an error + * when called on an already-refunded charge, or when trying to refund more money than is left on + * a charge. + */ public static Refund create(RefundCreateParams params, RequestOptions options) throws StripeException { String path = "/v1/refunds"; diff --git a/src/main/java/com/stripe/param/RefundCreateParams.java b/src/main/java/com/stripe/param/RefundCreateParams.java index fba7eddce21..4ffb7133cc1 100644 --- a/src/main/java/com/stripe/param/RefundCreateParams.java +++ b/src/main/java/com/stripe/param/RefundCreateParams.java @@ -12,10 +12,10 @@ @Getter public class RefundCreateParams extends ApiRequestParams { - /** A positive integer representing how much to refund. */ @SerializedName("amount") Long amount; + /** The identifier of the charge to refund. */ @SerializedName("charge") String charge; @@ -63,15 +63,36 @@ public class RefundCreateParams extends ApiRequestParams { @SerializedName("origin") Origin origin; + /** The identifier of the PaymentIntent to refund. */ @SerializedName("payment_intent") String paymentIntent; + /** + * String indicating the reason for the refund. If set, possible values are {@code duplicate}, + * {@code fraudulent}, and {@code requested_by_customer}. If you believe the charge to be + * fraudulent, specifying {@code fraudulent} as the reason will add the associated card and email + * to your block lists, and will also help us + * improve our fraud detection algorithms. + */ @SerializedName("reason") Reason reason; + /** + * Boolean indicating whether the application fee should be refunded when refunding this charge. + * If a full charge refund is given, the full application fee will be refunded. Otherwise, the + * application fee will be refunded in an amount proportional to the amount of the charge + * refunded. An application fee can be refunded only by the application that created the charge. + */ @SerializedName("refund_application_fee") Boolean refundApplicationFee; + /** + * Boolean indicating whether the transfer should be reversed when refunding this charge. The + * transfer will be reversed proportionally to the amount being refunded (either the entire or + * partial amount).
+ *
+ * A transfer can be reversed only by the application that created the charge. + */ @SerializedName("reverse_transfer") Boolean reverseTransfer; @@ -153,12 +174,12 @@ public RefundCreateParams build() { this.reverseTransfer); } - /** A positive integer representing how much to refund. */ public Builder setAmount(Long amount) { this.amount = amount; return this; } + /** The identifier of the charge to refund. */ public Builder setCharge(String charge) { this.charge = charge; return this; @@ -297,21 +318,42 @@ public Builder setOrigin(RefundCreateParams.Origin origin) { return this; } + /** The identifier of the PaymentIntent to refund. */ public Builder setPaymentIntent(String paymentIntent) { this.paymentIntent = paymentIntent; return this; } + /** + * String indicating the reason for the refund. If set, possible values are {@code duplicate}, + * {@code fraudulent}, and {@code requested_by_customer}. If you believe the charge to be + * fraudulent, specifying {@code fraudulent} as the reason will add the associated card and + * email to your block lists, and will also + * help us improve our fraud detection algorithms. + */ public Builder setReason(RefundCreateParams.Reason reason) { this.reason = reason; return this; } + /** + * Boolean indicating whether the application fee should be refunded when refunding this charge. + * If a full charge refund is given, the full application fee will be refunded. Otherwise, the + * application fee will be refunded in an amount proportional to the amount of the charge + * refunded. An application fee can be refunded only by the application that created the charge. + */ public Builder setRefundApplicationFee(Boolean refundApplicationFee) { this.refundApplicationFee = refundApplicationFee; return this; } + /** + * Boolean indicating whether the transfer should be reversed when refunding this charge. The + * transfer will be reversed proportionally to the amount being refunded (either the entire or + * partial amount).
+ *
+ * A transfer can be reversed only by the application that created the charge. + */ public Builder setReverseTransfer(Boolean reverseTransfer) { this.reverseTransfer = reverseTransfer; return this; diff --git a/src/main/java/com/stripe/service/RefundService.java b/src/main/java/com/stripe/service/RefundService.java index 44a3f4a2aa9..3f9d38e1b2a 100644 --- a/src/main/java/com/stripe/service/RefundService.java +++ b/src/main/java/com/stripe/service/RefundService.java @@ -65,19 +65,71 @@ public StripeCollection list(RefundListParams params, RequestOptions opt options, ApiMode.V1); } - /** Create a refund. */ + /** + * When you create a new refund, you must specify a Charge or a PaymentIntent object on which to + * create it. + * + *

Creating a new refund will refund a charge that has previously been created but not yet + * refunded. Funds will be refunded to the credit or debit card that was originally charged. + * + *

You can optionally refund only part of a charge. You can do so multiple times, until the + * entire charge has been refunded. + * + *

Once entirely refunded, a charge can’t be refunded again. This method will raise an error + * when called on an already-refunded charge, or when trying to refund more money than is left on + * a charge. + */ public Refund create(RefundCreateParams params) throws StripeException { return create(params, (RequestOptions) null); } - /** Create a refund. */ + /** + * When you create a new refund, you must specify a Charge or a PaymentIntent object on which to + * create it. + * + *

Creating a new refund will refund a charge that has previously been created but not yet + * refunded. Funds will be refunded to the credit or debit card that was originally charged. + * + *

You can optionally refund only part of a charge. You can do so multiple times, until the + * entire charge has been refunded. + * + *

Once entirely refunded, a charge can’t be refunded again. This method will raise an error + * when called on an already-refunded charge, or when trying to refund more money than is left on + * a charge. + */ public Refund create(RequestOptions options) throws StripeException { return create((RefundCreateParams) null, options); } - /** Create a refund. */ + /** + * When you create a new refund, you must specify a Charge or a PaymentIntent object on which to + * create it. + * + *

Creating a new refund will refund a charge that has previously been created but not yet + * refunded. Funds will be refunded to the credit or debit card that was originally charged. + * + *

You can optionally refund only part of a charge. You can do so multiple times, until the + * entire charge has been refunded. + * + *

Once entirely refunded, a charge can’t be refunded again. This method will raise an error + * when called on an already-refunded charge, or when trying to refund more money than is left on + * a charge. + */ public Refund create() throws StripeException { return create((RefundCreateParams) null, (RequestOptions) null); } - /** Create a refund. */ + /** + * When you create a new refund, you must specify a Charge or a PaymentIntent object on which to + * create it. + * + *

Creating a new refund will refund a charge that has previously been created but not yet + * refunded. Funds will be refunded to the credit or debit card that was originally charged. + * + *

You can optionally refund only part of a charge. You can do so multiple times, until the + * entire charge has been refunded. + * + *

Once entirely refunded, a charge can’t be refunded again. This method will raise an error + * when called on an already-refunded charge, or when trying to refund more money than is left on + * a charge. + */ public Refund create(RefundCreateParams params, RequestOptions options) throws StripeException { String path = "/v1/refunds"; return getResponseGetter() From 046a12e23dacb712bdb00b98773f65d5f895bee4 Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Mon, 25 Sep 2023 14:54:50 +0000 Subject: [PATCH 11/25] Update generated code for v553 --- OPENAPI_VERSION | 2 +- .../param/issuing/CardDesignCreateParams.java | 10 ++++++++-- .../param/issuing/CardDesignUpdateParams.java | 15 ++++++++++++--- 3 files changed, 21 insertions(+), 6 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 5d756f90ce2..d8d134b16dc 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v552 \ No newline at end of file +v553 \ No newline at end of file diff --git a/src/main/java/com/stripe/param/issuing/CardDesignCreateParams.java b/src/main/java/com/stripe/param/issuing/CardDesignCreateParams.java index de338ca2cfe..28d901b88c5 100644 --- a/src/main/java/com/stripe/param/issuing/CardDesignCreateParams.java +++ b/src/main/java/com/stripe/param/issuing/CardDesignCreateParams.java @@ -15,7 +15,10 @@ public class CardDesignCreateParams extends ApiRequestParams { @SerializedName("card_bundle") String cardBundle; - /** The file for the card logo, for use with card bundles that support card logos. */ + /** + * The file for the card logo, for use with card bundles that support card logos. Must have {@code + * purpose} value of {@code issuing_logo}. + */ @SerializedName("card_logo") String cardLogo; @@ -136,7 +139,10 @@ public Builder setCardBundle(String cardBundle) { return this; } - /** The file for the card logo, for use with card bundles that support card logos. */ + /** + * The file for the card logo, for use with card bundles that support card logos. Must have + * {@code purpose} value of {@code issuing_logo}. + */ public Builder setCardLogo(String cardLogo) { this.cardLogo = cardLogo; return this; diff --git a/src/main/java/com/stripe/param/issuing/CardDesignUpdateParams.java b/src/main/java/com/stripe/param/issuing/CardDesignUpdateParams.java index e7ce6525913..589397e0064 100644 --- a/src/main/java/com/stripe/param/issuing/CardDesignUpdateParams.java +++ b/src/main/java/com/stripe/param/issuing/CardDesignUpdateParams.java @@ -16,7 +16,10 @@ public class CardDesignUpdateParams extends ApiRequestParams { @SerializedName("card_bundle") Object cardBundle; - /** The file for the card logo, for use with card bundles that support card logos. */ + /** + * The file for the card logo, for use with card bundles that support card logos. Must have {@code + * purpose} value of {@code issuing_logo}. + */ @SerializedName("card_logo") Object cardLogo; @@ -143,13 +146,19 @@ public Builder setCardBundle(EmptyParam cardBundle) { return this; } - /** The file for the card logo, for use with card bundles that support card logos. */ + /** + * The file for the card logo, for use with card bundles that support card logos. Must have + * {@code purpose} value of {@code issuing_logo}. + */ public Builder setCardLogo(String cardLogo) { this.cardLogo = cardLogo; return this; } - /** The file for the card logo, for use with card bundles that support card logos. */ + /** + * The file for the card logo, for use with card bundles that support card logos. Must have + * {@code purpose} value of {@code issuing_logo}. + */ public Builder setCardLogo(EmptyParam cardLogo) { this.cardLogo = cardLogo; return this; From f802515a93bef84d1ddc917408e92257b10b9c6f Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Mon, 25 Sep 2023 16:40:56 +0000 Subject: [PATCH 12/25] Update generated code for v554 --- OPENAPI_VERSION | 2 +- .../param/issuing/CardDesignCreateParams.java | 49 ++++++++++++++----- 2 files changed, 38 insertions(+), 13 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index d8d134b16dc..9a18d15b95e 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v553 \ No newline at end of file +v554 \ No newline at end of file diff --git a/src/main/java/com/stripe/param/issuing/CardDesignCreateParams.java b/src/main/java/com/stripe/param/issuing/CardDesignCreateParams.java index 28d901b88c5..6cf053d05e0 100644 --- a/src/main/java/com/stripe/param/issuing/CardDesignCreateParams.java +++ b/src/main/java/com/stripe/param/issuing/CardDesignCreateParams.java @@ -3,6 +3,7 @@ import com.google.gson.annotations.SerializedName; import com.stripe.net.ApiRequestParams; +import com.stripe.param.common.EmptyParam; import java.util.ArrayList; import java.util.HashMap; import java.util.List; @@ -278,26 +279,26 @@ public static class CarrierText { /** The footer body text of the carrier letter. */ @SerializedName("footer_body") - String footerBody; + Object footerBody; /** The footer title text of the carrier letter. */ @SerializedName("footer_title") - String footerTitle; + Object footerTitle; /** The header body text of the carrier letter. */ @SerializedName("header_body") - String headerBody; + Object headerBody; /** The header title text of the carrier letter. */ @SerializedName("header_title") - String headerTitle; + Object headerTitle; private CarrierText( Map extraParams, - String footerBody, - String footerTitle, - String headerBody, - String headerTitle) { + Object footerBody, + Object footerTitle, + Object headerBody, + Object headerTitle) { this.extraParams = extraParams; this.footerBody = footerBody; this.footerTitle = footerTitle; @@ -312,13 +313,13 @@ public static Builder builder() { public static class Builder { private Map extraParams; - private String footerBody; + private Object footerBody; - private String footerTitle; + private Object footerTitle; - private String headerBody; + private Object headerBody; - private String headerTitle; + private Object headerTitle; /** Finalize and obtain parameter instance from this builder. */ public CardDesignCreateParams.CarrierText build() { @@ -358,23 +359,47 @@ public Builder setFooterBody(String footerBody) { return this; } + /** The footer body text of the carrier letter. */ + public Builder setFooterBody(EmptyParam footerBody) { + this.footerBody = footerBody; + return this; + } + /** The footer title text of the carrier letter. */ public Builder setFooterTitle(String footerTitle) { this.footerTitle = footerTitle; return this; } + /** The footer title text of the carrier letter. */ + public Builder setFooterTitle(EmptyParam footerTitle) { + this.footerTitle = footerTitle; + return this; + } + /** The header body text of the carrier letter. */ public Builder setHeaderBody(String headerBody) { this.headerBody = headerBody; return this; } + /** The header body text of the carrier letter. */ + public Builder setHeaderBody(EmptyParam headerBody) { + this.headerBody = headerBody; + return this; + } + /** The header title text of the carrier letter. */ public Builder setHeaderTitle(String headerTitle) { this.headerTitle = headerTitle; return this; } + + /** The header title text of the carrier letter. */ + public Builder setHeaderTitle(EmptyParam headerTitle) { + this.headerTitle = headerTitle; + return this; + } } } From 355041f9753574a767bae8b34a0f711812192d34 Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Mon, 25 Sep 2023 21:35:18 +0000 Subject: [PATCH 13/25] Update generated code for v554 --- .../param/PaymentSourceVerifyParams.java | 135 ++++++++++++++++++ .../stripe/service/PaymentSourceService.java | 34 +++++ .../stripe/functional/GeneratedExamples.java | 8 +- 3 files changed, 173 insertions(+), 4 deletions(-) create mode 100644 src/main/java/com/stripe/param/PaymentSourceVerifyParams.java diff --git a/src/main/java/com/stripe/param/PaymentSourceVerifyParams.java b/src/main/java/com/stripe/param/PaymentSourceVerifyParams.java new file mode 100644 index 00000000000..dcff5b2494d --- /dev/null +++ b/src/main/java/com/stripe/param/PaymentSourceVerifyParams.java @@ -0,0 +1,135 @@ +// File generated from our OpenAPI spec +package com.stripe.param; + +import com.google.gson.annotations.SerializedName; +import com.stripe.net.ApiRequestParams; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import lombok.Getter; + +@Getter +public class PaymentSourceVerifyParams extends ApiRequestParams { + /** + * Two positive integers, in cents, equal to the values of the microdeposits sent to the + * bank account. + */ + @SerializedName("amounts") + List amounts; + + /** Specifies which fields in the response should be expanded. */ + @SerializedName("expand") + List expand; + + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-level field (serialized) name in this + * param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + private PaymentSourceVerifyParams( + List amounts, List expand, Map extraParams) { + this.amounts = amounts; + this.expand = expand; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private List amounts; + + private List expand; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentSourceVerifyParams build() { + return new PaymentSourceVerifyParams(this.amounts, this.expand, this.extraParams); + } + + /** + * Add an element to `amounts` list. A list is initialized for the first `add/addAll` call, and + * subsequent calls adds additional elements to the original list. See {@link + * PaymentSourceVerifyParams#amounts} for the field documentation. + */ + public Builder addAmount(Long element) { + if (this.amounts == null) { + this.amounts = new ArrayList<>(); + } + this.amounts.add(element); + return this; + } + + /** + * Add all elements to `amounts` list. A list is initialized for the first `add/addAll` call, + * and subsequent calls adds additional elements to the original list. See {@link + * PaymentSourceVerifyParams#amounts} for the field documentation. + */ + public Builder addAllAmount(List elements) { + if (this.amounts == null) { + this.amounts = new ArrayList<>(); + } + this.amounts.addAll(elements); + return this; + } + + /** + * Add an element to `expand` list. A list is initialized for the first `add/addAll` call, and + * subsequent calls adds additional elements to the original list. See {@link + * PaymentSourceVerifyParams#expand} for the field documentation. + */ + public Builder addExpand(String element) { + if (this.expand == null) { + this.expand = new ArrayList<>(); + } + this.expand.add(element); + return this; + } + + /** + * Add all elements to `expand` list. A list is initialized for the first `add/addAll` call, and + * subsequent calls adds additional elements to the original list. See {@link + * PaymentSourceVerifyParams#expand} for the field documentation. + */ + public Builder addAllExpand(List elements) { + if (this.expand == null) { + this.expand = new ArrayList<>(); + } + this.expand.addAll(elements); + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` + * call, and subsequent calls add additional key/value pairs to the original map. See {@link + * PaymentSourceVerifyParams#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link PaymentSourceVerifyParams#extraParams} for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } +} diff --git a/src/main/java/com/stripe/service/PaymentSourceService.java b/src/main/java/com/stripe/service/PaymentSourceService.java index 247db3a5aaa..96766ed99d5 100644 --- a/src/main/java/com/stripe/service/PaymentSourceService.java +++ b/src/main/java/com/stripe/service/PaymentSourceService.java @@ -3,6 +3,7 @@ import com.google.gson.reflect.TypeToken; import com.stripe.exception.StripeException; +import com.stripe.model.BankAccount; import com.stripe.model.PaymentSource; import com.stripe.model.StripeCollection; import com.stripe.net.ApiMode; @@ -17,6 +18,7 @@ import com.stripe.param.PaymentSourceListParams; import com.stripe.param.PaymentSourceRetrieveParams; import com.stripe.param.PaymentSourceUpdateParams; +import com.stripe.param.PaymentSourceVerifyParams; public final class PaymentSourceService extends ApiService { public PaymentSourceService(StripeResponseGetter responseGetter) { @@ -184,4 +186,36 @@ public PaymentSource delete( options, ApiMode.V1); } + /** Verify a specified bank account for a given customer. */ + public BankAccount verify(String customer, String id, PaymentSourceVerifyParams params) + throws StripeException { + return verify(customer, id, params, (RequestOptions) null); + } + /** Verify a specified bank account for a given customer. */ + public BankAccount verify(String customer, String id, RequestOptions options) + throws StripeException { + return verify(customer, id, (PaymentSourceVerifyParams) null, options); + } + /** Verify a specified bank account for a given customer. */ + public BankAccount verify(String customer, String id) throws StripeException { + return verify(customer, id, (PaymentSourceVerifyParams) null, (RequestOptions) null); + } + /** Verify a specified bank account for a given customer. */ + public BankAccount verify( + String customer, String id, PaymentSourceVerifyParams params, RequestOptions options) + throws StripeException { + String path = + String.format( + "/v1/customers/%s/sources/%s/verify", + ApiResource.urlEncodeId(customer), ApiResource.urlEncodeId(id)); + return getResponseGetter() + .request( + BaseAddress.API, + ApiResource.RequestMethod.POST, + path, + ApiRequestParams.paramsToMap(params), + BankAccount.class, + options, + ApiMode.V1); + } } diff --git a/src/test/java/com/stripe/functional/GeneratedExamples.java b/src/test/java/com/stripe/functional/GeneratedExamples.java index 7e849ac4333..66a996a7218 100644 --- a/src/test/java/com/stripe/functional/GeneratedExamples.java +++ b/src/test/java/com/stripe/functional/GeneratedExamples.java @@ -4651,14 +4651,14 @@ public void testPaymentSourceServiceUpdate3() throws StripeException { } @Test - public void testBankAccountServiceVerify() throws StripeException { + public void testPaymentSourceServiceVerify() throws StripeException { StripeClient client = new StripeClient(networkSpy); - com.stripe.param.BankAccountVerifyParams params = - com.stripe.param.BankAccountVerifyParams.builder().addAmount(32L).addAmount(45L).build(); + com.stripe.param.PaymentSourceVerifyParams params = + com.stripe.param.PaymentSourceVerifyParams.builder().addAmount(32L).addAmount(45L).build(); com.stripe.model.BankAccount bankAccount = - client.bankAccounts().verify("cus_xxxxxxxxxxxxx", "ba_xxxxxxxxxxxxx", params); + client.customers().paymentSources().verify("cus_xxxxxxxxxxxxx", "ba_xxxxxxxxxxxxx", params); assertNotNull(bankAccount); verifyRequest( BaseAddress.API, From 38cc1cd3ab22841f244408352e9c1ffe78d2682a Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Tue, 26 Sep 2023 18:04:06 +0000 Subject: [PATCH 14/25] Update generated code for v555 --- OPENAPI_VERSION | 2 +- src/main/java/com/stripe/model/Invoice.java | 6 +++--- .../java/com/stripe/model/QuotePreviewInvoice.java | 6 +++--- .../java/com/stripe/model/QuotePreviewSchedule.java | 12 ++++++------ src/main/java/com/stripe/model/Subscription.java | 6 +++--- .../java/com/stripe/model/SubscriptionSchedule.java | 12 ++++++------ 6 files changed, 22 insertions(+), 22 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 9a18d15b95e..4788875a357 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v554 \ No newline at end of file +v555 \ No newline at end of file diff --git a/src/main/java/com/stripe/model/Invoice.java b/src/main/java/com/stripe/model/Invoice.java index 29ef934566b..459b3cd3bbe 100644 --- a/src/main/java/com/stripe/model/Invoice.java +++ b/src/main/java/com/stripe/model/Invoice.java @@ -1883,9 +1883,9 @@ public static class AutomaticTax extends StripeObject { Boolean enabled; /** - * The connected account that's liable for tax. If set, the business address and tax - * registrations required to perform the tax calculation are loaded from this account. The tax - * transaction is returned in the report of the connected account. + * The account that's liable for tax. If set, the business address and tax registrations + * required to perform the tax calculation are loaded from this account. The tax transaction is + * returned in the report of the connected account. */ @SerializedName("liability") Liability liability; diff --git a/src/main/java/com/stripe/model/QuotePreviewInvoice.java b/src/main/java/com/stripe/model/QuotePreviewInvoice.java index 456efef9535..3dc506566a4 100644 --- a/src/main/java/com/stripe/model/QuotePreviewInvoice.java +++ b/src/main/java/com/stripe/model/QuotePreviewInvoice.java @@ -904,9 +904,9 @@ public static class AutomaticTax extends StripeObject { Boolean enabled; /** - * The connected account that's liable for tax. If set, the business address and tax - * registrations required to perform the tax calculation are loaded from this account. The tax - * transaction is returned in the report of the connected account. + * The account that's liable for tax. If set, the business address and tax registrations + * required to perform the tax calculation are loaded from this account. The tax transaction is + * returned in the report of the connected account. */ @SerializedName("liability") Liability liability; diff --git a/src/main/java/com/stripe/model/QuotePreviewSchedule.java b/src/main/java/com/stripe/model/QuotePreviewSchedule.java index 2ee58201c92..9957756273a 100644 --- a/src/main/java/com/stripe/model/QuotePreviewSchedule.java +++ b/src/main/java/com/stripe/model/QuotePreviewSchedule.java @@ -444,9 +444,9 @@ public static class AutomaticTax extends StripeObject { Boolean enabled; /** - * The connected account that's liable for tax. If set, the business address and tax - * registrations required to perform the tax calculation are loaded from this account. The tax - * transaction is returned in the report of the connected account. + * The account that's liable for tax. If set, the business address and tax registrations + * required to perform the tax calculation are loaded from this account. The tax transaction + * is returned in the report of the connected account. */ @SerializedName("liability") Liability liability; @@ -966,9 +966,9 @@ public static class AutomaticTax extends StripeObject { Boolean enabled; /** - * The connected account that's liable for tax. If set, the business address and tax - * registrations required to perform the tax calculation are loaded from this account. The tax - * transaction is returned in the report of the connected account. + * The account that's liable for tax. If set, the business address and tax registrations + * required to perform the tax calculation are loaded from this account. The tax transaction + * is returned in the report of the connected account. */ @SerializedName("liability") Liability liability; diff --git a/src/main/java/com/stripe/model/Subscription.java b/src/main/java/com/stripe/model/Subscription.java index c05fb749aed..1e3cdcef6d8 100644 --- a/src/main/java/com/stripe/model/Subscription.java +++ b/src/main/java/com/stripe/model/Subscription.java @@ -1146,9 +1146,9 @@ public static class AutomaticTax extends StripeObject { Boolean enabled; /** - * The connected account that's liable for tax. If set, the business address and tax - * registrations required to perform the tax calculation are loaded from this account. The tax - * transaction is returned in the report of the connected account. + * The account that's liable for tax. If set, the business address and tax registrations + * required to perform the tax calculation are loaded from this account. The tax transaction is + * returned in the report of the connected account. */ @SerializedName("liability") Liability liability; diff --git a/src/main/java/com/stripe/model/SubscriptionSchedule.java b/src/main/java/com/stripe/model/SubscriptionSchedule.java index 773a9b08b73..6557b3d15a8 100644 --- a/src/main/java/com/stripe/model/SubscriptionSchedule.java +++ b/src/main/java/com/stripe/model/SubscriptionSchedule.java @@ -807,9 +807,9 @@ public static class AutomaticTax extends StripeObject { Boolean enabled; /** - * The connected account that's liable for tax. If set, the business address and tax - * registrations required to perform the tax calculation are loaded from this account. The tax - * transaction is returned in the report of the connected account. + * The account that's liable for tax. If set, the business address and tax registrations + * required to perform the tax calculation are loaded from this account. The tax transaction + * is returned in the report of the connected account. */ @SerializedName("liability") Liability liability; @@ -1329,9 +1329,9 @@ public static class AutomaticTax extends StripeObject { Boolean enabled; /** - * The connected account that's liable for tax. If set, the business address and tax - * registrations required to perform the tax calculation are loaded from this account. The tax - * transaction is returned in the report of the connected account. + * The account that's liable for tax. If set, the business address and tax registrations + * required to perform the tax calculation are loaded from this account. The tax transaction + * is returned in the report of the connected account. */ @SerializedName("liability") Liability liability; From 5a2b75688bd3350b417e63f5bde6448ac5b7ec5a Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Tue, 26 Sep 2023 23:14:55 +0000 Subject: [PATCH 15/25] Update generated code for v557 --- OPENAPI_VERSION | 2 +- .../java/com/stripe/model/PaymentIntent.java | 7 +++---- .../param/PaymentIntentConfirmParams.java | 14 ++++++------- .../param/PaymentIntentCreateParams.java | 14 ++++++------- .../param/PaymentIntentUpdateParams.java | 21 ++++++++----------- 5 files changed, 25 insertions(+), 33 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 4788875a357..aafdd30ff52 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v555 \ No newline at end of file +v557 \ No newline at end of file diff --git a/src/main/java/com/stripe/model/PaymentIntent.java b/src/main/java/com/stripe/model/PaymentIntent.java index 938adbded9f..43c2f5ac665 100644 --- a/src/main/java/com/stripe/model/PaymentIntent.java +++ b/src/main/java/com/stripe/model/PaymentIntent.java @@ -2556,10 +2556,9 @@ public static class AfterpayClearpay extends StripeObject { String captureMethod; /** - * Order identifier shown to the customer in Afterpay’s online portal. We recommend using a - * value that helps you answer any questions a customer might have about the payment. The - * identifier is limited to 128 characters and may contain only letters, digits, underscores, - * backslashes and dashes. + * An internal identifier or reference that this payment corresponds to. You must limit the + * identifier to 128 characters, and it can only contain letters, numbers, underscores, + * backslashes, and dashes. This field differs from the statement descriptor and item name. */ @SerializedName("reference") String reference; diff --git a/src/main/java/com/stripe/param/PaymentIntentConfirmParams.java b/src/main/java/com/stripe/param/PaymentIntentConfirmParams.java index a7f86db0873..f5c21e26025 100644 --- a/src/main/java/com/stripe/param/PaymentIntentConfirmParams.java +++ b/src/main/java/com/stripe/param/PaymentIntentConfirmParams.java @@ -8200,10 +8200,9 @@ public static class AfterpayClearpay { Map extraParams; /** - * Order identifier shown to the customer in Afterpay’s online portal. We recommend using a - * value that helps you answer any questions a customer might have about the payment. The - * identifier is limited to 128 characters and may contain only letters, digits, underscores, - * backslashes and dashes. + * An internal identifier or reference that this payment corresponds to. You must limit the + * identifier to 128 characters, and it can only contain letters, numbers, underscores, + * backslashes, and dashes. This field differs from the statement descriptor and item name. */ @SerializedName("reference") String reference; @@ -8321,10 +8320,9 @@ public Builder putAllExtraParam(Map map) { } /** - * Order identifier shown to the customer in Afterpay’s online portal. We recommend using a - * value that helps you answer any questions a customer might have about the payment. The - * identifier is limited to 128 characters and may contain only letters, digits, - * underscores, backslashes and dashes. + * An internal identifier or reference that this payment corresponds to. You must limit the + * identifier to 128 characters, and it can only contain letters, numbers, underscores, + * backslashes, and dashes. This field differs from the statement descriptor and item name. */ public Builder setReference(String reference) { this.reference = reference; diff --git a/src/main/java/com/stripe/param/PaymentIntentCreateParams.java b/src/main/java/com/stripe/param/PaymentIntentCreateParams.java index 91bc775cc85..b6266559258 100644 --- a/src/main/java/com/stripe/param/PaymentIntentCreateParams.java +++ b/src/main/java/com/stripe/param/PaymentIntentCreateParams.java @@ -8687,10 +8687,9 @@ public static class AfterpayClearpay { Map extraParams; /** - * Order identifier shown to the customer in Afterpay’s online portal. We recommend using a - * value that helps you answer any questions a customer might have about the payment. The - * identifier is limited to 128 characters and may contain only letters, digits, underscores, - * backslashes and dashes. + * An internal identifier or reference that this payment corresponds to. You must limit the + * identifier to 128 characters, and it can only contain letters, numbers, underscores, + * backslashes, and dashes. This field differs from the statement descriptor and item name. */ @SerializedName("reference") String reference; @@ -8808,10 +8807,9 @@ public Builder putAllExtraParam(Map map) { } /** - * Order identifier shown to the customer in Afterpay’s online portal. We recommend using a - * value that helps you answer any questions a customer might have about the payment. The - * identifier is limited to 128 characters and may contain only letters, digits, - * underscores, backslashes and dashes. + * An internal identifier or reference that this payment corresponds to. You must limit the + * identifier to 128 characters, and it can only contain letters, numbers, underscores, + * backslashes, and dashes. This field differs from the statement descriptor and item name. */ public Builder setReference(String reference) { this.reference = reference; diff --git a/src/main/java/com/stripe/param/PaymentIntentUpdateParams.java b/src/main/java/com/stripe/param/PaymentIntentUpdateParams.java index 7d3f0ac2c78..57f028e0640 100644 --- a/src/main/java/com/stripe/param/PaymentIntentUpdateParams.java +++ b/src/main/java/com/stripe/param/PaymentIntentUpdateParams.java @@ -8693,10 +8693,9 @@ public static class AfterpayClearpay { Map extraParams; /** - * Order identifier shown to the customer in Afterpay’s online portal. We recommend using a - * value that helps you answer any questions a customer might have about the payment. The - * identifier is limited to 128 characters and may contain only letters, digits, underscores, - * backslashes and dashes. + * An internal identifier or reference that this payment corresponds to. You must limit the + * identifier to 128 characters, and it can only contain letters, numbers, underscores, + * backslashes, and dashes. This field differs from the statement descriptor and item name. */ @SerializedName("reference") Object reference; @@ -8814,10 +8813,9 @@ public Builder putAllExtraParam(Map map) { } /** - * Order identifier shown to the customer in Afterpay’s online portal. We recommend using a - * value that helps you answer any questions a customer might have about the payment. The - * identifier is limited to 128 characters and may contain only letters, digits, - * underscores, backslashes and dashes. + * An internal identifier or reference that this payment corresponds to. You must limit the + * identifier to 128 characters, and it can only contain letters, numbers, underscores, + * backslashes, and dashes. This field differs from the statement descriptor and item name. */ public Builder setReference(String reference) { this.reference = reference; @@ -8825,10 +8823,9 @@ public Builder setReference(String reference) { } /** - * Order identifier shown to the customer in Afterpay’s online portal. We recommend using a - * value that helps you answer any questions a customer might have about the payment. The - * identifier is limited to 128 characters and may contain only letters, digits, - * underscores, backslashes and dashes. + * An internal identifier or reference that this payment corresponds to. You must limit the + * identifier to 128 characters, and it can only contain letters, numbers, underscores, + * backslashes, and dashes. This field differs from the statement descriptor and item name. */ public Builder setReference(EmptyParam reference) { this.reference = reference; From 7733944c415436b8f7ab1500df76e07bedcaccea Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Wed, 27 Sep 2023 00:04:37 +0000 Subject: [PATCH 16/25] Update generated code for v557 --- .../stripe/functional/GeneratedExamples.java | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/src/test/java/com/stripe/functional/GeneratedExamples.java b/src/test/java/com/stripe/functional/GeneratedExamples.java index 66a996a7218..0029de2355d 100644 --- a/src/test/java/com/stripe/functional/GeneratedExamples.java +++ b/src/test/java/com/stripe/functional/GeneratedExamples.java @@ -14903,4 +14903,32 @@ public void testTransactionServiceRefund() throws StripeException { params.toMap(), null); } + + @Test + public void testSubscriptionDeleteDiscount() throws StripeException { + Subscription resource = Subscription.retrieve("sub_xyz"); + + Discount discount = resource.deleteDiscount(); + assertNotNull(discount); + verifyRequest( + BaseAddress.API, + ApiResource.RequestMethod.DELETE, + "/v1/subscriptions/sub_xyz/discount", + null, + null); + } + + @Test + public void testSubscriptionServiceDeleteDiscount() throws StripeException { + StripeClient client = new StripeClient(networkSpy); + + com.stripe.model.Discount discount = client.subscriptions().deleteDiscount("sub_xyz"); + assertNotNull(discount); + verifyRequest( + BaseAddress.API, + ApiResource.RequestMethod.DELETE, + "/v1/subscriptions/sub_xyz/discount", + null, + null); + } } From bfb2f5db012bec65629f8fa77a0b8822fcde4ab4 Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Wed, 27 Sep 2023 16:03:39 +0000 Subject: [PATCH 17/25] Update generated code for v559 --- OPENAPI_VERSION | 2 +- .../java/com/stripe/param/AccountLinkCreateParams.java | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index aafdd30ff52..376cc83ef0e 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v557 \ No newline at end of file +v559 \ No newline at end of file diff --git a/src/main/java/com/stripe/param/AccountLinkCreateParams.java b/src/main/java/com/stripe/param/AccountLinkCreateParams.java index 873b51f0d2d..7763d71c707 100644 --- a/src/main/java/com/stripe/param/AccountLinkCreateParams.java +++ b/src/main/java/com/stripe/param/AccountLinkCreateParams.java @@ -221,7 +221,13 @@ public enum Type implements ApiRequestParams.EnumParam { ACCOUNT_ONBOARDING("account_onboarding"), @SerializedName("account_update") - ACCOUNT_UPDATE("account_update"); + ACCOUNT_UPDATE("account_update"), + + @SerializedName("capital_financing_offer") + CAPITAL_FINANCING_OFFER("capital_financing_offer"), + + @SerializedName("capital_financing_reporting") + CAPITAL_FINANCING_REPORTING("capital_financing_reporting"); @Getter(onMethod_ = {@Override}) private final String value; From 5e1caa318e62e445164b16ea92769fb171147751 Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Wed, 27 Sep 2023 17:45:20 +0000 Subject: [PATCH 18/25] Update generated code for v560 --- OPENAPI_VERSION | 2 +- .../java/com/stripe/model/PaymentIntent.java | 139 ++++++++-------- ...ymentIntentApplyCustomerBalanceParams.java | 18 ++- .../param/PaymentIntentConfirmParams.java | 43 +++-- .../param/PaymentIntentCreateParams.java | 151 +++++++++--------- ...entIntentIncrementAuthorizationParams.java | 19 ++- .../stripe/service/PaymentIntentService.java | 60 +++---- 7 files changed, 213 insertions(+), 219 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 376cc83ef0e..702f49cb1d4 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v559 \ No newline at end of file +v560 \ No newline at end of file diff --git a/src/main/java/com/stripe/model/PaymentIntent.java b/src/main/java/com/stripe/model/PaymentIntent.java index 43c2f5ac665..0f27c4325f8 100644 --- a/src/main/java/com/stripe/model/PaymentIntent.java +++ b/src/main/java/com/stripe/model/PaymentIntent.java @@ -63,7 +63,7 @@ public class PaymentIntent extends ApiResource implements HasId, MetadataStore

key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a - * structured format. For more information, see the documentation. + * structured format. Learn more about storing + * information in metadata. */ @Getter(onMethod_ = {@Override}) @SerializedName("metadata") @@ -335,17 +336,17 @@ public class PaymentIntent extends ApiResource implements HasId, MetadataStore

use case for - * connected accounts for details. + * The data that automatically creates a Transfer after the payment finalizes. Learn more about + * the use case for connected + * accounts. */ @SerializedName("transfer_data") TransferData transferData; /** - * A string that identifies the resulting payment as part of a group. See the PaymentIntents use case for connected - * accounts for details. + * accounts. */ @SerializedName("transfer_group") String transferGroup; @@ -495,22 +496,22 @@ public void setSourceObject(PaymentSource expandableObject) { this.source = new ExpandableField(expandableObject.getId(), expandableObject); } - /** Manually reconcile the remaining amount for a customer_balance PaymentIntent. */ + /** Manually reconcile the remaining amount for a {@code customer_balance} PaymentIntent. */ public PaymentIntent applyCustomerBalance() throws StripeException { return applyCustomerBalance((Map) null, (RequestOptions) null); } - /** Manually reconcile the remaining amount for a customer_balance PaymentIntent. */ + /** Manually reconcile the remaining amount for a {@code customer_balance} PaymentIntent. */ public PaymentIntent applyCustomerBalance(RequestOptions options) throws StripeException { return applyCustomerBalance((Map) null, options); } - /** Manually reconcile the remaining amount for a customer_balance PaymentIntent. */ + /** Manually reconcile the remaining amount for a {@code customer_balance} PaymentIntent. */ public PaymentIntent applyCustomerBalance(Map params) throws StripeException { return applyCustomerBalance(params, (RequestOptions) null); } - /** Manually reconcile the remaining amount for a customer_balance PaymentIntent. */ + /** Manually reconcile the remaining amount for a {@code customer_balance} PaymentIntent. */ public PaymentIntent applyCustomerBalance(Map params, RequestOptions options) throws StripeException { String path = @@ -527,13 +528,13 @@ public PaymentIntent applyCustomerBalance(Map params, RequestOpt ApiMode.V1); } - /** Manually reconcile the remaining amount for a customer_balance PaymentIntent. */ + /** Manually reconcile the remaining amount for a {@code customer_balance} PaymentIntent. */ public PaymentIntent applyCustomerBalance(PaymentIntentApplyCustomerBalanceParams params) throws StripeException { return applyCustomerBalance(params, (RequestOptions) null); } - /** Manually reconcile the remaining amount for a customer_balance PaymentIntent. */ + /** Manually reconcile the remaining amount for a {@code customer_balance} PaymentIntent. */ public PaymentIntent applyCustomerBalance( PaymentIntentApplyCustomerBalanceParams params, RequestOptions options) throws StripeException { @@ -974,13 +975,13 @@ public PaymentIntent confirm(PaymentIntentConfirmParams params, RequestOptions o * *

After the PaymentIntent is created, attach a payment method and confirm to continue the payment. - * You can read more about the different payment flows available via the Payment Intents API here. + * Learn more about the available + * payment flows with the Payment Intents API. * - *

When {@code confirm=true} is used during creation, it is equivalent to creating and - * confirming the PaymentIntent in the same call. You may use any parameters available in the confirm API when {@code - * confirm=true} is supplied. + *

When you use {@code confirm=true} during creation, it’s equivalent to creating and + * confirming the PaymentIntent in the same call. You can use any parameters available in the confirm API when you supply + * {@code confirm=true}. */ public static PaymentIntent create(Map params) throws StripeException { return create(params, (RequestOptions) null); @@ -991,13 +992,13 @@ public static PaymentIntent create(Map params) throws StripeExce * *

After the PaymentIntent is created, attach a payment method and confirm to continue the payment. - * You can read more about the different payment flows available via the Payment Intents API here. + * Learn more about the available + * payment flows with the Payment Intents API. * - *

When {@code confirm=true} is used during creation, it is equivalent to creating and - * confirming the PaymentIntent in the same call. You may use any parameters available in the confirm API when {@code - * confirm=true} is supplied. + *

When you use {@code confirm=true} during creation, it’s equivalent to creating and + * confirming the PaymentIntent in the same call. You can use any parameters available in the confirm API when you supply + * {@code confirm=true}. */ public static PaymentIntent create(Map params, RequestOptions options) throws StripeException { @@ -1018,13 +1019,13 @@ public static PaymentIntent create(Map params, RequestOptions op * *

After the PaymentIntent is created, attach a payment method and confirm to continue the payment. - * You can read more about the different payment flows available via the Payment Intents API here. + * Learn more about the available + * payment flows with the Payment Intents API. * - *

When {@code confirm=true} is used during creation, it is equivalent to creating and - * confirming the PaymentIntent in the same call. You may use any parameters available in the confirm API when {@code - * confirm=true} is supplied. + *

When you use {@code confirm=true} during creation, it’s equivalent to creating and + * confirming the PaymentIntent in the same call. You can use any parameters available in the confirm API when you supply + * {@code confirm=true}. */ public static PaymentIntent create(PaymentIntentCreateParams params) throws StripeException { return create(params, (RequestOptions) null); @@ -1035,13 +1036,13 @@ public static PaymentIntent create(PaymentIntentCreateParams params) throws Stri * *

After the PaymentIntent is created, attach a payment method and confirm to continue the payment. - * You can read more about the different payment flows available via the Payment Intents API here. + * Learn more about the available + * payment flows with the Payment Intents API. * - *

When {@code confirm=true} is used during creation, it is equivalent to creating and - * confirming the PaymentIntent in the same call. You may use any parameters available in the confirm API when {@code - * confirm=true} is supplied. + *

When you use {@code confirm=true} during creation, it’s equivalent to creating and + * confirming the PaymentIntent in the same call. You can use any parameters available in the confirm API when you supply + * {@code confirm=true}. */ public static PaymentIntent create(PaymentIntentCreateParams params, RequestOptions options) throws StripeException { @@ -1066,20 +1067,20 @@ public static PaymentIntent create(PaymentIntentCreateParams params, RequestOpti * must be {@code true}. * *

Incremental authorizations attempt to increase the authorized amount on your customer’s card - * to the new, higher {@code amount} provided. As with the initial authorization, incremental - * authorizations may be declined. A single PaymentIntent can call this endpoint multiple times to + * to the new, higher {@code amount} provided. Similar to the initial authorization, incremental + * authorizations can be declined. A single PaymentIntent can call this endpoint multiple times to * further increase the authorized amount. * - *

If the incremental authorization succeeds, the PaymentIntent object is returned with the - * updated If the incremental authorization succeeds, the PaymentIntent object returns with the updated + * amount. * If the incremental authorization fails, a card_declined error is returned, - * and no fields on the PaymentIntent or Charge are updated. The PaymentIntent object remains + * href="https://stripe.com/docs/error-codes#card-declined">card_declined error returns, and + * no other fields on the PaymentIntent or Charge update. The PaymentIntent object remains * capturable for the previously authorized amount. * *

Each PaymentIntent can have a maximum of 10 incremental authorization attempts, including - * declines. Once captured, a PaymentIntent can no longer be incremented. + * declines. After it’s captured, a PaymentIntent can no longer be incremented. * *

Learn more about incremental @@ -1097,20 +1098,20 @@ public PaymentIntent incrementAuthorization(Map params) throws S * must be {@code true}. * *

Incremental authorizations attempt to increase the authorized amount on your customer’s card - * to the new, higher {@code amount} provided. As with the initial authorization, incremental - * authorizations may be declined. A single PaymentIntent can call this endpoint multiple times to + * to the new, higher {@code amount} provided. Similar to the initial authorization, incremental + * authorizations can be declined. A single PaymentIntent can call this endpoint multiple times to * further increase the authorized amount. * - *

If the incremental authorization succeeds, the PaymentIntent object is returned with the - * updated If the incremental authorization succeeds, the PaymentIntent object returns with the updated + * amount. * If the incremental authorization fails, a card_declined error is returned, - * and no fields on the PaymentIntent or Charge are updated. The PaymentIntent object remains + * href="https://stripe.com/docs/error-codes#card-declined">card_declined error returns, and + * no other fields on the PaymentIntent or Charge update. The PaymentIntent object remains * capturable for the previously authorized amount. * *

Each PaymentIntent can have a maximum of 10 incremental authorization attempts, including - * declines. Once captured, a PaymentIntent can no longer be incremented. + * declines. After it’s captured, a PaymentIntent can no longer be incremented. * *

Learn more about incremental @@ -1141,20 +1142,20 @@ public PaymentIntent incrementAuthorization(Map params, RequestO * must be {@code true}. * *

Incremental authorizations attempt to increase the authorized amount on your customer’s card - * to the new, higher {@code amount} provided. As with the initial authorization, incremental - * authorizations may be declined. A single PaymentIntent can call this endpoint multiple times to + * to the new, higher {@code amount} provided. Similar to the initial authorization, incremental + * authorizations can be declined. A single PaymentIntent can call this endpoint multiple times to * further increase the authorized amount. * - *

If the incremental authorization succeeds, the PaymentIntent object is returned with the - * updated If the incremental authorization succeeds, the PaymentIntent object returns with the updated + * amount. * If the incremental authorization fails, a card_declined error is returned, - * and no fields on the PaymentIntent or Charge are updated. The PaymentIntent object remains + * href="https://stripe.com/docs/error-codes#card-declined">card_declined error returns, and + * no other fields on the PaymentIntent or Charge update. The PaymentIntent object remains * capturable for the previously authorized amount. * *

Each PaymentIntent can have a maximum of 10 incremental authorization attempts, including - * declines. Once captured, a PaymentIntent can no longer be incremented. + * declines. After it’s captured, a PaymentIntent can no longer be incremented. * *

Learn more about incremental @@ -1173,20 +1174,20 @@ public PaymentIntent incrementAuthorization(PaymentIntentIncrementAuthorizationP * must be {@code true}. * *

Incremental authorizations attempt to increase the authorized amount on your customer’s card - * to the new, higher {@code amount} provided. As with the initial authorization, incremental - * authorizations may be declined. A single PaymentIntent can call this endpoint multiple times to + * to the new, higher {@code amount} provided. Similar to the initial authorization, incremental + * authorizations can be declined. A single PaymentIntent can call this endpoint multiple times to * further increase the authorized amount. * - *

If the incremental authorization succeeds, the PaymentIntent object is returned with the - * updated If the incremental authorization succeeds, the PaymentIntent object returns with the updated + * amount. * If the incremental authorization fails, a card_declined error is returned, - * and no fields on the PaymentIntent or Charge are updated. The PaymentIntent object remains + * href="https://stripe.com/docs/error-codes#card-declined">card_declined error returns, and + * no other fields on the PaymentIntent or Charge update. The PaymentIntent object remains * capturable for the previously authorized amount. * *

Each PaymentIntent can have a maximum of 10 incremental authorization attempts, including - * declines. Once captured, a PaymentIntent can no longer be incremented. + * declines. After it’s captured, a PaymentIntent can no longer be incremented. * *

Learn more about incremental @@ -3851,8 +3852,8 @@ public static class TransferData extends StripeObject { Long amount; /** - * The account (if any) the payment will be attributed to for tax reporting, and where funds - * from the payment will be transferred to upon payment success. + * The account (if any) that the payment is attributed to for tax reporting, and where funds + * from the payment are transferred to after payment success. */ @SerializedName("destination") @Getter(lombok.AccessLevel.NONE) diff --git a/src/main/java/com/stripe/param/PaymentIntentApplyCustomerBalanceParams.java b/src/main/java/com/stripe/param/PaymentIntentApplyCustomerBalanceParams.java index 43577857869..1d270512f33 100644 --- a/src/main/java/com/stripe/param/PaymentIntentApplyCustomerBalanceParams.java +++ b/src/main/java/com/stripe/param/PaymentIntentApplyCustomerBalanceParams.java @@ -12,15 +12,16 @@ @Getter public class PaymentIntentApplyCustomerBalanceParams extends ApiRequestParams { /** - * Amount intended to be applied to this PaymentIntent from the customer’s cash balance. + * Amount that you intend to apply to this PaymentIntent from the customer’s cash balance. * *

A positive integer representing how much to charge in the smallest currency unit (e.g., 100 - * cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). + * href="https://stripe.com/docs/currencies#zero-decimal">smallest currency unit (for example, + * 100 cents to charge 1 USD or 100 to charge 100 JPY, a zero-decimal currency). * *

The maximum amount is the amount of the PaymentIntent. * - *

When omitted, the amount defaults to the remaining amount requested on the PaymentIntent. + *

When you omit the amount, it defaults to the remaining amount requested on the + * PaymentIntent. */ @SerializedName("amount") Long amount; @@ -73,15 +74,16 @@ public PaymentIntentApplyCustomerBalanceParams build() { } /** - * Amount intended to be applied to this PaymentIntent from the customer’s cash balance. + * Amount that you intend to apply to this PaymentIntent from the customer’s cash balance. * *

A positive integer representing how much to charge in the smallest currency unit (e.g., 100 - * cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). + * href="https://stripe.com/docs/currencies#zero-decimal">smallest currency unit (for + * example, 100 cents to charge 1 USD or 100 to charge 100 JPY, a zero-decimal currency). * *

The maximum amount is the amount of the PaymentIntent. * - *

When omitted, the amount defaults to the remaining amount requested on the PaymentIntent. + *

When you omit the amount, it defaults to the remaining amount requested on the + * PaymentIntent. */ public Builder setAmount(Long amount) { this.amount = amount; diff --git a/src/main/java/com/stripe/param/PaymentIntentConfirmParams.java b/src/main/java/com/stripe/param/PaymentIntentConfirmParams.java index f5c21e26025..6bcde4a0153 100644 --- a/src/main/java/com/stripe/param/PaymentIntentConfirmParams.java +++ b/src/main/java/com/stripe/param/PaymentIntentConfirmParams.java @@ -58,19 +58,18 @@ public class PaymentIntentConfirmParams extends ApiRequestParams { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** ID of the mandate to be used for this payment. */ + /** ID of the mandate that's used for this payment. */ @SerializedName("mandate") String mandate; - /** This hash contains details about the Mandate to create. */ @SerializedName("mandate_data") Object mandateData; /** - * Set to {@code true} to indicate that the customer is not in your checkout flow during this - * payment attempt, and therefore is unable to authenticate. This parameter is intended for - * scenarios where you collect card details and charge them later. + * Set to {@code true} to indicate that the customer isn't in your checkout flow during this + * payment attempt and can't authenticate. Use this parameter in scenarios where you collect card + * details and charge them + * later. */ @SerializedName("off_session") Object offSession; @@ -96,13 +95,13 @@ public class PaymentIntentConfirmParams extends ApiRequestParams { @SerializedName("payment_method_data") PaymentMethodData paymentMethodData; - /** Payment-method-specific configuration for this PaymentIntent. */ + /** Payment method-specific configuration for this PaymentIntent. */ @SerializedName("payment_method_options") PaymentMethodOptions paymentMethodOptions; /** - * Options to configure Radar. See Radar - * Session for more information. + * Options to configure Radar. Learn more about Radar Sessions. */ @SerializedName("radar_options") RadarOptions radarOptions; @@ -369,29 +368,27 @@ public Builder putAllExtraParam(Map map) { return this; } - /** ID of the mandate to be used for this payment. */ + /** ID of the mandate that's used for this payment. */ public Builder setMandate(String mandate) { this.mandate = mandate; return this; } - /** This hash contains details about the Mandate to create. */ public Builder setMandateData(PaymentIntentConfirmParams.MandateData mandateData) { this.mandateData = mandateData; return this; } - /** This hash contains details about the Mandate to create. */ public Builder setMandateData(EmptyParam mandateData) { this.mandateData = mandateData; return this; } /** - * Set to {@code true} to indicate that the customer is not in your checkout flow during this - * payment attempt, and therefore is unable to authenticate. This parameter is intended for - * scenarios where you collect card details and charge them later. + * Set to {@code true} to indicate that the customer isn't in your checkout flow during this + * payment attempt and can't authenticate. Use this parameter in scenarios where you collect + * card details and charge + * them later. */ public Builder setOffSession(Boolean offSession) { this.offSession = offSession; @@ -399,10 +396,10 @@ public Builder setOffSession(Boolean offSession) { } /** - * Set to {@code true} to indicate that the customer is not in your checkout flow during this - * payment attempt, and therefore is unable to authenticate. This parameter is intended for - * scenarios where you collect card details and charge them later. + * Set to {@code true} to indicate that the customer isn't in your checkout flow during this + * payment attempt and can't authenticate. Use this parameter in scenarios where you collect + * card details and charge + * them later. */ public Builder setOffSession(PaymentIntentConfirmParams.OffSession offSession) { this.offSession = offSession; @@ -443,7 +440,7 @@ public Builder setPaymentMethodData( return this; } - /** Payment-method-specific configuration for this PaymentIntent. */ + /** Payment method-specific configuration for this PaymentIntent. */ public Builder setPaymentMethodOptions( PaymentIntentConfirmParams.PaymentMethodOptions paymentMethodOptions) { this.paymentMethodOptions = paymentMethodOptions; @@ -451,8 +448,8 @@ public Builder setPaymentMethodOptions( } /** - * Options to configure Radar. See Radar - * Session for more information. + * Options to configure Radar. Learn more about Radar Sessions. */ public Builder setRadarOptions(PaymentIntentConfirmParams.RadarOptions radarOptions) { this.radarOptions = radarOptions; diff --git a/src/main/java/com/stripe/param/PaymentIntentCreateParams.java b/src/main/java/com/stripe/param/PaymentIntentCreateParams.java index b6266559258..67dbfb9ba65 100644 --- a/src/main/java/com/stripe/param/PaymentIntentCreateParams.java +++ b/src/main/java/com/stripe/param/PaymentIntentCreateParams.java @@ -36,8 +36,8 @@ public class PaymentIntentCreateParams extends ApiRequestParams { Long applicationFeeAmount; /** - * When enabled, this PaymentIntent will accept payment methods that you have enabled in the - * Dashboard and are compatible with this PaymentIntent's other parameters. + * When you enable this parameter, this PaymentIntent accepts payment methods that you enable in + * the Dashboard and that are compatible with this PaymentIntent's other parameters. */ @SerializedName("automatic_payment_methods") AutomaticPaymentMethods automaticPaymentMethods; @@ -48,11 +48,10 @@ public class PaymentIntentCreateParams extends ApiRequestParams { /** * Set to {@code true} to attempt to confirm this PaymentIntent - * immediately. This parameter defaults to {@code false}. When creating and confirming a - * PaymentIntent at the same time, parameters available in the confirm API may also be - * provided. + * href="https://stripe.com/docs/api/payment_intents/confirm">confirm this PaymentIntent this + * PaymentIntent immediately. This parameter defaults to {@code false}. When creating and + * confirming a PaymentIntent at the same time, you can also provide the parameters available in + * the Confirm API. */ @SerializedName("confirm") Boolean confirm; @@ -96,8 +95,8 @@ public class PaymentIntentCreateParams extends ApiRequestParams { /** * Set to {@code true} to fail the payment attempt if the PaymentIntent transitions into {@code - * requires_action}. This parameter is intended for simpler integrations that do not handle - * customer actions, like saving cards without * authentication. This parameter can only be used with {@code @@ -120,7 +119,7 @@ public class PaymentIntentCreateParams extends ApiRequestParams { Map extraParams; /** - * ID of the mandate to be used for this payment. This parameter can only be used with {@code * confirm=true}. */ @@ -145,11 +144,10 @@ public class PaymentIntentCreateParams extends ApiRequestParams { Map metadata; /** - * Set to {@code true} to indicate that the customer is not in your checkout flow during this - * payment attempt, and therefore is unable to authenticate. This parameter is intended for - * scenarios where you collect card details and charge them later. This - * parameter can only be used with charge them + * later. This parameter can only be used with {@code * confirm=true}. */ @@ -157,9 +155,8 @@ public class PaymentIntentCreateParams extends ApiRequestParams { Object offSession; /** - * The Stripe account ID for which these funds are intended. For details, see the PaymentIntents - * use case for connected - * accounts. + * The Stripe account ID that these funds are intended for. Learn more about the use case for connected accounts. */ @SerializedName("on_behalf_of") String onBehalfOf; @@ -173,10 +170,10 @@ public class PaymentIntentCreateParams extends ApiRequestParams { * href="https://stripe.com/docs/payments/payment-methods#compatibility">compatible Source * object) to attach to this PaymentIntent. * - *

If neither the {@code payment_method} parameter nor the {@code source} parameter are - * provided with {@code confirm=true}, {@code source} will be automatically populated with {@code - * customer.default_source} to improve the migration experience for users of the Charges API. We - * recommend that you explicitly provide the {@code payment_method} going forward. + *

If you don't provide the {@code payment_method} parameter or the {@code source} parameter + * with {@code confirm=true}, {@code source} automatically populates with {@code + * customer.default_source} to improve migration for users of the Charges API. We recommend that + * you explicitly provide the {@code payment_method} moving forward. */ @SerializedName("payment_method") String paymentMethod; @@ -194,30 +191,30 @@ public class PaymentIntentCreateParams extends ApiRequestParams { @SerializedName("payment_method_data") PaymentMethodData paymentMethodData; - /** Payment-method-specific configuration for this PaymentIntent. */ + /** Payment method-specific configuration for this PaymentIntent. */ @SerializedName("payment_method_options") PaymentMethodOptions paymentMethodOptions; /** - * The list of payment method types (e.g. card) that this PaymentIntent is allowed to use. If this - * is not provided, defaults to ["card"]. Use automatic_payment_methods to manage - * payment methods from the Stripe - * Dashboard. + * The list of payment method types (for example, a card) that this PaymentIntent can use. If you + * don't provide this, it defaults to ["card"]. Use {@code automatic_payment_methods} to + * manage payment methods from the Stripe Dashboard. */ @SerializedName("payment_method_types") List paymentMethodTypes; /** - * Options to configure Radar. See Radar - * Session for more information. + * Options to configure Radar. Learn more about Radar Sessions. */ @SerializedName("radar_options") RadarOptions radarOptions; /** - * Email address that the receipt for the resulting payment will be sent to. If {@code - * receipt_email} is specified for a payment in live mode, a receipt will be sent regardless of - * your email settings. + * Email address to send the receipt to. If you specify {@code receipt_email} for a payment in + * live mode, you send a receipt regardless of your email settings. */ @SerializedName("receipt_email") String receiptEmail; @@ -262,7 +259,7 @@ public class PaymentIntentCreateParams extends ApiRequestParams { /** * For non-card charges, you can use this value as the complete description that appears on your - * customers’ statements. Must contain at least one letter, maximum 22 characters. + * customers’ statements. It must contain at least one letter and be 1–22 characters long. */ @SerializedName("statement_descriptor") String statementDescriptor; @@ -270,23 +267,24 @@ public class PaymentIntentCreateParams extends ApiRequestParams { /** * Provides information about a card payment that customers see on their statements. Concatenated * with the prefix (shortened descriptor) or statement descriptor that’s set on the account to - * form the complete statement descriptor. Maximum 22 characters for the concatenated descriptor. + * form the complete statement descriptor. The concatenated descriptor must contain 1-22 + * characters. */ @SerializedName("statement_descriptor_suffix") String statementDescriptorSuffix; /** - * The parameters used to automatically create a Transfer when the payment succeeds. For more - * information, see the PaymentIntents use case for connected accounts. + * The parameters that you can use to automatically create a Transfer after the payment succeeds. + * Learn more about the use case for + * connected accounts. */ @SerializedName("transfer_data") TransferData transferData; /** - * A string that identifies the resulting payment as part of a group. See the PaymentIntents use case for connected - * accounts for details. + * accounts. */ @SerializedName("transfer_group") String transferGroup; @@ -514,8 +512,8 @@ public Builder setApplicationFeeAmount(Long applicationFeeAmount) { } /** - * When enabled, this PaymentIntent will accept payment methods that you have enabled in the - * Dashboard and are compatible with this PaymentIntent's other parameters. + * When you enable this parameter, this PaymentIntent accepts payment methods that you enable in + * the Dashboard and that are compatible with this PaymentIntent's other parameters. */ public Builder setAutomaticPaymentMethods( PaymentIntentCreateParams.AutomaticPaymentMethods automaticPaymentMethods) { @@ -531,11 +529,10 @@ public Builder setCaptureMethod(PaymentIntentCreateParams.CaptureMethod captureM /** * Set to {@code true} to attempt to confirm this PaymentIntent - * immediately. This parameter defaults to {@code false}. When creating and confirming a - * PaymentIntent at the same time, parameters available in the confirm API may also be - * provided. + * href="https://stripe.com/docs/api/payment_intents/confirm">confirm this PaymentIntent + * this PaymentIntent immediately. This parameter defaults to {@code false}. When creating and + * confirming a PaymentIntent at the same time, you can also provide the parameters available in + * the Confirm API. */ public Builder setConfirm(Boolean confirm) { this.confirm = confirm; @@ -593,8 +590,8 @@ public Builder setDescription(String description) { /** * Set to {@code true} to fail the payment attempt if the PaymentIntent transitions into {@code - * requires_action}. This parameter is intended for simpler integrations that do not handle - * customer actions, like saving cards without * authentication. This parameter can only be used with {@code @@ -658,7 +655,7 @@ public Builder putAllExtraParam(Map map) { } /** - * ID of the mandate to be used for this payment. This parameter can only be used with {@code * confirm=true}. */ @@ -716,11 +713,10 @@ public Builder putAllMetadata(Map map) { } /** - * Set to {@code true} to indicate that the customer is not in your checkout flow during this - * payment attempt, and therefore is unable to authenticate. This parameter is intended for - * scenarios where you collect card details and charge them later. - * This parameter can only be used with charge + * them later. This parameter can only be used with {@code * confirm=true}. */ @@ -730,11 +726,10 @@ public Builder setOffSession(Boolean offSession) { } /** - * Set to {@code true} to indicate that the customer is not in your checkout flow during this - * payment attempt, and therefore is unable to authenticate. This parameter is intended for - * scenarios where you collect card details and charge them later. - * This parameter can only be used with charge + * them later. This parameter can only be used with {@code * confirm=true}. */ @@ -744,8 +739,8 @@ public Builder setOffSession(PaymentIntentCreateParams.OffSession offSession) { } /** - * The Stripe account ID for which these funds are intended. For details, see the PaymentIntents - * use case for connected + * The Stripe account ID that these funds are intended for. Learn more about the use case for connected * accounts. */ public Builder setOnBehalfOf(String onBehalfOf) { @@ -764,10 +759,10 @@ public Builder setPaymentDetails(PaymentIntentCreateParams.PaymentDetails paymen * href="https://stripe.com/docs/payments/payment-methods#compatibility">compatible Source * object) to attach to this PaymentIntent. * - *

If neither the {@code payment_method} parameter nor the {@code source} parameter are - * provided with {@code confirm=true}, {@code source} will be automatically populated with - * {@code customer.default_source} to improve the migration experience for users of the Charges - * API. We recommend that you explicitly provide the {@code payment_method} going forward. + *

If you don't provide the {@code payment_method} parameter or the {@code source} parameter + * with {@code confirm=true}, {@code source} automatically populates with {@code + * customer.default_source} to improve migration for users of the Charges API. We recommend that + * you explicitly provide the {@code payment_method} moving forward. */ public Builder setPaymentMethod(String paymentMethod) { this.paymentMethod = paymentMethod; @@ -792,7 +787,7 @@ public Builder setPaymentMethodData( return this; } - /** Payment-method-specific configuration for this PaymentIntent. */ + /** Payment method-specific configuration for this PaymentIntent. */ public Builder setPaymentMethodOptions( PaymentIntentCreateParams.PaymentMethodOptions paymentMethodOptions) { this.paymentMethodOptions = paymentMethodOptions; @@ -826,8 +821,8 @@ public Builder addAllPaymentMethodType(List elements) { } /** - * Options to configure Radar. See Radar - * Session for more information. + * Options to configure Radar. Learn more about Radar Sessions. */ public Builder setRadarOptions(PaymentIntentCreateParams.RadarOptions radarOptions) { this.radarOptions = radarOptions; @@ -835,9 +830,9 @@ public Builder setRadarOptions(PaymentIntentCreateParams.RadarOptions radarOptio } /** - * Email address that the receipt for the resulting payment will be sent to. If {@code - * receipt_email} is specified for a payment in live mode, a receipt will be sent regardless of - * your email settings. + * Email address to send the receipt to. If you specify {@code receipt_email} for a payment in + * live mode, you send a receipt regardless of your email settings. */ public Builder setReceiptEmail(String receiptEmail) { this.receiptEmail = receiptEmail; @@ -894,7 +889,7 @@ public Builder setShipping(PaymentIntentCreateParams.Shipping shipping) { /** * For non-card charges, you can use this value as the complete description that appears on your - * customers’ statements. Must contain at least one letter, maximum 22 characters. + * customers’ statements. It must contain at least one letter and be 1–22 characters long. */ public Builder setStatementDescriptor(String statementDescriptor) { this.statementDescriptor = statementDescriptor; @@ -904,8 +899,8 @@ public Builder setStatementDescriptor(String statementDescriptor) { /** * Provides information about a card payment that customers see on their statements. * Concatenated with the prefix (shortened descriptor) or statement descriptor that’s set on the - * account to form the complete statement descriptor. Maximum 22 characters for the concatenated - * descriptor. + * account to form the complete statement descriptor. The concatenated descriptor must contain + * 1-22 characters. */ public Builder setStatementDescriptorSuffix(String statementDescriptorSuffix) { this.statementDescriptorSuffix = statementDescriptorSuffix; @@ -913,8 +908,8 @@ public Builder setStatementDescriptorSuffix(String statementDescriptorSuffix) { } /** - * The parameters used to automatically create a Transfer when the payment succeeds. For more - * information, see the PaymentIntents use case for connected * accounts. */ @@ -924,9 +919,9 @@ public Builder setTransferData(PaymentIntentCreateParams.TransferData transferDa } /** - * A string that identifies the resulting payment as part of a group. See the PaymentIntents use case for connected - * accounts for details. + * accounts. */ public Builder setTransferGroup(String transferGroup) { this.transferGroup = transferGroup; diff --git a/src/main/java/com/stripe/param/PaymentIntentIncrementAuthorizationParams.java b/src/main/java/com/stripe/param/PaymentIntentIncrementAuthorizationParams.java index 52a234eb26e..8bb9d4a4372 100644 --- a/src/main/java/com/stripe/param/PaymentIntentIncrementAuthorizationParams.java +++ b/src/main/java/com/stripe/param/PaymentIntentIncrementAuthorizationParams.java @@ -12,8 +12,8 @@ @Getter public class PaymentIntentIncrementAuthorizationParams extends ApiRequestParams { /** - * Required. The updated total amount you intend to collect from the cardholder. - * This amount must be greater than the currently authorized amount. + * Required. The updated total amount that you intend to collect from the + * cardholder. This amount must be greater than the currently authorized amount. */ @SerializedName("amount") Long amount; @@ -62,9 +62,9 @@ public class PaymentIntentIncrementAuthorizationParams extends ApiRequestParams String statementDescriptor; /** - * The parameters used to automatically create a Transfer when the payment is captured. For more - * information, see the PaymentIntents use case for connected accounts. + * The parameters used to automatically create a transfer after the payment is captured. Learn + * more about the use case for + * connected accounts. */ @SerializedName("transfer_data") TransferData transferData; @@ -123,7 +123,7 @@ public PaymentIntentIncrementAuthorizationParams build() { } /** - * Required. The updated total amount you intend to collect from the + * Required. The updated total amount that you intend to collect from the * cardholder. This amount must be greater than the currently authorized amount. */ public Builder setAmount(Long amount) { @@ -238,10 +238,9 @@ public Builder setStatementDescriptor(String statementDescriptor) { } /** - * The parameters used to automatically create a Transfer when the payment is captured. For more - * information, see the PaymentIntents use case for connected - * accounts. + * The parameters used to automatically create a transfer after the payment is captured. Learn + * more about the use case for + * connected accounts. */ public Builder setTransferData( PaymentIntentIncrementAuthorizationParams.TransferData transferData) { diff --git a/src/main/java/com/stripe/service/PaymentIntentService.java b/src/main/java/com/stripe/service/PaymentIntentService.java index d620e1be7ea..9314e1b1e4c 100644 --- a/src/main/java/com/stripe/service/PaymentIntentService.java +++ b/src/main/java/com/stripe/service/PaymentIntentService.java @@ -68,13 +68,13 @@ public StripeSearchResult search( * *

After the PaymentIntent is created, attach a payment method and confirm to continue the payment. - * You can read more about the different payment flows available via the Payment Intents API here. + * Learn more about the available + * payment flows with the Payment Intents API. * - *

When {@code confirm=true} is used during creation, it is equivalent to creating and - * confirming the PaymentIntent in the same call. You may use any parameters available in the confirm API when {@code - * confirm=true} is supplied. + *

When you use {@code confirm=true} during creation, it’s equivalent to creating and + * confirming the PaymentIntent in the same call. You can use any parameters available in the confirm API when you supply + * {@code confirm=true}. */ public PaymentIntent create(PaymentIntentCreateParams params) throws StripeException { return create(params, (RequestOptions) null); @@ -84,13 +84,13 @@ public PaymentIntent create(PaymentIntentCreateParams params) throws StripeExcep * *

After the PaymentIntent is created, attach a payment method and confirm to continue the payment. - * You can read more about the different payment flows available via the Payment Intents API here. + * Learn more about the available + * payment flows with the Payment Intents API. * - *

When {@code confirm=true} is used during creation, it is equivalent to creating and - * confirming the PaymentIntent in the same call. You may use any parameters available in the confirm API when {@code - * confirm=true} is supplied. + *

When you use {@code confirm=true} during creation, it’s equivalent to creating and + * confirming the PaymentIntent in the same call. You can use any parameters available in the confirm API when you supply + * {@code confirm=true}. */ public PaymentIntent create(PaymentIntentCreateParams params, RequestOptions options) throws StripeException { @@ -520,20 +520,20 @@ public PaymentIntent capture( * must be {@code true}. * *

Incremental authorizations attempt to increase the authorized amount on your customer’s card - * to the new, higher {@code amount} provided. As with the initial authorization, incremental - * authorizations may be declined. A single PaymentIntent can call this endpoint multiple times to + * to the new, higher {@code amount} provided. Similar to the initial authorization, incremental + * authorizations can be declined. A single PaymentIntent can call this endpoint multiple times to * further increase the authorized amount. * - *

If the incremental authorization succeeds, the PaymentIntent object is returned with the - * updated If the incremental authorization succeeds, the PaymentIntent object returns with the updated + * amount. * If the incremental authorization fails, a card_declined error is returned, - * and no fields on the PaymentIntent or Charge are updated. The PaymentIntent object remains + * href="https://stripe.com/docs/error-codes#card-declined">card_declined error returns, and + * no other fields on the PaymentIntent or Charge update. The PaymentIntent object remains * capturable for the previously authorized amount. * *

Each PaymentIntent can have a maximum of 10 incremental authorization attempts, including - * declines. Once captured, a PaymentIntent can no longer be incremented. + * declines. After it’s captured, a PaymentIntent can no longer be incremented. * *

Learn more about incremental @@ -551,20 +551,20 @@ public PaymentIntent incrementAuthorization( * must be {@code true}. * *

Incremental authorizations attempt to increase the authorized amount on your customer’s card - * to the new, higher {@code amount} provided. As with the initial authorization, incremental - * authorizations may be declined. A single PaymentIntent can call this endpoint multiple times to + * to the new, higher {@code amount} provided. Similar to the initial authorization, incremental + * authorizations can be declined. A single PaymentIntent can call this endpoint multiple times to * further increase the authorized amount. * - *

If the incremental authorization succeeds, the PaymentIntent object is returned with the - * updated If the incremental authorization succeeds, the PaymentIntent object returns with the updated + * amount. * If the incremental authorization fails, a card_declined error is returned, - * and no fields on the PaymentIntent or Charge are updated. The PaymentIntent object remains + * href="https://stripe.com/docs/error-codes#card-declined">card_declined error returns, and + * no other fields on the PaymentIntent or Charge update. The PaymentIntent object remains * capturable for the previously authorized amount. * *

Each PaymentIntent can have a maximum of 10 incremental authorization attempts, including - * declines. Once captured, a PaymentIntent can no longer be incremented. + * declines. After it’s captured, a PaymentIntent can no longer be incremented. * *

Learn more about incremental @@ -618,22 +618,22 @@ public PaymentIntent verifyMicrodeposits( options, ApiMode.V1); } - /** Manually reconcile the remaining amount for a customer_balance PaymentIntent. */ + /** Manually reconcile the remaining amount for a {@code customer_balance} PaymentIntent. */ public PaymentIntent applyCustomerBalance( String intent, PaymentIntentApplyCustomerBalanceParams params) throws StripeException { return applyCustomerBalance(intent, params, (RequestOptions) null); } - /** Manually reconcile the remaining amount for a customer_balance PaymentIntent. */ + /** Manually reconcile the remaining amount for a {@code customer_balance} PaymentIntent. */ public PaymentIntent applyCustomerBalance(String intent, RequestOptions options) throws StripeException { return applyCustomerBalance(intent, (PaymentIntentApplyCustomerBalanceParams) null, options); } - /** Manually reconcile the remaining amount for a customer_balance PaymentIntent. */ + /** Manually reconcile the remaining amount for a {@code customer_balance} PaymentIntent. */ public PaymentIntent applyCustomerBalance(String intent) throws StripeException { return applyCustomerBalance( intent, (PaymentIntentApplyCustomerBalanceParams) null, (RequestOptions) null); } - /** Manually reconcile the remaining amount for a customer_balance PaymentIntent. */ + /** Manually reconcile the remaining amount for a {@code customer_balance} PaymentIntent. */ public PaymentIntent applyCustomerBalance( String intent, PaymentIntentApplyCustomerBalanceParams params, RequestOptions options) throws StripeException { From 2ed20541cf92e89f2255ba8338a3d920c6c46c6d Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Wed, 27 Sep 2023 18:58:33 +0000 Subject: [PATCH 19/25] Update generated code for v561 --- OPENAPI_VERSION | 2 +- src/main/java/com/stripe/model/Invoice.java | 5 ++++- .../com/stripe/model/QuotePreviewInvoice.java | 5 ++++- .../com/stripe/param/InvoiceCreateParams.java | 15 ++++++++++++--- .../com/stripe/param/InvoiceUpdateParams.java | 15 ++++++++++++--- 5 files changed, 33 insertions(+), 9 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 702f49cb1d4..02704e46679 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v560 \ No newline at end of file +v561 \ No newline at end of file diff --git a/src/main/java/com/stripe/model/Invoice.java b/src/main/java/com/stripe/model/Invoice.java index 459b3cd3bbe..34c6b414ce6 100644 --- a/src/main/java/com/stripe/model/Invoice.java +++ b/src/main/java/com/stripe/model/Invoice.java @@ -501,7 +501,10 @@ public class Invoice extends ApiResource implements HasId, MetadataStore Date: Wed, 27 Sep 2023 20:40:19 +0000 Subject: [PATCH 20/25] Update generated code for v562 --- OPENAPI_VERSION | 2 +- src/main/java/com/stripe/model/Refund.java | 107 +++++++++--------- .../com/stripe/service/RefundService.java | 56 ++++----- 3 files changed, 82 insertions(+), 83 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 02704e46679..12c066f447b 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v561 \ No newline at end of file +v562 \ No newline at end of file diff --git a/src/main/java/com/stripe/model/Refund.java b/src/main/java/com/stripe/model/Refund.java index 3a9a5503832..11b28353b35 100644 --- a/src/main/java/com/stripe/model/Refund.java +++ b/src/main/java/com/stripe/model/Refund.java @@ -21,8 +21,8 @@ import lombok.Setter; /** - * {@code Refund} objects allow you to refund a charge that has previously been created but not yet - * refunded. Funds will be refunded to the credit or debit card that was originally charged. + * Refund objects allow you to refund a previously created charge that isn't refunded yet. Funds are + * refunded to the credit or debit card that's initially charged. * *

Related guide: Refunds */ @@ -40,7 +40,7 @@ public class Refund extends ApiResource implements MetadataStore, Balanc @Setter(lombok.AccessLevel.NONE) ExpandableField balanceTransaction; - /** ID of the charge that was refunded. */ + /** ID of the charge that's refunded. */ @SerializedName("charge") @Getter(lombok.AccessLevel.NONE) @Setter(lombok.AccessLevel.NONE) @@ -58,14 +58,14 @@ public class Refund extends ApiResource implements MetadataStore, Balanc String currency; /** - * An arbitrary string attached to the object. Often useful for displaying to users. (Available on - * non-card refunds only) + * An arbitrary string attached to the object. You can use this for displaying to users (available + * on non-card refunds only). */ @SerializedName("description") String description; /** - * If the refund failed, this balance transaction describes the adjustment made on your account + * After the refund fails, this balance transaction describes the adjustment made on your account * balance that reverses the initial balance transaction. */ @SerializedName("failure_balance_transaction") @@ -74,10 +74,9 @@ public class Refund extends ApiResource implements MetadataStore, Balanc ExpandableField failureBalanceTransaction; /** - * If the refund failed, the reason for refund failure if known. Possible values are {@code - * lost_or_stolen_card}, {@code expired_or_canceled_card}, {@code - * charge_for_pending_refund_disputed}, {@code insufficient_funds}, {@code declined}, {@code - * merchant_request} or {@code unknown}. + * Provides the reason for the refund failure. Possible values are: {@code lost_or_stolen_card}, + * {@code expired_or_canceled_card}, {@code charge_for_pending_refund_disputed}, {@code + * insufficient_funds}, {@code declined}, {@code merchant_request}, or {@code unknown}. */ @SerializedName("failure_reason") String failureReason; @@ -88,8 +87,8 @@ public class Refund extends ApiResource implements MetadataStore, Balanc String id; /** - * For payment methods without native refund support (e.g., Konbini, PromptPay), email for the - * customer to receive refund instructions. + * For payment methods without native refund support (for example, Konbini, PromptPay), provide an + * email address for the customer to receive refund instructions. */ @SerializedName("instructions_email") String instructionsEmail; @@ -114,15 +113,16 @@ public class Refund extends ApiResource implements MetadataStore, Balanc @SerializedName("object") String object; - /** ID of the PaymentIntent that was refunded. */ + /** ID of the PaymentIntent that's refunded. */ @SerializedName("payment_intent") @Getter(lombok.AccessLevel.NONE) @Setter(lombok.AccessLevel.NONE) ExpandableField paymentIntent; /** - * Reason for the refund, either user-provided ({@code duplicate}, {@code fraudulent}, or {@code - * requested_by_customer}) or generated by Stripe internally ({@code expired_uncaptured_charge}). + * Reason for the refund, which is either user-provided ({@code duplicate}, {@code fraudulent}, or + * {@code requested_by_customer}) or generated by Stripe internally ({@code + * expired_uncaptured_charge}). * *

One of {@code duplicate}, {@code expired_uncaptured_charge}, {@code fraudulent}, or {@code * requested_by_customer}. @@ -135,8 +135,8 @@ public class Refund extends ApiResource implements MetadataStore, Balanc String receiptNumber; /** - * The transfer reversal that is associated with the refund. Only present if the charge came from - * another Stripe account. See the Connect documentation for details. + * The transfer reversal that's associated with the refund. Only present if the charge came from + * another Stripe account. */ @SerializedName("source_transfer_reversal") @Getter(lombok.AccessLevel.NONE) @@ -146,16 +146,15 @@ public class Refund extends ApiResource implements MetadataStore, Balanc /** * Status of the refund. For credit card refunds, this can be {@code pending}, {@code succeeded}, * or {@code failed}. For other types of refunds, it can be {@code pending}, {@code - * requires_action}, {@code succeeded}, {@code failed}, or {@code canceled}. Refer to our refunds documentation for more - * details. + * requires_action}, {@code succeeded}, {@code failed}, or {@code canceled}. Learn more about failed refunds. */ @SerializedName("status") String status; /** - * If the accompanying transfer was reversed, the transfer reversal object. Only applicable if the - * charge was created using the destination parameter. + * This refers to the transfer reversal object if the accompanying transfer reverses. This is only + * applicable if the charge was created using the destination parameter. */ @SerializedName("transfer_reversal") @Getter(lombok.AccessLevel.NONE) @@ -281,8 +280,8 @@ public void setTransferReversalObject(TransferReversal expandableObject) { /** * Cancels a refund with a status of {@code requires_action}. * - *

Refunds in other states cannot be canceled, and only refunds for payment methods that - * require customer action will enter the {@code requires_action} state. + *

You can’t cancel refunds in other states. Only refunds for payment methods that require + * customer action can enter the {@code requires_action} state. */ public Refund cancel() throws StripeException { return cancel((Map) null, (RequestOptions) null); @@ -291,8 +290,8 @@ public Refund cancel() throws StripeException { /** * Cancels a refund with a status of {@code requires_action}. * - *

Refunds in other states cannot be canceled, and only refunds for payment methods that - * require customer action will enter the {@code requires_action} state. + *

You can’t cancel refunds in other states. Only refunds for payment methods that require + * customer action can enter the {@code requires_action} state. */ public Refund cancel(RequestOptions options) throws StripeException { return cancel((Map) null, options); @@ -301,8 +300,8 @@ public Refund cancel(RequestOptions options) throws StripeException { /** * Cancels a refund with a status of {@code requires_action}. * - *

Refunds in other states cannot be canceled, and only refunds for payment methods that - * require customer action will enter the {@code requires_action} state. + *

You can’t cancel refunds in other states. Only refunds for payment methods that require + * customer action can enter the {@code requires_action} state. */ public Refund cancel(Map params) throws StripeException { return cancel(params, (RequestOptions) null); @@ -311,8 +310,8 @@ public Refund cancel(Map params) throws StripeException { /** * Cancels a refund with a status of {@code requires_action}. * - *

Refunds in other states cannot be canceled, and only refunds for payment methods that - * require customer action will enter the {@code requires_action} state. + *

You can’t cancel refunds in other states. Only refunds for payment methods that require + * customer action can enter the {@code requires_action} state. */ public Refund cancel(Map params, RequestOptions options) throws StripeException { String path = String.format("/v1/refunds/%s/cancel", ApiResource.urlEncodeId(this.getId())); @@ -330,8 +329,8 @@ public Refund cancel(Map params, RequestOptions options) throws /** * Cancels a refund with a status of {@code requires_action}. * - *

Refunds in other states cannot be canceled, and only refunds for payment methods that - * require customer action will enter the {@code requires_action} state. + *

You can’t cancel refunds in other states. Only refunds for payment methods that require + * customer action can enter the {@code requires_action} state. */ public Refund cancel(RefundCancelParams params) throws StripeException { return cancel(params, (RequestOptions) null); @@ -340,8 +339,8 @@ public Refund cancel(RefundCancelParams params) throws StripeException { /** * Cancels a refund with a status of {@code requires_action}. * - *

Refunds in other states cannot be canceled, and only refunds for payment methods that - * require customer action will enter the {@code requires_action} state. + *

You can’t cancel refunds in other states. Only refunds for payment methods that require + * customer action can enter the {@code requires_action} state. */ public Refund cancel(RefundCancelParams params, RequestOptions options) throws StripeException { String path = String.format("/v1/refunds/%s/cancel", ApiResource.urlEncodeId(this.getId())); @@ -451,18 +450,18 @@ public static Refund create(RefundCreateParams params, RequestOptions options) } /** - * Returns a list of all refunds you’ve previously created. The refunds are returned in sorted - * order, with the most recent refunds appearing first. For convenience, the 10 most recent - * refunds are always available by default on the charge object. + * Returns a list of all refunds you created. We return the refunds in sorted order, with the most + * recent refunds appearing first The 10 most recent refunds are always available by default on + * the Charge object. */ public static RefundCollection list(Map params) throws StripeException { return list(params, (RequestOptions) null); } /** - * Returns a list of all refunds you’ve previously created. The refunds are returned in sorted - * order, with the most recent refunds appearing first. For convenience, the 10 most recent - * refunds are always available by default on the charge object. + * Returns a list of all refunds you created. We return the refunds in sorted order, with the most + * recent refunds appearing first The 10 most recent refunds are always available by default on + * the Charge object. */ public static RefundCollection list(Map params, RequestOptions options) throws StripeException { @@ -479,18 +478,18 @@ public static RefundCollection list(Map params, RequestOptions o } /** - * Returns a list of all refunds you’ve previously created. The refunds are returned in sorted - * order, with the most recent refunds appearing first. For convenience, the 10 most recent - * refunds are always available by default on the charge object. + * Returns a list of all refunds you created. We return the refunds in sorted order, with the most + * recent refunds appearing first The 10 most recent refunds are always available by default on + * the Charge object. */ public static RefundCollection list(RefundListParams params) throws StripeException { return list(params, (RequestOptions) null); } /** - * Returns a list of all refunds you’ve previously created. The refunds are returned in sorted - * order, with the most recent refunds appearing first. For convenience, the 10 most recent - * refunds are always available by default on the charge object. + * Returns a list of all refunds you created. We return the refunds in sorted order, with the most + * recent refunds appearing first The 10 most recent refunds are always available by default on + * the Charge object. */ public static RefundCollection list(RefundListParams params, RequestOptions options) throws StripeException { @@ -549,8 +548,8 @@ public static Refund retrieve(String refund, RefundRetrieveParams params, Reques } /** - * Updates the specified refund by setting the values of the parameters passed. Any parameters not - * provided will be left unchanged. + * Updates the refund that you specify by setting the values of the passed parameters. Any + * parameters that you don’t provide remain unchanged. * *

This request only accepts {@code metadata} as an argument. */ @@ -560,8 +559,8 @@ public Refund update(Map params) throws StripeException { } /** - * Updates the specified refund by setting the values of the parameters passed. Any parameters not - * provided will be left unchanged. + * Updates the refund that you specify by setting the values of the passed parameters. Any + * parameters that you don’t provide remain unchanged. * *

This request only accepts {@code metadata} as an argument. */ @@ -580,8 +579,8 @@ public Refund update(Map params, RequestOptions options) throws } /** - * Updates the specified refund by setting the values of the parameters passed. Any parameters not - * provided will be left unchanged. + * Updates the refund that you specify by setting the values of the passed parameters. Any + * parameters that you don’t provide remain unchanged. * *

This request only accepts {@code metadata} as an argument. */ @@ -590,8 +589,8 @@ public Refund update(RefundUpdateParams params) throws StripeException { } /** - * Updates the specified refund by setting the values of the parameters passed. Any parameters not - * provided will be left unchanged. + * Updates the refund that you specify by setting the values of the passed parameters. Any + * parameters that you don’t provide remain unchanged. * *

This request only accepts {@code metadata} as an argument. */ diff --git a/src/main/java/com/stripe/service/RefundService.java b/src/main/java/com/stripe/service/RefundService.java index 3f9d38e1b2a..02ad1c5d28d 100644 --- a/src/main/java/com/stripe/service/RefundService.java +++ b/src/main/java/com/stripe/service/RefundService.java @@ -24,33 +24,33 @@ public RefundService(StripeResponseGetter responseGetter) { } /** - * Returns a list of all refunds you’ve previously created. The refunds are returned in sorted - * order, with the most recent refunds appearing first. For convenience, the 10 most recent - * refunds are always available by default on the charge object. + * Returns a list of all refunds you created. We return the refunds in sorted order, with the most + * recent refunds appearing first The 10 most recent refunds are always available by default on + * the Charge object. */ public StripeCollection list(RefundListParams params) throws StripeException { return list(params, (RequestOptions) null); } /** - * Returns a list of all refunds you’ve previously created. The refunds are returned in sorted - * order, with the most recent refunds appearing first. For convenience, the 10 most recent - * refunds are always available by default on the charge object. + * Returns a list of all refunds you created. We return the refunds in sorted order, with the most + * recent refunds appearing first The 10 most recent refunds are always available by default on + * the Charge object. */ public StripeCollection list(RequestOptions options) throws StripeException { return list((RefundListParams) null, options); } /** - * Returns a list of all refunds you’ve previously created. The refunds are returned in sorted - * order, with the most recent refunds appearing first. For convenience, the 10 most recent - * refunds are always available by default on the charge object. + * Returns a list of all refunds you created. We return the refunds in sorted order, with the most + * recent refunds appearing first The 10 most recent refunds are always available by default on + * the Charge object. */ public StripeCollection list() throws StripeException { return list((RefundListParams) null, (RequestOptions) null); } /** - * Returns a list of all refunds you’ve previously created. The refunds are returned in sorted - * order, with the most recent refunds appearing first. For convenience, the 10 most recent - * refunds are always available by default on the charge object. + * Returns a list of all refunds you created. We return the refunds in sorted order, with the most + * recent refunds appearing first The 10 most recent refunds are always available by default on + * the Charge object. */ public StripeCollection list(RefundListParams params, RequestOptions options) throws StripeException { @@ -169,8 +169,8 @@ public Refund retrieve(String refund, RefundRetrieveParams params, RequestOption ApiMode.V1); } /** - * Updates the specified refund by setting the values of the parameters passed. Any parameters not - * provided will be left unchanged. + * Updates the refund that you specify by setting the values of the passed parameters. Any + * parameters that you don’t provide remain unchanged. * *

This request only accepts {@code metadata} as an argument. */ @@ -178,8 +178,8 @@ public Refund update(String refund, RefundUpdateParams params) throws StripeExce return update(refund, params, (RequestOptions) null); } /** - * Updates the specified refund by setting the values of the parameters passed. Any parameters not - * provided will be left unchanged. + * Updates the refund that you specify by setting the values of the passed parameters. Any + * parameters that you don’t provide remain unchanged. * *

This request only accepts {@code metadata} as an argument. */ @@ -187,8 +187,8 @@ public Refund update(String refund, RequestOptions options) throws StripeExcepti return update(refund, (RefundUpdateParams) null, options); } /** - * Updates the specified refund by setting the values of the parameters passed. Any parameters not - * provided will be left unchanged. + * Updates the refund that you specify by setting the values of the passed parameters. Any + * parameters that you don’t provide remain unchanged. * *

This request only accepts {@code metadata} as an argument. */ @@ -196,8 +196,8 @@ public Refund update(String refund) throws StripeException { return update(refund, (RefundUpdateParams) null, (RequestOptions) null); } /** - * Updates the specified refund by setting the values of the parameters passed. Any parameters not - * provided will be left unchanged. + * Updates the refund that you specify by setting the values of the passed parameters. Any + * parameters that you don’t provide remain unchanged. * *

This request only accepts {@code metadata} as an argument. */ @@ -217,8 +217,8 @@ public Refund update(String refund, RefundUpdateParams params, RequestOptions op /** * Cancels a refund with a status of {@code requires_action}. * - *

Refunds in other states cannot be canceled, and only refunds for payment methods that - * require customer action will enter the {@code requires_action} state. + *

You can’t cancel refunds in other states. Only refunds for payment methods that require + * customer action can enter the {@code requires_action} state. */ public Refund cancel(String refund, RefundCancelParams params) throws StripeException { return cancel(refund, params, (RequestOptions) null); @@ -226,8 +226,8 @@ public Refund cancel(String refund, RefundCancelParams params) throws StripeExce /** * Cancels a refund with a status of {@code requires_action}. * - *

Refunds in other states cannot be canceled, and only refunds for payment methods that - * require customer action will enter the {@code requires_action} state. + *

You can’t cancel refunds in other states. Only refunds for payment methods that require + * customer action can enter the {@code requires_action} state. */ public Refund cancel(String refund, RequestOptions options) throws StripeException { return cancel(refund, (RefundCancelParams) null, options); @@ -235,8 +235,8 @@ public Refund cancel(String refund, RequestOptions options) throws StripeExcepti /** * Cancels a refund with a status of {@code requires_action}. * - *

Refunds in other states cannot be canceled, and only refunds for payment methods that - * require customer action will enter the {@code requires_action} state. + *

You can’t cancel refunds in other states. Only refunds for payment methods that require + * customer action can enter the {@code requires_action} state. */ public Refund cancel(String refund) throws StripeException { return cancel(refund, (RefundCancelParams) null, (RequestOptions) null); @@ -244,8 +244,8 @@ public Refund cancel(String refund) throws StripeException { /** * Cancels a refund with a status of {@code requires_action}. * - *

Refunds in other states cannot be canceled, and only refunds for payment methods that - * require customer action will enter the {@code requires_action} state. + *

You can’t cancel refunds in other states. Only refunds for payment methods that require + * customer action can enter the {@code requires_action} state. */ public Refund cancel(String refund, RefundCancelParams params, RequestOptions options) throws StripeException { From 38de0f2d009578ea4a8fc814435311f5262010dd Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Wed, 27 Sep 2023 22:50:47 +0000 Subject: [PATCH 21/25] Update generated code for v563 --- OPENAPI_VERSION | 2 +- .../java/com/stripe/model/PaymentIntent.java | 84 +++++++++---------- .../param/PaymentIntentCancelParams.java | 4 +- .../param/PaymentIntentCaptureParams.java | 23 ++--- .../stripe/param/PaymentIntentListParams.java | 12 ++- .../param/PaymentIntentRetrieveParams.java | 4 +- .../stripe/service/PaymentIntentService.java | 56 ++++++------- 7 files changed, 92 insertions(+), 93 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 12c066f447b..d2d999515a4 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v562 \ No newline at end of file +v563 \ No newline at end of file diff --git a/src/main/java/com/stripe/model/PaymentIntent.java b/src/main/java/com/stripe/model/PaymentIntent.java index 0f27c4325f8..14db0aa71ab 100644 --- a/src/main/java/com/stripe/model/PaymentIntent.java +++ b/src/main/java/com/stripe/model/PaymentIntent.java @@ -554,16 +554,16 @@ public PaymentIntent applyCustomerBalance( } /** - * A PaymentIntent object can be canceled when it is in one of these statuses: {@code + * You can cancel a PaymentIntent object when it’s in one of these statuses: {@code * requires_payment_method}, {@code requires_capture}, {@code requires_confirmation}, {@code * requires_action} or, in rare cases, * {@code processing}. * - *

Once canceled, no additional charges will be made by the PaymentIntent and any operations on - * the PaymentIntent will fail with an error. For PaymentIntents with a {@code status} of {@code - * requires_capture}, the remaining {@code amount_capturable} will automatically be refunded. + *

After it’s canceled, no additional charges are made by the PaymentIntent and any operations + * on the PaymentIntent fail with an error. For PaymentIntents with a {@code status} of {@code + * requires_capture}, the remaining {@code amount_capturable} is automatically refunded. * - *

You cannot cancel the PaymentIntent for a Checkout Session. You can’t cancel the PaymentIntent for a Checkout Session. Expire the Checkout Session * instead. */ @@ -572,16 +572,16 @@ public PaymentIntent cancel() throws StripeException { } /** - * A PaymentIntent object can be canceled when it is in one of these statuses: {@code + * You can cancel a PaymentIntent object when it’s in one of these statuses: {@code * requires_payment_method}, {@code requires_capture}, {@code requires_confirmation}, {@code * requires_action} or, in rare cases, * {@code processing}. * - *

Once canceled, no additional charges will be made by the PaymentIntent and any operations on - * the PaymentIntent will fail with an error. For PaymentIntents with a {@code status} of {@code - * requires_capture}, the remaining {@code amount_capturable} will automatically be refunded. + *

After it’s canceled, no additional charges are made by the PaymentIntent and any operations + * on the PaymentIntent fail with an error. For PaymentIntents with a {@code status} of {@code + * requires_capture}, the remaining {@code amount_capturable} is automatically refunded. * - *

You cannot cancel the PaymentIntent for a Checkout Session. You can’t cancel the PaymentIntent for a Checkout Session. Expire the Checkout Session * instead. */ @@ -590,16 +590,16 @@ public PaymentIntent cancel(RequestOptions options) throws StripeException { } /** - * A PaymentIntent object can be canceled when it is in one of these statuses: {@code + * You can cancel a PaymentIntent object when it’s in one of these statuses: {@code * requires_payment_method}, {@code requires_capture}, {@code requires_confirmation}, {@code * requires_action} or, in rare cases, * {@code processing}. * - *

Once canceled, no additional charges will be made by the PaymentIntent and any operations on - * the PaymentIntent will fail with an error. For PaymentIntents with a {@code status} of {@code - * requires_capture}, the remaining {@code amount_capturable} will automatically be refunded. + *

After it’s canceled, no additional charges are made by the PaymentIntent and any operations + * on the PaymentIntent fail with an error. For PaymentIntents with a {@code status} of {@code + * requires_capture}, the remaining {@code amount_capturable} is automatically refunded. * - *

You cannot cancel the PaymentIntent for a Checkout Session. You can’t cancel the PaymentIntent for a Checkout Session. Expire the Checkout Session * instead. */ @@ -608,16 +608,16 @@ public PaymentIntent cancel(Map params) throws StripeException { } /** - * A PaymentIntent object can be canceled when it is in one of these statuses: {@code + * You can cancel a PaymentIntent object when it’s in one of these statuses: {@code * requires_payment_method}, {@code requires_capture}, {@code requires_confirmation}, {@code * requires_action} or, in rare cases, * {@code processing}. * - *

Once canceled, no additional charges will be made by the PaymentIntent and any operations on - * the PaymentIntent will fail with an error. For PaymentIntents with a {@code status} of {@code - * requires_capture}, the remaining {@code amount_capturable} will automatically be refunded. + *

After it’s canceled, no additional charges are made by the PaymentIntent and any operations + * on the PaymentIntent fail with an error. For PaymentIntents with a {@code status} of {@code + * requires_capture}, the remaining {@code amount_capturable} is automatically refunded. * - *

You cannot cancel the PaymentIntent for a Checkout Session. You can’t cancel the PaymentIntent for a Checkout Session. Expire the Checkout Session * instead. */ @@ -637,16 +637,16 @@ public PaymentIntent cancel(Map params, RequestOptions options) } /** - * A PaymentIntent object can be canceled when it is in one of these statuses: {@code + * You can cancel a PaymentIntent object when it’s in one of these statuses: {@code * requires_payment_method}, {@code requires_capture}, {@code requires_confirmation}, {@code * requires_action} or, in rare cases, * {@code processing}. * - *

Once canceled, no additional charges will be made by the PaymentIntent and any operations on - * the PaymentIntent will fail with an error. For PaymentIntents with a {@code status} of {@code - * requires_capture}, the remaining {@code amount_capturable} will automatically be refunded. + *

After it’s canceled, no additional charges are made by the PaymentIntent and any operations + * on the PaymentIntent fail with an error. For PaymentIntents with a {@code status} of {@code + * requires_capture}, the remaining {@code amount_capturable} is automatically refunded. * - *

You cannot cancel the PaymentIntent for a Checkout Session. You can’t cancel the PaymentIntent for a Checkout Session. Expire the Checkout Session * instead. */ @@ -655,16 +655,16 @@ public PaymentIntent cancel(PaymentIntentCancelParams params) throws StripeExcep } /** - * A PaymentIntent object can be canceled when it is in one of these statuses: {@code + * You can cancel a PaymentIntent object when it’s in one of these statuses: {@code * requires_payment_method}, {@code requires_capture}, {@code requires_confirmation}, {@code * requires_action} or, in rare cases, * {@code processing}. * - *

Once canceled, no additional charges will be made by the PaymentIntent and any operations on - * the PaymentIntent will fail with an error. For PaymentIntents with a {@code status} of {@code - * requires_capture}, the remaining {@code amount_capturable} will automatically be refunded. + *

After it’s canceled, no additional charges are made by the PaymentIntent and any operations + * on the PaymentIntent fail with an error. For PaymentIntents with a {@code status} of {@code + * requires_capture}, the remaining {@code amount_capturable} is automatically refunded. * - *

You cannot cancel the PaymentIntent for a Checkout Session. You can’t cancel the PaymentIntent for a Checkout Session. Expire the Checkout Session * instead. */ @@ -688,8 +688,8 @@ public PaymentIntent cancel(PaymentIntentCancelParams params, RequestOptions opt * Capture the funds of an existing uncaptured PaymentIntent when its status is {@code * requires_capture}. * - *

Uncaptured PaymentIntents will be canceled a set number of days after they are created (7 by - * default). + *

Uncaptured PaymentIntents are cancelled a set number of days (7 by default) after their + * creation. * *

Learn more about separate * authorization and capture. @@ -702,8 +702,8 @@ public PaymentIntent capture() throws StripeException { * Capture the funds of an existing uncaptured PaymentIntent when its status is {@code * requires_capture}. * - *

Uncaptured PaymentIntents will be canceled a set number of days after they are created (7 by - * default). + *

Uncaptured PaymentIntents are cancelled a set number of days (7 by default) after their + * creation. * *

Learn more about separate * authorization and capture. @@ -716,8 +716,8 @@ public PaymentIntent capture(RequestOptions options) throws StripeException { * Capture the funds of an existing uncaptured PaymentIntent when its status is {@code * requires_capture}. * - *

Uncaptured PaymentIntents will be canceled a set number of days after they are created (7 by - * default). + *

Uncaptured PaymentIntents are cancelled a set number of days (7 by default) after their + * creation. * *

Learn more about separate * authorization and capture. @@ -730,8 +730,8 @@ public PaymentIntent capture(Map params) throws StripeException * Capture the funds of an existing uncaptured PaymentIntent when its status is {@code * requires_capture}. * - *

Uncaptured PaymentIntents will be canceled a set number of days after they are created (7 by - * default). + *

Uncaptured PaymentIntents are cancelled a set number of days (7 by default) after their + * creation. * *

Learn more about separate * authorization and capture. @@ -755,8 +755,8 @@ public PaymentIntent capture(Map params, RequestOptions options) * Capture the funds of an existing uncaptured PaymentIntent when its status is {@code * requires_capture}. * - *

Uncaptured PaymentIntents will be canceled a set number of days after they are created (7 by - * default). + *

Uncaptured PaymentIntents are cancelled a set number of days (7 by default) after their + * creation. * *

Learn more about separate * authorization and capture. @@ -769,8 +769,8 @@ public PaymentIntent capture(PaymentIntentCaptureParams params) throws StripeExc * Capture the funds of an existing uncaptured PaymentIntent when its status is {@code * requires_capture}. * - *

Uncaptured PaymentIntents will be canceled a set number of days after they are created (7 by - * default). + *

Uncaptured PaymentIntents are cancelled a set number of days (7 by default) after their + * creation. * *

Learn more about separate * authorization and capture. diff --git a/src/main/java/com/stripe/param/PaymentIntentCancelParams.java b/src/main/java/com/stripe/param/PaymentIntentCancelParams.java index 74f52167c3e..daca3fa3ab8 100644 --- a/src/main/java/com/stripe/param/PaymentIntentCancelParams.java +++ b/src/main/java/com/stripe/param/PaymentIntentCancelParams.java @@ -12,7 +12,7 @@ @Getter public class PaymentIntentCancelParams extends ApiRequestParams { /** - * Reason for canceling this PaymentIntent. Possible values are {@code duplicate}, {@code + * Reason for canceling this PaymentIntent. Possible values are: {@code duplicate}, {@code * fraudulent}, {@code requested_by_customer}, or {@code abandoned} */ @SerializedName("cancellation_reason") @@ -55,7 +55,7 @@ public PaymentIntentCancelParams build() { } /** - * Reason for canceling this PaymentIntent. Possible values are {@code duplicate}, {@code + * Reason for canceling this PaymentIntent. Possible values are: {@code duplicate}, {@code * fraudulent}, {@code requested_by_customer}, or {@code abandoned} */ public Builder setCancellationReason( diff --git a/src/main/java/com/stripe/param/PaymentIntentCaptureParams.java b/src/main/java/com/stripe/param/PaymentIntentCaptureParams.java index 669217fb9e0..b7f5413ac0c 100644 --- a/src/main/java/com/stripe/param/PaymentIntentCaptureParams.java +++ b/src/main/java/com/stripe/param/PaymentIntentCaptureParams.java @@ -14,8 +14,8 @@ public class PaymentIntentCaptureParams extends ApiRequestParams { /** * The amount to capture from the PaymentIntent, which must be less than or equal to the original - * amount. Any additional amount will be automatically refunded. Defaults to the full {@code - * amount_capturable} if not provided. + * amount. Any additional amount is automatically refunded. Defaults to the full {@code + * amount_capturable} if it's not provided. */ @SerializedName("amount_to_capture") Long amountToCapture; @@ -66,14 +66,15 @@ public class PaymentIntentCaptureParams extends ApiRequestParams { /** * Provides information about a card payment that customers see on their statements. Concatenated * with the prefix (shortened descriptor) or statement descriptor that’s set on the account to - * form the complete statement descriptor. Maximum 22 characters for the concatenated descriptor. + * form the complete statement descriptor. The concatenated descriptor must be 1-22 characters + * long. */ @SerializedName("statement_descriptor_suffix") String statementDescriptorSuffix; /** - * The parameters used to automatically create a Transfer when the payment is captured. For more - * information, see the PaymentIntents use case for connected accounts. */ @SerializedName("transfer_data") @@ -139,8 +140,8 @@ public PaymentIntentCaptureParams build() { /** * The amount to capture from the PaymentIntent, which must be less than or equal to the - * original amount. Any additional amount will be automatically refunded. Defaults to the full - * {@code amount_capturable} if not provided. + * original amount. Any additional amount is automatically refunded. Defaults to the full {@code + * amount_capturable} if it's not provided. */ public Builder setAmountToCapture(Long amountToCapture) { this.amountToCapture = amountToCapture; @@ -285,8 +286,8 @@ public Builder setStatementDescriptor(String statementDescriptor) { /** * Provides information about a card payment that customers see on their statements. * Concatenated with the prefix (shortened descriptor) or statement descriptor that’s set on the - * account to form the complete statement descriptor. Maximum 22 characters for the concatenated - * descriptor. + * account to form the complete statement descriptor. The concatenated descriptor must be 1-22 + * characters long. */ public Builder setStatementDescriptorSuffix(String statementDescriptorSuffix) { this.statementDescriptorSuffix = statementDescriptorSuffix; @@ -294,8 +295,8 @@ public Builder setStatementDescriptorSuffix(String statementDescriptorSuffix) { } /** - * The parameters used to automatically create a Transfer when the payment is captured. For more - * information, see the PaymentIntents use case for connected * accounts. */ diff --git a/src/main/java/com/stripe/param/PaymentIntentListParams.java b/src/main/java/com/stripe/param/PaymentIntentListParams.java index 3b46deac77f..ec194bedc13 100644 --- a/src/main/java/com/stripe/param/PaymentIntentListParams.java +++ b/src/main/java/com/stripe/param/PaymentIntentListParams.java @@ -13,12 +13,12 @@ public class PaymentIntentListParams extends ApiRequestParams { /** * A filter on the list, based on the object {@code created} field. The value can be a string with - * an integer Unix timestamp, or it can be a dictionary with a number of different query options. + * an integer Unix timestamp or a dictionary with a number of different query options. */ @SerializedName("created") Object created; - /** Only return PaymentIntents for the customer specified by this customer ID. */ + /** Only return PaymentIntents for the customer that this customer ID specifies. */ @SerializedName("customer") String customer; @@ -110,8 +110,7 @@ public PaymentIntentListParams build() { /** * A filter on the list, based on the object {@code created} field. The value can be a string - * with an integer Unix timestamp, or it can be a dictionary with a number of different query - * options. + * with an integer Unix timestamp or a dictionary with a number of different query options. */ public Builder setCreated(PaymentIntentListParams.Created created) { this.created = created; @@ -120,15 +119,14 @@ public Builder setCreated(PaymentIntentListParams.Created created) { /** * A filter on the list, based on the object {@code created} field. The value can be a string - * with an integer Unix timestamp, or it can be a dictionary with a number of different query - * options. + * with an integer Unix timestamp or a dictionary with a number of different query options. */ public Builder setCreated(Long created) { this.created = created; return this; } - /** Only return PaymentIntents for the customer specified by this customer ID. */ + /** Only return PaymentIntents for the customer that this customer ID specifies. */ public Builder setCustomer(String customer) { this.customer = customer; return this; diff --git a/src/main/java/com/stripe/param/PaymentIntentRetrieveParams.java b/src/main/java/com/stripe/param/PaymentIntentRetrieveParams.java index 92cb9e799e4..e40828bcbcf 100644 --- a/src/main/java/com/stripe/param/PaymentIntentRetrieveParams.java +++ b/src/main/java/com/stripe/param/PaymentIntentRetrieveParams.java @@ -12,7 +12,7 @@ @Getter public class PaymentIntentRetrieveParams extends ApiRequestParams { /** - * The client secret of the PaymentIntent. It's required if you use a publishable key to retrieve + * The client secret of the PaymentIntent. We require it if you use a publishable key to retrieve * the source. */ @SerializedName("client_secret") @@ -55,7 +55,7 @@ public PaymentIntentRetrieveParams build() { } /** - * The client secret of the PaymentIntent. It's required if you use a publishable key to + * The client secret of the PaymentIntent. We require it if you use a publishable key to * retrieve the source. */ public Builder setClientSecret(String clientSecret) { diff --git a/src/main/java/com/stripe/service/PaymentIntentService.java b/src/main/java/com/stripe/service/PaymentIntentService.java index 9314e1b1e4c..43b109ae854 100644 --- a/src/main/java/com/stripe/service/PaymentIntentService.java +++ b/src/main/java/com/stripe/service/PaymentIntentService.java @@ -369,16 +369,16 @@ public PaymentIntent confirm( ApiMode.V1); } /** - * A PaymentIntent object can be canceled when it is in one of these statuses: {@code + * You can cancel a PaymentIntent object when it’s in one of these statuses: {@code * requires_payment_method}, {@code requires_capture}, {@code requires_confirmation}, {@code * requires_action} or, in rare cases, * {@code processing}. * - *

Once canceled, no additional charges will be made by the PaymentIntent and any operations on - * the PaymentIntent will fail with an error. For PaymentIntents with a {@code status} of {@code - * requires_capture}, the remaining {@code amount_capturable} will automatically be refunded. + *

After it’s canceled, no additional charges are made by the PaymentIntent and any operations + * on the PaymentIntent fail with an error. For PaymentIntents with a {@code status} of {@code + * requires_capture}, the remaining {@code amount_capturable} is automatically refunded. * - *

You cannot cancel the PaymentIntent for a Checkout Session. You can’t cancel the PaymentIntent for a Checkout Session. Expire the Checkout Session * instead. */ @@ -387,16 +387,16 @@ public PaymentIntent cancel(String intent, PaymentIntentCancelParams params) return cancel(intent, params, (RequestOptions) null); } /** - * A PaymentIntent object can be canceled when it is in one of these statuses: {@code + * You can cancel a PaymentIntent object when it’s in one of these statuses: {@code * requires_payment_method}, {@code requires_capture}, {@code requires_confirmation}, {@code * requires_action} or, in rare cases, * {@code processing}. * - *

Once canceled, no additional charges will be made by the PaymentIntent and any operations on - * the PaymentIntent will fail with an error. For PaymentIntents with a {@code status} of {@code - * requires_capture}, the remaining {@code amount_capturable} will automatically be refunded. + *

After it’s canceled, no additional charges are made by the PaymentIntent and any operations + * on the PaymentIntent fail with an error. For PaymentIntents with a {@code status} of {@code + * requires_capture}, the remaining {@code amount_capturable} is automatically refunded. * - *

You cannot cancel the PaymentIntent for a Checkout Session. You can’t cancel the PaymentIntent for a Checkout Session. Expire the Checkout Session * instead. */ @@ -404,16 +404,16 @@ public PaymentIntent cancel(String intent, RequestOptions options) throws Stripe return cancel(intent, (PaymentIntentCancelParams) null, options); } /** - * A PaymentIntent object can be canceled when it is in one of these statuses: {@code + * You can cancel a PaymentIntent object when it’s in one of these statuses: {@code * requires_payment_method}, {@code requires_capture}, {@code requires_confirmation}, {@code * requires_action} or, in rare cases, * {@code processing}. * - *

Once canceled, no additional charges will be made by the PaymentIntent and any operations on - * the PaymentIntent will fail with an error. For PaymentIntents with a {@code status} of {@code - * requires_capture}, the remaining {@code amount_capturable} will automatically be refunded. + *

After it’s canceled, no additional charges are made by the PaymentIntent and any operations + * on the PaymentIntent fail with an error. For PaymentIntents with a {@code status} of {@code + * requires_capture}, the remaining {@code amount_capturable} is automatically refunded. * - *

You cannot cancel the PaymentIntent for a Checkout Session. You can’t cancel the PaymentIntent for a Checkout Session. Expire the Checkout Session * instead. */ @@ -421,16 +421,16 @@ public PaymentIntent cancel(String intent) throws StripeException { return cancel(intent, (PaymentIntentCancelParams) null, (RequestOptions) null); } /** - * A PaymentIntent object can be canceled when it is in one of these statuses: {@code + * You can cancel a PaymentIntent object when it’s in one of these statuses: {@code * requires_payment_method}, {@code requires_capture}, {@code requires_confirmation}, {@code * requires_action} or, in rare cases, * {@code processing}. * - *

Once canceled, no additional charges will be made by the PaymentIntent and any operations on - * the PaymentIntent will fail with an error. For PaymentIntents with a {@code status} of {@code - * requires_capture}, the remaining {@code amount_capturable} will automatically be refunded. + *

After it’s canceled, no additional charges are made by the PaymentIntent and any operations + * on the PaymentIntent fail with an error. For PaymentIntents with a {@code status} of {@code + * requires_capture}, the remaining {@code amount_capturable} is automatically refunded. * - *

You cannot cancel the PaymentIntent for a Checkout Session. You can’t cancel the PaymentIntent for a Checkout Session. Expire the Checkout Session * instead. */ @@ -452,8 +452,8 @@ public PaymentIntent cancel( * Capture the funds of an existing uncaptured PaymentIntent when its status is {@code * requires_capture}. * - *

Uncaptured PaymentIntents will be canceled a set number of days after they are created (7 by - * default). + *

Uncaptured PaymentIntents are cancelled a set number of days (7 by default) after their + * creation. * *

Learn more about separate * authorization and capture. @@ -466,8 +466,8 @@ public PaymentIntent capture(String intent, PaymentIntentCaptureParams params) * Capture the funds of an existing uncaptured PaymentIntent when its status is {@code * requires_capture}. * - *

Uncaptured PaymentIntents will be canceled a set number of days after they are created (7 by - * default). + *

Uncaptured PaymentIntents are cancelled a set number of days (7 by default) after their + * creation. * *

Learn more about separate * authorization and capture. @@ -479,8 +479,8 @@ public PaymentIntent capture(String intent, RequestOptions options) throws Strip * Capture the funds of an existing uncaptured PaymentIntent when its status is {@code * requires_capture}. * - *

Uncaptured PaymentIntents will be canceled a set number of days after they are created (7 by - * default). + *

Uncaptured PaymentIntents are cancelled a set number of days (7 by default) after their + * creation. * *

Learn more about separate * authorization and capture. @@ -492,8 +492,8 @@ public PaymentIntent capture(String intent) throws StripeException { * Capture the funds of an existing uncaptured PaymentIntent when its status is {@code * requires_capture}. * - *

Uncaptured PaymentIntents will be canceled a set number of days after they are created (7 by - * default). + *

Uncaptured PaymentIntents are cancelled a set number of days (7 by default) after their + * creation. * *

Learn more about separate * authorization and capture. From 508d990d13028242512066c219c7b42bf8a50e1d Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Thu, 28 Sep 2023 16:20:42 +0000 Subject: [PATCH 22/25] Update generated code for v565 --- OPENAPI_VERSION | 2 +- .../java/com/stripe/model/CustomerCashBalanceTransaction.java | 4 ++-- src/main/java/com/stripe/model/billingportal/Session.java | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index d2d999515a4..078614f5b98 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v563 \ No newline at end of file +v565 \ No newline at end of file diff --git a/src/main/java/com/stripe/model/CustomerCashBalanceTransaction.java b/src/main/java/com/stripe/model/CustomerCashBalanceTransaction.java index 61279eec81e..4f01279f6c2 100644 --- a/src/main/java/com/stripe/model/CustomerCashBalanceTransaction.java +++ b/src/main/java/com/stripe/model/CustomerCashBalanceTransaction.java @@ -122,8 +122,8 @@ public void setCustomerObject(Customer expandableObject) { @EqualsAndHashCode(callSuper = false) public static class AdjustedForOverdraft extends StripeObject { /** - * The Balance Transaction that corresponds - * to funds taken out of your Stripe balance. + * The Balance Transaction + * that corresponds to funds taken out of your Stripe balance. */ @SerializedName("balance_transaction") @Getter(lombok.AccessLevel.NONE) diff --git a/src/main/java/com/stripe/model/billingportal/Session.java b/src/main/java/com/stripe/model/billingportal/Session.java index 2f01e16565f..a3380efa41f 100644 --- a/src/main/java/com/stripe/model/billingportal/Session.java +++ b/src/main/java/com/stripe/model/billingportal/Session.java @@ -347,7 +347,7 @@ public static class Item extends StripeObject implements HasId { /** * The price the customer should subscribe to through this flow. The price must also be * included in the configuration's {@code + * href="https://stripe.com/docs/api/customer_portal/configuration#portal_configuration_object-features-subscription_update-products">{@code * features.subscription_update.products}. */ @SerializedName("price") From 47fb15587b6d6787f57d0c22ba00a608f233855e Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Thu, 28 Sep 2023 19:27:24 +0000 Subject: [PATCH 23/25] Update generated code for v566 --- OPENAPI_VERSION | 2 +- .../java/com/stripe/model/AccountSession.java | 60 +++ .../param/AccountSessionCreateParams.java | 430 +++++++++++++++++- 3 files changed, 483 insertions(+), 9 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 078614f5b98..402f7c903b2 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v565 \ No newline at end of file +v566 \ No newline at end of file diff --git a/src/main/java/com/stripe/model/AccountSession.java b/src/main/java/com/stripe/model/AccountSession.java index 152b4e53841..e27f660b4c3 100644 --- a/src/main/java/com/stripe/model/AccountSession.java +++ b/src/main/java/com/stripe/model/AccountSession.java @@ -157,6 +157,32 @@ public static class PaymentDetails extends StripeObject { /** Whether the embedded component is enabled. */ @SerializedName("enabled") Boolean enabled; + + @SerializedName("features") + Features features; + + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Features extends StripeObject { + /** + * Whether to allow capturing and cancelling payment intents. This is {@code true} by + * default. + */ + @SerializedName("capture_payments") + Boolean capturePayments; + + /** + * Whether to allow responding to disputes, including submitting evidence and accepting + * disputes. This is {@code true} by default. + */ + @SerializedName("dispute_management") + Boolean disputeManagement; + + /** Whether to allow sending refunds. This is {@code true} by default. */ + @SerializedName("refund_management") + Boolean refundManagement; + } } @Getter @@ -166,6 +192,32 @@ public static class Payments extends StripeObject { /** Whether the embedded component is enabled. */ @SerializedName("enabled") Boolean enabled; + + @SerializedName("features") + Features features; + + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Features extends StripeObject { + /** + * Whether to allow capturing and cancelling payment intents. This is {@code true} by + * default. + */ + @SerializedName("capture_payments") + Boolean capturePayments; + + /** + * Whether to allow responding to disputes, including submitting evidence and accepting + * disputes. This is {@code true} by default. + */ + @SerializedName("dispute_management") + Boolean disputeManagement; + + /** Whether to allow sending refunds. This is {@code true} by default. */ + @SerializedName("refund_management") + Boolean refundManagement; + } } @Getter @@ -175,6 +227,14 @@ public static class Payouts extends StripeObject { /** Whether the embedded component is enabled. */ @SerializedName("enabled") Boolean enabled; + + @SerializedName("features") + Features features; + + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Features extends StripeObject {} } } diff --git a/src/main/java/com/stripe/param/AccountSessionCreateParams.java b/src/main/java/com/stripe/param/AccountSessionCreateParams.java index 4bf9e08a424..70e29c045da 100644 --- a/src/main/java/com/stripe/param/AccountSessionCreateParams.java +++ b/src/main/java/com/stripe/param/AccountSessionCreateParams.java @@ -265,9 +265,15 @@ public static class AccountOnboarding { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - private AccountOnboarding(Boolean enabled, Map extraParams) { + /** The list of features enabled in the embedded component. */ + @SerializedName("features") + Features features; + + private AccountOnboarding( + Boolean enabled, Map extraParams, Features features) { this.enabled = enabled; this.extraParams = extraParams; + this.features = features; } public static Builder builder() { @@ -279,10 +285,12 @@ public static class Builder { private Map extraParams; + private Features features; + /** Finalize and obtain parameter instance from this builder. */ public AccountSessionCreateParams.Components.AccountOnboarding build() { return new AccountSessionCreateParams.Components.AccountOnboarding( - this.enabled, this.extraParams); + this.enabled, this.extraParams, this.features); } /** Required. Whether the embedded component is enabled. */ @@ -318,6 +326,74 @@ public Builder putAllExtraParam(Map map) { this.extraParams.putAll(map); return this; } + + /** The list of features enabled in the embedded component. */ + public Builder setFeatures( + AccountSessionCreateParams.Components.AccountOnboarding.Features features) { + this.features = features; + return this; + } + } + + @Getter + public static class Features { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + private Features(Map extraParams) { + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountSessionCreateParams.Components.AccountOnboarding.Features build() { + return new AccountSessionCreateParams.Components.AccountOnboarding.Features( + this.extraParams); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * AccountSessionCreateParams.Components.AccountOnboarding.Features#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * AccountSessionCreateParams.Components.AccountOnboarding.Features#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } } } @@ -336,9 +412,14 @@ public static class PaymentDetails { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - private PaymentDetails(Boolean enabled, Map extraParams) { + /** The list of features enabled in the embedded component. */ + @SerializedName("features") + Features features; + + private PaymentDetails(Boolean enabled, Map extraParams, Features features) { this.enabled = enabled; this.extraParams = extraParams; + this.features = features; } public static Builder builder() { @@ -350,10 +431,12 @@ public static class Builder { private Map extraParams; + private Features features; + /** Finalize and obtain parameter instance from this builder. */ public AccountSessionCreateParams.Components.PaymentDetails build() { return new AccountSessionCreateParams.Components.PaymentDetails( - this.enabled, this.extraParams); + this.enabled, this.extraParams, this.features); } /** Required. Whether the embedded component is enabled. */ @@ -389,6 +472,132 @@ public Builder putAllExtraParam(Map map) { this.extraParams.putAll(map); return this; } + + /** The list of features enabled in the embedded component. */ + public Builder setFeatures( + AccountSessionCreateParams.Components.PaymentDetails.Features features) { + this.features = features; + return this; + } + } + + @Getter + public static class Features { + /** + * Whether to allow capturing and cancelling payment intents. This is {@code true} by + * default. + */ + @SerializedName("capture_payments") + Boolean capturePayments; + + /** + * Whether to allow responding to disputes, including submitting evidence and accepting + * disputes. This is {@code true} by default. + */ + @SerializedName("dispute_management") + Boolean disputeManagement; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Whether to allow sending refunds. This is {@code true} by default. */ + @SerializedName("refund_management") + Boolean refundManagement; + + private Features( + Boolean capturePayments, + Boolean disputeManagement, + Map extraParams, + Boolean refundManagement) { + this.capturePayments = capturePayments; + this.disputeManagement = disputeManagement; + this.extraParams = extraParams; + this.refundManagement = refundManagement; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Boolean capturePayments; + + private Boolean disputeManagement; + + private Map extraParams; + + private Boolean refundManagement; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountSessionCreateParams.Components.PaymentDetails.Features build() { + return new AccountSessionCreateParams.Components.PaymentDetails.Features( + this.capturePayments, + this.disputeManagement, + this.extraParams, + this.refundManagement); + } + + /** + * Whether to allow capturing and cancelling payment intents. This is {@code true} by + * default. + */ + public Builder setCapturePayments(Boolean capturePayments) { + this.capturePayments = capturePayments; + return this; + } + + /** + * Whether to allow responding to disputes, including submitting evidence and accepting + * disputes. This is {@code true} by default. + */ + public Builder setDisputeManagement(Boolean disputeManagement) { + this.disputeManagement = disputeManagement; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * AccountSessionCreateParams.Components.PaymentDetails.Features#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * AccountSessionCreateParams.Components.PaymentDetails.Features#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Whether to allow sending refunds. This is {@code true} by default. */ + public Builder setRefundManagement(Boolean refundManagement) { + this.refundManagement = refundManagement; + return this; + } + } } } @@ -407,9 +616,14 @@ public static class Payments { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - private Payments(Boolean enabled, Map extraParams) { + /** The list of features enabled in the embedded component. */ + @SerializedName("features") + Features features; + + private Payments(Boolean enabled, Map extraParams, Features features) { this.enabled = enabled; this.extraParams = extraParams; + this.features = features; } public static Builder builder() { @@ -421,9 +635,12 @@ public static class Builder { private Map extraParams; + private Features features; + /** Finalize and obtain parameter instance from this builder. */ public AccountSessionCreateParams.Components.Payments build() { - return new AccountSessionCreateParams.Components.Payments(this.enabled, this.extraParams); + return new AccountSessionCreateParams.Components.Payments( + this.enabled, this.extraParams, this.features); } /** Required. Whether the embedded component is enabled. */ @@ -459,6 +676,130 @@ public Builder putAllExtraParam(Map map) { this.extraParams.putAll(map); return this; } + + /** The list of features enabled in the embedded component. */ + public Builder setFeatures( + AccountSessionCreateParams.Components.Payments.Features features) { + this.features = features; + return this; + } + } + + @Getter + public static class Features { + /** + * Whether to allow capturing and cancelling payment intents. This is {@code true} by + * default. + */ + @SerializedName("capture_payments") + Boolean capturePayments; + + /** + * Whether to allow responding to disputes, including submitting evidence and accepting + * disputes. This is {@code true} by default. + */ + @SerializedName("dispute_management") + Boolean disputeManagement; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Whether to allow sending refunds. This is {@code true} by default. */ + @SerializedName("refund_management") + Boolean refundManagement; + + private Features( + Boolean capturePayments, + Boolean disputeManagement, + Map extraParams, + Boolean refundManagement) { + this.capturePayments = capturePayments; + this.disputeManagement = disputeManagement; + this.extraParams = extraParams; + this.refundManagement = refundManagement; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Boolean capturePayments; + + private Boolean disputeManagement; + + private Map extraParams; + + private Boolean refundManagement; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountSessionCreateParams.Components.Payments.Features build() { + return new AccountSessionCreateParams.Components.Payments.Features( + this.capturePayments, + this.disputeManagement, + this.extraParams, + this.refundManagement); + } + + /** + * Whether to allow capturing and cancelling payment intents. This is {@code true} by + * default. + */ + public Builder setCapturePayments(Boolean capturePayments) { + this.capturePayments = capturePayments; + return this; + } + + /** + * Whether to allow responding to disputes, including submitting evidence and accepting + * disputes. This is {@code true} by default. + */ + public Builder setDisputeManagement(Boolean disputeManagement) { + this.disputeManagement = disputeManagement; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AccountSessionCreateParams.Components.Payments.Features#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AccountSessionCreateParams.Components.Payments.Features#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Whether to allow sending refunds. This is {@code true} by default. */ + public Builder setRefundManagement(Boolean refundManagement) { + this.refundManagement = refundManagement; + return this; + } + } } } @@ -477,9 +818,14 @@ public static class Payouts { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - private Payouts(Boolean enabled, Map extraParams) { + /** The list of features enabled in the embedded component. */ + @SerializedName("features") + Features features; + + private Payouts(Boolean enabled, Map extraParams, Features features) { this.enabled = enabled; this.extraParams = extraParams; + this.features = features; } public static Builder builder() { @@ -491,9 +837,12 @@ public static class Builder { private Map extraParams; + private Features features; + /** Finalize and obtain parameter instance from this builder. */ public AccountSessionCreateParams.Components.Payouts build() { - return new AccountSessionCreateParams.Components.Payouts(this.enabled, this.extraParams); + return new AccountSessionCreateParams.Components.Payouts( + this.enabled, this.extraParams, this.features); } /** Required. Whether the embedded component is enabled. */ @@ -529,6 +878,71 @@ public Builder putAllExtraParam(Map map) { this.extraParams.putAll(map); return this; } + + /** The list of features enabled in the embedded component. */ + public Builder setFeatures( + AccountSessionCreateParams.Components.Payouts.Features features) { + this.features = features; + return this; + } + } + + @Getter + public static class Features { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + private Features(Map extraParams) { + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountSessionCreateParams.Components.Payouts.Features build() { + return new AccountSessionCreateParams.Components.Payouts.Features(this.extraParams); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AccountSessionCreateParams.Components.Payouts.Features#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AccountSessionCreateParams.Components.Payouts.Features#extraParams} for + * the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } } } } From 3d86b1810c35d97122a3874ca564208ded6f4293 Mon Sep 17 00:00:00 2001 From: "stripe-openapi[bot]" <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Thu, 28 Sep 2023 15:57:21 -0700 Subject: [PATCH 24/25] Update generated code (#1657) * Update generated code for v546 * Update generated code for v548 * Update generated code for v549 * Update generated code for v550 * Update generated code for v550 * Update generated code for v551 * Update generated code for v552 * Update generated code for v554 * Update generated code for v557 * Update generated code for v557 * Update generated code for v560 * Update generated code for v561 * Update generated code for v562 * Update generated code for v563 * Update generated code for v565 --------- Co-authored-by: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> --- OPENAPI_VERSION | 2 +- .../model/CustomerCashBalanceTransaction.java | 4 +- src/main/java/com/stripe/model/Event.java | 38 +-- src/main/java/com/stripe/model/Invoice.java | 40 ++- src/main/java/com/stripe/model/Mandate.java | 29 +- .../java/com/stripe/model/PaymentIntent.java | 230 ++++++++-------- src/main/java/com/stripe/model/Payout.java | 260 +++++++++--------- src/main/java/com/stripe/model/Refund.java | 167 +++++++---- .../java/com/stripe/model/SetupAttempt.java | 12 +- .../stripe/model/billingportal/Session.java | 2 +- .../stripe/model/treasury/ReceivedCredit.java | 6 +- .../com/stripe/param/InvoiceCreateParams.java | 249 ++++++++++++++++- .../com/stripe/param/InvoiceUpdateParams.java | 249 ++++++++++++++++- ...ymentIntentApplyCustomerBalanceParams.java | 18 +- .../param/PaymentIntentCancelParams.java | 4 +- .../param/PaymentIntentCaptureParams.java | 23 +- .../param/PaymentIntentConfirmParams.java | 57 ++-- .../param/PaymentIntentCreateParams.java | 165 ++++++----- ...entIntentIncrementAuthorizationParams.java | 19 +- .../stripe/param/PaymentIntentListParams.java | 12 +- .../param/PaymentIntentRetrieveParams.java | 4 +- .../param/PaymentIntentUpdateParams.java | 21 +- .../param/PaymentSourceVerifyParams.java | 135 +++++++++ .../com/stripe/param/PayoutCreateParams.java | 44 +-- .../com/stripe/param/RefundCreateParams.java | 46 +++- .../stripe/param/SetupAttemptListParams.java | 8 +- .../param/WebhookEndpointCreateParams.java | 44 +-- .../param/WebhookEndpointUpdateParams.java | 44 +-- .../stripe/service/PaymentIntentService.java | 116 ++++---- .../stripe/service/PaymentSourceService.java | 34 +++ .../com/stripe/service/PayoutService.java | 144 +++++----- .../com/stripe/service/RefundService.java | 116 +++++--- .../stripe/service/SetupAttemptService.java | 4 +- .../stripe/functional/GeneratedExamples.java | 36 ++- 34 files changed, 1611 insertions(+), 771 deletions(-) create mode 100644 src/main/java/com/stripe/param/PaymentSourceVerifyParams.java diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 688708d739b..078614f5b98 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v545 \ No newline at end of file +v565 \ No newline at end of file diff --git a/src/main/java/com/stripe/model/CustomerCashBalanceTransaction.java b/src/main/java/com/stripe/model/CustomerCashBalanceTransaction.java index 61279eec81e..4f01279f6c2 100644 --- a/src/main/java/com/stripe/model/CustomerCashBalanceTransaction.java +++ b/src/main/java/com/stripe/model/CustomerCashBalanceTransaction.java @@ -122,8 +122,8 @@ public void setCustomerObject(Customer expandableObject) { @EqualsAndHashCode(callSuper = false) public static class AdjustedForOverdraft extends StripeObject { /** - * The Balance Transaction that corresponds - * to funds taken out of your Stripe balance. + * The Balance Transaction + * that corresponds to funds taken out of your Stripe balance. */ @SerializedName("balance_transaction") @Getter(lombok.AccessLevel.NONE) diff --git a/src/main/java/com/stripe/model/Event.java b/src/main/java/com/stripe/model/Event.java index cb40fb08671..f9e8205063c 100644 --- a/src/main/java/com/stripe/model/Event.java +++ b/src/main/java/com/stripe/model/Event.java @@ -144,7 +144,7 @@ public class Event extends ApiResource implements HasId { * issuing_cardholder.updated}, {@code issuing_dispute.closed}, {@code issuing_dispute.created}, * {@code issuing_dispute.funds_reinstated}, {@code issuing_dispute.submitted}, {@code * issuing_dispute.updated}, {@code issuing_transaction.created}, {@code - * issuing_transaction.updated}, {@code mandate.updated}, {@code order.created}, {@code + * issuing_transaction.updated}, {@code mandate.updated}, {@code * payment_intent.amount_capturable_updated}, {@code payment_intent.canceled}, {@code * payment_intent.created}, {@code payment_intent.partially_funded}, {@code * payment_intent.payment_failed}, {@code payment_intent.processing}, {@code @@ -159,27 +159,25 @@ public class Event extends ApiResource implements HasId { * product.updated}, {@code promotion_code.created}, {@code promotion_code.updated}, {@code * quote.accepted}, {@code quote.canceled}, {@code quote.created}, {@code quote.finalized}, {@code * radar.early_fraud_warning.created}, {@code radar.early_fraud_warning.updated}, {@code - * recipient.created}, {@code recipient.deleted}, {@code recipient.updated}, {@code * refund.created}, {@code refund.updated}, {@code reporting.report_run.failed}, {@code * reporting.report_run.succeeded}, {@code reporting.report_type.updated}, {@code review.closed}, * {@code review.opened}, {@code setup_intent.canceled}, {@code setup_intent.created}, {@code * setup_intent.requires_action}, {@code setup_intent.setup_failed}, {@code - * setup_intent.succeeded}, {@code sigma.scheduled_query_run.created}, {@code sku.created}, {@code - * sku.deleted}, {@code sku.updated}, {@code source.canceled}, {@code source.chargeable}, {@code - * source.failed}, {@code source.mandate_notification}, {@code source.refund_attributes_required}, - * {@code source.transaction.created}, {@code source.transaction.updated}, {@code - * subscription_schedule.aborted}, {@code subscription_schedule.canceled}, {@code - * subscription_schedule.completed}, {@code subscription_schedule.created}, {@code - * subscription_schedule.expiring}, {@code subscription_schedule.released}, {@code - * subscription_schedule.updated}, {@code tax.settings.updated}, {@code tax_rate.created}, {@code - * tax_rate.updated}, {@code terminal.reader.action_failed}, {@code - * terminal.reader.action_succeeded}, {@code test_helpers.test_clock.advancing}, {@code - * test_helpers.test_clock.created}, {@code test_helpers.test_clock.deleted}, {@code - * test_helpers.test_clock.internal_failure}, {@code test_helpers.test_clock.ready}, {@code - * topup.canceled}, {@code topup.created}, {@code topup.failed}, {@code topup.reversed}, {@code - * topup.succeeded}, {@code transfer.created}, {@code transfer.reversed}, {@code - * transfer.updated}, {@code treasury.credit_reversal.created}, {@code - * treasury.credit_reversal.posted}, {@code treasury.debit_reversal.completed}, {@code + * setup_intent.succeeded}, {@code sigma.scheduled_query_run.created}, {@code source.canceled}, + * {@code source.chargeable}, {@code source.failed}, {@code source.mandate_notification}, {@code + * source.refund_attributes_required}, {@code source.transaction.created}, {@code + * source.transaction.updated}, {@code subscription_schedule.aborted}, {@code + * subscription_schedule.canceled}, {@code subscription_schedule.completed}, {@code + * subscription_schedule.created}, {@code subscription_schedule.expiring}, {@code + * subscription_schedule.released}, {@code subscription_schedule.updated}, {@code + * tax.settings.updated}, {@code tax_rate.created}, {@code tax_rate.updated}, {@code + * terminal.reader.action_failed}, {@code terminal.reader.action_succeeded}, {@code + * test_helpers.test_clock.advancing}, {@code test_helpers.test_clock.created}, {@code + * test_helpers.test_clock.deleted}, {@code test_helpers.test_clock.internal_failure}, {@code + * test_helpers.test_clock.ready}, {@code topup.canceled}, {@code topup.created}, {@code + * topup.failed}, {@code topup.reversed}, {@code topup.succeeded}, {@code transfer.created}, + * {@code transfer.reversed}, {@code transfer.updated}, {@code treasury.credit_reversal.created}, + * {@code treasury.credit_reversal.posted}, {@code treasury.debit_reversal.completed}, {@code * treasury.debit_reversal.created}, {@code treasury.debit_reversal.initial_credit_granted}, * {@code treasury.financial_account.closed}, {@code treasury.financial_account.created}, {@code * treasury.financial_account.features_status_updated}, {@code @@ -194,7 +192,9 @@ public class Event extends ApiResource implements HasId { * treasury.outbound_transfer.failed}, {@code treasury.outbound_transfer.posted}, {@code * treasury.outbound_transfer.returned}, {@code treasury.received_credit.created}, {@code * treasury.received_credit.failed}, {@code treasury.received_credit.succeeded}, {@code - * treasury.received_debit.created}, or {@code invoiceitem.updated}. + * treasury.received_debit.created}, {@code invoiceitem.updated}, {@code order.created}, {@code + * recipient.created}, {@code recipient.deleted}, {@code recipient.updated}, {@code sku.created}, + * {@code sku.deleted}, or {@code sku.updated}. */ @SerializedName("type") String type; diff --git a/src/main/java/com/stripe/model/Invoice.java b/src/main/java/com/stripe/model/Invoice.java index 6660f24c446..fc250b239bd 100644 --- a/src/main/java/com/stripe/model/Invoice.java +++ b/src/main/java/com/stripe/model/Invoice.java @@ -487,7 +487,17 @@ public class Invoice extends ApiResource implements HasId, MetadataStoreOne of {@code a4}, {@code auto}, or {@code letter}. + */ + @SerializedName("page_size") + String pageSize; + } + } + @Getter @Setter @EqualsAndHashCode(callSuper = false) @@ -2478,6 +2515,7 @@ public void setResponseGetter(StripeResponseGetter responseGetter) { trySetResponseGetter(paymentIntent, responseGetter); trySetResponseGetter(paymentSettings, responseGetter); trySetResponseGetter(quote, responseGetter); + trySetResponseGetter(rendering, responseGetter); trySetResponseGetter(renderingOptions, responseGetter); trySetResponseGetter(shippingCost, responseGetter); trySetResponseGetter(shippingDetails, responseGetter); diff --git a/src/main/java/com/stripe/model/Mandate.java b/src/main/java/com/stripe/model/Mandate.java index c27c65a5424..b0a080798a5 100644 --- a/src/main/java/com/stripe/model/Mandate.java +++ b/src/main/java/com/stripe/model/Mandate.java @@ -17,7 +17,8 @@ import lombok.Setter; /** - * A Mandate is a record of the permission a customer has given you to debit their payment method. + * A Mandate is a record of the permission that your customer gives you to debit their payment + * method. */ @Getter @Setter @@ -49,7 +50,7 @@ public class Mandate extends ApiResource implements HasId { @SerializedName("object") String object; - /** The account (if any) for which the mandate is intended. */ + /** The account (if any) that the mandate is intended for. */ @SerializedName("on_behalf_of") String onBehalfOf; @@ -66,7 +67,7 @@ public class Mandate extends ApiResource implements HasId { SingleUse singleUse; /** - * The status of the mandate, which indicates whether it can be used to initiate a payment. + * The mandate status indicates whether or not you can use it to initiate a payment. * *

One of {@code active}, {@code inactive}, or {@code pending}. */ @@ -145,7 +146,7 @@ public static Mandate retrieve( @Setter @EqualsAndHashCode(callSuper = false) public static class CustomerAcceptance extends StripeObject { - /** The time at which the customer accepted the Mandate. */ + /** The time that the customer accepts the mandate. */ @SerializedName("accepted_at") Long acceptedAt; @@ -156,8 +157,10 @@ public static class CustomerAcceptance extends StripeObject { Online online; /** - * The type of customer acceptance information included with the Mandate. One of {@code online} - * or {@code offline}. + * The mandate includes the type of customer acceptance information, such as: {@code online} or + * {@code offline}. + * + *

One of {@code offline}, or {@code online}. */ @SerializedName("type") String type; @@ -171,11 +174,11 @@ public static class Offline extends StripeObject {} @Setter @EqualsAndHashCode(callSuper = false) public static class Online extends StripeObject { - /** The IP address from which the Mandate was accepted by the customer. */ + /** The customer accepts the mandate from this IP address. */ @SerializedName("ip_address") String ipAddress; - /** The user agent of the browser from which the Mandate was accepted by the customer. */ + /** The customer accepts the mandate using the user agent of the browser. */ @SerializedName("user_agent") String userAgent; } @@ -215,9 +218,9 @@ public static class PaymentMethodDetails extends StripeObject { SepaDebit sepaDebit; /** - * The type of the payment method associated with this mandate. An additional hash is included - * on {@code payment_method_details} with a name matching this value. It contains mandate - * information specific to the payment method. + * This mandate corresponds with a specific payment method type. The {@code + * payment_method_details} includes an additional hash with the same name and contains mandate + * information that's specific to that payment method. */ @SerializedName("type") String type; @@ -346,11 +349,11 @@ public static class UsBankAccount extends StripeObject {} @Setter @EqualsAndHashCode(callSuper = false) public static class SingleUse extends StripeObject { - /** On a single use mandate, the amount of the payment. */ + /** The amount of the payment on a single use mandate. */ @SerializedName("amount") Long amount; - /** On a single use mandate, the currency of the payment. */ + /** The currency of the payment on a single use mandate. */ @SerializedName("currency") String currency; } diff --git a/src/main/java/com/stripe/model/PaymentIntent.java b/src/main/java/com/stripe/model/PaymentIntent.java index 1f643eacd94..c2447fff7f1 100644 --- a/src/main/java/com/stripe/model/PaymentIntent.java +++ b/src/main/java/com/stripe/model/PaymentIntent.java @@ -63,7 +63,7 @@ public class PaymentIntent extends ApiResource implements HasId, MetadataStore

key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a - * structured format. For more information, see the documentation. + * structured format. Learn more about storing + * information in metadata. */ @Getter(onMethod_ = {@Override}) @SerializedName("metadata") @@ -323,17 +324,17 @@ public class PaymentIntent extends ApiResource implements HasId, MetadataStore

use case for - * connected accounts for details. + * The data that automatically creates a Transfer after the payment finalizes. Learn more about + * the use case for connected + * accounts. */ @SerializedName("transfer_data") TransferData transferData; /** - * A string that identifies the resulting payment as part of a group. See the PaymentIntents use case for connected - * accounts for details. + * accounts. */ @SerializedName("transfer_group") String transferGroup; @@ -483,22 +484,22 @@ public void setSourceObject(PaymentSource expandableObject) { this.source = new ExpandableField(expandableObject.getId(), expandableObject); } - /** Manually reconcile the remaining amount for a customer_balance PaymentIntent. */ + /** Manually reconcile the remaining amount for a {@code customer_balance} PaymentIntent. */ public PaymentIntent applyCustomerBalance() throws StripeException { return applyCustomerBalance((Map) null, (RequestOptions) null); } - /** Manually reconcile the remaining amount for a customer_balance PaymentIntent. */ + /** Manually reconcile the remaining amount for a {@code customer_balance} PaymentIntent. */ public PaymentIntent applyCustomerBalance(RequestOptions options) throws StripeException { return applyCustomerBalance((Map) null, options); } - /** Manually reconcile the remaining amount for a customer_balance PaymentIntent. */ + /** Manually reconcile the remaining amount for a {@code customer_balance} PaymentIntent. */ public PaymentIntent applyCustomerBalance(Map params) throws StripeException { return applyCustomerBalance(params, (RequestOptions) null); } - /** Manually reconcile the remaining amount for a customer_balance PaymentIntent. */ + /** Manually reconcile the remaining amount for a {@code customer_balance} PaymentIntent. */ public PaymentIntent applyCustomerBalance(Map params, RequestOptions options) throws StripeException { String path = @@ -515,13 +516,13 @@ public PaymentIntent applyCustomerBalance(Map params, RequestOpt ApiMode.V1); } - /** Manually reconcile the remaining amount for a customer_balance PaymentIntent. */ + /** Manually reconcile the remaining amount for a {@code customer_balance} PaymentIntent. */ public PaymentIntent applyCustomerBalance(PaymentIntentApplyCustomerBalanceParams params) throws StripeException { return applyCustomerBalance(params, (RequestOptions) null); } - /** Manually reconcile the remaining amount for a customer_balance PaymentIntent. */ + /** Manually reconcile the remaining amount for a {@code customer_balance} PaymentIntent. */ public PaymentIntent applyCustomerBalance( PaymentIntentApplyCustomerBalanceParams params, RequestOptions options) throws StripeException { @@ -541,16 +542,16 @@ public PaymentIntent applyCustomerBalance( } /** - * A PaymentIntent object can be canceled when it is in one of these statuses: {@code + * You can cancel a PaymentIntent object when it’s in one of these statuses: {@code * requires_payment_method}, {@code requires_capture}, {@code requires_confirmation}, {@code * requires_action} or, in rare cases, * {@code processing}. * - *

Once canceled, no additional charges will be made by the PaymentIntent and any operations on - * the PaymentIntent will fail with an error. For PaymentIntents with a {@code status} of {@code - * requires_capture}, the remaining {@code amount_capturable} will automatically be refunded. + *

After it’s canceled, no additional charges are made by the PaymentIntent and any operations + * on the PaymentIntent fail with an error. For PaymentIntents with a {@code status} of {@code + * requires_capture}, the remaining {@code amount_capturable} is automatically refunded. * - *

You cannot cancel the PaymentIntent for a Checkout Session. You can’t cancel the PaymentIntent for a Checkout Session. Expire the Checkout Session * instead. */ @@ -559,16 +560,16 @@ public PaymentIntent cancel() throws StripeException { } /** - * A PaymentIntent object can be canceled when it is in one of these statuses: {@code + * You can cancel a PaymentIntent object when it’s in one of these statuses: {@code * requires_payment_method}, {@code requires_capture}, {@code requires_confirmation}, {@code * requires_action} or, in rare cases, * {@code processing}. * - *

Once canceled, no additional charges will be made by the PaymentIntent and any operations on - * the PaymentIntent will fail with an error. For PaymentIntents with a {@code status} of {@code - * requires_capture}, the remaining {@code amount_capturable} will automatically be refunded. + *

After it’s canceled, no additional charges are made by the PaymentIntent and any operations + * on the PaymentIntent fail with an error. For PaymentIntents with a {@code status} of {@code + * requires_capture}, the remaining {@code amount_capturable} is automatically refunded. * - *

You cannot cancel the PaymentIntent for a Checkout Session. You can’t cancel the PaymentIntent for a Checkout Session. Expire the Checkout Session * instead. */ @@ -577,16 +578,16 @@ public PaymentIntent cancel(RequestOptions options) throws StripeException { } /** - * A PaymentIntent object can be canceled when it is in one of these statuses: {@code + * You can cancel a PaymentIntent object when it’s in one of these statuses: {@code * requires_payment_method}, {@code requires_capture}, {@code requires_confirmation}, {@code * requires_action} or, in rare cases, * {@code processing}. * - *

Once canceled, no additional charges will be made by the PaymentIntent and any operations on - * the PaymentIntent will fail with an error. For PaymentIntents with a {@code status} of {@code - * requires_capture}, the remaining {@code amount_capturable} will automatically be refunded. + *

After it’s canceled, no additional charges are made by the PaymentIntent and any operations + * on the PaymentIntent fail with an error. For PaymentIntents with a {@code status} of {@code + * requires_capture}, the remaining {@code amount_capturable} is automatically refunded. * - *

You cannot cancel the PaymentIntent for a Checkout Session. You can’t cancel the PaymentIntent for a Checkout Session. Expire the Checkout Session * instead. */ @@ -595,16 +596,16 @@ public PaymentIntent cancel(Map params) throws StripeException { } /** - * A PaymentIntent object can be canceled when it is in one of these statuses: {@code + * You can cancel a PaymentIntent object when it’s in one of these statuses: {@code * requires_payment_method}, {@code requires_capture}, {@code requires_confirmation}, {@code * requires_action} or, in rare cases, * {@code processing}. * - *

Once canceled, no additional charges will be made by the PaymentIntent and any operations on - * the PaymentIntent will fail with an error. For PaymentIntents with a {@code status} of {@code - * requires_capture}, the remaining {@code amount_capturable} will automatically be refunded. + *

After it’s canceled, no additional charges are made by the PaymentIntent and any operations + * on the PaymentIntent fail with an error. For PaymentIntents with a {@code status} of {@code + * requires_capture}, the remaining {@code amount_capturable} is automatically refunded. * - *

You cannot cancel the PaymentIntent for a Checkout Session. You can’t cancel the PaymentIntent for a Checkout Session. Expire the Checkout Session * instead. */ @@ -624,16 +625,16 @@ public PaymentIntent cancel(Map params, RequestOptions options) } /** - * A PaymentIntent object can be canceled when it is in one of these statuses: {@code + * You can cancel a PaymentIntent object when it’s in one of these statuses: {@code * requires_payment_method}, {@code requires_capture}, {@code requires_confirmation}, {@code * requires_action} or, in rare cases, * {@code processing}. * - *

Once canceled, no additional charges will be made by the PaymentIntent and any operations on - * the PaymentIntent will fail with an error. For PaymentIntents with a {@code status} of {@code - * requires_capture}, the remaining {@code amount_capturable} will automatically be refunded. + *

After it’s canceled, no additional charges are made by the PaymentIntent and any operations + * on the PaymentIntent fail with an error. For PaymentIntents with a {@code status} of {@code + * requires_capture}, the remaining {@code amount_capturable} is automatically refunded. * - *

You cannot cancel the PaymentIntent for a Checkout Session. You can’t cancel the PaymentIntent for a Checkout Session. Expire the Checkout Session * instead. */ @@ -642,16 +643,16 @@ public PaymentIntent cancel(PaymentIntentCancelParams params) throws StripeExcep } /** - * A PaymentIntent object can be canceled when it is in one of these statuses: {@code + * You can cancel a PaymentIntent object when it’s in one of these statuses: {@code * requires_payment_method}, {@code requires_capture}, {@code requires_confirmation}, {@code * requires_action} or, in rare cases, * {@code processing}. * - *

Once canceled, no additional charges will be made by the PaymentIntent and any operations on - * the PaymentIntent will fail with an error. For PaymentIntents with a {@code status} of {@code - * requires_capture}, the remaining {@code amount_capturable} will automatically be refunded. + *

After it’s canceled, no additional charges are made by the PaymentIntent and any operations + * on the PaymentIntent fail with an error. For PaymentIntents with a {@code status} of {@code + * requires_capture}, the remaining {@code amount_capturable} is automatically refunded. * - *

You cannot cancel the PaymentIntent for a Checkout Session. You can’t cancel the PaymentIntent for a Checkout Session. Expire the Checkout Session * instead. */ @@ -675,8 +676,8 @@ public PaymentIntent cancel(PaymentIntentCancelParams params, RequestOptions opt * Capture the funds of an existing uncaptured PaymentIntent when its status is {@code * requires_capture}. * - *

Uncaptured PaymentIntents will be canceled a set number of days after they are created (7 by - * default). + *

Uncaptured PaymentIntents are cancelled a set number of days (7 by default) after their + * creation. * *

Learn more about separate * authorization and capture. @@ -689,8 +690,8 @@ public PaymentIntent capture() throws StripeException { * Capture the funds of an existing uncaptured PaymentIntent when its status is {@code * requires_capture}. * - *

Uncaptured PaymentIntents will be canceled a set number of days after they are created (7 by - * default). + *

Uncaptured PaymentIntents are cancelled a set number of days (7 by default) after their + * creation. * *

Learn more about separate * authorization and capture. @@ -703,8 +704,8 @@ public PaymentIntent capture(RequestOptions options) throws StripeException { * Capture the funds of an existing uncaptured PaymentIntent when its status is {@code * requires_capture}. * - *

Uncaptured PaymentIntents will be canceled a set number of days after they are created (7 by - * default). + *

Uncaptured PaymentIntents are cancelled a set number of days (7 by default) after their + * creation. * *

Learn more about separate * authorization and capture. @@ -717,8 +718,8 @@ public PaymentIntent capture(Map params) throws StripeException * Capture the funds of an existing uncaptured PaymentIntent when its status is {@code * requires_capture}. * - *

Uncaptured PaymentIntents will be canceled a set number of days after they are created (7 by - * default). + *

Uncaptured PaymentIntents are cancelled a set number of days (7 by default) after their + * creation. * *

Learn more about separate * authorization and capture. @@ -742,8 +743,8 @@ public PaymentIntent capture(Map params, RequestOptions options) * Capture the funds of an existing uncaptured PaymentIntent when its status is {@code * requires_capture}. * - *

Uncaptured PaymentIntents will be canceled a set number of days after they are created (7 by - * default). + *

Uncaptured PaymentIntents are cancelled a set number of days (7 by default) after their + * creation. * *

Learn more about separate * authorization and capture. @@ -756,8 +757,8 @@ public PaymentIntent capture(PaymentIntentCaptureParams params) throws StripeExc * Capture the funds of an existing uncaptured PaymentIntent when its status is {@code * requires_capture}. * - *

Uncaptured PaymentIntents will be canceled a set number of days after they are created (7 by - * default). + *

Uncaptured PaymentIntents are cancelled a set number of days (7 by default) after their + * creation. * *

Learn more about separate * authorization and capture. @@ -962,13 +963,13 @@ public PaymentIntent confirm(PaymentIntentConfirmParams params, RequestOptions o * *

After the PaymentIntent is created, attach a payment method and confirm to continue the payment. - * You can read more about the different payment flows available via the Payment Intents API here. + * Learn more about the available + * payment flows with the Payment Intents API. * - *

When {@code confirm=true} is used during creation, it is equivalent to creating and - * confirming the PaymentIntent in the same call. You may use any parameters available in the confirm API when {@code - * confirm=true} is supplied. + *

When you use {@code confirm=true} during creation, it’s equivalent to creating and + * confirming the PaymentIntent in the same call. You can use any parameters available in the confirm API when you supply + * {@code confirm=true}. */ public static PaymentIntent create(Map params) throws StripeException { return create(params, (RequestOptions) null); @@ -979,13 +980,13 @@ public static PaymentIntent create(Map params) throws StripeExce * *

After the PaymentIntent is created, attach a payment method and confirm to continue the payment. - * You can read more about the different payment flows available via the Payment Intents API here. + * Learn more about the available + * payment flows with the Payment Intents API. * - *

When {@code confirm=true} is used during creation, it is equivalent to creating and - * confirming the PaymentIntent in the same call. You may use any parameters available in the confirm API when {@code - * confirm=true} is supplied. + *

When you use {@code confirm=true} during creation, it’s equivalent to creating and + * confirming the PaymentIntent in the same call. You can use any parameters available in the confirm API when you supply + * {@code confirm=true}. */ public static PaymentIntent create(Map params, RequestOptions options) throws StripeException { @@ -1006,13 +1007,13 @@ public static PaymentIntent create(Map params, RequestOptions op * *

After the PaymentIntent is created, attach a payment method and confirm to continue the payment. - * You can read more about the different payment flows available via the Payment Intents API here. + * Learn more about the available + * payment flows with the Payment Intents API. * - *

When {@code confirm=true} is used during creation, it is equivalent to creating and - * confirming the PaymentIntent in the same call. You may use any parameters available in the confirm API when {@code - * confirm=true} is supplied. + *

When you use {@code confirm=true} during creation, it’s equivalent to creating and + * confirming the PaymentIntent in the same call. You can use any parameters available in the confirm API when you supply + * {@code confirm=true}. */ public static PaymentIntent create(PaymentIntentCreateParams params) throws StripeException { return create(params, (RequestOptions) null); @@ -1023,13 +1024,13 @@ public static PaymentIntent create(PaymentIntentCreateParams params) throws Stri * *

After the PaymentIntent is created, attach a payment method and confirm to continue the payment. - * You can read more about the different payment flows available via the Payment Intents API here. + * Learn more about the available + * payment flows with the Payment Intents API. * - *

When {@code confirm=true} is used during creation, it is equivalent to creating and - * confirming the PaymentIntent in the same call. You may use any parameters available in the confirm API when {@code - * confirm=true} is supplied. + *

When you use {@code confirm=true} during creation, it’s equivalent to creating and + * confirming the PaymentIntent in the same call. You can use any parameters available in the confirm API when you supply + * {@code confirm=true}. */ public static PaymentIntent create(PaymentIntentCreateParams params, RequestOptions options) throws StripeException { @@ -1054,20 +1055,20 @@ public static PaymentIntent create(PaymentIntentCreateParams params, RequestOpti * must be {@code true}. * *

Incremental authorizations attempt to increase the authorized amount on your customer’s card - * to the new, higher {@code amount} provided. As with the initial authorization, incremental - * authorizations may be declined. A single PaymentIntent can call this endpoint multiple times to + * to the new, higher {@code amount} provided. Similar to the initial authorization, incremental + * authorizations can be declined. A single PaymentIntent can call this endpoint multiple times to * further increase the authorized amount. * - *

If the incremental authorization succeeds, the PaymentIntent object is returned with the - * updated If the incremental authorization succeeds, the PaymentIntent object returns with the updated + * amount. * If the incremental authorization fails, a card_declined error is returned, - * and no fields on the PaymentIntent or Charge are updated. The PaymentIntent object remains + * href="https://stripe.com/docs/error-codes#card-declined">card_declined error returns, and + * no other fields on the PaymentIntent or Charge update. The PaymentIntent object remains * capturable for the previously authorized amount. * *

Each PaymentIntent can have a maximum of 10 incremental authorization attempts, including - * declines. Once captured, a PaymentIntent can no longer be incremented. + * declines. After it’s captured, a PaymentIntent can no longer be incremented. * *

Learn more about incremental @@ -1085,20 +1086,20 @@ public PaymentIntent incrementAuthorization(Map params) throws S * must be {@code true}. * *

Incremental authorizations attempt to increase the authorized amount on your customer’s card - * to the new, higher {@code amount} provided. As with the initial authorization, incremental - * authorizations may be declined. A single PaymentIntent can call this endpoint multiple times to + * to the new, higher {@code amount} provided. Similar to the initial authorization, incremental + * authorizations can be declined. A single PaymentIntent can call this endpoint multiple times to * further increase the authorized amount. * - *

If the incremental authorization succeeds, the PaymentIntent object is returned with the - * updated If the incremental authorization succeeds, the PaymentIntent object returns with the updated + * amount. * If the incremental authorization fails, a card_declined error is returned, - * and no fields on the PaymentIntent or Charge are updated. The PaymentIntent object remains + * href="https://stripe.com/docs/error-codes#card-declined">card_declined error returns, and + * no other fields on the PaymentIntent or Charge update. The PaymentIntent object remains * capturable for the previously authorized amount. * *

Each PaymentIntent can have a maximum of 10 incremental authorization attempts, including - * declines. Once captured, a PaymentIntent can no longer be incremented. + * declines. After it’s captured, a PaymentIntent can no longer be incremented. * *

Learn more about incremental @@ -1129,20 +1130,20 @@ public PaymentIntent incrementAuthorization(Map params, RequestO * must be {@code true}. * *

Incremental authorizations attempt to increase the authorized amount on your customer’s card - * to the new, higher {@code amount} provided. As with the initial authorization, incremental - * authorizations may be declined. A single PaymentIntent can call this endpoint multiple times to + * to the new, higher {@code amount} provided. Similar to the initial authorization, incremental + * authorizations can be declined. A single PaymentIntent can call this endpoint multiple times to * further increase the authorized amount. * - *

If the incremental authorization succeeds, the PaymentIntent object is returned with the - * updated If the incremental authorization succeeds, the PaymentIntent object returns with the updated + * amount. * If the incremental authorization fails, a card_declined error is returned, - * and no fields on the PaymentIntent or Charge are updated. The PaymentIntent object remains + * href="https://stripe.com/docs/error-codes#card-declined">card_declined error returns, and + * no other fields on the PaymentIntent or Charge update. The PaymentIntent object remains * capturable for the previously authorized amount. * *

Each PaymentIntent can have a maximum of 10 incremental authorization attempts, including - * declines. Once captured, a PaymentIntent can no longer be incremented. + * declines. After it’s captured, a PaymentIntent can no longer be incremented. * *

Learn more about incremental @@ -1161,20 +1162,20 @@ public PaymentIntent incrementAuthorization(PaymentIntentIncrementAuthorizationP * must be {@code true}. * *

Incremental authorizations attempt to increase the authorized amount on your customer’s card - * to the new, higher {@code amount} provided. As with the initial authorization, incremental - * authorizations may be declined. A single PaymentIntent can call this endpoint multiple times to + * to the new, higher {@code amount} provided. Similar to the initial authorization, incremental + * authorizations can be declined. A single PaymentIntent can call this endpoint multiple times to * further increase the authorized amount. * - *

If the incremental authorization succeeds, the PaymentIntent object is returned with the - * updated If the incremental authorization succeeds, the PaymentIntent object returns with the updated + * amount. * If the incremental authorization fails, a card_declined error is returned, - * and no fields on the PaymentIntent or Charge are updated. The PaymentIntent object remains + * href="https://stripe.com/docs/error-codes#card-declined">card_declined error returns, and + * no other fields on the PaymentIntent or Charge update. The PaymentIntent object remains * capturable for the previously authorized amount. * *

Each PaymentIntent can have a maximum of 10 incremental authorization attempts, including - * declines. Once captured, a PaymentIntent can no longer be incremented. + * declines. After it’s captured, a PaymentIntent can no longer be incremented. * *

Learn more about incremental @@ -2462,10 +2463,9 @@ public static class AfterpayClearpay extends StripeObject { String captureMethod; /** - * Order identifier shown to the customer in Afterpay’s online portal. We recommend using a - * value that helps you answer any questions a customer might have about the payment. The - * identifier is limited to 128 characters and may contain only letters, digits, underscores, - * backslashes and dashes. + * An internal identifier or reference that this payment corresponds to. You must limit the + * identifier to 128 characters, and it can only contain letters, numbers, underscores, + * backslashes, and dashes. This field differs from the statement descriptor and item name. */ @SerializedName("reference") String reference; @@ -3687,8 +3687,8 @@ public static class TransferData extends StripeObject { Long amount; /** - * The account (if any) the payment will be attributed to for tax reporting, and where funds - * from the payment will be transferred to upon payment success. + * The account (if any) that the payment is attributed to for tax reporting, and where funds + * from the payment are transferred to after payment success. */ @SerializedName("destination") @Getter(lombok.AccessLevel.NONE) diff --git a/src/main/java/com/stripe/model/Payout.java b/src/main/java/com/stripe/model/Payout.java index 17a969612be..d8c4eb3edad 100644 --- a/src/main/java/com/stripe/model/Payout.java +++ b/src/main/java/com/stripe/model/Payout.java @@ -24,7 +24,7 @@ * A {@code Payout} object is created when you receive funds from Stripe, or when you initiate a * payout to either a bank account or debit card of a connected Stripe account. You - * can retrieve individual payouts, as well as list all payouts. Payouts are made on varying schedules, depending on * your country and industry. * @@ -35,23 +35,22 @@ @EqualsAndHashCode(callSuper = false) public class Payout extends ApiResource implements MetadataStore, BalanceTransactionSource { /** - * Amount (in cents (or local equivalent)) to be transferred to your bank account or debit card. + * The amount (in cents (or local equivalent)) that transfers to your bank account or debit card. */ @SerializedName("amount") Long amount; /** - * Date the payout is expected to arrive in the bank. This factors in delays like weekends or bank - * holidays. + * Date that you can expect the payout to arrive in the bank. This factors in delays to account + * for weekends or bank holidays. */ @SerializedName("arrival_date") Long arrivalDate; /** - * Returns {@code true} if the payout was created by an automated payout schedule, and - * {@code false} if it was requested - * manually. + * Returns {@code true} if the payout is created by an automated payout schedule and {@code + * false} if it's requested manually. */ @SerializedName("automatic") Boolean automatic; @@ -79,16 +78,15 @@ public class Payout extends ApiResource implements MetadataStore, Balanc @SerializedName("description") String description; - /** ID of the bank account or card the payout was sent to. */ + /** ID of the bank account or card the payout is sent to. */ @SerializedName("destination") @Getter(lombok.AccessLevel.NONE) @Setter(lombok.AccessLevel.NONE) ExpandableField destination; /** - * If the payout failed or was canceled, this will be the ID of the balance transaction that - * reversed the initial balance transaction, and puts the funds from the failed payout back in - * your balance. + * If the payout fails or cancels, this is the ID of the balance transaction that reverses the + * initial balance transaction and returns the funds from the failed payout back in your balance. */ @SerializedName("failure_balance_transaction") @Getter(lombok.AccessLevel.NONE) @@ -96,14 +94,13 @@ public class Payout extends ApiResource implements MetadataStore, Balanc ExpandableField failureBalanceTransaction; /** - * Error code explaining reason for payout failure if available. See Types of payout failures for a list of - * failure codes. + * Error code that provides a reason for a payout failure, if available. View our list of failure codes. */ @SerializedName("failure_code") String failureCode; - /** Message to user further explaining reason for payout failure if available. */ + /** Message that provides the reason for a payout failure, if available. */ @SerializedName("failure_message") String failureMessage; @@ -130,9 +127,9 @@ public class Payout extends ApiResource implements MetadataStore, Balanc /** * The method used to send this payout, which can be {@code standard} or {@code instant}. {@code - * instant} is supported for payouts to debit cards and bank accounts in certain countries. (See - * Bank support for Instant - * Payouts for more information.) + * instant} is supported for payouts to debit cards and bank accounts in certain countries. Learn + * more about bank support for + * Instant Payouts. */ @SerializedName("method") String method; @@ -152,39 +149,38 @@ public class Payout extends ApiResource implements MetadataStore, Balanc ExpandableField originalPayout; /** - * If {@code completed}, the Balance - * Transactions API may be used to list all Balance Transactions that were paid out in this - * payout. + * Transactions API to list all balance transactions that are paid out in this payout. * *

One of {@code completed}, {@code in_progress}, or {@code not_applicable}. */ @SerializedName("reconciliation_status") String reconciliationStatus; - /** If the payout was reversed, this is the ID of the payout that reverses this payout. */ + /** If the payout reverses, this is the ID of the payout that reverses this payout. */ @SerializedName("reversed_by") @Getter(lombok.AccessLevel.NONE) @Setter(lombok.AccessLevel.NONE) ExpandableField reversedBy; /** - * The source balance this payout came from. One of {@code card}, {@code fpx}, or {@code - * bank_account}. + * The source balance this payout came from, which can be one of the following: {@code card}, + * {@code fpx}, or {@code bank_account}. */ @SerializedName("source_type") String sourceType; - /** Extra information about a payout to be displayed on the user's bank statement. */ + /** Extra information about a payout that displays on the user's bank statement. */ @SerializedName("statement_descriptor") String statementDescriptor; /** * Current status of the payout: {@code paid}, {@code pending}, {@code in_transit}, {@code - * canceled} or {@code failed}. A payout is {@code pending} until it is submitted to the bank, - * when it becomes {@code in_transit}. The status then changes to {@code paid} if the transaction - * goes through, or to {@code failed} or {@code canceled} (within 5 business days). Some failed - * payouts may initially show as {@code paid} but then change to {@code failed}. + * canceled} or {@code failed}. A payout is {@code pending} until it's submitted to the bank, when + * it becomes {@code in_transit}. The status changes to {@code paid} if the transaction succeeds, + * or to {@code failed} or {@code canceled} (within 5 business days). Some payouts that fail might + * initially show as {@code paid}, then change to {@code failed}. */ @SerializedName("status") String status; @@ -290,32 +286,32 @@ public void setReversedByObject(Payout expandableObject) { } /** - * A previously created payout can be canceled if it has not yet been paid out. Funds will be - * refunded to your available balance. You may not cancel automatic Stripe payouts. + * You can cancel a previously created payout if it hasn’t been paid out yet. Stripe refunds the + * funds to your available balance. You can’t cancel automatic Stripe payouts. */ public Payout cancel() throws StripeException { return cancel((Map) null, (RequestOptions) null); } /** - * A previously created payout can be canceled if it has not yet been paid out. Funds will be - * refunded to your available balance. You may not cancel automatic Stripe payouts. + * You can cancel a previously created payout if it hasn’t been paid out yet. Stripe refunds the + * funds to your available balance. You can’t cancel automatic Stripe payouts. */ public Payout cancel(RequestOptions options) throws StripeException { return cancel((Map) null, options); } /** - * A previously created payout can be canceled if it has not yet been paid out. Funds will be - * refunded to your available balance. You may not cancel automatic Stripe payouts. + * You can cancel a previously created payout if it hasn’t been paid out yet. Stripe refunds the + * funds to your available balance. You can’t cancel automatic Stripe payouts. */ public Payout cancel(Map params) throws StripeException { return cancel(params, (RequestOptions) null); } /** - * A previously created payout can be canceled if it has not yet been paid out. Funds will be - * refunded to your available balance. You may not cancel automatic Stripe payouts. + * You can cancel a previously created payout if it hasn’t been paid out yet. Stripe refunds the + * funds to your available balance. You can’t cancel automatic Stripe payouts. */ public Payout cancel(Map params, RequestOptions options) throws StripeException { String path = String.format("/v1/payouts/%s/cancel", ApiResource.urlEncodeId(this.getId())); @@ -331,16 +327,16 @@ public Payout cancel(Map params, RequestOptions options) throws } /** - * A previously created payout can be canceled if it has not yet been paid out. Funds will be - * refunded to your available balance. You may not cancel automatic Stripe payouts. + * You can cancel a previously created payout if it hasn’t been paid out yet. Stripe refunds the + * funds to your available balance. You can’t cancel automatic Stripe payouts. */ public Payout cancel(PayoutCancelParams params) throws StripeException { return cancel(params, (RequestOptions) null); } /** - * A previously created payout can be canceled if it has not yet been paid out. Funds will be - * refunded to your available balance. You may not cancel automatic Stripe payouts. + * You can cancel a previously created payout if it hasn’t been paid out yet. Stripe refunds the + * funds to your available balance. You can’t cancel automatic Stripe payouts. */ public Payout cancel(PayoutCancelParams params, RequestOptions options) throws StripeException { String path = String.format("/v1/payouts/%s/cancel", ApiResource.urlEncodeId(this.getId())); @@ -357,15 +353,15 @@ public Payout cancel(PayoutCancelParams params, RequestOptions options) throws S } /** - * To send funds to your own bank account, you create a new payout object. Your Stripe balance must be able to cover the payout - * amount, or you’ll receive an “Insufficient Funds” error. + * To send funds to your own bank account, create a new payout object. Your Stripe balance must cover the payout amount. If + * it doesn’t, you receive an “Insufficient Funds” error. * - *

If your API key is in test mode, money won’t actually be sent, though everything else will - * occur as if in live mode. + *

If your API key is in test mode, money won’t actually be sent, though every other action + * occurs as if you’re in live mode. * - *

If you are creating a manual payout on a Stripe account that uses multiple payment source - * types, you’ll need to specify the source type balance that the payout should draw from. The If you create a manual payout on a Stripe account that uses multiple payment source types, + * you need to specify the source type balance that the payout draws from. The balance object details available and * pending amounts by source type. */ @@ -374,15 +370,15 @@ public static Payout create(Map params) throws StripeException { } /** - * To send funds to your own bank account, you create a new payout object. Your Stripe balance must be able to cover the payout - * amount, or you’ll receive an “Insufficient Funds” error. + * To send funds to your own bank account, create a new payout object. Your Stripe balance must cover the payout amount. If + * it doesn’t, you receive an “Insufficient Funds” error. * - *

If your API key is in test mode, money won’t actually be sent, though everything else will - * occur as if in live mode. + *

If your API key is in test mode, money won’t actually be sent, though every other action + * occurs as if you’re in live mode. * - *

If you are creating a manual payout on a Stripe account that uses multiple payment source - * types, you’ll need to specify the source type balance that the payout should draw from. The If you create a manual payout on a Stripe account that uses multiple payment source types, + * you need to specify the source type balance that the payout draws from. The balance object details available and * pending amounts by source type. */ @@ -401,15 +397,15 @@ public static Payout create(Map params, RequestOptions options) } /** - * To send funds to your own bank account, you create a new payout object. Your Stripe balance must be able to cover the payout - * amount, or you’ll receive an “Insufficient Funds” error. + * To send funds to your own bank account, create a new payout object. Your Stripe balance must cover the payout amount. If + * it doesn’t, you receive an “Insufficient Funds” error. * - *

If your API key is in test mode, money won’t actually be sent, though everything else will - * occur as if in live mode. + *

If your API key is in test mode, money won’t actually be sent, though every other action + * occurs as if you’re in live mode. * - *

If you are creating a manual payout on a Stripe account that uses multiple payment source - * types, you’ll need to specify the source type balance that the payout should draw from. The If you create a manual payout on a Stripe account that uses multiple payment source types, + * you need to specify the source type balance that the payout draws from. The balance object details available and * pending amounts by source type. */ @@ -418,15 +414,15 @@ public static Payout create(PayoutCreateParams params) throws StripeException { } /** - * To send funds to your own bank account, you create a new payout object. Your Stripe balance must be able to cover the payout - * amount, or you’ll receive an “Insufficient Funds” error. + * To send funds to your own bank account, create a new payout object. Your Stripe balance must cover the payout amount. If + * it doesn’t, you receive an “Insufficient Funds” error. * - *

If your API key is in test mode, money won’t actually be sent, though everything else will - * occur as if in live mode. + *

If your API key is in test mode, money won’t actually be sent, though every other action + * occurs as if you’re in live mode. * - *

If you are creating a manual payout on a Stripe account that uses multiple payment source - * types, you’ll need to specify the source type balance that the payout should draw from. The If you create a manual payout on a Stripe account that uses multiple payment source types, + * you need to specify the source type balance that the payout draws from. The balance object details available and * pending amounts by source type. */ @@ -446,18 +442,18 @@ public static Payout create(PayoutCreateParams params, RequestOptions options) } /** - * Returns a list of existing payouts sent to third-party bank accounts or that Stripe has sent - * you. The payouts are returned in sorted order, with the most recently created payouts appearing - * first. + * Returns a list of existing payouts sent to third-party bank accounts or payouts that Stripe + * sent to you. The payouts return in sorted order, with the most recently created payouts + * appearing first. */ public static PayoutCollection list(Map params) throws StripeException { return list(params, (RequestOptions) null); } /** - * Returns a list of existing payouts sent to third-party bank accounts or that Stripe has sent - * you. The payouts are returned in sorted order, with the most recently created payouts appearing - * first. + * Returns a list of existing payouts sent to third-party bank accounts or payouts that Stripe + * sent to you. The payouts return in sorted order, with the most recently created payouts + * appearing first. */ public static PayoutCollection list(Map params, RequestOptions options) throws StripeException { @@ -474,18 +470,18 @@ public static PayoutCollection list(Map params, RequestOptions o } /** - * Returns a list of existing payouts sent to third-party bank accounts or that Stripe has sent - * you. The payouts are returned in sorted order, with the most recently created payouts appearing - * first. + * Returns a list of existing payouts sent to third-party bank accounts or payouts that Stripe + * sent to you. The payouts return in sorted order, with the most recently created payouts + * appearing first. */ public static PayoutCollection list(PayoutListParams params) throws StripeException { return list(params, (RequestOptions) null); } /** - * Returns a list of existing payouts sent to third-party bank accounts or that Stripe has sent - * you. The payouts are returned in sorted order, with the most recently created payouts appearing - * first. + * Returns a list of existing payouts sent to third-party bank accounts or payouts that Stripe + * sent to you. The payouts return in sorted order, with the most recently created payouts + * appearing first. */ public static PayoutCollection list(PayoutListParams params, RequestOptions options) throws StripeException { @@ -504,8 +500,7 @@ public static PayoutCollection list(PayoutListParams params, RequestOptions opti /** * Retrieves the details of an existing payout. Supply the unique payout ID from either a payout - * creation request or the payout list, and Stripe will return the corresponding payout - * information. + * creation request or the payout list. Stripe returns the corresponding payout information. */ public static Payout retrieve(String payout) throws StripeException { return retrieve(payout, (Map) null, (RequestOptions) null); @@ -513,8 +508,7 @@ public static Payout retrieve(String payout) throws StripeException { /** * Retrieves the details of an existing payout. Supply the unique payout ID from either a payout - * creation request or the payout list, and Stripe will return the corresponding payout - * information. + * creation request or the payout list. Stripe returns the corresponding payout information. */ public static Payout retrieve(String payout, RequestOptions options) throws StripeException { return retrieve(payout, (Map) null, options); @@ -522,8 +516,7 @@ public static Payout retrieve(String payout, RequestOptions options) throws Stri /** * Retrieves the details of an existing payout. Supply the unique payout ID from either a payout - * creation request or the payout list, and Stripe will return the corresponding payout - * information. + * creation request or the payout list. Stripe returns the corresponding payout information. */ public static Payout retrieve(String payout, Map params, RequestOptions options) throws StripeException { @@ -541,8 +534,7 @@ public static Payout retrieve(String payout, Map params, Request /** * Retrieves the details of an existing payout. Supply the unique payout ID from either a payout - * creation request or the payout list, and Stripe will return the corresponding payout - * information. + * creation request or the payout list. Stripe returns the corresponding payout information. */ public static Payout retrieve(String payout, PayoutRetrieveParams params, RequestOptions options) throws StripeException { @@ -560,52 +552,52 @@ public static Payout retrieve(String payout, PayoutRetrieveParams params, Reques } /** - * Reverses a payout by debiting the destination bank account. Only payouts for connected accounts - * to US bank accounts may be reversed at this time. If the payout is in the {@code pending} - * status, {@code /v1/payouts/:id/cancel} should be used instead. + * Reverses a payout by debiting the destination bank account. At this time, you can only reverse + * payouts for connected accounts to US bank accounts. If the payout is in the {@code pending} + * status, use {@code /v1/payouts/:id/cancel} instead. * - *

By requesting a reversal via {@code /v1/payouts/:id/reverse}, you confirm that the - * authorized signatory of the selected bank account has authorized the debit on the bank account - * and that no other authorization is required. + *

By requesting a reversal through {@code /v1/payouts/:id/reverse}, you confirm that the + * authorized signatory of the selected bank account authorizes the debit on the bank account and + * that no other authorization is required. */ public Payout reverse() throws StripeException { return reverse((Map) null, (RequestOptions) null); } /** - * Reverses a payout by debiting the destination bank account. Only payouts for connected accounts - * to US bank accounts may be reversed at this time. If the payout is in the {@code pending} - * status, {@code /v1/payouts/:id/cancel} should be used instead. + * Reverses a payout by debiting the destination bank account. At this time, you can only reverse + * payouts for connected accounts to US bank accounts. If the payout is in the {@code pending} + * status, use {@code /v1/payouts/:id/cancel} instead. * - *

By requesting a reversal via {@code /v1/payouts/:id/reverse}, you confirm that the - * authorized signatory of the selected bank account has authorized the debit on the bank account - * and that no other authorization is required. + *

By requesting a reversal through {@code /v1/payouts/:id/reverse}, you confirm that the + * authorized signatory of the selected bank account authorizes the debit on the bank account and + * that no other authorization is required. */ public Payout reverse(RequestOptions options) throws StripeException { return reverse((Map) null, options); } /** - * Reverses a payout by debiting the destination bank account. Only payouts for connected accounts - * to US bank accounts may be reversed at this time. If the payout is in the {@code pending} - * status, {@code /v1/payouts/:id/cancel} should be used instead. + * Reverses a payout by debiting the destination bank account. At this time, you can only reverse + * payouts for connected accounts to US bank accounts. If the payout is in the {@code pending} + * status, use {@code /v1/payouts/:id/cancel} instead. * - *

By requesting a reversal via {@code /v1/payouts/:id/reverse}, you confirm that the - * authorized signatory of the selected bank account has authorized the debit on the bank account - * and that no other authorization is required. + *

By requesting a reversal through {@code /v1/payouts/:id/reverse}, you confirm that the + * authorized signatory of the selected bank account authorizes the debit on the bank account and + * that no other authorization is required. */ public Payout reverse(Map params) throws StripeException { return reverse(params, (RequestOptions) null); } /** - * Reverses a payout by debiting the destination bank account. Only payouts for connected accounts - * to US bank accounts may be reversed at this time. If the payout is in the {@code pending} - * status, {@code /v1/payouts/:id/cancel} should be used instead. + * Reverses a payout by debiting the destination bank account. At this time, you can only reverse + * payouts for connected accounts to US bank accounts. If the payout is in the {@code pending} + * status, use {@code /v1/payouts/:id/cancel} instead. * - *

By requesting a reversal via {@code /v1/payouts/:id/reverse}, you confirm that the - * authorized signatory of the selected bank account has authorized the debit on the bank account - * and that no other authorization is required. + *

By requesting a reversal through {@code /v1/payouts/:id/reverse}, you confirm that the + * authorized signatory of the selected bank account authorizes the debit on the bank account and + * that no other authorization is required. */ public Payout reverse(Map params, RequestOptions options) throws StripeException { String path = String.format("/v1/payouts/%s/reverse", ApiResource.urlEncodeId(this.getId())); @@ -621,26 +613,26 @@ public Payout reverse(Map params, RequestOptions options) throws } /** - * Reverses a payout by debiting the destination bank account. Only payouts for connected accounts - * to US bank accounts may be reversed at this time. If the payout is in the {@code pending} - * status, {@code /v1/payouts/:id/cancel} should be used instead. + * Reverses a payout by debiting the destination bank account. At this time, you can only reverse + * payouts for connected accounts to US bank accounts. If the payout is in the {@code pending} + * status, use {@code /v1/payouts/:id/cancel} instead. * - *

By requesting a reversal via {@code /v1/payouts/:id/reverse}, you confirm that the - * authorized signatory of the selected bank account has authorized the debit on the bank account - * and that no other authorization is required. + *

By requesting a reversal through {@code /v1/payouts/:id/reverse}, you confirm that the + * authorized signatory of the selected bank account authorizes the debit on the bank account and + * that no other authorization is required. */ public Payout reverse(PayoutReverseParams params) throws StripeException { return reverse(params, (RequestOptions) null); } /** - * Reverses a payout by debiting the destination bank account. Only payouts for connected accounts - * to US bank accounts may be reversed at this time. If the payout is in the {@code pending} - * status, {@code /v1/payouts/:id/cancel} should be used instead. + * Reverses a payout by debiting the destination bank account. At this time, you can only reverse + * payouts for connected accounts to US bank accounts. If the payout is in the {@code pending} + * status, use {@code /v1/payouts/:id/cancel} instead. * - *

By requesting a reversal via {@code /v1/payouts/:id/reverse}, you confirm that the - * authorized signatory of the selected bank account has authorized the debit on the bank account - * and that no other authorization is required. + *

By requesting a reversal through {@code /v1/payouts/:id/reverse}, you confirm that the + * authorized signatory of the selected bank account authorizes the debit on the bank account and + * that no other authorization is required. */ public Payout reverse(PayoutReverseParams params, RequestOptions options) throws StripeException { String path = String.format("/v1/payouts/%s/reverse", ApiResource.urlEncodeId(this.getId())); @@ -657,8 +649,8 @@ public Payout reverse(PayoutReverseParams params, RequestOptions options) throws } /** - * Updates the specified payout by setting the values of the parameters passed. Any parameters not - * provided will be left unchanged. This request accepts only the metadata as arguments. + * Updates the specified payout by setting the values of the parameters you pass. We don’t change + * parameters that you don’t provide. This request only accepts the metadata as arguments. */ @Override public Payout update(Map params) throws StripeException { @@ -666,8 +658,8 @@ public Payout update(Map params) throws StripeException { } /** - * Updates the specified payout by setting the values of the parameters passed. Any parameters not - * provided will be left unchanged. This request accepts only the metadata as arguments. + * Updates the specified payout by setting the values of the parameters you pass. We don’t change + * parameters that you don’t provide. This request only accepts the metadata as arguments. */ @Override public Payout update(Map params, RequestOptions options) throws StripeException { @@ -684,16 +676,16 @@ public Payout update(Map params, RequestOptions options) throws } /** - * Updates the specified payout by setting the values of the parameters passed. Any parameters not - * provided will be left unchanged. This request accepts only the metadata as arguments. + * Updates the specified payout by setting the values of the parameters you pass. We don’t change + * parameters that you don’t provide. This request only accepts the metadata as arguments. */ public Payout update(PayoutUpdateParams params) throws StripeException { return update(params, (RequestOptions) null); } /** - * Updates the specified payout by setting the values of the parameters passed. Any parameters not - * provided will be left unchanged. This request accepts only the metadata as arguments. + * Updates the specified payout by setting the values of the parameters you pass. We don’t change + * parameters that you don’t provide. This request only accepts the metadata as arguments. */ public Payout update(PayoutUpdateParams params, RequestOptions options) throws StripeException { String path = String.format("/v1/payouts/%s", ApiResource.urlEncodeId(this.getId())); diff --git a/src/main/java/com/stripe/model/Refund.java b/src/main/java/com/stripe/model/Refund.java index c08260e6779..11b28353b35 100644 --- a/src/main/java/com/stripe/model/Refund.java +++ b/src/main/java/com/stripe/model/Refund.java @@ -21,8 +21,8 @@ import lombok.Setter; /** - * {@code Refund} objects allow you to refund a charge that has previously been created but not yet - * refunded. Funds will be refunded to the credit or debit card that was originally charged. + * Refund objects allow you to refund a previously created charge that isn't refunded yet. Funds are + * refunded to the credit or debit card that's initially charged. * *

Related guide: Refunds */ @@ -40,7 +40,7 @@ public class Refund extends ApiResource implements MetadataStore, Balanc @Setter(lombok.AccessLevel.NONE) ExpandableField balanceTransaction; - /** ID of the charge that was refunded. */ + /** ID of the charge that's refunded. */ @SerializedName("charge") @Getter(lombok.AccessLevel.NONE) @Setter(lombok.AccessLevel.NONE) @@ -58,14 +58,14 @@ public class Refund extends ApiResource implements MetadataStore, Balanc String currency; /** - * An arbitrary string attached to the object. Often useful for displaying to users. (Available on - * non-card refunds only) + * An arbitrary string attached to the object. You can use this for displaying to users (available + * on non-card refunds only). */ @SerializedName("description") String description; /** - * If the refund failed, this balance transaction describes the adjustment made on your account + * After the refund fails, this balance transaction describes the adjustment made on your account * balance that reverses the initial balance transaction. */ @SerializedName("failure_balance_transaction") @@ -74,10 +74,9 @@ public class Refund extends ApiResource implements MetadataStore, Balanc ExpandableField failureBalanceTransaction; /** - * If the refund failed, the reason for refund failure if known. Possible values are {@code - * lost_or_stolen_card}, {@code expired_or_canceled_card}, {@code - * charge_for_pending_refund_disputed}, {@code insufficient_funds}, {@code declined}, {@code - * merchant_request} or {@code unknown}. + * Provides the reason for the refund failure. Possible values are: {@code lost_or_stolen_card}, + * {@code expired_or_canceled_card}, {@code charge_for_pending_refund_disputed}, {@code + * insufficient_funds}, {@code declined}, {@code merchant_request}, or {@code unknown}. */ @SerializedName("failure_reason") String failureReason; @@ -88,8 +87,8 @@ public class Refund extends ApiResource implements MetadataStore, Balanc String id; /** - * For payment methods without native refund support (e.g., Konbini, PromptPay), email for the - * customer to receive refund instructions. + * For payment methods without native refund support (for example, Konbini, PromptPay), provide an + * email address for the customer to receive refund instructions. */ @SerializedName("instructions_email") String instructionsEmail; @@ -114,15 +113,16 @@ public class Refund extends ApiResource implements MetadataStore, Balanc @SerializedName("object") String object; - /** ID of the PaymentIntent that was refunded. */ + /** ID of the PaymentIntent that's refunded. */ @SerializedName("payment_intent") @Getter(lombok.AccessLevel.NONE) @Setter(lombok.AccessLevel.NONE) ExpandableField paymentIntent; /** - * Reason for the refund, either user-provided ({@code duplicate}, {@code fraudulent}, or {@code - * requested_by_customer}) or generated by Stripe internally ({@code expired_uncaptured_charge}). + * Reason for the refund, which is either user-provided ({@code duplicate}, {@code fraudulent}, or + * {@code requested_by_customer}) or generated by Stripe internally ({@code + * expired_uncaptured_charge}). * *

One of {@code duplicate}, {@code expired_uncaptured_charge}, {@code fraudulent}, or {@code * requested_by_customer}. @@ -135,8 +135,8 @@ public class Refund extends ApiResource implements MetadataStore, Balanc String receiptNumber; /** - * The transfer reversal that is associated with the refund. Only present if the charge came from - * another Stripe account. See the Connect documentation for details. + * The transfer reversal that's associated with the refund. Only present if the charge came from + * another Stripe account. */ @SerializedName("source_transfer_reversal") @Getter(lombok.AccessLevel.NONE) @@ -146,16 +146,15 @@ public class Refund extends ApiResource implements MetadataStore, Balanc /** * Status of the refund. For credit card refunds, this can be {@code pending}, {@code succeeded}, * or {@code failed}. For other types of refunds, it can be {@code pending}, {@code - * requires_action}, {@code succeeded}, {@code failed}, or {@code canceled}. Refer to our refunds documentation for more - * details. + * requires_action}, {@code succeeded}, {@code failed}, or {@code canceled}. Learn more about failed refunds. */ @SerializedName("status") String status; /** - * If the accompanying transfer was reversed, the transfer reversal object. Only applicable if the - * charge was created using the destination parameter. + * This refers to the transfer reversal object if the accompanying transfer reverses. This is only + * applicable if the charge was created using the destination parameter. */ @SerializedName("transfer_reversal") @Getter(lombok.AccessLevel.NONE) @@ -281,8 +280,8 @@ public void setTransferReversalObject(TransferReversal expandableObject) { /** * Cancels a refund with a status of {@code requires_action}. * - *

Refunds in other states cannot be canceled, and only refunds for payment methods that - * require customer action will enter the {@code requires_action} state. + *

You can’t cancel refunds in other states. Only refunds for payment methods that require + * customer action can enter the {@code requires_action} state. */ public Refund cancel() throws StripeException { return cancel((Map) null, (RequestOptions) null); @@ -291,8 +290,8 @@ public Refund cancel() throws StripeException { /** * Cancels a refund with a status of {@code requires_action}. * - *

Refunds in other states cannot be canceled, and only refunds for payment methods that - * require customer action will enter the {@code requires_action} state. + *

You can’t cancel refunds in other states. Only refunds for payment methods that require + * customer action can enter the {@code requires_action} state. */ public Refund cancel(RequestOptions options) throws StripeException { return cancel((Map) null, options); @@ -301,8 +300,8 @@ public Refund cancel(RequestOptions options) throws StripeException { /** * Cancels a refund with a status of {@code requires_action}. * - *

Refunds in other states cannot be canceled, and only refunds for payment methods that - * require customer action will enter the {@code requires_action} state. + *

You can’t cancel refunds in other states. Only refunds for payment methods that require + * customer action can enter the {@code requires_action} state. */ public Refund cancel(Map params) throws StripeException { return cancel(params, (RequestOptions) null); @@ -311,8 +310,8 @@ public Refund cancel(Map params) throws StripeException { /** * Cancels a refund with a status of {@code requires_action}. * - *

Refunds in other states cannot be canceled, and only refunds for payment methods that - * require customer action will enter the {@code requires_action} state. + *

You can’t cancel refunds in other states. Only refunds for payment methods that require + * customer action can enter the {@code requires_action} state. */ public Refund cancel(Map params, RequestOptions options) throws StripeException { String path = String.format("/v1/refunds/%s/cancel", ApiResource.urlEncodeId(this.getId())); @@ -330,8 +329,8 @@ public Refund cancel(Map params, RequestOptions options) throws /** * Cancels a refund with a status of {@code requires_action}. * - *

Refunds in other states cannot be canceled, and only refunds for payment methods that - * require customer action will enter the {@code requires_action} state. + *

You can’t cancel refunds in other states. Only refunds for payment methods that require + * customer action can enter the {@code requires_action} state. */ public Refund cancel(RefundCancelParams params) throws StripeException { return cancel(params, (RequestOptions) null); @@ -340,8 +339,8 @@ public Refund cancel(RefundCancelParams params) throws StripeException { /** * Cancels a refund with a status of {@code requires_action}. * - *

Refunds in other states cannot be canceled, and only refunds for payment methods that - * require customer action will enter the {@code requires_action} state. + *

You can’t cancel refunds in other states. Only refunds for payment methods that require + * customer action can enter the {@code requires_action} state. */ public Refund cancel(RefundCancelParams params, RequestOptions options) throws StripeException { String path = String.format("/v1/refunds/%s/cancel", ApiResource.urlEncodeId(this.getId())); @@ -357,12 +356,38 @@ public Refund cancel(RefundCancelParams params, RequestOptions options) throws S ApiMode.V1); } - /** Create a refund. */ + /** + * When you create a new refund, you must specify a Charge or a PaymentIntent object on which to + * create it. + * + *

Creating a new refund will refund a charge that has previously been created but not yet + * refunded. Funds will be refunded to the credit or debit card that was originally charged. + * + *

You can optionally refund only part of a charge. You can do so multiple times, until the + * entire charge has been refunded. + * + *

Once entirely refunded, a charge can’t be refunded again. This method will raise an error + * when called on an already-refunded charge, or when trying to refund more money than is left on + * a charge. + */ public static Refund create(Map params) throws StripeException { return create(params, (RequestOptions) null); } - /** Create a refund. */ + /** + * When you create a new refund, you must specify a Charge or a PaymentIntent object on which to + * create it. + * + *

Creating a new refund will refund a charge that has previously been created but not yet + * refunded. Funds will be refunded to the credit or debit card that was originally charged. + * + *

You can optionally refund only part of a charge. You can do so multiple times, until the + * entire charge has been refunded. + * + *

Once entirely refunded, a charge can’t be refunded again. This method will raise an error + * when called on an already-refunded charge, or when trying to refund more money than is left on + * a charge. + */ public static Refund create(Map params, RequestOptions options) throws StripeException { String path = "/v1/refunds"; @@ -377,12 +402,38 @@ public static Refund create(Map params, RequestOptions options) ApiMode.V1); } - /** Create a refund. */ + /** + * When you create a new refund, you must specify a Charge or a PaymentIntent object on which to + * create it. + * + *

Creating a new refund will refund a charge that has previously been created but not yet + * refunded. Funds will be refunded to the credit or debit card that was originally charged. + * + *

You can optionally refund only part of a charge. You can do so multiple times, until the + * entire charge has been refunded. + * + *

Once entirely refunded, a charge can’t be refunded again. This method will raise an error + * when called on an already-refunded charge, or when trying to refund more money than is left on + * a charge. + */ public static Refund create(RefundCreateParams params) throws StripeException { return create(params, (RequestOptions) null); } - /** Create a refund. */ + /** + * When you create a new refund, you must specify a Charge or a PaymentIntent object on which to + * create it. + * + *

Creating a new refund will refund a charge that has previously been created but not yet + * refunded. Funds will be refunded to the credit or debit card that was originally charged. + * + *

You can optionally refund only part of a charge. You can do so multiple times, until the + * entire charge has been refunded. + * + *

Once entirely refunded, a charge can’t be refunded again. This method will raise an error + * when called on an already-refunded charge, or when trying to refund more money than is left on + * a charge. + */ public static Refund create(RefundCreateParams params, RequestOptions options) throws StripeException { String path = "/v1/refunds"; @@ -399,18 +450,18 @@ public static Refund create(RefundCreateParams params, RequestOptions options) } /** - * Returns a list of all refunds you’ve previously created. The refunds are returned in sorted - * order, with the most recent refunds appearing first. For convenience, the 10 most recent - * refunds are always available by default on the charge object. + * Returns a list of all refunds you created. We return the refunds in sorted order, with the most + * recent refunds appearing first The 10 most recent refunds are always available by default on + * the Charge object. */ public static RefundCollection list(Map params) throws StripeException { return list(params, (RequestOptions) null); } /** - * Returns a list of all refunds you’ve previously created. The refunds are returned in sorted - * order, with the most recent refunds appearing first. For convenience, the 10 most recent - * refunds are always available by default on the charge object. + * Returns a list of all refunds you created. We return the refunds in sorted order, with the most + * recent refunds appearing first The 10 most recent refunds are always available by default on + * the Charge object. */ public static RefundCollection list(Map params, RequestOptions options) throws StripeException { @@ -427,18 +478,18 @@ public static RefundCollection list(Map params, RequestOptions o } /** - * Returns a list of all refunds you’ve previously created. The refunds are returned in sorted - * order, with the most recent refunds appearing first. For convenience, the 10 most recent - * refunds are always available by default on the charge object. + * Returns a list of all refunds you created. We return the refunds in sorted order, with the most + * recent refunds appearing first The 10 most recent refunds are always available by default on + * the Charge object. */ public static RefundCollection list(RefundListParams params) throws StripeException { return list(params, (RequestOptions) null); } /** - * Returns a list of all refunds you’ve previously created. The refunds are returned in sorted - * order, with the most recent refunds appearing first. For convenience, the 10 most recent - * refunds are always available by default on the charge object. + * Returns a list of all refunds you created. We return the refunds in sorted order, with the most + * recent refunds appearing first The 10 most recent refunds are always available by default on + * the Charge object. */ public static RefundCollection list(RefundListParams params, RequestOptions options) throws StripeException { @@ -497,8 +548,8 @@ public static Refund retrieve(String refund, RefundRetrieveParams params, Reques } /** - * Updates the specified refund by setting the values of the parameters passed. Any parameters not - * provided will be left unchanged. + * Updates the refund that you specify by setting the values of the passed parameters. Any + * parameters that you don’t provide remain unchanged. * *

This request only accepts {@code metadata} as an argument. */ @@ -508,8 +559,8 @@ public Refund update(Map params) throws StripeException { } /** - * Updates the specified refund by setting the values of the parameters passed. Any parameters not - * provided will be left unchanged. + * Updates the refund that you specify by setting the values of the passed parameters. Any + * parameters that you don’t provide remain unchanged. * *

This request only accepts {@code metadata} as an argument. */ @@ -528,8 +579,8 @@ public Refund update(Map params, RequestOptions options) throws } /** - * Updates the specified refund by setting the values of the parameters passed. Any parameters not - * provided will be left unchanged. + * Updates the refund that you specify by setting the values of the passed parameters. Any + * parameters that you don’t provide remain unchanged. * *

This request only accepts {@code metadata} as an argument. */ @@ -538,8 +589,8 @@ public Refund update(RefundUpdateParams params) throws StripeException { } /** - * Updates the specified refund by setting the values of the parameters passed. Any parameters not - * provided will be left unchanged. + * Updates the refund that you specify by setting the values of the passed parameters. Any + * parameters that you don’t provide remain unchanged. * *

This request only accepts {@code metadata} as an argument. */ diff --git a/src/main/java/com/stripe/model/SetupAttempt.java b/src/main/java/com/stripe/model/SetupAttempt.java index 14325a0730b..ca3345420f0 100644 --- a/src/main/java/com/stripe/model/SetupAttempt.java +++ b/src/main/java/com/stripe/model/SetupAttempt.java @@ -18,8 +18,8 @@ /** * A SetupAttempt describes one attempted confirmation of a SetupIntent, whether that confirmation - * was successful or unsuccessful. You can use SetupAttempts to inspect details of a specific - * attempt at setting up a payment method using a SetupIntent. + * is successful or unsuccessful. You can use SetupAttempts to inspect details of a specific attempt + * at setting up a payment method using a SetupIntent. */ @Getter @Setter @@ -226,12 +226,12 @@ public void setSetupIntentObject(SetupIntent expandableObject) { this.setupIntent = new ExpandableField(expandableObject.getId(), expandableObject); } - /** Returns a list of SetupAttempts associated with a provided SetupIntent. */ + /** Returns a list of SetupAttempts that associate with a provided SetupIntent. */ public static SetupAttemptCollection list(Map params) throws StripeException { return list(params, (RequestOptions) null); } - /** Returns a list of SetupAttempts associated with a provided SetupIntent. */ + /** Returns a list of SetupAttempts that associate with a provided SetupIntent. */ public static SetupAttemptCollection list(Map params, RequestOptions options) throws StripeException { String path = "/v1/setup_attempts"; @@ -246,12 +246,12 @@ public static SetupAttemptCollection list(Map params, RequestOpt ApiMode.V1); } - /** Returns a list of SetupAttempts associated with a provided SetupIntent. */ + /** Returns a list of SetupAttempts that associate with a provided SetupIntent. */ public static SetupAttemptCollection list(SetupAttemptListParams params) throws StripeException { return list(params, (RequestOptions) null); } - /** Returns a list of SetupAttempts associated with a provided SetupIntent. */ + /** Returns a list of SetupAttempts that associate with a provided SetupIntent. */ public static SetupAttemptCollection list(SetupAttemptListParams params, RequestOptions options) throws StripeException { String path = "/v1/setup_attempts"; diff --git a/src/main/java/com/stripe/model/billingportal/Session.java b/src/main/java/com/stripe/model/billingportal/Session.java index 2f01e16565f..a3380efa41f 100644 --- a/src/main/java/com/stripe/model/billingportal/Session.java +++ b/src/main/java/com/stripe/model/billingportal/Session.java @@ -347,7 +347,7 @@ public static class Item extends StripeObject implements HasId { /** * The price the customer should subscribe to through this flow. The price must also be * included in the configuration's {@code + * href="https://stripe.com/docs/api/customer_portal/configuration#portal_configuration_object-features-subscription_update-products">{@code * features.subscription_update.products}. */ @SerializedName("price") diff --git a/src/main/java/com/stripe/model/treasury/ReceivedCredit.java b/src/main/java/com/stripe/model/treasury/ReceivedCredit.java index 23296c7d3c8..35314b17ec3 100644 --- a/src/main/java/com/stripe/model/treasury/ReceivedCredit.java +++ b/src/main/java/com/stripe/model/treasury/ReceivedCredit.java @@ -400,9 +400,9 @@ public static class SourceFlowDetails extends StripeObject { * A {@code Payout} object is created when you receive funds from Stripe, or when you initiate * a payout to either a bank account or debit card of a connected Stripe - * account. You can retrieve individual payouts, as well as list all payouts. Payouts are - * made on varying - * schedules, depending on your country and industry. + * account. You can retrieve individual payouts, and list all payouts. Payouts are made on + * varying schedules, + * depending on your country and industry. * *

Related guide: Receiving payouts */ diff --git a/src/main/java/com/stripe/param/InvoiceCreateParams.java b/src/main/java/com/stripe/param/InvoiceCreateParams.java index c9b45e8455d..02e310ec97d 100644 --- a/src/main/java/com/stripe/param/InvoiceCreateParams.java +++ b/src/main/java/com/stripe/param/InvoiceCreateParams.java @@ -177,7 +177,17 @@ public class InvoiceCreateParams extends ApiRequestParams { @SerializedName("pending_invoice_items_behavior") PendingInvoiceItemsBehavior pendingInvoiceItemsBehavior; - /** Options for invoice PDF rendering. */ + /** + * The rendering-related settings that control how the invoice is displayed on customer-facing + * surfaces such as PDF and Hosted Invoice Page. + */ + @SerializedName("rendering") + Rendering rendering; + + /** + * This is a legacy field that will be removed soon. For details about {@code rendering_options}, + * refer to {@code rendering} instead. Options for invoice PDF rendering. + */ @SerializedName("rendering_options") Object renderingOptions; @@ -241,6 +251,7 @@ private InvoiceCreateParams( String onBehalfOf, PaymentSettings paymentSettings, PendingInvoiceItemsBehavior pendingInvoiceItemsBehavior, + Rendering rendering, Object renderingOptions, ShippingCost shippingCost, ShippingDetails shippingDetails, @@ -271,6 +282,7 @@ private InvoiceCreateParams( this.onBehalfOf = onBehalfOf; this.paymentSettings = paymentSettings; this.pendingInvoiceItemsBehavior = pendingInvoiceItemsBehavior; + this.rendering = rendering; this.renderingOptions = renderingOptions; this.shippingCost = shippingCost; this.shippingDetails = shippingDetails; @@ -332,6 +344,8 @@ public static class Builder { private PendingInvoiceItemsBehavior pendingInvoiceItemsBehavior; + private Rendering rendering; + private Object renderingOptions; private ShippingCost shippingCost; @@ -371,6 +385,7 @@ public InvoiceCreateParams build() { this.onBehalfOf, this.paymentSettings, this.pendingInvoiceItemsBehavior, + this.rendering, this.renderingOptions, this.shippingCost, this.shippingDetails, @@ -797,13 +812,28 @@ public Builder setPendingInvoiceItemsBehavior( return this; } - /** Options for invoice PDF rendering. */ + /** + * The rendering-related settings that control how the invoice is displayed on customer-facing + * surfaces such as PDF and Hosted Invoice Page. + */ + public Builder setRendering(InvoiceCreateParams.Rendering rendering) { + this.rendering = rendering; + return this; + } + + /** + * This is a legacy field that will be removed soon. For details about {@code + * rendering_options}, refer to {@code rendering} instead. Options for invoice PDF rendering. + */ public Builder setRenderingOptions(InvoiceCreateParams.RenderingOptions renderingOptions) { this.renderingOptions = renderingOptions; return this; } - /** Options for invoice PDF rendering. */ + /** + * This is a legacy field that will be removed soon. For details about {@code + * rendering_options}, refer to {@code rendering} instead. Options for invoice PDF rendering. + */ public Builder setRenderingOptions(EmptyParam renderingOptions) { this.renderingOptions = renderingOptions; return this; @@ -3070,6 +3100,219 @@ public enum PaymentMethodType implements ApiRequestParams.EnumParam { } } + @Getter + public static class Rendering { + /** + * How line-item prices and amounts will be displayed with respect to tax on invoice PDFs. One + * of {@code exclude_tax} or {@code include_inclusive_tax}. {@code include_inclusive_tax} will + * include inclusive tax (and exclude exclusive tax) in invoice PDF amounts. {@code exclude_tax} + * will exclude all tax (inclusive and exclusive alike) from invoice PDF amounts. + */ + @SerializedName("amount_tax_display") + ApiRequestParams.EnumParam amountTaxDisplay; + + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-level field (serialized) name in this + * param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Invoice pdf rendering options. */ + @SerializedName("pdf") + Pdf pdf; + + private Rendering( + ApiRequestParams.EnumParam amountTaxDisplay, Map extraParams, Pdf pdf) { + this.amountTaxDisplay = amountTaxDisplay; + this.extraParams = extraParams; + this.pdf = pdf; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private ApiRequestParams.EnumParam amountTaxDisplay; + + private Map extraParams; + + private Pdf pdf; + + /** Finalize and obtain parameter instance from this builder. */ + public InvoiceCreateParams.Rendering build() { + return new InvoiceCreateParams.Rendering(this.amountTaxDisplay, this.extraParams, this.pdf); + } + + /** + * How line-item prices and amounts will be displayed with respect to tax on invoice PDFs. One + * of {@code exclude_tax} or {@code include_inclusive_tax}. {@code include_inclusive_tax} will + * include inclusive tax (and exclude exclusive tax) in invoice PDF amounts. {@code + * exclude_tax} will exclude all tax (inclusive and exclusive alike) from invoice PDF amounts. + */ + public Builder setAmountTaxDisplay( + InvoiceCreateParams.Rendering.AmountTaxDisplay amountTaxDisplay) { + this.amountTaxDisplay = amountTaxDisplay; + return this; + } + + /** + * How line-item prices and amounts will be displayed with respect to tax on invoice PDFs. One + * of {@code exclude_tax} or {@code include_inclusive_tax}. {@code include_inclusive_tax} will + * include inclusive tax (and exclude exclusive tax) in invoice PDF amounts. {@code + * exclude_tax} will exclude all tax (inclusive and exclusive alike) from invoice PDF amounts. + */ + public Builder setAmountTaxDisplay(EmptyParam amountTaxDisplay) { + this.amountTaxDisplay = amountTaxDisplay; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` + * call, and subsequent calls add additional key/value pairs to the original map. See {@link + * InvoiceCreateParams.Rendering#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link InvoiceCreateParams.Rendering#extraParams} for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Invoice pdf rendering options. */ + public Builder setPdf(InvoiceCreateParams.Rendering.Pdf pdf) { + this.pdf = pdf; + return this; + } + } + + @Getter + public static class Pdf { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Page size for invoice PDF. Can be set to a4, letter, or auto. If set to auto, page size + * will be switched to a4 or letter based on customer locale. + */ + @SerializedName("page_size") + PageSize pageSize; + + private Pdf(Map extraParams, PageSize pageSize) { + this.extraParams = extraParams; + this.pageSize = pageSize; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private PageSize pageSize; + + /** Finalize and obtain parameter instance from this builder. */ + public InvoiceCreateParams.Rendering.Pdf build() { + return new InvoiceCreateParams.Rendering.Pdf(this.extraParams, this.pageSize); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link InvoiceCreateParams.Rendering.Pdf#extraParams} for the field + * documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link InvoiceCreateParams.Rendering.Pdf#extraParams} for the field + * documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Page size for invoice PDF. Can be set to a4, letter, or auto. If set to auto, page size + * will be switched to a4 or letter based on customer locale. + */ + public Builder setPageSize(InvoiceCreateParams.Rendering.Pdf.PageSize pageSize) { + this.pageSize = pageSize; + return this; + } + } + + public enum PageSize implements ApiRequestParams.EnumParam { + @SerializedName("a4") + A4("a4"), + + @SerializedName("auto") + AUTO("auto"), + + @SerializedName("letter") + LETTER("letter"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + PageSize(String value) { + this.value = value; + } + } + } + + public enum AmountTaxDisplay implements ApiRequestParams.EnumParam { + @SerializedName("exclude_tax") + EXCLUDE_TAX("exclude_tax"), + + @SerializedName("include_inclusive_tax") + INCLUDE_INCLUSIVE_TAX("include_inclusive_tax"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + AmountTaxDisplay(String value) { + this.value = value; + } + } + } + @Getter public static class RenderingOptions { /** diff --git a/src/main/java/com/stripe/param/InvoiceUpdateParams.java b/src/main/java/com/stripe/param/InvoiceUpdateParams.java index ba8c968a7f2..fd29e7c524c 100644 --- a/src/main/java/com/stripe/param/InvoiceUpdateParams.java +++ b/src/main/java/com/stripe/param/InvoiceUpdateParams.java @@ -154,7 +154,17 @@ public class InvoiceUpdateParams extends ApiRequestParams { @SerializedName("payment_settings") PaymentSettings paymentSettings; - /** Options for invoice PDF rendering. */ + /** + * The rendering-related settings that control how the invoice is displayed on customer-facing + * surfaces such as PDF and Hosted Invoice Page. + */ + @SerializedName("rendering") + Rendering rendering; + + /** + * This is a legacy field that will be removed soon. For details about {@code rendering_options}, + * refer to {@code rendering} instead. Options for invoice PDF rendering. + */ @SerializedName("rendering_options") Object renderingOptions; @@ -207,6 +217,7 @@ private InvoiceUpdateParams( Object metadata, Object onBehalfOf, PaymentSettings paymentSettings, + Rendering rendering, Object renderingOptions, Object shippingCost, Object shippingDetails, @@ -232,6 +243,7 @@ private InvoiceUpdateParams( this.metadata = metadata; this.onBehalfOf = onBehalfOf; this.paymentSettings = paymentSettings; + this.rendering = rendering; this.renderingOptions = renderingOptions; this.shippingCost = shippingCost; this.shippingDetails = shippingDetails; @@ -284,6 +296,8 @@ public static class Builder { private PaymentSettings paymentSettings; + private Rendering rendering; + private Object renderingOptions; private Object shippingCost; @@ -317,6 +331,7 @@ public InvoiceUpdateParams build() { this.metadata, this.onBehalfOf, this.paymentSettings, + this.rendering, this.renderingOptions, this.shippingCost, this.shippingDetails, @@ -786,13 +801,28 @@ public Builder setPaymentSettings(InvoiceUpdateParams.PaymentSettings paymentSet return this; } - /** Options for invoice PDF rendering. */ + /** + * The rendering-related settings that control how the invoice is displayed on customer-facing + * surfaces such as PDF and Hosted Invoice Page. + */ + public Builder setRendering(InvoiceUpdateParams.Rendering rendering) { + this.rendering = rendering; + return this; + } + + /** + * This is a legacy field that will be removed soon. For details about {@code + * rendering_options}, refer to {@code rendering} instead. Options for invoice PDF rendering. + */ public Builder setRenderingOptions(InvoiceUpdateParams.RenderingOptions renderingOptions) { this.renderingOptions = renderingOptions; return this; } - /** Options for invoice PDF rendering. */ + /** + * This is a legacy field that will be removed soon. For details about {@code + * rendering_options}, refer to {@code rendering} instead. Options for invoice PDF rendering. + */ public Builder setRenderingOptions(EmptyParam renderingOptions) { this.renderingOptions = renderingOptions; return this; @@ -3044,6 +3074,219 @@ public enum PaymentMethodType implements ApiRequestParams.EnumParam { } } + @Getter + public static class Rendering { + /** + * How line-item prices and amounts will be displayed with respect to tax on invoice PDFs. One + * of {@code exclude_tax} or {@code include_inclusive_tax}. {@code include_inclusive_tax} will + * include inclusive tax (and exclude exclusive tax) in invoice PDF amounts. {@code exclude_tax} + * will exclude all tax (inclusive and exclusive alike) from invoice PDF amounts. + */ + @SerializedName("amount_tax_display") + ApiRequestParams.EnumParam amountTaxDisplay; + + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-level field (serialized) name in this + * param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Invoice pdf rendering options. */ + @SerializedName("pdf") + Pdf pdf; + + private Rendering( + ApiRequestParams.EnumParam amountTaxDisplay, Map extraParams, Pdf pdf) { + this.amountTaxDisplay = amountTaxDisplay; + this.extraParams = extraParams; + this.pdf = pdf; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private ApiRequestParams.EnumParam amountTaxDisplay; + + private Map extraParams; + + private Pdf pdf; + + /** Finalize and obtain parameter instance from this builder. */ + public InvoiceUpdateParams.Rendering build() { + return new InvoiceUpdateParams.Rendering(this.amountTaxDisplay, this.extraParams, this.pdf); + } + + /** + * How line-item prices and amounts will be displayed with respect to tax on invoice PDFs. One + * of {@code exclude_tax} or {@code include_inclusive_tax}. {@code include_inclusive_tax} will + * include inclusive tax (and exclude exclusive tax) in invoice PDF amounts. {@code + * exclude_tax} will exclude all tax (inclusive and exclusive alike) from invoice PDF amounts. + */ + public Builder setAmountTaxDisplay( + InvoiceUpdateParams.Rendering.AmountTaxDisplay amountTaxDisplay) { + this.amountTaxDisplay = amountTaxDisplay; + return this; + } + + /** + * How line-item prices and amounts will be displayed with respect to tax on invoice PDFs. One + * of {@code exclude_tax} or {@code include_inclusive_tax}. {@code include_inclusive_tax} will + * include inclusive tax (and exclude exclusive tax) in invoice PDF amounts. {@code + * exclude_tax} will exclude all tax (inclusive and exclusive alike) from invoice PDF amounts. + */ + public Builder setAmountTaxDisplay(EmptyParam amountTaxDisplay) { + this.amountTaxDisplay = amountTaxDisplay; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` + * call, and subsequent calls add additional key/value pairs to the original map. See {@link + * InvoiceUpdateParams.Rendering#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link InvoiceUpdateParams.Rendering#extraParams} for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Invoice pdf rendering options. */ + public Builder setPdf(InvoiceUpdateParams.Rendering.Pdf pdf) { + this.pdf = pdf; + return this; + } + } + + @Getter + public static class Pdf { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Page size for invoice PDF. Can be set to a4, letter, or auto. If set to auto, page size + * will be switched to a4 or letter based on customer locale. + */ + @SerializedName("page_size") + PageSize pageSize; + + private Pdf(Map extraParams, PageSize pageSize) { + this.extraParams = extraParams; + this.pageSize = pageSize; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private PageSize pageSize; + + /** Finalize and obtain parameter instance from this builder. */ + public InvoiceUpdateParams.Rendering.Pdf build() { + return new InvoiceUpdateParams.Rendering.Pdf(this.extraParams, this.pageSize); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link InvoiceUpdateParams.Rendering.Pdf#extraParams} for the field + * documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link InvoiceUpdateParams.Rendering.Pdf#extraParams} for the field + * documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Page size for invoice PDF. Can be set to a4, letter, or auto. If set to auto, page size + * will be switched to a4 or letter based on customer locale. + */ + public Builder setPageSize(InvoiceUpdateParams.Rendering.Pdf.PageSize pageSize) { + this.pageSize = pageSize; + return this; + } + } + + public enum PageSize implements ApiRequestParams.EnumParam { + @SerializedName("a4") + A4("a4"), + + @SerializedName("auto") + AUTO("auto"), + + @SerializedName("letter") + LETTER("letter"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + PageSize(String value) { + this.value = value; + } + } + } + + public enum AmountTaxDisplay implements ApiRequestParams.EnumParam { + @SerializedName("exclude_tax") + EXCLUDE_TAX("exclude_tax"), + + @SerializedName("include_inclusive_tax") + INCLUDE_INCLUSIVE_TAX("include_inclusive_tax"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + AmountTaxDisplay(String value) { + this.value = value; + } + } + } + @Getter public static class RenderingOptions { /** diff --git a/src/main/java/com/stripe/param/PaymentIntentApplyCustomerBalanceParams.java b/src/main/java/com/stripe/param/PaymentIntentApplyCustomerBalanceParams.java index 43577857869..1d270512f33 100644 --- a/src/main/java/com/stripe/param/PaymentIntentApplyCustomerBalanceParams.java +++ b/src/main/java/com/stripe/param/PaymentIntentApplyCustomerBalanceParams.java @@ -12,15 +12,16 @@ @Getter public class PaymentIntentApplyCustomerBalanceParams extends ApiRequestParams { /** - * Amount intended to be applied to this PaymentIntent from the customer’s cash balance. + * Amount that you intend to apply to this PaymentIntent from the customer’s cash balance. * *

A positive integer representing how much to charge in the smallest currency unit (e.g., 100 - * cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). + * href="https://stripe.com/docs/currencies#zero-decimal">smallest currency unit (for example, + * 100 cents to charge 1 USD or 100 to charge 100 JPY, a zero-decimal currency). * *

The maximum amount is the amount of the PaymentIntent. * - *

When omitted, the amount defaults to the remaining amount requested on the PaymentIntent. + *

When you omit the amount, it defaults to the remaining amount requested on the + * PaymentIntent. */ @SerializedName("amount") Long amount; @@ -73,15 +74,16 @@ public PaymentIntentApplyCustomerBalanceParams build() { } /** - * Amount intended to be applied to this PaymentIntent from the customer’s cash balance. + * Amount that you intend to apply to this PaymentIntent from the customer’s cash balance. * *

A positive integer representing how much to charge in the smallest currency unit (e.g., 100 - * cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). + * href="https://stripe.com/docs/currencies#zero-decimal">smallest currency unit (for + * example, 100 cents to charge 1 USD or 100 to charge 100 JPY, a zero-decimal currency). * *

The maximum amount is the amount of the PaymentIntent. * - *

When omitted, the amount defaults to the remaining amount requested on the PaymentIntent. + *

When you omit the amount, it defaults to the remaining amount requested on the + * PaymentIntent. */ public Builder setAmount(Long amount) { this.amount = amount; diff --git a/src/main/java/com/stripe/param/PaymentIntentCancelParams.java b/src/main/java/com/stripe/param/PaymentIntentCancelParams.java index 74f52167c3e..daca3fa3ab8 100644 --- a/src/main/java/com/stripe/param/PaymentIntentCancelParams.java +++ b/src/main/java/com/stripe/param/PaymentIntentCancelParams.java @@ -12,7 +12,7 @@ @Getter public class PaymentIntentCancelParams extends ApiRequestParams { /** - * Reason for canceling this PaymentIntent. Possible values are {@code duplicate}, {@code + * Reason for canceling this PaymentIntent. Possible values are: {@code duplicate}, {@code * fraudulent}, {@code requested_by_customer}, or {@code abandoned} */ @SerializedName("cancellation_reason") @@ -55,7 +55,7 @@ public PaymentIntentCancelParams build() { } /** - * Reason for canceling this PaymentIntent. Possible values are {@code duplicate}, {@code + * Reason for canceling this PaymentIntent. Possible values are: {@code duplicate}, {@code * fraudulent}, {@code requested_by_customer}, or {@code abandoned} */ public Builder setCancellationReason( diff --git a/src/main/java/com/stripe/param/PaymentIntentCaptureParams.java b/src/main/java/com/stripe/param/PaymentIntentCaptureParams.java index bb5d1206613..809b4d00f9f 100644 --- a/src/main/java/com/stripe/param/PaymentIntentCaptureParams.java +++ b/src/main/java/com/stripe/param/PaymentIntentCaptureParams.java @@ -14,8 +14,8 @@ public class PaymentIntentCaptureParams extends ApiRequestParams { /** * The amount to capture from the PaymentIntent, which must be less than or equal to the original - * amount. Any additional amount will be automatically refunded. Defaults to the full {@code - * amount_capturable} if not provided. + * amount. Any additional amount is automatically refunded. Defaults to the full {@code + * amount_capturable} if it's not provided. */ @SerializedName("amount_to_capture") Long amountToCapture; @@ -62,14 +62,15 @@ public class PaymentIntentCaptureParams extends ApiRequestParams { /** * Provides information about a card payment that customers see on their statements. Concatenated * with the prefix (shortened descriptor) or statement descriptor that’s set on the account to - * form the complete statement descriptor. Maximum 22 characters for the concatenated descriptor. + * form the complete statement descriptor. The concatenated descriptor must be 1-22 characters + * long. */ @SerializedName("statement_descriptor_suffix") String statementDescriptorSuffix; /** - * The parameters used to automatically create a Transfer when the payment is captured. For more - * information, see the PaymentIntents use case for connected accounts. */ @SerializedName("transfer_data") @@ -130,8 +131,8 @@ public PaymentIntentCaptureParams build() { /** * The amount to capture from the PaymentIntent, which must be less than or equal to the - * original amount. Any additional amount will be automatically refunded. Defaults to the full - * {@code amount_capturable} if not provided. + * original amount. Any additional amount is automatically refunded. Defaults to the full {@code + * amount_capturable} if it's not provided. */ public Builder setAmountToCapture(Long amountToCapture) { this.amountToCapture = amountToCapture; @@ -264,8 +265,8 @@ public Builder setStatementDescriptor(String statementDescriptor) { /** * Provides information about a card payment that customers see on their statements. * Concatenated with the prefix (shortened descriptor) or statement descriptor that’s set on the - * account to form the complete statement descriptor. Maximum 22 characters for the concatenated - * descriptor. + * account to form the complete statement descriptor. The concatenated descriptor must be 1-22 + * characters long. */ public Builder setStatementDescriptorSuffix(String statementDescriptorSuffix) { this.statementDescriptorSuffix = statementDescriptorSuffix; @@ -273,8 +274,8 @@ public Builder setStatementDescriptorSuffix(String statementDescriptorSuffix) { } /** - * The parameters used to automatically create a Transfer when the payment is captured. For more - * information, see the PaymentIntents use case for connected * accounts. */ diff --git a/src/main/java/com/stripe/param/PaymentIntentConfirmParams.java b/src/main/java/com/stripe/param/PaymentIntentConfirmParams.java index 77e5f51b26c..8416a00454c 100644 --- a/src/main/java/com/stripe/param/PaymentIntentConfirmParams.java +++ b/src/main/java/com/stripe/param/PaymentIntentConfirmParams.java @@ -39,19 +39,18 @@ public class PaymentIntentConfirmParams extends ApiRequestParams { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** ID of the mandate to be used for this payment. */ + /** ID of the mandate that's used for this payment. */ @SerializedName("mandate") String mandate; - /** This hash contains details about the Mandate to create. */ @SerializedName("mandate_data") Object mandateData; /** - * Set to {@code true} to indicate that the customer is not in your checkout flow during this - * payment attempt, and therefore is unable to authenticate. This parameter is intended for - * scenarios where you collect card details and charge them later. + * Set to {@code true} to indicate that the customer isn't in your checkout flow during this + * payment attempt and can't authenticate. Use this parameter in scenarios where you collect card + * details and charge them + * later. */ @SerializedName("off_session") Object offSession; @@ -73,13 +72,13 @@ public class PaymentIntentConfirmParams extends ApiRequestParams { @SerializedName("payment_method_data") PaymentMethodData paymentMethodData; - /** Payment-method-specific configuration for this PaymentIntent. */ + /** Payment method-specific configuration for this PaymentIntent. */ @SerializedName("payment_method_options") PaymentMethodOptions paymentMethodOptions; /** - * Options to configure Radar. See Radar - * Session for more information. + * Options to configure Radar. Learn more about Radar Sessions. */ @SerializedName("radar_options") RadarOptions radarOptions; @@ -295,29 +294,27 @@ public Builder putAllExtraParam(Map map) { return this; } - /** ID of the mandate to be used for this payment. */ + /** ID of the mandate that's used for this payment. */ public Builder setMandate(String mandate) { this.mandate = mandate; return this; } - /** This hash contains details about the Mandate to create. */ public Builder setMandateData(PaymentIntentConfirmParams.MandateData mandateData) { this.mandateData = mandateData; return this; } - /** This hash contains details about the Mandate to create. */ public Builder setMandateData(EmptyParam mandateData) { this.mandateData = mandateData; return this; } /** - * Set to {@code true} to indicate that the customer is not in your checkout flow during this - * payment attempt, and therefore is unable to authenticate. This parameter is intended for - * scenarios where you collect card details and charge them later. + * Set to {@code true} to indicate that the customer isn't in your checkout flow during this + * payment attempt and can't authenticate. Use this parameter in scenarios where you collect + * card details and charge + * them later. */ public Builder setOffSession(Boolean offSession) { this.offSession = offSession; @@ -325,10 +322,10 @@ public Builder setOffSession(Boolean offSession) { } /** - * Set to {@code true} to indicate that the customer is not in your checkout flow during this - * payment attempt, and therefore is unable to authenticate. This parameter is intended for - * scenarios where you collect card details and charge them later. + * Set to {@code true} to indicate that the customer isn't in your checkout flow during this + * payment attempt and can't authenticate. Use this parameter in scenarios where you collect + * card details and charge + * them later. */ public Builder setOffSession(PaymentIntentConfirmParams.OffSession offSession) { this.offSession = offSession; @@ -357,7 +354,7 @@ public Builder setPaymentMethodData( return this; } - /** Payment-method-specific configuration for this PaymentIntent. */ + /** Payment method-specific configuration for this PaymentIntent. */ public Builder setPaymentMethodOptions( PaymentIntentConfirmParams.PaymentMethodOptions paymentMethodOptions) { this.paymentMethodOptions = paymentMethodOptions; @@ -365,8 +362,8 @@ public Builder setPaymentMethodOptions( } /** - * Options to configure Radar. See Radar - * Session for more information. + * Options to configure Radar. Learn more about Radar Sessions. */ public Builder setRadarOptions(PaymentIntentConfirmParams.RadarOptions radarOptions) { this.radarOptions = radarOptions; @@ -6392,10 +6389,9 @@ public static class AfterpayClearpay { Map extraParams; /** - * Order identifier shown to the customer in Afterpay’s online portal. We recommend using a - * value that helps you answer any questions a customer might have about the payment. The - * identifier is limited to 128 characters and may contain only letters, digits, underscores, - * backslashes and dashes. + * An internal identifier or reference that this payment corresponds to. You must limit the + * identifier to 128 characters, and it can only contain letters, numbers, underscores, + * backslashes, and dashes. This field differs from the statement descriptor and item name. */ @SerializedName("reference") String reference; @@ -6513,10 +6509,9 @@ public Builder putAllExtraParam(Map map) { } /** - * Order identifier shown to the customer in Afterpay’s online portal. We recommend using a - * value that helps you answer any questions a customer might have about the payment. The - * identifier is limited to 128 characters and may contain only letters, digits, - * underscores, backslashes and dashes. + * An internal identifier or reference that this payment corresponds to. You must limit the + * identifier to 128 characters, and it can only contain letters, numbers, underscores, + * backslashes, and dashes. This field differs from the statement descriptor and item name. */ public Builder setReference(String reference) { this.reference = reference; diff --git a/src/main/java/com/stripe/param/PaymentIntentCreateParams.java b/src/main/java/com/stripe/param/PaymentIntentCreateParams.java index c3c0342a086..ea39cb96135 100644 --- a/src/main/java/com/stripe/param/PaymentIntentCreateParams.java +++ b/src/main/java/com/stripe/param/PaymentIntentCreateParams.java @@ -36,8 +36,8 @@ public class PaymentIntentCreateParams extends ApiRequestParams { Long applicationFeeAmount; /** - * When enabled, this PaymentIntent will accept payment methods that you have enabled in the - * Dashboard and are compatible with this PaymentIntent's other parameters. + * When you enable this parameter, this PaymentIntent accepts payment methods that you enable in + * the Dashboard and that are compatible with this PaymentIntent's other parameters. */ @SerializedName("automatic_payment_methods") AutomaticPaymentMethods automaticPaymentMethods; @@ -48,11 +48,10 @@ public class PaymentIntentCreateParams extends ApiRequestParams { /** * Set to {@code true} to attempt to confirm this PaymentIntent - * immediately. This parameter defaults to {@code false}. When creating and confirming a - * PaymentIntent at the same time, parameters available in the confirm API may also be - * provided. + * href="https://stripe.com/docs/api/payment_intents/confirm">confirm this PaymentIntent this + * PaymentIntent immediately. This parameter defaults to {@code false}. When creating and + * confirming a PaymentIntent at the same time, you can also provide the parameters available in + * the Confirm API. */ @SerializedName("confirm") Boolean confirm; @@ -87,8 +86,8 @@ public class PaymentIntentCreateParams extends ApiRequestParams { /** * Set to {@code true} to fail the payment attempt if the PaymentIntent transitions into {@code - * requires_action}. This parameter is intended for simpler integrations that do not handle - * customer actions, like saving cards without * authentication. This parameter can only be used with {@code @@ -111,7 +110,7 @@ public class PaymentIntentCreateParams extends ApiRequestParams { Map extraParams; /** - * ID of the mandate to be used for this payment. This parameter can only be used with {@code * confirm=true}. */ @@ -136,11 +135,10 @@ public class PaymentIntentCreateParams extends ApiRequestParams { Map metadata; /** - * Set to {@code true} to indicate that the customer is not in your checkout flow during this - * payment attempt, and therefore is unable to authenticate. This parameter is intended for - * scenarios where you collect card details and charge them later. This - * parameter can only be used with charge them + * later. This parameter can only be used with {@code * confirm=true}. */ @@ -148,9 +146,8 @@ public class PaymentIntentCreateParams extends ApiRequestParams { Object offSession; /** - * The Stripe account ID for which these funds are intended. For details, see the PaymentIntents - * use case for connected - * accounts. + * The Stripe account ID that these funds are intended for. Learn more about the use case for connected accounts. */ @SerializedName("on_behalf_of") String onBehalfOf; @@ -160,10 +157,10 @@ public class PaymentIntentCreateParams extends ApiRequestParams { * href="https://stripe.com/docs/payments/payment-methods#compatibility">compatible Source * object) to attach to this PaymentIntent. * - *

If neither the {@code payment_method} parameter nor the {@code source} parameter are - * provided with {@code confirm=true}, {@code source} will be automatically populated with {@code - * customer.default_source} to improve the migration experience for users of the Charges API. We - * recommend that you explicitly provide the {@code payment_method} going forward. + *

If you don't provide the {@code payment_method} parameter or the {@code source} parameter + * with {@code confirm=true}, {@code source} automatically populates with {@code + * customer.default_source} to improve migration for users of the Charges API. We recommend that + * you explicitly provide the {@code payment_method} moving forward. */ @SerializedName("payment_method") String paymentMethod; @@ -181,30 +178,30 @@ public class PaymentIntentCreateParams extends ApiRequestParams { @SerializedName("payment_method_data") PaymentMethodData paymentMethodData; - /** Payment-method-specific configuration for this PaymentIntent. */ + /** Payment method-specific configuration for this PaymentIntent. */ @SerializedName("payment_method_options") PaymentMethodOptions paymentMethodOptions; /** - * The list of payment method types (e.g. card) that this PaymentIntent is allowed to use. If this - * is not provided, defaults to ["card"]. Use automatic_payment_methods to manage - * payment methods from the Stripe - * Dashboard. + * The list of payment method types (for example, a card) that this PaymentIntent can use. If you + * don't provide this, it defaults to ["card"]. Use {@code automatic_payment_methods} to + * manage payment methods from the Stripe Dashboard. */ @SerializedName("payment_method_types") List paymentMethodTypes; /** - * Options to configure Radar. See Radar - * Session for more information. + * Options to configure Radar. Learn more about Radar Sessions. */ @SerializedName("radar_options") RadarOptions radarOptions; /** - * Email address that the receipt for the resulting payment will be sent to. If {@code - * receipt_email} is specified for a payment in live mode, a receipt will be sent regardless of - * your email settings. + * Email address to send the receipt to. If you specify {@code receipt_email} for a payment in + * live mode, you send a receipt regardless of your email settings. */ @SerializedName("receipt_email") String receiptEmail; @@ -242,7 +239,7 @@ public class PaymentIntentCreateParams extends ApiRequestParams { /** * For non-card charges, you can use this value as the complete description that appears on your - * customers’ statements. Must contain at least one letter, maximum 22 characters. + * customers’ statements. It must contain at least one letter and be 1–22 characters long. */ @SerializedName("statement_descriptor") String statementDescriptor; @@ -250,23 +247,24 @@ public class PaymentIntentCreateParams extends ApiRequestParams { /** * Provides information about a card payment that customers see on their statements. Concatenated * with the prefix (shortened descriptor) or statement descriptor that’s set on the account to - * form the complete statement descriptor. Maximum 22 characters for the concatenated descriptor. + * form the complete statement descriptor. The concatenated descriptor must contain 1-22 + * characters. */ @SerializedName("statement_descriptor_suffix") String statementDescriptorSuffix; /** - * The parameters used to automatically create a Transfer when the payment succeeds. For more - * information, see the PaymentIntents use case for connected accounts. + * The parameters that you can use to automatically create a Transfer after the payment succeeds. + * Learn more about the use case for + * connected accounts. */ @SerializedName("transfer_data") TransferData transferData; /** - * A string that identifies the resulting payment as part of a group. See the PaymentIntents use case for connected - * accounts for details. + * accounts. */ @SerializedName("transfer_group") String transferGroup; @@ -479,8 +477,8 @@ public Builder setApplicationFeeAmount(Long applicationFeeAmount) { } /** - * When enabled, this PaymentIntent will accept payment methods that you have enabled in the - * Dashboard and are compatible with this PaymentIntent's other parameters. + * When you enable this parameter, this PaymentIntent accepts payment methods that you enable in + * the Dashboard and that are compatible with this PaymentIntent's other parameters. */ public Builder setAutomaticPaymentMethods( PaymentIntentCreateParams.AutomaticPaymentMethods automaticPaymentMethods) { @@ -496,11 +494,10 @@ public Builder setCaptureMethod(PaymentIntentCreateParams.CaptureMethod captureM /** * Set to {@code true} to attempt to confirm this PaymentIntent - * immediately. This parameter defaults to {@code false}. When creating and confirming a - * PaymentIntent at the same time, parameters available in the confirm API may also be - * provided. + * href="https://stripe.com/docs/api/payment_intents/confirm">confirm this PaymentIntent + * this PaymentIntent immediately. This parameter defaults to {@code false}. When creating and + * confirming a PaymentIntent at the same time, you can also provide the parameters available in + * the Confirm API. */ public Builder setConfirm(Boolean confirm) { this.confirm = confirm; @@ -546,8 +543,8 @@ public Builder setDescription(String description) { /** * Set to {@code true} to fail the payment attempt if the PaymentIntent transitions into {@code - * requires_action}. This parameter is intended for simpler integrations that do not handle - * customer actions, like saving cards without * authentication. This parameter can only be used with {@code @@ -611,7 +608,7 @@ public Builder putAllExtraParam(Map map) { } /** - * ID of the mandate to be used for this payment. This parameter can only be used with {@code * confirm=true}. */ @@ -669,11 +666,10 @@ public Builder putAllMetadata(Map map) { } /** - * Set to {@code true} to indicate that the customer is not in your checkout flow during this - * payment attempt, and therefore is unable to authenticate. This parameter is intended for - * scenarios where you collect card details and charge them later. - * This parameter can only be used with charge + * them later. This parameter can only be used with {@code * confirm=true}. */ @@ -683,11 +679,10 @@ public Builder setOffSession(Boolean offSession) { } /** - * Set to {@code true} to indicate that the customer is not in your checkout flow during this - * payment attempt, and therefore is unable to authenticate. This parameter is intended for - * scenarios where you collect card details and charge them later. - * This parameter can only be used with charge + * them later. This parameter can only be used with {@code * confirm=true}. */ @@ -697,8 +692,8 @@ public Builder setOffSession(PaymentIntentCreateParams.OffSession offSession) { } /** - * The Stripe account ID for which these funds are intended. For details, see the PaymentIntents - * use case for connected + * The Stripe account ID that these funds are intended for. Learn more about the use case for connected * accounts. */ public Builder setOnBehalfOf(String onBehalfOf) { @@ -711,10 +706,10 @@ public Builder setOnBehalfOf(String onBehalfOf) { * href="https://stripe.com/docs/payments/payment-methods#compatibility">compatible Source * object) to attach to this PaymentIntent. * - *

If neither the {@code payment_method} parameter nor the {@code source} parameter are - * provided with {@code confirm=true}, {@code source} will be automatically populated with - * {@code customer.default_source} to improve the migration experience for users of the Charges - * API. We recommend that you explicitly provide the {@code payment_method} going forward. + *

If you don't provide the {@code payment_method} parameter or the {@code source} parameter + * with {@code confirm=true}, {@code source} automatically populates with {@code + * customer.default_source} to improve migration for users of the Charges API. We recommend that + * you explicitly provide the {@code payment_method} moving forward. */ public Builder setPaymentMethod(String paymentMethod) { this.paymentMethod = paymentMethod; @@ -739,7 +734,7 @@ public Builder setPaymentMethodData( return this; } - /** Payment-method-specific configuration for this PaymentIntent. */ + /** Payment method-specific configuration for this PaymentIntent. */ public Builder setPaymentMethodOptions( PaymentIntentCreateParams.PaymentMethodOptions paymentMethodOptions) { this.paymentMethodOptions = paymentMethodOptions; @@ -773,8 +768,8 @@ public Builder addAllPaymentMethodType(List elements) { } /** - * Options to configure Radar. See Radar - * Session for more information. + * Options to configure Radar. Learn more about Radar Sessions. */ public Builder setRadarOptions(PaymentIntentCreateParams.RadarOptions radarOptions) { this.radarOptions = radarOptions; @@ -782,9 +777,9 @@ public Builder setRadarOptions(PaymentIntentCreateParams.RadarOptions radarOptio } /** - * Email address that the receipt for the resulting payment will be sent to. If {@code - * receipt_email} is specified for a payment in live mode, a receipt will be sent regardless of - * your email settings. + * Email address to send the receipt to. If you specify {@code receipt_email} for a payment in + * live mode, you send a receipt regardless of your email settings. */ public Builder setReceiptEmail(String receiptEmail) { this.receiptEmail = receiptEmail; @@ -831,7 +826,7 @@ public Builder setShipping(PaymentIntentCreateParams.Shipping shipping) { /** * For non-card charges, you can use this value as the complete description that appears on your - * customers’ statements. Must contain at least one letter, maximum 22 characters. + * customers’ statements. It must contain at least one letter and be 1–22 characters long. */ public Builder setStatementDescriptor(String statementDescriptor) { this.statementDescriptor = statementDescriptor; @@ -841,8 +836,8 @@ public Builder setStatementDescriptor(String statementDescriptor) { /** * Provides information about a card payment that customers see on their statements. * Concatenated with the prefix (shortened descriptor) or statement descriptor that’s set on the - * account to form the complete statement descriptor. Maximum 22 characters for the concatenated - * descriptor. + * account to form the complete statement descriptor. The concatenated descriptor must contain + * 1-22 characters. */ public Builder setStatementDescriptorSuffix(String statementDescriptorSuffix) { this.statementDescriptorSuffix = statementDescriptorSuffix; @@ -850,8 +845,8 @@ public Builder setStatementDescriptorSuffix(String statementDescriptorSuffix) { } /** - * The parameters used to automatically create a Transfer when the payment succeeds. For more - * information, see the PaymentIntents use case for connected * accounts. */ @@ -861,9 +856,9 @@ public Builder setTransferData(PaymentIntentCreateParams.TransferData transferDa } /** - * A string that identifies the resulting payment as part of a group. See the PaymentIntents use case for connected - * accounts for details. + * accounts. */ public Builder setTransferGroup(String transferGroup) { this.transferGroup = transferGroup; @@ -6903,10 +6898,9 @@ public static class AfterpayClearpay { Map extraParams; /** - * Order identifier shown to the customer in Afterpay’s online portal. We recommend using a - * value that helps you answer any questions a customer might have about the payment. The - * identifier is limited to 128 characters and may contain only letters, digits, underscores, - * backslashes and dashes. + * An internal identifier or reference that this payment corresponds to. You must limit the + * identifier to 128 characters, and it can only contain letters, numbers, underscores, + * backslashes, and dashes. This field differs from the statement descriptor and item name. */ @SerializedName("reference") String reference; @@ -7024,10 +7018,9 @@ public Builder putAllExtraParam(Map map) { } /** - * Order identifier shown to the customer in Afterpay’s online portal. We recommend using a - * value that helps you answer any questions a customer might have about the payment. The - * identifier is limited to 128 characters and may contain only letters, digits, - * underscores, backslashes and dashes. + * An internal identifier or reference that this payment corresponds to. You must limit the + * identifier to 128 characters, and it can only contain letters, numbers, underscores, + * backslashes, and dashes. This field differs from the statement descriptor and item name. */ public Builder setReference(String reference) { this.reference = reference; diff --git a/src/main/java/com/stripe/param/PaymentIntentIncrementAuthorizationParams.java b/src/main/java/com/stripe/param/PaymentIntentIncrementAuthorizationParams.java index 52a234eb26e..8bb9d4a4372 100644 --- a/src/main/java/com/stripe/param/PaymentIntentIncrementAuthorizationParams.java +++ b/src/main/java/com/stripe/param/PaymentIntentIncrementAuthorizationParams.java @@ -12,8 +12,8 @@ @Getter public class PaymentIntentIncrementAuthorizationParams extends ApiRequestParams { /** - * Required. The updated total amount you intend to collect from the cardholder. - * This amount must be greater than the currently authorized amount. + * Required. The updated total amount that you intend to collect from the + * cardholder. This amount must be greater than the currently authorized amount. */ @SerializedName("amount") Long amount; @@ -62,9 +62,9 @@ public class PaymentIntentIncrementAuthorizationParams extends ApiRequestParams String statementDescriptor; /** - * The parameters used to automatically create a Transfer when the payment is captured. For more - * information, see the PaymentIntents use case for connected accounts. + * The parameters used to automatically create a transfer after the payment is captured. Learn + * more about the use case for + * connected accounts. */ @SerializedName("transfer_data") TransferData transferData; @@ -123,7 +123,7 @@ public PaymentIntentIncrementAuthorizationParams build() { } /** - * Required. The updated total amount you intend to collect from the + * Required. The updated total amount that you intend to collect from the * cardholder. This amount must be greater than the currently authorized amount. */ public Builder setAmount(Long amount) { @@ -238,10 +238,9 @@ public Builder setStatementDescriptor(String statementDescriptor) { } /** - * The parameters used to automatically create a Transfer when the payment is captured. For more - * information, see the PaymentIntents use case for connected - * accounts. + * The parameters used to automatically create a transfer after the payment is captured. Learn + * more about the use case for + * connected accounts. */ public Builder setTransferData( PaymentIntentIncrementAuthorizationParams.TransferData transferData) { diff --git a/src/main/java/com/stripe/param/PaymentIntentListParams.java b/src/main/java/com/stripe/param/PaymentIntentListParams.java index 3b46deac77f..ec194bedc13 100644 --- a/src/main/java/com/stripe/param/PaymentIntentListParams.java +++ b/src/main/java/com/stripe/param/PaymentIntentListParams.java @@ -13,12 +13,12 @@ public class PaymentIntentListParams extends ApiRequestParams { /** * A filter on the list, based on the object {@code created} field. The value can be a string with - * an integer Unix timestamp, or it can be a dictionary with a number of different query options. + * an integer Unix timestamp or a dictionary with a number of different query options. */ @SerializedName("created") Object created; - /** Only return PaymentIntents for the customer specified by this customer ID. */ + /** Only return PaymentIntents for the customer that this customer ID specifies. */ @SerializedName("customer") String customer; @@ -110,8 +110,7 @@ public PaymentIntentListParams build() { /** * A filter on the list, based on the object {@code created} field. The value can be a string - * with an integer Unix timestamp, or it can be a dictionary with a number of different query - * options. + * with an integer Unix timestamp or a dictionary with a number of different query options. */ public Builder setCreated(PaymentIntentListParams.Created created) { this.created = created; @@ -120,15 +119,14 @@ public Builder setCreated(PaymentIntentListParams.Created created) { /** * A filter on the list, based on the object {@code created} field. The value can be a string - * with an integer Unix timestamp, or it can be a dictionary with a number of different query - * options. + * with an integer Unix timestamp or a dictionary with a number of different query options. */ public Builder setCreated(Long created) { this.created = created; return this; } - /** Only return PaymentIntents for the customer specified by this customer ID. */ + /** Only return PaymentIntents for the customer that this customer ID specifies. */ public Builder setCustomer(String customer) { this.customer = customer; return this; diff --git a/src/main/java/com/stripe/param/PaymentIntentRetrieveParams.java b/src/main/java/com/stripe/param/PaymentIntentRetrieveParams.java index 92cb9e799e4..e40828bcbcf 100644 --- a/src/main/java/com/stripe/param/PaymentIntentRetrieveParams.java +++ b/src/main/java/com/stripe/param/PaymentIntentRetrieveParams.java @@ -12,7 +12,7 @@ @Getter public class PaymentIntentRetrieveParams extends ApiRequestParams { /** - * The client secret of the PaymentIntent. It's required if you use a publishable key to retrieve + * The client secret of the PaymentIntent. We require it if you use a publishable key to retrieve * the source. */ @SerializedName("client_secret") @@ -55,7 +55,7 @@ public PaymentIntentRetrieveParams build() { } /** - * The client secret of the PaymentIntent. It's required if you use a publishable key to + * The client secret of the PaymentIntent. We require it if you use a publishable key to * retrieve the source. */ public Builder setClientSecret(String clientSecret) { diff --git a/src/main/java/com/stripe/param/PaymentIntentUpdateParams.java b/src/main/java/com/stripe/param/PaymentIntentUpdateParams.java index 49169159d01..12990cb9d03 100644 --- a/src/main/java/com/stripe/param/PaymentIntentUpdateParams.java +++ b/src/main/java/com/stripe/param/PaymentIntentUpdateParams.java @@ -6398,10 +6398,9 @@ public static class AfterpayClearpay { Map extraParams; /** - * Order identifier shown to the customer in Afterpay’s online portal. We recommend using a - * value that helps you answer any questions a customer might have about the payment. The - * identifier is limited to 128 characters and may contain only letters, digits, underscores, - * backslashes and dashes. + * An internal identifier or reference that this payment corresponds to. You must limit the + * identifier to 128 characters, and it can only contain letters, numbers, underscores, + * backslashes, and dashes. This field differs from the statement descriptor and item name. */ @SerializedName("reference") Object reference; @@ -6519,10 +6518,9 @@ public Builder putAllExtraParam(Map map) { } /** - * Order identifier shown to the customer in Afterpay’s online portal. We recommend using a - * value that helps you answer any questions a customer might have about the payment. The - * identifier is limited to 128 characters and may contain only letters, digits, - * underscores, backslashes and dashes. + * An internal identifier or reference that this payment corresponds to. You must limit the + * identifier to 128 characters, and it can only contain letters, numbers, underscores, + * backslashes, and dashes. This field differs from the statement descriptor and item name. */ public Builder setReference(String reference) { this.reference = reference; @@ -6530,10 +6528,9 @@ public Builder setReference(String reference) { } /** - * Order identifier shown to the customer in Afterpay’s online portal. We recommend using a - * value that helps you answer any questions a customer might have about the payment. The - * identifier is limited to 128 characters and may contain only letters, digits, - * underscores, backslashes and dashes. + * An internal identifier or reference that this payment corresponds to. You must limit the + * identifier to 128 characters, and it can only contain letters, numbers, underscores, + * backslashes, and dashes. This field differs from the statement descriptor and item name. */ public Builder setReference(EmptyParam reference) { this.reference = reference; diff --git a/src/main/java/com/stripe/param/PaymentSourceVerifyParams.java b/src/main/java/com/stripe/param/PaymentSourceVerifyParams.java new file mode 100644 index 00000000000..dcff5b2494d --- /dev/null +++ b/src/main/java/com/stripe/param/PaymentSourceVerifyParams.java @@ -0,0 +1,135 @@ +// File generated from our OpenAPI spec +package com.stripe.param; + +import com.google.gson.annotations.SerializedName; +import com.stripe.net.ApiRequestParams; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import lombok.Getter; + +@Getter +public class PaymentSourceVerifyParams extends ApiRequestParams { + /** + * Two positive integers, in cents, equal to the values of the microdeposits sent to the + * bank account. + */ + @SerializedName("amounts") + List amounts; + + /** Specifies which fields in the response should be expanded. */ + @SerializedName("expand") + List expand; + + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-level field (serialized) name in this + * param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + private PaymentSourceVerifyParams( + List amounts, List expand, Map extraParams) { + this.amounts = amounts; + this.expand = expand; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private List amounts; + + private List expand; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentSourceVerifyParams build() { + return new PaymentSourceVerifyParams(this.amounts, this.expand, this.extraParams); + } + + /** + * Add an element to `amounts` list. A list is initialized for the first `add/addAll` call, and + * subsequent calls adds additional elements to the original list. See {@link + * PaymentSourceVerifyParams#amounts} for the field documentation. + */ + public Builder addAmount(Long element) { + if (this.amounts == null) { + this.amounts = new ArrayList<>(); + } + this.amounts.add(element); + return this; + } + + /** + * Add all elements to `amounts` list. A list is initialized for the first `add/addAll` call, + * and subsequent calls adds additional elements to the original list. See {@link + * PaymentSourceVerifyParams#amounts} for the field documentation. + */ + public Builder addAllAmount(List elements) { + if (this.amounts == null) { + this.amounts = new ArrayList<>(); + } + this.amounts.addAll(elements); + return this; + } + + /** + * Add an element to `expand` list. A list is initialized for the first `add/addAll` call, and + * subsequent calls adds additional elements to the original list. See {@link + * PaymentSourceVerifyParams#expand} for the field documentation. + */ + public Builder addExpand(String element) { + if (this.expand == null) { + this.expand = new ArrayList<>(); + } + this.expand.add(element); + return this; + } + + /** + * Add all elements to `expand` list. A list is initialized for the first `add/addAll` call, and + * subsequent calls adds additional elements to the original list. See {@link + * PaymentSourceVerifyParams#expand} for the field documentation. + */ + public Builder addAllExpand(List elements) { + if (this.expand == null) { + this.expand = new ArrayList<>(); + } + this.expand.addAll(elements); + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` + * call, and subsequent calls add additional key/value pairs to the original map. See {@link + * PaymentSourceVerifyParams#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link PaymentSourceVerifyParams#extraParams} for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } +} diff --git a/src/main/java/com/stripe/param/PayoutCreateParams.java b/src/main/java/com/stripe/param/PayoutCreateParams.java index 271d792d01d..5e70e7bd6b0 100644 --- a/src/main/java/com/stripe/param/PayoutCreateParams.java +++ b/src/main/java/com/stripe/param/PayoutCreateParams.java @@ -28,8 +28,8 @@ public class PayoutCreateParams extends ApiRequestParams { String description; /** - * The ID of a bank account or a card to send the payout to. If no destination is supplied, the - * default external account for the specified currency will be used. + * The ID of a bank account or a card to send the payout to. If you don't provide a destination, + * we use the default external account for the specified currency. */ @SerializedName("destination") String destination; @@ -57,27 +57,27 @@ public class PayoutCreateParams extends ApiRequestParams { Map metadata; /** - * The method used to send this payout, which can be {@code standard} or {@code instant}. {@code - * instant} is supported for payouts to debit cards and bank accounts in certain countries. (See - * Bank support for Instant - * Payouts for more information.) + * The method used to send this payout, which is {@code standard} or {@code instant}. We support + * {@code instant} for payouts to debit cards and bank accounts in certain countries. Learn more + * about bank support for Instant + * Payouts. */ @SerializedName("method") Method method; /** * The balance type of your Stripe balance to draw this payout from. Balances for different - * payment sources are kept separately. You can find the amounts with the balances API. One of + * payment sources are kept separately. You can find the amounts with the Balances API. One of * {@code bank_account}, {@code card}, or {@code fpx}. */ @SerializedName("source_type") SourceType sourceType; /** - * A string to be displayed on the recipient's bank or card statement. This may be at most 22 - * characters. Attempting to use a {@code statement_descriptor} longer than 22 characters will - * return an error. Note: Most banks will truncate this information and/or display it - * inconsistently. Some may not display it at all. + * A string that displays on the recipient's bank or card statement (up to 22 characters). A + * {@code statement_descriptor} that's longer than 22 characters return an error. Most banks + * truncate this information and display it inconsistently. Some banks might not display it at + * all. */ @SerializedName("statement_descriptor") String statementDescriptor; @@ -168,8 +168,8 @@ public Builder setDescription(String description) { } /** - * The ID of a bank account or a card to send the payout to. If no destination is supplied, the - * default external account for the specified currency will be used. + * The ID of a bank account or a card to send the payout to. If you don't provide a destination, + * we use the default external account for the specified currency. */ public Builder setDestination(String destination) { this.destination = destination; @@ -255,10 +255,10 @@ public Builder putAllMetadata(Map map) { } /** - * The method used to send this payout, which can be {@code standard} or {@code instant}. {@code - * instant} is supported for payouts to debit cards and bank accounts in certain countries. (See - * Bank support for Instant - * Payouts for more information.) + * The method used to send this payout, which is {@code standard} or {@code instant}. We support + * {@code instant} for payouts to debit cards and bank accounts in certain countries. Learn more + * about bank support for + * Instant Payouts. */ public Builder setMethod(PayoutCreateParams.Method method) { this.method = method; @@ -267,7 +267,7 @@ public Builder setMethod(PayoutCreateParams.Method method) { /** * The balance type of your Stripe balance to draw this payout from. Balances for different - * payment sources are kept separately. You can find the amounts with the balances API. One of + * payment sources are kept separately. You can find the amounts with the Balances API. One of * {@code bank_account}, {@code card}, or {@code fpx}. */ public Builder setSourceType(PayoutCreateParams.SourceType sourceType) { @@ -276,10 +276,10 @@ public Builder setSourceType(PayoutCreateParams.SourceType sourceType) { } /** - * A string to be displayed on the recipient's bank or card statement. This may be at most 22 - * characters. Attempting to use a {@code statement_descriptor} longer than 22 characters will - * return an error. Note: Most banks will truncate this information and/or display it - * inconsistently. Some may not display it at all. + * A string that displays on the recipient's bank or card statement (up to 22 characters). A + * {@code statement_descriptor} that's longer than 22 characters return an error. Most banks + * truncate this information and display it inconsistently. Some banks might not display it at + * all. */ public Builder setStatementDescriptor(String statementDescriptor) { this.statementDescriptor = statementDescriptor; diff --git a/src/main/java/com/stripe/param/RefundCreateParams.java b/src/main/java/com/stripe/param/RefundCreateParams.java index fba7eddce21..4ffb7133cc1 100644 --- a/src/main/java/com/stripe/param/RefundCreateParams.java +++ b/src/main/java/com/stripe/param/RefundCreateParams.java @@ -12,10 +12,10 @@ @Getter public class RefundCreateParams extends ApiRequestParams { - /** A positive integer representing how much to refund. */ @SerializedName("amount") Long amount; + /** The identifier of the charge to refund. */ @SerializedName("charge") String charge; @@ -63,15 +63,36 @@ public class RefundCreateParams extends ApiRequestParams { @SerializedName("origin") Origin origin; + /** The identifier of the PaymentIntent to refund. */ @SerializedName("payment_intent") String paymentIntent; + /** + * String indicating the reason for the refund. If set, possible values are {@code duplicate}, + * {@code fraudulent}, and {@code requested_by_customer}. If you believe the charge to be + * fraudulent, specifying {@code fraudulent} as the reason will add the associated card and email + * to your block lists, and will also help us + * improve our fraud detection algorithms. + */ @SerializedName("reason") Reason reason; + /** + * Boolean indicating whether the application fee should be refunded when refunding this charge. + * If a full charge refund is given, the full application fee will be refunded. Otherwise, the + * application fee will be refunded in an amount proportional to the amount of the charge + * refunded. An application fee can be refunded only by the application that created the charge. + */ @SerializedName("refund_application_fee") Boolean refundApplicationFee; + /** + * Boolean indicating whether the transfer should be reversed when refunding this charge. The + * transfer will be reversed proportionally to the amount being refunded (either the entire or + * partial amount).
+ *
+ * A transfer can be reversed only by the application that created the charge. + */ @SerializedName("reverse_transfer") Boolean reverseTransfer; @@ -153,12 +174,12 @@ public RefundCreateParams build() { this.reverseTransfer); } - /** A positive integer representing how much to refund. */ public Builder setAmount(Long amount) { this.amount = amount; return this; } + /** The identifier of the charge to refund. */ public Builder setCharge(String charge) { this.charge = charge; return this; @@ -297,21 +318,42 @@ public Builder setOrigin(RefundCreateParams.Origin origin) { return this; } + /** The identifier of the PaymentIntent to refund. */ public Builder setPaymentIntent(String paymentIntent) { this.paymentIntent = paymentIntent; return this; } + /** + * String indicating the reason for the refund. If set, possible values are {@code duplicate}, + * {@code fraudulent}, and {@code requested_by_customer}. If you believe the charge to be + * fraudulent, specifying {@code fraudulent} as the reason will add the associated card and + * email to your block lists, and will also + * help us improve our fraud detection algorithms. + */ public Builder setReason(RefundCreateParams.Reason reason) { this.reason = reason; return this; } + /** + * Boolean indicating whether the application fee should be refunded when refunding this charge. + * If a full charge refund is given, the full application fee will be refunded. Otherwise, the + * application fee will be refunded in an amount proportional to the amount of the charge + * refunded. An application fee can be refunded only by the application that created the charge. + */ public Builder setRefundApplicationFee(Boolean refundApplicationFee) { this.refundApplicationFee = refundApplicationFee; return this; } + /** + * Boolean indicating whether the transfer should be reversed when refunding this charge. The + * transfer will be reversed proportionally to the amount being refunded (either the entire or + * partial amount).
+ *
+ * A transfer can be reversed only by the application that created the charge. + */ public Builder setReverseTransfer(Boolean reverseTransfer) { this.reverseTransfer = reverseTransfer; return this; diff --git a/src/main/java/com/stripe/param/SetupAttemptListParams.java b/src/main/java/com/stripe/param/SetupAttemptListParams.java index 2480381f9fd..65e36d83d6c 100644 --- a/src/main/java/com/stripe/param/SetupAttemptListParams.java +++ b/src/main/java/com/stripe/param/SetupAttemptListParams.java @@ -13,7 +13,7 @@ public class SetupAttemptListParams extends ApiRequestParams { /** * A filter on the list, based on the object {@code created} field. The value can be a string with - * an integer Unix timestamp, or it can be a dictionary with a number of different query options. + * an integer Unix timestamp or a dictionary with a number of different query options. */ @SerializedName("created") Object created; @@ -113,8 +113,7 @@ public SetupAttemptListParams build() { /** * A filter on the list, based on the object {@code created} field. The value can be a string - * with an integer Unix timestamp, or it can be a dictionary with a number of different query - * options. + * with an integer Unix timestamp or a dictionary with a number of different query options. */ public Builder setCreated(SetupAttemptListParams.Created created) { this.created = created; @@ -123,8 +122,7 @@ public Builder setCreated(SetupAttemptListParams.Created created) { /** * A filter on the list, based on the object {@code created} field. The value can be a string - * with an integer Unix timestamp, or it can be a dictionary with a number of different query - * options. + * with an integer Unix timestamp or a dictionary with a number of different query options. */ public Builder setCreated(Long created) { this.created = created; diff --git a/src/main/java/com/stripe/param/WebhookEndpointCreateParams.java b/src/main/java/com/stripe/param/WebhookEndpointCreateParams.java index ed87e9cc4e8..26819929718 100644 --- a/src/main/java/com/stripe/param/WebhookEndpointCreateParams.java +++ b/src/main/java/com/stripe/param/WebhookEndpointCreateParams.java @@ -898,9 +898,6 @@ public enum EnabledEvent implements ApiRequestParams.EnumParam { @SerializedName("mandate.updated") MANDATE__UPDATED("mandate.updated"), - @SerializedName("order.created") - ORDER__CREATED("order.created"), - @SerializedName("payment_intent.amount_capturable_updated") PAYMENT_INTENT__AMOUNT_CAPTURABLE_UPDATED("payment_intent.amount_capturable_updated"), @@ -1021,15 +1018,6 @@ public enum EnabledEvent implements ApiRequestParams.EnumParam { @SerializedName("radar.early_fraud_warning.updated") RADAR__EARLY_FRAUD_WARNING__UPDATED("radar.early_fraud_warning.updated"), - @SerializedName("recipient.created") - RECIPIENT__CREATED("recipient.created"), - - @SerializedName("recipient.deleted") - RECIPIENT__DELETED("recipient.deleted"), - - @SerializedName("recipient.updated") - RECIPIENT__UPDATED("recipient.updated"), - @SerializedName("refund.created") REFUND__CREATED("refund.created"), @@ -1069,15 +1057,6 @@ public enum EnabledEvent implements ApiRequestParams.EnumParam { @SerializedName("sigma.scheduled_query_run.created") SIGMA__SCHEDULED_QUERY_RUN__CREATED("sigma.scheduled_query_run.created"), - @SerializedName("sku.created") - SKU__CREATED("sku.created"), - - @SerializedName("sku.deleted") - SKU__DELETED("sku.deleted"), - - @SerializedName("sku.updated") - SKU__UPDATED("sku.updated"), - @SerializedName("source.canceled") SOURCE__CANCELED("source.canceled"), @@ -1263,7 +1242,28 @@ public enum EnabledEvent implements ApiRequestParams.EnumParam { TREASURY__RECEIVED_DEBIT__CREATED("treasury.received_debit.created"), @SerializedName("invoiceitem.updated") - INVOICEITEM__UPDATED("invoiceitem.updated"); + INVOICEITEM__UPDATED("invoiceitem.updated"), + + @SerializedName("order.created") + ORDER__CREATED("order.created"), + + @SerializedName("recipient.created") + RECIPIENT__CREATED("recipient.created"), + + @SerializedName("recipient.deleted") + RECIPIENT__DELETED("recipient.deleted"), + + @SerializedName("recipient.updated") + RECIPIENT__UPDATED("recipient.updated"), + + @SerializedName("sku.created") + SKU__CREATED("sku.created"), + + @SerializedName("sku.deleted") + SKU__DELETED("sku.deleted"), + + @SerializedName("sku.updated") + SKU__UPDATED("sku.updated"); @Getter(onMethod_ = {@Override}) private final String value; diff --git a/src/main/java/com/stripe/param/WebhookEndpointUpdateParams.java b/src/main/java/com/stripe/param/WebhookEndpointUpdateParams.java index d0e9c0408cc..1278f81f97e 100644 --- a/src/main/java/com/stripe/param/WebhookEndpointUpdateParams.java +++ b/src/main/java/com/stripe/param/WebhookEndpointUpdateParams.java @@ -571,9 +571,6 @@ public enum EnabledEvent implements ApiRequestParams.EnumParam { @SerializedName("mandate.updated") MANDATE__UPDATED("mandate.updated"), - @SerializedName("order.created") - ORDER__CREATED("order.created"), - @SerializedName("payment_intent.amount_capturable_updated") PAYMENT_INTENT__AMOUNT_CAPTURABLE_UPDATED("payment_intent.amount_capturable_updated"), @@ -694,15 +691,6 @@ public enum EnabledEvent implements ApiRequestParams.EnumParam { @SerializedName("radar.early_fraud_warning.updated") RADAR__EARLY_FRAUD_WARNING__UPDATED("radar.early_fraud_warning.updated"), - @SerializedName("recipient.created") - RECIPIENT__CREATED("recipient.created"), - - @SerializedName("recipient.deleted") - RECIPIENT__DELETED("recipient.deleted"), - - @SerializedName("recipient.updated") - RECIPIENT__UPDATED("recipient.updated"), - @SerializedName("refund.created") REFUND__CREATED("refund.created"), @@ -742,15 +730,6 @@ public enum EnabledEvent implements ApiRequestParams.EnumParam { @SerializedName("sigma.scheduled_query_run.created") SIGMA__SCHEDULED_QUERY_RUN__CREATED("sigma.scheduled_query_run.created"), - @SerializedName("sku.created") - SKU__CREATED("sku.created"), - - @SerializedName("sku.deleted") - SKU__DELETED("sku.deleted"), - - @SerializedName("sku.updated") - SKU__UPDATED("sku.updated"), - @SerializedName("source.canceled") SOURCE__CANCELED("source.canceled"), @@ -936,7 +915,28 @@ public enum EnabledEvent implements ApiRequestParams.EnumParam { TREASURY__RECEIVED_DEBIT__CREATED("treasury.received_debit.created"), @SerializedName("invoiceitem.updated") - INVOICEITEM__UPDATED("invoiceitem.updated"); + INVOICEITEM__UPDATED("invoiceitem.updated"), + + @SerializedName("order.created") + ORDER__CREATED("order.created"), + + @SerializedName("recipient.created") + RECIPIENT__CREATED("recipient.created"), + + @SerializedName("recipient.deleted") + RECIPIENT__DELETED("recipient.deleted"), + + @SerializedName("recipient.updated") + RECIPIENT__UPDATED("recipient.updated"), + + @SerializedName("sku.created") + SKU__CREATED("sku.created"), + + @SerializedName("sku.deleted") + SKU__DELETED("sku.deleted"), + + @SerializedName("sku.updated") + SKU__UPDATED("sku.updated"); @Getter(onMethod_ = {@Override}) private final String value; diff --git a/src/main/java/com/stripe/service/PaymentIntentService.java b/src/main/java/com/stripe/service/PaymentIntentService.java index d620e1be7ea..43b109ae854 100644 --- a/src/main/java/com/stripe/service/PaymentIntentService.java +++ b/src/main/java/com/stripe/service/PaymentIntentService.java @@ -68,13 +68,13 @@ public StripeSearchResult search( * *

After the PaymentIntent is created, attach a payment method and confirm to continue the payment. - * You can read more about the different payment flows available via the Payment Intents API here. + * Learn more about the available + * payment flows with the Payment Intents API. * - *

When {@code confirm=true} is used during creation, it is equivalent to creating and - * confirming the PaymentIntent in the same call. You may use any parameters available in the confirm API when {@code - * confirm=true} is supplied. + *

When you use {@code confirm=true} during creation, it’s equivalent to creating and + * confirming the PaymentIntent in the same call. You can use any parameters available in the confirm API when you supply + * {@code confirm=true}. */ public PaymentIntent create(PaymentIntentCreateParams params) throws StripeException { return create(params, (RequestOptions) null); @@ -84,13 +84,13 @@ public PaymentIntent create(PaymentIntentCreateParams params) throws StripeExcep * *

After the PaymentIntent is created, attach a payment method and confirm to continue the payment. - * You can read more about the different payment flows available via the Payment Intents API here. + * Learn more about the available + * payment flows with the Payment Intents API. * - *

When {@code confirm=true} is used during creation, it is equivalent to creating and - * confirming the PaymentIntent in the same call. You may use any parameters available in the confirm API when {@code - * confirm=true} is supplied. + *

When you use {@code confirm=true} during creation, it’s equivalent to creating and + * confirming the PaymentIntent in the same call. You can use any parameters available in the confirm API when you supply + * {@code confirm=true}. */ public PaymentIntent create(PaymentIntentCreateParams params, RequestOptions options) throws StripeException { @@ -369,16 +369,16 @@ public PaymentIntent confirm( ApiMode.V1); } /** - * A PaymentIntent object can be canceled when it is in one of these statuses: {@code + * You can cancel a PaymentIntent object when it’s in one of these statuses: {@code * requires_payment_method}, {@code requires_capture}, {@code requires_confirmation}, {@code * requires_action} or, in rare cases, * {@code processing}. * - *

Once canceled, no additional charges will be made by the PaymentIntent and any operations on - * the PaymentIntent will fail with an error. For PaymentIntents with a {@code status} of {@code - * requires_capture}, the remaining {@code amount_capturable} will automatically be refunded. + *

After it’s canceled, no additional charges are made by the PaymentIntent and any operations + * on the PaymentIntent fail with an error. For PaymentIntents with a {@code status} of {@code + * requires_capture}, the remaining {@code amount_capturable} is automatically refunded. * - *

You cannot cancel the PaymentIntent for a Checkout Session. You can’t cancel the PaymentIntent for a Checkout Session. Expire the Checkout Session * instead. */ @@ -387,16 +387,16 @@ public PaymentIntent cancel(String intent, PaymentIntentCancelParams params) return cancel(intent, params, (RequestOptions) null); } /** - * A PaymentIntent object can be canceled when it is in one of these statuses: {@code + * You can cancel a PaymentIntent object when it’s in one of these statuses: {@code * requires_payment_method}, {@code requires_capture}, {@code requires_confirmation}, {@code * requires_action} or, in rare cases, * {@code processing}. * - *

Once canceled, no additional charges will be made by the PaymentIntent and any operations on - * the PaymentIntent will fail with an error. For PaymentIntents with a {@code status} of {@code - * requires_capture}, the remaining {@code amount_capturable} will automatically be refunded. + *

After it’s canceled, no additional charges are made by the PaymentIntent and any operations + * on the PaymentIntent fail with an error. For PaymentIntents with a {@code status} of {@code + * requires_capture}, the remaining {@code amount_capturable} is automatically refunded. * - *

You cannot cancel the PaymentIntent for a Checkout Session. You can’t cancel the PaymentIntent for a Checkout Session. Expire the Checkout Session * instead. */ @@ -404,16 +404,16 @@ public PaymentIntent cancel(String intent, RequestOptions options) throws Stripe return cancel(intent, (PaymentIntentCancelParams) null, options); } /** - * A PaymentIntent object can be canceled when it is in one of these statuses: {@code + * You can cancel a PaymentIntent object when it’s in one of these statuses: {@code * requires_payment_method}, {@code requires_capture}, {@code requires_confirmation}, {@code * requires_action} or, in rare cases, * {@code processing}. * - *

Once canceled, no additional charges will be made by the PaymentIntent and any operations on - * the PaymentIntent will fail with an error. For PaymentIntents with a {@code status} of {@code - * requires_capture}, the remaining {@code amount_capturable} will automatically be refunded. + *

After it’s canceled, no additional charges are made by the PaymentIntent and any operations + * on the PaymentIntent fail with an error. For PaymentIntents with a {@code status} of {@code + * requires_capture}, the remaining {@code amount_capturable} is automatically refunded. * - *

You cannot cancel the PaymentIntent for a Checkout Session. You can’t cancel the PaymentIntent for a Checkout Session. Expire the Checkout Session * instead. */ @@ -421,16 +421,16 @@ public PaymentIntent cancel(String intent) throws StripeException { return cancel(intent, (PaymentIntentCancelParams) null, (RequestOptions) null); } /** - * A PaymentIntent object can be canceled when it is in one of these statuses: {@code + * You can cancel a PaymentIntent object when it’s in one of these statuses: {@code * requires_payment_method}, {@code requires_capture}, {@code requires_confirmation}, {@code * requires_action} or, in rare cases, * {@code processing}. * - *

Once canceled, no additional charges will be made by the PaymentIntent and any operations on - * the PaymentIntent will fail with an error. For PaymentIntents with a {@code status} of {@code - * requires_capture}, the remaining {@code amount_capturable} will automatically be refunded. + *

After it’s canceled, no additional charges are made by the PaymentIntent and any operations + * on the PaymentIntent fail with an error. For PaymentIntents with a {@code status} of {@code + * requires_capture}, the remaining {@code amount_capturable} is automatically refunded. * - *

You cannot cancel the PaymentIntent for a Checkout Session. You can’t cancel the PaymentIntent for a Checkout Session. Expire the Checkout Session * instead. */ @@ -452,8 +452,8 @@ public PaymentIntent cancel( * Capture the funds of an existing uncaptured PaymentIntent when its status is {@code * requires_capture}. * - *

Uncaptured PaymentIntents will be canceled a set number of days after they are created (7 by - * default). + *

Uncaptured PaymentIntents are cancelled a set number of days (7 by default) after their + * creation. * *

Learn more about separate * authorization and capture. @@ -466,8 +466,8 @@ public PaymentIntent capture(String intent, PaymentIntentCaptureParams params) * Capture the funds of an existing uncaptured PaymentIntent when its status is {@code * requires_capture}. * - *

Uncaptured PaymentIntents will be canceled a set number of days after they are created (7 by - * default). + *

Uncaptured PaymentIntents are cancelled a set number of days (7 by default) after their + * creation. * *

Learn more about separate * authorization and capture. @@ -479,8 +479,8 @@ public PaymentIntent capture(String intent, RequestOptions options) throws Strip * Capture the funds of an existing uncaptured PaymentIntent when its status is {@code * requires_capture}. * - *

Uncaptured PaymentIntents will be canceled a set number of days after they are created (7 by - * default). + *

Uncaptured PaymentIntents are cancelled a set number of days (7 by default) after their + * creation. * *

Learn more about separate * authorization and capture. @@ -492,8 +492,8 @@ public PaymentIntent capture(String intent) throws StripeException { * Capture the funds of an existing uncaptured PaymentIntent when its status is {@code * requires_capture}. * - *

Uncaptured PaymentIntents will be canceled a set number of days after they are created (7 by - * default). + *

Uncaptured PaymentIntents are cancelled a set number of days (7 by default) after their + * creation. * *

Learn more about separate * authorization and capture. @@ -520,20 +520,20 @@ public PaymentIntent capture( * must be {@code true}. * *

Incremental authorizations attempt to increase the authorized amount on your customer’s card - * to the new, higher {@code amount} provided. As with the initial authorization, incremental - * authorizations may be declined. A single PaymentIntent can call this endpoint multiple times to + * to the new, higher {@code amount} provided. Similar to the initial authorization, incremental + * authorizations can be declined. A single PaymentIntent can call this endpoint multiple times to * further increase the authorized amount. * - *

If the incremental authorization succeeds, the PaymentIntent object is returned with the - * updated If the incremental authorization succeeds, the PaymentIntent object returns with the updated + * amount. * If the incremental authorization fails, a card_declined error is returned, - * and no fields on the PaymentIntent or Charge are updated. The PaymentIntent object remains + * href="https://stripe.com/docs/error-codes#card-declined">card_declined error returns, and + * no other fields on the PaymentIntent or Charge update. The PaymentIntent object remains * capturable for the previously authorized amount. * *

Each PaymentIntent can have a maximum of 10 incremental authorization attempts, including - * declines. Once captured, a PaymentIntent can no longer be incremented. + * declines. After it’s captured, a PaymentIntent can no longer be incremented. * *

Learn more about incremental @@ -551,20 +551,20 @@ public PaymentIntent incrementAuthorization( * must be {@code true}. * *

Incremental authorizations attempt to increase the authorized amount on your customer’s card - * to the new, higher {@code amount} provided. As with the initial authorization, incremental - * authorizations may be declined. A single PaymentIntent can call this endpoint multiple times to + * to the new, higher {@code amount} provided. Similar to the initial authorization, incremental + * authorizations can be declined. A single PaymentIntent can call this endpoint multiple times to * further increase the authorized amount. * - *

If the incremental authorization succeeds, the PaymentIntent object is returned with the - * updated If the incremental authorization succeeds, the PaymentIntent object returns with the updated + * amount. * If the incremental authorization fails, a card_declined error is returned, - * and no fields on the PaymentIntent or Charge are updated. The PaymentIntent object remains + * href="https://stripe.com/docs/error-codes#card-declined">card_declined error returns, and + * no other fields on the PaymentIntent or Charge update. The PaymentIntent object remains * capturable for the previously authorized amount. * *

Each PaymentIntent can have a maximum of 10 incremental authorization attempts, including - * declines. Once captured, a PaymentIntent can no longer be incremented. + * declines. After it’s captured, a PaymentIntent can no longer be incremented. * *

Learn more about incremental @@ -618,22 +618,22 @@ public PaymentIntent verifyMicrodeposits( options, ApiMode.V1); } - /** Manually reconcile the remaining amount for a customer_balance PaymentIntent. */ + /** Manually reconcile the remaining amount for a {@code customer_balance} PaymentIntent. */ public PaymentIntent applyCustomerBalance( String intent, PaymentIntentApplyCustomerBalanceParams params) throws StripeException { return applyCustomerBalance(intent, params, (RequestOptions) null); } - /** Manually reconcile the remaining amount for a customer_balance PaymentIntent. */ + /** Manually reconcile the remaining amount for a {@code customer_balance} PaymentIntent. */ public PaymentIntent applyCustomerBalance(String intent, RequestOptions options) throws StripeException { return applyCustomerBalance(intent, (PaymentIntentApplyCustomerBalanceParams) null, options); } - /** Manually reconcile the remaining amount for a customer_balance PaymentIntent. */ + /** Manually reconcile the remaining amount for a {@code customer_balance} PaymentIntent. */ public PaymentIntent applyCustomerBalance(String intent) throws StripeException { return applyCustomerBalance( intent, (PaymentIntentApplyCustomerBalanceParams) null, (RequestOptions) null); } - /** Manually reconcile the remaining amount for a customer_balance PaymentIntent. */ + /** Manually reconcile the remaining amount for a {@code customer_balance} PaymentIntent. */ public PaymentIntent applyCustomerBalance( String intent, PaymentIntentApplyCustomerBalanceParams params, RequestOptions options) throws StripeException { diff --git a/src/main/java/com/stripe/service/PaymentSourceService.java b/src/main/java/com/stripe/service/PaymentSourceService.java index 247db3a5aaa..96766ed99d5 100644 --- a/src/main/java/com/stripe/service/PaymentSourceService.java +++ b/src/main/java/com/stripe/service/PaymentSourceService.java @@ -3,6 +3,7 @@ import com.google.gson.reflect.TypeToken; import com.stripe.exception.StripeException; +import com.stripe.model.BankAccount; import com.stripe.model.PaymentSource; import com.stripe.model.StripeCollection; import com.stripe.net.ApiMode; @@ -17,6 +18,7 @@ import com.stripe.param.PaymentSourceListParams; import com.stripe.param.PaymentSourceRetrieveParams; import com.stripe.param.PaymentSourceUpdateParams; +import com.stripe.param.PaymentSourceVerifyParams; public final class PaymentSourceService extends ApiService { public PaymentSourceService(StripeResponseGetter responseGetter) { @@ -184,4 +186,36 @@ public PaymentSource delete( options, ApiMode.V1); } + /** Verify a specified bank account for a given customer. */ + public BankAccount verify(String customer, String id, PaymentSourceVerifyParams params) + throws StripeException { + return verify(customer, id, params, (RequestOptions) null); + } + /** Verify a specified bank account for a given customer. */ + public BankAccount verify(String customer, String id, RequestOptions options) + throws StripeException { + return verify(customer, id, (PaymentSourceVerifyParams) null, options); + } + /** Verify a specified bank account for a given customer. */ + public BankAccount verify(String customer, String id) throws StripeException { + return verify(customer, id, (PaymentSourceVerifyParams) null, (RequestOptions) null); + } + /** Verify a specified bank account for a given customer. */ + public BankAccount verify( + String customer, String id, PaymentSourceVerifyParams params, RequestOptions options) + throws StripeException { + String path = + String.format( + "/v1/customers/%s/sources/%s/verify", + ApiResource.urlEncodeId(customer), ApiResource.urlEncodeId(id)); + return getResponseGetter() + .request( + BaseAddress.API, + ApiResource.RequestMethod.POST, + path, + ApiRequestParams.paramsToMap(params), + BankAccount.class, + options, + ApiMode.V1); + } } diff --git a/src/main/java/com/stripe/service/PayoutService.java b/src/main/java/com/stripe/service/PayoutService.java index bd4632ac4fa..618d6c6feb0 100644 --- a/src/main/java/com/stripe/service/PayoutService.java +++ b/src/main/java/com/stripe/service/PayoutService.java @@ -26,32 +26,28 @@ public PayoutService(StripeResponseGetter responseGetter) { /** * Retrieves the details of an existing payout. Supply the unique payout ID from either a payout - * creation request or the payout list, and Stripe will return the corresponding payout - * information. + * creation request or the payout list. Stripe returns the corresponding payout information. */ public Payout retrieve(String payout, PayoutRetrieveParams params) throws StripeException { return retrieve(payout, params, (RequestOptions) null); } /** * Retrieves the details of an existing payout. Supply the unique payout ID from either a payout - * creation request or the payout list, and Stripe will return the corresponding payout - * information. + * creation request or the payout list. Stripe returns the corresponding payout information. */ public Payout retrieve(String payout, RequestOptions options) throws StripeException { return retrieve(payout, (PayoutRetrieveParams) null, options); } /** * Retrieves the details of an existing payout. Supply the unique payout ID from either a payout - * creation request or the payout list, and Stripe will return the corresponding payout - * information. + * creation request or the payout list. Stripe returns the corresponding payout information. */ public Payout retrieve(String payout) throws StripeException { return retrieve(payout, (PayoutRetrieveParams) null, (RequestOptions) null); } /** * Retrieves the details of an existing payout. Supply the unique payout ID from either a payout - * creation request or the payout list, and Stripe will return the corresponding payout - * information. + * creation request or the payout list. Stripe returns the corresponding payout information. */ public Payout retrieve(String payout, PayoutRetrieveParams params, RequestOptions options) throws StripeException { @@ -67,29 +63,29 @@ public Payout retrieve(String payout, PayoutRetrieveParams params, RequestOption ApiMode.V1); } /** - * Updates the specified payout by setting the values of the parameters passed. Any parameters not - * provided will be left unchanged. This request accepts only the metadata as arguments. + * Updates the specified payout by setting the values of the parameters you pass. We don’t change + * parameters that you don’t provide. This request only accepts the metadata as arguments. */ public Payout update(String payout, PayoutUpdateParams params) throws StripeException { return update(payout, params, (RequestOptions) null); } /** - * Updates the specified payout by setting the values of the parameters passed. Any parameters not - * provided will be left unchanged. This request accepts only the metadata as arguments. + * Updates the specified payout by setting the values of the parameters you pass. We don’t change + * parameters that you don’t provide. This request only accepts the metadata as arguments. */ public Payout update(String payout, RequestOptions options) throws StripeException { return update(payout, (PayoutUpdateParams) null, options); } /** - * Updates the specified payout by setting the values of the parameters passed. Any parameters not - * provided will be left unchanged. This request accepts only the metadata as arguments. + * Updates the specified payout by setting the values of the parameters you pass. We don’t change + * parameters that you don’t provide. This request only accepts the metadata as arguments. */ public Payout update(String payout) throws StripeException { return update(payout, (PayoutUpdateParams) null, (RequestOptions) null); } /** - * Updates the specified payout by setting the values of the parameters passed. Any parameters not - * provided will be left unchanged. This request accepts only the metadata as arguments. + * Updates the specified payout by setting the values of the parameters you pass. We don’t change + * parameters that you don’t provide. This request only accepts the metadata as arguments. */ public Payout update(String payout, PayoutUpdateParams params, RequestOptions options) throws StripeException { @@ -105,33 +101,33 @@ public Payout update(String payout, PayoutUpdateParams params, RequestOptions op ApiMode.V1); } /** - * Returns a list of existing payouts sent to third-party bank accounts or that Stripe has sent - * you. The payouts are returned in sorted order, with the most recently created payouts appearing - * first. + * Returns a list of existing payouts sent to third-party bank accounts or payouts that Stripe + * sent to you. The payouts return in sorted order, with the most recently created payouts + * appearing first. */ public StripeCollection list(PayoutListParams params) throws StripeException { return list(params, (RequestOptions) null); } /** - * Returns a list of existing payouts sent to third-party bank accounts or that Stripe has sent - * you. The payouts are returned in sorted order, with the most recently created payouts appearing - * first. + * Returns a list of existing payouts sent to third-party bank accounts or payouts that Stripe + * sent to you. The payouts return in sorted order, with the most recently created payouts + * appearing first. */ public StripeCollection list(RequestOptions options) throws StripeException { return list((PayoutListParams) null, options); } /** - * Returns a list of existing payouts sent to third-party bank accounts or that Stripe has sent - * you. The payouts are returned in sorted order, with the most recently created payouts appearing - * first. + * Returns a list of existing payouts sent to third-party bank accounts or payouts that Stripe + * sent to you. The payouts return in sorted order, with the most recently created payouts + * appearing first. */ public StripeCollection list() throws StripeException { return list((PayoutListParams) null, (RequestOptions) null); } /** - * Returns a list of existing payouts sent to third-party bank accounts or that Stripe has sent - * you. The payouts are returned in sorted order, with the most recently created payouts appearing - * first. + * Returns a list of existing payouts sent to third-party bank accounts or payouts that Stripe + * sent to you. The payouts return in sorted order, with the most recently created payouts + * appearing first. */ public StripeCollection list(PayoutListParams params, RequestOptions options) throws StripeException { @@ -147,15 +143,15 @@ public StripeCollection list(PayoutListParams params, RequestOptions opt ApiMode.V1); } /** - * To send funds to your own bank account, you create a new payout object. Your Stripe balance must be able to cover the payout - * amount, or you’ll receive an “Insufficient Funds” error. + * To send funds to your own bank account, create a new payout object. Your Stripe balance must cover the payout amount. If + * it doesn’t, you receive an “Insufficient Funds” error. * - *

If your API key is in test mode, money won’t actually be sent, though everything else will - * occur as if in live mode. + *

If your API key is in test mode, money won’t actually be sent, though every other action + * occurs as if you’re in live mode. * - *

If you are creating a manual payout on a Stripe account that uses multiple payment source - * types, you’ll need to specify the source type balance that the payout should draw from. The If you create a manual payout on a Stripe account that uses multiple payment source types, + * you need to specify the source type balance that the payout draws from. The balance object details available and * pending amounts by source type. */ @@ -163,15 +159,15 @@ public Payout create(PayoutCreateParams params) throws StripeException { return create(params, (RequestOptions) null); } /** - * To send funds to your own bank account, you create a new payout object. Your Stripe balance must be able to cover the payout - * amount, or you’ll receive an “Insufficient Funds” error. + * To send funds to your own bank account, create a new payout object. Your Stripe balance must cover the payout amount. If + * it doesn’t, you receive an “Insufficient Funds” error. * - *

If your API key is in test mode, money won’t actually be sent, though everything else will - * occur as if in live mode. + *

If your API key is in test mode, money won’t actually be sent, though every other action + * occurs as if you’re in live mode. * - *

If you are creating a manual payout on a Stripe account that uses multiple payment source - * types, you’ll need to specify the source type balance that the payout should draw from. The If you create a manual payout on a Stripe account that uses multiple payment source types, + * you need to specify the source type balance that the payout draws from. The balance object details available and * pending amounts by source type. */ @@ -188,29 +184,29 @@ public Payout create(PayoutCreateParams params, RequestOptions options) throws S ApiMode.V1); } /** - * A previously created payout can be canceled if it has not yet been paid out. Funds will be - * refunded to your available balance. You may not cancel automatic Stripe payouts. + * You can cancel a previously created payout if it hasn’t been paid out yet. Stripe refunds the + * funds to your available balance. You can’t cancel automatic Stripe payouts. */ public Payout cancel(String payout, PayoutCancelParams params) throws StripeException { return cancel(payout, params, (RequestOptions) null); } /** - * A previously created payout can be canceled if it has not yet been paid out. Funds will be - * refunded to your available balance. You may not cancel automatic Stripe payouts. + * You can cancel a previously created payout if it hasn’t been paid out yet. Stripe refunds the + * funds to your available balance. You can’t cancel automatic Stripe payouts. */ public Payout cancel(String payout, RequestOptions options) throws StripeException { return cancel(payout, (PayoutCancelParams) null, options); } /** - * A previously created payout can be canceled if it has not yet been paid out. Funds will be - * refunded to your available balance. You may not cancel automatic Stripe payouts. + * You can cancel a previously created payout if it hasn’t been paid out yet. Stripe refunds the + * funds to your available balance. You can’t cancel automatic Stripe payouts. */ public Payout cancel(String payout) throws StripeException { return cancel(payout, (PayoutCancelParams) null, (RequestOptions) null); } /** - * A previously created payout can be canceled if it has not yet been paid out. Funds will be - * refunded to your available balance. You may not cancel automatic Stripe payouts. + * You can cancel a previously created payout if it hasn’t been paid out yet. Stripe refunds the + * funds to your available balance. You can’t cancel automatic Stripe payouts. */ public Payout cancel(String payout, PayoutCancelParams params, RequestOptions options) throws StripeException { @@ -226,49 +222,49 @@ public Payout cancel(String payout, PayoutCancelParams params, RequestOptions op ApiMode.V1); } /** - * Reverses a payout by debiting the destination bank account. Only payouts for connected accounts - * to US bank accounts may be reversed at this time. If the payout is in the {@code pending} - * status, {@code /v1/payouts/:id/cancel} should be used instead. + * Reverses a payout by debiting the destination bank account. At this time, you can only reverse + * payouts for connected accounts to US bank accounts. If the payout is in the {@code pending} + * status, use {@code /v1/payouts/:id/cancel} instead. * - *

By requesting a reversal via {@code /v1/payouts/:id/reverse}, you confirm that the - * authorized signatory of the selected bank account has authorized the debit on the bank account - * and that no other authorization is required. + *

By requesting a reversal through {@code /v1/payouts/:id/reverse}, you confirm that the + * authorized signatory of the selected bank account authorizes the debit on the bank account and + * that no other authorization is required. */ public Payout reverse(String payout, PayoutReverseParams params) throws StripeException { return reverse(payout, params, (RequestOptions) null); } /** - * Reverses a payout by debiting the destination bank account. Only payouts for connected accounts - * to US bank accounts may be reversed at this time. If the payout is in the {@code pending} - * status, {@code /v1/payouts/:id/cancel} should be used instead. + * Reverses a payout by debiting the destination bank account. At this time, you can only reverse + * payouts for connected accounts to US bank accounts. If the payout is in the {@code pending} + * status, use {@code /v1/payouts/:id/cancel} instead. * - *

By requesting a reversal via {@code /v1/payouts/:id/reverse}, you confirm that the - * authorized signatory of the selected bank account has authorized the debit on the bank account - * and that no other authorization is required. + *

By requesting a reversal through {@code /v1/payouts/:id/reverse}, you confirm that the + * authorized signatory of the selected bank account authorizes the debit on the bank account and + * that no other authorization is required. */ public Payout reverse(String payout, RequestOptions options) throws StripeException { return reverse(payout, (PayoutReverseParams) null, options); } /** - * Reverses a payout by debiting the destination bank account. Only payouts for connected accounts - * to US bank accounts may be reversed at this time. If the payout is in the {@code pending} - * status, {@code /v1/payouts/:id/cancel} should be used instead. + * Reverses a payout by debiting the destination bank account. At this time, you can only reverse + * payouts for connected accounts to US bank accounts. If the payout is in the {@code pending} + * status, use {@code /v1/payouts/:id/cancel} instead. * - *

By requesting a reversal via {@code /v1/payouts/:id/reverse}, you confirm that the - * authorized signatory of the selected bank account has authorized the debit on the bank account - * and that no other authorization is required. + *

By requesting a reversal through {@code /v1/payouts/:id/reverse}, you confirm that the + * authorized signatory of the selected bank account authorizes the debit on the bank account and + * that no other authorization is required. */ public Payout reverse(String payout) throws StripeException { return reverse(payout, (PayoutReverseParams) null, (RequestOptions) null); } /** - * Reverses a payout by debiting the destination bank account. Only payouts for connected accounts - * to US bank accounts may be reversed at this time. If the payout is in the {@code pending} - * status, {@code /v1/payouts/:id/cancel} should be used instead. + * Reverses a payout by debiting the destination bank account. At this time, you can only reverse + * payouts for connected accounts to US bank accounts. If the payout is in the {@code pending} + * status, use {@code /v1/payouts/:id/cancel} instead. * - *

By requesting a reversal via {@code /v1/payouts/:id/reverse}, you confirm that the - * authorized signatory of the selected bank account has authorized the debit on the bank account - * and that no other authorization is required. + *

By requesting a reversal through {@code /v1/payouts/:id/reverse}, you confirm that the + * authorized signatory of the selected bank account authorizes the debit on the bank account and + * that no other authorization is required. */ public Payout reverse(String payout, PayoutReverseParams params, RequestOptions options) throws StripeException { diff --git a/src/main/java/com/stripe/service/RefundService.java b/src/main/java/com/stripe/service/RefundService.java index 44a3f4a2aa9..02ad1c5d28d 100644 --- a/src/main/java/com/stripe/service/RefundService.java +++ b/src/main/java/com/stripe/service/RefundService.java @@ -24,33 +24,33 @@ public RefundService(StripeResponseGetter responseGetter) { } /** - * Returns a list of all refunds you’ve previously created. The refunds are returned in sorted - * order, with the most recent refunds appearing first. For convenience, the 10 most recent - * refunds are always available by default on the charge object. + * Returns a list of all refunds you created. We return the refunds in sorted order, with the most + * recent refunds appearing first The 10 most recent refunds are always available by default on + * the Charge object. */ public StripeCollection list(RefundListParams params) throws StripeException { return list(params, (RequestOptions) null); } /** - * Returns a list of all refunds you’ve previously created. The refunds are returned in sorted - * order, with the most recent refunds appearing first. For convenience, the 10 most recent - * refunds are always available by default on the charge object. + * Returns a list of all refunds you created. We return the refunds in sorted order, with the most + * recent refunds appearing first The 10 most recent refunds are always available by default on + * the Charge object. */ public StripeCollection list(RequestOptions options) throws StripeException { return list((RefundListParams) null, options); } /** - * Returns a list of all refunds you’ve previously created. The refunds are returned in sorted - * order, with the most recent refunds appearing first. For convenience, the 10 most recent - * refunds are always available by default on the charge object. + * Returns a list of all refunds you created. We return the refunds in sorted order, with the most + * recent refunds appearing first The 10 most recent refunds are always available by default on + * the Charge object. */ public StripeCollection list() throws StripeException { return list((RefundListParams) null, (RequestOptions) null); } /** - * Returns a list of all refunds you’ve previously created. The refunds are returned in sorted - * order, with the most recent refunds appearing first. For convenience, the 10 most recent - * refunds are always available by default on the charge object. + * Returns a list of all refunds you created. We return the refunds in sorted order, with the most + * recent refunds appearing first The 10 most recent refunds are always available by default on + * the Charge object. */ public StripeCollection list(RefundListParams params, RequestOptions options) throws StripeException { @@ -65,19 +65,71 @@ public StripeCollection list(RefundListParams params, RequestOptions opt options, ApiMode.V1); } - /** Create a refund. */ + /** + * When you create a new refund, you must specify a Charge or a PaymentIntent object on which to + * create it. + * + *

Creating a new refund will refund a charge that has previously been created but not yet + * refunded. Funds will be refunded to the credit or debit card that was originally charged. + * + *

You can optionally refund only part of a charge. You can do so multiple times, until the + * entire charge has been refunded. + * + *

Once entirely refunded, a charge can’t be refunded again. This method will raise an error + * when called on an already-refunded charge, or when trying to refund more money than is left on + * a charge. + */ public Refund create(RefundCreateParams params) throws StripeException { return create(params, (RequestOptions) null); } - /** Create a refund. */ + /** + * When you create a new refund, you must specify a Charge or a PaymentIntent object on which to + * create it. + * + *

Creating a new refund will refund a charge that has previously been created but not yet + * refunded. Funds will be refunded to the credit or debit card that was originally charged. + * + *

You can optionally refund only part of a charge. You can do so multiple times, until the + * entire charge has been refunded. + * + *

Once entirely refunded, a charge can’t be refunded again. This method will raise an error + * when called on an already-refunded charge, or when trying to refund more money than is left on + * a charge. + */ public Refund create(RequestOptions options) throws StripeException { return create((RefundCreateParams) null, options); } - /** Create a refund. */ + /** + * When you create a new refund, you must specify a Charge or a PaymentIntent object on which to + * create it. + * + *

Creating a new refund will refund a charge that has previously been created but not yet + * refunded. Funds will be refunded to the credit or debit card that was originally charged. + * + *

You can optionally refund only part of a charge. You can do so multiple times, until the + * entire charge has been refunded. + * + *

Once entirely refunded, a charge can’t be refunded again. This method will raise an error + * when called on an already-refunded charge, or when trying to refund more money than is left on + * a charge. + */ public Refund create() throws StripeException { return create((RefundCreateParams) null, (RequestOptions) null); } - /** Create a refund. */ + /** + * When you create a new refund, you must specify a Charge or a PaymentIntent object on which to + * create it. + * + *

Creating a new refund will refund a charge that has previously been created but not yet + * refunded. Funds will be refunded to the credit or debit card that was originally charged. + * + *

You can optionally refund only part of a charge. You can do so multiple times, until the + * entire charge has been refunded. + * + *

Once entirely refunded, a charge can’t be refunded again. This method will raise an error + * when called on an already-refunded charge, or when trying to refund more money than is left on + * a charge. + */ public Refund create(RefundCreateParams params, RequestOptions options) throws StripeException { String path = "/v1/refunds"; return getResponseGetter() @@ -117,8 +169,8 @@ public Refund retrieve(String refund, RefundRetrieveParams params, RequestOption ApiMode.V1); } /** - * Updates the specified refund by setting the values of the parameters passed. Any parameters not - * provided will be left unchanged. + * Updates the refund that you specify by setting the values of the passed parameters. Any + * parameters that you don’t provide remain unchanged. * *

This request only accepts {@code metadata} as an argument. */ @@ -126,8 +178,8 @@ public Refund update(String refund, RefundUpdateParams params) throws StripeExce return update(refund, params, (RequestOptions) null); } /** - * Updates the specified refund by setting the values of the parameters passed. Any parameters not - * provided will be left unchanged. + * Updates the refund that you specify by setting the values of the passed parameters. Any + * parameters that you don’t provide remain unchanged. * *

This request only accepts {@code metadata} as an argument. */ @@ -135,8 +187,8 @@ public Refund update(String refund, RequestOptions options) throws StripeExcepti return update(refund, (RefundUpdateParams) null, options); } /** - * Updates the specified refund by setting the values of the parameters passed. Any parameters not - * provided will be left unchanged. + * Updates the refund that you specify by setting the values of the passed parameters. Any + * parameters that you don’t provide remain unchanged. * *

This request only accepts {@code metadata} as an argument. */ @@ -144,8 +196,8 @@ public Refund update(String refund) throws StripeException { return update(refund, (RefundUpdateParams) null, (RequestOptions) null); } /** - * Updates the specified refund by setting the values of the parameters passed. Any parameters not - * provided will be left unchanged. + * Updates the refund that you specify by setting the values of the passed parameters. Any + * parameters that you don’t provide remain unchanged. * *

This request only accepts {@code metadata} as an argument. */ @@ -165,8 +217,8 @@ public Refund update(String refund, RefundUpdateParams params, RequestOptions op /** * Cancels a refund with a status of {@code requires_action}. * - *

Refunds in other states cannot be canceled, and only refunds for payment methods that - * require customer action will enter the {@code requires_action} state. + *

You can’t cancel refunds in other states. Only refunds for payment methods that require + * customer action can enter the {@code requires_action} state. */ public Refund cancel(String refund, RefundCancelParams params) throws StripeException { return cancel(refund, params, (RequestOptions) null); @@ -174,8 +226,8 @@ public Refund cancel(String refund, RefundCancelParams params) throws StripeExce /** * Cancels a refund with a status of {@code requires_action}. * - *

Refunds in other states cannot be canceled, and only refunds for payment methods that - * require customer action will enter the {@code requires_action} state. + *

You can’t cancel refunds in other states. Only refunds for payment methods that require + * customer action can enter the {@code requires_action} state. */ public Refund cancel(String refund, RequestOptions options) throws StripeException { return cancel(refund, (RefundCancelParams) null, options); @@ -183,8 +235,8 @@ public Refund cancel(String refund, RequestOptions options) throws StripeExcepti /** * Cancels a refund with a status of {@code requires_action}. * - *

Refunds in other states cannot be canceled, and only refunds for payment methods that - * require customer action will enter the {@code requires_action} state. + *

You can’t cancel refunds in other states. Only refunds for payment methods that require + * customer action can enter the {@code requires_action} state. */ public Refund cancel(String refund) throws StripeException { return cancel(refund, (RefundCancelParams) null, (RequestOptions) null); @@ -192,8 +244,8 @@ public Refund cancel(String refund) throws StripeException { /** * Cancels a refund with a status of {@code requires_action}. * - *

Refunds in other states cannot be canceled, and only refunds for payment methods that - * require customer action will enter the {@code requires_action} state. + *

You can’t cancel refunds in other states. Only refunds for payment methods that require + * customer action can enter the {@code requires_action} state. */ public Refund cancel(String refund, RefundCancelParams params, RequestOptions options) throws StripeException { diff --git a/src/main/java/com/stripe/service/SetupAttemptService.java b/src/main/java/com/stripe/service/SetupAttemptService.java index 669017d5dfe..12c7a9a3311 100644 --- a/src/main/java/com/stripe/service/SetupAttemptService.java +++ b/src/main/java/com/stripe/service/SetupAttemptService.java @@ -19,11 +19,11 @@ public SetupAttemptService(StripeResponseGetter responseGetter) { super(responseGetter); } - /** Returns a list of SetupAttempts associated with a provided SetupIntent. */ + /** Returns a list of SetupAttempts that associate with a provided SetupIntent. */ public StripeCollection list(SetupAttemptListParams params) throws StripeException { return list(params, (RequestOptions) null); } - /** Returns a list of SetupAttempts associated with a provided SetupIntent. */ + /** Returns a list of SetupAttempts that associate with a provided SetupIntent. */ public StripeCollection list(SetupAttemptListParams params, RequestOptions options) throws StripeException { String path = "/v1/setup_attempts"; diff --git a/src/test/java/com/stripe/functional/GeneratedExamples.java b/src/test/java/com/stripe/functional/GeneratedExamples.java index 5ddad883d65..73dc40df383 100644 --- a/src/test/java/com/stripe/functional/GeneratedExamples.java +++ b/src/test/java/com/stripe/functional/GeneratedExamples.java @@ -4651,14 +4651,14 @@ public void testPaymentSourceServiceUpdate3() throws StripeException { } @Test - public void testBankAccountServiceVerify() throws StripeException { + public void testPaymentSourceServiceVerify() throws StripeException { StripeClient client = new StripeClient(networkSpy); - com.stripe.param.BankAccountVerifyParams params = - com.stripe.param.BankAccountVerifyParams.builder().addAmount(32L).addAmount(45L).build(); + com.stripe.param.PaymentSourceVerifyParams params = + com.stripe.param.PaymentSourceVerifyParams.builder().addAmount(32L).addAmount(45L).build(); com.stripe.model.BankAccount bankAccount = - client.bankAccounts().verify("cus_xxxxxxxxxxxxx", "ba_xxxxxxxxxxxxx", params); + client.customers().paymentSources().verify("cus_xxxxxxxxxxxxx", "ba_xxxxxxxxxxxxx", params); assertNotNull(bankAccount); verifyRequest( BaseAddress.API, @@ -14869,4 +14869,32 @@ public void testTransactionServiceRefund() throws StripeException { params.toMap(), null); } + + @Test + public void testSubscriptionDeleteDiscount() throws StripeException { + Subscription resource = Subscription.retrieve("sub_xyz"); + + Discount discount = resource.deleteDiscount(); + assertNotNull(discount); + verifyRequest( + BaseAddress.API, + ApiResource.RequestMethod.DELETE, + "/v1/subscriptions/sub_xyz/discount", + null, + null); + } + + @Test + public void testSubscriptionServiceDeleteDiscount() throws StripeException { + StripeClient client = new StripeClient(networkSpy); + + com.stripe.model.Discount discount = client.subscriptions().deleteDiscount("sub_xyz"); + assertNotNull(discount); + verifyRequest( + BaseAddress.API, + ApiResource.RequestMethod.DELETE, + "/v1/subscriptions/sub_xyz/discount", + null, + null); + } } From 7f9de1578302631d3a962356acea8d723f2429e7 Mon Sep 17 00:00:00 2001 From: Richard Marmorstein Date: Thu, 28 Sep 2023 16:08:18 -0700 Subject: [PATCH 25/25] Bump version to 23.7.0 --- CHANGELOG.md | 4 ++++ README.md | 8 ++++---- VERSION | 2 +- gradle.properties | 2 +- src/main/java/com/stripe/Stripe.java | 2 +- 5 files changed, 11 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index eb66d27539a..beedeb3c2cb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,10 @@ # Changelog +## 23.7.0 - 2023-09-28 +* [#1657](https://github.com/stripe/stripe-java/pull/1657) Update generated code + * Add support for `rendering` on `InvoiceCreateParams`, `InvoiceUpdateParams`, and `Invoice` + ## 23.6.0 - 2023-09-21 * [#1654](https://github.com/stripe/stripe-java/pull/1654) Update generated code * Add support for `terms_of_service_acceptance` on `Checkout.Session.custom_text`, `PaymentLink.custom_text`, `PaymentLinkCreateParams.custom_text`, `PaymentLinkUpdateParams.custom_text`, and `checkout.SessionCreateParams.custom_text` diff --git a/README.md b/README.md index 7d8d98a37cc..b02eb0ce86b 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Stripe Java client library -[![Maven Central](https://img.shields.io/badge/maven--central-v23.6.0-blue)](https://mvnrepository.com/artifact/com.stripe/stripe-java) +[![Maven Central](https://img.shields.io/badge/maven--central-v23.7.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) [![Coverage Status](https://coveralls.io/repos/github/stripe/stripe-java/badge.svg?branch=master)](https://coveralls.io/github/stripe/stripe-java?branch=master) @@ -18,7 +18,7 @@ The official [Stripe][stripe] Java client library. Add this dependency to your project's build file: ```groovy -implementation "com.stripe:stripe-java:23.6.0" +implementation "com.stripe:stripe-java:23.7.0" ``` ### Maven users @@ -29,7 +29,7 @@ Add this dependency to your project's POM: com.stripe stripe-java - 23.6.0 + 23.7.0 ``` @@ -37,7 +37,7 @@ Add this dependency to your project's POM: You'll need to manually install the following JARs: -- [The Stripe JAR](https://search.maven.org/remotecontent?filepath=com/stripe/stripe-java/23.6.0/stripe-java-23.6.0.jar) +- [The Stripe JAR](https://search.maven.org/remotecontent?filepath=com/stripe/stripe-java/23.7.0/stripe-java-23.7.0.jar) - [Google Gson][gson] from . ### [ProGuard][proguard] diff --git a/VERSION b/VERSION index 0373daaf186..504ae562c59 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -23.6.0 +23.7.0 diff --git a/gradle.properties b/gradle.properties index fc726c72c3e..ccd12158976 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,5 +1,5 @@ GROUP=com.stripe -VERSION_NAME=23.6.0 +VERSION_NAME=23.7.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 55ae2354f34..2175e6c4611 100644 --- a/src/main/java/com/stripe/Stripe.java +++ b/src/main/java/com/stripe/Stripe.java @@ -13,7 +13,7 @@ public abstract class Stripe { public static final String CONNECT_API_BASE = "https://connect.stripe.com"; 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 VERSION = "23.6.0"; + public static final String VERSION = "23.7.0"; public static volatile String apiKey; public static volatile String clientId;