diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 86199a758e5..2c03e032fa0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -21,9 +21,10 @@ jobs: build: name: Build - runs-on: ubuntu-latest + runs-on: "ubuntu-24.04" steps: + - uses: extractions/setup-just@v2 - uses: actions/checkout@master - name: Setup Java @@ -37,7 +38,7 @@ jobs: run: echo "JAVA_TEST_HOME=${{ steps.setup-jre.outputs.path }}" >> $GITHUB_ENV - name: Spotless - run: ./gradlew spotlessCheck + run: just format-check - name: Build artifacts run: ./gradlew assemble javadoc @@ -45,7 +46,7 @@ jobs: test: name: Test - runs-on: ubuntu-latest + runs-on: "ubuntu-24.04" strategy: fail-fast: false @@ -59,6 +60,7 @@ jobs: - "20" steps: + - uses: extractions/setup-just@v2 - uses: actions/checkout@master - name: Setup Test Java Runtime @@ -88,22 +90,15 @@ jobs: - uses: stripe/openapi/actions/stripe-mock@master - name: Run test suite - run: make ci-test - - - name: Send code coverage report to coveralls.io - run: ./gradlew jacocoTestReport coveralls - if: env.COVERALLS_REPO_TOKEN && matrix.java-version == '17' - env: - CI_NAME: github-actions - COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }} + run: just test publish: if: >- - ((github.event_name == 'workflow_dispatch') || (github.event_name == 'push')) && - startsWith(github.ref, 'refs/tags/v') && - endsWith(github.actor, '-stripe') + ((github.event_name == 'workflow_dispatch') || (github.event_name == 'push')) && + startsWith(github.ref, 'refs/tags/v') && + endsWith(github.actor, '-stripe') needs: [build, test] - runs-on: ubuntu-latest + runs-on: "ubuntu-24.04" steps: - uses: actions/checkout@master - name: Setup Java @@ -143,7 +138,7 @@ jobs: !contains(github.ref, 'beta') && endsWith(github.actor, '-stripe') needs: [build, test] - runs-on: ubuntu-latest + runs-on: "ubuntu-24.04" steps: - uses: actions/checkout@master - name: Setup Java @@ -163,7 +158,7 @@ jobs: GRGIT_PASS: ${{ secrets.GITHUB_TOKEN }} compat: - runs-on: ubuntu-latest + runs-on: "ubuntu-24.04" steps: - name: Checkout repository diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 00000000000..11efda67a0a --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,25 @@ + +# Contributing + +We welcome bug reports, feature requests, and code contributions in a pull request. + +For most pull requests, we request that you identify or create an associated issue that has the necessary context. We use these issues to reach agreement on an approach and save the PR author from having to redo work. Fixing typos or documentation issues likely do not need an issue; for any issue that introduces substantial code changes, changes the public interface, or if you aren't sure, please find or [create an issue](https://www.github.com/stripe/stripe-java/issues/new/choose). + +## Contributor License Agreement + +All contributors must sign the Contributor License Agreement (CLA) before we can accept their contribution. If you have not yet signed the agreement, you will be given an option to do so when you open a pull request. You can then sign by clicking on the badge in the comment from @CLAassistant. + +## Generated code + +This project has a combination of manually maintained code and code generated from our private code generator. If your contribution involves changes to generated code, please call this out in the issue or pull request as we will likely need to make a change to our code generator before accepting the contribution. + +To identify files with purely generated code, look for the comment `File generated from our OpenAPI spec.` at the start of the file. Generated blocks of code within hand-written files will be between comments that say `The beginning of the section generated from our OpenAPI spec` and `The end of the section generated from our OpenAPI spec`. + +## Compatibility with supported language and runtime versions + +This project supports [many different langauge and runtime versions](README.md#requirements) and we are unable to accept any contribution that does not work on _all_ supported versions. If, after discussing the approach in the associated issue, your change must use an API / feature that isn't available in all supported versions, please call this out explicitly in the issue or pull request so we can help figure out the best way forward. + +## Set up your dev environment + +Please refer to this project's [README.md](README.md#development) for instructions on how to set up your development environment. + diff --git a/Makefile b/Makefile index fdd6776fbfa..710e3b7228c 100644 --- a/Makefile +++ b/Makefile @@ -1,3 +1,5 @@ +# NOTE: this file is deprecated and slated for deletion; prefer using the equivalent `just` commands. + .PHONY: update-version codegen-format update-version: @echo "$(VERSION)" > VERSION diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 115863e9594..4624c15fbdf 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1436 \ No newline at end of file +v1454 \ No newline at end of file diff --git a/README.md b/README.md index 5be087424dd..095b6e561e6 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,6 @@ [![Maven Central](https://img.shields.io/badge/maven--central-v28.3.0-beta.1-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) The official [Stripe][stripe] Java client library. @@ -295,6 +294,8 @@ New features and bug fixes are released on the latest major version of the Strip ## Development +[Contribution guidelines for this project](CONTRIBUTING.md) + JDK 17 is required to build the Stripe Java library. By default, tests use the same Java runtime as the build. To use a custom version of Java runtime for tests set the `JAVA_TEST_HOME` environment variable to runtime's home directory. @@ -308,6 +309,8 @@ go get -u github.com/stripe/stripe-mock stripe-mock ``` +We use [just](https://github.com/casey/just) for conveniently running development tasks. You can use them directly, or copy the commands out of the `justfile`. To our help docs, run `just`. + To run all checks (tests and code formatting): ```sh @@ -317,16 +320,20 @@ To run all checks (tests and code formatting): To run the tests: ```sh -./gradlew test +just test +# or: ./gradlew test ``` You can run particular tests by passing `--tests Class#method`. Make sure you use the fully qualified class name. For example: ```sh -./gradlew test --tests com.stripe.model.AccountTest -./gradlew test --tests com.stripe.functional.CustomerTest -./gradlew test --tests com.stripe.functional.CustomerTest.testCustomerCreate +just test-one com.stripe.model.AccountTest +just test-one com.stripe.functional.CustomerTest +just test-one com.stripe.functional.CustomerTest.testCustomerCreate +# or: ./gradlew test --tests com.stripe.model.AccountTest +# or: ./gradlew test --tests com.stripe.functional.CustomerTest +# or: ./gradlew test --tests com.stripe.functional.CustomerTest.testCustomerCreate ``` The library uses [Spotless][spotless] along with @@ -335,7 +342,8 @@ formatted before PRs are submitted, otherwise CI will fail. Run the formatter with: ```sh -./gradlew spotlessApply +just format +# or: ./gradlew spotlessApply ``` The library uses [Project Lombok][lombok]. While it is not a requirement, you diff --git a/build.gradle b/build.gradle index 7e6fb00685f..f79a59f3227 100644 --- a/build.gradle +++ b/build.gradle @@ -15,7 +15,6 @@ plugins { id "io.freefair.lombok" version "6.3.0" id "com.diffplug.spotless" version "6.4.0" id "net.ltgt.errorprone" version "2.0.2" - id "com.github.kt3k.coveralls" version "2.12.0" id "biz.aQute.bnd.builder" version "6.1.0" id "org.ajoberstar.git-publish" version "3.0.1" } @@ -137,17 +136,6 @@ spotless { } } -jacocoTestReport { - reports { - xml.required = true // coveralls plugin depends on xml format report - html.required = true - } -} - -coveralls { - jacocoReportPath "build/reports/jacoco/test/jacocoTestReport.xml" -} - gitPublish { repoUri = 'https://github.com/stripe/stripe-java.git' branch = 'gh-pages' diff --git a/justfile b/justfile new file mode 100644 index 00000000000..8db677dee7b --- /dev/null +++ b/justfile @@ -0,0 +1,35 @@ +set quiet + +import? '../sdk-codegen/utils.just' + +_default: + just --list --unsorted + +# ⭐ run the whole test suite +[no-exit-message] +test *args: + ./gradlew test {{ args }} + +# run a single test +test-one modelPath: (test "--tests" modelPath) + +# ⭐ format all files +[no-exit-message] +format: + ./gradlew spotlessApply + +# check, but don't change, the formatting +[no-exit-message] +format-check: + ./gradlew spotlessCheck + +# called by tooling +[private] +update-version version: + echo "{{ version }}" > VERSION + perl -pi -e 's|badge/maven--central-v[.\d\-\w]+-blue|badge/maven--central-v{{ version }}-blue|' README.md + perl -pi -e 's|https:\/\/search\.maven\.org\/remotecontent\?filepath=com\/stripe\/stripe-java\/[.\d\-\w]+\/stripe-java-[.\d\-\w]+.jar|https://search.maven.org/remotecontent?filepath=com/stripe/stripe-java/{{ version }}/stripe-java-{{ version }}.jar|' README.md + perl -pi -e 's|implementation "com\.stripe:stripe-java:[.\d\-\w]+"|implementation "com.stripe:stripe-java:{{ version }}"|' README.md + perl -pi -e 's|[.\d\-\w]+<\/version>|{{ version }}|' README.md + perl -pi -e 's|VERSION_NAME=[.\d\-\w]+|VERSION_NAME={{ version }}|' gradle.properties + perl -pi -e 's|public static final String VERSION = "[.\d\-\w]+";|public static final String VERSION = "{{ version }}";|' src/main/java/com/stripe/Stripe.java diff --git a/src/main/java/com/stripe/ApiVersion.java b/src/main/java/com/stripe/ApiVersion.java index f582b3a469b..40e6e8ec23f 100644 --- a/src/main/java/com/stripe/ApiVersion.java +++ b/src/main/java/com/stripe/ApiVersion.java @@ -2,5 +2,5 @@ package com.stripe; final class ApiVersion { - public static final String CURRENT = "2024-12-18.acacia"; + public static final String CURRENT = "2025-01-27.acacia"; } diff --git a/src/main/java/com/stripe/model/Account.java b/src/main/java/com/stripe/model/Account.java index 508a6fd0138..b0d5e77c9d7 100644 --- a/src/main/java/com/stripe/model/Account.java +++ b/src/main/java/com/stripe/model/Account.java @@ -1226,6 +1226,15 @@ public static class Capabilities extends StripeObject { @SerializedName("p24_payments") String p24Payments; + /** + * The status of the pay_by_bank payments capability of the account, or whether the account can + * directly process pay_by_bank charges. + * + *

One of {@code active}, {@code inactive}, or {@code pending}. + */ + @SerializedName("pay_by_bank_payments") + String payByBankPayments; + /** * The status of the Payco capability of the account, or whether the account can directly * process Payco payments. diff --git a/src/main/java/com/stripe/model/AccountSession.java b/src/main/java/com/stripe/model/AccountSession.java index 47b6ef0e8c8..b92d7130389 100644 --- a/src/main/java/com/stripe/model/AccountSession.java +++ b/src/main/java/com/stripe/model/AccountSession.java @@ -147,6 +147,18 @@ public static class Components extends StripeObject { @SerializedName("documents") Documents documents; + @SerializedName("financial_account") + FinancialAccount financialAccount; + + @SerializedName("financial_account_transactions") + FinancialAccountTransactions financialAccountTransactions; + + @SerializedName("issuing_card") + IssuingCard issuingCard; + + @SerializedName("issuing_cards_list") + IssuingCardsList issuingCardsList; + @SerializedName("notification_banner") NotificationBanner notificationBanner; @@ -424,6 +436,172 @@ public static class Documents extends StripeObject { public static class Features extends StripeObject {} } + /** + * For more details about FinancialAccount, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class FinancialAccount extends StripeObject { + /** Whether the embedded component is enabled. */ + @SerializedName("enabled") + Boolean enabled; + + @SerializedName("features") + Features features; + + /** + * For more details about Features, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Features extends StripeObject { + /** + * Disables Stripe user authentication for this embedded component. This value can only be + * true for accounts where {@code controller.requirement_collection} is {@code application}. + * The default value is the opposite of the {@code external_account_collection} value. For + * example, if you don’t set {@code external_account_collection}, it defaults to true and + * {@code disable_stripe_user_authentication} defaults to false. + */ + @SerializedName("disable_stripe_user_authentication") + Boolean disableStripeUserAuthentication; + + /** Whether to allow external accounts to be linked for money transfer. */ + @SerializedName("external_account_collection") + Boolean externalAccountCollection; + + /** Whether to allow sending money. */ + @SerializedName("send_money") + Boolean sendMoney; + + /** Whether to allow transferring balance. */ + @SerializedName("transfer_balance") + Boolean transferBalance; + } + } + + /** + * For more details about FinancialAccountTransactions, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class FinancialAccountTransactions extends StripeObject { + /** Whether the embedded component is enabled. */ + @SerializedName("enabled") + Boolean enabled; + + @SerializedName("features") + Features features; + + /** + * For more details about Features, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Features extends StripeObject { + /** Whether to allow card spend dispute management features. */ + @SerializedName("card_spend_dispute_management") + Boolean cardSpendDisputeManagement; + } + } + + /** + * For more details about IssuingCard, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class IssuingCard extends StripeObject { + /** Whether the embedded component is enabled. */ + @SerializedName("enabled") + Boolean enabled; + + @SerializedName("features") + Features features; + + /** + * For more details about Features, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Features extends StripeObject { + /** Whether to allow card management features. */ + @SerializedName("card_management") + Boolean cardManagement; + + /** Whether to allow card spend dispute management features. */ + @SerializedName("card_spend_dispute_management") + Boolean cardSpendDisputeManagement; + + /** Whether to allow cardholder management features. */ + @SerializedName("cardholder_management") + Boolean cardholderManagement; + + /** Whether to allow spend control management features. */ + @SerializedName("spend_control_management") + Boolean spendControlManagement; + } + } + + /** + * For more details about IssuingCardsList, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class IssuingCardsList extends StripeObject { + /** Whether the embedded component is enabled. */ + @SerializedName("enabled") + Boolean enabled; + + @SerializedName("features") + Features features; + + /** + * For more details about Features, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Features extends StripeObject { + /** Whether to allow card management features. */ + @SerializedName("card_management") + Boolean cardManagement; + + /** Whether to allow card spend dispute management features. */ + @SerializedName("card_spend_dispute_management") + Boolean cardSpendDisputeManagement; + + /** Whether to allow cardholder management features. */ + @SerializedName("cardholder_management") + Boolean cardholderManagement; + + /** + * Disables Stripe user authentication for this embedded component. This feature can only be + * false for accounts where you’re responsible for collecting updated information when + * requirements are due or change, like custom accounts. + */ + @SerializedName("disable_stripe_user_authentication") + Boolean disableStripeUserAuthentication; + + /** Whether to allow spend control management features. */ + @SerializedName("spend_control_management") + Boolean spendControlManagement; + } + } + /** * For more details about NotificationBanner, please refer to the API Reference. diff --git a/src/main/java/com/stripe/model/Charge.java b/src/main/java/com/stripe/model/Charge.java index 526853c4f0f..7c276285c89 100644 --- a/src/main/java/com/stripe/model/Charge.java +++ b/src/main/java/com/stripe/model/Charge.java @@ -1271,6 +1271,9 @@ public static class PaymentMethodDetails extends StripeObject { @SerializedName("p24") P24 p24; + @SerializedName("pay_by_bank") + PayByBank payByBank; + @SerializedName("payco") Payco payco; @@ -3389,6 +3392,15 @@ public static class P24 extends StripeObject { String verifiedName; } + /** + * For more details about PayByBank, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class PayByBank extends StripeObject {} + /** * For more details about Payco, please refer to the API * Reference. diff --git a/src/main/java/com/stripe/model/ConfirmationToken.java b/src/main/java/com/stripe/model/ConfirmationToken.java index 26cb5f2c97d..8ea5528804c 100644 --- a/src/main/java/com/stripe/model/ConfirmationToken.java +++ b/src/main/java/com/stripe/model/ConfirmationToken.java @@ -349,6 +349,9 @@ public static class PaymentMethodPreview extends StripeObject { @SerializedName("p24") P24 p24; + @SerializedName("pay_by_bank") + PayByBank payByBank; + @SerializedName("payco") Payco payco; @@ -406,10 +409,10 @@ public static class PaymentMethodPreview extends StripeObject { * {@code grabpay}, {@code id_bank_transfer}, {@code ideal}, {@code interac_present}, {@code * kakao_pay}, {@code klarna}, {@code konbini}, {@code kr_card}, {@code link}, {@code mb_way}, * {@code mobilepay}, {@code multibanco}, {@code naver_pay}, {@code oxxo}, {@code p24}, {@code - * payco}, {@code paynow}, {@code paypal}, {@code payto}, {@code pix}, {@code promptpay}, {@code - * qris}, {@code rechnung}, {@code revolut_pay}, {@code samsung_pay}, {@code sepa_debit}, {@code - * shopeepay}, {@code sofort}, {@code swish}, {@code twint}, {@code us_bank_account}, {@code - * wechat_pay}, or {@code zip}. + * pay_by_bank}, {@code payco}, {@code paynow}, {@code paypal}, {@code payto}, {@code pix}, + * {@code promptpay}, {@code qris}, {@code rechnung}, {@code revolut_pay}, {@code samsung_pay}, + * {@code sepa_debit}, {@code shopeepay}, {@code sofort}, {@code swish}, {@code twint}, {@code + * us_bank_account}, {@code wechat_pay}, or {@code zip}. */ @SerializedName("type") String type; @@ -1912,6 +1915,15 @@ public static class P24 extends StripeObject { String bank; } + /** + * For more details about PayByBank, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class PayByBank extends StripeObject {} + /** * For more details about Payco, please refer to the API * Reference. diff --git a/src/main/java/com/stripe/model/PaymentIntent.java b/src/main/java/com/stripe/model/PaymentIntent.java index ed06a71fe73..c99cbcd1d1f 100644 --- a/src/main/java/com/stripe/model/PaymentIntent.java +++ b/src/main/java/com/stripe/model/PaymentIntent.java @@ -3141,6 +3141,9 @@ public static class PaymentMethodOptions extends StripeObject { @SerializedName("p24") P24 p24; + @SerializedName("pay_by_bank") + PayByBank payByBank; + @SerializedName("payco") Payco payco; @@ -4890,6 +4893,15 @@ public static class P24 extends StripeObject { String setupFutureUsage; } + /** + * For more details about PayByBank, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class PayByBank extends StripeObject {} + /** * For more details about Payco, please refer to the API * Reference. diff --git a/src/main/java/com/stripe/model/PaymentMethod.java b/src/main/java/com/stripe/model/PaymentMethod.java index ccc52b28a39..d10a728f1cd 100644 --- a/src/main/java/com/stripe/model/PaymentMethod.java +++ b/src/main/java/com/stripe/model/PaymentMethod.java @@ -191,6 +191,9 @@ public class PaymentMethod extends ApiResource implements HasId, MetadataStore

API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class PayByBank extends StripeObject {} + /** * For more details about Payco, please refer to the API * Reference. @@ -2618,6 +2630,7 @@ public void setResponseGetter(StripeResponseGetter responseGetter) { trySetResponseGetter(naverPay, responseGetter); trySetResponseGetter(oxxo, responseGetter); trySetResponseGetter(p24, responseGetter); + trySetResponseGetter(payByBank, responseGetter); trySetResponseGetter(payco, responseGetter); trySetResponseGetter(paynow, responseGetter); trySetResponseGetter(paypal, responseGetter); diff --git a/src/main/java/com/stripe/model/PaymentMethodConfiguration.java b/src/main/java/com/stripe/model/PaymentMethodConfiguration.java index 4c258050a60..8f670929131 100644 --- a/src/main/java/com/stripe/model/PaymentMethodConfiguration.java +++ b/src/main/java/com/stripe/model/PaymentMethodConfiguration.java @@ -188,6 +188,9 @@ public class PaymentMethodConfiguration extends ApiResource implements HasId { @SerializedName("parent") String parent; + @SerializedName("pay_by_bank") + PayByBank payByBank; + @SerializedName("paynow") Paynow paynow; @@ -2016,6 +2019,57 @@ public static class DisplayPreference extends StripeObject { } } + /** + * For more details about PayByBank, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class PayByBank extends StripeObject { + /** + * Whether this payment method may be offered at checkout. True if {@code display_preference} is + * {@code on} and the payment method's capability is active. + */ + @SerializedName("available") + Boolean available; + + @SerializedName("display_preference") + DisplayPreference displayPreference; + + /** + * For more details about DisplayPreference, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class DisplayPreference extends StripeObject { + /** + * For child configs, whether or not the account's preference will be observed. If {@code + * false}, the parent configuration's default is used. + */ + @SerializedName("overridable") + Boolean overridable; + + /** + * The account's display preference. + * + *

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

One of {@code off}, or {@code on}. + */ + @SerializedName("value") + String value; + } + } + /** * For more details about Paynow, please refer to the API * Reference. @@ -2765,6 +2819,7 @@ public void setResponseGetter(StripeResponseGetter responseGetter) { trySetResponseGetter(multibanco, responseGetter); trySetResponseGetter(oxxo, responseGetter); trySetResponseGetter(p24, responseGetter); + trySetResponseGetter(payByBank, responseGetter); trySetResponseGetter(paynow, responseGetter); trySetResponseGetter(paypal, responseGetter); trySetResponseGetter(payto, responseGetter); diff --git a/src/main/java/com/stripe/model/billingportal/Configuration.java b/src/main/java/com/stripe/model/billingportal/Configuration.java index 67ee0e8a988..954b2ea235c 100644 --- a/src/main/java/com/stripe/model/billingportal/Configuration.java +++ b/src/main/java/com/stripe/model/billingportal/Configuration.java @@ -386,7 +386,7 @@ public static class SubscriptionCancel extends StripeObject { * Whether to create prorations when canceling subscriptions. Possible values are {@code none} * and {@code create_prorations}. * - *

One of {@code create_prorations}, or {@code none}. + *

One of {@code always_invoice}, {@code create_prorations}, or {@code none}. */ @SerializedName("proration_behavior") String prorationBehavior; diff --git a/src/main/java/com/stripe/model/checkout/Session.java b/src/main/java/com/stripe/model/checkout/Session.java index dedc4d9aef7..b4f7982ffcd 100644 --- a/src/main/java/com/stripe/model/checkout/Session.java +++ b/src/main/java/com/stripe/model/checkout/Session.java @@ -5,6 +5,7 @@ import com.stripe.exception.StripeException; import com.stripe.model.Account; import com.stripe.model.Address; +import com.stripe.model.Coupon; import com.stripe.model.Customer; import com.stripe.model.ExpandableField; import com.stripe.model.HasId; @@ -13,6 +14,7 @@ import com.stripe.model.MetadataStore; import com.stripe.model.PaymentIntent; import com.stripe.model.PaymentLink; +import com.stripe.model.PromotionCode; import com.stripe.model.SetupIntent; import com.stripe.model.ShippingDetails; import com.stripe.model.ShippingRate; @@ -192,6 +194,10 @@ public class Session extends ApiResource implements HasId, MetadataStore discounts; + /** The timestamp at which the Checkout Session will expire. */ @SerializedName("expires_at") Long expiresAt; @@ -1445,6 +1451,64 @@ public static class TaxId extends StripeObject { } } + /** + * For more details about Discount, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Discount extends StripeObject { + /** Coupon attached to the Checkout Session. */ + @SerializedName("coupon") + @Getter(lombok.AccessLevel.NONE) + @Setter(lombok.AccessLevel.NONE) + ExpandableField coupon; + + /** Promotion code attached to the Checkout Session. */ + @SerializedName("promotion_code") + @Getter(lombok.AccessLevel.NONE) + @Setter(lombok.AccessLevel.NONE) + ExpandableField promotionCode; + + /** Get ID of expandable {@code coupon} object. */ + public String getCoupon() { + return (this.coupon != null) ? this.coupon.getId() : null; + } + + public void setCoupon(String id) { + this.coupon = ApiResource.setExpandableFieldId(id, this.coupon); + } + + /** Get expanded {@code coupon}. */ + public Coupon getCouponObject() { + return (this.coupon != null) ? this.coupon.getExpanded() : null; + } + + public void setCouponObject(Coupon expandableObject) { + this.coupon = new ExpandableField(expandableObject.getId(), expandableObject); + } + + /** Get ID of expandable {@code promotionCode} object. */ + public String getPromotionCode() { + return (this.promotionCode != null) ? this.promotionCode.getId() : null; + } + + public void setPromotionCode(String id) { + this.promotionCode = ApiResource.setExpandableFieldId(id, this.promotionCode); + } + + /** Get expanded {@code promotionCode}. */ + public PromotionCode getPromotionCodeObject() { + return (this.promotionCode != null) ? this.promotionCode.getExpanded() : null; + } + + public void setPromotionCodeObject(PromotionCode expandableObject) { + this.promotionCode = + new ExpandableField(expandableObject.getId(), expandableObject); + } + } + /** * For more details about InvoiceCreation, please refer to the API Reference. @@ -3527,7 +3591,7 @@ public static class ShippingAddressCollection extends StripeObject { /** * An array of two-letter ISO country codes representing which countries Checkout should provide * as options for shipping locations. Unsupported country codes: {@code AS, CX, CC, CU, HM, IR, - * KP, MH, FM, NF, MP, PW, SD, SY, UM, VI}. + * KP, MH, FM, NF, MP, PW, SY, UM, VI}. */ @SerializedName("allowed_countries") List allowedCountries; diff --git a/src/main/java/com/stripe/model/terminal/Configuration.java b/src/main/java/com/stripe/model/terminal/Configuration.java index 250a5f3bd41..d390315727d 100644 --- a/src/main/java/com/stripe/model/terminal/Configuration.java +++ b/src/main/java/com/stripe/model/terminal/Configuration.java @@ -381,6 +381,9 @@ public static class Tipping extends StripeObject { @SerializedName("hkd") Hkd hkd; + @SerializedName("jpy") + Jpy jpy; + @SerializedName("myr") Myr myr; @@ -594,6 +597,30 @@ public static class Hkd extends StripeObject { Long smartTipThreshold; } + /** + * For more details about Jpy, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Jpy extends StripeObject { + /** Fixed amounts displayed when collecting a tip. */ + @SerializedName("fixed_amounts") + List fixedAmounts; + + /** Percentages displayed when collecting a tip. */ + @SerializedName("percentages") + List percentages; + + /** + * Below this amount, fixed amounts will be displayed; above it, percentages will be + * displayed. + */ + @SerializedName("smart_tip_threshold") + Long smartTipThreshold; + } + /** * For more details about Myr, please refer to the API * Reference. diff --git a/src/main/java/com/stripe/param/AccountCreateParams.java b/src/main/java/com/stripe/param/AccountCreateParams.java index c47a587d946..185ee61a8dd 100644 --- a/src/main/java/com/stripe/param/AccountCreateParams.java +++ b/src/main/java/com/stripe/param/AccountCreateParams.java @@ -1398,6 +1398,10 @@ public static class Capabilities { @SerializedName("p24_payments") P24Payments p24Payments; + /** The pay_by_bank_payments capability. */ + @SerializedName("pay_by_bank_payments") + PayByBankPayments payByBankPayments; + /** The payco_payments capability. */ @SerializedName("payco_payments") PaycoPayments paycoPayments; @@ -1541,6 +1545,7 @@ private Capabilities( NaverPayPayments naverPayPayments, OxxoPayments oxxoPayments, P24Payments p24Payments, + PayByBankPayments payByBankPayments, PaycoPayments paycoPayments, PaynowPayments paynowPayments, PaypalPayments paypalPayments, @@ -1608,6 +1613,7 @@ private Capabilities( this.naverPayPayments = naverPayPayments; this.oxxoPayments = oxxoPayments; this.p24Payments = p24Payments; + this.payByBankPayments = payByBankPayments; this.paycoPayments = paycoPayments; this.paynowPayments = paynowPayments; this.paypalPayments = paypalPayments; @@ -1724,6 +1730,8 @@ public static class Builder { private P24Payments p24Payments; + private PayByBankPayments payByBankPayments; + private PaycoPayments paycoPayments; private PaynowPayments paynowPayments; @@ -1819,6 +1827,7 @@ public AccountCreateParams.Capabilities build() { this.naverPayPayments, this.oxxoPayments, this.p24Payments, + this.payByBankPayments, this.paycoPayments, this.paynowPayments, this.paypalPayments, @@ -2149,6 +2158,13 @@ public Builder setP24Payments(AccountCreateParams.Capabilities.P24Payments p24Pa return this; } + /** The pay_by_bank_payments capability. */ + public Builder setPayByBankPayments( + AccountCreateParams.Capabilities.PayByBankPayments payByBankPayments) { + this.payByBankPayments = payByBankPayments; + return this; + } + /** The payco_payments capability. */ public Builder setPaycoPayments( AccountCreateParams.Capabilities.PaycoPayments paycoPayments) { @@ -5555,6 +5571,85 @@ public Builder setRequested(Boolean requested) { } } + @Getter + public static class PayByBankPayments { + /** + * 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; + + /** + * Passing true requests the capability for the account, if it is not already requested. A + * requested capability may not immediately become active. Any requirements to activate the + * capability are returned in the {@code requirements} arrays. + */ + @SerializedName("requested") + Boolean requested; + + private PayByBankPayments(Map extraParams, Boolean requested) { + this.extraParams = extraParams; + this.requested = requested; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Boolean requested; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountCreateParams.Capabilities.PayByBankPayments build() { + return new AccountCreateParams.Capabilities.PayByBankPayments( + this.extraParams, this.requested); + } + + /** + * 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 AccountCreateParams.Capabilities.PayByBankPayments#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 AccountCreateParams.Capabilities.PayByBankPayments#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Passing true requests the capability for the account, if it is not already requested. A + * requested capability may not immediately become active. Any requirements to activate the + * capability are returned in the {@code requirements} arrays. + */ + public Builder setRequested(Boolean requested) { + this.requested = requested; + return this; + } + } + } + @Getter public static class PaycoPayments { /** @@ -7552,6 +7647,13 @@ public static class Company { @SerializedName("directors_provided") Boolean directorsProvided; + /** + * This hash is used to attest that the directors information provided to Stripe is both current + * and correct. + */ + @SerializedName("directorship_declaration") + DirectorshipDeclaration directorshipDeclaration; + /** * Whether the company's executives have been provided. Set this Boolean to {@code true} after * creating all the company's executives with the @@ -7658,6 +7760,7 @@ private Company( AddressKana addressKana, AddressKanji addressKanji, Boolean directorsProvided, + DirectorshipDeclaration directorshipDeclaration, Boolean executivesProvided, String exportLicenseId, String exportPurposeCode, @@ -7679,6 +7782,7 @@ private Company( this.addressKana = addressKana; this.addressKanji = addressKanji; this.directorsProvided = directorsProvided; + this.directorshipDeclaration = directorshipDeclaration; this.executivesProvided = executivesProvided; this.exportLicenseId = exportLicenseId; this.exportPurposeCode = exportPurposeCode; @@ -7711,6 +7815,8 @@ public static class Builder { private Boolean directorsProvided; + private DirectorshipDeclaration directorshipDeclaration; + private Boolean executivesProvided; private String exportLicenseId; @@ -7752,6 +7858,7 @@ public AccountCreateParams.Company build() { this.addressKana, this.addressKanji, this.directorsProvided, + this.directorshipDeclaration, this.executivesProvided, this.exportLicenseId, this.exportPurposeCode, @@ -7801,6 +7908,16 @@ public Builder setDirectorsProvided(Boolean directorsProvided) { return this; } + /** + * This hash is used to attest that the directors information provided to Stripe is both + * current and correct. + */ + public Builder setDirectorshipDeclaration( + AccountCreateParams.Company.DirectorshipDeclaration directorshipDeclaration) { + this.directorshipDeclaration = directorshipDeclaration; + return this; + } + /** * Whether the company's executives have been provided. Set this Boolean to {@code true} after * creating all the company's executives with the @@ -8464,6 +8581,109 @@ public Builder setTown(String town) { } } + @Getter + public static class DirectorshipDeclaration { + /** The Unix timestamp marking when the directorship declaration attestation was made. */ + @SerializedName("date") + Long date; + + /** + * 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; + + /** The IP address from which the directorship declaration attestation was made. */ + @SerializedName("ip") + String ip; + + /** + * The user agent of the browser from which the directorship declaration attestation was made. + */ + @SerializedName("user_agent") + String userAgent; + + private DirectorshipDeclaration( + Long date, Map extraParams, String ip, String userAgent) { + this.date = date; + this.extraParams = extraParams; + this.ip = ip; + this.userAgent = userAgent; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Long date; + + private Map extraParams; + + private String ip; + + private String userAgent; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountCreateParams.Company.DirectorshipDeclaration build() { + return new AccountCreateParams.Company.DirectorshipDeclaration( + this.date, this.extraParams, this.ip, this.userAgent); + } + + /** The Unix timestamp marking when the directorship declaration attestation was made. */ + public Builder setDate(Long date) { + this.date = date; + 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 AccountCreateParams.Company.DirectorshipDeclaration#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 AccountCreateParams.Company.DirectorshipDeclaration#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** The IP address from which the directorship declaration attestation was made. */ + public Builder setIp(String ip) { + this.ip = ip; + return this; + } + + /** + * The user agent of the browser from which the directorship declaration attestation was + * made. + */ + public Builder setUserAgent(String userAgent) { + this.userAgent = userAgent; + return this; + } + } + } + @Getter public static class OwnershipDeclaration { /** The Unix timestamp marking when the beneficial owner attestation was made. */ @@ -9552,6 +9772,10 @@ public static class Documents { @SerializedName("proof_of_registration") ProofOfRegistration proofOfRegistration; + /** One or more documents that demonstrate proof of ultimate beneficial ownership. */ + @SerializedName("proof_of_ultimate_beneficial_ownership") + ProofOfUltimateBeneficialOwnership proofOfUltimateBeneficialOwnership; + private Documents( BankAccountOwnershipVerification bankAccountOwnershipVerification, CompanyLicense companyLicense, @@ -9560,7 +9784,8 @@ private Documents( CompanyRegistrationVerification companyRegistrationVerification, CompanyTaxIdVerification companyTaxIdVerification, Map extraParams, - ProofOfRegistration proofOfRegistration) { + ProofOfRegistration proofOfRegistration, + ProofOfUltimateBeneficialOwnership proofOfUltimateBeneficialOwnership) { this.bankAccountOwnershipVerification = bankAccountOwnershipVerification; this.companyLicense = companyLicense; this.companyMemorandumOfAssociation = companyMemorandumOfAssociation; @@ -9569,6 +9794,7 @@ private Documents( this.companyTaxIdVerification = companyTaxIdVerification; this.extraParams = extraParams; this.proofOfRegistration = proofOfRegistration; + this.proofOfUltimateBeneficialOwnership = proofOfUltimateBeneficialOwnership; } public static Builder builder() { @@ -9592,6 +9818,8 @@ public static class Builder { private ProofOfRegistration proofOfRegistration; + private ProofOfUltimateBeneficialOwnership proofOfUltimateBeneficialOwnership; + /** Finalize and obtain parameter instance from this builder. */ public AccountCreateParams.Documents build() { return new AccountCreateParams.Documents( @@ -9602,7 +9830,8 @@ public AccountCreateParams.Documents build() { this.companyRegistrationVerification, this.companyTaxIdVerification, this.extraParams, - this.proofOfRegistration); + this.proofOfRegistration, + this.proofOfUltimateBeneficialOwnership); } /** @@ -9697,6 +9926,14 @@ public Builder setProofOfRegistration( this.proofOfRegistration = proofOfRegistration; return this; } + + /** One or more documents that demonstrate proof of ultimate beneficial ownership. */ + public Builder setProofOfUltimateBeneficialOwnership( + AccountCreateParams.Documents.ProofOfUltimateBeneficialOwnership + proofOfUltimateBeneficialOwnership) { + this.proofOfUltimateBeneficialOwnership = proofOfUltimateBeneficialOwnership; + return this; + } } @Getter @@ -10377,6 +10614,106 @@ public Builder addAllFile(List elements) { } } } + + @Getter + public static class ProofOfUltimateBeneficialOwnership { + /** + * 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; + + /** + * One or more document ids returned by a file upload with a {@code purpose} value + * of {@code account_requirement}. + */ + @SerializedName("files") + List files; + + private ProofOfUltimateBeneficialOwnership( + Map extraParams, List files) { + this.extraParams = extraParams; + this.files = files; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private List files; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountCreateParams.Documents.ProofOfUltimateBeneficialOwnership build() { + return new AccountCreateParams.Documents.ProofOfUltimateBeneficialOwnership( + this.extraParams, this.files); + } + + /** + * 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 + * AccountCreateParams.Documents.ProofOfUltimateBeneficialOwnership#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 + * AccountCreateParams.Documents.ProofOfUltimateBeneficialOwnership#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Add an element to `files` list. A list is initialized for the first `add/addAll` call, + * and subsequent calls adds additional elements to the original list. See {@link + * AccountCreateParams.Documents.ProofOfUltimateBeneficialOwnership#files} for the field + * documentation. + */ + public Builder addFile(String element) { + if (this.files == null) { + this.files = new ArrayList<>(); + } + this.files.add(element); + return this; + } + + /** + * Add all elements to `files` list. A list is initialized for the first `add/addAll` call, + * and subsequent calls adds additional elements to the original list. See {@link + * AccountCreateParams.Documents.ProofOfUltimateBeneficialOwnership#files} for the field + * documentation. + */ + public Builder addAllFile(List elements) { + if (this.files == null) { + this.files = new ArrayList<>(); + } + this.files.addAll(elements); + return this; + } + } + } } @Getter diff --git a/src/main/java/com/stripe/param/AccountSessionCreateParams.java b/src/main/java/com/stripe/param/AccountSessionCreateParams.java index bf502328812..7b86da904a3 100644 --- a/src/main/java/com/stripe/param/AccountSessionCreateParams.java +++ b/src/main/java/com/stripe/param/AccountSessionCreateParams.java @@ -184,19 +184,19 @@ public static class Components { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Configuration for the financial account component. */ + /** Configuration for the financial account embedded component. */ @SerializedName("financial_account") FinancialAccount financialAccount; - /** Configuration for the financial account transactions component. */ + /** Configuration for the financial account transactions embedded component. */ @SerializedName("financial_account_transactions") FinancialAccountTransactions financialAccountTransactions; - /** Configuration for the issuing card component. */ + /** Configuration for the issuing card embedded component. */ @SerializedName("issuing_card") IssuingCard issuingCard; - /** Configuration for the issuing cards list component. */ + /** Configuration for the issuing cards list embedded component. */ @SerializedName("issuing_cards_list") IssuingCardsList issuingCardsList; @@ -240,6 +240,10 @@ public static class Components { @SerializedName("tax_settings") TaxSettings taxSettings; + /** Configuration for the tax threshold monitoring embedded component. */ + @SerializedName("tax_threshold_monitoring") + TaxThresholdMonitoring taxThresholdMonitoring; + private Components( AccountManagement accountManagement, AccountOnboarding accountOnboarding, @@ -265,7 +269,8 @@ private Components( Recipients recipients, ReportingChart reportingChart, TaxRegistrations taxRegistrations, - TaxSettings taxSettings) { + TaxSettings taxSettings, + TaxThresholdMonitoring taxThresholdMonitoring) { this.accountManagement = accountManagement; this.accountOnboarding = accountOnboarding; this.appInstall = appInstall; @@ -291,6 +296,7 @@ private Components( this.reportingChart = reportingChart; this.taxRegistrations = taxRegistrations; this.taxSettings = taxSettings; + this.taxThresholdMonitoring = taxThresholdMonitoring; } public static Builder builder() { @@ -348,6 +354,8 @@ public static class Builder { private TaxSettings taxSettings; + private TaxThresholdMonitoring taxThresholdMonitoring; + /** Finalize and obtain parameter instance from this builder. */ public AccountSessionCreateParams.Components build() { return new AccountSessionCreateParams.Components( @@ -375,7 +383,8 @@ public AccountSessionCreateParams.Components build() { this.recipients, this.reportingChart, this.taxRegistrations, - this.taxSettings); + this.taxSettings, + this.taxThresholdMonitoring); } /** Configuration for the account management embedded component. */ @@ -472,14 +481,14 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Configuration for the financial account component. */ + /** Configuration for the financial account embedded component. */ public Builder setFinancialAccount( AccountSessionCreateParams.Components.FinancialAccount financialAccount) { this.financialAccount = financialAccount; return this; } - /** Configuration for the financial account transactions component. */ + /** Configuration for the financial account transactions embedded component. */ public Builder setFinancialAccountTransactions( AccountSessionCreateParams.Components.FinancialAccountTransactions financialAccountTransactions) { @@ -487,13 +496,13 @@ public Builder setFinancialAccountTransactions( return this; } - /** Configuration for the issuing card component. */ + /** Configuration for the issuing card embedded component. */ public Builder setIssuingCard(AccountSessionCreateParams.Components.IssuingCard issuingCard) { this.issuingCard = issuingCard; return this; } - /** Configuration for the issuing cards list component. */ + /** Configuration for the issuing cards list embedded component. */ public Builder setIssuingCardsList( AccountSessionCreateParams.Components.IssuingCardsList issuingCardsList) { this.issuingCardsList = issuingCardsList; @@ -564,6 +573,13 @@ public Builder setTaxSettings(AccountSessionCreateParams.Components.TaxSettings this.taxSettings = taxSettings; return this; } + + /** Configuration for the tax threshold monitoring embedded component. */ + public Builder setTaxThresholdMonitoring( + AccountSessionCreateParams.Components.TaxThresholdMonitoring taxThresholdMonitoring) { + this.taxThresholdMonitoring = taxThresholdMonitoring; + return this; + } } @Getter @@ -4979,5 +4995,152 @@ public Builder putAllExtraParam(Map map) { } } } + + @Getter + public static class TaxThresholdMonitoring { + /** Required. Whether the embedded component is enabled. */ + @SerializedName("enabled") + Boolean enabled; + + /** + * 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; + + /** The list of features enabled in the embedded component. */ + @SerializedName("features") + Features features; + + private TaxThresholdMonitoring( + Boolean enabled, Map extraParams, Features features) { + this.enabled = enabled; + this.extraParams = extraParams; + this.features = features; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Boolean enabled; + + private Map extraParams; + + private Features features; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountSessionCreateParams.Components.TaxThresholdMonitoring build() { + return new AccountSessionCreateParams.Components.TaxThresholdMonitoring( + this.enabled, this.extraParams, this.features); + } + + /** Required. Whether the embedded component is enabled. */ + public Builder setEnabled(Boolean enabled) { + this.enabled = enabled; + 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.TaxThresholdMonitoring#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.TaxThresholdMonitoring#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** The list of features enabled in the embedded component. */ + public Builder setFeatures( + AccountSessionCreateParams.Components.TaxThresholdMonitoring.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.TaxThresholdMonitoring.Features build() { + return new AccountSessionCreateParams.Components.TaxThresholdMonitoring.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.TaxThresholdMonitoring.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.TaxThresholdMonitoring.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; + } + } + } + } } } diff --git a/src/main/java/com/stripe/param/AccountUpdateParams.java b/src/main/java/com/stripe/param/AccountUpdateParams.java index 4e100a34676..3c586ac0ea7 100644 --- a/src/main/java/com/stripe/param/AccountUpdateParams.java +++ b/src/main/java/com/stripe/param/AccountUpdateParams.java @@ -1496,6 +1496,10 @@ public static class Capabilities { @SerializedName("p24_payments") P24Payments p24Payments; + /** The pay_by_bank_payments capability. */ + @SerializedName("pay_by_bank_payments") + PayByBankPayments payByBankPayments; + /** The payco_payments capability. */ @SerializedName("payco_payments") PaycoPayments paycoPayments; @@ -1639,6 +1643,7 @@ private Capabilities( NaverPayPayments naverPayPayments, OxxoPayments oxxoPayments, P24Payments p24Payments, + PayByBankPayments payByBankPayments, PaycoPayments paycoPayments, PaynowPayments paynowPayments, PaypalPayments paypalPayments, @@ -1706,6 +1711,7 @@ private Capabilities( this.naverPayPayments = naverPayPayments; this.oxxoPayments = oxxoPayments; this.p24Payments = p24Payments; + this.payByBankPayments = payByBankPayments; this.paycoPayments = paycoPayments; this.paynowPayments = paynowPayments; this.paypalPayments = paypalPayments; @@ -1822,6 +1828,8 @@ public static class Builder { private P24Payments p24Payments; + private PayByBankPayments payByBankPayments; + private PaycoPayments paycoPayments; private PaynowPayments paynowPayments; @@ -1917,6 +1925,7 @@ public AccountUpdateParams.Capabilities build() { this.naverPayPayments, this.oxxoPayments, this.p24Payments, + this.payByBankPayments, this.paycoPayments, this.paynowPayments, this.paypalPayments, @@ -2247,6 +2256,13 @@ public Builder setP24Payments(AccountUpdateParams.Capabilities.P24Payments p24Pa return this; } + /** The pay_by_bank_payments capability. */ + public Builder setPayByBankPayments( + AccountUpdateParams.Capabilities.PayByBankPayments payByBankPayments) { + this.payByBankPayments = payByBankPayments; + return this; + } + /** The payco_payments capability. */ public Builder setPaycoPayments( AccountUpdateParams.Capabilities.PaycoPayments paycoPayments) { @@ -5653,6 +5669,85 @@ public Builder setRequested(Boolean requested) { } } + @Getter + public static class PayByBankPayments { + /** + * 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; + + /** + * Passing true requests the capability for the account, if it is not already requested. A + * requested capability may not immediately become active. Any requirements to activate the + * capability are returned in the {@code requirements} arrays. + */ + @SerializedName("requested") + Boolean requested; + + private PayByBankPayments(Map extraParams, Boolean requested) { + this.extraParams = extraParams; + this.requested = requested; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Boolean requested; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountUpdateParams.Capabilities.PayByBankPayments build() { + return new AccountUpdateParams.Capabilities.PayByBankPayments( + this.extraParams, this.requested); + } + + /** + * 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 AccountUpdateParams.Capabilities.PayByBankPayments#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 AccountUpdateParams.Capabilities.PayByBankPayments#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Passing true requests the capability for the account, if it is not already requested. A + * requested capability may not immediately become active. Any requirements to activate the + * capability are returned in the {@code requirements} arrays. + */ + public Builder setRequested(Boolean requested) { + this.requested = requested; + return this; + } + } + } + @Getter public static class PaycoPayments { /** @@ -7650,6 +7745,13 @@ public static class Company { @SerializedName("directors_provided") Boolean directorsProvided; + /** + * This hash is used to attest that the directors information provided to Stripe is both current + * and correct. + */ + @SerializedName("directorship_declaration") + DirectorshipDeclaration directorshipDeclaration; + /** * Whether the company's executives have been provided. Set this Boolean to {@code true} after * creating all the company's executives with the @@ -7756,6 +7858,7 @@ private Company( AddressKana addressKana, AddressKanji addressKanji, Boolean directorsProvided, + DirectorshipDeclaration directorshipDeclaration, Boolean executivesProvided, Object exportLicenseId, Object exportPurposeCode, @@ -7777,6 +7880,7 @@ private Company( this.addressKana = addressKana; this.addressKanji = addressKanji; this.directorsProvided = directorsProvided; + this.directorshipDeclaration = directorshipDeclaration; this.executivesProvided = executivesProvided; this.exportLicenseId = exportLicenseId; this.exportPurposeCode = exportPurposeCode; @@ -7809,6 +7913,8 @@ public static class Builder { private Boolean directorsProvided; + private DirectorshipDeclaration directorshipDeclaration; + private Boolean executivesProvided; private Object exportLicenseId; @@ -7850,6 +7956,7 @@ public AccountUpdateParams.Company build() { this.addressKana, this.addressKanji, this.directorsProvided, + this.directorshipDeclaration, this.executivesProvided, this.exportLicenseId, this.exportPurposeCode, @@ -7899,6 +8006,16 @@ public Builder setDirectorsProvided(Boolean directorsProvided) { return this; } + /** + * This hash is used to attest that the directors information provided to Stripe is both + * current and correct. + */ + public Builder setDirectorshipDeclaration( + AccountUpdateParams.Company.DirectorshipDeclaration directorshipDeclaration) { + this.directorshipDeclaration = directorshipDeclaration; + return this; + } + /** * Whether the company's executives have been provided. Set this Boolean to {@code true} after * creating all the company's executives with the @@ -8765,6 +8882,124 @@ public Builder setTown(EmptyParam town) { } } + @Getter + public static class DirectorshipDeclaration { + /** The Unix timestamp marking when the directorship declaration attestation was made. */ + @SerializedName("date") + Long date; + + /** + * 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; + + /** The IP address from which the directorship declaration attestation was made. */ + @SerializedName("ip") + Object ip; + + /** + * The user agent of the browser from which the directorship declaration attestation was made. + */ + @SerializedName("user_agent") + Object userAgent; + + private DirectorshipDeclaration( + Long date, Map extraParams, Object ip, Object userAgent) { + this.date = date; + this.extraParams = extraParams; + this.ip = ip; + this.userAgent = userAgent; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Long date; + + private Map extraParams; + + private Object ip; + + private Object userAgent; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountUpdateParams.Company.DirectorshipDeclaration build() { + return new AccountUpdateParams.Company.DirectorshipDeclaration( + this.date, this.extraParams, this.ip, this.userAgent); + } + + /** The Unix timestamp marking when the directorship declaration attestation was made. */ + public Builder setDate(Long date) { + this.date = date; + 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 AccountUpdateParams.Company.DirectorshipDeclaration#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 AccountUpdateParams.Company.DirectorshipDeclaration#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** The IP address from which the directorship declaration attestation was made. */ + public Builder setIp(String ip) { + this.ip = ip; + return this; + } + + /** The IP address from which the directorship declaration attestation was made. */ + public Builder setIp(EmptyParam ip) { + this.ip = ip; + return this; + } + + /** + * The user agent of the browser from which the directorship declaration attestation was + * made. + */ + public Builder setUserAgent(String userAgent) { + this.userAgent = userAgent; + return this; + } + + /** + * The user agent of the browser from which the directorship declaration attestation was + * made. + */ + public Builder setUserAgent(EmptyParam userAgent) { + this.userAgent = userAgent; + return this; + } + } + } + @Getter public static class OwnershipDeclaration { /** The Unix timestamp marking when the beneficial owner attestation was made. */ @@ -9226,6 +9461,10 @@ public static class Documents { @SerializedName("proof_of_registration") ProofOfRegistration proofOfRegistration; + /** One or more documents that demonstrate proof of ultimate beneficial ownership. */ + @SerializedName("proof_of_ultimate_beneficial_ownership") + ProofOfUltimateBeneficialOwnership proofOfUltimateBeneficialOwnership; + private Documents( BankAccountOwnershipVerification bankAccountOwnershipVerification, CompanyLicense companyLicense, @@ -9234,7 +9473,8 @@ private Documents( CompanyRegistrationVerification companyRegistrationVerification, CompanyTaxIdVerification companyTaxIdVerification, Map extraParams, - ProofOfRegistration proofOfRegistration) { + ProofOfRegistration proofOfRegistration, + ProofOfUltimateBeneficialOwnership proofOfUltimateBeneficialOwnership) { this.bankAccountOwnershipVerification = bankAccountOwnershipVerification; this.companyLicense = companyLicense; this.companyMemorandumOfAssociation = companyMemorandumOfAssociation; @@ -9243,6 +9483,7 @@ private Documents( this.companyTaxIdVerification = companyTaxIdVerification; this.extraParams = extraParams; this.proofOfRegistration = proofOfRegistration; + this.proofOfUltimateBeneficialOwnership = proofOfUltimateBeneficialOwnership; } public static Builder builder() { @@ -9266,6 +9507,8 @@ public static class Builder { private ProofOfRegistration proofOfRegistration; + private ProofOfUltimateBeneficialOwnership proofOfUltimateBeneficialOwnership; + /** Finalize and obtain parameter instance from this builder. */ public AccountUpdateParams.Documents build() { return new AccountUpdateParams.Documents( @@ -9276,7 +9519,8 @@ public AccountUpdateParams.Documents build() { this.companyRegistrationVerification, this.companyTaxIdVerification, this.extraParams, - this.proofOfRegistration); + this.proofOfRegistration, + this.proofOfUltimateBeneficialOwnership); } /** @@ -9371,6 +9615,14 @@ public Builder setProofOfRegistration( this.proofOfRegistration = proofOfRegistration; return this; } + + /** One or more documents that demonstrate proof of ultimate beneficial ownership. */ + public Builder setProofOfUltimateBeneficialOwnership( + AccountUpdateParams.Documents.ProofOfUltimateBeneficialOwnership + proofOfUltimateBeneficialOwnership) { + this.proofOfUltimateBeneficialOwnership = proofOfUltimateBeneficialOwnership; + return this; + } } @Getter @@ -10051,6 +10303,106 @@ public Builder addAllFile(List elements) { } } } + + @Getter + public static class ProofOfUltimateBeneficialOwnership { + /** + * 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; + + /** + * One or more document ids returned by a file upload with a {@code purpose} value + * of {@code account_requirement}. + */ + @SerializedName("files") + List files; + + private ProofOfUltimateBeneficialOwnership( + Map extraParams, List files) { + this.extraParams = extraParams; + this.files = files; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private List files; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountUpdateParams.Documents.ProofOfUltimateBeneficialOwnership build() { + return new AccountUpdateParams.Documents.ProofOfUltimateBeneficialOwnership( + this.extraParams, this.files); + } + + /** + * 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 + * AccountUpdateParams.Documents.ProofOfUltimateBeneficialOwnership#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 + * AccountUpdateParams.Documents.ProofOfUltimateBeneficialOwnership#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Add an element to `files` list. A list is initialized for the first `add/addAll` call, + * and subsequent calls adds additional elements to the original list. See {@link + * AccountUpdateParams.Documents.ProofOfUltimateBeneficialOwnership#files} for the field + * documentation. + */ + public Builder addFile(String element) { + if (this.files == null) { + this.files = new ArrayList<>(); + } + this.files.add(element); + return this; + } + + /** + * Add all elements to `files` list. A list is initialized for the first `add/addAll` call, + * and subsequent calls adds additional elements to the original list. See {@link + * AccountUpdateParams.Documents.ProofOfUltimateBeneficialOwnership#files} for the field + * documentation. + */ + public Builder addAllFile(List elements) { + if (this.files == null) { + this.files = new ArrayList<>(); + } + this.files.addAll(elements); + return this; + } + } + } } @Getter diff --git a/src/main/java/com/stripe/param/ConfirmationTokenCreateParams.java b/src/main/java/com/stripe/param/ConfirmationTokenCreateParams.java index 317c3e28cb5..fdd9a267e4b 100644 --- a/src/main/java/com/stripe/param/ConfirmationTokenCreateParams.java +++ b/src/main/java/com/stripe/param/ConfirmationTokenCreateParams.java @@ -451,6 +451,13 @@ public static class PaymentMethodData { @SerializedName("p24") P24 p24; + /** + * If this is a {@code pay_by_bank} PaymentMethod, this hash contains details about the + * PayByBank payment method. + */ + @SerializedName("pay_by_bank") + PayByBank payByBank; + /** * If this is a {@code payco} PaymentMethod, this hash contains details about the PAYCO payment * method. @@ -628,6 +635,7 @@ private PaymentMethodData( NaverPay naverPay, Oxxo oxxo, P24 p24, + PayByBank payByBank, Payco payco, Paynow paynow, Paypal paypal, @@ -684,6 +692,7 @@ private PaymentMethodData( this.naverPay = naverPay; this.oxxo = oxxo; this.p24 = p24; + this.payByBank = payByBank; this.payco = payco; this.paynow = paynow; this.paypal = paypal; @@ -783,6 +792,8 @@ public static class Builder { private P24 p24; + private PayByBank payByBank; + private Payco payco; private Paynow paynow; @@ -862,6 +873,7 @@ public ConfirmationTokenCreateParams.PaymentMethodData build() { this.naverPay, this.oxxo, this.p24, + this.payByBank, this.payco, this.paynow, this.paypal, @@ -1260,6 +1272,16 @@ public Builder setP24(ConfirmationTokenCreateParams.PaymentMethodData.P24 p24) { return this; } + /** + * If this is a {@code pay_by_bank} PaymentMethod, this hash contains details about the + * PayByBank payment method. + */ + public Builder setPayByBank( + ConfirmationTokenCreateParams.PaymentMethodData.PayByBank payByBank) { + this.payByBank = payByBank; + return this; + } + /** * If this is a {@code payco} PaymentMethod, this hash contains details about the PAYCO * payment method. @@ -4295,6 +4317,63 @@ public enum Bank implements ApiRequestParams.EnumParam { } } + @Getter + public static class PayByBank { + /** + * 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 PayByBank(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 ConfirmationTokenCreateParams.PaymentMethodData.PayByBank build() { + return new ConfirmationTokenCreateParams.PaymentMethodData.PayByBank(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 ConfirmationTokenCreateParams.PaymentMethodData.PayByBank#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 ConfirmationTokenCreateParams.PaymentMethodData.PayByBank#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + } + @Getter public static class Payco { /** @@ -5841,6 +5920,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("p24") P24("p24"), + @SerializedName("pay_by_bank") + PAY_BY_BANK("pay_by_bank"), + @SerializedName("payco") PAYCO("payco"), diff --git a/src/main/java/com/stripe/param/CustomerListPaymentMethodsParams.java b/src/main/java/com/stripe/param/CustomerListPaymentMethodsParams.java index dbafb882f67..fa35be064b3 100644 --- a/src/main/java/com/stripe/param/CustomerListPaymentMethodsParams.java +++ b/src/main/java/com/stripe/param/CustomerListPaymentMethodsParams.java @@ -336,6 +336,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("p24") P24("p24"), + @SerializedName("pay_by_bank") + PAY_BY_BANK("pay_by_bank"), + @SerializedName("payco") PAYCO("payco"), diff --git a/src/main/java/com/stripe/param/CustomerPaymentMethodListParams.java b/src/main/java/com/stripe/param/CustomerPaymentMethodListParams.java index 751062b2841..51bd5219728 100644 --- a/src/main/java/com/stripe/param/CustomerPaymentMethodListParams.java +++ b/src/main/java/com/stripe/param/CustomerPaymentMethodListParams.java @@ -336,6 +336,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("p24") P24("p24"), + @SerializedName("pay_by_bank") + PAY_BY_BANK("pay_by_bank"), + @SerializedName("payco") PAYCO("payco"), diff --git a/src/main/java/com/stripe/param/PaymentIntentConfirmParams.java b/src/main/java/com/stripe/param/PaymentIntentConfirmParams.java index 13c23aec55e..a31d6087e7b 100644 --- a/src/main/java/com/stripe/param/PaymentIntentConfirmParams.java +++ b/src/main/java/com/stripe/param/PaymentIntentConfirmParams.java @@ -5565,6 +5565,13 @@ public static class PaymentMethodData { @SerializedName("p24") P24 p24; + /** + * If this is a {@code pay_by_bank} PaymentMethod, this hash contains details about the + * PayByBank payment method. + */ + @SerializedName("pay_by_bank") + PayByBank payByBank; + /** * If this is a {@code payco} PaymentMethod, this hash contains details about the PAYCO payment * method. @@ -5742,6 +5749,7 @@ private PaymentMethodData( NaverPay naverPay, Oxxo oxxo, P24 p24, + PayByBank payByBank, Payco payco, Paynow paynow, Paypal paypal, @@ -5798,6 +5806,7 @@ private PaymentMethodData( this.naverPay = naverPay; this.oxxo = oxxo; this.p24 = p24; + this.payByBank = payByBank; this.payco = payco; this.paynow = paynow; this.paypal = paypal; @@ -5897,6 +5906,8 @@ public static class Builder { private P24 p24; + private PayByBank payByBank; + private Payco payco; private Paynow paynow; @@ -5976,6 +5987,7 @@ public PaymentIntentConfirmParams.PaymentMethodData build() { this.naverPay, this.oxxo, this.p24, + this.payByBank, this.payco, this.paynow, this.paypal, @@ -6372,6 +6384,16 @@ public Builder setP24(PaymentIntentConfirmParams.PaymentMethodData.P24 p24) { return this; } + /** + * If this is a {@code pay_by_bank} PaymentMethod, this hash contains details about the + * PayByBank payment method. + */ + public Builder setPayByBank( + PaymentIntentConfirmParams.PaymentMethodData.PayByBank payByBank) { + this.payByBank = payByBank; + return this; + } + /** * If this is a {@code payco} PaymentMethod, this hash contains details about the PAYCO * payment method. @@ -9393,6 +9415,63 @@ public enum Bank implements ApiRequestParams.EnumParam { } } + @Getter + public static class PayByBank { + /** + * 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 PayByBank(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 PaymentIntentConfirmParams.PaymentMethodData.PayByBank build() { + return new PaymentIntentConfirmParams.PaymentMethodData.PayByBank(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 PaymentIntentConfirmParams.PaymentMethodData.PayByBank#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 PaymentIntentConfirmParams.PaymentMethodData.PayByBank#extraParams} for + * the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + } + @Getter public static class Payco { /** @@ -10935,6 +11014,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("p24") P24("p24"), + @SerializedName("pay_by_bank") + PAY_BY_BANK("pay_by_bank"), + @SerializedName("payco") PAYCO("payco"), @@ -11244,6 +11326,13 @@ public static class PaymentMethodOptions { @SerializedName("p24") Object p24; + /** + * If this is a {@code pay_by_bank} PaymentMethod, this sub-hash contains details about the + * PayByBank payment method options. + */ + @SerializedName("pay_by_bank") + Object payByBank; + /** * If this is a {@code payco} PaymentMethod, this sub-hash contains details about the PAYCO * payment method options. @@ -11406,6 +11495,7 @@ private PaymentMethodOptions( Object naverPay, Object oxxo, Object p24, + Object payByBank, Object payco, Object paynow, Object paypal, @@ -11459,6 +11549,7 @@ private PaymentMethodOptions( this.naverPay = naverPay; this.oxxo = oxxo; this.p24 = p24; + this.payByBank = payByBank; this.payco = payco; this.paynow = paynow; this.paypal = paypal; @@ -11554,6 +11645,8 @@ public static class Builder { private Object p24; + private Object payByBank; + private Object payco; private Object paynow; @@ -11628,6 +11721,7 @@ public PaymentIntentConfirmParams.PaymentMethodOptions build() { this.naverPay, this.oxxo, this.p24, + this.payByBank, this.payco, this.paynow, this.paypal, @@ -12295,6 +12389,25 @@ public Builder setP24(EmptyParam p24) { return this; } + /** + * If this is a {@code pay_by_bank} PaymentMethod, this sub-hash contains details about the + * PayByBank payment method options. + */ + public Builder setPayByBank( + PaymentIntentConfirmParams.PaymentMethodOptions.PayByBank payByBank) { + this.payByBank = payByBank; + return this; + } + + /** + * If this is a {@code pay_by_bank} PaymentMethod, this sub-hash contains details about the + * PayByBank payment method options. + */ + public Builder setPayByBank(EmptyParam payByBank) { + this.payByBank = payByBank; + return this; + } + /** * If this is a {@code payco} PaymentMethod, this sub-hash contains details about the PAYCO * payment method options. @@ -21317,6 +21430,63 @@ public enum SetupFutureUsage implements ApiRequestParams.EnumParam { } } + @Getter + public static class PayByBank { + /** + * 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 PayByBank(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 PaymentIntentConfirmParams.PaymentMethodOptions.PayByBank build() { + return new PaymentIntentConfirmParams.PaymentMethodOptions.PayByBank(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 PaymentIntentConfirmParams.PaymentMethodOptions.PayByBank#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 PaymentIntentConfirmParams.PaymentMethodOptions.PayByBank#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + } + @Getter public static class Payco { /** diff --git a/src/main/java/com/stripe/param/PaymentIntentCreateParams.java b/src/main/java/com/stripe/param/PaymentIntentCreateParams.java index 9428df66071..8af494d8a35 100644 --- a/src/main/java/com/stripe/param/PaymentIntentCreateParams.java +++ b/src/main/java/com/stripe/param/PaymentIntentCreateParams.java @@ -6060,6 +6060,13 @@ public static class PaymentMethodData { @SerializedName("p24") P24 p24; + /** + * If this is a {@code pay_by_bank} PaymentMethod, this hash contains details about the + * PayByBank payment method. + */ + @SerializedName("pay_by_bank") + PayByBank payByBank; + /** * If this is a {@code payco} PaymentMethod, this hash contains details about the PAYCO payment * method. @@ -6237,6 +6244,7 @@ private PaymentMethodData( NaverPay naverPay, Oxxo oxxo, P24 p24, + PayByBank payByBank, Payco payco, Paynow paynow, Paypal paypal, @@ -6293,6 +6301,7 @@ private PaymentMethodData( this.naverPay = naverPay; this.oxxo = oxxo; this.p24 = p24; + this.payByBank = payByBank; this.payco = payco; this.paynow = paynow; this.paypal = paypal; @@ -6392,6 +6401,8 @@ public static class Builder { private P24 p24; + private PayByBank payByBank; + private Payco payco; private Paynow paynow; @@ -6471,6 +6482,7 @@ public PaymentIntentCreateParams.PaymentMethodData build() { this.naverPay, this.oxxo, this.p24, + this.payByBank, this.payco, this.paynow, this.paypal, @@ -6863,6 +6875,15 @@ public Builder setP24(PaymentIntentCreateParams.PaymentMethodData.P24 p24) { return this; } + /** + * If this is a {@code pay_by_bank} PaymentMethod, this hash contains details about the + * PayByBank payment method. + */ + public Builder setPayByBank(PaymentIntentCreateParams.PaymentMethodData.PayByBank payByBank) { + this.payByBank = payByBank; + return this; + } + /** * If this is a {@code payco} PaymentMethod, this hash contains details about the PAYCO * payment method. @@ -9875,6 +9896,63 @@ public enum Bank implements ApiRequestParams.EnumParam { } } + @Getter + public static class PayByBank { + /** + * 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 PayByBank(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 PaymentIntentCreateParams.PaymentMethodData.PayByBank build() { + return new PaymentIntentCreateParams.PaymentMethodData.PayByBank(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 PaymentIntentCreateParams.PaymentMethodData.PayByBank#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 PaymentIntentCreateParams.PaymentMethodData.PayByBank#extraParams} for + * the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + } + @Getter public static class Payco { /** @@ -11417,6 +11495,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("p24") P24("p24"), + @SerializedName("pay_by_bank") + PAY_BY_BANK("pay_by_bank"), + @SerializedName("payco") PAYCO("payco"), @@ -11726,6 +11807,13 @@ public static class PaymentMethodOptions { @SerializedName("p24") Object p24; + /** + * If this is a {@code pay_by_bank} PaymentMethod, this sub-hash contains details about the + * PayByBank payment method options. + */ + @SerializedName("pay_by_bank") + Object payByBank; + /** * If this is a {@code payco} PaymentMethod, this sub-hash contains details about the PAYCO * payment method options. @@ -11888,6 +11976,7 @@ private PaymentMethodOptions( Object naverPay, Object oxxo, Object p24, + Object payByBank, Object payco, Object paynow, Object paypal, @@ -11941,6 +12030,7 @@ private PaymentMethodOptions( this.naverPay = naverPay; this.oxxo = oxxo; this.p24 = p24; + this.payByBank = payByBank; this.payco = payco; this.paynow = paynow; this.paypal = paypal; @@ -12036,6 +12126,8 @@ public static class Builder { private Object p24; + private Object payByBank; + private Object payco; private Object paynow; @@ -12110,6 +12202,7 @@ public PaymentIntentCreateParams.PaymentMethodOptions build() { this.naverPay, this.oxxo, this.p24, + this.payByBank, this.payco, this.paynow, this.paypal, @@ -12775,6 +12868,25 @@ public Builder setP24(EmptyParam p24) { return this; } + /** + * If this is a {@code pay_by_bank} PaymentMethod, this sub-hash contains details about the + * PayByBank payment method options. + */ + public Builder setPayByBank( + PaymentIntentCreateParams.PaymentMethodOptions.PayByBank payByBank) { + this.payByBank = payByBank; + return this; + } + + /** + * If this is a {@code pay_by_bank} PaymentMethod, this sub-hash contains details about the + * PayByBank payment method options. + */ + public Builder setPayByBank(EmptyParam payByBank) { + this.payByBank = payByBank; + return this; + } + /** * If this is a {@code payco} PaymentMethod, this sub-hash contains details about the PAYCO * payment method options. @@ -21788,6 +21900,63 @@ public enum SetupFutureUsage implements ApiRequestParams.EnumParam { } } + @Getter + public static class PayByBank { + /** + * 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 PayByBank(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 PaymentIntentCreateParams.PaymentMethodOptions.PayByBank build() { + return new PaymentIntentCreateParams.PaymentMethodOptions.PayByBank(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 PaymentIntentCreateParams.PaymentMethodOptions.PayByBank#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 PaymentIntentCreateParams.PaymentMethodOptions.PayByBank#extraParams} for + * the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + } + @Getter public static class Payco { /** diff --git a/src/main/java/com/stripe/param/PaymentIntentUpdateParams.java b/src/main/java/com/stripe/param/PaymentIntentUpdateParams.java index 5e6a947c891..f1b24566627 100644 --- a/src/main/java/com/stripe/param/PaymentIntentUpdateParams.java +++ b/src/main/java/com/stripe/param/PaymentIntentUpdateParams.java @@ -6120,6 +6120,13 @@ public static class PaymentMethodData { @SerializedName("p24") P24 p24; + /** + * If this is a {@code pay_by_bank} PaymentMethod, this hash contains details about the + * PayByBank payment method. + */ + @SerializedName("pay_by_bank") + PayByBank payByBank; + /** * If this is a {@code payco} PaymentMethod, this hash contains details about the PAYCO payment * method. @@ -6297,6 +6304,7 @@ private PaymentMethodData( NaverPay naverPay, Oxxo oxxo, P24 p24, + PayByBank payByBank, Payco payco, Paynow paynow, Paypal paypal, @@ -6353,6 +6361,7 @@ private PaymentMethodData( this.naverPay = naverPay; this.oxxo = oxxo; this.p24 = p24; + this.payByBank = payByBank; this.payco = payco; this.paynow = paynow; this.paypal = paypal; @@ -6452,6 +6461,8 @@ public static class Builder { private P24 p24; + private PayByBank payByBank; + private Payco payco; private Paynow paynow; @@ -6531,6 +6542,7 @@ public PaymentIntentUpdateParams.PaymentMethodData build() { this.naverPay, this.oxxo, this.p24, + this.payByBank, this.payco, this.paynow, this.paypal, @@ -6923,6 +6935,15 @@ public Builder setP24(PaymentIntentUpdateParams.PaymentMethodData.P24 p24) { return this; } + /** + * If this is a {@code pay_by_bank} PaymentMethod, this hash contains details about the + * PayByBank payment method. + */ + public Builder setPayByBank(PaymentIntentUpdateParams.PaymentMethodData.PayByBank payByBank) { + this.payByBank = payByBank; + return this; + } + /** * If this is a {@code payco} PaymentMethod, this hash contains details about the PAYCO * payment method. @@ -10025,6 +10046,63 @@ public enum Bank implements ApiRequestParams.EnumParam { } } + @Getter + public static class PayByBank { + /** + * 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 PayByBank(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 PaymentIntentUpdateParams.PaymentMethodData.PayByBank build() { + return new PaymentIntentUpdateParams.PaymentMethodData.PayByBank(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 PaymentIntentUpdateParams.PaymentMethodData.PayByBank#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 PaymentIntentUpdateParams.PaymentMethodData.PayByBank#extraParams} for + * the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + } + @Getter public static class Payco { /** @@ -11619,6 +11697,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("p24") P24("p24"), + @SerializedName("pay_by_bank") + PAY_BY_BANK("pay_by_bank"), + @SerializedName("payco") PAYCO("payco"), @@ -11928,6 +12009,13 @@ public static class PaymentMethodOptions { @SerializedName("p24") Object p24; + /** + * If this is a {@code pay_by_bank} PaymentMethod, this sub-hash contains details about the + * PayByBank payment method options. + */ + @SerializedName("pay_by_bank") + Object payByBank; + /** * If this is a {@code payco} PaymentMethod, this sub-hash contains details about the PAYCO * payment method options. @@ -12090,6 +12178,7 @@ private PaymentMethodOptions( Object naverPay, Object oxxo, Object p24, + Object payByBank, Object payco, Object paynow, Object paypal, @@ -12143,6 +12232,7 @@ private PaymentMethodOptions( this.naverPay = naverPay; this.oxxo = oxxo; this.p24 = p24; + this.payByBank = payByBank; this.payco = payco; this.paynow = paynow; this.paypal = paypal; @@ -12238,6 +12328,8 @@ public static class Builder { private Object p24; + private Object payByBank; + private Object payco; private Object paynow; @@ -12312,6 +12404,7 @@ public PaymentIntentUpdateParams.PaymentMethodOptions build() { this.naverPay, this.oxxo, this.p24, + this.payByBank, this.payco, this.paynow, this.paypal, @@ -12977,6 +13070,25 @@ public Builder setP24(EmptyParam p24) { return this; } + /** + * If this is a {@code pay_by_bank} PaymentMethod, this sub-hash contains details about the + * PayByBank payment method options. + */ + public Builder setPayByBank( + PaymentIntentUpdateParams.PaymentMethodOptions.PayByBank payByBank) { + this.payByBank = payByBank; + return this; + } + + /** + * If this is a {@code pay_by_bank} PaymentMethod, this sub-hash contains details about the + * PayByBank payment method options. + */ + public Builder setPayByBank(EmptyParam payByBank) { + this.payByBank = payByBank; + return this; + } + /** * If this is a {@code payco} PaymentMethod, this sub-hash contains details about the PAYCO * payment method options. @@ -22152,6 +22264,63 @@ public enum SetupFutureUsage implements ApiRequestParams.EnumParam { } } + @Getter + public static class PayByBank { + /** + * 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 PayByBank(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 PaymentIntentUpdateParams.PaymentMethodOptions.PayByBank build() { + return new PaymentIntentUpdateParams.PaymentMethodOptions.PayByBank(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 PaymentIntentUpdateParams.PaymentMethodOptions.PayByBank#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 PaymentIntentUpdateParams.PaymentMethodOptions.PayByBank#extraParams} for + * the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + } + @Getter public static class Payco { /** diff --git a/src/main/java/com/stripe/param/PaymentLinkCreateParams.java b/src/main/java/com/stripe/param/PaymentLinkCreateParams.java index 18d2e17c570..a338a0d5edf 100644 --- a/src/main/java/com/stripe/param/PaymentLinkCreateParams.java +++ b/src/main/java/com/stripe/param/PaymentLinkCreateParams.java @@ -4671,6 +4671,9 @@ public enum AllowedCountry implements ApiRequestParams.EnumParam { @SerializedName("SC") SC("SC"), + @SerializedName("SD") + SD("SD"), + @SerializedName("SE") SE("SE"), @@ -5760,6 +5763,9 @@ public enum PaymentMethodType implements ApiRequestParams.EnumParam { @SerializedName("p24") P24("p24"), + @SerializedName("pay_by_bank") + PAY_BY_BANK("pay_by_bank"), + @SerializedName("paynow") PAYNOW("paynow"), diff --git a/src/main/java/com/stripe/param/PaymentLinkUpdateParams.java b/src/main/java/com/stripe/param/PaymentLinkUpdateParams.java index 638ae738845..05d5588accc 100644 --- a/src/main/java/com/stripe/param/PaymentLinkUpdateParams.java +++ b/src/main/java/com/stripe/param/PaymentLinkUpdateParams.java @@ -4407,6 +4407,9 @@ public enum AllowedCountry implements ApiRequestParams.EnumParam { @SerializedName("SC") SC("SC"), + @SerializedName("SD") + SD("SD"), + @SerializedName("SE") SE("SE"), @@ -5360,6 +5363,9 @@ public enum PaymentMethodType implements ApiRequestParams.EnumParam { @SerializedName("p24") P24("p24"), + @SerializedName("pay_by_bank") + PAY_BY_BANK("pay_by_bank"), + @SerializedName("paynow") PAYNOW("paynow"), diff --git a/src/main/java/com/stripe/param/PaymentMethodConfigurationCreateParams.java b/src/main/java/com/stripe/param/PaymentMethodConfigurationCreateParams.java index 2949f95db6a..e550ab40e27 100644 --- a/src/main/java/com/stripe/param/PaymentMethodConfigurationCreateParams.java +++ b/src/main/java/com/stripe/param/PaymentMethodConfigurationCreateParams.java @@ -326,6 +326,15 @@ public class PaymentMethodConfigurationCreateParams extends ApiRequestParams { @SerializedName("parent") String parent; + /** + * Pay by bank is a redirect payment method backed by bank transfers. A customer is redirected to + * their bank to authorize a bank transfer for a given amount. This removes a lot of the error + * risks inherent in waiting for the customer to initiate a transfer themselves, and is less + * expensive than card payments. + */ + @SerializedName("pay_by_bank") + PayByBank payByBank; + /** * PayNow is a Singapore-based payment method that allows customers to make a payment using their * preferred app from participating banks and participating non-bank financial institutions. Check @@ -486,6 +495,7 @@ private PaymentMethodConfigurationCreateParams( Oxxo oxxo, P24 p24, String parent, + PayByBank payByBank, Paynow paynow, Paypal paypal, Payto payto, @@ -537,6 +547,7 @@ private PaymentMethodConfigurationCreateParams( this.oxxo = oxxo; this.p24 = p24; this.parent = parent; + this.payByBank = payByBank; this.paynow = paynow; this.paypal = paypal; this.payto = payto; @@ -632,6 +643,8 @@ public static class Builder { private String parent; + private PayByBank payByBank; + private Paynow paynow; private Paypal paypal; @@ -700,6 +713,7 @@ public PaymentMethodConfigurationCreateParams build() { this.oxxo, this.p24, this.parent, + this.payByBank, this.paynow, this.paypal, this.payto, @@ -1146,6 +1160,17 @@ public Builder setParent(String parent) { return this; } + /** + * Pay by bank is a redirect payment method backed by bank transfers. A customer is redirected + * to their bank to authorize a bank transfer for a given amount. This removes a lot of the + * error risks inherent in waiting for the customer to initiate a transfer themselves, and is + * less expensive than card payments. + */ + public Builder setPayByBank(PaymentMethodConfigurationCreateParams.PayByBank payByBank) { + this.payByBank = payByBank; + return this; + } + /** * PayNow is a Singapore-based payment method that allows customers to make a payment using * their preferred app from participating banks and participating non-bank financial @@ -6701,6 +6726,170 @@ public enum Preference implements ApiRequestParams.EnumParam { } } + @Getter + public static class PayByBank { + /** Whether or not the payment method should be displayed. */ + @SerializedName("display_preference") + DisplayPreference displayPreference; + + /** + * 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 PayByBank(DisplayPreference displayPreference, Map extraParams) { + this.displayPreference = displayPreference; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private DisplayPreference displayPreference; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentMethodConfigurationCreateParams.PayByBank build() { + return new PaymentMethodConfigurationCreateParams.PayByBank( + this.displayPreference, this.extraParams); + } + + /** Whether or not the payment method should be displayed. */ + public Builder setDisplayPreference( + PaymentMethodConfigurationCreateParams.PayByBank.DisplayPreference displayPreference) { + this.displayPreference = displayPreference; + 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 + * PaymentMethodConfigurationCreateParams.PayByBank#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 PaymentMethodConfigurationCreateParams.PayByBank#extraParams} for the field + * documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + + @Getter + public static class DisplayPreference { + /** + * 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; + + /** The account's preference for whether or not to display this payment method. */ + @SerializedName("preference") + Preference preference; + + private DisplayPreference(Map extraParams, Preference preference) { + this.extraParams = extraParams; + this.preference = preference; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Preference preference; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentMethodConfigurationCreateParams.PayByBank.DisplayPreference build() { + return new PaymentMethodConfigurationCreateParams.PayByBank.DisplayPreference( + this.extraParams, this.preference); + } + + /** + * 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 + * PaymentMethodConfigurationCreateParams.PayByBank.DisplayPreference#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 + * PaymentMethodConfigurationCreateParams.PayByBank.DisplayPreference#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** The account's preference for whether or not to display this payment method. */ + public Builder setPreference( + PaymentMethodConfigurationCreateParams.PayByBank.DisplayPreference.Preference + preference) { + this.preference = preference; + return this; + } + } + + public enum Preference implements ApiRequestParams.EnumParam { + @SerializedName("none") + NONE("none"), + + @SerializedName("off") + OFF("off"), + + @SerializedName("on") + ON("on"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Preference(String value) { + this.value = value; + } + } + } + } + @Getter public static class Paynow { /** Whether or not the payment method should be displayed. */ diff --git a/src/main/java/com/stripe/param/PaymentMethodConfigurationUpdateParams.java b/src/main/java/com/stripe/param/PaymentMethodConfigurationUpdateParams.java index 5185222ed33..e9631e1185f 100644 --- a/src/main/java/com/stripe/param/PaymentMethodConfigurationUpdateParams.java +++ b/src/main/java/com/stripe/param/PaymentMethodConfigurationUpdateParams.java @@ -327,6 +327,15 @@ public class PaymentMethodConfigurationUpdateParams extends ApiRequestParams { @SerializedName("p24") P24 p24; + /** + * Pay by bank is a redirect payment method backed by bank transfers. A customer is redirected to + * their bank to authorize a bank transfer for a given amount. This removes a lot of the error + * risks inherent in waiting for the customer to initiate a transfer themselves, and is less + * expensive than card payments. + */ + @SerializedName("pay_by_bank") + PayByBank payByBank; + /** * PayNow is a Singapore-based payment method that allows customers to make a payment using their * preferred app from participating banks and participating non-bank financial institutions. Check @@ -487,6 +496,7 @@ private PaymentMethodConfigurationUpdateParams( Object name, Oxxo oxxo, P24 p24, + PayByBank payByBank, Paynow paynow, Paypal paypal, Payto payto, @@ -538,6 +548,7 @@ private PaymentMethodConfigurationUpdateParams( this.name = name; this.oxxo = oxxo; this.p24 = p24; + this.payByBank = payByBank; this.paynow = paynow; this.paypal = paypal; this.payto = payto; @@ -633,6 +644,8 @@ public static class Builder { private P24 p24; + private PayByBank payByBank; + private Paynow paynow; private Paypal paypal; @@ -701,6 +714,7 @@ public PaymentMethodConfigurationUpdateParams build() { this.name, this.oxxo, this.p24, + this.payByBank, this.paynow, this.paypal, this.payto, @@ -1153,6 +1167,17 @@ public Builder setP24(PaymentMethodConfigurationUpdateParams.P24 p24) { return this; } + /** + * Pay by bank is a redirect payment method backed by bank transfers. A customer is redirected + * to their bank to authorize a bank transfer for a given amount. This removes a lot of the + * error risks inherent in waiting for the customer to initiate a transfer themselves, and is + * less expensive than card payments. + */ + public Builder setPayByBank(PaymentMethodConfigurationUpdateParams.PayByBank payByBank) { + this.payByBank = payByBank; + return this; + } + /** * PayNow is a Singapore-based payment method that allows customers to make a payment using * their preferred app from participating banks and participating non-bank financial @@ -6708,6 +6733,170 @@ public enum Preference implements ApiRequestParams.EnumParam { } } + @Getter + public static class PayByBank { + /** Whether or not the payment method should be displayed. */ + @SerializedName("display_preference") + DisplayPreference displayPreference; + + /** + * 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 PayByBank(DisplayPreference displayPreference, Map extraParams) { + this.displayPreference = displayPreference; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private DisplayPreference displayPreference; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentMethodConfigurationUpdateParams.PayByBank build() { + return new PaymentMethodConfigurationUpdateParams.PayByBank( + this.displayPreference, this.extraParams); + } + + /** Whether or not the payment method should be displayed. */ + public Builder setDisplayPreference( + PaymentMethodConfigurationUpdateParams.PayByBank.DisplayPreference displayPreference) { + this.displayPreference = displayPreference; + 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 + * PaymentMethodConfigurationUpdateParams.PayByBank#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 PaymentMethodConfigurationUpdateParams.PayByBank#extraParams} for the field + * documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + + @Getter + public static class DisplayPreference { + /** + * 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; + + /** The account's preference for whether or not to display this payment method. */ + @SerializedName("preference") + Preference preference; + + private DisplayPreference(Map extraParams, Preference preference) { + this.extraParams = extraParams; + this.preference = preference; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Preference preference; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentMethodConfigurationUpdateParams.PayByBank.DisplayPreference build() { + return new PaymentMethodConfigurationUpdateParams.PayByBank.DisplayPreference( + this.extraParams, this.preference); + } + + /** + * 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 + * PaymentMethodConfigurationUpdateParams.PayByBank.DisplayPreference#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 + * PaymentMethodConfigurationUpdateParams.PayByBank.DisplayPreference#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** The account's preference for whether or not to display this payment method. */ + public Builder setPreference( + PaymentMethodConfigurationUpdateParams.PayByBank.DisplayPreference.Preference + preference) { + this.preference = preference; + return this; + } + } + + public enum Preference implements ApiRequestParams.EnumParam { + @SerializedName("none") + NONE("none"), + + @SerializedName("off") + OFF("off"), + + @SerializedName("on") + ON("on"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Preference(String value) { + this.value = value; + } + } + } + } + @Getter public static class Paynow { /** Whether or not the payment method should be displayed. */ diff --git a/src/main/java/com/stripe/param/PaymentMethodCreateParams.java b/src/main/java/com/stripe/param/PaymentMethodCreateParams.java index e02979eebec..a482cd8c1a3 100644 --- a/src/main/java/com/stripe/param/PaymentMethodCreateParams.java +++ b/src/main/java/com/stripe/param/PaymentMethodCreateParams.java @@ -284,6 +284,13 @@ public class PaymentMethodCreateParams extends ApiRequestParams { @SerializedName("p24") P24 p24; + /** + * If this is a {@code pay_by_bank} PaymentMethod, this hash contains details about the PayByBank + * payment method. + */ + @SerializedName("pay_by_bank") + PayByBank payByBank; + /** * If this is a {@code payco} PaymentMethod, this hash contains details about the PAYCO payment * method. @@ -467,6 +474,7 @@ private PaymentMethodCreateParams( NaverPay naverPay, Oxxo oxxo, P24 p24, + PayByBank payByBank, Payco payco, String paymentMethod, Paynow paynow, @@ -527,6 +535,7 @@ private PaymentMethodCreateParams( this.naverPay = naverPay; this.oxxo = oxxo; this.p24 = p24; + this.payByBank = payByBank; this.payco = payco; this.paymentMethod = paymentMethod; this.paynow = paynow; @@ -633,6 +642,8 @@ public static class Builder { private P24 p24; + private PayByBank payByBank; + private Payco payco; private String paymentMethod; @@ -717,6 +728,7 @@ public PaymentMethodCreateParams build() { this.naverPay, this.oxxo, this.p24, + this.payByBank, this.payco, this.paymentMethod, this.paynow, @@ -1157,6 +1169,15 @@ public Builder setP24(PaymentMethodCreateParams.P24 p24) { return this; } + /** + * If this is a {@code pay_by_bank} PaymentMethod, this hash contains details about the + * PayByBank payment method. + */ + public Builder setPayByBank(PaymentMethodCreateParams.PayByBank payByBank) { + this.payByBank = payByBank; + return this; + } + /** * If this is a {@code payco} PaymentMethod, this hash contains details about the PAYCO payment * method. @@ -4320,6 +4341,61 @@ public enum Bank implements ApiRequestParams.EnumParam { } } + @Getter + public static class PayByBank { + /** + * 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 PayByBank(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 PaymentMethodCreateParams.PayByBank build() { + return new PaymentMethodCreateParams.PayByBank(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 + * PaymentMethodCreateParams.PayByBank#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 PaymentMethodCreateParams.PayByBank#extraParams} for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + } + @Getter public static class Payco { /** @@ -5897,6 +5973,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("p24") P24("p24"), + @SerializedName("pay_by_bank") + PAY_BY_BANK("pay_by_bank"), + @SerializedName("payco") PAYCO("payco"), diff --git a/src/main/java/com/stripe/param/PaymentMethodListParams.java b/src/main/java/com/stripe/param/PaymentMethodListParams.java index e939f1c03a1..d53037523fb 100644 --- a/src/main/java/com/stripe/param/PaymentMethodListParams.java +++ b/src/main/java/com/stripe/param/PaymentMethodListParams.java @@ -307,6 +307,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("p24") P24("p24"), + @SerializedName("pay_by_bank") + PAY_BY_BANK("pay_by_bank"), + @SerializedName("payco") PAYCO("payco"), diff --git a/src/main/java/com/stripe/param/PaymentMethodUpdateParams.java b/src/main/java/com/stripe/param/PaymentMethodUpdateParams.java index c6f5bbde077..0a26c07e6fd 100644 --- a/src/main/java/com/stripe/param/PaymentMethodUpdateParams.java +++ b/src/main/java/com/stripe/param/PaymentMethodUpdateParams.java @@ -68,6 +68,13 @@ public class PaymentMethodUpdateParams extends ApiRequestParams { @SerializedName("naver_pay") NaverPay naverPay; + /** + * If this is a {@code pay_by_bank} PaymentMethod, this hash contains details about the PayByBank + * payment method. + */ + @SerializedName("pay_by_bank") + PayByBank payByBank; + /** * If this is a {@code payto} PaymentMethod, this hash contains details about the PayTo payment * method. @@ -91,6 +98,7 @@ private PaymentMethodUpdateParams( Link link, Object metadata, NaverPay naverPay, + PayByBank payByBank, Payto payto, UsBankAccount usBankAccount) { this.allowRedisplay = allowRedisplay; @@ -101,6 +109,7 @@ private PaymentMethodUpdateParams( this.link = link; this.metadata = metadata; this.naverPay = naverPay; + this.payByBank = payByBank; this.payto = payto; this.usBankAccount = usBankAccount; } @@ -126,6 +135,8 @@ public static class Builder { private NaverPay naverPay; + private PayByBank payByBank; + private Payto payto; private UsBankAccount usBankAccount; @@ -141,6 +152,7 @@ public PaymentMethodUpdateParams build() { this.link, this.metadata, this.naverPay, + this.payByBank, this.payto, this.usBankAccount); } @@ -291,6 +303,15 @@ public Builder setNaverPay(PaymentMethodUpdateParams.NaverPay naverPay) { return this; } + /** + * If this is a {@code pay_by_bank} PaymentMethod, this hash contains details about the + * PayByBank payment method. + */ + public Builder setPayByBank(PaymentMethodUpdateParams.PayByBank payByBank) { + this.payByBank = payByBank; + return this; + } + /** * If this is a {@code payto} PaymentMethod, this hash contains details about the PayTo payment * method. @@ -983,6 +1004,61 @@ public enum Funding implements ApiRequestParams.EnumParam { } } + @Getter + public static class PayByBank { + /** + * 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 PayByBank(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 PaymentMethodUpdateParams.PayByBank build() { + return new PaymentMethodUpdateParams.PayByBank(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 + * PaymentMethodUpdateParams.PayByBank#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 PaymentMethodUpdateParams.PayByBank#extraParams} for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + } + @Getter public static class Payto { /** The account number for the bank account. */ diff --git a/src/main/java/com/stripe/param/SetupIntentConfirmParams.java b/src/main/java/com/stripe/param/SetupIntentConfirmParams.java index a65c13c57db..9281e9ddd01 100644 --- a/src/main/java/com/stripe/param/SetupIntentConfirmParams.java +++ b/src/main/java/com/stripe/param/SetupIntentConfirmParams.java @@ -877,6 +877,13 @@ public static class PaymentMethodData { @SerializedName("p24") P24 p24; + /** + * If this is a {@code pay_by_bank} PaymentMethod, this hash contains details about the + * PayByBank payment method. + */ + @SerializedName("pay_by_bank") + PayByBank payByBank; + /** * If this is a {@code payco} PaymentMethod, this hash contains details about the PAYCO payment * method. @@ -1054,6 +1061,7 @@ private PaymentMethodData( NaverPay naverPay, Oxxo oxxo, P24 p24, + PayByBank payByBank, Payco payco, Paynow paynow, Paypal paypal, @@ -1110,6 +1118,7 @@ private PaymentMethodData( this.naverPay = naverPay; this.oxxo = oxxo; this.p24 = p24; + this.payByBank = payByBank; this.payco = payco; this.paynow = paynow; this.paypal = paypal; @@ -1209,6 +1218,8 @@ public static class Builder { private P24 p24; + private PayByBank payByBank; + private Payco payco; private Paynow paynow; @@ -1288,6 +1299,7 @@ public SetupIntentConfirmParams.PaymentMethodData build() { this.naverPay, this.oxxo, this.p24, + this.payByBank, this.payco, this.paynow, this.paypal, @@ -1680,6 +1692,15 @@ public Builder setP24(SetupIntentConfirmParams.PaymentMethodData.P24 p24) { return this; } + /** + * If this is a {@code pay_by_bank} PaymentMethod, this hash contains details about the + * PayByBank payment method. + */ + public Builder setPayByBank(SetupIntentConfirmParams.PaymentMethodData.PayByBank payByBank) { + this.payByBank = payByBank; + return this; + } + /** * If this is a {@code payco} PaymentMethod, this hash contains details about the PAYCO * payment method. @@ -4692,6 +4713,63 @@ public enum Bank implements ApiRequestParams.EnumParam { } } + @Getter + public static class PayByBank { + /** + * 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 PayByBank(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 SetupIntentConfirmParams.PaymentMethodData.PayByBank build() { + return new SetupIntentConfirmParams.PaymentMethodData.PayByBank(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 SetupIntentConfirmParams.PaymentMethodData.PayByBank#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 SetupIntentConfirmParams.PaymentMethodData.PayByBank#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + } + @Getter public static class Payco { /** @@ -6234,6 +6312,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("p24") P24("p24"), + @SerializedName("pay_by_bank") + PAY_BY_BANK("pay_by_bank"), + @SerializedName("payco") PAYCO("payco"), diff --git a/src/main/java/com/stripe/param/SetupIntentCreateParams.java b/src/main/java/com/stripe/param/SetupIntentCreateParams.java index 5b703c57c21..ebc4b31c1c1 100644 --- a/src/main/java/com/stripe/param/SetupIntentCreateParams.java +++ b/src/main/java/com/stripe/param/SetupIntentCreateParams.java @@ -1342,6 +1342,13 @@ public static class PaymentMethodData { @SerializedName("p24") P24 p24; + /** + * If this is a {@code pay_by_bank} PaymentMethod, this hash contains details about the + * PayByBank payment method. + */ + @SerializedName("pay_by_bank") + PayByBank payByBank; + /** * If this is a {@code payco} PaymentMethod, this hash contains details about the PAYCO payment * method. @@ -1519,6 +1526,7 @@ private PaymentMethodData( NaverPay naverPay, Oxxo oxxo, P24 p24, + PayByBank payByBank, Payco payco, Paynow paynow, Paypal paypal, @@ -1575,6 +1583,7 @@ private PaymentMethodData( this.naverPay = naverPay; this.oxxo = oxxo; this.p24 = p24; + this.payByBank = payByBank; this.payco = payco; this.paynow = paynow; this.paypal = paypal; @@ -1674,6 +1683,8 @@ public static class Builder { private P24 p24; + private PayByBank payByBank; + private Payco payco; private Paynow paynow; @@ -1753,6 +1764,7 @@ public SetupIntentCreateParams.PaymentMethodData build() { this.naverPay, this.oxxo, this.p24, + this.payByBank, this.payco, this.paynow, this.paypal, @@ -2144,6 +2156,15 @@ public Builder setP24(SetupIntentCreateParams.PaymentMethodData.P24 p24) { return this; } + /** + * If this is a {@code pay_by_bank} PaymentMethod, this hash contains details about the + * PayByBank payment method. + */ + public Builder setPayByBank(SetupIntentCreateParams.PaymentMethodData.PayByBank payByBank) { + this.payByBank = payByBank; + return this; + } + /** * If this is a {@code payco} PaymentMethod, this hash contains details about the PAYCO * payment method. @@ -5154,6 +5175,63 @@ public enum Bank implements ApiRequestParams.EnumParam { } } + @Getter + public static class PayByBank { + /** + * 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 PayByBank(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 SetupIntentCreateParams.PaymentMethodData.PayByBank build() { + return new SetupIntentCreateParams.PaymentMethodData.PayByBank(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 SetupIntentCreateParams.PaymentMethodData.PayByBank#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 SetupIntentCreateParams.PaymentMethodData.PayByBank#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + } + @Getter public static class Payco { /** @@ -6695,6 +6773,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("p24") P24("p24"), + @SerializedName("pay_by_bank") + PAY_BY_BANK("pay_by_bank"), + @SerializedName("payco") PAYCO("payco"), diff --git a/src/main/java/com/stripe/param/SetupIntentUpdateParams.java b/src/main/java/com/stripe/param/SetupIntentUpdateParams.java index baf20bf2f8d..561d6392100 100644 --- a/src/main/java/com/stripe/param/SetupIntentUpdateParams.java +++ b/src/main/java/com/stripe/param/SetupIntentUpdateParams.java @@ -692,6 +692,13 @@ public static class PaymentMethodData { @SerializedName("p24") P24 p24; + /** + * If this is a {@code pay_by_bank} PaymentMethod, this hash contains details about the + * PayByBank payment method. + */ + @SerializedName("pay_by_bank") + PayByBank payByBank; + /** * If this is a {@code payco} PaymentMethod, this hash contains details about the PAYCO payment * method. @@ -869,6 +876,7 @@ private PaymentMethodData( NaverPay naverPay, Oxxo oxxo, P24 p24, + PayByBank payByBank, Payco payco, Paynow paynow, Paypal paypal, @@ -925,6 +933,7 @@ private PaymentMethodData( this.naverPay = naverPay; this.oxxo = oxxo; this.p24 = p24; + this.payByBank = payByBank; this.payco = payco; this.paynow = paynow; this.paypal = paypal; @@ -1024,6 +1033,8 @@ public static class Builder { private P24 p24; + private PayByBank payByBank; + private Payco payco; private Paynow paynow; @@ -1103,6 +1114,7 @@ public SetupIntentUpdateParams.PaymentMethodData build() { this.naverPay, this.oxxo, this.p24, + this.payByBank, this.payco, this.paynow, this.paypal, @@ -1494,6 +1506,15 @@ public Builder setP24(SetupIntentUpdateParams.PaymentMethodData.P24 p24) { return this; } + /** + * If this is a {@code pay_by_bank} PaymentMethod, this hash contains details about the + * PayByBank payment method. + */ + public Builder setPayByBank(SetupIntentUpdateParams.PaymentMethodData.PayByBank payByBank) { + this.payByBank = payByBank; + return this; + } + /** * If this is a {@code payco} PaymentMethod, this hash contains details about the PAYCO * payment method. @@ -4594,6 +4615,63 @@ public enum Bank implements ApiRequestParams.EnumParam { } } + @Getter + public static class PayByBank { + /** + * 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 PayByBank(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 SetupIntentUpdateParams.PaymentMethodData.PayByBank build() { + return new SetupIntentUpdateParams.PaymentMethodData.PayByBank(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 SetupIntentUpdateParams.PaymentMethodData.PayByBank#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 SetupIntentUpdateParams.PaymentMethodData.PayByBank#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + } + @Getter public static class Payco { /** @@ -6187,6 +6265,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("p24") P24("p24"), + @SerializedName("pay_by_bank") + PAY_BY_BANK("pay_by_bank"), + @SerializedName("payco") PAYCO("payco"), diff --git a/src/main/java/com/stripe/param/TokenCreateParams.java b/src/main/java/com/stripe/param/TokenCreateParams.java index 2a3ce2b109f..b87796f5750 100644 --- a/src/main/java/com/stripe/param/TokenCreateParams.java +++ b/src/main/java/com/stripe/param/TokenCreateParams.java @@ -388,6 +388,13 @@ public static class Company { @SerializedName("directors_provided") Boolean directorsProvided; + /** + * This hash is used to attest that the directors information provided to Stripe is both + * current and correct. + */ + @SerializedName("directorship_declaration") + DirectorshipDeclaration directorshipDeclaration; + /** * Whether the company's executives have been provided. Set this Boolean to {@code true} after * creating all the company's executives with the @@ -501,6 +508,7 @@ private Company( AddressKana addressKana, AddressKanji addressKanji, Boolean directorsProvided, + DirectorshipDeclaration directorshipDeclaration, Boolean executivesProvided, String exportLicenseId, String exportPurposeCode, @@ -523,6 +531,7 @@ private Company( this.addressKana = addressKana; this.addressKanji = addressKanji; this.directorsProvided = directorsProvided; + this.directorshipDeclaration = directorshipDeclaration; this.executivesProvided = executivesProvided; this.exportLicenseId = exportLicenseId; this.exportPurposeCode = exportPurposeCode; @@ -556,6 +565,8 @@ public static class Builder { private Boolean directorsProvided; + private DirectorshipDeclaration directorshipDeclaration; + private Boolean executivesProvided; private String exportLicenseId; @@ -599,6 +610,7 @@ public TokenCreateParams.Account.Company build() { this.addressKana, this.addressKanji, this.directorsProvided, + this.directorshipDeclaration, this.executivesProvided, this.exportLicenseId, this.exportPurposeCode, @@ -651,6 +663,16 @@ public Builder setDirectorsProvided(Boolean directorsProvided) { return this; } + /** + * This hash is used to attest that the directors information provided to Stripe is both + * current and correct. + */ + public Builder setDirectorshipDeclaration( + TokenCreateParams.Account.Company.DirectorshipDeclaration directorshipDeclaration) { + this.directorshipDeclaration = directorshipDeclaration; + return this; + } + /** * Whether the company's executives have been provided. Set this Boolean to {@code true} * after creating all the company's executives with extraParams; + + /** The IP address from which the directorship declaration attestation was made. */ + @SerializedName("ip") + String ip; + + /** + * The user agent of the browser from which the directorship declaration attestation was + * made. + */ + @SerializedName("user_agent") + String userAgent; + + private DirectorshipDeclaration( + Long date, Map extraParams, String ip, String userAgent) { + this.date = date; + this.extraParams = extraParams; + this.ip = ip; + this.userAgent = userAgent; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Long date; + + private Map extraParams; + + private String ip; + + private String userAgent; + + /** Finalize and obtain parameter instance from this builder. */ + public TokenCreateParams.Account.Company.DirectorshipDeclaration build() { + return new TokenCreateParams.Account.Company.DirectorshipDeclaration( + this.date, this.extraParams, this.ip, this.userAgent); + } + + /** The Unix timestamp marking when the directorship declaration attestation was made. */ + public Builder setDate(Long date) { + this.date = date; + 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 TokenCreateParams.Account.Company.DirectorshipDeclaration#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 TokenCreateParams.Account.Company.DirectorshipDeclaration#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** The IP address from which the directorship declaration attestation was made. */ + public Builder setIp(String ip) { + this.ip = ip; + return this; + } + + /** + * The user agent of the browser from which the directorship declaration attestation was + * made. + */ + public Builder setUserAgent(String userAgent) { + this.userAgent = userAgent; + return this; + } + } + } + @Getter public static class OwnershipDeclaration { /** The Unix timestamp marking when the beneficial owner attestation was made. */ diff --git a/src/main/java/com/stripe/param/WebhookEndpointCreateParams.java b/src/main/java/com/stripe/param/WebhookEndpointCreateParams.java index ab927be2404..2b49e140824 100644 --- a/src/main/java/com/stripe/param/WebhookEndpointCreateParams.java +++ b/src/main/java/com/stripe/param/WebhookEndpointCreateParams.java @@ -598,7 +598,10 @@ public enum ApiVersion implements ApiRequestParams.EnumParam { VERSION_2024_11_20_ACACIA("2024-11-20.acacia"), @SerializedName("2024-12-18.acacia") - VERSION_2024_12_18_ACACIA("2024-12-18.acacia"); + VERSION_2024_12_18_ACACIA("2024-12-18.acacia"), + + @SerializedName("2025-01-27.acacia") + VERSION_2025_01_27_ACACIA("2025-01-27.acacia"); @Getter(onMethod_ = {@Override}) private final String value; diff --git a/src/main/java/com/stripe/param/billingportal/ConfigurationCreateParams.java b/src/main/java/com/stripe/param/billingportal/ConfigurationCreateParams.java index 9feb1aed16d..64ec379f301 100644 --- a/src/main/java/com/stripe/param/billingportal/ConfigurationCreateParams.java +++ b/src/main/java/com/stripe/param/billingportal/ConfigurationCreateParams.java @@ -808,9 +808,9 @@ public static class SubscriptionCancel { /** * Whether to create prorations when canceling subscriptions. Possible values are {@code none} - * and {@code create_prorations}, which is only compatible with {@code mode=immediately}. No - * prorations are generated when canceling a subscription at the end of its natural billing - * period. + * and {@code create_prorations}, which is only compatible with {@code mode=immediately}. + * Passing {@code always_invoice} will result in an error. No prorations are generated when + * canceling a subscription at the end of its natural billing period. */ @SerializedName("proration_behavior") ProrationBehavior prorationBehavior; @@ -907,8 +907,8 @@ public Builder setMode(ConfigurationCreateParams.Features.SubscriptionCancel.Mod /** * Whether to create prorations when canceling subscriptions. Possible values are {@code * none} and {@code create_prorations}, which is only compatible with {@code - * mode=immediately}. No prorations are generated when canceling a subscription at the end - * of its natural billing period. + * mode=immediately}. Passing {@code always_invoice} will result in an error. No prorations + * are generated when canceling a subscription at the end of its natural billing period. */ public Builder setProrationBehavior( ConfigurationCreateParams.Features.SubscriptionCancel.ProrationBehavior @@ -1116,6 +1116,9 @@ public enum Mode implements ApiRequestParams.EnumParam { } public enum ProrationBehavior implements ApiRequestParams.EnumParam { + @SerializedName("always_invoice") + ALWAYS_INVOICE("always_invoice"), + @SerializedName("create_prorations") CREATE_PRORATIONS("create_prorations"), diff --git a/src/main/java/com/stripe/param/billingportal/ConfigurationUpdateParams.java b/src/main/java/com/stripe/param/billingportal/ConfigurationUpdateParams.java index e5c42027292..7988f616011 100644 --- a/src/main/java/com/stripe/param/billingportal/ConfigurationUpdateParams.java +++ b/src/main/java/com/stripe/param/billingportal/ConfigurationUpdateParams.java @@ -859,9 +859,9 @@ public static class SubscriptionCancel { /** * Whether to create prorations when canceling subscriptions. Possible values are {@code none} - * and {@code create_prorations}, which is only compatible with {@code mode=immediately}. No - * prorations are generated when canceling a subscription at the end of its natural billing - * period. + * and {@code create_prorations}, which is only compatible with {@code mode=immediately}. + * Passing {@code always_invoice} will result in an error. No prorations are generated when + * canceling a subscription at the end of its natural billing period. */ @SerializedName("proration_behavior") ProrationBehavior prorationBehavior; @@ -958,8 +958,8 @@ public Builder setMode(ConfigurationUpdateParams.Features.SubscriptionCancel.Mod /** * Whether to create prorations when canceling subscriptions. Possible values are {@code * none} and {@code create_prorations}, which is only compatible with {@code - * mode=immediately}. No prorations are generated when canceling a subscription at the end - * of its natural billing period. + * mode=immediately}. Passing {@code always_invoice} will result in an error. No prorations + * are generated when canceling a subscription at the end of its natural billing period. */ public Builder setProrationBehavior( ConfigurationUpdateParams.Features.SubscriptionCancel.ProrationBehavior @@ -1158,6 +1158,9 @@ public enum Mode implements ApiRequestParams.EnumParam { } public enum ProrationBehavior implements ApiRequestParams.EnumParam { + @SerializedName("always_invoice") + ALWAYS_INVOICE("always_invoice"), + @SerializedName("create_prorations") CREATE_PRORATIONS("create_prorations"), diff --git a/src/main/java/com/stripe/param/checkout/SessionCreateParams.java b/src/main/java/com/stripe/param/checkout/SessionCreateParams.java index af76428f742..a2ee1868a1c 100644 --- a/src/main/java/com/stripe/param/checkout/SessionCreateParams.java +++ b/src/main/java/com/stripe/param/checkout/SessionCreateParams.java @@ -5868,6 +5868,10 @@ public static class PaymentMethodOptions { @SerializedName("p24") P24 p24; + /** contains details about the Pay By Bank payment method options. */ + @SerializedName("pay_by_bank") + PayByBank payByBank; + /** contains details about the PAYCO payment method options. */ @SerializedName("payco") Payco payco; @@ -5945,6 +5949,7 @@ private PaymentMethodOptions( NaverPay naverPay, Oxxo oxxo, P24 p24, + PayByBank payByBank, Payco payco, Paynow paynow, Paypal paypal, @@ -5985,6 +5990,7 @@ private PaymentMethodOptions( this.naverPay = naverPay; this.oxxo = oxxo; this.p24 = p24; + this.payByBank = payByBank; this.payco = payco; this.paynow = paynow; this.paypal = paypal; @@ -6060,6 +6066,8 @@ public static class Builder { private P24 p24; + private PayByBank payByBank; + private Payco payco; private Paynow paynow; @@ -6115,6 +6123,7 @@ public SessionCreateParams.PaymentMethodOptions build() { this.naverPay, this.oxxo, this.p24, + this.payByBank, this.payco, this.paynow, this.paypal, @@ -6321,6 +6330,12 @@ public Builder setP24(SessionCreateParams.PaymentMethodOptions.P24 p24) { return this; } + /** contains details about the Pay By Bank payment method options. */ + public Builder setPayByBank(SessionCreateParams.PaymentMethodOptions.PayByBank payByBank) { + this.payByBank = payByBank; + return this; + } + /** contains details about the PAYCO payment method options. */ public Builder setPayco(SessionCreateParams.PaymentMethodOptions.Payco payco) { this.payco = payco; @@ -11082,6 +11097,63 @@ public enum SetupFutureUsage implements ApiRequestParams.EnumParam { } } + @Getter + public static class PayByBank { + /** + * 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 PayByBank(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 SessionCreateParams.PaymentMethodOptions.PayByBank build() { + return new SessionCreateParams.PaymentMethodOptions.PayByBank(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 SessionCreateParams.PaymentMethodOptions.PayByBank#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.PaymentMethodOptions.PayByBank#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + } + @Getter public static class Payco { /** Controls when the funds will be captured from the customer's account. */ @@ -14625,6 +14697,9 @@ public enum AllowedCountry implements ApiRequestParams.EnumParam { @SerializedName("SC") SC("SC"), + @SerializedName("SD") + SD("SD"), + @SerializedName("SE") SE("SE"), @@ -16937,6 +17012,9 @@ public enum PaymentMethodType implements ApiRequestParams.EnumParam { @SerializedName("p24") P24("p24"), + @SerializedName("pay_by_bank") + PAY_BY_BANK("pay_by_bank"), + @SerializedName("payco") PAYCO("payco"), diff --git a/src/main/java/com/stripe/param/financialconnections/TransactionListParams.java b/src/main/java/com/stripe/param/financialconnections/TransactionListParams.java index 09552e8ef6d..0c5e82c3d1e 100644 --- a/src/main/java/com/stripe/param/financialconnections/TransactionListParams.java +++ b/src/main/java/com/stripe/param/financialconnections/TransactionListParams.java @@ -12,7 +12,8 @@ @Getter public class TransactionListParams extends ApiRequestParams { /** - * Required. The ID of the Stripe account whose transactions will be retrieved. + * Required. The ID of the Financial Connections Account whose transactions will + * be retrieved. */ @SerializedName("account") String account; @@ -123,7 +124,8 @@ public TransactionListParams build() { } /** - * Required. The ID of the Stripe account whose transactions will be retrieved. + * Required. The ID of the Financial Connections Account whose transactions + * will be retrieved. */ public Builder setAccount(String account) { this.account = account; diff --git a/src/main/java/com/stripe/param/terminal/ConfigurationCreateParams.java b/src/main/java/com/stripe/param/terminal/ConfigurationCreateParams.java index 0483a98247f..01d0a43d259 100644 --- a/src/main/java/com/stripe/param/terminal/ConfigurationCreateParams.java +++ b/src/main/java/com/stripe/param/terminal/ConfigurationCreateParams.java @@ -578,6 +578,10 @@ public static class Tipping { @SerializedName("hkd") Hkd hkd; + /** Tipping configuration for JPY. */ + @SerializedName("jpy") + Jpy jpy; + /** Tipping configuration for MYR. */ @SerializedName("myr") Myr myr; @@ -616,6 +620,7 @@ private Tipping( Map extraParams, Gbp gbp, Hkd hkd, + Jpy jpy, Myr myr, Nok nok, Nzd nzd, @@ -632,6 +637,7 @@ private Tipping( this.extraParams = extraParams; this.gbp = gbp; this.hkd = hkd; + this.jpy = jpy; this.myr = myr; this.nok = nok; this.nzd = nzd; @@ -664,6 +670,8 @@ public static class Builder { private Hkd hkd; + private Jpy jpy; + private Myr myr; private Nok nok; @@ -690,6 +698,7 @@ public ConfigurationCreateParams.Tipping build() { this.extraParams, this.gbp, this.hkd, + this.jpy, this.myr, this.nok, this.nzd, @@ -773,6 +782,12 @@ public Builder setHkd(ConfigurationCreateParams.Tipping.Hkd hkd) { return this; } + /** Tipping configuration for JPY. */ + public Builder setJpy(ConfigurationCreateParams.Tipping.Jpy jpy) { + this.jpy = jpy; + return this; + } + /** Tipping configuration for MYR. */ public Builder setMyr(ConfigurationCreateParams.Tipping.Myr myr) { this.myr = myr; @@ -1992,6 +2007,153 @@ public Builder setSmartTipThreshold(Long smartTipThreshold) { } } + @Getter + public static class Jpy { + /** + * 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; + + /** Fixed amounts displayed when collecting a tip. */ + @SerializedName("fixed_amounts") + List fixedAmounts; + + /** Percentages displayed when collecting a tip. */ + @SerializedName("percentages") + List percentages; + + /** + * Below this amount, fixed amounts will be displayed; above it, percentages will be + * displayed. + */ + @SerializedName("smart_tip_threshold") + Long smartTipThreshold; + + private Jpy( + Map extraParams, + List fixedAmounts, + List percentages, + Long smartTipThreshold) { + this.extraParams = extraParams; + this.fixedAmounts = fixedAmounts; + this.percentages = percentages; + this.smartTipThreshold = smartTipThreshold; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private List fixedAmounts; + + private List percentages; + + private Long smartTipThreshold; + + /** Finalize and obtain parameter instance from this builder. */ + public ConfigurationCreateParams.Tipping.Jpy build() { + return new ConfigurationCreateParams.Tipping.Jpy( + this.extraParams, this.fixedAmounts, this.percentages, this.smartTipThreshold); + } + + /** + * 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 ConfigurationCreateParams.Tipping.Jpy#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 ConfigurationCreateParams.Tipping.Jpy#extraParams} for the field + * documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Add an element to `fixedAmounts` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * ConfigurationCreateParams.Tipping.Jpy#fixedAmounts} for the field documentation. + */ + public Builder addFixedAmount(Long element) { + if (this.fixedAmounts == null) { + this.fixedAmounts = new ArrayList<>(); + } + this.fixedAmounts.add(element); + return this; + } + + /** + * Add all elements to `fixedAmounts` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * ConfigurationCreateParams.Tipping.Jpy#fixedAmounts} for the field documentation. + */ + public Builder addAllFixedAmount(List elements) { + if (this.fixedAmounts == null) { + this.fixedAmounts = new ArrayList<>(); + } + this.fixedAmounts.addAll(elements); + return this; + } + + /** + * Add an element to `percentages` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * ConfigurationCreateParams.Tipping.Jpy#percentages} for the field documentation. + */ + public Builder addPercentage(Long element) { + if (this.percentages == null) { + this.percentages = new ArrayList<>(); + } + this.percentages.add(element); + return this; + } + + /** + * Add all elements to `percentages` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * ConfigurationCreateParams.Tipping.Jpy#percentages} for the field documentation. + */ + public Builder addAllPercentage(List elements) { + if (this.percentages == null) { + this.percentages = new ArrayList<>(); + } + this.percentages.addAll(elements); + return this; + } + + /** + * Below this amount, fixed amounts will be displayed; above it, percentages will be + * displayed. + */ + public Builder setSmartTipThreshold(Long smartTipThreshold) { + this.smartTipThreshold = smartTipThreshold; + return this; + } + } + } + @Getter public static class Myr { /** diff --git a/src/main/java/com/stripe/param/terminal/ConfigurationUpdateParams.java b/src/main/java/com/stripe/param/terminal/ConfigurationUpdateParams.java index 14d6e837773..5064fad65fc 100644 --- a/src/main/java/com/stripe/param/terminal/ConfigurationUpdateParams.java +++ b/src/main/java/com/stripe/param/terminal/ConfigurationUpdateParams.java @@ -608,6 +608,10 @@ public static class Tipping { @SerializedName("hkd") Hkd hkd; + /** Tipping configuration for JPY. */ + @SerializedName("jpy") + Jpy jpy; + /** Tipping configuration for MYR. */ @SerializedName("myr") Myr myr; @@ -646,6 +650,7 @@ private Tipping( Map extraParams, Gbp gbp, Hkd hkd, + Jpy jpy, Myr myr, Nok nok, Nzd nzd, @@ -662,6 +667,7 @@ private Tipping( this.extraParams = extraParams; this.gbp = gbp; this.hkd = hkd; + this.jpy = jpy; this.myr = myr; this.nok = nok; this.nzd = nzd; @@ -694,6 +700,8 @@ public static class Builder { private Hkd hkd; + private Jpy jpy; + private Myr myr; private Nok nok; @@ -720,6 +728,7 @@ public ConfigurationUpdateParams.Tipping build() { this.extraParams, this.gbp, this.hkd, + this.jpy, this.myr, this.nok, this.nzd, @@ -803,6 +812,12 @@ public Builder setHkd(ConfigurationUpdateParams.Tipping.Hkd hkd) { return this; } + /** Tipping configuration for JPY. */ + public Builder setJpy(ConfigurationUpdateParams.Tipping.Jpy jpy) { + this.jpy = jpy; + return this; + } + /** Tipping configuration for MYR. */ public Builder setMyr(ConfigurationUpdateParams.Tipping.Myr myr) { this.myr = myr; @@ -2022,6 +2037,153 @@ public Builder setSmartTipThreshold(Long smartTipThreshold) { } } + @Getter + public static class Jpy { + /** + * 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; + + /** Fixed amounts displayed when collecting a tip. */ + @SerializedName("fixed_amounts") + List fixedAmounts; + + /** Percentages displayed when collecting a tip. */ + @SerializedName("percentages") + List percentages; + + /** + * Below this amount, fixed amounts will be displayed; above it, percentages will be + * displayed. + */ + @SerializedName("smart_tip_threshold") + Long smartTipThreshold; + + private Jpy( + Map extraParams, + List fixedAmounts, + List percentages, + Long smartTipThreshold) { + this.extraParams = extraParams; + this.fixedAmounts = fixedAmounts; + this.percentages = percentages; + this.smartTipThreshold = smartTipThreshold; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private List fixedAmounts; + + private List percentages; + + private Long smartTipThreshold; + + /** Finalize and obtain parameter instance from this builder. */ + public ConfigurationUpdateParams.Tipping.Jpy build() { + return new ConfigurationUpdateParams.Tipping.Jpy( + this.extraParams, this.fixedAmounts, this.percentages, this.smartTipThreshold); + } + + /** + * 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 ConfigurationUpdateParams.Tipping.Jpy#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 ConfigurationUpdateParams.Tipping.Jpy#extraParams} for the field + * documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Add an element to `fixedAmounts` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * ConfigurationUpdateParams.Tipping.Jpy#fixedAmounts} for the field documentation. + */ + public Builder addFixedAmount(Long element) { + if (this.fixedAmounts == null) { + this.fixedAmounts = new ArrayList<>(); + } + this.fixedAmounts.add(element); + return this; + } + + /** + * Add all elements to `fixedAmounts` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * ConfigurationUpdateParams.Tipping.Jpy#fixedAmounts} for the field documentation. + */ + public Builder addAllFixedAmount(List elements) { + if (this.fixedAmounts == null) { + this.fixedAmounts = new ArrayList<>(); + } + this.fixedAmounts.addAll(elements); + return this; + } + + /** + * Add an element to `percentages` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * ConfigurationUpdateParams.Tipping.Jpy#percentages} for the field documentation. + */ + public Builder addPercentage(Long element) { + if (this.percentages == null) { + this.percentages = new ArrayList<>(); + } + this.percentages.add(element); + return this; + } + + /** + * Add all elements to `percentages` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * ConfigurationUpdateParams.Tipping.Jpy#percentages} for the field documentation. + */ + public Builder addAllPercentage(List elements) { + if (this.percentages == null) { + this.percentages = new ArrayList<>(); + } + this.percentages.addAll(elements); + return this; + } + + /** + * Below this amount, fixed amounts will be displayed; above it, percentages will be + * displayed. + */ + public Builder setSmartTipThreshold(Long smartTipThreshold) { + this.smartTipThreshold = smartTipThreshold; + return this; + } + } + } + @Getter public static class Myr { /** diff --git a/src/test/java/com/stripe/functional/GeneratedExamples.java b/src/test/java/com/stripe/functional/GeneratedExamples.java index 346c60fcb69..a4205498547 100644 --- a/src/test/java/com/stripe/functional/GeneratedExamples.java +++ b/src/test/java/com/stripe/functional/GeneratedExamples.java @@ -11940,6 +11940,50 @@ public void testTerminalReadersProcessPaymentIntentPostServices() throws StripeE null); } + @Test + public void testTerminalReadersProcessSetupIntentPost() throws StripeException { + com.stripe.model.terminal.Reader resource = + com.stripe.model.terminal.Reader.retrieve("tmr_xxxxxxxxxxxxx"); + + com.stripe.param.terminal.ReaderProcessSetupIntentParams params = + com.stripe.param.terminal.ReaderProcessSetupIntentParams.builder() + .setSetupIntent("seti_xxxxxxxxxxxxx") + .setAllowRedisplay( + com.stripe.param.terminal.ReaderProcessSetupIntentParams.AllowRedisplay.ALWAYS) + .build(); + + com.stripe.model.terminal.Reader reader = resource.processSetupIntent(params); + assertNotNull(reader); + verifyRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + "/v1/terminal/readers/tmr_xxxxxxxxxxxxx/process_setup_intent", + params.toMap(), + null); + } + + @Test + public void testTerminalReadersProcessSetupIntentPostServices() throws StripeException { + StripeClient client = new StripeClient(networkSpy); + + com.stripe.param.terminal.ReaderProcessSetupIntentParams params = + com.stripe.param.terminal.ReaderProcessSetupIntentParams.builder() + .setSetupIntent("seti_xxxxxxxxxxxxx") + .setAllowRedisplay( + com.stripe.param.terminal.ReaderProcessSetupIntentParams.AllowRedisplay.ALWAYS) + .build(); + + com.stripe.model.terminal.Reader reader = + client.terminal().readers().processSetupIntent("tmr_xxxxxxxxxxxxx", params); + assertNotNull(reader); + verifyRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + "/v1/terminal/readers/tmr_xxxxxxxxxxxxx/process_setup_intent", + params.toMap(), + null); + } + @Test public void testTestHelpersCustomersFundCashBalancePost() throws StripeException { Customer resource = Customer.retrieve("cus_123");