diff --git a/API_VERSION b/API_VERSION index 7fa3a2d3c56..66718b6c2b2 100644 --- a/API_VERSION +++ b/API_VERSION @@ -1 +1 @@ -577fcb57736b925392ea563c0284df9002c75ac9 \ No newline at end of file +847d2ef0de9626eec25973097d37b61f67e343ee \ No newline at end of file diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 8a7edbe6821..76d911f49fe 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v2100 \ No newline at end of file +v2104 \ No newline at end of file diff --git a/build.gradle b/build.gradle index 87f2e32c815..5c4659785ee 100644 --- a/build.gradle +++ b/build.gradle @@ -29,7 +29,7 @@ tasks.withType(JavaCompile) { } options.fork = true - options.forkOptions.jvmArgs += ['-Xms512M', '-Xmx1g'] + options.forkOptions.jvmArgs += ['-Xms512M', '-Xmx4g'] options.release = project.targetCompatibility.majorVersion as Integer diff --git a/src/main/java/com/stripe/model/Account.java b/src/main/java/com/stripe/model/Account.java index 15e129a6dcd..eb11d409b51 100644 --- a/src/main/java/com/stripe/model/Account.java +++ b/src/main/java/com/stripe/model/Account.java @@ -1640,6 +1640,13 @@ public static class Company extends StripeObject { @SerializedName("registration_date") RegistrationDate registrationDate; + /** + * This hash is used to attest that the representative is authorized to act as the + * representative of their legal entity. + */ + @SerializedName("representative_declaration") + RepresentativeDeclaration representativeDeclaration; + /** * The category identifying the legal structure of the company or legal entity. Also available * for accounts where API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class RepresentativeDeclaration extends StripeObject { + /** The Unix timestamp marking when the representative declaration attestation was made. */ + @SerializedName("date") + Long date; + + /** The IP address from which the representative declaration attestation was made. */ + @SerializedName("ip") + String ip; + + /** + * The user-agent string from the browser where the representative declaration attestation was + * made. + */ + @SerializedName("user_agent") + String userAgent; + } + /** * For more details about Verification, please refer to the API Reference. @@ -2208,29 +2239,29 @@ public static class Errors extends StripeObject { * invalid_url_website_incomplete_terms_and_conditions}, {@code * invalid_url_website_incomplete_under_construction}, {@code invalid_url_website_other}, * {@code invalid_value_other}, {@code unsupported_business_type}, {@code - * verification_directors_mismatch}, {@code verification_document_address_mismatch}, {@code - * verification_document_address_missing}, {@code verification_document_corrupt}, {@code - * verification_document_country_not_supported}, {@code - * verification_document_directors_mismatch}, {@code verification_document_dob_mismatch}, - * {@code verification_document_duplicate_type}, {@code verification_document_expired}, {@code - * verification_document_failed_copy}, {@code verification_document_failed_greyscale}, {@code - * verification_document_failed_other}, {@code verification_document_failed_test_mode}, {@code - * verification_document_fraudulent}, {@code verification_document_id_number_mismatch}, {@code - * verification_document_id_number_missing}, {@code verification_document_incomplete}, {@code - * verification_document_invalid}, {@code verification_document_issue_or_expiry_date_missing}, - * {@code verification_document_manipulated}, {@code verification_document_missing_back}, - * {@code verification_document_missing_front}, {@code verification_document_name_mismatch}, - * {@code verification_document_name_missing}, {@code - * verification_document_nationality_mismatch}, {@code verification_document_not_readable}, - * {@code verification_document_not_signed}, {@code verification_document_not_uploaded}, - * {@code verification_document_photo_mismatch}, {@code verification_document_too_large}, - * {@code verification_document_type_not_supported}, {@code - * verification_extraneous_directors}, {@code verification_failed_address_match}, {@code - * verification_failed_authorizer_authority}, {@code verification_failed_business_iec_number}, - * {@code verification_failed_document_match}, {@code verification_failed_id_number_match}, - * {@code verification_failed_keyed_identity}, {@code verification_failed_keyed_match}, {@code - * verification_failed_name_match}, {@code verification_failed_other}, {@code - * verification_failed_representative_authority}, {@code + * verification_data_not_found}, {@code verification_directors_mismatch}, {@code + * verification_document_address_mismatch}, {@code verification_document_address_missing}, + * {@code verification_document_corrupt}, {@code verification_document_country_not_supported}, + * {@code verification_document_directors_mismatch}, {@code + * verification_document_dob_mismatch}, {@code verification_document_duplicate_type}, {@code + * verification_document_expired}, {@code verification_document_failed_copy}, {@code + * verification_document_failed_greyscale}, {@code verification_document_failed_other}, {@code + * verification_document_failed_test_mode}, {@code verification_document_fraudulent}, {@code + * verification_document_id_number_mismatch}, {@code verification_document_id_number_missing}, + * {@code verification_document_incomplete}, {@code verification_document_invalid}, {@code + * verification_document_issue_or_expiry_date_missing}, {@code + * verification_document_manipulated}, {@code verification_document_missing_back}, {@code + * verification_document_missing_front}, {@code verification_document_name_mismatch}, {@code + * verification_document_name_missing}, {@code verification_document_nationality_mismatch}, + * {@code verification_document_not_readable}, {@code verification_document_not_signed}, + * {@code verification_document_not_uploaded}, {@code verification_document_photo_mismatch}, + * {@code verification_document_too_large}, {@code verification_document_type_not_supported}, + * {@code verification_extraneous_directors}, {@code verification_failed_address_match}, + * {@code verification_failed_authorizer_authority}, {@code + * verification_failed_business_iec_number}, {@code verification_failed_document_match}, + * {@code verification_failed_id_number_match}, {@code verification_failed_keyed_identity}, + * {@code verification_failed_keyed_match}, {@code verification_failed_name_match}, {@code + * verification_failed_other}, {@code verification_failed_representative_authority}, {@code * verification_failed_residential_address}, {@code verification_failed_tax_id_match}, {@code * verification_failed_tax_id_not_issued}, {@code * verification_legal_entity_structure_mismatch}, {@code verification_missing_directors}, @@ -2411,29 +2442,29 @@ public static class Errors extends StripeObject { * invalid_url_website_incomplete_terms_and_conditions}, {@code * invalid_url_website_incomplete_under_construction}, {@code invalid_url_website_other}, * {@code invalid_value_other}, {@code unsupported_business_type}, {@code - * verification_directors_mismatch}, {@code verification_document_address_mismatch}, {@code - * verification_document_address_missing}, {@code verification_document_corrupt}, {@code - * verification_document_country_not_supported}, {@code - * verification_document_directors_mismatch}, {@code verification_document_dob_mismatch}, - * {@code verification_document_duplicate_type}, {@code verification_document_expired}, {@code - * verification_document_failed_copy}, {@code verification_document_failed_greyscale}, {@code - * verification_document_failed_other}, {@code verification_document_failed_test_mode}, {@code - * verification_document_fraudulent}, {@code verification_document_id_number_mismatch}, {@code - * verification_document_id_number_missing}, {@code verification_document_incomplete}, {@code - * verification_document_invalid}, {@code verification_document_issue_or_expiry_date_missing}, - * {@code verification_document_manipulated}, {@code verification_document_missing_back}, - * {@code verification_document_missing_front}, {@code verification_document_name_mismatch}, - * {@code verification_document_name_missing}, {@code - * verification_document_nationality_mismatch}, {@code verification_document_not_readable}, - * {@code verification_document_not_signed}, {@code verification_document_not_uploaded}, - * {@code verification_document_photo_mismatch}, {@code verification_document_too_large}, - * {@code verification_document_type_not_supported}, {@code - * verification_extraneous_directors}, {@code verification_failed_address_match}, {@code - * verification_failed_authorizer_authority}, {@code verification_failed_business_iec_number}, - * {@code verification_failed_document_match}, {@code verification_failed_id_number_match}, - * {@code verification_failed_keyed_identity}, {@code verification_failed_keyed_match}, {@code - * verification_failed_name_match}, {@code verification_failed_other}, {@code - * verification_failed_representative_authority}, {@code + * verification_data_not_found}, {@code verification_directors_mismatch}, {@code + * verification_document_address_mismatch}, {@code verification_document_address_missing}, + * {@code verification_document_corrupt}, {@code verification_document_country_not_supported}, + * {@code verification_document_directors_mismatch}, {@code + * verification_document_dob_mismatch}, {@code verification_document_duplicate_type}, {@code + * verification_document_expired}, {@code verification_document_failed_copy}, {@code + * verification_document_failed_greyscale}, {@code verification_document_failed_other}, {@code + * verification_document_failed_test_mode}, {@code verification_document_fraudulent}, {@code + * verification_document_id_number_mismatch}, {@code verification_document_id_number_missing}, + * {@code verification_document_incomplete}, {@code verification_document_invalid}, {@code + * verification_document_issue_or_expiry_date_missing}, {@code + * verification_document_manipulated}, {@code verification_document_missing_back}, {@code + * verification_document_missing_front}, {@code verification_document_name_mismatch}, {@code + * verification_document_name_missing}, {@code verification_document_nationality_mismatch}, + * {@code verification_document_not_readable}, {@code verification_document_not_signed}, + * {@code verification_document_not_uploaded}, {@code verification_document_photo_mismatch}, + * {@code verification_document_too_large}, {@code verification_document_type_not_supported}, + * {@code verification_extraneous_directors}, {@code verification_failed_address_match}, + * {@code verification_failed_authorizer_authority}, {@code + * verification_failed_business_iec_number}, {@code verification_failed_document_match}, + * {@code verification_failed_id_number_match}, {@code verification_failed_keyed_identity}, + * {@code verification_failed_keyed_match}, {@code verification_failed_name_match}, {@code + * verification_failed_other}, {@code verification_failed_representative_authority}, {@code * verification_failed_residential_address}, {@code verification_failed_tax_id_match}, {@code * verification_failed_tax_id_not_issued}, {@code * verification_legal_entity_structure_mismatch}, {@code verification_missing_directors}, diff --git a/src/main/java/com/stripe/model/ApplicationFee.java b/src/main/java/com/stripe/model/ApplicationFee.java index bac7b223119..c0537819dd0 100644 --- a/src/main/java/com/stripe/model/ApplicationFee.java +++ b/src/main/java/com/stripe/model/ApplicationFee.java @@ -318,10 +318,14 @@ public static class FeeSource extends StripeObject { @SerializedName("payout") String payout; + /** Transfer ID that created this application fee. */ + @SerializedName("transfer") + String transfer; + /** * Type of object that created the application fee. * - *

One of {@code charge}, or {@code payout}. + *

One of {@code charge}, {@code payout}, or {@code transfer}. */ @SerializedName("type") String type; diff --git a/src/main/java/com/stripe/model/Balance.java b/src/main/java/com/stripe/model/Balance.java index 97b50660c93..13c4ab51652 100644 --- a/src/main/java/com/stripe/model/Balance.java +++ b/src/main/java/com/stripe/model/Balance.java @@ -81,6 +81,9 @@ public class Balance extends ApiResource { @SerializedName("refund_and_dispute_prefunding") RefundAndDisputePrefunding refundAndDisputePrefunding; + @SerializedName("transit_balances_total") + TransitBalancesTotal transitBalancesTotal; + /** * Retrieves the current account balance, based on the authentication that was used to make the * request. For a sample request, see API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class TransitBalancesTotal extends StripeObject { + /** Funds that are available for use. */ + @SerializedName("available") + List available; + + /** Funds that are pending. */ + @SerializedName("pending") + List pending; + + /** + * For more details about Available, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Available extends StripeObject { + /** Balance amount. */ + @SerializedName("amount") + Long amount; + + /** + * Three-letter ISO currency + * code, in lowercase. Must be a supported + * currency. + */ + @SerializedName("currency") + String currency; + + @SerializedName("source_types") + SourceTypes sourceTypes; + + /** + * For more details about SourceTypes, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class SourceTypes extends StripeObject { + /** + * Amount coming from legacy US ACH + * payments. + */ + @SerializedName("bank_account") + Long bankAccount; + + /** + * Amount coming from most payment methods, including cards as well as non-legacy bank debits. + */ + @SerializedName("card") + Long card; + + /** + * Amount coming from FPX, a Malaysian + * payment method. + */ + @SerializedName("fpx") + Long fpx; + } + } + + /** + * For more details about Pending, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Pending extends StripeObject { + /** Balance amount. */ + @SerializedName("amount") + Long amount; + + /** + * Three-letter ISO currency + * code, in lowercase. Must be a supported + * currency. + */ + @SerializedName("currency") + String currency; + + @SerializedName("source_types") + SourceTypes sourceTypes; + + /** + * For more details about SourceTypes, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class SourceTypes extends StripeObject { + /** + * Amount coming from legacy US ACH + * payments. + */ + @SerializedName("bank_account") + Long bankAccount; + + /** + * Amount coming from most payment methods, including cards as well as non-legacy bank debits. + */ + @SerializedName("card") + Long card; + + /** + * Amount coming from FPX, a Malaysian + * payment method. + */ + @SerializedName("fpx") + Long fpx; + } + } + } + @Override public void setResponseGetter(StripeResponseGetter responseGetter) { super.setResponseGetter(responseGetter); trySetResponseGetter(issuing, responseGetter); trySetResponseGetter(refundAndDisputePrefunding, responseGetter); + trySetResponseGetter(transitBalancesTotal, responseGetter); } } diff --git a/src/main/java/com/stripe/model/BalanceTransaction.java b/src/main/java/com/stripe/model/BalanceTransaction.java index 2c195229c91..405ae20ba35 100644 --- a/src/main/java/com/stripe/model/BalanceTransaction.java +++ b/src/main/java/com/stripe/model/BalanceTransaction.java @@ -43,7 +43,8 @@ public class BalanceTransaction extends ApiResource implements HasId { /** * The balance that this transaction impacts. * - *

One of {@code issuing}, {@code payments}, or {@code refund_and_dispute_prefunding}. + *

One of {@code issuing}, {@code payments}, {@code refund_and_dispute_prefunding}, or {@code + * transit}. */ @SerializedName("balance_type") String balanceType; diff --git a/src/main/java/com/stripe/model/BankAccount.java b/src/main/java/com/stripe/model/BankAccount.java index 5284ebe11fe..7431969d2d4 100644 --- a/src/main/java/com/stripe/model/BankAccount.java +++ b/src/main/java/com/stripe/model/BankAccount.java @@ -579,29 +579,29 @@ public static class Errors extends StripeObject { * invalid_url_website_incomplete_terms_and_conditions}, {@code * invalid_url_website_incomplete_under_construction}, {@code invalid_url_website_other}, * {@code invalid_value_other}, {@code unsupported_business_type}, {@code - * verification_directors_mismatch}, {@code verification_document_address_mismatch}, {@code - * verification_document_address_missing}, {@code verification_document_corrupt}, {@code - * verification_document_country_not_supported}, {@code - * verification_document_directors_mismatch}, {@code verification_document_dob_mismatch}, - * {@code verification_document_duplicate_type}, {@code verification_document_expired}, {@code - * verification_document_failed_copy}, {@code verification_document_failed_greyscale}, {@code - * verification_document_failed_other}, {@code verification_document_failed_test_mode}, {@code - * verification_document_fraudulent}, {@code verification_document_id_number_mismatch}, {@code - * verification_document_id_number_missing}, {@code verification_document_incomplete}, {@code - * verification_document_invalid}, {@code verification_document_issue_or_expiry_date_missing}, - * {@code verification_document_manipulated}, {@code verification_document_missing_back}, - * {@code verification_document_missing_front}, {@code verification_document_name_mismatch}, - * {@code verification_document_name_missing}, {@code - * verification_document_nationality_mismatch}, {@code verification_document_not_readable}, - * {@code verification_document_not_signed}, {@code verification_document_not_uploaded}, - * {@code verification_document_photo_mismatch}, {@code verification_document_too_large}, - * {@code verification_document_type_not_supported}, {@code - * verification_extraneous_directors}, {@code verification_failed_address_match}, {@code - * verification_failed_authorizer_authority}, {@code verification_failed_business_iec_number}, - * {@code verification_failed_document_match}, {@code verification_failed_id_number_match}, - * {@code verification_failed_keyed_identity}, {@code verification_failed_keyed_match}, {@code - * verification_failed_name_match}, {@code verification_failed_other}, {@code - * verification_failed_representative_authority}, {@code + * verification_data_not_found}, {@code verification_directors_mismatch}, {@code + * verification_document_address_mismatch}, {@code verification_document_address_missing}, + * {@code verification_document_corrupt}, {@code verification_document_country_not_supported}, + * {@code verification_document_directors_mismatch}, {@code + * verification_document_dob_mismatch}, {@code verification_document_duplicate_type}, {@code + * verification_document_expired}, {@code verification_document_failed_copy}, {@code + * verification_document_failed_greyscale}, {@code verification_document_failed_other}, {@code + * verification_document_failed_test_mode}, {@code verification_document_fraudulent}, {@code + * verification_document_id_number_mismatch}, {@code verification_document_id_number_missing}, + * {@code verification_document_incomplete}, {@code verification_document_invalid}, {@code + * verification_document_issue_or_expiry_date_missing}, {@code + * verification_document_manipulated}, {@code verification_document_missing_back}, {@code + * verification_document_missing_front}, {@code verification_document_name_mismatch}, {@code + * verification_document_name_missing}, {@code verification_document_nationality_mismatch}, + * {@code verification_document_not_readable}, {@code verification_document_not_signed}, + * {@code verification_document_not_uploaded}, {@code verification_document_photo_mismatch}, + * {@code verification_document_too_large}, {@code verification_document_type_not_supported}, + * {@code verification_extraneous_directors}, {@code verification_failed_address_match}, + * {@code verification_failed_authorizer_authority}, {@code + * verification_failed_business_iec_number}, {@code verification_failed_document_match}, + * {@code verification_failed_id_number_match}, {@code verification_failed_keyed_identity}, + * {@code verification_failed_keyed_match}, {@code verification_failed_name_match}, {@code + * verification_failed_other}, {@code verification_failed_representative_authority}, {@code * verification_failed_residential_address}, {@code verification_failed_tax_id_match}, {@code * verification_failed_tax_id_not_issued}, {@code * verification_legal_entity_structure_mismatch}, {@code verification_missing_directors}, @@ -708,29 +708,29 @@ public static class Errors extends StripeObject { * invalid_url_website_incomplete_terms_and_conditions}, {@code * invalid_url_website_incomplete_under_construction}, {@code invalid_url_website_other}, * {@code invalid_value_other}, {@code unsupported_business_type}, {@code - * verification_directors_mismatch}, {@code verification_document_address_mismatch}, {@code - * verification_document_address_missing}, {@code verification_document_corrupt}, {@code - * verification_document_country_not_supported}, {@code - * verification_document_directors_mismatch}, {@code verification_document_dob_mismatch}, - * {@code verification_document_duplicate_type}, {@code verification_document_expired}, {@code - * verification_document_failed_copy}, {@code verification_document_failed_greyscale}, {@code - * verification_document_failed_other}, {@code verification_document_failed_test_mode}, {@code - * verification_document_fraudulent}, {@code verification_document_id_number_mismatch}, {@code - * verification_document_id_number_missing}, {@code verification_document_incomplete}, {@code - * verification_document_invalid}, {@code verification_document_issue_or_expiry_date_missing}, - * {@code verification_document_manipulated}, {@code verification_document_missing_back}, - * {@code verification_document_missing_front}, {@code verification_document_name_mismatch}, - * {@code verification_document_name_missing}, {@code - * verification_document_nationality_mismatch}, {@code verification_document_not_readable}, - * {@code verification_document_not_signed}, {@code verification_document_not_uploaded}, - * {@code verification_document_photo_mismatch}, {@code verification_document_too_large}, - * {@code verification_document_type_not_supported}, {@code - * verification_extraneous_directors}, {@code verification_failed_address_match}, {@code - * verification_failed_authorizer_authority}, {@code verification_failed_business_iec_number}, - * {@code verification_failed_document_match}, {@code verification_failed_id_number_match}, - * {@code verification_failed_keyed_identity}, {@code verification_failed_keyed_match}, {@code - * verification_failed_name_match}, {@code verification_failed_other}, {@code - * verification_failed_representative_authority}, {@code + * verification_data_not_found}, {@code verification_directors_mismatch}, {@code + * verification_document_address_mismatch}, {@code verification_document_address_missing}, + * {@code verification_document_corrupt}, {@code verification_document_country_not_supported}, + * {@code verification_document_directors_mismatch}, {@code + * verification_document_dob_mismatch}, {@code verification_document_duplicate_type}, {@code + * verification_document_expired}, {@code verification_document_failed_copy}, {@code + * verification_document_failed_greyscale}, {@code verification_document_failed_other}, {@code + * verification_document_failed_test_mode}, {@code verification_document_fraudulent}, {@code + * verification_document_id_number_mismatch}, {@code verification_document_id_number_missing}, + * {@code verification_document_incomplete}, {@code verification_document_invalid}, {@code + * verification_document_issue_or_expiry_date_missing}, {@code + * verification_document_manipulated}, {@code verification_document_missing_back}, {@code + * verification_document_missing_front}, {@code verification_document_name_mismatch}, {@code + * verification_document_name_missing}, {@code verification_document_nationality_mismatch}, + * {@code verification_document_not_readable}, {@code verification_document_not_signed}, + * {@code verification_document_not_uploaded}, {@code verification_document_photo_mismatch}, + * {@code verification_document_too_large}, {@code verification_document_type_not_supported}, + * {@code verification_extraneous_directors}, {@code verification_failed_address_match}, + * {@code verification_failed_authorizer_authority}, {@code + * verification_failed_business_iec_number}, {@code verification_failed_document_match}, + * {@code verification_failed_id_number_match}, {@code verification_failed_keyed_identity}, + * {@code verification_failed_keyed_match}, {@code verification_failed_name_match}, {@code + * verification_failed_other}, {@code verification_failed_representative_authority}, {@code * verification_failed_residential_address}, {@code verification_failed_tax_id_match}, {@code * verification_failed_tax_id_not_issued}, {@code * verification_legal_entity_structure_mismatch}, {@code verification_missing_directors}, diff --git a/src/main/java/com/stripe/model/Capability.java b/src/main/java/com/stripe/model/Capability.java index 0b49c7c1f22..d7bf55d6cb2 100644 --- a/src/main/java/com/stripe/model/Capability.java +++ b/src/main/java/com/stripe/model/Capability.java @@ -273,29 +273,29 @@ public static class Errors extends StripeObject { * invalid_url_website_incomplete_terms_and_conditions}, {@code * invalid_url_website_incomplete_under_construction}, {@code invalid_url_website_other}, * {@code invalid_value_other}, {@code unsupported_business_type}, {@code - * verification_directors_mismatch}, {@code verification_document_address_mismatch}, {@code - * verification_document_address_missing}, {@code verification_document_corrupt}, {@code - * verification_document_country_not_supported}, {@code - * verification_document_directors_mismatch}, {@code verification_document_dob_mismatch}, - * {@code verification_document_duplicate_type}, {@code verification_document_expired}, {@code - * verification_document_failed_copy}, {@code verification_document_failed_greyscale}, {@code - * verification_document_failed_other}, {@code verification_document_failed_test_mode}, {@code - * verification_document_fraudulent}, {@code verification_document_id_number_mismatch}, {@code - * verification_document_id_number_missing}, {@code verification_document_incomplete}, {@code - * verification_document_invalid}, {@code verification_document_issue_or_expiry_date_missing}, - * {@code verification_document_manipulated}, {@code verification_document_missing_back}, - * {@code verification_document_missing_front}, {@code verification_document_name_mismatch}, - * {@code verification_document_name_missing}, {@code - * verification_document_nationality_mismatch}, {@code verification_document_not_readable}, - * {@code verification_document_not_signed}, {@code verification_document_not_uploaded}, - * {@code verification_document_photo_mismatch}, {@code verification_document_too_large}, - * {@code verification_document_type_not_supported}, {@code - * verification_extraneous_directors}, {@code verification_failed_address_match}, {@code - * verification_failed_authorizer_authority}, {@code verification_failed_business_iec_number}, - * {@code verification_failed_document_match}, {@code verification_failed_id_number_match}, - * {@code verification_failed_keyed_identity}, {@code verification_failed_keyed_match}, {@code - * verification_failed_name_match}, {@code verification_failed_other}, {@code - * verification_failed_representative_authority}, {@code + * verification_data_not_found}, {@code verification_directors_mismatch}, {@code + * verification_document_address_mismatch}, {@code verification_document_address_missing}, + * {@code verification_document_corrupt}, {@code verification_document_country_not_supported}, + * {@code verification_document_directors_mismatch}, {@code + * verification_document_dob_mismatch}, {@code verification_document_duplicate_type}, {@code + * verification_document_expired}, {@code verification_document_failed_copy}, {@code + * verification_document_failed_greyscale}, {@code verification_document_failed_other}, {@code + * verification_document_failed_test_mode}, {@code verification_document_fraudulent}, {@code + * verification_document_id_number_mismatch}, {@code verification_document_id_number_missing}, + * {@code verification_document_incomplete}, {@code verification_document_invalid}, {@code + * verification_document_issue_or_expiry_date_missing}, {@code + * verification_document_manipulated}, {@code verification_document_missing_back}, {@code + * verification_document_missing_front}, {@code verification_document_name_mismatch}, {@code + * verification_document_name_missing}, {@code verification_document_nationality_mismatch}, + * {@code verification_document_not_readable}, {@code verification_document_not_signed}, + * {@code verification_document_not_uploaded}, {@code verification_document_photo_mismatch}, + * {@code verification_document_too_large}, {@code verification_document_type_not_supported}, + * {@code verification_extraneous_directors}, {@code verification_failed_address_match}, + * {@code verification_failed_authorizer_authority}, {@code + * verification_failed_business_iec_number}, {@code verification_failed_document_match}, + * {@code verification_failed_id_number_match}, {@code verification_failed_keyed_identity}, + * {@code verification_failed_keyed_match}, {@code verification_failed_name_match}, {@code + * verification_failed_other}, {@code verification_failed_representative_authority}, {@code * verification_failed_residential_address}, {@code verification_failed_tax_id_match}, {@code * verification_failed_tax_id_not_issued}, {@code * verification_legal_entity_structure_mismatch}, {@code verification_missing_directors}, @@ -459,29 +459,29 @@ public static class Errors extends StripeObject { * invalid_url_website_incomplete_terms_and_conditions}, {@code * invalid_url_website_incomplete_under_construction}, {@code invalid_url_website_other}, * {@code invalid_value_other}, {@code unsupported_business_type}, {@code - * verification_directors_mismatch}, {@code verification_document_address_mismatch}, {@code - * verification_document_address_missing}, {@code verification_document_corrupt}, {@code - * verification_document_country_not_supported}, {@code - * verification_document_directors_mismatch}, {@code verification_document_dob_mismatch}, - * {@code verification_document_duplicate_type}, {@code verification_document_expired}, {@code - * verification_document_failed_copy}, {@code verification_document_failed_greyscale}, {@code - * verification_document_failed_other}, {@code verification_document_failed_test_mode}, {@code - * verification_document_fraudulent}, {@code verification_document_id_number_mismatch}, {@code - * verification_document_id_number_missing}, {@code verification_document_incomplete}, {@code - * verification_document_invalid}, {@code verification_document_issue_or_expiry_date_missing}, - * {@code verification_document_manipulated}, {@code verification_document_missing_back}, - * {@code verification_document_missing_front}, {@code verification_document_name_mismatch}, - * {@code verification_document_name_missing}, {@code - * verification_document_nationality_mismatch}, {@code verification_document_not_readable}, - * {@code verification_document_not_signed}, {@code verification_document_not_uploaded}, - * {@code verification_document_photo_mismatch}, {@code verification_document_too_large}, - * {@code verification_document_type_not_supported}, {@code - * verification_extraneous_directors}, {@code verification_failed_address_match}, {@code - * verification_failed_authorizer_authority}, {@code verification_failed_business_iec_number}, - * {@code verification_failed_document_match}, {@code verification_failed_id_number_match}, - * {@code verification_failed_keyed_identity}, {@code verification_failed_keyed_match}, {@code - * verification_failed_name_match}, {@code verification_failed_other}, {@code - * verification_failed_representative_authority}, {@code + * verification_data_not_found}, {@code verification_directors_mismatch}, {@code + * verification_document_address_mismatch}, {@code verification_document_address_missing}, + * {@code verification_document_corrupt}, {@code verification_document_country_not_supported}, + * {@code verification_document_directors_mismatch}, {@code + * verification_document_dob_mismatch}, {@code verification_document_duplicate_type}, {@code + * verification_document_expired}, {@code verification_document_failed_copy}, {@code + * verification_document_failed_greyscale}, {@code verification_document_failed_other}, {@code + * verification_document_failed_test_mode}, {@code verification_document_fraudulent}, {@code + * verification_document_id_number_mismatch}, {@code verification_document_id_number_missing}, + * {@code verification_document_incomplete}, {@code verification_document_invalid}, {@code + * verification_document_issue_or_expiry_date_missing}, {@code + * verification_document_manipulated}, {@code verification_document_missing_back}, {@code + * verification_document_missing_front}, {@code verification_document_name_mismatch}, {@code + * verification_document_name_missing}, {@code verification_document_nationality_mismatch}, + * {@code verification_document_not_readable}, {@code verification_document_not_signed}, + * {@code verification_document_not_uploaded}, {@code verification_document_photo_mismatch}, + * {@code verification_document_too_large}, {@code verification_document_type_not_supported}, + * {@code verification_extraneous_directors}, {@code verification_failed_address_match}, + * {@code verification_failed_authorizer_authority}, {@code + * verification_failed_business_iec_number}, {@code verification_failed_document_match}, + * {@code verification_failed_id_number_match}, {@code verification_failed_keyed_identity}, + * {@code verification_failed_keyed_match}, {@code verification_failed_name_match}, {@code + * verification_failed_other}, {@code verification_failed_representative_authority}, {@code * verification_failed_residential_address}, {@code verification_failed_tax_id_match}, {@code * verification_failed_tax_id_not_issued}, {@code * verification_legal_entity_structure_mismatch}, {@code verification_missing_directors}, diff --git a/src/main/java/com/stripe/model/Charge.java b/src/main/java/com/stripe/model/Charge.java index d921063ff42..773509d9729 100644 --- a/src/main/java/com/stripe/model/Charge.java +++ b/src/main/java/com/stripe/model/Charge.java @@ -2784,7 +2784,7 @@ public static class Crypto extends StripeObject { /** * The blockchain network that the transaction was sent on. * - *

One of {@code base}, {@code ethereum}, or {@code polygon}. + *

One of {@code base}, {@code ethereum}, {@code polygon}, or {@code solana}. */ @SerializedName("network") String network; @@ -3818,7 +3818,11 @@ public static class Qris extends StripeObject {} @Getter @Setter @EqualsAndHashCode(callSuper = false) - public static class Rechnung extends StripeObject {} + public static class Rechnung extends StripeObject { + /** Payment portal URL. */ + @SerializedName("payment_portal_url") + String paymentPortalUrl; + } /** * For more details about RevolutPay, please refer to the One of {@code acss_debit}, {@code affirm}, {@code afterpay_clearpay}, {@code alipay}, * {@code alma}, {@code amazon_pay}, {@code au_becs_debit}, {@code bacs_debit}, {@code * bancontact}, {@code billie}, {@code blik}, {@code boleto}, {@code card}, {@code - * card_present}, {@code cashapp}, {@code crypto}, {@code customer_balance}, {@code eps}, {@code - * fpx}, {@code giropay}, {@code gopay}, {@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 nz_bank_account}, {@code oxxo}, {@code p24}, {@code pay_by_bank}, {@code - * payco}, {@code paynow}, {@code paypal}, {@code paypay}, {@code payto}, {@code pix}, {@code - * promptpay}, {@code qris}, {@code rechnung}, {@code revolut_pay}, {@code samsung_pay}, {@code - * satispay}, {@code sepa_debit}, {@code shopeepay}, {@code sofort}, {@code stripe_balance}, - * {@code swish}, {@code twint}, {@code us_bank_account}, {@code wechat_pay}, or {@code zip}. + * card_present}, {@code cashapp}, {@code crypto}, {@code custom}, {@code customer_balance}, + * {@code eps}, {@code fpx}, {@code giropay}, {@code gopay}, {@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 nz_bank_account}, {@code oxxo}, {@code p24}, {@code + * pay_by_bank}, {@code payco}, {@code paynow}, {@code paypal}, {@code paypay}, {@code payto}, + * {@code pix}, {@code promptpay}, {@code qris}, {@code rechnung}, {@code revolut_pay}, {@code + * samsung_pay}, {@code satispay}, {@code sepa_debit}, {@code shopeepay}, {@code sofort}, {@code + * stripe_balance}, {@code swish}, {@code twint}, {@code us_bank_account}, {@code wechat_pay}, + * or {@code zip}. */ @SerializedName("type") String type; diff --git a/src/main/java/com/stripe/model/Customer.java b/src/main/java/com/stripe/model/Customer.java index 572ea0d2d9d..8918954d5b8 100644 --- a/src/main/java/com/stripe/model/Customer.java +++ b/src/main/java/com/stripe/model/Customer.java @@ -982,6 +982,15 @@ public static class Tax extends StripeObject { @SerializedName("location") Location location; + /** + * The tax calculation provider used for location resolution. Defaults to {@code stripe} when + * not using a third-party provider. + * + *

One of {@code anrok}, {@code avalara}, {@code sphere}, or {@code stripe}. + */ + @SerializedName("provider") + String provider; + /** * For more details about Location, please refer to the API Reference. diff --git a/src/main/java/com/stripe/model/CustomerSession.java b/src/main/java/com/stripe/model/CustomerSession.java index 3992f240ad8..4659789cdb3 100644 --- a/src/main/java/com/stripe/model/CustomerSession.java +++ b/src/main/java/com/stripe/model/CustomerSession.java @@ -153,6 +153,17 @@ public static class Components extends StripeObject { @SerializedName("buy_button") BuyButton buyButton; + /** This hash contains whether the customer sheet is enabled and the features it supports. */ + @SerializedName("customer_sheet") + CustomerSheet customerSheet; + + /** + * This hash contains whether the mobile payment element is enabled and the features it + * supports. + */ + @SerializedName("mobile_payment_element") + MobilePaymentElement mobilePaymentElement; + /** This hash contains whether the Payment Element is enabled and the features it supports. */ @SerializedName("payment_element") PaymentElement paymentElement; @@ -161,6 +172,10 @@ public static class Components extends StripeObject { @SerializedName("pricing_table") PricingTable pricingTable; + /** This hash contains whether the Tax ID Element is enabled and the features it supports. */ + @SerializedName("tax_id_element") + TaxIdElement taxIdElement; + /** This hash contains whether the buy button is enabled. */ @Getter @Setter @@ -171,6 +186,144 @@ public static class BuyButton extends StripeObject { Boolean enabled; } + /** This hash contains whether the customer sheet is enabled and the features it supports. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class CustomerSheet extends StripeObject { + /** Whether the customer sheet is enabled. */ + @SerializedName("enabled") + Boolean enabled; + + /** This hash defines whether the customer sheet supports certain features. */ + @SerializedName("features") + Features features; + + /** This hash contains the features the customer sheet supports. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Features extends StripeObject { + /** + * A list of {@code + * allow_redisplay} values that controls which saved payment methods the customer sheet + * displays by filtering to only show payment methods with an {@code allow_redisplay} value + * that is present in this list. + * + *

If not specified, defaults to ["always"]. In order to display all saved + * payment methods, specify ["always", "limited", + * "unspecified"]. + */ + @SerializedName("payment_method_allow_redisplay_filters") + List paymentMethodAllowRedisplayFilters; + + /** + * Controls whether the customer sheet displays the option to remove a saved payment + * method." + * + *

Allowing buyers to remove their saved payment methods impacts subscriptions that + * depend on that payment method. Removing the payment method detaches the {@code + * customer} object from that PaymentMethod. + * + *

One of {@code disabled}, or {@code enabled}. + */ + @SerializedName("payment_method_remove") + String paymentMethodRemove; + } + } + + /** + * This hash contains whether the mobile payment element is enabled and the features it + * supports. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class MobilePaymentElement extends StripeObject { + /** Whether the mobile payment element is enabled. */ + @SerializedName("enabled") + Boolean enabled; + + /** This hash defines whether the mobile payment element supports certain features. */ + @SerializedName("features") + Features features; + + /** This hash contains the features the mobile payment element supports. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Features extends StripeObject { + /** + * A list of {@code + * allow_redisplay} values that controls which saved payment methods the mobile payment + * element displays by filtering to only show payment methods with an {@code + * allow_redisplay} value that is present in this list. + * + *

If not specified, defaults to ["always"]. In order to display all saved + * payment methods, specify ["always", "limited", + * "unspecified"]. + */ + @SerializedName("payment_method_allow_redisplay_filters") + List paymentMethodAllowRedisplayFilters; + + /** + * Controls whether or not the mobile payment element shows saved payment methods. + * + *

One of {@code disabled}, or {@code enabled}. + */ + @SerializedName("payment_method_redisplay") + String paymentMethodRedisplay; + + /** + * Controls whether the mobile payment element displays the option to remove a saved payment + * method." + * + *

Allowing buyers to remove their saved payment methods impacts subscriptions that + * depend on that payment method. Removing the payment method detaches the {@code + * customer} object from that PaymentMethod. + * + *

One of {@code disabled}, or {@code enabled}. + */ + @SerializedName("payment_method_remove") + String paymentMethodRemove; + + /** + * Controls whether the mobile payment element displays a checkbox offering to save a new + * payment method. + * + *

If a customer checks the box, the {@code + * allow_redisplay} value on the PaymentMethod is set to {@code 'always'} at + * confirmation time. For PaymentIntents, the {@code + * setup_future_usage} value is also set to the value defined in {@code + * payment_method_save_usage}. + * + *

One of {@code disabled}, or {@code enabled}. + */ + @SerializedName("payment_method_save") + String paymentMethodSave; + + /** + * Allows overriding the value of allow_override when saving a new payment method when + * payment_method_save is set to disabled. Use values: "always", + * "limited", or "unspecified". + * + *

If not specified, defaults to {@code nil} (no override value). + * + *

One of {@code always}, {@code limited}, or {@code unspecified}. + */ + @SerializedName("payment_method_save_allow_redisplay_override") + String paymentMethodSaveAllowRedisplayOverride; + } + } + /** This hash contains whether the Payment Element is enabled and the features it supports. */ @Getter @Setter @@ -277,6 +430,51 @@ public static class PricingTable extends StripeObject { @SerializedName("enabled") Boolean enabled; } + + /** This hash contains whether the Tax ID Element is enabled and the features it supports. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class TaxIdElement extends StripeObject { + /** Whether the Tax ID Element is enabled. */ + @SerializedName("enabled") + Boolean enabled; + + /** This hash defines whether the Tax ID Element supports certain features. */ + @SerializedName("features") + Features features; + + /** This hash defines whether the Tax ID Element supports certain features. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Features extends StripeObject { + /** + * Controls whether the Tax ID Element displays saved tax IDs for the customer. This + * parameter defaults to {@code disabled}. + * + *

When enabled, the Tax ID Element will show existing tax IDs associated with the + * customer, allowing them to select from previously saved tax identification numbers. + * + *

One of {@code disabled}, or {@code enabled}. + */ + @SerializedName("tax_id_redisplay") + String taxIdRedisplay; + + /** + * Controls whether the Tax ID Element allows merchants to save new tax IDs for their + * customer. This parameter defaults to {@code disabled}. + * + *

When enabled, customers can enter and save new tax identification numbers during the + * payment flow, which will be stored securely and associated with their customer object for + * future use. + * + *

One of {@code disabled}, or {@code enabled}. + */ + @SerializedName("tax_id_save") + String taxIdSave; + } + } } @Override diff --git a/src/main/java/com/stripe/model/File.java b/src/main/java/com/stripe/model/File.java index 39b436af72a..f11567995b5 100644 --- a/src/main/java/com/stripe/model/File.java +++ b/src/main/java/com/stripe/model/File.java @@ -70,8 +70,9 @@ public class File extends ApiResource implements HasId { * document_provider_identity_document}, {@code finance_report_run}, {@code * financial_account_statement}, {@code identity_document}, {@code * identity_document_downloadable}, {@code issuing_regulatory_reporting}, {@code pci_document}, - * {@code selfie}, {@code sigma_scheduled_query}, {@code tax_document_user_upload}, {@code - * terminal_android_apk}, or {@code terminal_reader_splashscreen}. + * {@code platform_terms_of_service}, {@code selfie}, {@code sigma_scheduled_query}, {@code + * tax_document_user_upload}, {@code terminal_android_apk}, or {@code + * terminal_reader_splashscreen}. */ @SerializedName("purpose") String purpose; diff --git a/src/main/java/com/stripe/model/PaymentAttemptRecord.java b/src/main/java/com/stripe/model/PaymentAttemptRecord.java index fe50e661329..d597a64705a 100644 --- a/src/main/java/com/stripe/model/PaymentAttemptRecord.java +++ b/src/main/java/com/stripe/model/PaymentAttemptRecord.java @@ -1666,7 +1666,7 @@ public static class Crypto extends StripeObject { /** * The blockchain network that the transaction was sent on. * - *

One of {@code base}, {@code ethereum}, or {@code polygon}. + *

One of {@code base}, {@code ethereum}, {@code polygon}, or {@code solana}. */ @SerializedName("network") String network; @@ -2721,7 +2721,11 @@ public static class Qris extends StripeObject {} @Getter @Setter @EqualsAndHashCode(callSuper = false) - public static class Rechnung extends StripeObject {} + public static class Rechnung extends StripeObject { + /** Payment portal URL. */ + @SerializedName("payment_portal_url") + String paymentPortalUrl; + } /** * For more details about RevolutPay, please refer to the { + /** Allocated Funds configuration for this PaymentIntent. */ + @SerializedName("allocated_funds") + AllocatedFunds allocatedFunds; + /** * Amount intended to be collected by this PaymentIntent. A positive integer representing how much * to charge in the smallest currency @@ -1701,6 +1705,19 @@ public PaymentIntent verifyMicrodeposits( return getResponseGetter().request(request, PaymentIntent.class); } + /** + * For more details about AllocatedFunds, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class AllocatedFunds extends StripeObject { + /** Allocated Funds configuration for this PaymentIntent. */ + @SerializedName("enabled") + Boolean enabled; + } + /** * For more details about AmountDetails, please refer to the API Reference. @@ -6399,6 +6416,7 @@ public void setDestinationObject(Account expandableObject) { @Override public void setResponseGetter(StripeResponseGetter responseGetter) { super.setResponseGetter(responseGetter); + trySetResponseGetter(allocatedFunds, responseGetter); trySetResponseGetter(amountDetails, responseGetter); trySetResponseGetter(application, responseGetter); trySetResponseGetter(automaticPaymentMethods, responseGetter); diff --git a/src/main/java/com/stripe/model/PaymentIntentAmountDetailsLineItem.java b/src/main/java/com/stripe/model/PaymentIntentAmountDetailsLineItem.java index ade4d8858f7..6ca0911d59a 100644 --- a/src/main/java/com/stripe/model/PaymentIntentAmountDetailsLineItem.java +++ b/src/main/java/com/stripe/model/PaymentIntentAmountDetailsLineItem.java @@ -164,6 +164,12 @@ public static class Klarna extends StripeObject { @SerializedName("product_url") String productUrl; + + @SerializedName("reference") + String reference; + + @SerializedName("subscription_reference") + String subscriptionReference; } /** diff --git a/src/main/java/com/stripe/model/PaymentLink.java b/src/main/java/com/stripe/model/PaymentLink.java index ba8c5adeca8..dcd309e9b9b 100644 --- a/src/main/java/com/stripe/model/PaymentLink.java +++ b/src/main/java/com/stripe/model/PaymentLink.java @@ -145,6 +145,9 @@ public class PaymentLink extends ApiResource implements HasId, MetadataStore metadata; + @SerializedName("name_collection") + NameCollection nameCollection; + /** * String representing the object's type. Objects of the same type share the same value. * @@ -1040,6 +1043,61 @@ public static class RenderingOptions extends StripeObject { } } + /** + * For more details about NameCollection, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class NameCollection extends StripeObject { + @SerializedName("business") + Business business; + + @SerializedName("individual") + Individual individual; + + /** + * For more details about Business, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Business extends StripeObject { + /** Indicates whether business name collection is enabled for the payment link. */ + @SerializedName("enabled") + Boolean enabled; + + /** + * Whether the customer is required to complete the field before checking out. Defaults to + * {@code false}. + */ + @SerializedName("optional") + Boolean optional; + } + + /** + * For more details about Individual, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Individual extends StripeObject { + /** Indicates whether individual name collection is enabled for the payment link. */ + @SerializedName("enabled") + Boolean enabled; + + /** + * Whether the customer is required to complete the field before checking out. Defaults to + * {@code false}. + */ + @SerializedName("optional") + Boolean optional; + } + } + /** * For more details about OptionalItem, please refer to the API Reference. @@ -1433,6 +1491,7 @@ public void setResponseGetter(StripeResponseGetter responseGetter) { trySetResponseGetter(customText, responseGetter); trySetResponseGetter(invoiceCreation, responseGetter); trySetResponseGetter(lineItems, responseGetter); + trySetResponseGetter(nameCollection, responseGetter); trySetResponseGetter(onBehalfOf, responseGetter); trySetResponseGetter(paymentIntentData, responseGetter); trySetResponseGetter(phoneNumberCollection, responseGetter); diff --git a/src/main/java/com/stripe/model/PaymentMethod.java b/src/main/java/com/stripe/model/PaymentMethod.java index 411372eca02..a6d71b56ef3 100644 --- a/src/main/java/com/stripe/model/PaymentMethod.java +++ b/src/main/java/com/stripe/model/PaymentMethod.java @@ -100,6 +100,9 @@ public class PaymentMethod extends ApiResource implements HasId, MetadataStore

One of {@code acss_debit}, {@code affirm}, {@code afterpay_clearpay}, {@code alipay}, {@code * alma}, {@code amazon_pay}, {@code au_becs_debit}, {@code bacs_debit}, {@code bancontact}, * {@code billie}, {@code blik}, {@code boleto}, {@code card}, {@code card_present}, {@code - * cashapp}, {@code crypto}, {@code customer_balance}, {@code eps}, {@code fpx}, {@code giropay}, - * {@code gopay}, {@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 + * cashapp}, {@code crypto}, {@code custom}, {@code customer_balance}, {@code eps}, {@code fpx}, + * {@code giropay}, {@code gopay}, {@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 * nz_bank_account}, {@code oxxo}, {@code p24}, {@code pay_by_bank}, {@code payco}, {@code * paynow}, {@code paypal}, {@code paypay}, {@code payto}, {@code pix}, {@code promptpay}, {@code * qris}, {@code rechnung}, {@code revolut_pay}, {@code samsung_pay}, {@code satispay}, {@code @@ -1919,6 +1922,44 @@ public static class Cashapp extends StripeObject { @EqualsAndHashCode(callSuper = false) public static class Crypto extends StripeObject {} + /** + * For more details about Custom, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Custom extends StripeObject { + /** Display name of the Dashboard-only CustomPaymentMethodType. */ + @SerializedName("display_name") + String displayName; + + /** Contains information about the Dashboard-only CustomPaymentMethodType logo. */ + @SerializedName("logo") + Logo logo; + + /** ID of the Dashboard-only CustomPaymentMethodType. Not expandable. */ + @SerializedName("type") + String type; + + /** + * For more details about Logo, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Logo extends StripeObject { + /** Content type of the Dashboard-only CustomPaymentMethodType logo. */ + @SerializedName("content_type") + String contentType; + + /** URL of the Dashboard-only CustomPaymentMethodType logo. */ + @SerializedName("url") + String url; + } + } + /** * For more details about CustomerBalance, please refer to the API Reference. @@ -2905,6 +2946,7 @@ public void setResponseGetter(StripeResponseGetter responseGetter) { trySetResponseGetter(cardPresent, responseGetter); trySetResponseGetter(cashapp, responseGetter); trySetResponseGetter(crypto, responseGetter); + trySetResponseGetter(custom, responseGetter); trySetResponseGetter(customer, responseGetter); trySetResponseGetter(customerBalance, responseGetter); trySetResponseGetter(eps, responseGetter); diff --git a/src/main/java/com/stripe/model/PaymentMethodConfiguration.java b/src/main/java/com/stripe/model/PaymentMethodConfiguration.java index e95ad0a208b..73e5c3c2d20 100644 --- a/src/main/java/com/stripe/model/PaymentMethodConfiguration.java +++ b/src/main/java/com/stripe/model/PaymentMethodConfiguration.java @@ -108,6 +108,9 @@ public class PaymentMethodConfiguration extends ApiResource implements HasId { @SerializedName("cashapp") Cashapp cashapp; + @SerializedName("crypto") + Crypto crypto; + @SerializedName("customer_balance") CustomerBalance customerBalance; @@ -169,6 +172,9 @@ public class PaymentMethodConfiguration extends ApiResource implements HasId { @SerializedName("livemode") Boolean livemode; + @SerializedName("mb_way") + MbWay mbWay; + @SerializedName("mobilepay") Mobilepay mobilepay; @@ -1233,6 +1239,57 @@ public static class DisplayPreference extends StripeObject { } } + /** + * For more details about Crypto, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Crypto 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 CustomerBalance, please refer to the API Reference. @@ -1998,6 +2055,57 @@ public static class DisplayPreference extends StripeObject { } } + /** + * For more details about MbWay, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class MbWay 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 Mobilepay, please refer to the API * Reference. @@ -3343,6 +3451,7 @@ public void setResponseGetter(StripeResponseGetter responseGetter) { trySetResponseGetter(card, responseGetter); trySetResponseGetter(cartesBancaires, responseGetter); trySetResponseGetter(cashapp, responseGetter); + trySetResponseGetter(crypto, responseGetter); trySetResponseGetter(customerBalance, responseGetter); trySetResponseGetter(eps, responseGetter); trySetResponseGetter(fpx, responseGetter); @@ -3358,6 +3467,7 @@ public void setResponseGetter(StripeResponseGetter responseGetter) { trySetResponseGetter(konbini, responseGetter); trySetResponseGetter(krCard, responseGetter); trySetResponseGetter(link, responseGetter); + trySetResponseGetter(mbWay, responseGetter); trySetResponseGetter(mobilepay, responseGetter); trySetResponseGetter(multibanco, responseGetter); trySetResponseGetter(naverPay, responseGetter); diff --git a/src/main/java/com/stripe/model/PaymentRecord.java b/src/main/java/com/stripe/model/PaymentRecord.java index 4a59357d016..660d2fd45d7 100644 --- a/src/main/java/com/stripe/model/PaymentRecord.java +++ b/src/main/java/com/stripe/model/PaymentRecord.java @@ -15,6 +15,7 @@ import com.stripe.param.PaymentRecordReportPaymentAttemptInformationalParams; import com.stripe.param.PaymentRecordReportPaymentAttemptParams; import com.stripe.param.PaymentRecordReportPaymentParams; +import com.stripe.param.PaymentRecordReportRefundParams; import com.stripe.param.PaymentRecordRetrieveParams; import java.util.List; import java.util.Map; @@ -423,6 +424,44 @@ public PaymentRecord reportPaymentAttemptInformational( return getResponseGetter().request(request, PaymentRecord.class); } + /** Report that the most recent payment attempt on the specified Payment Record was refunded. */ + public PaymentRecord reportRefund(Map params) throws StripeException { + return reportRefund(params, (RequestOptions) null); + } + + /** Report that the most recent payment attempt on the specified Payment Record was refunded. */ + public PaymentRecord reportRefund(Map params, RequestOptions options) + throws StripeException { + String path = + String.format( + "/v1/payment_records/%s/report_refund", ApiResource.urlEncodeId(this.getId())); + ApiRequest request = + new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.POST, path, params, options); + return getResponseGetter().request(request, PaymentRecord.class); + } + + /** Report that the most recent payment attempt on the specified Payment Record was refunded. */ + public PaymentRecord reportRefund(PaymentRecordReportRefundParams params) throws StripeException { + return reportRefund(params, (RequestOptions) null); + } + + /** Report that the most recent payment attempt on the specified Payment Record was refunded. */ + public PaymentRecord reportRefund(PaymentRecordReportRefundParams params, RequestOptions options) + throws StripeException { + String path = + String.format( + "/v1/payment_records/%s/report_refund", ApiResource.urlEncodeId(this.getId())); + ApiResource.checkNullTypedParams(path, params); + ApiRequest request = + new ApiRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + path, + ApiRequestParams.paramsToMap(params), + options); + return getResponseGetter().request(request, PaymentRecord.class); + } + /** Retrieves a Payment Record with the given ID. */ public static PaymentRecord retrieve(String id) throws StripeException { return retrieve(id, (Map) null, (RequestOptions) null); @@ -1921,7 +1960,7 @@ public static class Crypto extends StripeObject { /** * The blockchain network that the transaction was sent on. * - *

One of {@code base}, {@code ethereum}, or {@code polygon}. + *

One of {@code base}, {@code ethereum}, {@code polygon}, or {@code solana}. */ @SerializedName("network") String network; @@ -2975,7 +3014,11 @@ public static class Qris extends StripeObject {} @Getter @Setter @EqualsAndHashCode(callSuper = false) - public static class Rechnung extends StripeObject {} + public static class Rechnung extends StripeObject { + /** Payment portal URL. */ + @SerializedName("payment_portal_url") + String paymentPortalUrl; + } /** * For more details about RevolutPay, please refer to the By requesting a reversal through {@code /v1/payouts/:id/reverse}, you confirm that the * authorized signatory of the selected bank account authorizes the debit on the bank account and @@ -586,8 +586,8 @@ public Payout reverse() throws StripeException { /** * Reverses a payout by debiting the destination bank account. At this time, you can only reverse - * payouts for connected accounts to US bank accounts. If the payout is manual and in the {@code - * pending} status, use {@code /v1/payouts/:id/cancel} instead. + * payouts for connected accounts to US and Canadian bank accounts. If the payout is manual and in + * the {@code pending} status, use {@code /v1/payouts/:id/cancel} instead. * *

By requesting a reversal through {@code /v1/payouts/:id/reverse}, you confirm that the * authorized signatory of the selected bank account authorizes the debit on the bank account and @@ -599,8 +599,8 @@ public Payout reverse(RequestOptions options) throws StripeException { /** * Reverses a payout by debiting the destination bank account. At this time, you can only reverse - * payouts for connected accounts to US bank accounts. If the payout is manual and in the {@code - * pending} status, use {@code /v1/payouts/:id/cancel} instead. + * payouts for connected accounts to US and Canadian bank accounts. If the payout is manual and in + * the {@code pending} status, use {@code /v1/payouts/:id/cancel} instead. * *

By requesting a reversal through {@code /v1/payouts/:id/reverse}, you confirm that the * authorized signatory of the selected bank account authorizes the debit on the bank account and @@ -612,8 +612,8 @@ public Payout reverse(Map params) throws StripeException { /** * Reverses a payout by debiting the destination bank account. At this time, you can only reverse - * payouts for connected accounts to US bank accounts. If the payout is manual and in the {@code - * pending} status, use {@code /v1/payouts/:id/cancel} instead. + * payouts for connected accounts to US and Canadian bank accounts. If the payout is manual and in + * the {@code pending} status, use {@code /v1/payouts/:id/cancel} instead. * *

By requesting a reversal through {@code /v1/payouts/:id/reverse}, you confirm that the * authorized signatory of the selected bank account authorizes the debit on the bank account and @@ -628,8 +628,8 @@ public Payout reverse(Map params, RequestOptions options) throws /** * Reverses a payout by debiting the destination bank account. At this time, you can only reverse - * payouts for connected accounts to US bank accounts. If the payout is manual and in the {@code - * pending} status, use {@code /v1/payouts/:id/cancel} instead. + * payouts for connected accounts to US and Canadian bank accounts. If the payout is manual and in + * the {@code pending} status, use {@code /v1/payouts/:id/cancel} instead. * *

By requesting a reversal through {@code /v1/payouts/:id/reverse}, you confirm that the * authorized signatory of the selected bank account authorizes the debit on the bank account and @@ -641,8 +641,8 @@ public Payout reverse(PayoutReverseParams params) throws StripeException { /** * Reverses a payout by debiting the destination bank account. At this time, you can only reverse - * payouts for connected accounts to US bank accounts. If the payout is manual and in the {@code - * pending} status, use {@code /v1/payouts/:id/cancel} instead. + * payouts for connected accounts to US and Canadian bank accounts. If the payout is manual and in + * the {@code pending} status, use {@code /v1/payouts/:id/cancel} instead. * *

By requesting a reversal through {@code /v1/payouts/:id/reverse}, you confirm that the * authorized signatory of the selected bank account authorizes the debit on the bank account and diff --git a/src/main/java/com/stripe/model/Person.java b/src/main/java/com/stripe/model/Person.java index 3ddbfc54c9e..41fac02ab2e 100644 --- a/src/main/java/com/stripe/model/Person.java +++ b/src/main/java/com/stripe/model/Person.java @@ -568,29 +568,29 @@ public static class Errors extends StripeObject { * invalid_url_website_incomplete_terms_and_conditions}, {@code * invalid_url_website_incomplete_under_construction}, {@code invalid_url_website_other}, * {@code invalid_value_other}, {@code unsupported_business_type}, {@code - * verification_directors_mismatch}, {@code verification_document_address_mismatch}, {@code - * verification_document_address_missing}, {@code verification_document_corrupt}, {@code - * verification_document_country_not_supported}, {@code - * verification_document_directors_mismatch}, {@code verification_document_dob_mismatch}, - * {@code verification_document_duplicate_type}, {@code verification_document_expired}, {@code - * verification_document_failed_copy}, {@code verification_document_failed_greyscale}, {@code - * verification_document_failed_other}, {@code verification_document_failed_test_mode}, {@code - * verification_document_fraudulent}, {@code verification_document_id_number_mismatch}, {@code - * verification_document_id_number_missing}, {@code verification_document_incomplete}, {@code - * verification_document_invalid}, {@code verification_document_issue_or_expiry_date_missing}, - * {@code verification_document_manipulated}, {@code verification_document_missing_back}, - * {@code verification_document_missing_front}, {@code verification_document_name_mismatch}, - * {@code verification_document_name_missing}, {@code - * verification_document_nationality_mismatch}, {@code verification_document_not_readable}, - * {@code verification_document_not_signed}, {@code verification_document_not_uploaded}, - * {@code verification_document_photo_mismatch}, {@code verification_document_too_large}, - * {@code verification_document_type_not_supported}, {@code - * verification_extraneous_directors}, {@code verification_failed_address_match}, {@code - * verification_failed_authorizer_authority}, {@code verification_failed_business_iec_number}, - * {@code verification_failed_document_match}, {@code verification_failed_id_number_match}, - * {@code verification_failed_keyed_identity}, {@code verification_failed_keyed_match}, {@code - * verification_failed_name_match}, {@code verification_failed_other}, {@code - * verification_failed_representative_authority}, {@code + * verification_data_not_found}, {@code verification_directors_mismatch}, {@code + * verification_document_address_mismatch}, {@code verification_document_address_missing}, + * {@code verification_document_corrupt}, {@code verification_document_country_not_supported}, + * {@code verification_document_directors_mismatch}, {@code + * verification_document_dob_mismatch}, {@code verification_document_duplicate_type}, {@code + * verification_document_expired}, {@code verification_document_failed_copy}, {@code + * verification_document_failed_greyscale}, {@code verification_document_failed_other}, {@code + * verification_document_failed_test_mode}, {@code verification_document_fraudulent}, {@code + * verification_document_id_number_mismatch}, {@code verification_document_id_number_missing}, + * {@code verification_document_incomplete}, {@code verification_document_invalid}, {@code + * verification_document_issue_or_expiry_date_missing}, {@code + * verification_document_manipulated}, {@code verification_document_missing_back}, {@code + * verification_document_missing_front}, {@code verification_document_name_mismatch}, {@code + * verification_document_name_missing}, {@code verification_document_nationality_mismatch}, + * {@code verification_document_not_readable}, {@code verification_document_not_signed}, + * {@code verification_document_not_uploaded}, {@code verification_document_photo_mismatch}, + * {@code verification_document_too_large}, {@code verification_document_type_not_supported}, + * {@code verification_extraneous_directors}, {@code verification_failed_address_match}, + * {@code verification_failed_authorizer_authority}, {@code + * verification_failed_business_iec_number}, {@code verification_failed_document_match}, + * {@code verification_failed_id_number_match}, {@code verification_failed_keyed_identity}, + * {@code verification_failed_keyed_match}, {@code verification_failed_name_match}, {@code + * verification_failed_other}, {@code verification_failed_representative_authority}, {@code * verification_failed_residential_address}, {@code verification_failed_tax_id_match}, {@code * verification_failed_tax_id_not_issued}, {@code * verification_legal_entity_structure_mismatch}, {@code verification_missing_directors}, @@ -785,29 +785,29 @@ public static class Errors extends StripeObject { * invalid_url_website_incomplete_terms_and_conditions}, {@code * invalid_url_website_incomplete_under_construction}, {@code invalid_url_website_other}, * {@code invalid_value_other}, {@code unsupported_business_type}, {@code - * verification_directors_mismatch}, {@code verification_document_address_mismatch}, {@code - * verification_document_address_missing}, {@code verification_document_corrupt}, {@code - * verification_document_country_not_supported}, {@code - * verification_document_directors_mismatch}, {@code verification_document_dob_mismatch}, - * {@code verification_document_duplicate_type}, {@code verification_document_expired}, {@code - * verification_document_failed_copy}, {@code verification_document_failed_greyscale}, {@code - * verification_document_failed_other}, {@code verification_document_failed_test_mode}, {@code - * verification_document_fraudulent}, {@code verification_document_id_number_mismatch}, {@code - * verification_document_id_number_missing}, {@code verification_document_incomplete}, {@code - * verification_document_invalid}, {@code verification_document_issue_or_expiry_date_missing}, - * {@code verification_document_manipulated}, {@code verification_document_missing_back}, - * {@code verification_document_missing_front}, {@code verification_document_name_mismatch}, - * {@code verification_document_name_missing}, {@code - * verification_document_nationality_mismatch}, {@code verification_document_not_readable}, - * {@code verification_document_not_signed}, {@code verification_document_not_uploaded}, - * {@code verification_document_photo_mismatch}, {@code verification_document_too_large}, - * {@code verification_document_type_not_supported}, {@code - * verification_extraneous_directors}, {@code verification_failed_address_match}, {@code - * verification_failed_authorizer_authority}, {@code verification_failed_business_iec_number}, - * {@code verification_failed_document_match}, {@code verification_failed_id_number_match}, - * {@code verification_failed_keyed_identity}, {@code verification_failed_keyed_match}, {@code - * verification_failed_name_match}, {@code verification_failed_other}, {@code - * verification_failed_representative_authority}, {@code + * verification_data_not_found}, {@code verification_directors_mismatch}, {@code + * verification_document_address_mismatch}, {@code verification_document_address_missing}, + * {@code verification_document_corrupt}, {@code verification_document_country_not_supported}, + * {@code verification_document_directors_mismatch}, {@code + * verification_document_dob_mismatch}, {@code verification_document_duplicate_type}, {@code + * verification_document_expired}, {@code verification_document_failed_copy}, {@code + * verification_document_failed_greyscale}, {@code verification_document_failed_other}, {@code + * verification_document_failed_test_mode}, {@code verification_document_fraudulent}, {@code + * verification_document_id_number_mismatch}, {@code verification_document_id_number_missing}, + * {@code verification_document_incomplete}, {@code verification_document_invalid}, {@code + * verification_document_issue_or_expiry_date_missing}, {@code + * verification_document_manipulated}, {@code verification_document_missing_back}, {@code + * verification_document_missing_front}, {@code verification_document_name_mismatch}, {@code + * verification_document_name_missing}, {@code verification_document_nationality_mismatch}, + * {@code verification_document_not_readable}, {@code verification_document_not_signed}, + * {@code verification_document_not_uploaded}, {@code verification_document_photo_mismatch}, + * {@code verification_document_too_large}, {@code verification_document_type_not_supported}, + * {@code verification_extraneous_directors}, {@code verification_failed_address_match}, + * {@code verification_failed_authorizer_authority}, {@code + * verification_failed_business_iec_number}, {@code verification_failed_document_match}, + * {@code verification_failed_id_number_match}, {@code verification_failed_keyed_identity}, + * {@code verification_failed_keyed_match}, {@code verification_failed_name_match}, {@code + * verification_failed_other}, {@code verification_failed_representative_authority}, {@code * verification_failed_residential_address}, {@code verification_failed_tax_id_match}, {@code * verification_failed_tax_id_not_issued}, {@code * verification_legal_entity_structure_mismatch}, {@code verification_missing_directors}, diff --git a/src/main/java/com/stripe/model/Refund.java b/src/main/java/com/stripe/model/Refund.java index 23f4a47472e..6d4b6bd2052 100644 --- a/src/main/java/com/stripe/model/Refund.java +++ b/src/main/java/com/stripe/model/Refund.java @@ -625,6 +625,9 @@ public static class DestinationDetails extends StripeObject { @SerializedName("cashapp") Cashapp cashapp; + @SerializedName("crypto") + Crypto crypto; + @SerializedName("customer_cash_balance") CustomerCashBalance customerCashBalance; @@ -844,6 +847,19 @@ public static class Card extends StripeObject { @EqualsAndHashCode(callSuper = false) public static class Cashapp extends StripeObject {} + /** + * For more details about Crypto, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Crypto extends StripeObject { + /** The transaction hash of the refund. */ + @SerializedName("reference") + String reference; + } + /** * For more details about CustomerCashBalance, please refer to the API Reference. diff --git a/src/main/java/com/stripe/model/SetupIntent.java b/src/main/java/com/stripe/model/SetupIntent.java index 107b7af3aba..8eb7285e2cb 100644 --- a/src/main/java/com/stripe/model/SetupIntent.java +++ b/src/main/java/com/stripe/model/SetupIntent.java @@ -122,6 +122,10 @@ public class SetupIntent extends ApiResource implements HasId, MetadataStore excludedPaymentMethodTypes; + /** * Indicates the directions of money movement for which this payment method is intended to be * used. diff --git a/src/main/java/com/stripe/model/StripeError.java b/src/main/java/com/stripe/model/StripeError.java index b15a46f540f..557dd25acde 100644 --- a/src/main/java/com/stripe/model/StripeError.java +++ b/src/main/java/com/stripe/model/StripeError.java @@ -75,12 +75,12 @@ public class StripeError extends StripeObject { * {@code payment_intent_invalid_parameter}, {@code * payment_intent_konbini_rejected_confirmation_number}, {@code payment_intent_mandate_invalid}, * {@code payment_intent_payment_attempt_expired}, {@code payment_intent_payment_attempt_failed}, - * {@code payment_intent_unexpected_state}, {@code payment_method_bank_account_already_verified}, - * {@code payment_method_bank_account_blocked}, {@code - * payment_method_billing_details_address_missing}, {@code payment_method_configuration_failures}, - * {@code payment_method_currency_mismatch}, {@code payment_method_customer_decline}, {@code - * payment_method_invalid_parameter}, {@code payment_method_invalid_parameter_testmode}, {@code - * payment_method_microdeposit_failed}, {@code + * {@code payment_intent_rate_limit_exceeded}, {@code payment_intent_unexpected_state}, {@code + * payment_method_bank_account_already_verified}, {@code payment_method_bank_account_blocked}, + * {@code payment_method_billing_details_address_missing}, {@code + * payment_method_configuration_failures}, {@code payment_method_currency_mismatch}, {@code + * payment_method_customer_decline}, {@code payment_method_invalid_parameter}, {@code + * payment_method_invalid_parameter_testmode}, {@code payment_method_microdeposit_failed}, {@code * payment_method_microdeposit_verification_amounts_invalid}, {@code * payment_method_microdeposit_verification_amounts_mismatch}, {@code * payment_method_microdeposit_verification_attempts_exceeded}, {@code diff --git a/src/main/java/com/stripe/model/Transfer.java b/src/main/java/com/stripe/model/Transfer.java index 32757ddf6ec..8d6539754a0 100644 --- a/src/main/java/com/stripe/model/Transfer.java +++ b/src/main/java/com/stripe/model/Transfer.java @@ -48,6 +48,14 @@ public class Transfer extends ApiResource @SerializedName("amount_reversed") Long amountReversed; + @SerializedName("application_fee") + @Getter(lombok.AccessLevel.NONE) + @Setter(lombok.AccessLevel.NONE) + ExpandableField applicationFee; + + @SerializedName("application_fee_amount") + Long applicationFeeAmount; + /** Balance transaction that describes the impact of this transfer on your account balance. */ @SerializedName("balance_transaction") @Getter(lombok.AccessLevel.NONE) @@ -152,6 +160,25 @@ public class Transfer extends ApiResource @SerializedName("transfer_group") String transferGroup; + /** Get ID of expandable {@code applicationFee} object. */ + public String getApplicationFee() { + return (this.applicationFee != null) ? this.applicationFee.getId() : null; + } + + public void setApplicationFee(String id) { + this.applicationFee = ApiResource.setExpandableFieldId(id, this.applicationFee); + } + + /** Get expanded {@code applicationFee}. */ + public ApplicationFee getApplicationFeeObject() { + return (this.applicationFee != null) ? this.applicationFee.getExpanded() : null; + } + + public void setApplicationFeeObject(ApplicationFee expandableObject) { + this.applicationFee = + new ExpandableField(expandableObject.getId(), expandableObject); + } + /** Get ID of expandable {@code balanceTransaction} object. */ public String getBalanceTransaction() { return (this.balanceTransaction != null) ? this.balanceTransaction.getId() : null; @@ -433,6 +460,7 @@ public Transfer update(TransferUpdateParams params, RequestOptions options) @Override public void setResponseGetter(StripeResponseGetter responseGetter) { super.setResponseGetter(responseGetter); + trySetResponseGetter(applicationFee, responseGetter); trySetResponseGetter(balanceTransaction, responseGetter); trySetResponseGetter(destination, responseGetter); trySetResponseGetter(destinationPayment, responseGetter); diff --git a/src/main/java/com/stripe/model/billing/analytics/MeterUsageRow.java b/src/main/java/com/stripe/model/billing/analytics/MeterUsageRow.java index 20629016ffa..7270f64ec00 100644 --- a/src/main/java/com/stripe/model/billing/analytics/MeterUsageRow.java +++ b/src/main/java/com/stripe/model/billing/analytics/MeterUsageRow.java @@ -46,6 +46,10 @@ public class MeterUsageRow extends StripeObject implements HasId { @SerializedName("starts_at") Long startsAt; + /** A set of key-value pairs representing the tenants of the meter usage. */ + @SerializedName("tenants") + Map tenants; + /** The aggregated meter usage value for the specified bucket. */ @SerializedName("value") BigDecimal value; diff --git a/src/main/java/com/stripe/model/billingportal/Configuration.java b/src/main/java/com/stripe/model/billingportal/Configuration.java index 3a3b455e6d8..917bad09db9 100644 --- a/src/main/java/com/stripe/model/billingportal/Configuration.java +++ b/src/main/java/com/stripe/model/billingportal/Configuration.java @@ -24,7 +24,11 @@ import lombok.Getter; import lombok.Setter; -/** A portal configuration describes the functionality and behavior of a portal session. */ +/** + * A portal configuration describes the functionality and behavior you embed in a portal session. + * Related guide: Configure the + * customer portal. + */ @Getter @Setter @EqualsAndHashCode(callSuper = false) diff --git a/src/main/java/com/stripe/model/checkout/Session.java b/src/main/java/com/stripe/model/checkout/Session.java index 2111bb98b5d..04b3a7e7c2e 100644 --- a/src/main/java/com/stripe/model/checkout/Session.java +++ b/src/main/java/com/stripe/model/checkout/Session.java @@ -2239,6 +2239,9 @@ public static class PaymentMethodOptions extends StripeObject { @SerializedName("swish") Swish swish; + @SerializedName("twint") + Twint twint; + @SerializedName("us_bank_account") UsBankAccount usBankAccount; @@ -4072,6 +4075,39 @@ public static class Swish extends StripeObject { String reference; } + /** + * For more details about Twint, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Twint extends StripeObject { + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + *

If you provide a Customer with the PaymentIntent, you can use this parameter to attach the payment method to the + * Customer after the PaymentIntent is confirmed and the customer completes any required + * actions. If you don't provide a Customer, you can still attach the payment method to a + * Customer after the transaction completes. + * + *

If the payment method is {@code card_present} and isn't a digital wallet, Stripe creates + * and attaches a generated_card + * payment method representing the card to the Customer instead. + * + *

When processing card payments, Stripe uses {@code setup_future_usage} to help you comply + * with regional legislation and network rules, such as SCA. + * + *

Equal to {@code none}. + */ + @SerializedName("setup_future_usage") + String setupFutureUsage; + } + /** * For more details about UsBankAccount, please refer to the API Reference. diff --git a/src/main/java/com/stripe/model/financialconnections/Account.java b/src/main/java/com/stripe/model/financialconnections/Account.java index ee458fefc50..143a5aa6f3e 100644 --- a/src/main/java/com/stripe/model/financialconnections/Account.java +++ b/src/main/java/com/stripe/model/financialconnections/Account.java @@ -424,7 +424,7 @@ public static com.stripe.model.financialconnections.Account retrieve( /** * Subscribes to periodic refreshes of data associated with a Financial Connections {@code - * Account}. + * Account}. When the account status is active, data is typically refreshed once a day. */ public com.stripe.model.financialconnections.Account subscribe(Map params) throws StripeException { @@ -433,7 +433,7 @@ public com.stripe.model.financialconnections.Account subscribe(Map params, RequestOptions options) throws StripeException { @@ -449,7 +449,7 @@ public com.stripe.model.financialconnections.Account subscribe( /** * Subscribes to periodic refreshes of data associated with a Financial Connections {@code - * Account}. + * Account}. When the account status is active, data is typically refreshed once a day. */ public com.stripe.model.financialconnections.Account subscribe(AccountSubscribeParams params) throws StripeException { @@ -458,7 +458,7 @@ public com.stripe.model.financialconnections.Account subscribe(AccountSubscribeP /** * Subscribes to periodic refreshes of data associated with a Financial Connections {@code - * Account}. + * Account}. When the account status is active, data is typically refreshed once a day. */ public com.stripe.model.financialconnections.Account subscribe( AccountSubscribeParams params, RequestOptions options) throws StripeException { diff --git a/src/main/java/com/stripe/model/tax/Registration.java b/src/main/java/com/stripe/model/tax/Registration.java index 9c69492f51e..0e5aa4d4ea7 100644 --- a/src/main/java/com/stripe/model/tax/Registration.java +++ b/src/main/java/com/stripe/model/tax/Registration.java @@ -522,6 +522,9 @@ public static class CountryOptions extends StripeObject { @SerializedName("tr") Tr tr; + @SerializedName("tw") + Tw tw; + @SerializedName("tz") Tz tz; @@ -2784,6 +2787,23 @@ public static class Tr extends StripeObject { String type; } + /** + * For more details about Tw, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Tw extends StripeObject { + /** + * Type of registration in {@code country}. + * + *

Equal to {@code simplified}. + */ + @SerializedName("type") + String type; + } + /** * For more details about Tz, please refer to the API * Reference. diff --git a/src/main/java/com/stripe/model/terminal/Configuration.java b/src/main/java/com/stripe/model/terminal/Configuration.java index ea48c740df3..c01718d5c1e 100644 --- a/src/main/java/com/stripe/model/terminal/Configuration.java +++ b/src/main/java/com/stripe/model/terminal/Configuration.java @@ -444,6 +444,9 @@ public static class Tipping extends StripeObject { @SerializedName("gbp") Gbp gbp; + @SerializedName("gip") + Gip gip; + @SerializedName("hkd") Hkd hkd; @@ -696,6 +699,30 @@ public static class Gbp extends StripeObject { Long smartTipThreshold; } + /** + * For more details about Gip, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Gip 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 Hkd, please refer to the API * Reference. diff --git a/src/main/java/com/stripe/model/terminal/Reader.java b/src/main/java/com/stripe/model/terminal/Reader.java index 1d0abd080f1..ccf2c064aee 100644 --- a/src/main/java/com/stripe/model/terminal/Reader.java +++ b/src/main/java/com/stripe/model/terminal/Reader.java @@ -84,6 +84,10 @@ public class Reader extends ApiResource implements HasId, MetadataStore @SerializedName("label") String label; + /** The last time this reader reported to Stripe backend. */ + @SerializedName("last_seen_at") + Long lastSeenAt; + /** * Has the value {@code true} if the object exists in live mode or the value {@code false} if the * object exists in test mode. @@ -145,22 +149,38 @@ public void setLocationObject(Location expandableObject) { this.location = new ExpandableField(expandableObject.getId(), expandableObject); } - /** Cancels the current reader action. */ + /** + * Cancels the current reader action. See Programmatic + * Cancellation for more details. + */ public Reader cancelAction() throws StripeException { return cancelAction((Map) null, (RequestOptions) null); } - /** Cancels the current reader action. */ + /** + * Cancels the current reader action. See Programmatic + * Cancellation for more details. + */ public Reader cancelAction(RequestOptions options) throws StripeException { return cancelAction((Map) null, options); } - /** Cancels the current reader action. */ + /** + * Cancels the current reader action. See Programmatic + * Cancellation for more details. + */ public Reader cancelAction(Map params) throws StripeException { return cancelAction(params, (RequestOptions) null); } - /** Cancels the current reader action. */ + /** + * Cancels the current reader action. See Programmatic + * Cancellation for more details. + */ public Reader cancelAction(Map params, RequestOptions options) throws StripeException { String path = @@ -171,12 +191,20 @@ public Reader cancelAction(Map params, RequestOptions options) return getResponseGetter().request(request, Reader.class); } - /** Cancels the current reader action. */ + /** + * Cancels the current reader action. See Programmatic + * Cancellation for more details. + */ public Reader cancelAction(ReaderCancelActionParams params) throws StripeException { return cancelAction(params, (RequestOptions) null); } - /** Cancels the current reader action. */ + /** + * Cancels the current reader action. See Programmatic + * Cancellation for more details. + */ public Reader cancelAction(ReaderCancelActionParams params, RequestOptions options) throws StripeException { String path = @@ -193,12 +221,20 @@ public Reader cancelAction(ReaderCancelActionParams params, RequestOptions optio return getResponseGetter().request(request, Reader.class); } - /** Initiates an input collection flow on a Reader. */ + /** + * Initiates an input + * collection flow on a Reader to display input forms and collect information from your + * customers. + */ public Reader collectInputs(Map params) throws StripeException { return collectInputs(params, (RequestOptions) null); } - /** Initiates an input collection flow on a Reader. */ + /** + * Initiates an input + * collection flow on a Reader to display input forms and collect information from your + * customers. + */ public Reader collectInputs(Map params, RequestOptions options) throws StripeException { String path = @@ -209,12 +245,20 @@ public Reader collectInputs(Map params, RequestOptions options) return getResponseGetter().request(request, Reader.class); } - /** Initiates an input collection flow on a Reader. */ + /** + * Initiates an input + * collection flow on a Reader to display input forms and collect information from your + * customers. + */ public Reader collectInputs(ReaderCollectInputsParams params) throws StripeException { return collectInputs(params, (RequestOptions) null); } - /** Initiates an input collection flow on a Reader. */ + /** + * Initiates an input + * collection flow on a Reader to display input forms and collect information from your + * customers. + */ public Reader collectInputs(ReaderCollectInputsParams params, RequestOptions options) throws StripeException { String path = @@ -233,7 +277,9 @@ public Reader collectInputs(ReaderCollectInputsParams params, RequestOptions opt /** * Initiates a payment flow on a Reader and updates the PaymentIntent with card details before - * manual confirmation. + * manual confirmation. See Collecting + * a Payment method for more details. */ public Reader collectPaymentMethod(Map params) throws StripeException { return collectPaymentMethod(params, (RequestOptions) null); @@ -241,7 +287,9 @@ public Reader collectPaymentMethod(Map params) throws StripeExce /** * Initiates a payment flow on a Reader and updates the PaymentIntent with card details before - * manual confirmation. + * manual confirmation. See Collecting + * a Payment method for more details. */ public Reader collectPaymentMethod(Map params, RequestOptions options) throws StripeException { @@ -256,7 +304,9 @@ public Reader collectPaymentMethod(Map params, RequestOptions op /** * Initiates a payment flow on a Reader and updates the PaymentIntent with card details before - * manual confirmation. + * manual confirmation. See Collecting + * a Payment method for more details. */ public Reader collectPaymentMethod(ReaderCollectPaymentMethodParams params) throws StripeException { @@ -265,7 +315,9 @@ public Reader collectPaymentMethod(ReaderCollectPaymentMethodParams params) /** * Initiates a payment flow on a Reader and updates the PaymentIntent with card details before - * manual confirmation. + * manual confirmation. See Collecting + * a Payment method for more details. */ public Reader collectPaymentMethod( ReaderCollectPaymentMethodParams params, RequestOptions options) throws StripeException { @@ -284,12 +336,20 @@ public Reader collectPaymentMethod( return getResponseGetter().request(request, Reader.class); } - /** Finalizes a payment on a Reader. */ + /** + * Finalizes a payment on a Reader. See Confirming + * a Payment for more details. + */ public Reader confirmPaymentIntent(Map params) throws StripeException { return confirmPaymentIntent(params, (RequestOptions) null); } - /** Finalizes a payment on a Reader. */ + /** + * Finalizes a payment on a Reader. See Confirming + * a Payment for more details. + */ public Reader confirmPaymentIntent(Map params, RequestOptions options) throws StripeException { String path = @@ -301,13 +361,21 @@ public Reader confirmPaymentIntent(Map params, RequestOptions op return getResponseGetter().request(request, Reader.class); } - /** Finalizes a payment on a Reader. */ + /** + * Finalizes a payment on a Reader. See Confirming + * a Payment for more details. + */ public Reader confirmPaymentIntent(ReaderConfirmPaymentIntentParams params) throws StripeException { return confirmPaymentIntent(params, (RequestOptions) null); } - /** Finalizes a payment on a Reader. */ + /** + * Finalizes a payment on a Reader. See Confirming + * a Payment for more details. + */ public Reader confirmPaymentIntent( ReaderConfirmPaymentIntentParams params, RequestOptions options) throws StripeException { String path = @@ -416,12 +484,20 @@ public static ReaderCollection list(ReaderListParams params, RequestOptions opti return getGlobalResponseGetter().request(request, ReaderCollection.class); } - /** Initiates a payment flow on a Reader. */ + /** + * Initiates a payment flow on a Reader. See process + * the payment for more details. + */ public Reader processPaymentIntent(Map params) throws StripeException { return processPaymentIntent(params, (RequestOptions) null); } - /** Initiates a payment flow on a Reader. */ + /** + * Initiates a payment flow on a Reader. See process + * the payment for more details. + */ public Reader processPaymentIntent(Map params, RequestOptions options) throws StripeException { String path = @@ -433,13 +509,21 @@ public Reader processPaymentIntent(Map params, RequestOptions op return getResponseGetter().request(request, Reader.class); } - /** Initiates a payment flow on a Reader. */ + /** + * Initiates a payment flow on a Reader. See process + * the payment for more details. + */ public Reader processPaymentIntent(ReaderProcessPaymentIntentParams params) throws StripeException { return processPaymentIntent(params, (RequestOptions) null); } - /** Initiates a payment flow on a Reader. */ + /** + * Initiates a payment flow on a Reader. See process + * the payment for more details. + */ public Reader processPaymentIntent( ReaderProcessPaymentIntentParams params, RequestOptions options) throws StripeException { String path = @@ -457,12 +541,20 @@ public Reader processPaymentIntent( return getResponseGetter().request(request, Reader.class); } - /** Initiates a setup intent flow on a Reader. */ + /** + * Initiates a SetupIntent flow on a Reader. See Save + * directly without charging for more details. + */ public Reader processSetupIntent(Map params) throws StripeException { return processSetupIntent(params, (RequestOptions) null); } - /** Initiates a setup intent flow on a Reader. */ + /** + * Initiates a SetupIntent flow on a Reader. See Save + * directly without charging for more details. + */ public Reader processSetupIntent(Map params, RequestOptions options) throws StripeException { String path = @@ -473,12 +565,20 @@ public Reader processSetupIntent(Map params, RequestOptions opti return getResponseGetter().request(request, Reader.class); } - /** Initiates a setup intent flow on a Reader. */ + /** + * Initiates a SetupIntent flow on a Reader. See Save + * directly without charging for more details. + */ public Reader processSetupIntent(ReaderProcessSetupIntentParams params) throws StripeException { return processSetupIntent(params, (RequestOptions) null); } - /** Initiates a setup intent flow on a Reader. */ + /** + * Initiates a SetupIntent flow on a Reader. See Save + * directly without charging for more details. + */ public Reader processSetupIntent(ReaderProcessSetupIntentParams params, RequestOptions options) throws StripeException { String path = @@ -495,22 +595,38 @@ public Reader processSetupIntent(ReaderProcessSetupIntentParams params, RequestO return getResponseGetter().request(request, Reader.class); } - /** Initiates a refund on a Reader. */ + /** + * Initiates an in-person refund on a Reader. See Refund + * an Interac Payment for more details. + */ public Reader refundPayment() throws StripeException { return refundPayment((Map) null, (RequestOptions) null); } - /** Initiates a refund on a Reader. */ + /** + * Initiates an in-person refund on a Reader. See Refund + * an Interac Payment for more details. + */ public Reader refundPayment(RequestOptions options) throws StripeException { return refundPayment((Map) null, options); } - /** Initiates a refund on a Reader. */ + /** + * Initiates an in-person refund on a Reader. See Refund + * an Interac Payment for more details. + */ public Reader refundPayment(Map params) throws StripeException { return refundPayment(params, (RequestOptions) null); } - /** Initiates a refund on a Reader. */ + /** + * Initiates an in-person refund on a Reader. See Refund + * an Interac Payment for more details. + */ public Reader refundPayment(Map params, RequestOptions options) throws StripeException { String path = @@ -521,12 +637,20 @@ public Reader refundPayment(Map params, RequestOptions options) return getResponseGetter().request(request, Reader.class); } - /** Initiates a refund on a Reader. */ + /** + * Initiates an in-person refund on a Reader. See Refund + * an Interac Payment for more details. + */ public Reader refundPayment(ReaderRefundPaymentParams params) throws StripeException { return refundPayment(params, (RequestOptions) null); } - /** Initiates a refund on a Reader. */ + /** + * Initiates an in-person refund on a Reader. See Refund + * an Interac Payment for more details. + */ public Reader refundPayment(ReaderRefundPaymentParams params, RequestOptions options) throws StripeException { String path = @@ -577,12 +701,18 @@ public static Reader retrieve(String reader, ReaderRetrieveParams params, Reques return getGlobalResponseGetter().request(request, Reader.class); } - /** Sets reader display to show cart details. */ + /** + * Sets the reader display to show cart details. + */ public Reader setReaderDisplay(Map params) throws StripeException { return setReaderDisplay(params, (RequestOptions) null); } - /** Sets reader display to show cart details. */ + /** + * Sets the reader display to show cart details. + */ public Reader setReaderDisplay(Map params, RequestOptions options) throws StripeException { String path = @@ -593,12 +723,18 @@ public Reader setReaderDisplay(Map params, RequestOptions option return getResponseGetter().request(request, Reader.class); } - /** Sets reader display to show cart details. */ + /** + * Sets the reader display to show cart details. + */ public Reader setReaderDisplay(ReaderSetReaderDisplayParams params) throws StripeException { return setReaderDisplay(params, (RequestOptions) null); } - /** Sets reader display to show cart details. */ + /** + * Sets the reader display to show cart details. + */ public Reader setReaderDisplay(ReaderSetReaderDisplayParams params, RequestOptions options) throws StripeException { String path = @@ -866,20 +1002,16 @@ public static class Selection extends StripeObject implements HasId { @Setter @EqualsAndHashCode(callSuper = false) public static class Choice extends StripeObject implements HasId { - /** The id to be selected. */ + /** The identifier for the selected choice. Maximum 50 characters. */ @Getter(onMethod_ = {@Override}) @SerializedName("id") String id; - /** - * The button style for the choice - * - *

One of {@code primary}, or {@code secondary}. - */ + /** The button style for the choice. Can be {@code primary} or {@code secondary}. */ @SerializedName("style") String style; - /** The text to be selected. */ + /** The text to be selected. Maximum 30 characters. */ @SerializedName("text") String text; } @@ -910,27 +1042,19 @@ public static class Text extends StripeObject { @Setter @EqualsAndHashCode(callSuper = false) public static class Toggle extends StripeObject { - /** - * The toggle's default value - * - *

One of {@code disabled}, or {@code enabled}. - */ + /** The toggle's default value. Can be {@code enabled} or {@code disabled}. */ @SerializedName("default_value") String defaultValue; - /** The toggle's description text. */ + /** The toggle's description text. Maximum 50 characters. */ @SerializedName("description") String description; - /** The toggle's title text. */ + /** The toggle's title text. Maximum 50 characters. */ @SerializedName("title") String title; - /** - * The toggle's collected value - * - *

One of {@code disabled}, or {@code enabled}. - */ + /** The toggle's collected value. Can be {@code enabled} or {@code disabled}. */ @SerializedName("value") String value; } @@ -1344,12 +1468,13 @@ public static class RefundPaymentConfig extends StripeObject { @Setter @EqualsAndHashCode(callSuper = false) public static class SetReaderDisplay extends StripeObject { - /** Cart object to be displayed by the reader. */ + /** Cart object to be displayed by the reader, including line items, amounts, and currency. */ @SerializedName("cart") Cart cart; /** - * Type of information to be displayed by the reader. + * Type of information to be displayed by the reader. Only {@code cart} is currently + * supported. * *

Equal to {@code cart}. */ diff --git a/src/main/java/com/stripe/model/v2/core/Account.java b/src/main/java/com/stripe/model/v2/core/Account.java index c9d42a753e9..6a3b68f6f01 100644 --- a/src/main/java/com/stripe/model/v2/core/Account.java +++ b/src/main/java/com/stripe/model/v2/core/Account.java @@ -4280,6 +4280,61 @@ public static class Storer extends StripeObject { @SerializedName("capabilities") Capabilities capabilities; + /** List of high-risk activities the business is involved in. */ + @SerializedName("high_risk_activities") + List highRiskActivities; + + /** An explanation of the high risk activities that the business performs. */ + @SerializedName("high_risk_activities_description") + String highRiskActivitiesDescription; + + /** Description of the money services offered by the business. */ + @SerializedName("money_services_description") + String moneyServicesDescription; + + /** Does the business operate in any prohibited countries. */ + @SerializedName("operates_in_prohibited_countries") + Boolean operatesInProhibitedCountries; + + /** Does the business participate in any regulated activity. */ + @SerializedName("participates_in_regulated_activity") + Boolean participatesInRegulatedActivity; + + /** + * Primary purpose of the stored funds. + * + *

One of {@code charitable_donations}, {@code ecommerce_retail_payments}, {@code + * investment_purposes}, {@code other}, {@code payments_to_friends_or_family_abroad}, {@code + * payroll}, {@code personal_or_living_expenses}, {@code protect_wealth}, {@code + * purchase_goods_and_services}, {@code receive_payments_for_goods_and_services}, {@code + * tax_optimization}, {@code third_party_money_transmission}, or {@code treasury_management}. + */ + @SerializedName("purpose_of_funds") + String purposeOfFunds; + + /** Description of the purpose of the stored funds. */ + @SerializedName("purpose_of_funds_description") + String purposeOfFundsDescription; + + /** Details of the regulated activity if the business participates in one. */ + @SerializedName("regulated_activity") + RegulatedActivity regulatedActivity; + + /** + * The source of funds for the business, e.g. profits, income, venture capital, etc. + * + *

One of {@code business_loans}, {@code grants}, {@code inter_company_funds}, {@code + * investment_proceeds}, {@code legal_settlement}, {@code owners_capital}, {@code + * pension_retirement}, {@code sales_of_assets}, {@code sales_of_goods_and_services}, {@code + * tax_refund}, {@code third_party_funds}, or {@code treasury_reserves}. + */ + @SerializedName("source_of_funds") + String sourceOfFunds; + + /** Description of the source of funds for the business' account. */ + @SerializedName("source_of_funds_description") + String sourceOfFundsDescription; + /** Capabilities that have been requested on the Storer Configuration. */ @Getter @Setter @@ -4317,6 +4372,10 @@ public static class FinancialAddresses extends StripeObject { @SerializedName("bank_accounts") BankAccounts bankAccounts; + /** Can provision a crypto wallet like financial address to credit a FinancialAccount. */ + @SerializedName("crypto_wallets") + CryptoWallets cryptoWallets; + /** * Can provision a bank-account like financial address (VBAN) to credit/debit a * FinancialAccount. @@ -4377,6 +4436,64 @@ public static class StatusDetail extends StripeObject { String resolution; } } + + /** Can provision a crypto wallet like financial address to credit a FinancialAccount. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class CryptoWallets extends StripeObject { + /** Whether the Capability has been requested. */ + @SerializedName("requested") + Boolean requested; + + /** + * The status of the Capability. + * + *

One of {@code active}, {@code pending}, {@code restricted}, or {@code + * unsupported}. + */ + @SerializedName("status") + String status; + + /** + * Additional details regarding the status of the Capability. {@code status_details} + * will be empty if the Capability's status is {@code active}. + */ + @SerializedName("status_details") + List< + Account.Configuration.Storer.Capabilities.FinancialAddresses.CryptoWallets + .StatusDetail> + statusDetails; + + /** + * For more details about StatusDetail, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class StatusDetail extends StripeObject { + /** + * Machine-readable code explaining the reason for the Capability to be in its current + * status. + * + *

One of {@code determining_status}, {@code requirements_past_due}, {@code + * requirements_pending_verification}, {@code restricted_other}, {@code + * unsupported_business}, {@code unsupported_country}, or {@code + * unsupported_entity_type}. + */ + @SerializedName("code") + String code; + + /** + * Machine-readable code explaining how to make the Capability active. + * + *

One of {@code contact_stripe}, {@code no_resolution}, or {@code provide_info}. + */ + @SerializedName("resolution") + String resolution; + } + } } /** Can hold storage-type funds on Stripe. */ @@ -4392,6 +4509,10 @@ public static class HoldsCurrencies extends StripeObject { @SerializedName("usd") Usd usd; + /** Can hold storage-type funds on Stripe in USDC. */ + @SerializedName("usdc") + Usdc usdc; + /** Can hold storage-type funds on Stripe in GBP. */ @Getter @Setter @@ -4503,6 +4624,62 @@ public static class StatusDetail extends StripeObject { String resolution; } } + + /** Can hold storage-type funds on Stripe in USDC. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Usdc extends StripeObject { + /** Whether the Capability has been requested. */ + @SerializedName("requested") + Boolean requested; + + /** + * The status of the Capability. + * + *

One of {@code active}, {@code pending}, {@code restricted}, or {@code + * unsupported}. + */ + @SerializedName("status") + String status; + + /** + * Additional details regarding the status of the Capability. {@code status_details} + * will be empty if the Capability's status is {@code active}. + */ + @SerializedName("status_details") + List + statusDetails; + + /** + * For more details about StatusDetail, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class StatusDetail extends StripeObject { + /** + * Machine-readable code explaining the reason for the Capability to be in its current + * status. + * + *

One of {@code determining_status}, {@code requirements_past_due}, {@code + * requirements_pending_verification}, {@code restricted_other}, {@code + * unsupported_business}, {@code unsupported_country}, or {@code + * unsupported_entity_type}. + */ + @SerializedName("code") + String code; + + /** + * Machine-readable code explaining how to make the Capability active. + * + *

One of {@code contact_stripe}, {@code no_resolution}, or {@code provide_info}. + */ + @SerializedName("resolution") + String resolution; + } + } } /** Can pull funds from an external source, owned by yourself, to a FinancialAccount. */ @@ -4590,6 +4767,10 @@ public static class OutboundPayments extends StripeObject { @SerializedName("cards") Cards cards; + /** Can send funds from a FinancialAccount to a crypto wallet, owned by someone else. */ + @SerializedName("crypto_wallets") + CryptoWallets cryptoWallets; + /** * Can send funds from a FinancialAccount to another FinancialAccount, owned by someone * else. @@ -4711,6 +4892,64 @@ public static class StatusDetail extends StripeObject { } } + /** Can send funds from a FinancialAccount to a crypto wallet, owned by someone else. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class CryptoWallets extends StripeObject { + /** Whether the Capability has been requested. */ + @SerializedName("requested") + Boolean requested; + + /** + * The status of the Capability. + * + *

One of {@code active}, {@code pending}, {@code restricted}, or {@code + * unsupported}. + */ + @SerializedName("status") + String status; + + /** + * Additional details regarding the status of the Capability. {@code status_details} + * will be empty if the Capability's status is {@code active}. + */ + @SerializedName("status_details") + List< + Account.Configuration.Storer.Capabilities.OutboundPayments.CryptoWallets + .StatusDetail> + statusDetails; + + /** + * For more details about StatusDetail, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class StatusDetail extends StripeObject { + /** + * Machine-readable code explaining the reason for the Capability to be in its current + * status. + * + *

One of {@code determining_status}, {@code requirements_past_due}, {@code + * requirements_pending_verification}, {@code restricted_other}, {@code + * unsupported_business}, {@code unsupported_country}, or {@code + * unsupported_entity_type}. + */ + @SerializedName("code") + String code; + + /** + * Machine-readable code explaining how to make the Capability active. + * + *

One of {@code contact_stripe}, {@code no_resolution}, or {@code provide_info}. + */ + @SerializedName("resolution") + String resolution; + } + } + /** * Can send funds from a FinancialAccount to another FinancialAccount, owned by someone * else. @@ -4782,6 +5021,10 @@ public static class OutboundTransfers extends StripeObject { @SerializedName("bank_accounts") BankAccounts bankAccounts; + /** Can send funds from a FinancialAccount to a crypto wallet, owned by yourself. */ + @SerializedName("crypto_wallets") + CryptoWallets cryptoWallets; + /** * Can send funds from a FinancialAccount to another FinancialAccount, owned by yourself. */ @@ -4846,6 +5089,64 @@ public static class StatusDetail extends StripeObject { } } + /** Can send funds from a FinancialAccount to a crypto wallet, owned by yourself. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class CryptoWallets extends StripeObject { + /** Whether the Capability has been requested. */ + @SerializedName("requested") + Boolean requested; + + /** + * The status of the Capability. + * + *

One of {@code active}, {@code pending}, {@code restricted}, or {@code + * unsupported}. + */ + @SerializedName("status") + String status; + + /** + * Additional details regarding the status of the Capability. {@code status_details} + * will be empty if the Capability's status is {@code active}. + */ + @SerializedName("status_details") + List< + Account.Configuration.Storer.Capabilities.OutboundTransfers.CryptoWallets + .StatusDetail> + statusDetails; + + /** + * For more details about StatusDetail, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class StatusDetail extends StripeObject { + /** + * Machine-readable code explaining the reason for the Capability to be in its current + * status. + * + *

One of {@code determining_status}, {@code requirements_past_due}, {@code + * requirements_pending_verification}, {@code restricted_other}, {@code + * unsupported_business}, {@code unsupported_country}, or {@code + * unsupported_entity_type}. + */ + @SerializedName("code") + String code; + + /** + * Machine-readable code explaining how to make the Capability active. + * + *

One of {@code contact_stripe}, {@code no_resolution}, or {@code provide_info}. + */ + @SerializedName("resolution") + String resolution; + } + } + /** * Can send funds from a FinancialAccount to another FinancialAccount, owned by yourself. */ @@ -4907,6 +5208,38 @@ public static class StatusDetail extends StripeObject { } } } + + /** Details of the regulated activity if the business participates in one. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class RegulatedActivity extends StripeObject { + /** + * A detailed description of the regulated activities the business is licensed to conduct. + */ + @SerializedName("description") + String description; + + /** + * The license number or registration number assigned by the business's primary regulator. + */ + @SerializedName("license_number") + String licenseNumber; + + /** + * The country of the primary regulatory authority that oversees the business's regulated + * activities. + */ + @SerializedName("primary_regulatory_authority_country") + String primaryRegulatoryAuthorityCountry; + + /** + * The name of the primary regulatory authority that oversees the business's regulated + * activities. + */ + @SerializedName("primary_regulatory_authority_name") + String primaryRegulatoryAuthorityName; + } } } @@ -5189,6 +5522,10 @@ public static class TermsOfService extends StripeObject { @SerializedName("card_creator") CardCreator cardCreator; + /** Details on the Account's acceptance of Crypto-storer-specific terms of service. */ + @SerializedName("crypto_storer") + CryptoStorer cryptoStorer; + /** Details on the Account's acceptance of Treasury-specific terms of service. */ @SerializedName("storer") Storer storer; @@ -5843,6 +6180,33 @@ public static class FinancingDisclosures extends StripeObject { } } + /** Details on the Account's acceptance of Crypto-storer-specific terms of service. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class CryptoStorer extends StripeObject { + /** + * The time when the Account's representative accepted the terms of service. Represented + * as a RFC 3339 date & time UTC value in millisecond precision, for example: + * 2022-09-18T13:22:18.123Z. + */ + @SerializedName("date") + Instant date; + + /** + * The IP address from which the Account's representative accepted the terms of service. + */ + @SerializedName("ip") + String ip; + + /** + * The user agent of the browser from which the Account's representative accepted the + * terms of service. + */ + @SerializedName("user_agent") + String userAgent; + } + /** * Details on the Account's acceptance of the Stripe Services @@ -5916,6 +6280,13 @@ public static class BusinessDetails extends StripeObject { @SerializedName("annual_revenue") AnnualRevenue annualRevenue; + /** + * A detailed description of the business's compliance and anti-money laundering controls and + * practices. + */ + @SerializedName("compliance_screening_description") + String complianceScreeningDescription; + /** Documents that may be submitted to satisfy various informational requests. */ @SerializedName("documents") Documents documents; diff --git a/src/main/java/com/stripe/model/v2/moneymanagement/ReceivedCredit.java b/src/main/java/com/stripe/model/v2/moneymanagement/ReceivedCredit.java index 06ad381d4bd..8956aea803b 100644 --- a/src/main/java/com/stripe/model/v2/moneymanagement/ReceivedCredit.java +++ b/src/main/java/com/stripe/model/v2/moneymanagement/ReceivedCredit.java @@ -47,6 +47,10 @@ public class ReceivedCredit extends StripeObject implements HasId { @SerializedName("description") String description; + /** The amount and currency of the original/external credit request. */ + @SerializedName("external_amount") + Amount externalAmount; + /** Financial Account ID on which funds for ReceivedCredit were received. */ @SerializedName("financial_account") String financialAccount; diff --git a/src/main/java/com/stripe/model/v2/moneymanagement/ReceivedDebit.java b/src/main/java/com/stripe/model/v2/moneymanagement/ReceivedDebit.java index 11a6218f3d3..c23eef84c87 100644 --- a/src/main/java/com/stripe/model/v2/moneymanagement/ReceivedDebit.java +++ b/src/main/java/com/stripe/model/v2/moneymanagement/ReceivedDebit.java @@ -37,6 +37,10 @@ public class ReceivedDebit extends StripeObject implements HasId { @SerializedName("description") String description; + /** The amount and currency of the original/external debit request. */ + @SerializedName("external_amount") + Amount externalAmount; + /** Financial Account on which funds for ReceivedDebit were debited. */ @SerializedName("financial_account") String financialAccount; diff --git a/src/main/java/com/stripe/param/AccountCreateParams.java b/src/main/java/com/stripe/param/AccountCreateParams.java index 5fd61455fb6..1022f5aa67e 100644 --- a/src/main/java/com/stripe/param/AccountCreateParams.java +++ b/src/main/java/com/stripe/param/AccountCreateParams.java @@ -8551,6 +8551,13 @@ public static class Company { @SerializedName("registration_number") String registrationNumber; + /** + * This hash is used to attest that the representative is authorized to act as the + * representative of their legal entity. + */ + @SerializedName("representative_declaration") + RepresentativeDeclaration representativeDeclaration; + /** * The category identifying the legal structure of the company or legal entity. See Business @@ -8600,6 +8607,7 @@ private Company( String phone, Object registrationDate, String registrationNumber, + RepresentativeDeclaration representativeDeclaration, ApiRequestParams.EnumParam structure, String taxId, String taxIdRegistrar, @@ -8623,6 +8631,7 @@ private Company( this.phone = phone; this.registrationDate = registrationDate; this.registrationNumber = registrationNumber; + this.representativeDeclaration = representativeDeclaration; this.structure = structure; this.taxId = taxId; this.taxIdRegistrar = taxIdRegistrar; @@ -8671,6 +8680,8 @@ public static class Builder { private String registrationNumber; + private RepresentativeDeclaration representativeDeclaration; + private ApiRequestParams.EnumParam structure; private String taxId; @@ -8702,6 +8713,7 @@ public AccountCreateParams.Company build() { this.phone, this.registrationDate, this.registrationNumber, + this.representativeDeclaration, this.structure, this.taxId, this.taxIdRegistrar, @@ -8895,6 +8907,16 @@ public Builder setRegistrationNumber(String registrationNumber) { return this; } + /** + * This hash is used to attest that the representative is authorized to act as the + * representative of their legal entity. + */ + public Builder setRepresentativeDeclaration( + AccountCreateParams.Company.RepresentativeDeclaration representativeDeclaration) { + this.representativeDeclaration = representativeDeclaration; + return this; + } + /** * The category identifying the legal structure of the company or legal entity. See Business @@ -9745,6 +9767,111 @@ public Builder setYear(Long year) { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class RepresentativeDeclaration { + /** The Unix timestamp marking when the representative 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 representative declaration attestation was made. */ + @SerializedName("ip") + String ip; + + /** + * The user agent of the browser from which the representative declaration attestation was + * made. + */ + @SerializedName("user_agent") + String userAgent; + + private RepresentativeDeclaration( + 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.RepresentativeDeclaration build() { + return new AccountCreateParams.Company.RepresentativeDeclaration( + this.date, this.extraParams, this.ip, this.userAgent); + } + + /** The Unix timestamp marking when the representative 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.RepresentativeDeclaration#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.RepresentativeDeclaration#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 representative declaration attestation was made. */ + public Builder setIp(String ip) { + this.ip = ip; + return this; + } + + /** + * The user agent of the browser from which the representative declaration attestation was + * made. + */ + public Builder setUserAgent(String userAgent) { + this.userAgent = userAgent; + return this; + } + } + } + @Getter @EqualsAndHashCode(callSuper = false) public static class Verification { diff --git a/src/main/java/com/stripe/param/AccountUpdateParams.java b/src/main/java/com/stripe/param/AccountUpdateParams.java index c24be6d00bf..b8f79658e1e 100644 --- a/src/main/java/com/stripe/param/AccountUpdateParams.java +++ b/src/main/java/com/stripe/param/AccountUpdateParams.java @@ -8648,6 +8648,13 @@ public static class Company { @SerializedName("registration_number") Object registrationNumber; + /** + * This hash is used to attest that the representative is authorized to act as the + * representative of their legal entity. + */ + @SerializedName("representative_declaration") + RepresentativeDeclaration representativeDeclaration; + /** * The category identifying the legal structure of the company or legal entity. See Business @@ -8697,6 +8704,7 @@ private Company( Object phone, Object registrationDate, Object registrationNumber, + RepresentativeDeclaration representativeDeclaration, ApiRequestParams.EnumParam structure, Object taxId, Object taxIdRegistrar, @@ -8720,6 +8728,7 @@ private Company( this.phone = phone; this.registrationDate = registrationDate; this.registrationNumber = registrationNumber; + this.representativeDeclaration = representativeDeclaration; this.structure = structure; this.taxId = taxId; this.taxIdRegistrar = taxIdRegistrar; @@ -8768,6 +8777,8 @@ public static class Builder { private Object registrationNumber; + private RepresentativeDeclaration representativeDeclaration; + private ApiRequestParams.EnumParam structure; private Object taxId; @@ -8799,6 +8810,7 @@ public AccountUpdateParams.Company build() { this.phone, this.registrationDate, this.registrationNumber, + this.representativeDeclaration, this.structure, this.taxId, this.taxIdRegistrar, @@ -9040,6 +9052,16 @@ public Builder setRegistrationNumber(EmptyParam registrationNumber) { return this; } + /** + * This hash is used to attest that the representative is authorized to act as the + * representative of their legal entity. + */ + public Builder setRepresentativeDeclaration( + AccountUpdateParams.Company.RepresentativeDeclaration representativeDeclaration) { + this.representativeDeclaration = representativeDeclaration; + return this; + } + /** * The category identifying the legal structure of the company or legal entity. See Business @@ -10070,6 +10092,126 @@ public Builder setYear(Long year) { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class RepresentativeDeclaration { + /** The Unix timestamp marking when the representative 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 representative declaration attestation was made. */ + @SerializedName("ip") + Object ip; + + /** + * The user agent of the browser from which the representative declaration attestation was + * made. + */ + @SerializedName("user_agent") + Object userAgent; + + private RepresentativeDeclaration( + 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.RepresentativeDeclaration build() { + return new AccountUpdateParams.Company.RepresentativeDeclaration( + this.date, this.extraParams, this.ip, this.userAgent); + } + + /** The Unix timestamp marking when the representative 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.RepresentativeDeclaration#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.RepresentativeDeclaration#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 representative declaration attestation was made. */ + public Builder setIp(String ip) { + this.ip = ip; + return this; + } + + /** The IP address from which the representative declaration attestation was made. */ + public Builder setIp(EmptyParam ip) { + this.ip = ip; + return this; + } + + /** + * The user agent of the browser from which the representative declaration attestation was + * made. + */ + public Builder setUserAgent(String userAgent) { + this.userAgent = userAgent; + return this; + } + + /** + * The user agent of the browser from which the representative declaration attestation was + * made. + */ + public Builder setUserAgent(EmptyParam userAgent) { + this.userAgent = userAgent; + return this; + } + } + } + @Getter @EqualsAndHashCode(callSuper = false) public static class Verification { diff --git a/src/main/java/com/stripe/param/CustomerListPaymentMethodsParams.java b/src/main/java/com/stripe/param/CustomerListPaymentMethodsParams.java index e16d8e81610..fe47391d356 100644 --- a/src/main/java/com/stripe/param/CustomerListPaymentMethodsParams.java +++ b/src/main/java/com/stripe/param/CustomerListPaymentMethodsParams.java @@ -285,6 +285,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("crypto") CRYPTO("crypto"), + @SerializedName("custom") + CUSTOM("custom"), + @SerializedName("customer_balance") CUSTOMER_BALANCE("customer_balance"), diff --git a/src/main/java/com/stripe/param/CustomerPaymentMethodListParams.java b/src/main/java/com/stripe/param/CustomerPaymentMethodListParams.java index 6423cc1287b..430a8956192 100644 --- a/src/main/java/com/stripe/param/CustomerPaymentMethodListParams.java +++ b/src/main/java/com/stripe/param/CustomerPaymentMethodListParams.java @@ -285,6 +285,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("crypto") CRYPTO("crypto"), + @SerializedName("custom") + CUSTOM("custom"), + @SerializedName("customer_balance") CUSTOMER_BALANCE("customer_balance"), diff --git a/src/main/java/com/stripe/param/CustomerSessionCreateParams.java b/src/main/java/com/stripe/param/CustomerSessionCreateParams.java index 315f12ca54c..a7738272279 100644 --- a/src/main/java/com/stripe/param/CustomerSessionCreateParams.java +++ b/src/main/java/com/stripe/param/CustomerSessionCreateParams.java @@ -156,6 +156,10 @@ public static class Components { @SerializedName("buy_button") BuyButton buyButton; + /** Configuration for the customer sheet. */ + @SerializedName("customer_sheet") + CustomerSheet customerSheet; + /** * 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 @@ -165,6 +169,10 @@ public static class Components { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; + /** Configuration for the mobile payment element. */ + @SerializedName("mobile_payment_element") + MobilePaymentElement mobilePaymentElement; + /** Configuration for the Payment Element. */ @SerializedName("payment_element") PaymentElement paymentElement; @@ -173,15 +181,25 @@ public static class Components { @SerializedName("pricing_table") PricingTable pricingTable; + /** Configuration for the Tax ID Element. */ + @SerializedName("tax_id_element") + TaxIdElement taxIdElement; + private Components( BuyButton buyButton, + CustomerSheet customerSheet, Map extraParams, + MobilePaymentElement mobilePaymentElement, PaymentElement paymentElement, - PricingTable pricingTable) { + PricingTable pricingTable, + TaxIdElement taxIdElement) { this.buyButton = buyButton; + this.customerSheet = customerSheet; this.extraParams = extraParams; + this.mobilePaymentElement = mobilePaymentElement; this.paymentElement = paymentElement; this.pricingTable = pricingTable; + this.taxIdElement = taxIdElement; } public static Builder builder() { @@ -191,16 +209,28 @@ public static Builder builder() { public static class Builder { private BuyButton buyButton; + private CustomerSheet customerSheet; + private Map extraParams; + private MobilePaymentElement mobilePaymentElement; + private PaymentElement paymentElement; private PricingTable pricingTable; + private TaxIdElement taxIdElement; + /** Finalize and obtain parameter instance from this builder. */ public CustomerSessionCreateParams.Components build() { return new CustomerSessionCreateParams.Components( - this.buyButton, this.extraParams, this.paymentElement, this.pricingTable); + this.buyButton, + this.customerSheet, + this.extraParams, + this.mobilePaymentElement, + this.paymentElement, + this.pricingTable, + this.taxIdElement); } /** Configuration for buy button. */ @@ -209,6 +239,13 @@ public Builder setBuyButton(CustomerSessionCreateParams.Components.BuyButton buy return this; } + /** Configuration for the customer sheet. */ + public Builder setCustomerSheet( + CustomerSessionCreateParams.Components.CustomerSheet customerSheet) { + this.customerSheet = customerSheet; + 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 @@ -235,6 +272,13 @@ public Builder putAllExtraParam(Map map) { return this; } + /** Configuration for the mobile payment element. */ + public Builder setMobilePaymentElement( + CustomerSessionCreateParams.Components.MobilePaymentElement mobilePaymentElement) { + this.mobilePaymentElement = mobilePaymentElement; + return this; + } + /** Configuration for the Payment Element. */ public Builder setPaymentElement( CustomerSessionCreateParams.Components.PaymentElement paymentElement) { @@ -248,6 +292,13 @@ public Builder setPricingTable( this.pricingTable = pricingTable; return this; } + + /** Configuration for the Tax ID Element. */ + public Builder setTaxIdElement( + CustomerSessionCreateParams.Components.TaxIdElement taxIdElement) { + this.taxIdElement = taxIdElement; + return this; + } } @Getter @@ -275,49 +326,750 @@ public static Builder builder() { return new Builder(); } - public static class Builder { - private Boolean enabled; + public static class Builder { + private Boolean enabled; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public CustomerSessionCreateParams.Components.BuyButton build() { + return new CustomerSessionCreateParams.Components.BuyButton( + this.enabled, this.extraParams); + } + + /** Required. Whether the buy button 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 CustomerSessionCreateParams.Components.BuyButton#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 CustomerSessionCreateParams.Components.BuyButton#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 + @EqualsAndHashCode(callSuper = false) + public static class CustomerSheet { + /** Required. Whether the customer sheet 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; + + /** This hash defines whether the customer sheet supports certain features. */ + @SerializedName("features") + Features features; + + private CustomerSheet(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 CustomerSessionCreateParams.Components.CustomerSheet build() { + return new CustomerSessionCreateParams.Components.CustomerSheet( + this.enabled, this.extraParams, this.features); + } + + /** Required. Whether the customer sheet 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 CustomerSessionCreateParams.Components.CustomerSheet#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 CustomerSessionCreateParams.Components.CustomerSheet#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** This hash defines whether the customer sheet supports certain features. */ + public Builder setFeatures( + CustomerSessionCreateParams.Components.CustomerSheet.Features features) { + this.features = features; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + 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; + + /** + * A list of {@code + * allow_redisplay} values that controls which saved payment methods the customer sheet + * displays by filtering to only show payment methods with an {@code allow_redisplay} value + * that is present in this list. + * + *

If not specified, defaults to ["always"]. In order to display all saved + * payment methods, specify ["always", "limited", + * "unspecified"]. + */ + @SerializedName("payment_method_allow_redisplay_filters") + List< + CustomerSessionCreateParams.Components.CustomerSheet.Features + .PaymentMethodAllowRedisplayFilter> + paymentMethodAllowRedisplayFilters; + + /** + * Controls whether the customer sheet displays the option to remove a saved payment + * method." + * + *

Allowing buyers to remove their saved payment methods impacts subscriptions that + * depend on that payment method. Removing the payment method detaches the {@code + * customer} object from that PaymentMethod. + */ + @SerializedName("payment_method_remove") + PaymentMethodRemove paymentMethodRemove; + + private Features( + Map extraParams, + List< + CustomerSessionCreateParams.Components.CustomerSheet.Features + .PaymentMethodAllowRedisplayFilter> + paymentMethodAllowRedisplayFilters, + PaymentMethodRemove paymentMethodRemove) { + this.extraParams = extraParams; + this.paymentMethodAllowRedisplayFilters = paymentMethodAllowRedisplayFilters; + this.paymentMethodRemove = paymentMethodRemove; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private List< + CustomerSessionCreateParams.Components.CustomerSheet.Features + .PaymentMethodAllowRedisplayFilter> + paymentMethodAllowRedisplayFilters; + + private PaymentMethodRemove paymentMethodRemove; + + /** Finalize and obtain parameter instance from this builder. */ + public CustomerSessionCreateParams.Components.CustomerSheet.Features build() { + return new CustomerSessionCreateParams.Components.CustomerSheet.Features( + this.extraParams, + this.paymentMethodAllowRedisplayFilters, + this.paymentMethodRemove); + } + + /** + * 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 + * CustomerSessionCreateParams.Components.CustomerSheet.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 + * CustomerSessionCreateParams.Components.CustomerSheet.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; + } + + /** + * Add an element to `paymentMethodAllowRedisplayFilters` list. A list is initialized for + * the first `add/addAll` call, and subsequent calls adds additional elements to the + * original list. See {@link + * CustomerSessionCreateParams.Components.CustomerSheet.Features#paymentMethodAllowRedisplayFilters} + * for the field documentation. + */ + public Builder addPaymentMethodAllowRedisplayFilter( + CustomerSessionCreateParams.Components.CustomerSheet.Features + .PaymentMethodAllowRedisplayFilter + element) { + if (this.paymentMethodAllowRedisplayFilters == null) { + this.paymentMethodAllowRedisplayFilters = new ArrayList<>(); + } + this.paymentMethodAllowRedisplayFilters.add(element); + return this; + } + + /** + * Add all elements to `paymentMethodAllowRedisplayFilters` list. A list is initialized + * for the first `add/addAll` call, and subsequent calls adds additional elements to the + * original list. See {@link + * CustomerSessionCreateParams.Components.CustomerSheet.Features#paymentMethodAllowRedisplayFilters} + * for the field documentation. + */ + public Builder addAllPaymentMethodAllowRedisplayFilter( + List< + CustomerSessionCreateParams.Components.CustomerSheet.Features + .PaymentMethodAllowRedisplayFilter> + elements) { + if (this.paymentMethodAllowRedisplayFilters == null) { + this.paymentMethodAllowRedisplayFilters = new ArrayList<>(); + } + this.paymentMethodAllowRedisplayFilters.addAll(elements); + return this; + } + + /** + * Controls whether the customer sheet displays the option to remove a saved payment + * method." + * + *

Allowing buyers to remove their saved payment methods impacts subscriptions that + * depend on that payment method. Removing the payment method detaches the {@code + * customer} object from that PaymentMethod. + */ + public Builder setPaymentMethodRemove( + CustomerSessionCreateParams.Components.CustomerSheet.Features.PaymentMethodRemove + paymentMethodRemove) { + this.paymentMethodRemove = paymentMethodRemove; + return this; + } + } + + public enum PaymentMethodAllowRedisplayFilter implements ApiRequestParams.EnumParam { + @SerializedName("always") + ALWAYS("always"), + + @SerializedName("limited") + LIMITED("limited"), + + @SerializedName("unspecified") + UNSPECIFIED("unspecified"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + PaymentMethodAllowRedisplayFilter(String value) { + this.value = value; + } + } + + public enum PaymentMethodRemove implements ApiRequestParams.EnumParam { + @SerializedName("disabled") + DISABLED("disabled"), + + @SerializedName("enabled") + ENABLED("enabled"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + PaymentMethodRemove(String value) { + this.value = value; + } + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class MobilePaymentElement { + /** Required. Whether the mobile payment element 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; + + /** This hash defines whether the mobile payment element supports certain features. */ + @SerializedName("features") + Features features; + + private MobilePaymentElement( + 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 CustomerSessionCreateParams.Components.MobilePaymentElement build() { + return new CustomerSessionCreateParams.Components.MobilePaymentElement( + this.enabled, this.extraParams, this.features); + } + + /** Required. Whether the mobile payment element 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 CustomerSessionCreateParams.Components.MobilePaymentElement#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 CustomerSessionCreateParams.Components.MobilePaymentElement#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** This hash defines whether the mobile payment element supports certain features. */ + public Builder setFeatures( + CustomerSessionCreateParams.Components.MobilePaymentElement.Features features) { + this.features = features; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + 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; + + /** + * A list of {@code + * allow_redisplay} values that controls which saved payment methods the mobile payment + * element displays by filtering to only show payment methods with an {@code + * allow_redisplay} value that is present in this list. + * + *

If not specified, defaults to ["always"]. In order to display all saved + * payment methods, specify ["always", "limited", + * "unspecified"]. + */ + @SerializedName("payment_method_allow_redisplay_filters") + List< + CustomerSessionCreateParams.Components.MobilePaymentElement.Features + .PaymentMethodAllowRedisplayFilter> + paymentMethodAllowRedisplayFilters; + + /** Controls whether or not the mobile payment element shows saved payment methods. */ + @SerializedName("payment_method_redisplay") + PaymentMethodRedisplay paymentMethodRedisplay; + + /** + * Controls whether the mobile payment element displays the option to remove a saved payment + * method." + * + *

Allowing buyers to remove their saved payment methods impacts subscriptions that + * depend on that payment method. Removing the payment method detaches the {@code + * customer} object from that PaymentMethod. + */ + @SerializedName("payment_method_remove") + PaymentMethodRemove paymentMethodRemove; + + /** + * Controls whether the mobile payment element displays a checkbox offering to save a new + * payment method. + * + *

If a customer checks the box, the {@code + * allow_redisplay} value on the PaymentMethod is set to {@code 'always'} at + * confirmation time. For PaymentIntents, the {@code + * setup_future_usage} value is also set to the value defined in {@code + * payment_method_save_usage}. + */ + @SerializedName("payment_method_save") + PaymentMethodSave paymentMethodSave; + + /** + * Allows overriding the value of allow_override when saving a new payment method when + * payment_method_save is set to disabled. Use values: "always", + * "limited", or "unspecified". + * + *

If not specified, defaults to {@code nil} (no override value). + */ + @SerializedName("payment_method_save_allow_redisplay_override") + PaymentMethodSaveAllowRedisplayOverride paymentMethodSaveAllowRedisplayOverride; + + private Features( + Map extraParams, + List< + CustomerSessionCreateParams.Components.MobilePaymentElement.Features + .PaymentMethodAllowRedisplayFilter> + paymentMethodAllowRedisplayFilters, + PaymentMethodRedisplay paymentMethodRedisplay, + PaymentMethodRemove paymentMethodRemove, + PaymentMethodSave paymentMethodSave, + PaymentMethodSaveAllowRedisplayOverride paymentMethodSaveAllowRedisplayOverride) { + this.extraParams = extraParams; + this.paymentMethodAllowRedisplayFilters = paymentMethodAllowRedisplayFilters; + this.paymentMethodRedisplay = paymentMethodRedisplay; + this.paymentMethodRemove = paymentMethodRemove; + this.paymentMethodSave = paymentMethodSave; + this.paymentMethodSaveAllowRedisplayOverride = paymentMethodSaveAllowRedisplayOverride; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private List< + CustomerSessionCreateParams.Components.MobilePaymentElement.Features + .PaymentMethodAllowRedisplayFilter> + paymentMethodAllowRedisplayFilters; + + private PaymentMethodRedisplay paymentMethodRedisplay; + + private PaymentMethodRemove paymentMethodRemove; + + private PaymentMethodSave paymentMethodSave; + + private PaymentMethodSaveAllowRedisplayOverride paymentMethodSaveAllowRedisplayOverride; + + /** Finalize and obtain parameter instance from this builder. */ + public CustomerSessionCreateParams.Components.MobilePaymentElement.Features build() { + return new CustomerSessionCreateParams.Components.MobilePaymentElement.Features( + this.extraParams, + this.paymentMethodAllowRedisplayFilters, + this.paymentMethodRedisplay, + this.paymentMethodRemove, + this.paymentMethodSave, + this.paymentMethodSaveAllowRedisplayOverride); + } + + /** + * 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 + * CustomerSessionCreateParams.Components.MobilePaymentElement.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 + * CustomerSessionCreateParams.Components.MobilePaymentElement.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; + } + + /** + * Add an element to `paymentMethodAllowRedisplayFilters` list. A list is initialized for + * the first `add/addAll` call, and subsequent calls adds additional elements to the + * original list. See {@link + * CustomerSessionCreateParams.Components.MobilePaymentElement.Features#paymentMethodAllowRedisplayFilters} + * for the field documentation. + */ + public Builder addPaymentMethodAllowRedisplayFilter( + CustomerSessionCreateParams.Components.MobilePaymentElement.Features + .PaymentMethodAllowRedisplayFilter + element) { + if (this.paymentMethodAllowRedisplayFilters == null) { + this.paymentMethodAllowRedisplayFilters = new ArrayList<>(); + } + this.paymentMethodAllowRedisplayFilters.add(element); + return this; + } + + /** + * Add all elements to `paymentMethodAllowRedisplayFilters` list. A list is initialized + * for the first `add/addAll` call, and subsequent calls adds additional elements to the + * original list. See {@link + * CustomerSessionCreateParams.Components.MobilePaymentElement.Features#paymentMethodAllowRedisplayFilters} + * for the field documentation. + */ + public Builder addAllPaymentMethodAllowRedisplayFilter( + List< + CustomerSessionCreateParams.Components.MobilePaymentElement.Features + .PaymentMethodAllowRedisplayFilter> + elements) { + if (this.paymentMethodAllowRedisplayFilters == null) { + this.paymentMethodAllowRedisplayFilters = new ArrayList<>(); + } + this.paymentMethodAllowRedisplayFilters.addAll(elements); + return this; + } + + /** Controls whether or not the mobile payment element shows saved payment methods. */ + public Builder setPaymentMethodRedisplay( + CustomerSessionCreateParams.Components.MobilePaymentElement.Features + .PaymentMethodRedisplay + paymentMethodRedisplay) { + this.paymentMethodRedisplay = paymentMethodRedisplay; + return this; + } + + /** + * Controls whether the mobile payment element displays the option to remove a saved + * payment method." + * + *

Allowing buyers to remove their saved payment methods impacts subscriptions that + * depend on that payment method. Removing the payment method detaches the {@code + * customer} object from that PaymentMethod. + */ + public Builder setPaymentMethodRemove( + CustomerSessionCreateParams.Components.MobilePaymentElement.Features + .PaymentMethodRemove + paymentMethodRemove) { + this.paymentMethodRemove = paymentMethodRemove; + return this; + } + + /** + * Controls whether the mobile payment element displays a checkbox offering to save a new + * payment method. + * + *

If a customer checks the box, the {@code + * allow_redisplay} value on the PaymentMethod is set to {@code 'always'} at + * confirmation time. For PaymentIntents, the {@code + * setup_future_usage} value is also set to the value defined in {@code + * payment_method_save_usage}. + */ + public Builder setPaymentMethodSave( + CustomerSessionCreateParams.Components.MobilePaymentElement.Features.PaymentMethodSave + paymentMethodSave) { + this.paymentMethodSave = paymentMethodSave; + return this; + } + + /** + * Allows overriding the value of allow_override when saving a new payment method when + * payment_method_save is set to disabled. Use values: "always", + * "limited", or "unspecified". + * + *

If not specified, defaults to {@code nil} (no override value). + */ + public Builder setPaymentMethodSaveAllowRedisplayOverride( + CustomerSessionCreateParams.Components.MobilePaymentElement.Features + .PaymentMethodSaveAllowRedisplayOverride + paymentMethodSaveAllowRedisplayOverride) { + this.paymentMethodSaveAllowRedisplayOverride = paymentMethodSaveAllowRedisplayOverride; + return this; + } + } + + public enum PaymentMethodAllowRedisplayFilter implements ApiRequestParams.EnumParam { + @SerializedName("always") + ALWAYS("always"), + + @SerializedName("limited") + LIMITED("limited"), + + @SerializedName("unspecified") + UNSPECIFIED("unspecified"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + PaymentMethodAllowRedisplayFilter(String value) { + this.value = value; + } + } + + public enum PaymentMethodRedisplay implements ApiRequestParams.EnumParam { + @SerializedName("disabled") + DISABLED("disabled"), + + @SerializedName("enabled") + ENABLED("enabled"); - private Map extraParams; + @Getter(onMethod_ = {@Override}) + private final String value; - /** Finalize and obtain parameter instance from this builder. */ - public CustomerSessionCreateParams.Components.BuyButton build() { - return new CustomerSessionCreateParams.Components.BuyButton( - this.enabled, this.extraParams); + PaymentMethodRedisplay(String value) { + this.value = value; + } } - /** Required. Whether the buy button is enabled. */ - public Builder setEnabled(Boolean enabled) { - this.enabled = enabled; - return this; + public enum PaymentMethodRemove implements ApiRequestParams.EnumParam { + @SerializedName("disabled") + DISABLED("disabled"), + + @SerializedName("enabled") + ENABLED("enabled"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + PaymentMethodRemove(String value) { + this.value = value; + } } - /** - * 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 CustomerSessionCreateParams.Components.BuyButton#extraParams} for the - * field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); + public enum PaymentMethodSave implements ApiRequestParams.EnumParam { + @SerializedName("disabled") + DISABLED("disabled"), + + @SerializedName("enabled") + ENABLED("enabled"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + PaymentMethodSave(String value) { + this.value = value; } - 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 CustomerSessionCreateParams.Components.BuyButton#extraParams} for the - * field documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); + public enum PaymentMethodSaveAllowRedisplayOverride implements ApiRequestParams.EnumParam { + @SerializedName("always") + ALWAYS("always"), + + @SerializedName("limited") + LIMITED("limited"), + + @SerializedName("unspecified") + UNSPECIFIED("unspecified"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + PaymentMethodSaveAllowRedisplayOverride(String value) { + this.value = value; } - this.extraParams.putAll(map); - return this; } } } @@ -838,5 +1590,239 @@ public Builder putAllExtraParam(Map map) { } } } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class TaxIdElement { + /** Required. Whether the Tax ID Element 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; + + /** This hash defines whether the Tax ID Element supports certain features. */ + @SerializedName("features") + Features features; + + private TaxIdElement(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 CustomerSessionCreateParams.Components.TaxIdElement build() { + return new CustomerSessionCreateParams.Components.TaxIdElement( + this.enabled, this.extraParams, this.features); + } + + /** Required. Whether the Tax ID Element 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 CustomerSessionCreateParams.Components.TaxIdElement#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 CustomerSessionCreateParams.Components.TaxIdElement#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** This hash defines whether the Tax ID Element supports certain features. */ + public Builder setFeatures( + CustomerSessionCreateParams.Components.TaxIdElement.Features features) { + this.features = features; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + 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; + + /** + * Controls whether the Tax ID Element displays saved tax IDs for the customer. This + * parameter defaults to {@code disabled}. + * + *

When enabled, the Tax ID Element will show existing tax IDs associated with the + * customer, allowing them to select from previously saved tax identification numbers. + */ + @SerializedName("tax_id_redisplay") + TaxIdRedisplay taxIdRedisplay; + + /** + * Controls whether the Tax ID Element allows merchants to save new tax IDs for their + * customer. This parameter defaults to {@code disabled}. + * + *

When enabled, customers can enter and save new tax identification numbers during the + * payment flow, which will be stored securely and associated with their customer object for + * future use. + */ + @SerializedName("tax_id_save") + TaxIdSave taxIdSave; + + private Features( + Map extraParams, TaxIdRedisplay taxIdRedisplay, TaxIdSave taxIdSave) { + this.extraParams = extraParams; + this.taxIdRedisplay = taxIdRedisplay; + this.taxIdSave = taxIdSave; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private TaxIdRedisplay taxIdRedisplay; + + private TaxIdSave taxIdSave; + + /** Finalize and obtain parameter instance from this builder. */ + public CustomerSessionCreateParams.Components.TaxIdElement.Features build() { + return new CustomerSessionCreateParams.Components.TaxIdElement.Features( + this.extraParams, this.taxIdRedisplay, this.taxIdSave); + } + + /** + * 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 + * CustomerSessionCreateParams.Components.TaxIdElement.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 + * CustomerSessionCreateParams.Components.TaxIdElement.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; + } + + /** + * Controls whether the Tax ID Element displays saved tax IDs for the customer. This + * parameter defaults to {@code disabled}. + * + *

When enabled, the Tax ID Element will show existing tax IDs associated with the + * customer, allowing them to select from previously saved tax identification numbers. + */ + public Builder setTaxIdRedisplay( + CustomerSessionCreateParams.Components.TaxIdElement.Features.TaxIdRedisplay + taxIdRedisplay) { + this.taxIdRedisplay = taxIdRedisplay; + return this; + } + + /** + * Controls whether the Tax ID Element allows merchants to save new tax IDs for their + * customer. This parameter defaults to {@code disabled}. + * + *

When enabled, customers can enter and save new tax identification numbers during the + * payment flow, which will be stored securely and associated with their customer object + * for future use. + */ + public Builder setTaxIdSave( + CustomerSessionCreateParams.Components.TaxIdElement.Features.TaxIdSave taxIdSave) { + this.taxIdSave = taxIdSave; + return this; + } + } + + public enum TaxIdRedisplay implements ApiRequestParams.EnumParam { + @SerializedName("disabled") + DISABLED("disabled"), + + @SerializedName("enabled") + ENABLED("enabled"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + TaxIdRedisplay(String value) { + this.value = value; + } + } + + public enum TaxIdSave implements ApiRequestParams.EnumParam { + @SerializedName("disabled") + DISABLED("disabled"), + + @SerializedName("enabled") + ENABLED("enabled"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + TaxIdSave(String value) { + this.value = value; + } + } + } + } } } diff --git a/src/main/java/com/stripe/param/FileCreateParams.java b/src/main/java/com/stripe/param/FileCreateParams.java index 55026b17719..665a984b1b9 100644 --- a/src/main/java/com/stripe/param/FileCreateParams.java +++ b/src/main/java/com/stripe/param/FileCreateParams.java @@ -361,6 +361,9 @@ public enum Purpose implements ApiRequestParams.EnumParam { @SerializedName("pci_document") PCI_DOCUMENT("pci_document"), + @SerializedName("platform_terms_of_service") + PLATFORM_TERMS_OF_SERVICE("platform_terms_of_service"), + @SerializedName("tax_document_user_upload") TAX_DOCUMENT_USER_UPLOAD("tax_document_user_upload"), diff --git a/src/main/java/com/stripe/param/FileListParams.java b/src/main/java/com/stripe/param/FileListParams.java index ad1192cacea..f0085ee3138 100644 --- a/src/main/java/com/stripe/param/FileListParams.java +++ b/src/main/java/com/stripe/param/FileListParams.java @@ -363,6 +363,9 @@ public enum Purpose implements ApiRequestParams.EnumParam { @SerializedName("pci_document") PCI_DOCUMENT("pci_document"), + @SerializedName("platform_terms_of_service") + PLATFORM_TERMS_OF_SERVICE("platform_terms_of_service"), + @SerializedName("selfie") SELFIE("selfie"), diff --git a/src/main/java/com/stripe/param/PaymentAttemptRecordListParams.java b/src/main/java/com/stripe/param/PaymentAttemptRecordListParams.java index 85a48339197..3a68f81ca90 100644 --- a/src/main/java/com/stripe/param/PaymentAttemptRecordListParams.java +++ b/src/main/java/com/stripe/param/PaymentAttemptRecordListParams.java @@ -37,12 +37,26 @@ public class PaymentAttemptRecordListParams extends ApiRequestParams { @SerializedName("payment_record") String paymentRecord; + /** + * A cursor for use in pagination. {@code starting_after} is an object ID that defines your place + * in the list. For instance, if you make a list request and receive 100 objects, ending with + * {@code obj_foo}, your subsequent call can include {@code starting_after=obj_foo} in order to + * fetch the next page of the list. + */ + @SerializedName("starting_after") + String startingAfter; + private PaymentAttemptRecordListParams( - List expand, Map extraParams, Long limit, String paymentRecord) { + List expand, + Map extraParams, + Long limit, + String paymentRecord, + String startingAfter) { this.expand = expand; this.extraParams = extraParams; this.limit = limit; this.paymentRecord = paymentRecord; + this.startingAfter = startingAfter; } public static Builder builder() { @@ -58,10 +72,12 @@ public static class Builder { private String paymentRecord; + private String startingAfter; + /** Finalize and obtain parameter instance from this builder. */ public PaymentAttemptRecordListParams build() { return new PaymentAttemptRecordListParams( - this.expand, this.extraParams, this.limit, this.paymentRecord); + this.expand, this.extraParams, this.limit, this.paymentRecord, this.startingAfter); } /** @@ -130,5 +146,16 @@ public Builder setPaymentRecord(String paymentRecord) { this.paymentRecord = paymentRecord; return this; } + + /** + * A cursor for use in pagination. {@code starting_after} is an object ID that defines your + * place in the list. For instance, if you make a list request and receive 100 objects, ending + * with {@code obj_foo}, your subsequent call can include {@code starting_after=obj_foo} in + * order to fetch the next page of the list. + */ + public Builder setStartingAfter(String startingAfter) { + this.startingAfter = startingAfter; + return this; + } } } diff --git a/src/main/java/com/stripe/param/PaymentIntentCaptureParams.java b/src/main/java/com/stripe/param/PaymentIntentCaptureParams.java index 42477c19f00..3e9f5d28667 100644 --- a/src/main/java/com/stripe/param/PaymentIntentCaptureParams.java +++ b/src/main/java/com/stripe/param/PaymentIntentCaptureParams.java @@ -1070,6 +1070,13 @@ public static class Klarna { @SerializedName("product_url") String productUrl; + /** + * Unique reference for this line item to correlate it with your system’s internal + * records. The field is displayed in the Klarna Consumer App if passed. + */ + @SerializedName("reference") + String reference; + /** Reference for the subscription this line item is for. */ @SerializedName("subscription_reference") String subscriptionReference; @@ -1078,10 +1085,12 @@ private Klarna( Map extraParams, String imageUrl, String productUrl, + String reference, String subscriptionReference) { this.extraParams = extraParams; this.imageUrl = imageUrl; this.productUrl = productUrl; + this.reference = reference; this.subscriptionReference = subscriptionReference; } @@ -1096,6 +1105,8 @@ public static class Builder { private String productUrl; + private String reference; + private String subscriptionReference; /** Finalize and obtain parameter instance from this builder. */ @@ -1103,7 +1114,11 @@ public static class Builder { build() { return new PaymentIntentCaptureParams.AmountDetails.LineItem.PaymentMethodOptions .Klarna( - this.extraParams, this.imageUrl, this.productUrl, this.subscriptionReference); + this.extraParams, + this.imageUrl, + this.productUrl, + this.reference, + this.subscriptionReference); } /** @@ -1148,6 +1163,15 @@ public Builder setProductUrl(String productUrl) { return this; } + /** + * Unique reference for this line item to correlate it with your system’s internal + * records. The field is displayed in the Klarna Consumer App if passed. + */ + public Builder setReference(String reference) { + this.reference = reference; + return this; + } + /** Reference for the subscription this line item is for. */ public Builder setSubscriptionReference(String subscriptionReference) { this.subscriptionReference = subscriptionReference; diff --git a/src/main/java/com/stripe/param/PaymentIntentConfirmParams.java b/src/main/java/com/stripe/param/PaymentIntentConfirmParams.java index 9ac9aa059ce..ff27c4305e8 100644 --- a/src/main/java/com/stripe/param/PaymentIntentConfirmParams.java +++ b/src/main/java/com/stripe/param/PaymentIntentConfirmParams.java @@ -1428,6 +1428,13 @@ public static class Klarna { @SerializedName("product_url") String productUrl; + /** + * Unique reference for this line item to correlate it with your system’s internal + * records. The field is displayed in the Klarna Consumer App if passed. + */ + @SerializedName("reference") + String reference; + /** Reference for the subscription this line item is for. */ @SerializedName("subscription_reference") String subscriptionReference; @@ -1436,10 +1443,12 @@ private Klarna( Map extraParams, String imageUrl, String productUrl, + String reference, String subscriptionReference) { this.extraParams = extraParams; this.imageUrl = imageUrl; this.productUrl = productUrl; + this.reference = reference; this.subscriptionReference = subscriptionReference; } @@ -1454,6 +1463,8 @@ public static class Builder { private String productUrl; + private String reference; + private String subscriptionReference; /** Finalize and obtain parameter instance from this builder. */ @@ -1461,7 +1472,11 @@ public static class Builder { build() { return new PaymentIntentConfirmParams.AmountDetails.LineItem.PaymentMethodOptions .Klarna( - this.extraParams, this.imageUrl, this.productUrl, this.subscriptionReference); + this.extraParams, + this.imageUrl, + this.productUrl, + this.reference, + this.subscriptionReference); } /** @@ -1506,6 +1521,15 @@ public Builder setProductUrl(String productUrl) { return this; } + /** + * Unique reference for this line item to correlate it with your system’s internal + * records. The field is displayed in the Klarna Consumer App if passed. + */ + public Builder setReference(String reference) { + this.reference = reference; + return this; + } + /** Reference for the subscription this line item is for. */ public Builder setSubscriptionReference(String subscriptionReference) { this.subscriptionReference = subscriptionReference; diff --git a/src/main/java/com/stripe/param/PaymentIntentCreateParams.java b/src/main/java/com/stripe/param/PaymentIntentCreateParams.java index 7405fa73cc7..c4443513367 100644 --- a/src/main/java/com/stripe/param/PaymentIntentCreateParams.java +++ b/src/main/java/com/stripe/param/PaymentIntentCreateParams.java @@ -1810,6 +1810,13 @@ public static class Klarna { @SerializedName("product_url") String productUrl; + /** + * Unique reference for this line item to correlate it with your system’s internal + * records. The field is displayed in the Klarna Consumer App if passed. + */ + @SerializedName("reference") + String reference; + /** Reference for the subscription this line item is for. */ @SerializedName("subscription_reference") String subscriptionReference; @@ -1818,10 +1825,12 @@ private Klarna( Map extraParams, String imageUrl, String productUrl, + String reference, String subscriptionReference) { this.extraParams = extraParams; this.imageUrl = imageUrl; this.productUrl = productUrl; + this.reference = reference; this.subscriptionReference = subscriptionReference; } @@ -1836,6 +1845,8 @@ public static class Builder { private String productUrl; + private String reference; + private String subscriptionReference; /** Finalize and obtain parameter instance from this builder. */ @@ -1843,7 +1854,11 @@ public static class Builder { build() { return new PaymentIntentCreateParams.AmountDetails.LineItem.PaymentMethodOptions .Klarna( - this.extraParams, this.imageUrl, this.productUrl, this.subscriptionReference); + this.extraParams, + this.imageUrl, + this.productUrl, + this.reference, + this.subscriptionReference); } /** @@ -1888,6 +1903,15 @@ public Builder setProductUrl(String productUrl) { return this; } + /** + * Unique reference for this line item to correlate it with your system’s internal + * records. The field is displayed in the Klarna Consumer App if passed. + */ + public Builder setReference(String reference) { + this.reference = reference; + return this; + } + /** Reference for the subscription this line item is for. */ public Builder setSubscriptionReference(String subscriptionReference) { this.subscriptionReference = subscriptionReference; diff --git a/src/main/java/com/stripe/param/PaymentIntentIncrementAuthorizationParams.java b/src/main/java/com/stripe/param/PaymentIntentIncrementAuthorizationParams.java index 7b5b7a5886a..189253fa850 100644 --- a/src/main/java/com/stripe/param/PaymentIntentIncrementAuthorizationParams.java +++ b/src/main/java/com/stripe/param/PaymentIntentIncrementAuthorizationParams.java @@ -1035,6 +1035,13 @@ public static class Klarna { @SerializedName("product_url") String productUrl; + /** + * Unique reference for this line item to correlate it with your system’s internal + * records. The field is displayed in the Klarna Consumer App if passed. + */ + @SerializedName("reference") + String reference; + /** Reference for the subscription this line item is for. */ @SerializedName("subscription_reference") String subscriptionReference; @@ -1043,10 +1050,12 @@ private Klarna( Map extraParams, String imageUrl, String productUrl, + String reference, String subscriptionReference) { this.extraParams = extraParams; this.imageUrl = imageUrl; this.productUrl = productUrl; + this.reference = reference; this.subscriptionReference = subscriptionReference; } @@ -1061,6 +1070,8 @@ public static class Builder { private String productUrl; + private String reference; + private String subscriptionReference; /** Finalize and obtain parameter instance from this builder. */ @@ -1069,7 +1080,11 @@ public static class Builder { build() { return new PaymentIntentIncrementAuthorizationParams.AmountDetails.LineItem .PaymentMethodOptions.Klarna( - this.extraParams, this.imageUrl, this.productUrl, this.subscriptionReference); + this.extraParams, + this.imageUrl, + this.productUrl, + this.reference, + this.subscriptionReference); } /** @@ -1114,6 +1129,15 @@ public Builder setProductUrl(String productUrl) { return this; } + /** + * Unique reference for this line item to correlate it with your system’s internal + * records. The field is displayed in the Klarna Consumer App if passed. + */ + public Builder setReference(String reference) { + this.reference = reference; + return this; + } + /** Reference for the subscription this line item is for. */ public Builder setSubscriptionReference(String subscriptionReference) { this.subscriptionReference = subscriptionReference; diff --git a/src/main/java/com/stripe/param/PaymentIntentUpdateParams.java b/src/main/java/com/stripe/param/PaymentIntentUpdateParams.java index 2d6a84e770a..045b7c1a4e1 100644 --- a/src/main/java/com/stripe/param/PaymentIntentUpdateParams.java +++ b/src/main/java/com/stripe/param/PaymentIntentUpdateParams.java @@ -1728,6 +1728,13 @@ public static class Klarna { @SerializedName("product_url") Object productUrl; + /** + * Unique reference for this line item to correlate it with your system’s internal + * records. The field is displayed in the Klarna Consumer App if passed. + */ + @SerializedName("reference") + Object reference; + /** Reference for the subscription this line item is for. */ @SerializedName("subscription_reference") Object subscriptionReference; @@ -1736,10 +1743,12 @@ private Klarna( Map extraParams, Object imageUrl, Object productUrl, + Object reference, Object subscriptionReference) { this.extraParams = extraParams; this.imageUrl = imageUrl; this.productUrl = productUrl; + this.reference = reference; this.subscriptionReference = subscriptionReference; } @@ -1754,6 +1763,8 @@ public static class Builder { private Object productUrl; + private Object reference; + private Object subscriptionReference; /** Finalize and obtain parameter instance from this builder. */ @@ -1761,7 +1772,11 @@ public static class Builder { build() { return new PaymentIntentUpdateParams.AmountDetails.LineItem.PaymentMethodOptions .Klarna( - this.extraParams, this.imageUrl, this.productUrl, this.subscriptionReference); + this.extraParams, + this.imageUrl, + this.productUrl, + this.reference, + this.subscriptionReference); } /** @@ -1818,6 +1833,24 @@ public Builder setProductUrl(EmptyParam productUrl) { return this; } + /** + * Unique reference for this line item to correlate it with your system’s internal + * records. The field is displayed in the Klarna Consumer App if passed. + */ + public Builder setReference(String reference) { + this.reference = reference; + return this; + } + + /** + * Unique reference for this line item to correlate it with your system’s internal + * records. The field is displayed in the Klarna Consumer App if passed. + */ + public Builder setReference(EmptyParam reference) { + this.reference = reference; + return this; + } + /** Reference for the subscription this line item is for. */ public Builder setSubscriptionReference(String subscriptionReference) { this.subscriptionReference = subscriptionReference; diff --git a/src/main/java/com/stripe/param/PaymentLinkCreateParams.java b/src/main/java/com/stripe/param/PaymentLinkCreateParams.java index 5e4b9b3a407..fe94aaaa8c2 100644 --- a/src/main/java/com/stripe/param/PaymentLinkCreateParams.java +++ b/src/main/java/com/stripe/param/PaymentLinkCreateParams.java @@ -119,6 +119,10 @@ public class PaymentLinkCreateParams extends ApiRequestParams { @SerializedName("metadata") Map metadata; + /** Controls settings applied for collecting the customer's name. */ + @SerializedName("name_collection") + NameCollection nameCollection; + /** The account on behalf of which to charge. */ @SerializedName("on_behalf_of") String onBehalfOf; @@ -233,6 +237,7 @@ private PaymentLinkCreateParams( InvoiceCreation invoiceCreation, List lineItems, Map metadata, + NameCollection nameCollection, String onBehalfOf, List optionalItems, PaymentIntentData paymentIntentData, @@ -263,6 +268,7 @@ private PaymentLinkCreateParams( this.invoiceCreation = invoiceCreation; this.lineItems = lineItems; this.metadata = metadata; + this.nameCollection = nameCollection; this.onBehalfOf = onBehalfOf; this.optionalItems = optionalItems; this.paymentIntentData = paymentIntentData; @@ -317,6 +323,8 @@ public static class Builder { private Map metadata; + private NameCollection nameCollection; + private String onBehalfOf; private List optionalItems; @@ -363,6 +371,7 @@ public PaymentLinkCreateParams build() { this.invoiceCreation, this.lineItems, this.metadata, + this.nameCollection, this.onBehalfOf, this.optionalItems, this.paymentIntentData, @@ -599,6 +608,12 @@ public Builder putAllMetadata(Map map) { return this; } + /** Controls settings applied for collecting the customer's name. */ + public Builder setNameCollection(PaymentLinkCreateParams.NameCollection nameCollection) { + this.nameCollection = nameCollection; + return this; + } + /** The account on behalf of which to charge. */ public Builder setOnBehalfOf(String onBehalfOf) { this.onBehalfOf = onBehalfOf; @@ -4238,6 +4253,284 @@ public enum TaxBehavior implements ApiRequestParams.EnumParam { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class NameCollection { + /** Controls settings applied for collecting the customer's business name. */ + @SerializedName("business") + Business business; + + /** + * 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; + + /** Controls settings applied for collecting the customer's individual name. */ + @SerializedName("individual") + Individual individual; + + private NameCollection( + Business business, Map extraParams, Individual individual) { + this.business = business; + this.extraParams = extraParams; + this.individual = individual; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Business business; + + private Map extraParams; + + private Individual individual; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentLinkCreateParams.NameCollection build() { + return new PaymentLinkCreateParams.NameCollection( + this.business, this.extraParams, this.individual); + } + + /** Controls settings applied for collecting the customer's business name. */ + public Builder setBusiness(PaymentLinkCreateParams.NameCollection.Business business) { + this.business = business; + 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 + * PaymentLinkCreateParams.NameCollection#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link PaymentLinkCreateParams.NameCollection#extraParams} for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Controls settings applied for collecting the customer's individual name. */ + public Builder setIndividual(PaymentLinkCreateParams.NameCollection.Individual individual) { + this.individual = individual; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Business { + /** + * Required. Enable business name collection on the payment link. Defaults to + * {@code false}. + */ + @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; + + /** + * Whether the customer is required to provide their business name before checking out. + * Defaults to {@code false}. + */ + @SerializedName("optional") + Boolean optional; + + private Business(Boolean enabled, Map extraParams, Boolean optional) { + this.enabled = enabled; + this.extraParams = extraParams; + this.optional = optional; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Boolean enabled; + + private Map extraParams; + + private Boolean optional; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentLinkCreateParams.NameCollection.Business build() { + return new PaymentLinkCreateParams.NameCollection.Business( + this.enabled, this.extraParams, this.optional); + } + + /** + * Required. Enable business name collection on the payment link. Defaults + * to {@code false}. + */ + 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 PaymentLinkCreateParams.NameCollection.Business#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentLinkCreateParams.NameCollection.Business#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Whether the customer is required to provide their business name before checking out. + * Defaults to {@code false}. + */ + public Builder setOptional(Boolean optional) { + this.optional = optional; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Individual { + /** + * Required. Enable individual name collection on the payment link. Defaults + * to {@code false}. + */ + @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; + + /** + * Whether the customer is required to provide their full name before checking out. Defaults + * to {@code false}. + */ + @SerializedName("optional") + Boolean optional; + + private Individual(Boolean enabled, Map extraParams, Boolean optional) { + this.enabled = enabled; + this.extraParams = extraParams; + this.optional = optional; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Boolean enabled; + + private Map extraParams; + + private Boolean optional; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentLinkCreateParams.NameCollection.Individual build() { + return new PaymentLinkCreateParams.NameCollection.Individual( + this.enabled, this.extraParams, this.optional); + } + + /** + * Required. Enable individual name collection on the payment link. + * Defaults to {@code false}. + */ + 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 PaymentLinkCreateParams.NameCollection.Individual#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentLinkCreateParams.NameCollection.Individual#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Whether the customer is required to provide their full name before checking out. Defaults + * to {@code false}. + */ + public Builder setOptional(Boolean optional) { + this.optional = optional; + return this; + } + } + } + } + @Getter @EqualsAndHashCode(callSuper = false) public static class OptionalItem { diff --git a/src/main/java/com/stripe/param/PaymentLinkUpdateParams.java b/src/main/java/com/stripe/param/PaymentLinkUpdateParams.java index 39b3df23c26..c732d0704e5 100644 --- a/src/main/java/com/stripe/param/PaymentLinkUpdateParams.java +++ b/src/main/java/com/stripe/param/PaymentLinkUpdateParams.java @@ -96,6 +96,10 @@ public class PaymentLinkUpdateParams extends ApiRequestParams { @SerializedName("metadata") Map metadata; + /** Controls settings applied for collecting the customer's name. */ + @SerializedName("name_collection") + Object nameCollection; + /** * A subset of parameters to be passed to PaymentIntent creation for Checkout Sessions in {@code * payment} mode. @@ -176,6 +180,7 @@ private PaymentLinkUpdateParams( InvoiceCreation invoiceCreation, List lineItems, Map metadata, + Object nameCollection, PaymentIntentData paymentIntentData, PaymentMethodCollection paymentMethodCollection, Object paymentMethodTypes, @@ -199,6 +204,7 @@ private PaymentLinkUpdateParams( this.invoiceCreation = invoiceCreation; this.lineItems = lineItems; this.metadata = metadata; + this.nameCollection = nameCollection; this.paymentIntentData = paymentIntentData; this.paymentMethodCollection = paymentMethodCollection; this.paymentMethodTypes = paymentMethodTypes; @@ -243,6 +249,8 @@ public static class Builder { private Map metadata; + private Object nameCollection; + private PaymentIntentData paymentIntentData; private PaymentMethodCollection paymentMethodCollection; @@ -278,6 +286,7 @@ public PaymentLinkUpdateParams build() { this.invoiceCreation, this.lineItems, this.metadata, + this.nameCollection, this.paymentIntentData, this.paymentMethodCollection, this.paymentMethodTypes, @@ -507,6 +516,18 @@ public Builder putAllMetadata(Map map) { return this; } + /** Controls settings applied for collecting the customer's name. */ + public Builder setNameCollection(PaymentLinkUpdateParams.NameCollection nameCollection) { + this.nameCollection = nameCollection; + return this; + } + + /** Controls settings applied for collecting the customer's name. */ + public Builder setNameCollection(EmptyParam nameCollection) { + this.nameCollection = nameCollection; + return this; + } + /** * A subset of parameters to be passed to PaymentIntent creation for Checkout Sessions in {@code * payment} mode. @@ -3394,6 +3415,284 @@ public Builder setMinimum(Long minimum) { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class NameCollection { + /** Controls settings applied for collecting the customer's business name. */ + @SerializedName("business") + Business business; + + /** + * 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; + + /** Controls settings applied for collecting the customer's individual name. */ + @SerializedName("individual") + Individual individual; + + private NameCollection( + Business business, Map extraParams, Individual individual) { + this.business = business; + this.extraParams = extraParams; + this.individual = individual; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Business business; + + private Map extraParams; + + private Individual individual; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentLinkUpdateParams.NameCollection build() { + return new PaymentLinkUpdateParams.NameCollection( + this.business, this.extraParams, this.individual); + } + + /** Controls settings applied for collecting the customer's business name. */ + public Builder setBusiness(PaymentLinkUpdateParams.NameCollection.Business business) { + this.business = business; + 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 + * PaymentLinkUpdateParams.NameCollection#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link PaymentLinkUpdateParams.NameCollection#extraParams} for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Controls settings applied for collecting the customer's individual name. */ + public Builder setIndividual(PaymentLinkUpdateParams.NameCollection.Individual individual) { + this.individual = individual; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Business { + /** + * Required. Enable business name collection on the payment link. Defaults to + * {@code false}. + */ + @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; + + /** + * Whether the customer is required to provide their business name before checking out. + * Defaults to {@code false}. + */ + @SerializedName("optional") + Boolean optional; + + private Business(Boolean enabled, Map extraParams, Boolean optional) { + this.enabled = enabled; + this.extraParams = extraParams; + this.optional = optional; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Boolean enabled; + + private Map extraParams; + + private Boolean optional; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentLinkUpdateParams.NameCollection.Business build() { + return new PaymentLinkUpdateParams.NameCollection.Business( + this.enabled, this.extraParams, this.optional); + } + + /** + * Required. Enable business name collection on the payment link. Defaults + * to {@code false}. + */ + 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 PaymentLinkUpdateParams.NameCollection.Business#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentLinkUpdateParams.NameCollection.Business#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Whether the customer is required to provide their business name before checking out. + * Defaults to {@code false}. + */ + public Builder setOptional(Boolean optional) { + this.optional = optional; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Individual { + /** + * Required. Enable individual name collection on the payment link. Defaults + * to {@code false}. + */ + @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; + + /** + * Whether the customer is required to provide their full name before checking out. Defaults + * to {@code false}. + */ + @SerializedName("optional") + Boolean optional; + + private Individual(Boolean enabled, Map extraParams, Boolean optional) { + this.enabled = enabled; + this.extraParams = extraParams; + this.optional = optional; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Boolean enabled; + + private Map extraParams; + + private Boolean optional; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentLinkUpdateParams.NameCollection.Individual build() { + return new PaymentLinkUpdateParams.NameCollection.Individual( + this.enabled, this.extraParams, this.optional); + } + + /** + * Required. Enable individual name collection on the payment link. + * Defaults to {@code false}. + */ + 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 PaymentLinkUpdateParams.NameCollection.Individual#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentLinkUpdateParams.NameCollection.Individual#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Whether the customer is required to provide their full name before checking out. Defaults + * to {@code false}. + */ + public Builder setOptional(Boolean optional) { + this.optional = optional; + return this; + } + } + } + } + @Getter @EqualsAndHashCode(callSuper = false) public static class PaymentIntentData { diff --git a/src/main/java/com/stripe/param/PaymentMethodConfigurationCreateParams.java b/src/main/java/com/stripe/param/PaymentMethodConfigurationCreateParams.java index f2cc29dee10..9046e4215fb 100644 --- a/src/main/java/com/stripe/param/PaymentMethodConfigurationCreateParams.java +++ b/src/main/java/com/stripe/param/PaymentMethodConfigurationCreateParams.java @@ -159,6 +159,13 @@ public class PaymentMethodConfigurationCreateParams extends ApiRequestParams { @SerializedName("cashapp") Cashapp cashapp; + /** + * Stablecoin payments enable + * customers to pay in stablecoins like USDC from 100s of wallets including Phantom and Metamask. + */ + @SerializedName("crypto") + Crypto crypto; + /** * Uses a customer’s cash balance * for the payment. The cash balance can be funded via a bank transfer. Check this page for more details. + */ + @SerializedName("mb_way") + MbWay mbWay; + /** * MobilePay is a single-use * card wallet payment method used in Denmark and Finland. It allows customers to expand, @@ -573,6 +589,7 @@ private PaymentMethodConfigurationCreateParams( Konbini konbini, KrCard krCard, Link link, + MbWay mbWay, Mobilepay mobilepay, Multibanco multibanco, String name, @@ -618,6 +635,7 @@ private PaymentMethodConfigurationCreateParams( this.card = card; this.cartesBancaires = cartesBancaires; this.cashapp = cashapp; + this.crypto = crypto; this.customerBalance = customerBalance; this.eps = eps; this.expand = expand; @@ -636,6 +654,7 @@ private PaymentMethodConfigurationCreateParams( this.konbini = konbini; this.krCard = krCard; this.link = link; + this.mbWay = mbWay; this.mobilepay = mobilepay; this.multibanco = multibanco; this.name = name; @@ -705,6 +724,8 @@ public static class Builder { private Cashapp cashapp; + private Crypto crypto; + private CustomerBalance customerBalance; private Eps eps; @@ -741,6 +762,8 @@ public static class Builder { private Link link; + private MbWay mbWay; + private Mobilepay mobilepay; private Multibanco multibanco; @@ -817,6 +840,7 @@ public PaymentMethodConfigurationCreateParams build() { this.card, this.cartesBancaires, this.cashapp, + this.crypto, this.customerBalance, this.eps, this.expand, @@ -835,6 +859,7 @@ public PaymentMethodConfigurationCreateParams build() { this.konbini, this.krCard, this.link, + this.mbWay, this.mobilepay, this.multibanco, this.name, @@ -1048,6 +1073,16 @@ public Builder setCashapp(PaymentMethodConfigurationCreateParams.Cashapp cashapp return this; } + /** + * Stablecoin payments enable + * customers to pay in stablecoins like USDC from 100s of wallets including Phantom and + * Metamask. + */ + public Builder setCrypto(PaymentMethodConfigurationCreateParams.Crypto crypto) { + this.crypto = crypto; + return this; + } + /** * Uses a customer’s cash * balance for the payment. The cash balance can be funded via a bank transfer. Check this @@ -1275,6 +1310,16 @@ public Builder setLink(PaymentMethodConfigurationCreateParams.Link link) { return this; } + /** + * MB WAY is the most popular wallet in Portugal. After entering their phone number in your + * checkout, customers approve the payment directly in their MB WAY app. Check this page for more details. + */ + public Builder setMbWay(PaymentMethodConfigurationCreateParams.MbWay mbWay) { + this.mbWay = mbWay; + return this; + } + /** * MobilePay is a single-use card wallet @@ -4385,6 +4430,171 @@ public enum Preference implements ApiRequestParams.EnumParam { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Crypto { + /** 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 Crypto(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.Crypto build() { + return new PaymentMethodConfigurationCreateParams.Crypto( + this.displayPreference, this.extraParams); + } + + /** Whether or not the payment method should be displayed. */ + public Builder setDisplayPreference( + PaymentMethodConfigurationCreateParams.Crypto.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.Crypto#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.Crypto#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 + @EqualsAndHashCode(callSuper = false) + 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.Crypto.DisplayPreference build() { + return new PaymentMethodConfigurationCreateParams.Crypto.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.Crypto.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.Crypto.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.Crypto.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 @EqualsAndHashCode(callSuper = false) public static class CustomerBalance { @@ -7035,6 +7245,171 @@ public enum Preference implements ApiRequestParams.EnumParam { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class MbWay { + /** 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 MbWay(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.MbWay build() { + return new PaymentMethodConfigurationCreateParams.MbWay( + this.displayPreference, this.extraParams); + } + + /** Whether or not the payment method should be displayed. */ + public Builder setDisplayPreference( + PaymentMethodConfigurationCreateParams.MbWay.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.MbWay#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.MbWay#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 + @EqualsAndHashCode(callSuper = false) + 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.MbWay.DisplayPreference build() { + return new PaymentMethodConfigurationCreateParams.MbWay.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.MbWay.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.MbWay.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.MbWay.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 @EqualsAndHashCode(callSuper = false) public static class Mobilepay { diff --git a/src/main/java/com/stripe/param/PaymentMethodConfigurationUpdateParams.java b/src/main/java/com/stripe/param/PaymentMethodConfigurationUpdateParams.java index 1928a9e1e73..1b7324c79fc 100644 --- a/src/main/java/com/stripe/param/PaymentMethodConfigurationUpdateParams.java +++ b/src/main/java/com/stripe/param/PaymentMethodConfigurationUpdateParams.java @@ -164,6 +164,13 @@ public class PaymentMethodConfigurationUpdateParams extends ApiRequestParams { @SerializedName("cashapp") Cashapp cashapp; + /** + * Stablecoin payments enable + * customers to pay in stablecoins like USDC from 100s of wallets including Phantom and Metamask. + */ + @SerializedName("crypto") + Crypto crypto; + /** * Uses a customer’s cash balance * for the payment. The cash balance can be funded via a bank transfer. Check this page for more details. + */ + @SerializedName("mb_way") + MbWay mbWay; + /** * MobilePay is a single-use * card wallet payment method used in Denmark and Finland. It allows customers to expand, @@ -575,6 +591,7 @@ private PaymentMethodConfigurationUpdateParams( Konbini konbini, KrCard krCard, Link link, + MbWay mbWay, Mobilepay mobilepay, Multibanco multibanco, Object name, @@ -620,6 +637,7 @@ private PaymentMethodConfigurationUpdateParams( this.card = card; this.cartesBancaires = cartesBancaires; this.cashapp = cashapp; + this.crypto = crypto; this.customerBalance = customerBalance; this.eps = eps; this.expand = expand; @@ -638,6 +656,7 @@ private PaymentMethodConfigurationUpdateParams( this.konbini = konbini; this.krCard = krCard; this.link = link; + this.mbWay = mbWay; this.mobilepay = mobilepay; this.multibanco = multibanco; this.name = name; @@ -708,6 +727,8 @@ public static class Builder { private Cashapp cashapp; + private Crypto crypto; + private CustomerBalance customerBalance; private Eps eps; @@ -744,6 +765,8 @@ public static class Builder { private Link link; + private MbWay mbWay; + private Mobilepay mobilepay; private Multibanco multibanco; @@ -819,6 +842,7 @@ public PaymentMethodConfigurationUpdateParams build() { this.card, this.cartesBancaires, this.cashapp, + this.crypto, this.customerBalance, this.eps, this.expand, @@ -837,6 +861,7 @@ public PaymentMethodConfigurationUpdateParams build() { this.konbini, this.krCard, this.link, + this.mbWay, this.mobilepay, this.multibanco, this.name, @@ -1055,6 +1080,16 @@ public Builder setCashapp(PaymentMethodConfigurationUpdateParams.Cashapp cashapp return this; } + /** + * Stablecoin payments enable + * customers to pay in stablecoins like USDC from 100s of wallets including Phantom and + * Metamask. + */ + public Builder setCrypto(PaymentMethodConfigurationUpdateParams.Crypto crypto) { + this.crypto = crypto; + return this; + } + /** * Uses a customer’s cash * balance for the payment. The cash balance can be funded via a bank transfer. Check this @@ -1282,6 +1317,16 @@ public Builder setLink(PaymentMethodConfigurationUpdateParams.Link link) { return this; } + /** + * MB WAY is the most popular wallet in Portugal. After entering their phone number in your + * checkout, customers approve the payment directly in their MB WAY app. Check this page for more details. + */ + public Builder setMbWay(PaymentMethodConfigurationUpdateParams.MbWay mbWay) { + this.mbWay = mbWay; + return this; + } + /** * MobilePay is a single-use card wallet @@ -4392,6 +4437,171 @@ public enum Preference implements ApiRequestParams.EnumParam { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Crypto { + /** 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 Crypto(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.Crypto build() { + return new PaymentMethodConfigurationUpdateParams.Crypto( + this.displayPreference, this.extraParams); + } + + /** Whether or not the payment method should be displayed. */ + public Builder setDisplayPreference( + PaymentMethodConfigurationUpdateParams.Crypto.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.Crypto#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.Crypto#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 + @EqualsAndHashCode(callSuper = false) + 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.Crypto.DisplayPreference build() { + return new PaymentMethodConfigurationUpdateParams.Crypto.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.Crypto.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.Crypto.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.Crypto.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 @EqualsAndHashCode(callSuper = false) public static class CustomerBalance { @@ -7042,6 +7252,171 @@ public enum Preference implements ApiRequestParams.EnumParam { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class MbWay { + /** 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 MbWay(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.MbWay build() { + return new PaymentMethodConfigurationUpdateParams.MbWay( + this.displayPreference, this.extraParams); + } + + /** Whether or not the payment method should be displayed. */ + public Builder setDisplayPreference( + PaymentMethodConfigurationUpdateParams.MbWay.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.MbWay#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.MbWay#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 + @EqualsAndHashCode(callSuper = false) + 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.MbWay.DisplayPreference build() { + return new PaymentMethodConfigurationUpdateParams.MbWay.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.MbWay.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.MbWay.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.MbWay.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 @EqualsAndHashCode(callSuper = false) public static class Mobilepay { diff --git a/src/main/java/com/stripe/param/PaymentMethodCreateParams.java b/src/main/java/com/stripe/param/PaymentMethodCreateParams.java index 352519ee9ce..903ff56de2a 100644 --- a/src/main/java/com/stripe/param/PaymentMethodCreateParams.java +++ b/src/main/java/com/stripe/param/PaymentMethodCreateParams.java @@ -135,6 +135,13 @@ public class PaymentMethodCreateParams extends ApiRequestParams { @SerializedName("crypto") Crypto crypto; + /** + * If this is a {@code custom} PaymentMethod, this hash contains details about the Custom payment + * method. + */ + @SerializedName("custom") + Custom custom; + /** The {@code Customer} to whom the original PaymentMethod is attached. */ @SerializedName("customer") String customer; @@ -492,6 +499,7 @@ private PaymentMethodCreateParams( Object card, Cashapp cashapp, Crypto crypto, + Custom custom, String customer, CustomerBalance customerBalance, Eps eps, @@ -559,6 +567,7 @@ private PaymentMethodCreateParams( this.card = card; this.cashapp = cashapp; this.crypto = crypto; + this.custom = custom; this.customer = customer; this.customerBalance = customerBalance; this.eps = eps; @@ -650,6 +659,8 @@ public static class Builder { private Crypto crypto; + private Custom custom; + private String customer; private CustomerBalance customerBalance; @@ -770,6 +781,7 @@ public PaymentMethodCreateParams build() { this.card, this.cashapp, this.crypto, + this.custom, this.customer, this.customerBalance, this.eps, @@ -994,6 +1006,15 @@ public Builder setCrypto(PaymentMethodCreateParams.Crypto crypto) { return this; } + /** + * If this is a {@code custom} PaymentMethod, this hash contains details about the Custom + * payment method. + */ + public Builder setCustom(PaymentMethodCreateParams.Custom custom) { + this.custom = custom; + return this; + } + /** The {@code Customer} to whom the original PaymentMethod is attached. */ public Builder setCustomer(String customer) { this.customer = customer; @@ -2930,6 +2951,81 @@ public Builder putAllExtraParam(Map map) { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Custom { + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-level field (serialized) name in this + * param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Required. ID of the Dashboard-only CustomPaymentMethodType. This field is + * used by Stripe products' internal code to support CPMs. + */ + @SerializedName("type") + String type; + + private Custom(Map extraParams, String type) { + this.extraParams = extraParams; + this.type = type; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private String type; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentMethodCreateParams.Custom build() { + return new PaymentMethodCreateParams.Custom(this.extraParams, this.type); + } + + /** + * 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.Custom#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.Custom#extraParams} for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Required. ID of the Dashboard-only CustomPaymentMethodType. This field is + * used by Stripe products' internal code to support CPMs. + */ + public Builder setType(String type) { + this.type = type; + return this; + } + } + } + @Getter @EqualsAndHashCode(callSuper = false) public static class CustomerBalance { @@ -6616,6 +6712,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("crypto") CRYPTO("crypto"), + @SerializedName("custom") + CUSTOM("custom"), + @SerializedName("customer_balance") CUSTOMER_BALANCE("customer_balance"), diff --git a/src/main/java/com/stripe/param/PaymentMethodListParams.java b/src/main/java/com/stripe/param/PaymentMethodListParams.java index 9993da80ca3..6803165f83e 100644 --- a/src/main/java/com/stripe/param/PaymentMethodListParams.java +++ b/src/main/java/com/stripe/param/PaymentMethodListParams.java @@ -56,9 +56,9 @@ public class PaymentMethodListParams extends ApiRequestParams { String startingAfter; /** - * An optional filter on the list, based on the object {@code type} field. Without the filter, the - * list includes all current and future payment method types. If your integration expects only one - * type of payment method in the response, make sure to provide a type value in the request. + * Filters the list by the object {@code type} field. Unfiltered, the list returns all payment + * method types except {@code custom}. If your integration expects only one type of payment method + * in the response, specify that type value in the request to reduce your payload. */ @SerializedName("type") Type type; @@ -201,10 +201,9 @@ public Builder setStartingAfter(String startingAfter) { } /** - * An optional filter on the list, based on the object {@code type} field. Without the filter, - * the list includes all current and future payment method types. If your integration expects - * only one type of payment method in the response, make sure to provide a type value in the - * request. + * Filters the list by the object {@code type} field. Unfiltered, the list returns all payment + * method types except {@code custom}. If your integration expects only one type of payment + * method in the response, specify that type value in the request to reduce your payload. */ public Builder setType(PaymentMethodListParams.Type type) { this.type = type; @@ -258,6 +257,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("crypto") CRYPTO("crypto"), + @SerializedName("custom") + CUSTOM("custom"), + @SerializedName("customer_balance") CUSTOMER_BALANCE("customer_balance"), diff --git a/src/main/java/com/stripe/param/PaymentRecordReportRefundParams.java b/src/main/java/com/stripe/param/PaymentRecordReportRefundParams.java new file mode 100644 index 00000000000..992e5c875ce --- /dev/null +++ b/src/main/java/com/stripe/param/PaymentRecordReportRefundParams.java @@ -0,0 +1,622 @@ +// File generated from our OpenAPI spec +package com.stripe.param; + +import com.google.gson.annotations.SerializedName; +import com.stripe.net.ApiRequestParams; +import com.stripe.param.common.EmptyParam; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import lombok.EqualsAndHashCode; +import lombok.Getter; + +@Getter +@EqualsAndHashCode(callSuper = false) +public class PaymentRecordReportRefundParams extends ApiRequestParams { + /** + * A positive integer in the smallest + * currency unit representing how much of this payment to refund. Can refund only up to the + * remaining, unrefunded amount of the payment. + */ + @SerializedName("amount") + Amount amount; + + /** Specifies which fields in the response should be expanded. */ + @SerializedName("expand") + List expand; + + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-level field (serialized) name in this + * param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** When the reported refund was initiated. Measured in seconds since the Unix epoch. */ + @SerializedName("initiated_at") + Long initiatedAt; + + /** + * Set of key-value pairs that you can attach + * to an object. This can be useful for storing additional information about the object in a + * structured format. Individual keys can be unset by posting an empty value to them. All keys can + * be unset by posting an empty value to {@code metadata}. + */ + @SerializedName("metadata") + Object metadata; + + /** Required. The outcome of the reported refund. */ + @SerializedName("outcome") + Outcome outcome; + + /** Required. Processor information for this refund. */ + @SerializedName("processor_details") + ProcessorDetails processorDetails; + + /** Required. Information about the payment attempt refund. */ + @SerializedName("refunded") + Refunded refunded; + + private PaymentRecordReportRefundParams( + Amount amount, + List expand, + Map extraParams, + Long initiatedAt, + Object metadata, + Outcome outcome, + ProcessorDetails processorDetails, + Refunded refunded) { + this.amount = amount; + this.expand = expand; + this.extraParams = extraParams; + this.initiatedAt = initiatedAt; + this.metadata = metadata; + this.outcome = outcome; + this.processorDetails = processorDetails; + this.refunded = refunded; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Amount amount; + + private List expand; + + private Map extraParams; + + private Long initiatedAt; + + private Object metadata; + + private Outcome outcome; + + private ProcessorDetails processorDetails; + + private Refunded refunded; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentRecordReportRefundParams build() { + return new PaymentRecordReportRefundParams( + this.amount, + this.expand, + this.extraParams, + this.initiatedAt, + this.metadata, + this.outcome, + this.processorDetails, + this.refunded); + } + + /** + * A positive integer in the smallest + * currency unit representing how much of this payment to refund. Can refund only up to the + * remaining, unrefunded amount of the payment. + */ + public Builder setAmount(PaymentRecordReportRefundParams.Amount amount) { + this.amount = amount; + return this; + } + + /** + * Add an element to `expand` list. A list is initialized for the first `add/addAll` call, and + * subsequent calls adds additional elements to the original list. See {@link + * PaymentRecordReportRefundParams#expand} for the field documentation. + */ + public Builder addExpand(String element) { + if (this.expand == null) { + this.expand = new ArrayList<>(); + } + this.expand.add(element); + return this; + } + + /** + * Add all elements to `expand` list. A list is initialized for the first `add/addAll` call, and + * subsequent calls adds additional elements to the original list. See {@link + * PaymentRecordReportRefundParams#expand} for the field documentation. + */ + public Builder addAllExpand(List elements) { + if (this.expand == null) { + this.expand = new ArrayList<>(); + } + this.expand.addAll(elements); + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` + * call, and subsequent calls add additional key/value pairs to the original map. See {@link + * PaymentRecordReportRefundParams#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 PaymentRecordReportRefundParams#extraParams} for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** When the reported refund was initiated. Measured in seconds since the Unix epoch. */ + public Builder setInitiatedAt(Long initiatedAt) { + this.initiatedAt = initiatedAt; + return this; + } + + /** + * Add a key/value pair to `metadata` 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 + * PaymentRecordReportRefundParams#metadata} for the field documentation. + */ + @SuppressWarnings("unchecked") + public Builder putMetadata(String key, String value) { + if (this.metadata == null || this.metadata instanceof EmptyParam) { + this.metadata = new HashMap(); + } + ((Map) this.metadata).put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `metadata` 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 PaymentRecordReportRefundParams#metadata} for the field documentation. + */ + @SuppressWarnings("unchecked") + public Builder putAllMetadata(Map map) { + if (this.metadata == null || this.metadata instanceof EmptyParam) { + this.metadata = new HashMap(); + } + ((Map) this.metadata).putAll(map); + return this; + } + + /** + * Set of key-value pairs that you can attach + * to an object. This can be useful for storing additional information about the object in a + * structured format. Individual keys can be unset by posting an empty value to them. All keys + * can be unset by posting an empty value to {@code metadata}. + */ + public Builder setMetadata(EmptyParam metadata) { + this.metadata = metadata; + return this; + } + + /** + * Set of key-value pairs that you can attach + * to an object. This can be useful for storing additional information about the object in a + * structured format. Individual keys can be unset by posting an empty value to them. All keys + * can be unset by posting an empty value to {@code metadata}. + */ + public Builder setMetadata(Map metadata) { + this.metadata = metadata; + return this; + } + + /** Required. The outcome of the reported refund. */ + public Builder setOutcome(PaymentRecordReportRefundParams.Outcome outcome) { + this.outcome = outcome; + return this; + } + + /** Required. Processor information for this refund. */ + public Builder setProcessorDetails( + PaymentRecordReportRefundParams.ProcessorDetails processorDetails) { + this.processorDetails = processorDetails; + return this; + } + + /** Required. Information about the payment attempt refund. */ + public Builder setRefunded(PaymentRecordReportRefundParams.Refunded refunded) { + this.refunded = refunded; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Amount { + /** + * Required. Three-letter ISO currency code, in lowercase. + * Must be a supported currency. + */ + @SerializedName("currency") + String currency; + + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-level field (serialized) name in this + * param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Required. A positive integer representing the amount in the currency's minor unit. For example, {@code + * 100} can represent 1 USD or 100 JPY. + */ + @SerializedName("value") + Long value; + + private Amount(String currency, Map extraParams, Long value) { + this.currency = currency; + this.extraParams = extraParams; + this.value = value; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private String currency; + + private Map extraParams; + + private Long value; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentRecordReportRefundParams.Amount build() { + return new PaymentRecordReportRefundParams.Amount( + this.currency, this.extraParams, this.value); + } + + /** + * Required. Three-letter ISO currency code, in + * lowercase. Must be a supported currency. + */ + public Builder setCurrency(String currency) { + this.currency = currency; + 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 + * PaymentRecordReportRefundParams.Amount#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 PaymentRecordReportRefundParams.Amount#extraParams} for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Required. A positive integer representing the amount in the currency's minor unit. For example, {@code + * 100} can represent 1 USD or 100 JPY. + */ + public Builder setValue(Long value) { + this.value = value; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class ProcessorDetails { + /** Information about the custom processor used to make this refund. */ + @SerializedName("custom") + Custom custom; + + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-level field (serialized) name in this + * param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Required. The type of the processor details. An additional hash is included + * on processor_details with a name matching this value. It contains additional information + * specific to the processor. + */ + @SerializedName("type") + Type type; + + private ProcessorDetails(Custom custom, Map extraParams, Type type) { + this.custom = custom; + this.extraParams = extraParams; + this.type = type; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Custom custom; + + private Map extraParams; + + private Type type; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentRecordReportRefundParams.ProcessorDetails build() { + return new PaymentRecordReportRefundParams.ProcessorDetails( + this.custom, this.extraParams, this.type); + } + + /** Information about the custom processor used to make this refund. */ + public Builder setCustom(PaymentRecordReportRefundParams.ProcessorDetails.Custom custom) { + this.custom = custom; + 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 + * PaymentRecordReportRefundParams.ProcessorDetails#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 PaymentRecordReportRefundParams.ProcessorDetails#extraParams} for the field + * documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Required. The type of the processor details. An additional hash is + * included on processor_details with a name matching this value. It contains additional + * information specific to the processor. + */ + public Builder setType(PaymentRecordReportRefundParams.ProcessorDetails.Type type) { + this.type = type; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Custom { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Required. A reference to the external refund. This field must be unique + * across all refunds. + */ + @SerializedName("refund_reference") + String refundReference; + + private Custom(Map extraParams, String refundReference) { + this.extraParams = extraParams; + this.refundReference = refundReference; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private String refundReference; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentRecordReportRefundParams.ProcessorDetails.Custom build() { + return new PaymentRecordReportRefundParams.ProcessorDetails.Custom( + this.extraParams, this.refundReference); + } + + /** + * 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 PaymentRecordReportRefundParams.ProcessorDetails.Custom#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 PaymentRecordReportRefundParams.ProcessorDetails.Custom#extraParams} for + * the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Required. A reference to the external refund. This field must be unique + * across all refunds. + */ + public Builder setRefundReference(String refundReference) { + this.refundReference = refundReference; + return this; + } + } + } + + public enum Type implements ApiRequestParams.EnumParam { + @SerializedName("custom") + CUSTOM("custom"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Type(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Refunded { + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-level field (serialized) name in this + * param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Required. When the reported refund completed. Measured in seconds since the + * Unix epoch. + */ + @SerializedName("refunded_at") + Long refundedAt; + + private Refunded(Map extraParams, Long refundedAt) { + this.extraParams = extraParams; + this.refundedAt = refundedAt; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Long refundedAt; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentRecordReportRefundParams.Refunded build() { + return new PaymentRecordReportRefundParams.Refunded(this.extraParams, this.refundedAt); + } + + /** + * 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 + * PaymentRecordReportRefundParams.Refunded#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 PaymentRecordReportRefundParams.Refunded#extraParams} for the field + * documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Required. When the reported refund completed. Measured in seconds since + * the Unix epoch. + */ + public Builder setRefundedAt(Long refundedAt) { + this.refundedAt = refundedAt; + return this; + } + } + } + + public enum Outcome implements ApiRequestParams.EnumParam { + @SerializedName("refunded") + REFUNDED("refunded"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Outcome(String value) { + this.value = value; + } + } +} diff --git a/src/main/java/com/stripe/param/SetupIntentCreateParams.java b/src/main/java/com/stripe/param/SetupIntentCreateParams.java index 97bbb382576..581dcd7ec9b 100644 --- a/src/main/java/com/stripe/param/SetupIntentCreateParams.java +++ b/src/main/java/com/stripe/param/SetupIntentCreateParams.java @@ -70,6 +70,10 @@ public class SetupIntentCreateParams extends ApiRequestParams { @SerializedName("description") String description; + /** The list of payment method types to exclude from use with this SetupIntent. */ + @SerializedName("excluded_payment_method_types") + List excludedPaymentMethodTypes; + /** Specifies which fields in the response should be expanded. */ @SerializedName("expand") List expand; @@ -198,6 +202,7 @@ private SetupIntentCreateParams( String customer, String customerAccount, String description, + List excludedPaymentMethodTypes, List expand, Map extraParams, List flowDirections, @@ -221,6 +226,7 @@ private SetupIntentCreateParams( this.customer = customer; this.customerAccount = customerAccount; this.description = description; + this.excludedPaymentMethodTypes = excludedPaymentMethodTypes; this.expand = expand; this.extraParams = extraParams; this.flowDirections = flowDirections; @@ -258,6 +264,8 @@ public static class Builder { private String description; + private List excludedPaymentMethodTypes; + private List expand; private Map extraParams; @@ -300,6 +308,7 @@ public SetupIntentCreateParams build() { this.customer, this.customerAccount, this.description, + this.excludedPaymentMethodTypes, this.expand, this.extraParams, this.flowDirections, @@ -393,6 +402,34 @@ public Builder setDescription(String description) { return this; } + /** + * Add an element to `excludedPaymentMethodTypes` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original list. See + * {@link SetupIntentCreateParams#excludedPaymentMethodTypes} for the field documentation. + */ + public Builder addExcludedPaymentMethodType( + SetupIntentCreateParams.ExcludedPaymentMethodType element) { + if (this.excludedPaymentMethodTypes == null) { + this.excludedPaymentMethodTypes = new ArrayList<>(); + } + this.excludedPaymentMethodTypes.add(element); + return this; + } + + /** + * Add all elements to `excludedPaymentMethodTypes` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original list. See + * {@link SetupIntentCreateParams#excludedPaymentMethodTypes} for the field documentation. + */ + public Builder addAllExcludedPaymentMethodType( + List elements) { + if (this.excludedPaymentMethodTypes == null) { + this.excludedPaymentMethodTypes = new ArrayList<>(); + } + this.excludedPaymentMethodTypes.addAll(elements); + return this; + } + /** * Add an element to `expand` list. A list is initialized for the first `add/addAll` call, and * subsequent calls adds additional elements to the original list. See {@link @@ -12797,6 +12834,183 @@ public Builder putAllExtraParam(Map map) { } } + public enum ExcludedPaymentMethodType implements ApiRequestParams.EnumParam { + @SerializedName("acss_debit") + ACSS_DEBIT("acss_debit"), + + @SerializedName("affirm") + AFFIRM("affirm"), + + @SerializedName("afterpay_clearpay") + AFTERPAY_CLEARPAY("afterpay_clearpay"), + + @SerializedName("alipay") + ALIPAY("alipay"), + + @SerializedName("alma") + ALMA("alma"), + + @SerializedName("amazon_pay") + AMAZON_PAY("amazon_pay"), + + @SerializedName("au_becs_debit") + AU_BECS_DEBIT("au_becs_debit"), + + @SerializedName("bacs_debit") + BACS_DEBIT("bacs_debit"), + + @SerializedName("bancontact") + BANCONTACT("bancontact"), + + @SerializedName("billie") + BILLIE("billie"), + + @SerializedName("blik") + BLIK("blik"), + + @SerializedName("boleto") + BOLETO("boleto"), + + @SerializedName("card") + CARD("card"), + + @SerializedName("cashapp") + CASHAPP("cashapp"), + + @SerializedName("crypto") + CRYPTO("crypto"), + + @SerializedName("customer_balance") + CUSTOMER_BALANCE("customer_balance"), + + @SerializedName("eps") + EPS("eps"), + + @SerializedName("fpx") + FPX("fpx"), + + @SerializedName("giropay") + GIROPAY("giropay"), + + @SerializedName("gopay") + GOPAY("gopay"), + + @SerializedName("grabpay") + GRABPAY("grabpay"), + + @SerializedName("id_bank_transfer") + ID_BANK_TRANSFER("id_bank_transfer"), + + @SerializedName("ideal") + IDEAL("ideal"), + + @SerializedName("kakao_pay") + KAKAO_PAY("kakao_pay"), + + @SerializedName("klarna") + KLARNA("klarna"), + + @SerializedName("konbini") + KONBINI("konbini"), + + @SerializedName("kr_card") + KR_CARD("kr_card"), + + @SerializedName("mb_way") + MB_WAY("mb_way"), + + @SerializedName("mobilepay") + MOBILEPAY("mobilepay"), + + @SerializedName("multibanco") + MULTIBANCO("multibanco"), + + @SerializedName("naver_pay") + NAVER_PAY("naver_pay"), + + @SerializedName("nz_bank_account") + NZ_BANK_ACCOUNT("nz_bank_account"), + + @SerializedName("oxxo") + OXXO("oxxo"), + + @SerializedName("p24") + P24("p24"), + + @SerializedName("pay_by_bank") + PAY_BY_BANK("pay_by_bank"), + + @SerializedName("payco") + PAYCO("payco"), + + @SerializedName("paynow") + PAYNOW("paynow"), + + @SerializedName("paypal") + PAYPAL("paypal"), + + @SerializedName("paypay") + PAYPAY("paypay"), + + @SerializedName("payto") + PAYTO("payto"), + + @SerializedName("pix") + PIX("pix"), + + @SerializedName("promptpay") + PROMPTPAY("promptpay"), + + @SerializedName("qris") + QRIS("qris"), + + @SerializedName("rechnung") + RECHNUNG("rechnung"), + + @SerializedName("revolut_pay") + REVOLUT_PAY("revolut_pay"), + + @SerializedName("samsung_pay") + SAMSUNG_PAY("samsung_pay"), + + @SerializedName("satispay") + SATISPAY("satispay"), + + @SerializedName("sepa_debit") + SEPA_DEBIT("sepa_debit"), + + @SerializedName("shopeepay") + SHOPEEPAY("shopeepay"), + + @SerializedName("sofort") + SOFORT("sofort"), + + @SerializedName("stripe_balance") + STRIPE_BALANCE("stripe_balance"), + + @SerializedName("swish") + SWISH("swish"), + + @SerializedName("twint") + TWINT("twint"), + + @SerializedName("us_bank_account") + US_BANK_ACCOUNT("us_bank_account"), + + @SerializedName("wechat_pay") + WECHAT_PAY("wechat_pay"), + + @SerializedName("zip") + ZIP("zip"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + ExcludedPaymentMethodType(String value) { + this.value = value; + } + } + public enum FlowDirection implements ApiRequestParams.EnumParam { @SerializedName("inbound") INBOUND("inbound"), diff --git a/src/main/java/com/stripe/param/SetupIntentUpdateParams.java b/src/main/java/com/stripe/param/SetupIntentUpdateParams.java index d23e18aabca..84c226e7c86 100644 --- a/src/main/java/com/stripe/param/SetupIntentUpdateParams.java +++ b/src/main/java/com/stripe/param/SetupIntentUpdateParams.java @@ -46,6 +46,10 @@ public class SetupIntentUpdateParams extends ApiRequestParams { @SerializedName("description") Object description; + /** The list of payment method types to exclude from use with this SetupIntent. */ + @SerializedName("excluded_payment_method_types") + Object excludedPaymentMethodTypes; + /** Specifies which fields in the response should be expanded. */ @SerializedName("expand") List expand; @@ -124,6 +128,7 @@ private SetupIntentUpdateParams( Object customer, Object customerAccount, Object description, + Object excludedPaymentMethodTypes, List expand, Map extraParams, List flowDirections, @@ -138,6 +143,7 @@ private SetupIntentUpdateParams( this.customer = customer; this.customerAccount = customerAccount; this.description = description; + this.excludedPaymentMethodTypes = excludedPaymentMethodTypes; this.expand = expand; this.extraParams = extraParams; this.flowDirections = flowDirections; @@ -163,6 +169,8 @@ public static class Builder { private Object description; + private Object excludedPaymentMethodTypes; + private List expand; private Map extraParams; @@ -190,6 +198,7 @@ public SetupIntentUpdateParams build() { this.customer, this.customerAccount, this.description, + this.excludedPaymentMethodTypes, this.expand, this.extraParams, this.flowDirections, @@ -274,6 +283,55 @@ public Builder setDescription(EmptyParam description) { return this; } + /** + * Add an element to `excludedPaymentMethodTypes` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original list. See + * {@link SetupIntentUpdateParams#excludedPaymentMethodTypes} for the field documentation. + */ + @SuppressWarnings("unchecked") + public Builder addExcludedPaymentMethodType( + SetupIntentUpdateParams.ExcludedPaymentMethodType element) { + if (this.excludedPaymentMethodTypes == null + || this.excludedPaymentMethodTypes instanceof EmptyParam) { + this.excludedPaymentMethodTypes = + new ArrayList(); + } + ((List) this.excludedPaymentMethodTypes) + .add(element); + return this; + } + + /** + * Add all elements to `excludedPaymentMethodTypes` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original list. See + * {@link SetupIntentUpdateParams#excludedPaymentMethodTypes} for the field documentation. + */ + @SuppressWarnings("unchecked") + public Builder addAllExcludedPaymentMethodType( + List elements) { + if (this.excludedPaymentMethodTypes == null + || this.excludedPaymentMethodTypes instanceof EmptyParam) { + this.excludedPaymentMethodTypes = + new ArrayList(); + } + ((List) this.excludedPaymentMethodTypes) + .addAll(elements); + return this; + } + + /** The list of payment method types to exclude from use with this SetupIntent. */ + public Builder setExcludedPaymentMethodTypes(EmptyParam excludedPaymentMethodTypes) { + this.excludedPaymentMethodTypes = excludedPaymentMethodTypes; + return this; + } + + /** The list of payment method types to exclude from use with this SetupIntent. */ + public Builder setExcludedPaymentMethodTypes( + List excludedPaymentMethodTypes) { + this.excludedPaymentMethodTypes = excludedPaymentMethodTypes; + return this; + } + /** * Add an element to `expand` list. A list is initialized for the first `add/addAll` call, and * subsequent calls adds additional elements to the original list. See {@link @@ -12433,6 +12491,183 @@ public Builder setSiret(EmptyParam siret) { } } + public enum ExcludedPaymentMethodType implements ApiRequestParams.EnumParam { + @SerializedName("acss_debit") + ACSS_DEBIT("acss_debit"), + + @SerializedName("affirm") + AFFIRM("affirm"), + + @SerializedName("afterpay_clearpay") + AFTERPAY_CLEARPAY("afterpay_clearpay"), + + @SerializedName("alipay") + ALIPAY("alipay"), + + @SerializedName("alma") + ALMA("alma"), + + @SerializedName("amazon_pay") + AMAZON_PAY("amazon_pay"), + + @SerializedName("au_becs_debit") + AU_BECS_DEBIT("au_becs_debit"), + + @SerializedName("bacs_debit") + BACS_DEBIT("bacs_debit"), + + @SerializedName("bancontact") + BANCONTACT("bancontact"), + + @SerializedName("billie") + BILLIE("billie"), + + @SerializedName("blik") + BLIK("blik"), + + @SerializedName("boleto") + BOLETO("boleto"), + + @SerializedName("card") + CARD("card"), + + @SerializedName("cashapp") + CASHAPP("cashapp"), + + @SerializedName("crypto") + CRYPTO("crypto"), + + @SerializedName("customer_balance") + CUSTOMER_BALANCE("customer_balance"), + + @SerializedName("eps") + EPS("eps"), + + @SerializedName("fpx") + FPX("fpx"), + + @SerializedName("giropay") + GIROPAY("giropay"), + + @SerializedName("gopay") + GOPAY("gopay"), + + @SerializedName("grabpay") + GRABPAY("grabpay"), + + @SerializedName("id_bank_transfer") + ID_BANK_TRANSFER("id_bank_transfer"), + + @SerializedName("ideal") + IDEAL("ideal"), + + @SerializedName("kakao_pay") + KAKAO_PAY("kakao_pay"), + + @SerializedName("klarna") + KLARNA("klarna"), + + @SerializedName("konbini") + KONBINI("konbini"), + + @SerializedName("kr_card") + KR_CARD("kr_card"), + + @SerializedName("mb_way") + MB_WAY("mb_way"), + + @SerializedName("mobilepay") + MOBILEPAY("mobilepay"), + + @SerializedName("multibanco") + MULTIBANCO("multibanco"), + + @SerializedName("naver_pay") + NAVER_PAY("naver_pay"), + + @SerializedName("nz_bank_account") + NZ_BANK_ACCOUNT("nz_bank_account"), + + @SerializedName("oxxo") + OXXO("oxxo"), + + @SerializedName("p24") + P24("p24"), + + @SerializedName("pay_by_bank") + PAY_BY_BANK("pay_by_bank"), + + @SerializedName("payco") + PAYCO("payco"), + + @SerializedName("paynow") + PAYNOW("paynow"), + + @SerializedName("paypal") + PAYPAL("paypal"), + + @SerializedName("paypay") + PAYPAY("paypay"), + + @SerializedName("payto") + PAYTO("payto"), + + @SerializedName("pix") + PIX("pix"), + + @SerializedName("promptpay") + PROMPTPAY("promptpay"), + + @SerializedName("qris") + QRIS("qris"), + + @SerializedName("rechnung") + RECHNUNG("rechnung"), + + @SerializedName("revolut_pay") + REVOLUT_PAY("revolut_pay"), + + @SerializedName("samsung_pay") + SAMSUNG_PAY("samsung_pay"), + + @SerializedName("satispay") + SATISPAY("satispay"), + + @SerializedName("sepa_debit") + SEPA_DEBIT("sepa_debit"), + + @SerializedName("shopeepay") + SHOPEEPAY("shopeepay"), + + @SerializedName("sofort") + SOFORT("sofort"), + + @SerializedName("stripe_balance") + STRIPE_BALANCE("stripe_balance"), + + @SerializedName("swish") + SWISH("swish"), + + @SerializedName("twint") + TWINT("twint"), + + @SerializedName("us_bank_account") + US_BANK_ACCOUNT("us_bank_account"), + + @SerializedName("wechat_pay") + WECHAT_PAY("wechat_pay"), + + @SerializedName("zip") + ZIP("zip"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + ExcludedPaymentMethodType(String value) { + this.value = value; + } + } + public enum FlowDirection implements ApiRequestParams.EnumParam { @SerializedName("inbound") INBOUND("inbound"), diff --git a/src/main/java/com/stripe/param/TokenCreateParams.java b/src/main/java/com/stripe/param/TokenCreateParams.java index 97f43408949..857516bf055 100644 --- a/src/main/java/com/stripe/param/TokenCreateParams.java +++ b/src/main/java/com/stripe/param/TokenCreateParams.java @@ -489,6 +489,13 @@ public static class Company { @SerializedName("registration_number") String registrationNumber; + /** + * This hash is used to attest that the representative is authorized to act as the + * representative of their legal entity. + */ + @SerializedName("representative_declaration") + RepresentativeDeclaration representativeDeclaration; + /** * The category identifying the legal structure of the company or legal entity. See Business @@ -539,6 +546,7 @@ private Company( String phone, Object registrationDate, String registrationNumber, + RepresentativeDeclaration representativeDeclaration, ApiRequestParams.EnumParam structure, String taxId, String taxIdRegistrar, @@ -563,6 +571,7 @@ private Company( this.phone = phone; this.registrationDate = registrationDate; this.registrationNumber = registrationNumber; + this.representativeDeclaration = representativeDeclaration; this.structure = structure; this.taxId = taxId; this.taxIdRegistrar = taxIdRegistrar; @@ -613,6 +622,8 @@ public static class Builder { private String registrationNumber; + private RepresentativeDeclaration representativeDeclaration; + private ApiRequestParams.EnumParam structure; private String taxId; @@ -645,6 +656,7 @@ public TokenCreateParams.Account.Company build() { this.phone, this.registrationDate, this.registrationNumber, + this.representativeDeclaration, this.structure, this.taxId, this.taxIdRegistrar, @@ -853,6 +865,16 @@ public Builder setRegistrationNumber(String registrationNumber) { return this; } + /** + * This hash is used to attest that the representative is authorized to act as the + * representative of their legal entity. + */ + public Builder setRepresentativeDeclaration( + TokenCreateParams.Account.Company.RepresentativeDeclaration representativeDeclaration) { + this.representativeDeclaration = representativeDeclaration; + return this; + } + /** * The category identifying the legal structure of the company or legal entity. See Business @@ -1712,6 +1734,116 @@ public Builder setYear(Long year) { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class RepresentativeDeclaration { + /** The Unix timestamp marking when the representative 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 representative declaration attestation was made. */ + @SerializedName("ip") + String ip; + + /** + * The user agent of the browser from which the representative declaration attestation was + * made. + */ + @SerializedName("user_agent") + String userAgent; + + private RepresentativeDeclaration( + 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.RepresentativeDeclaration build() { + return new TokenCreateParams.Account.Company.RepresentativeDeclaration( + this.date, this.extraParams, this.ip, this.userAgent); + } + + /** + * The Unix timestamp marking when the representative 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.RepresentativeDeclaration#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.RepresentativeDeclaration#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 representative declaration attestation was made. */ + public Builder setIp(String ip) { + this.ip = ip; + return this; + } + + /** + * The user agent of the browser from which the representative declaration attestation was + * made. + */ + public Builder setUserAgent(String userAgent) { + this.userAgent = userAgent; + return this; + } + } + } + @Getter @EqualsAndHashCode(callSuper = false) public static class Verification { diff --git a/src/main/java/com/stripe/param/TransferCreateParams.java b/src/main/java/com/stripe/param/TransferCreateParams.java index 743429fce1f..3379e80cc42 100644 --- a/src/main/java/com/stripe/param/TransferCreateParams.java +++ b/src/main/java/com/stripe/param/TransferCreateParams.java @@ -17,6 +17,9 @@ public class TransferCreateParams extends ApiRequestParams { @SerializedName("amount") Long amount; + @SerializedName("application_fee_amount") + Long applicationFeeAmount; + /** * Required. Three-letter ISO code for currency in lowercase. @@ -93,6 +96,7 @@ public class TransferCreateParams extends ApiRequestParams { private TransferCreateParams( Long amount, + Long applicationFeeAmount, String currency, String description, String destination, @@ -104,6 +108,7 @@ private TransferCreateParams( SourceType sourceType, String transferGroup) { this.amount = amount; + this.applicationFeeAmount = applicationFeeAmount; this.currency = currency; this.description = description; this.destination = destination; @@ -123,6 +128,8 @@ public static Builder builder() { public static class Builder { private Long amount; + private Long applicationFeeAmount; + private String currency; private String description; @@ -147,6 +154,7 @@ public static class Builder { public TransferCreateParams build() { return new TransferCreateParams( this.amount, + this.applicationFeeAmount, this.currency, this.description, this.destination, @@ -165,6 +173,11 @@ public Builder setAmount(Long amount) { return this; } + public Builder setApplicationFeeAmount(Long applicationFeeAmount) { + this.applicationFeeAmount = applicationFeeAmount; + return this; + } + /** * Required. Three-letter ISO code for currency in diff --git a/src/main/java/com/stripe/param/WebhookEndpointCreateParams.java b/src/main/java/com/stripe/param/WebhookEndpointCreateParams.java index bacda0115a8..b11e22a20e9 100644 --- a/src/main/java/com/stripe/param/WebhookEndpointCreateParams.java +++ b/src/main/java/com/stripe/param/WebhookEndpointCreateParams.java @@ -630,7 +630,10 @@ public enum ApiVersion implements ApiRequestParams.EnumParam { VERSION_2025_08_27_BASIL("2025-08-27.basil"), @SerializedName("2025-09-30.clover") - VERSION_2025_09_30_CLOVER("2025-09-30.clover"); + VERSION_2025_09_30_CLOVER("2025-09-30.clover"), + + @SerializedName("2025-10-29.clover") + VERSION_2025_10_29_CLOVER("2025-10-29.clover"); @Getter(onMethod_ = {@Override}) private final String value; diff --git a/src/main/java/com/stripe/param/billing/CreditGrantCreateParams.java b/src/main/java/com/stripe/param/billing/CreditGrantCreateParams.java index ceb1128e6e5..fe05add3b62 100644 --- a/src/main/java/com/stripe/param/billing/CreditGrantCreateParams.java +++ b/src/main/java/com/stripe/param/billing/CreditGrantCreateParams.java @@ -26,7 +26,7 @@ public class CreditGrantCreateParams extends ApiRequestParams { @SerializedName("applicability_config") ApplicabilityConfig applicabilityConfig; - /** Required. The category of this credit grant. */ + /** The category of this credit grant. It defaults to {@code paid} if not specified. */ @SerializedName("category") Category category; @@ -172,7 +172,7 @@ public Builder setApplicabilityConfig( return this; } - /** Required. The category of this credit grant. */ + /** The category of this credit grant. It defaults to {@code paid} if not specified. */ public Builder setCategory(CreditGrantCreateParams.Category category) { this.category = category; return this; diff --git a/src/main/java/com/stripe/param/billing/analytics/MeterUsageRetrieveParams.java b/src/main/java/com/stripe/param/billing/analytics/MeterUsageRetrieveParams.java index 3bae6bd8753..dc39e5d9129 100644 --- a/src/main/java/com/stripe/param/billing/analytics/MeterUsageRetrieveParams.java +++ b/src/main/java/com/stripe/param/billing/analytics/MeterUsageRetrieveParams.java @@ -271,17 +271,26 @@ public static class Meter { @SerializedName("tenant_filters") Map tenantFilters; + /** + * List of high cardinality tenant dimension keys to group by. If specified, usage events will + * be grouped by the given tenant dimension key's values. + */ + @SerializedName("tenant_group_by_keys") + List tenantGroupByKeys; + private Meter( Map dimensionFilters, List dimensionGroupByKeys, Map extraParams, String meter, - Map tenantFilters) { + Map tenantFilters, + List tenantGroupByKeys) { this.dimensionFilters = dimensionFilters; this.dimensionGroupByKeys = dimensionGroupByKeys; this.extraParams = extraParams; this.meter = meter; this.tenantFilters = tenantFilters; + this.tenantGroupByKeys = tenantGroupByKeys; } public static Builder builder() { @@ -299,6 +308,8 @@ public static class Builder { private Map tenantFilters; + private List tenantGroupByKeys; + /** Finalize and obtain parameter instance from this builder. */ public MeterUsageRetrieveParams.Meter build() { return new MeterUsageRetrieveParams.Meter( @@ -306,7 +317,8 @@ public MeterUsageRetrieveParams.Meter build() { this.dimensionGroupByKeys, this.extraParams, this.meter, - this.tenantFilters); + this.tenantFilters, + this.tenantGroupByKeys); } /** @@ -418,6 +430,32 @@ public Builder putAllTenantFilter(Map map) { this.tenantFilters.putAll(map); return this; } + + /** + * Add an element to `tenantGroupByKeys` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original list. See + * {@link MeterUsageRetrieveParams.Meter#tenantGroupByKeys} for the field documentation. + */ + public Builder addTenantGroupByKey(String element) { + if (this.tenantGroupByKeys == null) { + this.tenantGroupByKeys = new ArrayList<>(); + } + this.tenantGroupByKeys.add(element); + return this; + } + + /** + * Add all elements to `tenantGroupByKeys` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original list. See + * {@link MeterUsageRetrieveParams.Meter#tenantGroupByKeys} for the field documentation. + */ + public Builder addAllTenantGroupByKey(List elements) { + if (this.tenantGroupByKeys == null) { + this.tenantGroupByKeys = new ArrayList<>(); + } + this.tenantGroupByKeys.addAll(elements); + return this; + } } } diff --git a/src/main/java/com/stripe/param/billingportal/ConfigurationCreateParams.java b/src/main/java/com/stripe/param/billingportal/ConfigurationCreateParams.java index d6db907fe3a..2b6d5ac1d0f 100644 --- a/src/main/java/com/stripe/param/billingportal/ConfigurationCreateParams.java +++ b/src/main/java/com/stripe/param/billingportal/ConfigurationCreateParams.java @@ -752,9 +752,21 @@ public static class PaymentMethodUpdate { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - private PaymentMethodUpdate(Boolean enabled, Map extraParams) { + /** + * The Payment Method + * Configuration to use for this portal session. When specified, customers will be able to + * update their payment method to one of the options specified by the payment method + * configuration. If not set or set to an empty string, the default payment method + * configuration is used. + */ + @SerializedName("payment_method_configuration") + Object paymentMethodConfiguration; + + private PaymentMethodUpdate( + Boolean enabled, Map extraParams, Object paymentMethodConfiguration) { this.enabled = enabled; this.extraParams = extraParams; + this.paymentMethodConfiguration = paymentMethodConfiguration; } public static Builder builder() { @@ -766,10 +778,12 @@ public static class Builder { private Map extraParams; + private Object paymentMethodConfiguration; + /** Finalize and obtain parameter instance from this builder. */ public ConfigurationCreateParams.Features.PaymentMethodUpdate build() { return new ConfigurationCreateParams.Features.PaymentMethodUpdate( - this.enabled, this.extraParams); + this.enabled, this.extraParams, this.paymentMethodConfiguration); } /** Required. Whether the feature is enabled. */ @@ -805,6 +819,30 @@ public Builder putAllExtraParam(Map map) { this.extraParams.putAll(map); return this; } + + /** + * The Payment Method + * Configuration to use for this portal session. When specified, customers will be able + * to update their payment method to one of the options specified by the payment method + * configuration. If not set or set to an empty string, the default payment method + * configuration is used. + */ + public Builder setPaymentMethodConfiguration(String paymentMethodConfiguration) { + this.paymentMethodConfiguration = paymentMethodConfiguration; + return this; + } + + /** + * The Payment Method + * Configuration to use for this portal session. When specified, customers will be able + * to update their payment method to one of the options specified by the payment method + * configuration. If not set or set to an empty string, the default payment method + * configuration is used. + */ + public Builder setPaymentMethodConfiguration(EmptyParam paymentMethodConfiguration) { + this.paymentMethodConfiguration = paymentMethodConfiguration; + return this; + } } } diff --git a/src/main/java/com/stripe/param/billingportal/ConfigurationUpdateParams.java b/src/main/java/com/stripe/param/billingportal/ConfigurationUpdateParams.java index f8937cb78fe..cc2c2da7c24 100644 --- a/src/main/java/com/stripe/param/billingportal/ConfigurationUpdateParams.java +++ b/src/main/java/com/stripe/param/billingportal/ConfigurationUpdateParams.java @@ -803,9 +803,21 @@ public static class PaymentMethodUpdate { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - private PaymentMethodUpdate(Boolean enabled, Map extraParams) { + /** + * The Payment Method + * Configuration to use for this portal session. When specified, customers will be able to + * update their payment method to one of the options specified by the payment method + * configuration. If not set or set to an empty string, the default payment method + * configuration is used. + */ + @SerializedName("payment_method_configuration") + Object paymentMethodConfiguration; + + private PaymentMethodUpdate( + Boolean enabled, Map extraParams, Object paymentMethodConfiguration) { this.enabled = enabled; this.extraParams = extraParams; + this.paymentMethodConfiguration = paymentMethodConfiguration; } public static Builder builder() { @@ -817,10 +829,12 @@ public static class Builder { private Map extraParams; + private Object paymentMethodConfiguration; + /** Finalize and obtain parameter instance from this builder. */ public ConfigurationUpdateParams.Features.PaymentMethodUpdate build() { return new ConfigurationUpdateParams.Features.PaymentMethodUpdate( - this.enabled, this.extraParams); + this.enabled, this.extraParams, this.paymentMethodConfiguration); } /** Required. Whether the feature is enabled. */ @@ -856,6 +870,30 @@ public Builder putAllExtraParam(Map map) { this.extraParams.putAll(map); return this; } + + /** + * The Payment Method + * Configuration to use for this portal session. When specified, customers will be able + * to update their payment method to one of the options specified by the payment method + * configuration. If not set or set to an empty string, the default payment method + * configuration is used. + */ + public Builder setPaymentMethodConfiguration(String paymentMethodConfiguration) { + this.paymentMethodConfiguration = paymentMethodConfiguration; + return this; + } + + /** + * The Payment Method + * Configuration to use for this portal session. When specified, customers will be able + * to update their payment method to one of the options specified by the payment method + * configuration. If not set or set to an empty string, the default payment method + * configuration is used. + */ + public Builder setPaymentMethodConfiguration(EmptyParam paymentMethodConfiguration) { + this.paymentMethodConfiguration = paymentMethodConfiguration; + return this; + } } } diff --git a/src/main/java/com/stripe/param/checkout/SessionCreateParams.java b/src/main/java/com/stripe/param/checkout/SessionCreateParams.java index 2d2db15fabd..2802a10701b 100644 --- a/src/main/java/com/stripe/param/checkout/SessionCreateParams.java +++ b/src/main/java/com/stripe/param/checkout/SessionCreateParams.java @@ -1851,7 +1851,11 @@ public static class BrandingSettings { @SerializedName("button_color") Object buttonColor; - /** A string to override the business name shown on the Checkout Session. */ + /** + * A string to override the business name shown on the Checkout Session. This only shows at the + * top of the Checkout page, and your business name still appears in terms, receipts, and other + * places. + */ @SerializedName("display_name") String displayName; @@ -1872,11 +1876,11 @@ public static class BrandingSettings { @SerializedName("font_family") ApiRequestParams.EnumParam fontFamily; - /** The icon for the Checkout Session. You cannot set both {@code logo} and {@code icon}. */ + /** The icon for the Checkout Session. For best results, use a square image. */ @SerializedName("icon") Icon icon; - /** The logo for the Checkout Session. You cannot set both {@code logo} and {@code icon}. */ + /** The logo for the Checkout Session. */ @SerializedName("logo") Logo logo; @@ -1981,7 +1985,11 @@ public Builder setButtonColor(EmptyParam buttonColor) { return this; } - /** A string to override the business name shown on the Checkout Session. */ + /** + * A string to override the business name shown on the Checkout Session. This only shows at + * the top of the Checkout page, and your business name still appears in terms, receipts, and + * other places. + */ public Builder setDisplayName(String displayName) { this.displayName = displayName; return this; @@ -2033,13 +2041,13 @@ public Builder setFontFamily(EmptyParam fontFamily) { return this; } - /** The icon for the Checkout Session. You cannot set both {@code logo} and {@code icon}. */ + /** The icon for the Checkout Session. For best results, use a square image. */ public Builder setIcon(SessionCreateParams.BrandingSettings.Icon icon) { this.icon = icon; return this; } - /** The logo for the Checkout Session. You cannot set both {@code logo} and {@code icon}. */ + /** The logo for the Checkout Session. */ public Builder setLogo(SessionCreateParams.BrandingSettings.Logo logo) { this.logo = logo; return this; @@ -8213,6 +8221,10 @@ public static class PaymentMethodOptions { @SerializedName("swish") Swish swish; + /** contains details about the TWINT payment method options. */ + @SerializedName("twint") + Twint twint; + /** contains details about the Us Bank Account payment method options. */ @SerializedName("us_bank_account") UsBankAccount usBankAccount; @@ -8265,6 +8277,7 @@ private PaymentMethodOptions( SepaDebit sepaDebit, Sofort sofort, Swish swish, + Twint twint, UsBankAccount usBankAccount, WechatPay wechatPay) { this.acssDebit = acssDebit; @@ -8310,6 +8323,7 @@ private PaymentMethodOptions( this.sepaDebit = sepaDebit; this.sofort = sofort; this.swish = swish; + this.twint = twint; this.usBankAccount = usBankAccount; this.wechatPay = wechatPay; } @@ -8405,6 +8419,8 @@ public static class Builder { private Swish swish; + private Twint twint; + private UsBankAccount usBankAccount; private WechatPay wechatPay; @@ -8455,6 +8471,7 @@ public SessionCreateParams.PaymentMethodOptions build() { this.sepaDebit, this.sofort, this.swish, + this.twint, this.usBankAccount, this.wechatPay); } @@ -8741,6 +8758,12 @@ public Builder setSwish(SessionCreateParams.PaymentMethodOptions.Swish swish) { return this; } + /** contains details about the TWINT payment method options. */ + public Builder setTwint(SessionCreateParams.PaymentMethodOptions.Twint twint) { + this.twint = twint; + return this; + } + /** contains details about the Us Bank Account payment method options. */ public Builder setUsBankAccount( SessionCreateParams.PaymentMethodOptions.UsBankAccount usBankAccount) { @@ -16895,6 +16918,128 @@ public Builder setReference(String reference) { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Twint { + /** + * 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; + + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + *

If you provide a Customer with the PaymentIntent, you can use this parameter to attach the payment method to the + * Customer after the PaymentIntent is confirmed and the customer completes any required + * actions. If you don't provide a Customer, you can still attach the payment method to a + * Customer after the transaction completes. + * + *

If the payment method is {@code card_present} and isn't a digital wallet, Stripe creates + * and attaches a generated_card + * payment method representing the card to the Customer instead. + * + *

When processing card payments, Stripe uses {@code setup_future_usage} to help you comply + * with regional legislation and network rules, such as SCA. + */ + @SerializedName("setup_future_usage") + SetupFutureUsage setupFutureUsage; + + private Twint(Map extraParams, SetupFutureUsage setupFutureUsage) { + this.extraParams = extraParams; + this.setupFutureUsage = setupFutureUsage; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private SetupFutureUsage setupFutureUsage; + + /** Finalize and obtain parameter instance from this builder. */ + public SessionCreateParams.PaymentMethodOptions.Twint build() { + return new SessionCreateParams.PaymentMethodOptions.Twint( + this.extraParams, this.setupFutureUsage); + } + + /** + * 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.Twint#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.Twint#extraParams} for the field + * documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment + * method. + * + *

If you provide a Customer with the PaymentIntent, you can use this parameter to attach the payment method to + * the Customer after the PaymentIntent is confirmed and the customer completes any required + * actions. If you don't provide a Customer, you can still attach the payment method to a + * Customer after the transaction completes. + * + *

If the payment method is {@code card_present} and isn't a digital wallet, Stripe + * creates and attaches a generated_card + * payment method representing the card to the Customer instead. + * + *

When processing card payments, Stripe uses {@code setup_future_usage} to help you + * comply with regional legislation and network rules, such as SCA. + */ + public Builder setSetupFutureUsage( + SessionCreateParams.PaymentMethodOptions.Twint.SetupFutureUsage setupFutureUsage) { + this.setupFutureUsage = setupFutureUsage; + return this; + } + } + + public enum SetupFutureUsage implements ApiRequestParams.EnumParam { + @SerializedName("none") + NONE("none"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + SetupFutureUsage(String value) { + this.value = value; + } + } + } + @Getter @EqualsAndHashCode(callSuper = false) public static class UsBankAccount { diff --git a/src/main/java/com/stripe/param/delegatedcheckout/RequestedSessionConfirmParams.java b/src/main/java/com/stripe/param/delegatedcheckout/RequestedSessionConfirmParams.java index a478ab33f54..e6a1cd107a8 100644 --- a/src/main/java/com/stripe/param/delegatedcheckout/RequestedSessionConfirmParams.java +++ b/src/main/java/com/stripe/param/delegatedcheckout/RequestedSessionConfirmParams.java @@ -30,11 +30,19 @@ public class RequestedSessionConfirmParams extends ApiRequestParams { @SerializedName("payment_method") String paymentMethod; + /** Risk details/signals associated with the requested session. */ + @SerializedName("risk_details") + RiskDetails riskDetails; + private RequestedSessionConfirmParams( - List expand, Map extraParams, String paymentMethod) { + List expand, + Map extraParams, + String paymentMethod, + RiskDetails riskDetails) { this.expand = expand; this.extraParams = extraParams; this.paymentMethod = paymentMethod; + this.riskDetails = riskDetails; } public static Builder builder() { @@ -48,9 +56,12 @@ public static class Builder { private String paymentMethod; + private RiskDetails riskDetails; + /** Finalize and obtain parameter instance from this builder. */ public RequestedSessionConfirmParams build() { - return new RequestedSessionConfirmParams(this.expand, this.extraParams, this.paymentMethod); + return new RequestedSessionConfirmParams( + this.expand, this.extraParams, this.paymentMethod, this.riskDetails); } /** @@ -110,5 +121,222 @@ public Builder setPaymentMethod(String paymentMethod) { this.paymentMethod = paymentMethod; return this; } + + /** Risk details/signals associated with the requested session. */ + public Builder setRiskDetails(RequestedSessionConfirmParams.RiskDetails riskDetails) { + this.riskDetails = riskDetails; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class RiskDetails { + /** The client device metadata details for this requested session. */ + @SerializedName("client_device_metadata_details") + ClientDeviceMetadataDetails clientDeviceMetadataDetails; + + /** + * 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 RiskDetails( + ClientDeviceMetadataDetails clientDeviceMetadataDetails, Map extraParams) { + this.clientDeviceMetadataDetails = clientDeviceMetadataDetails; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private ClientDeviceMetadataDetails clientDeviceMetadataDetails; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public RequestedSessionConfirmParams.RiskDetails build() { + return new RequestedSessionConfirmParams.RiskDetails( + this.clientDeviceMetadataDetails, this.extraParams); + } + + /** The client device metadata details for this requested session. */ + public Builder setClientDeviceMetadataDetails( + RequestedSessionConfirmParams.RiskDetails.ClientDeviceMetadataDetails + clientDeviceMetadataDetails) { + this.clientDeviceMetadataDetails = clientDeviceMetadataDetails; + 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 + * RequestedSessionConfirmParams.RiskDetails#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 RequestedSessionConfirmParams.RiskDetails#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 + @EqualsAndHashCode(callSuper = false) + public static class ClientDeviceMetadataDetails { + /** + * 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 radar session. */ + @SerializedName("radar_session") + String radarSession; + + /** The referrer of the client device. */ + @SerializedName("referrer") + String referrer; + + /** The remote IP address of the client device. */ + @SerializedName("remote_ip") + String remoteIp; + + /** The time on page in milliseconds. */ + @SerializedName("time_on_page_ms") + Long timeOnPageMs; + + /** The user agent of the client device. */ + @SerializedName("user_agent") + String userAgent; + + private ClientDeviceMetadataDetails( + Map extraParams, + String radarSession, + String referrer, + String remoteIp, + Long timeOnPageMs, + String userAgent) { + this.extraParams = extraParams; + this.radarSession = radarSession; + this.referrer = referrer; + this.remoteIp = remoteIp; + this.timeOnPageMs = timeOnPageMs; + this.userAgent = userAgent; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private String radarSession; + + private String referrer; + + private String remoteIp; + + private Long timeOnPageMs; + + private String userAgent; + + /** Finalize and obtain parameter instance from this builder. */ + public RequestedSessionConfirmParams.RiskDetails.ClientDeviceMetadataDetails build() { + return new RequestedSessionConfirmParams.RiskDetails.ClientDeviceMetadataDetails( + this.extraParams, + this.radarSession, + this.referrer, + this.remoteIp, + this.timeOnPageMs, + this.userAgent); + } + + /** + * 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 + * RequestedSessionConfirmParams.RiskDetails.ClientDeviceMetadataDetails#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 + * RequestedSessionConfirmParams.RiskDetails.ClientDeviceMetadataDetails#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 radar session. */ + public Builder setRadarSession(String radarSession) { + this.radarSession = radarSession; + return this; + } + + /** The referrer of the client device. */ + public Builder setReferrer(String referrer) { + this.referrer = referrer; + return this; + } + + /** The remote IP address of the client device. */ + public Builder setRemoteIp(String remoteIp) { + this.remoteIp = remoteIp; + return this; + } + + /** The time on page in milliseconds. */ + public Builder setTimeOnPageMs(Long timeOnPageMs) { + this.timeOnPageMs = timeOnPageMs; + return this; + } + + /** The user agent of the client device. */ + public Builder setUserAgent(String userAgent) { + this.userAgent = userAgent; + return this; + } + } + } } } diff --git a/src/main/java/com/stripe/param/delegatedcheckout/RequestedSessionCreateParams.java b/src/main/java/com/stripe/param/delegatedcheckout/RequestedSessionCreateParams.java index e6fdd5e2e24..7b1df872db4 100644 --- a/src/main/java/com/stripe/param/delegatedcheckout/RequestedSessionCreateParams.java +++ b/src/main/java/com/stripe/param/delegatedcheckout/RequestedSessionCreateParams.java @@ -54,10 +54,6 @@ public class RequestedSessionCreateParams extends ApiRequestParams { @SerializedName("payment_method_data") PaymentMethodData paymentMethodData; - /** The risk details for this requested session. */ - @SerializedName("risk_details") - RiskDetails riskDetails; - /** Required. The details of the seller. */ @SerializedName("seller_details") SellerDetails sellerDetails; @@ -80,7 +76,6 @@ private RequestedSessionCreateParams( Map metadata, String paymentMethod, PaymentMethodData paymentMethodData, - RiskDetails riskDetails, SellerDetails sellerDetails, SetupFutureUsage setupFutureUsage, Map sharedMetadata) { @@ -93,7 +88,6 @@ private RequestedSessionCreateParams( this.metadata = metadata; this.paymentMethod = paymentMethod; this.paymentMethodData = paymentMethodData; - this.riskDetails = riskDetails; this.sellerDetails = sellerDetails; this.setupFutureUsage = setupFutureUsage; this.sharedMetadata = sharedMetadata; @@ -122,8 +116,6 @@ public static class Builder { private PaymentMethodData paymentMethodData; - private RiskDetails riskDetails; - private SellerDetails sellerDetails; private SetupFutureUsage setupFutureUsage; @@ -142,7 +134,6 @@ public RequestedSessionCreateParams build() { this.metadata, this.paymentMethod, this.paymentMethodData, - this.riskDetails, this.sellerDetails, this.setupFutureUsage, this.sharedMetadata); @@ -285,12 +276,6 @@ public Builder setPaymentMethodData( return this; } - /** The risk details for this requested session. */ - public Builder setRiskDetails(RequestedSessionCreateParams.RiskDetails riskDetails) { - this.riskDetails = riskDetails; - return this; - } - /** Required. The details of the seller. */ public Builder setSellerDetails(RequestedSessionCreateParams.SellerDetails sellerDetails) { this.sellerDetails = sellerDetails; @@ -1187,217 +1172,6 @@ public enum Type implements ApiRequestParams.EnumParam { } } - @Getter - @EqualsAndHashCode(callSuper = false) - public static class RiskDetails { - /** The client device metadata details for this requested session. */ - @SerializedName("client_device_metadata_details") - ClientDeviceMetadataDetails clientDeviceMetadataDetails; - - /** - * 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 RiskDetails( - ClientDeviceMetadataDetails clientDeviceMetadataDetails, Map extraParams) { - this.clientDeviceMetadataDetails = clientDeviceMetadataDetails; - this.extraParams = extraParams; - } - - public static Builder builder() { - return new Builder(); - } - - public static class Builder { - private ClientDeviceMetadataDetails clientDeviceMetadataDetails; - - private Map extraParams; - - /** Finalize and obtain parameter instance from this builder. */ - public RequestedSessionCreateParams.RiskDetails build() { - return new RequestedSessionCreateParams.RiskDetails( - this.clientDeviceMetadataDetails, this.extraParams); - } - - /** The client device metadata details for this requested session. */ - public Builder setClientDeviceMetadataDetails( - RequestedSessionCreateParams.RiskDetails.ClientDeviceMetadataDetails - clientDeviceMetadataDetails) { - this.clientDeviceMetadataDetails = clientDeviceMetadataDetails; - 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 - * RequestedSessionCreateParams.RiskDetails#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 RequestedSessionCreateParams.RiskDetails#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 - @EqualsAndHashCode(callSuper = false) - public static class ClientDeviceMetadataDetails { - /** - * 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 radar session. */ - @SerializedName("radar_session") - String radarSession; - - /** The referrer of the client device. */ - @SerializedName("referrer") - String referrer; - - /** The remote IP address of the client device. */ - @SerializedName("remote_ip") - String remoteIp; - - /** The time on page in seconds. */ - @SerializedName("time_on_page") - Long timeOnPage; - - /** The user agent of the client device. */ - @SerializedName("user_agent") - String userAgent; - - private ClientDeviceMetadataDetails( - Map extraParams, - String radarSession, - String referrer, - String remoteIp, - Long timeOnPage, - String userAgent) { - this.extraParams = extraParams; - this.radarSession = radarSession; - this.referrer = referrer; - this.remoteIp = remoteIp; - this.timeOnPage = timeOnPage; - this.userAgent = userAgent; - } - - public static Builder builder() { - return new Builder(); - } - - public static class Builder { - private Map extraParams; - - private String radarSession; - - private String referrer; - - private String remoteIp; - - private Long timeOnPage; - - private String userAgent; - - /** Finalize and obtain parameter instance from this builder. */ - public RequestedSessionCreateParams.RiskDetails.ClientDeviceMetadataDetails build() { - return new RequestedSessionCreateParams.RiskDetails.ClientDeviceMetadataDetails( - this.extraParams, - this.radarSession, - this.referrer, - this.remoteIp, - this.timeOnPage, - this.userAgent); - } - - /** - * 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 - * RequestedSessionCreateParams.RiskDetails.ClientDeviceMetadataDetails#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 - * RequestedSessionCreateParams.RiskDetails.ClientDeviceMetadataDetails#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 radar session. */ - public Builder setRadarSession(String radarSession) { - this.radarSession = radarSession; - return this; - } - - /** The referrer of the client device. */ - public Builder setReferrer(String referrer) { - this.referrer = referrer; - return this; - } - - /** The remote IP address of the client device. */ - public Builder setRemoteIp(String remoteIp) { - this.remoteIp = remoteIp; - return this; - } - - /** The time on page in seconds. */ - public Builder setTimeOnPage(Long timeOnPage) { - this.timeOnPage = timeOnPage; - return this; - } - - /** The user agent of the client device. */ - public Builder setUserAgent(String userAgent) { - this.userAgent = userAgent; - return this; - } - } - } - } - @Getter @EqualsAndHashCode(callSuper = false) public static class SellerDetails { diff --git a/src/main/java/com/stripe/param/tax/RegistrationCreateParams.java b/src/main/java/com/stripe/param/tax/RegistrationCreateParams.java index 537c6f76860..52cfac9b0c1 100644 --- a/src/main/java/com/stripe/param/tax/RegistrationCreateParams.java +++ b/src/main/java/com/stripe/param/tax/RegistrationCreateParams.java @@ -566,6 +566,10 @@ public static class CountryOptions { @SerializedName("tr") Tr tr; + /** Options for the registration in TW. */ + @SerializedName("tw") + Tw tw; + /** Options for the registration in TZ. */ @SerializedName("tz") Tz tz; @@ -697,6 +701,7 @@ private CountryOptions( Th th, Tj tj, Tr tr, + Tw tw, Tz tz, Ua ua, Ug ug, @@ -797,6 +802,7 @@ private CountryOptions( this.th = th; this.tj = tj; this.tr = tr; + this.tw = tw; this.tz = tz; this.ua = ua; this.ug = ug; @@ -994,6 +1000,8 @@ public static class Builder { private Tr tr; + private Tw tw; + private Tz tz; private Ua ua; @@ -1107,6 +1115,7 @@ public RegistrationCreateParams.CountryOptions build() { this.th, this.tj, this.tr, + this.tw, this.tz, this.ua, this.ug, @@ -1680,6 +1689,12 @@ public Builder setTr(RegistrationCreateParams.CountryOptions.Tr tr) { return this; } + /** Options for the registration in TW. */ + public Builder setTw(RegistrationCreateParams.CountryOptions.Tw tw) { + this.tw = tw; + return this; + } + /** Options for the registration in TZ. */ public Builder setTz(RegistrationCreateParams.CountryOptions.Tz tz) { this.tz = tz; @@ -15278,6 +15293,89 @@ public enum Type implements ApiRequestParams.EnumParam { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Tw { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Required. Type of registration to be created in {@code country}. */ + @SerializedName("type") + Type type; + + private Tw(Map extraParams, Type type) { + this.extraParams = extraParams; + this.type = type; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Type type; + + /** Finalize and obtain parameter instance from this builder. */ + public RegistrationCreateParams.CountryOptions.Tw build() { + return new RegistrationCreateParams.CountryOptions.Tw(this.extraParams, this.type); + } + + /** + * 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 RegistrationCreateParams.CountryOptions.Tw#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 RegistrationCreateParams.CountryOptions.Tw#extraParams} for the field + * documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Required. Type of registration to be created in {@code country}. */ + public Builder setType(RegistrationCreateParams.CountryOptions.Tw.Type type) { + this.type = type; + return this; + } + } + + public enum Type implements ApiRequestParams.EnumParam { + @SerializedName("simplified") + SIMPLIFIED("simplified"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Type(String value) { + this.value = value; + } + } + } + @Getter @EqualsAndHashCode(callSuper = false) public static class Tz { diff --git a/src/main/java/com/stripe/param/terminal/ConfigurationCreateParams.java b/src/main/java/com/stripe/param/terminal/ConfigurationCreateParams.java index 0707a70d15f..a641a4b7a13 100644 --- a/src/main/java/com/stripe/param/terminal/ConfigurationCreateParams.java +++ b/src/main/java/com/stripe/param/terminal/ConfigurationCreateParams.java @@ -799,6 +799,10 @@ public static class Tipping { @SerializedName("gbp") Gbp gbp; + /** Tipping configuration for GIP. */ + @SerializedName("gip") + Gip gip; + /** Tipping configuration for HKD. */ @SerializedName("hkd") Hkd hkd; @@ -858,6 +862,7 @@ private Tipping( Eur eur, Map extraParams, Gbp gbp, + Gip gip, Hkd hkd, Huf huf, Jpy jpy, @@ -880,6 +885,7 @@ private Tipping( this.eur = eur; this.extraParams = extraParams; this.gbp = gbp; + this.gip = gip; this.hkd = hkd; this.huf = huf; this.jpy = jpy; @@ -919,6 +925,8 @@ public static class Builder { private Gbp gbp; + private Gip gip; + private Hkd hkd; private Huf huf; @@ -956,6 +964,7 @@ public ConfigurationCreateParams.Tipping build() { this.eur, this.extraParams, this.gbp, + this.gip, this.hkd, this.huf, this.jpy, @@ -1050,6 +1059,12 @@ public Builder setGbp(ConfigurationCreateParams.Tipping.Gbp gbp) { return this; } + /** Tipping configuration for GIP. */ + public Builder setGip(ConfigurationCreateParams.Tipping.Gip gip) { + this.gip = gip; + return this; + } + /** Tipping configuration for HKD. */ public Builder setHkd(ConfigurationCreateParams.Tipping.Hkd hkd) { this.hkd = hkd; @@ -2455,6 +2470,154 @@ public Builder setSmartTipThreshold(Long smartTipThreshold) { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Gip { + /** + * 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 Gip( + 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.Gip build() { + return new ConfigurationCreateParams.Tipping.Gip( + 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.Gip#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.Gip#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.Gip#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.Gip#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.Gip#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.Gip#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 @EqualsAndHashCode(callSuper = false) public static class Hkd { diff --git a/src/main/java/com/stripe/param/terminal/ConfigurationUpdateParams.java b/src/main/java/com/stripe/param/terminal/ConfigurationUpdateParams.java index 6fb6482fe1a..f0c9de33cba 100644 --- a/src/main/java/com/stripe/param/terminal/ConfigurationUpdateParams.java +++ b/src/main/java/com/stripe/param/terminal/ConfigurationUpdateParams.java @@ -835,6 +835,10 @@ public static class Tipping { @SerializedName("gbp") Gbp gbp; + /** Tipping configuration for GIP. */ + @SerializedName("gip") + Gip gip; + /** Tipping configuration for HKD. */ @SerializedName("hkd") Hkd hkd; @@ -894,6 +898,7 @@ private Tipping( Eur eur, Map extraParams, Gbp gbp, + Gip gip, Hkd hkd, Huf huf, Jpy jpy, @@ -916,6 +921,7 @@ private Tipping( this.eur = eur; this.extraParams = extraParams; this.gbp = gbp; + this.gip = gip; this.hkd = hkd; this.huf = huf; this.jpy = jpy; @@ -955,6 +961,8 @@ public static class Builder { private Gbp gbp; + private Gip gip; + private Hkd hkd; private Huf huf; @@ -992,6 +1000,7 @@ public ConfigurationUpdateParams.Tipping build() { this.eur, this.extraParams, this.gbp, + this.gip, this.hkd, this.huf, this.jpy, @@ -1086,6 +1095,12 @@ public Builder setGbp(ConfigurationUpdateParams.Tipping.Gbp gbp) { return this; } + /** Tipping configuration for GIP. */ + public Builder setGip(ConfigurationUpdateParams.Tipping.Gip gip) { + this.gip = gip; + return this; + } + /** Tipping configuration for HKD. */ public Builder setHkd(ConfigurationUpdateParams.Tipping.Hkd hkd) { this.hkd = hkd; @@ -2491,6 +2506,154 @@ public Builder setSmartTipThreshold(Long smartTipThreshold) { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Gip { + /** + * 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 Gip( + 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.Gip build() { + return new ConfigurationUpdateParams.Tipping.Gip( + 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.Gip#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.Gip#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.Gip#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.Gip#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.Gip#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.Gip#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 @EqualsAndHashCode(callSuper = false) public static class Hkd { diff --git a/src/main/java/com/stripe/param/terminal/ReaderCollectInputsParams.java b/src/main/java/com/stripe/param/terminal/ReaderCollectInputsParams.java index efe83e3e0e8..e7bcf72ca73 100644 --- a/src/main/java/com/stripe/param/terminal/ReaderCollectInputsParams.java +++ b/src/main/java/com/stripe/param/terminal/ReaderCollectInputsParams.java @@ -26,7 +26,10 @@ public class ReaderCollectInputsParams extends ApiRequestParams { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Required. List of inputs to be collected using the Reader */ + /** + * Required. List of inputs to be collected from the customer using the Reader. + * Maximum 5 inputs. + */ @SerializedName("inputs") List inputs; @@ -348,11 +351,11 @@ public static class CustomText { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** The skip button text. */ + /** Custom text for the skip button. Maximum 14 characters. */ @SerializedName("skip_button") String skipButton; - /** The submit button text. */ + /** Custom text for the submit button. Maximum 30 characters. */ @SerializedName("submit_button") String submitButton; @@ -428,13 +431,13 @@ public Builder putAllExtraParam(Map map) { return this; } - /** The skip button text. */ + /** Custom text for the skip button. Maximum 14 characters. */ public Builder setSkipButton(String skipButton) { this.skipButton = skipButton; return this; } - /** The submit button text. */ + /** Custom text for the submit button. Maximum 30 characters. */ public Builder setSubmitButton(String submitButton) { this.submitButton = submitButton; return this; @@ -560,7 +563,10 @@ public static class Choice { @SerializedName("id") String id; - /** The style of the button which will be shown for this choice. */ + /** + * The style of the button which will be shown for this choice. Can be {@code primary} or + * {@code secondary}. + */ @SerializedName("style") Style style; @@ -628,7 +634,10 @@ public Builder setId(String id) { return this; } - /** The style of the button which will be shown for this choice. */ + /** + * The style of the button which will be shown for this choice. Can be {@code primary} or + * {@code secondary}. + */ public Builder setStyle(ReaderCollectInputsParams.Input.Selection.Choice.Style style) { this.style = style; return this; @@ -663,11 +672,14 @@ public enum Style implements ApiRequestParams.EnumParam { @Getter @EqualsAndHashCode(callSuper = false) public static class Toggle { - /** The default value of the toggle. */ + /** The default value of the toggle. Can be {@code enabled} or {@code disabled}. */ @SerializedName("default_value") DefaultValue defaultValue; - /** The description which will be displayed for the toggle. */ + /** + * The description which will be displayed for the toggle. Maximum 50 characters. At least one + * of title or description must be provided. + */ @SerializedName("description") String description; @@ -680,7 +692,10 @@ public static class Toggle { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** The title which will be displayed for the toggle. */ + /** + * The title which will be displayed for the toggle. Maximum 50 characters. At least one of + * title or description must be provided. + */ @SerializedName("title") String title; @@ -714,14 +729,17 @@ public ReaderCollectInputsParams.Input.Toggle build() { this.defaultValue, this.description, this.extraParams, this.title); } - /** The default value of the toggle. */ + /** The default value of the toggle. Can be {@code enabled} or {@code disabled}. */ public Builder setDefaultValue( ReaderCollectInputsParams.Input.Toggle.DefaultValue defaultValue) { this.defaultValue = defaultValue; return this; } - /** The description which will be displayed for the toggle. */ + /** + * The description which will be displayed for the toggle. Maximum 50 characters. At least + * one of title or description must be provided. + */ public Builder setDescription(String description) { this.description = description; return this; @@ -755,7 +773,10 @@ public Builder putAllExtraParam(Map map) { return this; } - /** The title which will be displayed for the toggle. */ + /** + * The title which will be displayed for the toggle. Maximum 50 characters. At least one of + * title or description must be provided. + */ public Builder setTitle(String title) { this.title = title; return this; diff --git a/src/main/java/com/stripe/param/terminal/ReaderCollectPaymentMethodParams.java b/src/main/java/com/stripe/param/terminal/ReaderCollectPaymentMethodParams.java index 251ac892a71..19a0d2d5dd4 100644 --- a/src/main/java/com/stripe/param/terminal/ReaderCollectPaymentMethodParams.java +++ b/src/main/java/com/stripe/param/terminal/ReaderCollectPaymentMethodParams.java @@ -13,7 +13,10 @@ @Getter @EqualsAndHashCode(callSuper = false) public class ReaderCollectPaymentMethodParams extends ApiRequestParams { - /** Configuration overrides. */ + /** + * Configuration overrides for this collection, such as tipping, surcharging, and customer + * cancellation settings. + */ @SerializedName("collect_config") CollectConfig collectConfig; @@ -30,7 +33,7 @@ public class ReaderCollectPaymentMethodParams extends ApiRequestParams { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Required. PaymentIntent ID. */ + /** Required. The ID of the PaymentIntent to collect a payment method for. */ @SerializedName("payment_intent") String paymentIntent; @@ -64,7 +67,10 @@ public ReaderCollectPaymentMethodParams build() { this.collectConfig, this.expand, this.extraParams, this.paymentIntent); } - /** Configuration overrides. */ + /** + * Configuration overrides for this collection, such as tipping, surcharging, and customer + * cancellation settings. + */ public Builder setCollectConfig(ReaderCollectPaymentMethodParams.CollectConfig collectConfig) { this.collectConfig = collectConfig; return this; @@ -122,7 +128,7 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Required. PaymentIntent ID. */ + /** Required. The ID of the PaymentIntent to collect a payment method for. */ public Builder setPaymentIntent(String paymentIntent) { this.paymentIntent = paymentIntent; return this; diff --git a/src/main/java/com/stripe/param/terminal/ReaderConfirmPaymentIntentParams.java b/src/main/java/com/stripe/param/terminal/ReaderConfirmPaymentIntentParams.java index 766dba8d1cf..978c59329a7 100644 --- a/src/main/java/com/stripe/param/terminal/ReaderConfirmPaymentIntentParams.java +++ b/src/main/java/com/stripe/param/terminal/ReaderConfirmPaymentIntentParams.java @@ -13,7 +13,7 @@ @Getter @EqualsAndHashCode(callSuper = false) public class ReaderConfirmPaymentIntentParams extends ApiRequestParams { - /** Configuration overrides. */ + /** Configuration overrides for this confirmation, such as surcharge settings and return URL. */ @SerializedName("confirm_config") ConfirmConfig confirmConfig; @@ -30,7 +30,7 @@ public class ReaderConfirmPaymentIntentParams extends ApiRequestParams { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Required. PaymentIntent ID. */ + /** Required. The ID of the PaymentIntent to confirm. */ @SerializedName("payment_intent") String paymentIntent; @@ -64,7 +64,7 @@ public ReaderConfirmPaymentIntentParams build() { this.confirmConfig, this.expand, this.extraParams, this.paymentIntent); } - /** Configuration overrides. */ + /** Configuration overrides for this confirmation, such as surcharge settings and return URL. */ public Builder setConfirmConfig(ReaderConfirmPaymentIntentParams.ConfirmConfig confirmConfig) { this.confirmConfig = confirmConfig; return this; @@ -122,7 +122,7 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Required. PaymentIntent ID. */ + /** Required. The ID of the PaymentIntent to confirm. */ public Builder setPaymentIntent(String paymentIntent) { this.paymentIntent = paymentIntent; return this; diff --git a/src/main/java/com/stripe/param/terminal/ReaderPresentPaymentMethodParams.java b/src/main/java/com/stripe/param/terminal/ReaderPresentPaymentMethodParams.java index e2fb109db94..e1ff2e6accd 100644 --- a/src/main/java/com/stripe/param/terminal/ReaderPresentPaymentMethodParams.java +++ b/src/main/java/com/stripe/param/terminal/ReaderPresentPaymentMethodParams.java @@ -375,7 +375,7 @@ public static class InteracPresent { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Card Number. */ + /** The Interac card number. */ @SerializedName("number") String number; @@ -425,7 +425,7 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Card Number. */ + /** The Interac card number. */ public Builder setNumber(String number) { this.number = number; return this; diff --git a/src/main/java/com/stripe/param/terminal/ReaderProcessPaymentIntentParams.java b/src/main/java/com/stripe/param/terminal/ReaderProcessPaymentIntentParams.java index 826c2e8bcc9..1c151700007 100644 --- a/src/main/java/com/stripe/param/terminal/ReaderProcessPaymentIntentParams.java +++ b/src/main/java/com/stripe/param/terminal/ReaderProcessPaymentIntentParams.java @@ -26,11 +26,14 @@ public class ReaderProcessPaymentIntentParams extends ApiRequestParams { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Required. PaymentIntent ID */ + /** Required. The ID of the PaymentIntent to process on the reader. */ @SerializedName("payment_intent") String paymentIntent; - /** Configuration overrides. */ + /** + * Configuration overrides for this transaction, such as tipping and customer cancellation + * settings. + */ @SerializedName("process_config") ProcessConfig processConfig; @@ -116,13 +119,16 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Required. PaymentIntent ID */ + /** Required. The ID of the PaymentIntent to process on the reader. */ public Builder setPaymentIntent(String paymentIntent) { this.paymentIntent = paymentIntent; return this; } - /** Configuration overrides. */ + /** + * Configuration overrides for this transaction, such as tipping and customer cancellation + * settings. + */ public Builder setProcessConfig(ReaderProcessPaymentIntentParams.ProcessConfig processConfig) { this.processConfig = processConfig; return this; diff --git a/src/main/java/com/stripe/param/terminal/ReaderProcessSetupIntentParams.java b/src/main/java/com/stripe/param/terminal/ReaderProcessSetupIntentParams.java index 74272ee0f8a..cae1b068ad7 100644 --- a/src/main/java/com/stripe/param/terminal/ReaderProcessSetupIntentParams.java +++ b/src/main/java/com/stripe/param/terminal/ReaderProcessSetupIntentParams.java @@ -35,11 +35,11 @@ public class ReaderProcessSetupIntentParams extends ApiRequestParams { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Configuration overrides. */ + /** Configuration overrides for this setup, such as MOTO and customer cancellation settings. */ @SerializedName("process_config") ProcessConfig processConfig; - /** Required. SetupIntent ID */ + /** Required. The ID of the SetupIntent to process on the reader. */ @SerializedName("setup_intent") String setupIntent; @@ -140,13 +140,13 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Configuration overrides. */ + /** Configuration overrides for this setup, such as MOTO and customer cancellation settings. */ public Builder setProcessConfig(ReaderProcessSetupIntentParams.ProcessConfig processConfig) { this.processConfig = processConfig; return this; } - /** Required. SetupIntent ID */ + /** Required. The ID of the SetupIntent to process on the reader. */ public Builder setSetupIntent(String setupIntent) { this.setupIntent = setupIntent; return this; diff --git a/src/main/java/com/stripe/param/terminal/ReaderRefundPaymentParams.java b/src/main/java/com/stripe/param/terminal/ReaderRefundPaymentParams.java index 69eeb69343e..dbfd525ecb1 100644 --- a/src/main/java/com/stripe/param/terminal/ReaderRefundPaymentParams.java +++ b/src/main/java/com/stripe/param/terminal/ReaderRefundPaymentParams.java @@ -58,7 +58,7 @@ public class ReaderRefundPaymentParams extends ApiRequestParams { @SerializedName("refund_application_fee") Boolean refundApplicationFee; - /** Configuration overrides. */ + /** Configuration overrides for this refund, such as customer cancellation settings. */ @SerializedName("refund_payment_config") RefundPaymentConfig refundPaymentConfig; @@ -237,7 +237,7 @@ public Builder setRefundApplicationFee(Boolean refundApplicationFee) { return this; } - /** Configuration overrides. */ + /** Configuration overrides for this refund, such as customer cancellation settings. */ public Builder setRefundPaymentConfig( ReaderRefundPaymentParams.RefundPaymentConfig refundPaymentConfig) { this.refundPaymentConfig = refundPaymentConfig; diff --git a/src/main/java/com/stripe/param/terminal/ReaderSetReaderDisplayParams.java b/src/main/java/com/stripe/param/terminal/ReaderSetReaderDisplayParams.java index 1c1c79b1b1a..aa22daaa933 100644 --- a/src/main/java/com/stripe/param/terminal/ReaderSetReaderDisplayParams.java +++ b/src/main/java/com/stripe/param/terminal/ReaderSetReaderDisplayParams.java @@ -13,7 +13,7 @@ @Getter @EqualsAndHashCode(callSuper = false) public class ReaderSetReaderDisplayParams extends ApiRequestParams { - /** Cart. */ + /** Cart details to display on the reader screen, including line items, amounts, and currency. */ @SerializedName("cart") Cart cart; @@ -30,7 +30,10 @@ public class ReaderSetReaderDisplayParams extends ApiRequestParams { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Required. Type */ + /** + * Required. Type of information to display. Only {@code cart} is currently + * supported. + */ @SerializedName("type") Type type; @@ -60,7 +63,9 @@ public ReaderSetReaderDisplayParams build() { return new ReaderSetReaderDisplayParams(this.cart, this.expand, this.extraParams, this.type); } - /** Cart. */ + /** + * Cart details to display on the reader screen, including line items, amounts, and currency. + */ public Builder setCart(ReaderSetReaderDisplayParams.Cart cart) { this.cart = cart; return this; @@ -118,7 +123,10 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Required. Type */ + /** + * Required. Type of information to display. Only {@code cart} is currently + * supported. + */ public Builder setType(ReaderSetReaderDisplayParams.Type type) { this.type = type; return this; @@ -145,15 +153,21 @@ public static class Cart { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Required. Array of line items that were purchased. */ + /** Required. Array of line items to display. */ @SerializedName("line_items") List lineItems; - /** The amount of tax in cents. */ + /** + * The amount of tax in the smallest + * currency unit. + */ @SerializedName("tax") Long tax; - /** Required. Total balance of cart due in cents. */ + /** + * Required. Total balance of cart due in the smallest currency unit. + */ @SerializedName("total") Long total; @@ -253,13 +267,19 @@ public Builder addAllLineItem(List e return this; } - /** The amount of tax in cents. */ + /** + * The amount of tax in the smallest + * currency unit. + */ public Builder setTax(Long tax) { this.tax = tax; return this; } - /** Required. Total balance of cart due in cents. */ + /** + * Required. Total balance of cart due in the smallest currency unit. + */ public Builder setTotal(Long total) { this.total = total; return this; @@ -269,7 +289,10 @@ public Builder setTotal(Long total) { @Getter @EqualsAndHashCode(callSuper = false) public static class LineItem { - /** Required. The price of the item in cents. */ + /** + * Required. The price of the item in the smallest currency unit. + */ @SerializedName("amount") Long amount; @@ -317,7 +340,10 @@ public ReaderSetReaderDisplayParams.Cart.LineItem build() { this.amount, this.description, this.extraParams, this.quantity); } - /** Required. The price of the item in cents. */ + /** + * Required. The price of the item in the smallest currency unit. + */ public Builder setAmount(Long amount) { this.amount = amount; return this; diff --git a/src/main/java/com/stripe/param/v2/core/AccountCreateParams.java b/src/main/java/com/stripe/param/v2/core/AccountCreateParams.java index 9f73401099c..6f0425e4df8 100644 --- a/src/main/java/com/stripe/param/v2/core/AccountCreateParams.java +++ b/src/main/java/com/stripe/param/v2/core/AccountCreateParams.java @@ -8845,9 +8845,71 @@ public static class Storer { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - private Storer(Capabilities capabilities, Map extraParams) { + /** List of high-risk activities the business is involved in. */ + @SerializedName("high_risk_activities") + List highRiskActivities; + + /** An explanation of the high risk activities that the business performs. */ + @SerializedName("high_risk_activities_description") + String highRiskActivitiesDescription; + + /** Description of the money services offered by the business. */ + @SerializedName("money_services_description") + String moneyServicesDescription; + + /** Does the business operate in any prohibited countries. */ + @SerializedName("operates_in_prohibited_countries") + Boolean operatesInProhibitedCountries; + + /** Does the business participate in any regulated activity. */ + @SerializedName("participates_in_regulated_activity") + Boolean participatesInRegulatedActivity; + + /** Primary purpose of the stored funds. */ + @SerializedName("purpose_of_funds") + PurposeOfFunds purposeOfFunds; + + /** Description of the purpose of the stored funds. */ + @SerializedName("purpose_of_funds_description") + String purposeOfFundsDescription; + + /** Details of the regulated activity if the business participates in one. */ + @SerializedName("regulated_activity") + RegulatedActivity regulatedActivity; + + /** The source of funds for the business, e.g. profits, income, venture capital, etc. */ + @SerializedName("source_of_funds") + SourceOfFunds sourceOfFunds; + + /** Description of the source of funds for the business' account. */ + @SerializedName("source_of_funds_description") + String sourceOfFundsDescription; + + private Storer( + Capabilities capabilities, + Map extraParams, + List highRiskActivities, + String highRiskActivitiesDescription, + String moneyServicesDescription, + Boolean operatesInProhibitedCountries, + Boolean participatesInRegulatedActivity, + PurposeOfFunds purposeOfFunds, + String purposeOfFundsDescription, + RegulatedActivity regulatedActivity, + SourceOfFunds sourceOfFunds, + String sourceOfFundsDescription) { this.capabilities = capabilities; this.extraParams = extraParams; + this.highRiskActivities = highRiskActivities; + this.highRiskActivitiesDescription = highRiskActivitiesDescription; + this.moneyServicesDescription = moneyServicesDescription; + this.operatesInProhibitedCountries = operatesInProhibitedCountries; + this.participatesInRegulatedActivity = participatesInRegulatedActivity; + this.purposeOfFunds = purposeOfFunds; + this.purposeOfFundsDescription = purposeOfFundsDescription; + this.regulatedActivity = regulatedActivity; + this.sourceOfFunds = sourceOfFunds; + this.sourceOfFundsDescription = sourceOfFundsDescription; } public static Builder builder() { @@ -8859,9 +8921,41 @@ public static class Builder { private Map extraParams; + private List highRiskActivities; + + private String highRiskActivitiesDescription; + + private String moneyServicesDescription; + + private Boolean operatesInProhibitedCountries; + + private Boolean participatesInRegulatedActivity; + + private PurposeOfFunds purposeOfFunds; + + private String purposeOfFundsDescription; + + private RegulatedActivity regulatedActivity; + + private SourceOfFunds sourceOfFunds; + + private String sourceOfFundsDescription; + /** Finalize and obtain parameter instance from this builder. */ public AccountCreateParams.Configuration.Storer build() { - return new AccountCreateParams.Configuration.Storer(this.capabilities, this.extraParams); + return new AccountCreateParams.Configuration.Storer( + this.capabilities, + this.extraParams, + this.highRiskActivities, + this.highRiskActivitiesDescription, + this.moneyServicesDescription, + this.operatesInProhibitedCountries, + this.participatesInRegulatedActivity, + this.purposeOfFunds, + this.purposeOfFundsDescription, + this.regulatedActivity, + this.sourceOfFunds, + this.sourceOfFundsDescription); } /** Capabilities to request on the Storer Configuration. */ @@ -8898,6 +8992,93 @@ public Builder putAllExtraParam(Map map) { this.extraParams.putAll(map); return this; } + + /** + * Add an element to `highRiskActivities` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original list. + * See {@link AccountCreateParams.Configuration.Storer#highRiskActivities} for the field + * documentation. + */ + public Builder addHighRiskActivity( + AccountCreateParams.Configuration.Storer.HighRiskActivity element) { + if (this.highRiskActivities == null) { + this.highRiskActivities = new ArrayList<>(); + } + this.highRiskActivities.add(element); + return this; + } + + /** + * Add all elements to `highRiskActivities` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original list. + * See {@link AccountCreateParams.Configuration.Storer#highRiskActivities} for the field + * documentation. + */ + public Builder addAllHighRiskActivity( + List elements) { + if (this.highRiskActivities == null) { + this.highRiskActivities = new ArrayList<>(); + } + this.highRiskActivities.addAll(elements); + return this; + } + + /** An explanation of the high risk activities that the business performs. */ + public Builder setHighRiskActivitiesDescription(String highRiskActivitiesDescription) { + this.highRiskActivitiesDescription = highRiskActivitiesDescription; + return this; + } + + /** Description of the money services offered by the business. */ + public Builder setMoneyServicesDescription(String moneyServicesDescription) { + this.moneyServicesDescription = moneyServicesDescription; + return this; + } + + /** Does the business operate in any prohibited countries. */ + public Builder setOperatesInProhibitedCountries(Boolean operatesInProhibitedCountries) { + this.operatesInProhibitedCountries = operatesInProhibitedCountries; + return this; + } + + /** Does the business participate in any regulated activity. */ + public Builder setParticipatesInRegulatedActivity(Boolean participatesInRegulatedActivity) { + this.participatesInRegulatedActivity = participatesInRegulatedActivity; + return this; + } + + /** Primary purpose of the stored funds. */ + public Builder setPurposeOfFunds( + AccountCreateParams.Configuration.Storer.PurposeOfFunds purposeOfFunds) { + this.purposeOfFunds = purposeOfFunds; + return this; + } + + /** Description of the purpose of the stored funds. */ + public Builder setPurposeOfFundsDescription(String purposeOfFundsDescription) { + this.purposeOfFundsDescription = purposeOfFundsDescription; + return this; + } + + /** Details of the regulated activity if the business participates in one. */ + public Builder setRegulatedActivity( + AccountCreateParams.Configuration.Storer.RegulatedActivity regulatedActivity) { + this.regulatedActivity = regulatedActivity; + return this; + } + + /** The source of funds for the business, e.g. profits, income, venture capital, etc. */ + public Builder setSourceOfFunds( + AccountCreateParams.Configuration.Storer.SourceOfFunds sourceOfFunds) { + this.sourceOfFunds = sourceOfFunds; + return this; + } + + /** Description of the source of funds for the business' account. */ + public Builder setSourceOfFundsDescription(String sourceOfFundsDescription) { + this.sourceOfFundsDescription = sourceOfFundsDescription; + return this; + } } @Getter @@ -9055,6 +9236,10 @@ public static class FinancialAddresses { @SerializedName("bank_accounts") BankAccounts bankAccounts; + /** Can provision a crypto wallet like financial address to credit a FinancialAccount. */ + @SerializedName("crypto_wallets") + CryptoWallets cryptoWallets; + /** * 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. @@ -9065,8 +9250,12 @@ public static class FinancialAddresses { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - private FinancialAddresses(BankAccounts bankAccounts, Map extraParams) { + private FinancialAddresses( + BankAccounts bankAccounts, + CryptoWallets cryptoWallets, + Map extraParams) { this.bankAccounts = bankAccounts; + this.cryptoWallets = cryptoWallets; this.extraParams = extraParams; } @@ -9077,13 +9266,15 @@ public static Builder builder() { public static class Builder { private BankAccounts bankAccounts; + private CryptoWallets cryptoWallets; + private Map extraParams; /** Finalize and obtain parameter instance from this builder. */ public AccountCreateParams.Configuration.Storer.Capabilities.FinancialAddresses build() { return new AccountCreateParams.Configuration.Storer.Capabilities.FinancialAddresses( - this.bankAccounts, this.extraParams); + this.bankAccounts, this.cryptoWallets, this.extraParams); } /** @@ -9098,6 +9289,17 @@ public Builder setBankAccounts( return this; } + /** + * Can provision a crypto wallet like financial address to credit a FinancialAccount. + */ + public Builder setCryptoWallets( + AccountCreateParams.Configuration.Storer.Capabilities.FinancialAddresses + .CryptoWallets + cryptoWallets) { + this.cryptoWallets = cryptoWallets; + 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 @@ -9211,6 +9413,89 @@ public Builder setRequested(Boolean requested) { } } } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class CryptoWallets { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} + * value. Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Required. To request a new Capability for an account, pass true. + * There can be a delay before the requested Capability becomes active. + */ + @SerializedName("requested") + Boolean requested; + + private CryptoWallets(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.Configuration.Storer.Capabilities.FinancialAddresses + .CryptoWallets + build() { + return new AccountCreateParams.Configuration.Storer.Capabilities.FinancialAddresses + .CryptoWallets(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.Configuration.Storer.Capabilities.FinancialAddresses.CryptoWallets#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.Configuration.Storer.Capabilities.FinancialAddresses.CryptoWallets#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Required. To request a new Capability for an account, pass true. + * There can be a delay before the requested Capability becomes active. + */ + public Builder setRequested(Boolean requested) { + this.requested = requested; + return this; + } + } + } } @Getter @@ -9234,10 +9519,15 @@ public static class HoldsCurrencies { @SerializedName("usd") Usd usd; - private HoldsCurrencies(Map extraParams, Gbp gbp, Usd usd) { + /** Can hold storage-type funds on Stripe in USDC. */ + @SerializedName("usdc") + Usdc usdc; + + private HoldsCurrencies(Map extraParams, Gbp gbp, Usd usd, Usdc usdc) { this.extraParams = extraParams; this.gbp = gbp; this.usd = usd; + this.usdc = usdc; } public static Builder builder() { @@ -9251,10 +9541,12 @@ public static class Builder { private Usd usd; + private Usdc usdc; + /** Finalize and obtain parameter instance from this builder. */ public AccountCreateParams.Configuration.Storer.Capabilities.HoldsCurrencies build() { return new AccountCreateParams.Configuration.Storer.Capabilities.HoldsCurrencies( - this.extraParams, this.gbp, this.usd); + this.extraParams, this.gbp, this.usd, this.usdc); } /** @@ -9300,6 +9592,13 @@ public Builder setUsd( this.usd = usd; return this; } + + /** Can hold storage-type funds on Stripe in USDC. */ + public Builder setUsdc( + AccountCreateParams.Configuration.Storer.Capabilities.HoldsCurrencies.Usdc usdc) { + this.usdc = usdc; + return this; + } } @Getter @@ -9465,6 +9764,88 @@ public Builder setRequested(Boolean requested) { } } } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Usdc { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} + * value. Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Required. To request a new Capability for an account, pass true. + * There can be a delay before the requested Capability becomes active. + */ + @SerializedName("requested") + Boolean requested; + + private Usdc(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.Configuration.Storer.Capabilities.HoldsCurrencies.Usdc + build() { + return new AccountCreateParams.Configuration.Storer.Capabilities.HoldsCurrencies + .Usdc(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.Configuration.Storer.Capabilities.HoldsCurrencies.Usdc#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.Configuration.Storer.Capabilities.HoldsCurrencies.Usdc#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Required. To request a new Capability for an account, pass true. + * There can be a delay before the requested Capability becomes active. + */ + public Builder setRequested(Boolean requested) { + this.requested = requested; + return this; + } + } + } } @Getter @@ -9642,6 +10023,10 @@ public static class OutboundPayments { @SerializedName("cards") Cards cards; + /** Can send funds from a FinancialAccount to a crypto wallet owned by someone else. */ + @SerializedName("crypto_wallets") + CryptoWallets cryptoWallets; + /** * 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. @@ -9662,10 +10047,12 @@ public static class OutboundPayments { private OutboundPayments( BankAccounts bankAccounts, Cards cards, + CryptoWallets cryptoWallets, Map extraParams, FinancialAccounts financialAccounts) { this.bankAccounts = bankAccounts; this.cards = cards; + this.cryptoWallets = cryptoWallets; this.extraParams = extraParams; this.financialAccounts = financialAccounts; } @@ -9679,6 +10066,8 @@ public static class Builder { private Cards cards; + private CryptoWallets cryptoWallets; + private Map extraParams; private FinancialAccounts financialAccounts; @@ -9686,7 +10075,11 @@ public static class Builder { /** Finalize and obtain parameter instance from this builder. */ public AccountCreateParams.Configuration.Storer.Capabilities.OutboundPayments build() { return new AccountCreateParams.Configuration.Storer.Capabilities.OutboundPayments( - this.bankAccounts, this.cards, this.extraParams, this.financialAccounts); + this.bankAccounts, + this.cards, + this.cryptoWallets, + this.extraParams, + this.financialAccounts); } /** Can send funds from a FinancialAccount to a bank account owned by someone else. */ @@ -9705,6 +10098,14 @@ public Builder setCards( return this; } + /** Can send funds from a FinancialAccount to a crypto wallet owned by someone else. */ + public Builder setCryptoWallets( + AccountCreateParams.Configuration.Storer.Capabilities.OutboundPayments.CryptoWallets + cryptoWallets) { + this.cryptoWallets = cryptoWallets; + 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 @@ -9915,7 +10316,7 @@ public Builder setRequested(Boolean requested) { @Getter @EqualsAndHashCode(callSuper = false) - public static class FinancialAccounts { + public static class CryptoWallets { /** * 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} @@ -9933,7 +10334,7 @@ public static class FinancialAccounts { @SerializedName("requested") Boolean requested; - private FinancialAccounts(Map extraParams, Boolean requested) { + private CryptoWallets(Map extraParams, Boolean requested) { this.extraParams = extraParams; this.requested = requested; } @@ -9949,17 +10350,17 @@ public static class Builder { /** Finalize and obtain parameter instance from this builder. */ public AccountCreateParams.Configuration.Storer.Capabilities.OutboundPayments - .FinancialAccounts + .CryptoWallets build() { return new AccountCreateParams.Configuration.Storer.Capabilities.OutboundPayments - .FinancialAccounts(this.extraParams, this.requested); + .CryptoWallets(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.Configuration.Storer.Capabilities.OutboundPayments.FinancialAccounts#extraParams} + * AccountCreateParams.Configuration.Storer.Capabilities.OutboundPayments.CryptoWallets#extraParams} * for the field documentation. */ public Builder putExtraParam(String key, Object value) { @@ -9974,7 +10375,7 @@ public Builder putExtraParam(String key, Object value) { * 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.Configuration.Storer.Capabilities.OutboundPayments.FinancialAccounts#extraParams} + * AccountCreateParams.Configuration.Storer.Capabilities.OutboundPayments.CryptoWallets#extraParams} * for the field documentation. */ public Builder putAllExtraParam(Map map) { @@ -9995,14 +10396,101 @@ public Builder setRequested(Boolean requested) { } } } - } - @Getter - @EqualsAndHashCode(callSuper = false) - public static class OutboundTransfers { - /** Can send funds from a FinancialAccount to a bank account owned by yourself. */ - @SerializedName("bank_accounts") - BankAccounts bankAccounts; + @Getter + @EqualsAndHashCode(callSuper = false) + public static class FinancialAccounts { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} + * value. Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Required. To request a new Capability for an account, pass true. + * There can be a delay before the requested Capability becomes active. + */ + @SerializedName("requested") + Boolean requested; + + private FinancialAccounts(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.Configuration.Storer.Capabilities.OutboundPayments + .FinancialAccounts + build() { + return new AccountCreateParams.Configuration.Storer.Capabilities.OutboundPayments + .FinancialAccounts(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.Configuration.Storer.Capabilities.OutboundPayments.FinancialAccounts#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.Configuration.Storer.Capabilities.OutboundPayments.FinancialAccounts#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Required. To request a new Capability for an account, pass true. + * There can be a delay before the requested Capability becomes active. + */ + public Builder setRequested(Boolean requested) { + this.requested = requested; + return this; + } + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class OutboundTransfers { + /** Can send funds from a FinancialAccount to a bank account owned by yourself. */ + @SerializedName("bank_accounts") + BankAccounts bankAccounts; + + /** Can send funds from a FinancialAccount to a crypto wallet owned by yourself. */ + @SerializedName("crypto_wallets") + CryptoWallets cryptoWallets; /** * Map of extra parameters for custom features not available in this client library. The @@ -10022,9 +10510,11 @@ public static class OutboundTransfers { private OutboundTransfers( BankAccounts bankAccounts, + CryptoWallets cryptoWallets, Map extraParams, FinancialAccounts financialAccounts) { this.bankAccounts = bankAccounts; + this.cryptoWallets = cryptoWallets; this.extraParams = extraParams; this.financialAccounts = financialAccounts; } @@ -10036,6 +10526,8 @@ public static Builder builder() { public static class Builder { private BankAccounts bankAccounts; + private CryptoWallets cryptoWallets; + private Map extraParams; private FinancialAccounts financialAccounts; @@ -10043,7 +10535,7 @@ public static class Builder { /** Finalize and obtain parameter instance from this builder. */ public AccountCreateParams.Configuration.Storer.Capabilities.OutboundTransfers build() { return new AccountCreateParams.Configuration.Storer.Capabilities.OutboundTransfers( - this.bankAccounts, this.extraParams, this.financialAccounts); + this.bankAccounts, this.cryptoWallets, this.extraParams, this.financialAccounts); } /** Can send funds from a FinancialAccount to a bank account owned by yourself. */ @@ -10054,6 +10546,15 @@ public Builder setBankAccounts( return this; } + /** Can send funds from a FinancialAccount to a crypto wallet owned by yourself. */ + public Builder setCryptoWallets( + AccountCreateParams.Configuration.Storer.Capabilities.OutboundTransfers + .CryptoWallets + cryptoWallets) { + this.cryptoWallets = cryptoWallets; + 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 @@ -10128,139 +10629,512 @@ public static Builder builder() { public static class Builder { private Map extraParams; - private Boolean requested; + private Boolean requested; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountCreateParams.Configuration.Storer.Capabilities.OutboundTransfers + .BankAccounts + build() { + return new AccountCreateParams.Configuration.Storer.Capabilities.OutboundTransfers + .BankAccounts(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.Configuration.Storer.Capabilities.OutboundTransfers.BankAccounts#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.Configuration.Storer.Capabilities.OutboundTransfers.BankAccounts#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Required. To request a new Capability for an account, pass true. + * There can be a delay before the requested Capability becomes active. + */ + public Builder setRequested(Boolean requested) { + this.requested = requested; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class CryptoWallets { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} + * value. Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Required. To request a new Capability for an account, pass true. + * There can be a delay before the requested Capability becomes active. + */ + @SerializedName("requested") + Boolean requested; + + private CryptoWallets(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.Configuration.Storer.Capabilities.OutboundTransfers + .CryptoWallets + build() { + return new AccountCreateParams.Configuration.Storer.Capabilities.OutboundTransfers + .CryptoWallets(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.Configuration.Storer.Capabilities.OutboundTransfers.CryptoWallets#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.Configuration.Storer.Capabilities.OutboundTransfers.CryptoWallets#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Required. To request a new Capability for an account, pass true. + * There can be a delay before the requested Capability becomes active. + */ + public Builder setRequested(Boolean requested) { + this.requested = requested; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class FinancialAccounts { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} + * value. Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Required. To request a new Capability for an account, pass true. + * There can be a delay before the requested Capability becomes active. + */ + @SerializedName("requested") + Boolean requested; + + private FinancialAccounts(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.Configuration.Storer.Capabilities.OutboundTransfers + .FinancialAccounts + build() { + return new AccountCreateParams.Configuration.Storer.Capabilities.OutboundTransfers + .FinancialAccounts(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.Configuration.Storer.Capabilities.OutboundTransfers.FinancialAccounts#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.Configuration.Storer.Capabilities.OutboundTransfers.FinancialAccounts#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Required. To request a new Capability for an account, pass true. + * There can be a delay before the requested Capability becomes active. + */ + public Builder setRequested(Boolean requested) { + this.requested = requested; + return this; + } + } + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class RegulatedActivity { + /** + * A detailed description of the regulated activities the business is licensed to conduct. + */ + @SerializedName("description") + String description; + + /** + * 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 license number or registration number assigned by the business's primary regulator. + */ + @SerializedName("license_number") + String licenseNumber; + + /** + * The country of the primary regulatory authority that oversees the business's regulated + * activities. + */ + @SerializedName("primary_regulatory_authority_country") + String primaryRegulatoryAuthorityCountry; + + /** + * The name of the primary regulatory authority that oversees the business's regulated + * activities. + */ + @SerializedName("primary_regulatory_authority_name") + String primaryRegulatoryAuthorityName; + + private RegulatedActivity( + String description, + Map extraParams, + String licenseNumber, + String primaryRegulatoryAuthorityCountry, + String primaryRegulatoryAuthorityName) { + this.description = description; + this.extraParams = extraParams; + this.licenseNumber = licenseNumber; + this.primaryRegulatoryAuthorityCountry = primaryRegulatoryAuthorityCountry; + this.primaryRegulatoryAuthorityName = primaryRegulatoryAuthorityName; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private String description; + + private Map extraParams; + + private String licenseNumber; + + private String primaryRegulatoryAuthorityCountry; + + private String primaryRegulatoryAuthorityName; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountCreateParams.Configuration.Storer.RegulatedActivity build() { + return new AccountCreateParams.Configuration.Storer.RegulatedActivity( + this.description, + this.extraParams, + this.licenseNumber, + this.primaryRegulatoryAuthorityCountry, + this.primaryRegulatoryAuthorityName); + } + + /** + * A detailed description of the regulated activities the business is licensed to conduct. + */ + public Builder setDescription(String description) { + this.description = description; + 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.Configuration.Storer.RegulatedActivity#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.Configuration.Storer.RegulatedActivity#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 license number or registration number assigned by the business's primary regulator. + */ + public Builder setLicenseNumber(String licenseNumber) { + this.licenseNumber = licenseNumber; + return this; + } + + /** + * The country of the primary regulatory authority that oversees the business's regulated + * activities. + */ + public Builder setPrimaryRegulatoryAuthorityCountry( + String primaryRegulatoryAuthorityCountry) { + this.primaryRegulatoryAuthorityCountry = primaryRegulatoryAuthorityCountry; + return this; + } + + /** + * The name of the primary regulatory authority that oversees the business's regulated + * activities. + */ + public Builder setPrimaryRegulatoryAuthorityName(String primaryRegulatoryAuthorityName) { + this.primaryRegulatoryAuthorityName = primaryRegulatoryAuthorityName; + return this; + } + } + } + + public enum HighRiskActivity implements ApiRequestParams.EnumParam { + @SerializedName("adult_entertainment") + ADULT_ENTERTAINMENT("adult_entertainment"), + + @SerializedName("gambling") + GAMBLING("gambling"), + + @SerializedName("hold_client_funds") + HOLD_CLIENT_FUNDS("hold_client_funds"), + + @SerializedName("investment_services") + INVESTMENT_SERVICES("investment_services"), + + @SerializedName("lending_banking") + LENDING_BANKING("lending_banking"), + + @SerializedName("marijuana_or_related_services") + MARIJUANA_OR_RELATED_SERVICES("marijuana_or_related_services"), + + @SerializedName("money_services") + MONEY_SERVICES("money_services"), + + @SerializedName("nicotine_tobacco_or_related_services") + NICOTINE_TOBACCO_OR_RELATED_SERVICES("nicotine_tobacco_or_related_services"), + + @SerializedName("none") + NONE("none"), + + @SerializedName("operate_foreign_exchange_virtual_currencies_brokerage_otc") + OPERATE_FOREIGN_EXCHANGE_VIRTUAL_CURRENCIES_BROKERAGE_OTC( + "operate_foreign_exchange_virtual_currencies_brokerage_otc"), + + @SerializedName("pharmaceuticals") + PHARMACEUTICALS("pharmaceuticals"), + + @SerializedName("precious_metals_precious_stones_jewelry") + PRECIOUS_METALS_PRECIOUS_STONES_JEWELRY("precious_metals_precious_stones_jewelry"), + + @SerializedName("safe_deposit_box_rentals") + SAFE_DEPOSIT_BOX_RENTALS("safe_deposit_box_rentals"), + + @SerializedName("third_party_payment_processing") + THIRD_PARTY_PAYMENT_PROCESSING("third_party_payment_processing"), + + @SerializedName("weapons_firearms_and_explosives") + WEAPONS_FIREARMS_AND_EXPLOSIVES("weapons_firearms_and_explosives"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + HighRiskActivity(String value) { + this.value = value; + } + } + + public enum PurposeOfFunds implements ApiRequestParams.EnumParam { + @SerializedName("charitable_donations") + CHARITABLE_DONATIONS("charitable_donations"), + + @SerializedName("ecommerce_retail_payments") + ECOMMERCE_RETAIL_PAYMENTS("ecommerce_retail_payments"), + + @SerializedName("investment_purposes") + INVESTMENT_PURPOSES("investment_purposes"), + + @SerializedName("other") + OTHER("other"), + + @SerializedName("payments_to_friends_or_family_abroad") + PAYMENTS_TO_FRIENDS_OR_FAMILY_ABROAD("payments_to_friends_or_family_abroad"), + + @SerializedName("payroll") + PAYROLL("payroll"), + + @SerializedName("personal_or_living_expenses") + PERSONAL_OR_LIVING_EXPENSES("personal_or_living_expenses"), + + @SerializedName("protect_wealth") + PROTECT_WEALTH("protect_wealth"), + + @SerializedName("purchase_goods_and_services") + PURCHASE_GOODS_AND_SERVICES("purchase_goods_and_services"), + + @SerializedName("receive_payments_for_goods_and_services") + RECEIVE_PAYMENTS_FOR_GOODS_AND_SERVICES("receive_payments_for_goods_and_services"), + + @SerializedName("tax_optimization") + TAX_OPTIMIZATION("tax_optimization"), + + @SerializedName("third_party_money_transmission") + THIRD_PARTY_MONEY_TRANSMISSION("third_party_money_transmission"), + + @SerializedName("treasury_management") + TREASURY_MANAGEMENT("treasury_management"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + PurposeOfFunds(String value) { + this.value = value; + } + } - /** Finalize and obtain parameter instance from this builder. */ - public AccountCreateParams.Configuration.Storer.Capabilities.OutboundTransfers - .BankAccounts - build() { - return new AccountCreateParams.Configuration.Storer.Capabilities.OutboundTransfers - .BankAccounts(this.extraParams, this.requested); - } + public enum SourceOfFunds implements ApiRequestParams.EnumParam { + @SerializedName("business_loans") + BUSINESS_LOANS("business_loans"), - /** - * 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.Configuration.Storer.Capabilities.OutboundTransfers.BankAccounts#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; - } + @SerializedName("grants") + GRANTS("grants"), - /** - * 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.Configuration.Storer.Capabilities.OutboundTransfers.BankAccounts#extraParams} - * for the field documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.putAll(map); - return this; - } + @SerializedName("inter_company_funds") + INTER_COMPANY_FUNDS("inter_company_funds"), - /** - * Required. To request a new Capability for an account, pass true. - * There can be a delay before the requested Capability becomes active. - */ - public Builder setRequested(Boolean requested) { - this.requested = requested; - return this; - } - } - } + @SerializedName("investment_proceeds") + INVESTMENT_PROCEEDS("investment_proceeds"), - @Getter - @EqualsAndHashCode(callSuper = false) - public static class FinancialAccounts { - /** - * 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; + @SerializedName("legal_settlement") + LEGAL_SETTLEMENT("legal_settlement"), - /** - * Required. To request a new Capability for an account, pass true. - * There can be a delay before the requested Capability becomes active. - */ - @SerializedName("requested") - Boolean requested; + @SerializedName("owners_capital") + OWNERS_CAPITAL("owners_capital"), - private FinancialAccounts(Map extraParams, Boolean requested) { - this.extraParams = extraParams; - this.requested = requested; - } + @SerializedName("pension_retirement") + PENSION_RETIREMENT("pension_retirement"), - public static Builder builder() { - return new Builder(); - } + @SerializedName("sales_of_assets") + SALES_OF_ASSETS("sales_of_assets"), - public static class Builder { - private Map extraParams; + @SerializedName("sales_of_goods_and_services") + SALES_OF_GOODS_AND_SERVICES("sales_of_goods_and_services"), - private Boolean requested; + @SerializedName("tax_refund") + TAX_REFUND("tax_refund"), - /** Finalize and obtain parameter instance from this builder. */ - public AccountCreateParams.Configuration.Storer.Capabilities.OutboundTransfers - .FinancialAccounts - build() { - return new AccountCreateParams.Configuration.Storer.Capabilities.OutboundTransfers - .FinancialAccounts(this.extraParams, this.requested); - } + @SerializedName("third_party_funds") + THIRD_PARTY_FUNDS("third_party_funds"), - /** - * 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.Configuration.Storer.Capabilities.OutboundTransfers.FinancialAccounts#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; - } + @SerializedName("treasury_reserves") + TREASURY_RESERVES("treasury_reserves"); - /** - * 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.Configuration.Storer.Capabilities.OutboundTransfers.FinancialAccounts#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(onMethod_ = {@Override}) + private final String value; - /** - * Required. To request a new Capability for an account, pass true. - * There can be a delay before the requested Capability becomes active. - */ - public Builder setRequested(Boolean requested) { - this.requested = requested; - return this; - } - } - } + SourceOfFunds(String value) { + this.value = value; } } } @@ -11729,6 +12603,10 @@ public static class TermsOfService { @SerializedName("card_creator") CardCreator cardCreator; + /** Details on the Account's acceptance of Crypto-storer-specific terms of service. */ + @SerializedName("crypto_storer") + CryptoStorer cryptoStorer; + /** * 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. @@ -11746,10 +12624,12 @@ public static class TermsOfService { private TermsOfService( Account account, CardCreator cardCreator, + CryptoStorer cryptoStorer, Map extraParams, Storer storer) { this.account = account; this.cardCreator = cardCreator; + this.cryptoStorer = cryptoStorer; this.extraParams = extraParams; this.storer = storer; } @@ -11763,6 +12643,8 @@ public static class Builder { private CardCreator cardCreator; + private CryptoStorer cryptoStorer; + private Map extraParams; private Storer storer; @@ -11770,7 +12652,7 @@ public static class Builder { /** Finalize and obtain parameter instance from this builder. */ public AccountCreateParams.Identity.Attestations.TermsOfService build() { return new AccountCreateParams.Identity.Attestations.TermsOfService( - this.account, this.cardCreator, this.extraParams, this.storer); + this.account, this.cardCreator, this.cryptoStorer, this.extraParams, this.storer); } /** @@ -11791,6 +12673,13 @@ public Builder setCardCreator( return this; } + /** Details on the Account's acceptance of Crypto-storer-specific terms of service. */ + public Builder setCryptoStorer( + AccountCreateParams.Identity.Attestations.TermsOfService.CryptoStorer cryptoStorer) { + this.cryptoStorer = cryptoStorer; + 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 @@ -14540,6 +15429,128 @@ public Builder setUserAgent(String userAgent) { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class CryptoStorer { + /** + * Required. The time when the Account's representative accepted the + * terms of service. Represented as a RFC 3339 date & time UTC value in millisecond + * precision, for example: 2022-09-18T13:22:18.123Z. + */ + @SerializedName("date") + Instant 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; + + /** + * Required. The IP address from which the Account's representative + * accepted the terms of service. + */ + @SerializedName("ip") + String ip; + + /** + * The user agent of the browser from which the Account's representative accepted the + * terms of service. + */ + @SerializedName("user_agent") + String userAgent; + + private CryptoStorer( + Instant 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 Instant date; + + private Map extraParams; + + private String ip; + + private String userAgent; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountCreateParams.Identity.Attestations.TermsOfService.CryptoStorer build() { + return new AccountCreateParams.Identity.Attestations.TermsOfService.CryptoStorer( + this.date, this.extraParams, this.ip, this.userAgent); + } + + /** + * Required. The time when the Account's representative accepted the + * terms of service. Represented as a RFC 3339 date & time UTC value in millisecond + * precision, for example: 2022-09-18T13:22:18.123Z. + */ + public Builder setDate(Instant 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.Identity.Attestations.TermsOfService.CryptoStorer#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.Identity.Attestations.TermsOfService.CryptoStorer#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Required. The IP address from which the Account's representative + * accepted the terms of service. + */ + public Builder setIp(String ip) { + this.ip = ip; + return this; + } + + /** + * The user agent of the browser from which the Account's representative accepted the + * terms of service. + */ + public Builder setUserAgent(String userAgent) { + this.userAgent = userAgent; + return this; + } + } + } + @Getter @EqualsAndHashCode(callSuper = false) public static class Storer { @@ -14675,6 +15686,13 @@ public static class BusinessDetails { @SerializedName("annual_revenue") AnnualRevenue annualRevenue; + /** + * A detailed description of the business's compliance and anti-money laundering controls and + * practices. + */ + @SerializedName("compliance_screening_description") + String complianceScreeningDescription; + /** A document verifying the business. */ @SerializedName("documents") Documents documents; @@ -14726,6 +15744,7 @@ public static class BusinessDetails { private BusinessDetails( Address address, AnnualRevenue annualRevenue, + String complianceScreeningDescription, Documents documents, Long estimatedWorkerCount, Map extraParams, @@ -14738,6 +15757,7 @@ private BusinessDetails( Structure structure) { this.address = address; this.annualRevenue = annualRevenue; + this.complianceScreeningDescription = complianceScreeningDescription; this.documents = documents; this.estimatedWorkerCount = estimatedWorkerCount; this.extraParams = extraParams; @@ -14759,6 +15779,8 @@ public static class Builder { private AnnualRevenue annualRevenue; + private String complianceScreeningDescription; + private Documents documents; private Long estimatedWorkerCount; @@ -14784,6 +15806,7 @@ public AccountCreateParams.Identity.BusinessDetails build() { return new AccountCreateParams.Identity.BusinessDetails( this.address, this.annualRevenue, + this.complianceScreeningDescription, this.documents, this.estimatedWorkerCount, this.extraParams, @@ -14809,6 +15832,15 @@ public Builder setAnnualRevenue( return this; } + /** + * A detailed description of the business's compliance and anti-money laundering controls + * and practices. + */ + public Builder setComplianceScreeningDescription(String complianceScreeningDescription) { + this.complianceScreeningDescription = complianceScreeningDescription; + return this; + } + /** A document verifying the business. */ public Builder setDocuments( AccountCreateParams.Identity.BusinessDetails.Documents documents) { diff --git a/src/main/java/com/stripe/param/v2/core/AccountUpdateParams.java b/src/main/java/com/stripe/param/v2/core/AccountUpdateParams.java index b60ba785b28..9b8998e11d3 100644 --- a/src/main/java/com/stripe/param/v2/core/AccountUpdateParams.java +++ b/src/main/java/com/stripe/param/v2/core/AccountUpdateParams.java @@ -9331,10 +9331,73 @@ public static class Storer { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - private Storer(Boolean applied, Capabilities capabilities, Map extraParams) { + /** List of high-risk activities the business is involved in. */ + @SerializedName("high_risk_activities") + List highRiskActivities; + + /** An explanation of the high risk activities that the business performs. */ + @SerializedName("high_risk_activities_description") + Object highRiskActivitiesDescription; + + /** Description of the money services offered by the business. */ + @SerializedName("money_services_description") + Object moneyServicesDescription; + + /** Does the business operate in any prohibited countries. */ + @SerializedName("operates_in_prohibited_countries") + Boolean operatesInProhibitedCountries; + + /** Does the business participate in any regulated activity. */ + @SerializedName("participates_in_regulated_activity") + Boolean participatesInRegulatedActivity; + + /** Primary purpose of the stored funds. */ + @SerializedName("purpose_of_funds") + PurposeOfFunds purposeOfFunds; + + /** Description of the purpose of the stored funds. */ + @SerializedName("purpose_of_funds_description") + Object purposeOfFundsDescription; + + /** Details of the regulated activity if the business participates in one. */ + @SerializedName("regulated_activity") + RegulatedActivity regulatedActivity; + + /** The source of funds for the business, e.g. profits, income, venture capital, etc. */ + @SerializedName("source_of_funds") + SourceOfFunds sourceOfFunds; + + /** Description of the source of funds for the business' account. */ + @SerializedName("source_of_funds_description") + Object sourceOfFundsDescription; + + private Storer( + Boolean applied, + Capabilities capabilities, + Map extraParams, + List highRiskActivities, + Object highRiskActivitiesDescription, + Object moneyServicesDescription, + Boolean operatesInProhibitedCountries, + Boolean participatesInRegulatedActivity, + PurposeOfFunds purposeOfFunds, + Object purposeOfFundsDescription, + RegulatedActivity regulatedActivity, + SourceOfFunds sourceOfFunds, + Object sourceOfFundsDescription) { this.applied = applied; this.capabilities = capabilities; this.extraParams = extraParams; + this.highRiskActivities = highRiskActivities; + this.highRiskActivitiesDescription = highRiskActivitiesDescription; + this.moneyServicesDescription = moneyServicesDescription; + this.operatesInProhibitedCountries = operatesInProhibitedCountries; + this.participatesInRegulatedActivity = participatesInRegulatedActivity; + this.purposeOfFunds = purposeOfFunds; + this.purposeOfFundsDescription = purposeOfFundsDescription; + this.regulatedActivity = regulatedActivity; + this.sourceOfFunds = sourceOfFunds; + this.sourceOfFundsDescription = sourceOfFundsDescription; } public static Builder builder() { @@ -9348,10 +9411,42 @@ public static class Builder { private Map extraParams; + private List highRiskActivities; + + private Object highRiskActivitiesDescription; + + private Object moneyServicesDescription; + + private Boolean operatesInProhibitedCountries; + + private Boolean participatesInRegulatedActivity; + + private PurposeOfFunds purposeOfFunds; + + private Object purposeOfFundsDescription; + + private RegulatedActivity regulatedActivity; + + private SourceOfFunds sourceOfFunds; + + private Object sourceOfFundsDescription; + /** Finalize and obtain parameter instance from this builder. */ public AccountUpdateParams.Configuration.Storer build() { return new AccountUpdateParams.Configuration.Storer( - this.applied, this.capabilities, this.extraParams); + this.applied, + this.capabilities, + this.extraParams, + this.highRiskActivities, + this.highRiskActivitiesDescription, + this.moneyServicesDescription, + this.operatesInProhibitedCountries, + this.participatesInRegulatedActivity, + this.purposeOfFunds, + this.purposeOfFundsDescription, + this.regulatedActivity, + this.sourceOfFunds, + this.sourceOfFundsDescription); } /** @@ -9397,6 +9492,117 @@ public Builder putAllExtraParam(Map map) { this.extraParams.putAll(map); return this; } + + /** + * Add an element to `highRiskActivities` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original list. + * See {@link AccountUpdateParams.Configuration.Storer#highRiskActivities} for the field + * documentation. + */ + public Builder addHighRiskActivity( + AccountUpdateParams.Configuration.Storer.HighRiskActivity element) { + if (this.highRiskActivities == null) { + this.highRiskActivities = new ArrayList<>(); + } + this.highRiskActivities.add(element); + return this; + } + + /** + * Add all elements to `highRiskActivities` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original list. + * See {@link AccountUpdateParams.Configuration.Storer#highRiskActivities} for the field + * documentation. + */ + public Builder addAllHighRiskActivity( + List elements) { + if (this.highRiskActivities == null) { + this.highRiskActivities = new ArrayList<>(); + } + this.highRiskActivities.addAll(elements); + return this; + } + + /** An explanation of the high risk activities that the business performs. */ + public Builder setHighRiskActivitiesDescription(String highRiskActivitiesDescription) { + this.highRiskActivitiesDescription = highRiskActivitiesDescription; + return this; + } + + /** An explanation of the high risk activities that the business performs. */ + public Builder setHighRiskActivitiesDescription(EmptyParam highRiskActivitiesDescription) { + this.highRiskActivitiesDescription = highRiskActivitiesDescription; + return this; + } + + /** Description of the money services offered by the business. */ + public Builder setMoneyServicesDescription(String moneyServicesDescription) { + this.moneyServicesDescription = moneyServicesDescription; + return this; + } + + /** Description of the money services offered by the business. */ + public Builder setMoneyServicesDescription(EmptyParam moneyServicesDescription) { + this.moneyServicesDescription = moneyServicesDescription; + return this; + } + + /** Does the business operate in any prohibited countries. */ + public Builder setOperatesInProhibitedCountries(Boolean operatesInProhibitedCountries) { + this.operatesInProhibitedCountries = operatesInProhibitedCountries; + return this; + } + + /** Does the business participate in any regulated activity. */ + public Builder setParticipatesInRegulatedActivity(Boolean participatesInRegulatedActivity) { + this.participatesInRegulatedActivity = participatesInRegulatedActivity; + return this; + } + + /** Primary purpose of the stored funds. */ + public Builder setPurposeOfFunds( + AccountUpdateParams.Configuration.Storer.PurposeOfFunds purposeOfFunds) { + this.purposeOfFunds = purposeOfFunds; + return this; + } + + /** Description of the purpose of the stored funds. */ + public Builder setPurposeOfFundsDescription(String purposeOfFundsDescription) { + this.purposeOfFundsDescription = purposeOfFundsDescription; + return this; + } + + /** Description of the purpose of the stored funds. */ + public Builder setPurposeOfFundsDescription(EmptyParam purposeOfFundsDescription) { + this.purposeOfFundsDescription = purposeOfFundsDescription; + return this; + } + + /** Details of the regulated activity if the business participates in one. */ + public Builder setRegulatedActivity( + AccountUpdateParams.Configuration.Storer.RegulatedActivity regulatedActivity) { + this.regulatedActivity = regulatedActivity; + return this; + } + + /** The source of funds for the business, e.g. profits, income, venture capital, etc. */ + public Builder setSourceOfFunds( + AccountUpdateParams.Configuration.Storer.SourceOfFunds sourceOfFunds) { + this.sourceOfFunds = sourceOfFunds; + return this; + } + + /** Description of the source of funds for the business' account. */ + public Builder setSourceOfFundsDescription(String sourceOfFundsDescription) { + this.sourceOfFundsDescription = sourceOfFundsDescription; + return this; + } + + /** Description of the source of funds for the business' account. */ + public Builder setSourceOfFundsDescription(EmptyParam sourceOfFundsDescription) { + this.sourceOfFundsDescription = sourceOfFundsDescription; + return this; + } } @Getter @@ -9554,6 +9760,10 @@ public static class FinancialAddresses { @SerializedName("bank_accounts") BankAccounts bankAccounts; + /** Can provision a crypto wallet like financial address to credit a FinancialAccount. */ + @SerializedName("crypto_wallets") + CryptoWallets cryptoWallets; + /** * 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. @@ -9564,8 +9774,12 @@ public static class FinancialAddresses { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - private FinancialAddresses(BankAccounts bankAccounts, Map extraParams) { + private FinancialAddresses( + BankAccounts bankAccounts, + CryptoWallets cryptoWallets, + Map extraParams) { this.bankAccounts = bankAccounts; + this.cryptoWallets = cryptoWallets; this.extraParams = extraParams; } @@ -9576,13 +9790,15 @@ public static Builder builder() { public static class Builder { private BankAccounts bankAccounts; + private CryptoWallets cryptoWallets; + private Map extraParams; /** Finalize and obtain parameter instance from this builder. */ public AccountUpdateParams.Configuration.Storer.Capabilities.FinancialAddresses build() { return new AccountUpdateParams.Configuration.Storer.Capabilities.FinancialAddresses( - this.bankAccounts, this.extraParams); + this.bankAccounts, this.cryptoWallets, this.extraParams); } /** @@ -9597,6 +9813,17 @@ public Builder setBankAccounts( return this; } + /** + * Can provision a crypto wallet like financial address to credit a FinancialAccount. + */ + public Builder setCryptoWallets( + AccountUpdateParams.Configuration.Storer.Capabilities.FinancialAddresses + .CryptoWallets + cryptoWallets) { + this.cryptoWallets = cryptoWallets; + 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 @@ -9710,6 +9937,89 @@ public Builder setRequested(Boolean requested) { } } } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class CryptoWallets { + /** + * 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; + + /** + * To request a new Capability for an account, pass true. There can be a delay before + * the requested Capability becomes active. + */ + @SerializedName("requested") + Boolean requested; + + private CryptoWallets(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.Configuration.Storer.Capabilities.FinancialAddresses + .CryptoWallets + build() { + return new AccountUpdateParams.Configuration.Storer.Capabilities.FinancialAddresses + .CryptoWallets(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.Configuration.Storer.Capabilities.FinancialAddresses.CryptoWallets#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.Configuration.Storer.Capabilities.FinancialAddresses.CryptoWallets#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * To request a new Capability for an account, pass true. There can be a delay before + * the requested Capability becomes active. + */ + public Builder setRequested(Boolean requested) { + this.requested = requested; + return this; + } + } + } } @Getter @@ -9733,10 +10043,15 @@ public static class HoldsCurrencies { @SerializedName("usd") Usd usd; - private HoldsCurrencies(Map extraParams, Gbp gbp, Usd usd) { + /** Can hold storage-type funds on Stripe in USDC. */ + @SerializedName("usdc") + Usdc usdc; + + private HoldsCurrencies(Map extraParams, Gbp gbp, Usd usd, Usdc usdc) { this.extraParams = extraParams; this.gbp = gbp; this.usd = usd; + this.usdc = usdc; } public static Builder builder() { @@ -9750,10 +10065,12 @@ public static class Builder { private Usd usd; + private Usdc usdc; + /** Finalize and obtain parameter instance from this builder. */ public AccountUpdateParams.Configuration.Storer.Capabilities.HoldsCurrencies build() { return new AccountUpdateParams.Configuration.Storer.Capabilities.HoldsCurrencies( - this.extraParams, this.gbp, this.usd); + this.extraParams, this.gbp, this.usd, this.usdc); } /** @@ -9799,6 +10116,13 @@ public Builder setUsd( this.usd = usd; return this; } + + /** Can hold storage-type funds on Stripe in USDC. */ + public Builder setUsdc( + AccountUpdateParams.Configuration.Storer.Capabilities.HoldsCurrencies.Usdc usdc) { + this.usdc = usdc; + return this; + } } @Getter @@ -9964,6 +10288,88 @@ public Builder setRequested(Boolean requested) { } } } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Usdc { + /** + * 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; + + /** + * To request a new Capability for an account, pass true. There can be a delay before + * the requested Capability becomes active. + */ + @SerializedName("requested") + Boolean requested; + + private Usdc(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.Configuration.Storer.Capabilities.HoldsCurrencies.Usdc + build() { + return new AccountUpdateParams.Configuration.Storer.Capabilities.HoldsCurrencies + .Usdc(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.Configuration.Storer.Capabilities.HoldsCurrencies.Usdc#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.Configuration.Storer.Capabilities.HoldsCurrencies.Usdc#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * To request a new Capability for an account, pass true. There can be a delay before + * the requested Capability becomes active. + */ + public Builder setRequested(Boolean requested) { + this.requested = requested; + return this; + } + } + } } @Getter @@ -10141,6 +10547,10 @@ public static class OutboundPayments { @SerializedName("cards") Cards cards; + /** Can send funds from a FinancialAccount to a crypto wallet owned by someone else. */ + @SerializedName("crypto_wallets") + CryptoWallets cryptoWallets; + /** * 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. @@ -10161,10 +10571,12 @@ public static class OutboundPayments { private OutboundPayments( BankAccounts bankAccounts, Cards cards, + CryptoWallets cryptoWallets, Map extraParams, FinancialAccounts financialAccounts) { this.bankAccounts = bankAccounts; this.cards = cards; + this.cryptoWallets = cryptoWallets; this.extraParams = extraParams; this.financialAccounts = financialAccounts; } @@ -10178,6 +10590,8 @@ public static class Builder { private Cards cards; + private CryptoWallets cryptoWallets; + private Map extraParams; private FinancialAccounts financialAccounts; @@ -10185,7 +10599,11 @@ public static class Builder { /** Finalize and obtain parameter instance from this builder. */ public AccountUpdateParams.Configuration.Storer.Capabilities.OutboundPayments build() { return new AccountUpdateParams.Configuration.Storer.Capabilities.OutboundPayments( - this.bankAccounts, this.cards, this.extraParams, this.financialAccounts); + this.bankAccounts, + this.cards, + this.cryptoWallets, + this.extraParams, + this.financialAccounts); } /** Can send funds from a FinancialAccount to a bank account owned by someone else. */ @@ -10204,7 +10622,15 @@ public Builder setCards( return this; } - /** + /** Can send funds from a FinancialAccount to a crypto wallet owned by someone else. */ + public Builder setCryptoWallets( + AccountUpdateParams.Configuration.Storer.Capabilities.OutboundPayments.CryptoWallets + cryptoWallets) { + this.cryptoWallets = cryptoWallets; + 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 @@ -10412,6 +10838,89 @@ public Builder setRequested(Boolean requested) { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class CryptoWallets { + /** + * 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; + + /** + * To request a new Capability for an account, pass true. There can be a delay before + * the requested Capability becomes active. + */ + @SerializedName("requested") + Boolean requested; + + private CryptoWallets(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.Configuration.Storer.Capabilities.OutboundPayments + .CryptoWallets + build() { + return new AccountUpdateParams.Configuration.Storer.Capabilities.OutboundPayments + .CryptoWallets(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.Configuration.Storer.Capabilities.OutboundPayments.CryptoWallets#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.Configuration.Storer.Capabilities.OutboundPayments.CryptoWallets#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * To request a new Capability for an account, pass true. There can be a delay before + * the requested Capability becomes active. + */ + public Builder setRequested(Boolean requested) { + this.requested = requested; + return this; + } + } + } + @Getter @EqualsAndHashCode(callSuper = false) public static class FinancialAccounts { @@ -10503,6 +11012,10 @@ public static class OutboundTransfers { @SerializedName("bank_accounts") BankAccounts bankAccounts; + /** Can send funds from a FinancialAccount to a crypto wallet owned by yourself. */ + @SerializedName("crypto_wallets") + CryptoWallets cryptoWallets; + /** * 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. @@ -10521,9 +11034,11 @@ public static class OutboundTransfers { private OutboundTransfers( BankAccounts bankAccounts, + CryptoWallets cryptoWallets, Map extraParams, FinancialAccounts financialAccounts) { this.bankAccounts = bankAccounts; + this.cryptoWallets = cryptoWallets; this.extraParams = extraParams; this.financialAccounts = financialAccounts; } @@ -10535,6 +11050,8 @@ public static Builder builder() { public static class Builder { private BankAccounts bankAccounts; + private CryptoWallets cryptoWallets; + private Map extraParams; private FinancialAccounts financialAccounts; @@ -10542,7 +11059,7 @@ public static class Builder { /** Finalize and obtain parameter instance from this builder. */ public AccountUpdateParams.Configuration.Storer.Capabilities.OutboundTransfers build() { return new AccountUpdateParams.Configuration.Storer.Capabilities.OutboundTransfers( - this.bankAccounts, this.extraParams, this.financialAccounts); + this.bankAccounts, this.cryptoWallets, this.extraParams, this.financialAccounts); } /** Can send funds from a FinancialAccount to a bank account owned by yourself. */ @@ -10553,6 +11070,15 @@ public Builder setBankAccounts( return this; } + /** Can send funds from a FinancialAccount to a crypto wallet owned by yourself. */ + public Builder setCryptoWallets( + AccountUpdateParams.Configuration.Storer.Capabilities.OutboundTransfers + .CryptoWallets + cryptoWallets) { + this.cryptoWallets = cryptoWallets; + 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 @@ -10652,114 +11178,523 @@ public Builder putExtraParam(String key, Object 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.Configuration.Storer.Capabilities.OutboundTransfers.BankAccounts#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 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.Configuration.Storer.Capabilities.OutboundTransfers.BankAccounts#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * To request a new Capability for an account, pass true. There can be a delay before + * the requested Capability becomes active. + */ + public Builder setRequested(Boolean requested) { + this.requested = requested; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class CryptoWallets { + /** + * 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; + + /** + * To request a new Capability for an account, pass true. There can be a delay before + * the requested Capability becomes active. + */ + @SerializedName("requested") + Boolean requested; + + private CryptoWallets(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.Configuration.Storer.Capabilities.OutboundTransfers + .CryptoWallets + build() { + return new AccountUpdateParams.Configuration.Storer.Capabilities.OutboundTransfers + .CryptoWallets(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.Configuration.Storer.Capabilities.OutboundTransfers.CryptoWallets#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.Configuration.Storer.Capabilities.OutboundTransfers.CryptoWallets#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * To request a new Capability for an account, pass true. There can be a delay before + * the requested Capability becomes active. + */ + public Builder setRequested(Boolean requested) { + this.requested = requested; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class FinancialAccounts { + /** + * 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; + + /** + * To request a new Capability for an account, pass true. There can be a delay before + * the requested Capability becomes active. + */ + @SerializedName("requested") + Boolean requested; + + private FinancialAccounts(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.Configuration.Storer.Capabilities.OutboundTransfers + .FinancialAccounts + build() { + return new AccountUpdateParams.Configuration.Storer.Capabilities.OutboundTransfers + .FinancialAccounts(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.Configuration.Storer.Capabilities.OutboundTransfers.FinancialAccounts#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.Configuration.Storer.Capabilities.OutboundTransfers.FinancialAccounts#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * To request a new Capability for an account, pass true. There can be a delay before + * the requested Capability becomes active. + */ + public Builder setRequested(Boolean requested) { + this.requested = requested; + return this; + } + } + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class RegulatedActivity { + /** + * A detailed description of the regulated activities the business is licensed to conduct. + */ + @SerializedName("description") + Object description; + + /** + * 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 license number or registration number assigned by the business's primary regulator. + */ + @SerializedName("license_number") + Object licenseNumber; + + /** + * The country of the primary regulatory authority that oversees the business's regulated + * activities. + */ + @SerializedName("primary_regulatory_authority_country") + Object primaryRegulatoryAuthorityCountry; + + /** + * The name of the primary regulatory authority that oversees the business's regulated + * activities. + */ + @SerializedName("primary_regulatory_authority_name") + Object primaryRegulatoryAuthorityName; + + private RegulatedActivity( + Object description, + Map extraParams, + Object licenseNumber, + Object primaryRegulatoryAuthorityCountry, + Object primaryRegulatoryAuthorityName) { + this.description = description; + this.extraParams = extraParams; + this.licenseNumber = licenseNumber; + this.primaryRegulatoryAuthorityCountry = primaryRegulatoryAuthorityCountry; + this.primaryRegulatoryAuthorityName = primaryRegulatoryAuthorityName; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Object description; + + private Map extraParams; + + private Object licenseNumber; + + private Object primaryRegulatoryAuthorityCountry; + + private Object primaryRegulatoryAuthorityName; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountUpdateParams.Configuration.Storer.RegulatedActivity build() { + return new AccountUpdateParams.Configuration.Storer.RegulatedActivity( + this.description, + this.extraParams, + this.licenseNumber, + this.primaryRegulatoryAuthorityCountry, + this.primaryRegulatoryAuthorityName); + } + + /** + * A detailed description of the regulated activities the business is licensed to conduct. + */ + public Builder setDescription(String description) { + this.description = description; + return this; + } + + /** + * A detailed description of the regulated activities the business is licensed to conduct. + */ + public Builder setDescription(EmptyParam description) { + this.description = description; + 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.Configuration.Storer.RegulatedActivity#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.Configuration.Storer.RegulatedActivity#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 license number or registration number assigned by the business's primary regulator. + */ + public Builder setLicenseNumber(String licenseNumber) { + this.licenseNumber = licenseNumber; + return this; + } + + /** + * The license number or registration number assigned by the business's primary regulator. + */ + public Builder setLicenseNumber(EmptyParam licenseNumber) { + this.licenseNumber = licenseNumber; + return this; + } + + /** + * The country of the primary regulatory authority that oversees the business's regulated + * activities. + */ + public Builder setPrimaryRegulatoryAuthorityCountry( + String primaryRegulatoryAuthorityCountry) { + this.primaryRegulatoryAuthorityCountry = primaryRegulatoryAuthorityCountry; + return this; + } + + /** + * The country of the primary regulatory authority that oversees the business's regulated + * activities. + */ + public Builder setPrimaryRegulatoryAuthorityCountry( + EmptyParam primaryRegulatoryAuthorityCountry) { + this.primaryRegulatoryAuthorityCountry = primaryRegulatoryAuthorityCountry; + return this; + } + + /** + * The name of the primary regulatory authority that oversees the business's regulated + * activities. + */ + public Builder setPrimaryRegulatoryAuthorityName(String primaryRegulatoryAuthorityName) { + this.primaryRegulatoryAuthorityName = primaryRegulatoryAuthorityName; + return this; + } + + /** + * The name of the primary regulatory authority that oversees the business's regulated + * activities. + */ + public Builder setPrimaryRegulatoryAuthorityName( + EmptyParam primaryRegulatoryAuthorityName) { + this.primaryRegulatoryAuthorityName = primaryRegulatoryAuthorityName; + return this; + } + } + } + + public enum HighRiskActivity implements ApiRequestParams.EnumParam { + @SerializedName("adult_entertainment") + ADULT_ENTERTAINMENT("adult_entertainment"), + + @SerializedName("gambling") + GAMBLING("gambling"), + + @SerializedName("hold_client_funds") + HOLD_CLIENT_FUNDS("hold_client_funds"), + + @SerializedName("investment_services") + INVESTMENT_SERVICES("investment_services"), + + @SerializedName("lending_banking") + LENDING_BANKING("lending_banking"), + + @SerializedName("marijuana_or_related_services") + MARIJUANA_OR_RELATED_SERVICES("marijuana_or_related_services"), + + @SerializedName("money_services") + MONEY_SERVICES("money_services"), + + @SerializedName("nicotine_tobacco_or_related_services") + NICOTINE_TOBACCO_OR_RELATED_SERVICES("nicotine_tobacco_or_related_services"), + + @SerializedName("none") + NONE("none"), + + @SerializedName("operate_foreign_exchange_virtual_currencies_brokerage_otc") + OPERATE_FOREIGN_EXCHANGE_VIRTUAL_CURRENCIES_BROKERAGE_OTC( + "operate_foreign_exchange_virtual_currencies_brokerage_otc"), + + @SerializedName("pharmaceuticals") + PHARMACEUTICALS("pharmaceuticals"), + + @SerializedName("precious_metals_precious_stones_jewelry") + PRECIOUS_METALS_PRECIOUS_STONES_JEWELRY("precious_metals_precious_stones_jewelry"), + + @SerializedName("safe_deposit_box_rentals") + SAFE_DEPOSIT_BOX_RENTALS("safe_deposit_box_rentals"), + + @SerializedName("third_party_payment_processing") + THIRD_PARTY_PAYMENT_PROCESSING("third_party_payment_processing"), + + @SerializedName("weapons_firearms_and_explosives") + WEAPONS_FIREARMS_AND_EXPLOSIVES("weapons_firearms_and_explosives"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + HighRiskActivity(String value) { + this.value = value; + } + } + + public enum PurposeOfFunds implements ApiRequestParams.EnumParam { + @SerializedName("charitable_donations") + CHARITABLE_DONATIONS("charitable_donations"), + + @SerializedName("ecommerce_retail_payments") + ECOMMERCE_RETAIL_PAYMENTS("ecommerce_retail_payments"), + + @SerializedName("investment_purposes") + INVESTMENT_PURPOSES("investment_purposes"), + + @SerializedName("other") + OTHER("other"), + + @SerializedName("payments_to_friends_or_family_abroad") + PAYMENTS_TO_FRIENDS_OR_FAMILY_ABROAD("payments_to_friends_or_family_abroad"), + + @SerializedName("payroll") + PAYROLL("payroll"), + + @SerializedName("personal_or_living_expenses") + PERSONAL_OR_LIVING_EXPENSES("personal_or_living_expenses"), + + @SerializedName("protect_wealth") + PROTECT_WEALTH("protect_wealth"), + + @SerializedName("purchase_goods_and_services") + PURCHASE_GOODS_AND_SERVICES("purchase_goods_and_services"), + + @SerializedName("receive_payments_for_goods_and_services") + RECEIVE_PAYMENTS_FOR_GOODS_AND_SERVICES("receive_payments_for_goods_and_services"), + + @SerializedName("tax_optimization") + TAX_OPTIMIZATION("tax_optimization"), + + @SerializedName("third_party_money_transmission") + THIRD_PARTY_MONEY_TRANSMISSION("third_party_money_transmission"), + + @SerializedName("treasury_management") + TREASURY_MANAGEMENT("treasury_management"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + PurposeOfFunds(String value) { + this.value = value; + } + } - /** - * To request a new Capability for an account, pass true. There can be a delay before - * the requested Capability becomes active. - */ - public Builder setRequested(Boolean requested) { - this.requested = requested; - return this; - } - } - } + public enum SourceOfFunds implements ApiRequestParams.EnumParam { + @SerializedName("business_loans") + BUSINESS_LOANS("business_loans"), - @Getter - @EqualsAndHashCode(callSuper = false) - public static class FinancialAccounts { - /** - * 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; + @SerializedName("grants") + GRANTS("grants"), - /** - * To request a new Capability for an account, pass true. There can be a delay before - * the requested Capability becomes active. - */ - @SerializedName("requested") - Boolean requested; + @SerializedName("inter_company_funds") + INTER_COMPANY_FUNDS("inter_company_funds"), - private FinancialAccounts(Map extraParams, Boolean requested) { - this.extraParams = extraParams; - this.requested = requested; - } + @SerializedName("investment_proceeds") + INVESTMENT_PROCEEDS("investment_proceeds"), - public static Builder builder() { - return new Builder(); - } + @SerializedName("legal_settlement") + LEGAL_SETTLEMENT("legal_settlement"), - public static class Builder { - private Map extraParams; + @SerializedName("owners_capital") + OWNERS_CAPITAL("owners_capital"), - private Boolean requested; + @SerializedName("pension_retirement") + PENSION_RETIREMENT("pension_retirement"), - /** Finalize and obtain parameter instance from this builder. */ - public AccountUpdateParams.Configuration.Storer.Capabilities.OutboundTransfers - .FinancialAccounts - build() { - return new AccountUpdateParams.Configuration.Storer.Capabilities.OutboundTransfers - .FinancialAccounts(this.extraParams, this.requested); - } + @SerializedName("sales_of_assets") + SALES_OF_ASSETS("sales_of_assets"), - /** - * 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.Configuration.Storer.Capabilities.OutboundTransfers.FinancialAccounts#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; - } + @SerializedName("sales_of_goods_and_services") + SALES_OF_GOODS_AND_SERVICES("sales_of_goods_and_services"), - /** - * 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.Configuration.Storer.Capabilities.OutboundTransfers.FinancialAccounts#extraParams} - * for the field documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.putAll(map); - return this; - } + @SerializedName("tax_refund") + TAX_REFUND("tax_refund"), - /** - * To request a new Capability for an account, pass true. There can be a delay before - * the requested Capability becomes active. - */ - public Builder setRequested(Boolean requested) { - this.requested = requested; - return this; - } - } - } + @SerializedName("third_party_funds") + THIRD_PARTY_FUNDS("third_party_funds"), + + @SerializedName("treasury_reserves") + TREASURY_RESERVES("treasury_reserves"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + SourceOfFunds(String value) { + this.value = value; } } } @@ -12312,6 +13247,10 @@ public static class TermsOfService { @SerializedName("card_creator") CardCreator cardCreator; + /** Details on the Account's acceptance of Crypto-storer-specific terms of service. */ + @SerializedName("crypto_storer") + CryptoStorer cryptoStorer; + /** * 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. @@ -12329,10 +13268,12 @@ public static class TermsOfService { private TermsOfService( Account account, CardCreator cardCreator, + CryptoStorer cryptoStorer, Map extraParams, Storer storer) { this.account = account; this.cardCreator = cardCreator; + this.cryptoStorer = cryptoStorer; this.extraParams = extraParams; this.storer = storer; } @@ -12346,6 +13287,8 @@ public static class Builder { private CardCreator cardCreator; + private CryptoStorer cryptoStorer; + private Map extraParams; private Storer storer; @@ -12353,7 +13296,7 @@ public static class Builder { /** Finalize and obtain parameter instance from this builder. */ public AccountUpdateParams.Identity.Attestations.TermsOfService build() { return new AccountUpdateParams.Identity.Attestations.TermsOfService( - this.account, this.cardCreator, this.extraParams, this.storer); + this.account, this.cardCreator, this.cryptoStorer, this.extraParams, this.storer); } /** @@ -12374,6 +13317,13 @@ public Builder setCardCreator( return this; } + /** Details on the Account's acceptance of Crypto-storer-specific terms of service. */ + public Builder setCryptoStorer( + AccountUpdateParams.Identity.Attestations.TermsOfService.CryptoStorer cryptoStorer) { + this.cryptoStorer = cryptoStorer; + 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 @@ -15372,6 +16322,143 @@ public Builder setUserAgent(EmptyParam userAgent) { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class CryptoStorer { + /** + * The time when the Account's representative accepted the terms of service. Represented + * as a RFC 3339 date & time UTC value in millisecond precision, for example: + * 2022-09-18T13:22:18.123Z. + */ + @SerializedName("date") + Instant 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 Account's representative accepted the terms of service. + */ + @SerializedName("ip") + Object ip; + + /** + * The user agent of the browser from which the Account's representative accepted the + * terms of service. + */ + @SerializedName("user_agent") + Object userAgent; + + private CryptoStorer( + Instant 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 Instant date; + + private Map extraParams; + + private Object ip; + + private Object userAgent; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountUpdateParams.Identity.Attestations.TermsOfService.CryptoStorer build() { + return new AccountUpdateParams.Identity.Attestations.TermsOfService.CryptoStorer( + this.date, this.extraParams, this.ip, this.userAgent); + } + + /** + * The time when the Account's representative accepted the terms of service. Represented + * as a RFC 3339 date & time UTC value in millisecond precision, for example: + * 2022-09-18T13:22:18.123Z. + */ + public Builder setDate(Instant 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.Identity.Attestations.TermsOfService.CryptoStorer#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.Identity.Attestations.TermsOfService.CryptoStorer#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 Account's representative accepted the terms of service. + */ + public Builder setIp(String ip) { + this.ip = ip; + return this; + } + + /** + * The IP address from which the Account's representative accepted the terms of service. + */ + public Builder setIp(EmptyParam ip) { + this.ip = ip; + return this; + } + + /** + * The user agent of the browser from which the Account's representative accepted the + * terms of service. + */ + public Builder setUserAgent(String userAgent) { + this.userAgent = userAgent; + return this; + } + + /** + * The user agent of the browser from which the Account's representative accepted the + * terms of service. + */ + public Builder setUserAgent(EmptyParam userAgent) { + this.userAgent = userAgent; + return this; + } + } + } + @Getter @EqualsAndHashCode(callSuper = false) public static class Storer { @@ -15522,6 +16609,13 @@ public static class BusinessDetails { @SerializedName("annual_revenue") AnnualRevenue annualRevenue; + /** + * A detailed description of the business's compliance and anti-money laundering controls and + * practices. + */ + @SerializedName("compliance_screening_description") + Object complianceScreeningDescription; + /** A document verifying the business. */ @SerializedName("documents") Documents documents; @@ -15573,6 +16667,7 @@ public static class BusinessDetails { private BusinessDetails( Address address, AnnualRevenue annualRevenue, + Object complianceScreeningDescription, Documents documents, Long estimatedWorkerCount, Map extraParams, @@ -15585,6 +16680,7 @@ private BusinessDetails( Structure structure) { this.address = address; this.annualRevenue = annualRevenue; + this.complianceScreeningDescription = complianceScreeningDescription; this.documents = documents; this.estimatedWorkerCount = estimatedWorkerCount; this.extraParams = extraParams; @@ -15606,6 +16702,8 @@ public static class Builder { private AnnualRevenue annualRevenue; + private Object complianceScreeningDescription; + private Documents documents; private Long estimatedWorkerCount; @@ -15631,6 +16729,7 @@ public AccountUpdateParams.Identity.BusinessDetails build() { return new AccountUpdateParams.Identity.BusinessDetails( this.address, this.annualRevenue, + this.complianceScreeningDescription, this.documents, this.estimatedWorkerCount, this.extraParams, @@ -15656,6 +16755,25 @@ public Builder setAnnualRevenue( return this; } + /** + * A detailed description of the business's compliance and anti-money laundering controls + * and practices. + */ + public Builder setComplianceScreeningDescription(String complianceScreeningDescription) { + this.complianceScreeningDescription = complianceScreeningDescription; + return this; + } + + /** + * A detailed description of the business's compliance and anti-money laundering controls + * and practices. + */ + public Builder setComplianceScreeningDescription( + EmptyParam complianceScreeningDescription) { + this.complianceScreeningDescription = complianceScreeningDescription; + return this; + } + /** A document verifying the business. */ public Builder setDocuments( AccountUpdateParams.Identity.BusinessDetails.Documents documents) { diff --git a/src/main/java/com/stripe/service/PaymentRecordService.java b/src/main/java/com/stripe/service/PaymentRecordService.java index a0a45a0f08e..8ab61a4ef4d 100644 --- a/src/main/java/com/stripe/service/PaymentRecordService.java +++ b/src/main/java/com/stripe/service/PaymentRecordService.java @@ -16,6 +16,7 @@ import com.stripe.param.PaymentRecordReportPaymentAttemptInformationalParams; import com.stripe.param.PaymentRecordReportPaymentAttemptParams; import com.stripe.param.PaymentRecordReportPaymentParams; +import com.stripe.param.PaymentRecordReportRefundParams; import com.stripe.param.PaymentRecordRetrieveParams; public final class PaymentRecordService extends ApiService { @@ -180,6 +181,26 @@ public PaymentRecord reportPaymentAttemptInformational( options); return this.request(request, PaymentRecord.class); } + /** Report that the most recent payment attempt on the specified Payment Record was refunded. */ + public PaymentRecord reportRefund(String id, PaymentRecordReportRefundParams params) + throws StripeException { + return reportRefund(id, params, (RequestOptions) null); + } + /** Report that the most recent payment attempt on the specified Payment Record was refunded. */ + public PaymentRecord reportRefund( + String id, PaymentRecordReportRefundParams params, RequestOptions options) + throws StripeException { + String path = + String.format("/v1/payment_records/%s/report_refund", ApiResource.urlEncodeId(id)); + ApiRequest request = + new ApiRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + path, + ApiRequestParams.paramsToMap(params), + options); + return this.request(request, PaymentRecord.class); + } /** * Report a new Payment Record. You may report a Payment Record as it is initialized and later * report updates through the other report_* methods, or report Payment Records in a terminal diff --git a/src/main/java/com/stripe/service/PayoutService.java b/src/main/java/com/stripe/service/PayoutService.java index 5b0df02199a..b46edd7bcb7 100644 --- a/src/main/java/com/stripe/service/PayoutService.java +++ b/src/main/java/com/stripe/service/PayoutService.java @@ -218,8 +218,8 @@ public Payout cancel(String payout, PayoutCancelParams params, RequestOptions op } /** * Reverses a payout by debiting the destination bank account. At this time, you can only reverse - * payouts for connected accounts to US bank accounts. If the payout is manual and in the {@code - * pending} status, use {@code /v1/payouts/:id/cancel} instead. + * payouts for connected accounts to US and Canadian bank accounts. If the payout is manual and in + * the {@code pending} status, use {@code /v1/payouts/:id/cancel} instead. * *

By requesting a reversal through {@code /v1/payouts/:id/reverse}, you confirm that the * authorized signatory of the selected bank account authorizes the debit on the bank account and @@ -230,8 +230,8 @@ public Payout reverse(String payout, PayoutReverseParams params) throws StripeEx } /** * Reverses a payout by debiting the destination bank account. At this time, you can only reverse - * payouts for connected accounts to US bank accounts. If the payout is manual and in the {@code - * pending} status, use {@code /v1/payouts/:id/cancel} instead. + * payouts for connected accounts to US and Canadian bank accounts. If the payout is manual and in + * the {@code pending} status, use {@code /v1/payouts/:id/cancel} instead. * *

By requesting a reversal through {@code /v1/payouts/:id/reverse}, you confirm that the * authorized signatory of the selected bank account authorizes the debit on the bank account and @@ -242,8 +242,8 @@ public Payout reverse(String payout, RequestOptions options) throws StripeExcept } /** * Reverses a payout by debiting the destination bank account. At this time, you can only reverse - * payouts for connected accounts to US bank accounts. If the payout is manual and in the {@code - * pending} status, use {@code /v1/payouts/:id/cancel} instead. + * payouts for connected accounts to US and Canadian bank accounts. If the payout is manual and in + * the {@code pending} status, use {@code /v1/payouts/:id/cancel} instead. * *

By requesting a reversal through {@code /v1/payouts/:id/reverse}, you confirm that the * authorized signatory of the selected bank account authorizes the debit on the bank account and @@ -254,8 +254,8 @@ public Payout reverse(String payout) throws StripeException { } /** * Reverses a payout by debiting the destination bank account. At this time, you can only reverse - * payouts for connected accounts to US bank accounts. If the payout is manual and in the {@code - * pending} status, use {@code /v1/payouts/:id/cancel} instead. + * payouts for connected accounts to US and Canadian bank accounts. If the payout is manual and in + * the {@code pending} status, use {@code /v1/payouts/:id/cancel} instead. * *

By requesting a reversal through {@code /v1/payouts/:id/reverse}, you confirm that the * authorized signatory of the selected bank account authorizes the debit on the bank account and diff --git a/src/main/java/com/stripe/service/financialconnections/AccountService.java b/src/main/java/com/stripe/service/financialconnections/AccountService.java index 282f1611af4..c0e2fce27f6 100644 --- a/src/main/java/com/stripe/service/financialconnections/AccountService.java +++ b/src/main/java/com/stripe/service/financialconnections/AccountService.java @@ -135,14 +135,14 @@ public Account refresh(String account, AccountRefreshParams params, RequestOptio } /** * Subscribes to periodic refreshes of data associated with a Financial Connections {@code - * Account}. + * Account}. When the account status is active, data is typically refreshed once a day. */ public Account subscribe(String account, AccountSubscribeParams params) throws StripeException { return subscribe(account, params, (RequestOptions) null); } /** * Subscribes to periodic refreshes of data associated with a Financial Connections {@code - * Account}. + * Account}. When the account status is active, data is typically refreshed once a day. */ public Account subscribe(String account, AccountSubscribeParams params, RequestOptions options) throws StripeException { diff --git a/src/main/java/com/stripe/service/terminal/ReaderService.java b/src/main/java/com/stripe/service/terminal/ReaderService.java index 6bd247bddbc..b96fc85fd5b 100644 --- a/src/main/java/com/stripe/service/terminal/ReaderService.java +++ b/src/main/java/com/stripe/service/terminal/ReaderService.java @@ -144,20 +144,36 @@ public Reader create(ReaderCreateParams params, RequestOptions options) throws S options); return this.request(request, Reader.class); } - /** Cancels the current reader action. */ + /** + * Cancels the current reader action. See Programmatic + * Cancellation for more details. + */ public Reader cancelAction(String reader, ReaderCancelActionParams params) throws StripeException { return cancelAction(reader, params, (RequestOptions) null); } - /** Cancels the current reader action. */ + /** + * Cancels the current reader action. See Programmatic + * Cancellation for more details. + */ public Reader cancelAction(String reader, RequestOptions options) throws StripeException { return cancelAction(reader, (ReaderCancelActionParams) null, options); } - /** Cancels the current reader action. */ + /** + * Cancels the current reader action. See Programmatic + * Cancellation for more details. + */ public Reader cancelAction(String reader) throws StripeException { return cancelAction(reader, (ReaderCancelActionParams) null, (RequestOptions) null); } - /** Cancels the current reader action. */ + /** + * Cancels the current reader action. See Programmatic + * Cancellation for more details. + */ public Reader cancelAction(String reader, ReaderCancelActionParams params, RequestOptions options) throws StripeException { String path = @@ -171,12 +187,20 @@ public Reader cancelAction(String reader, ReaderCancelActionParams params, Reque options); return this.request(request, Reader.class); } - /** Initiates an input collection flow on a Reader. */ + /** + * Initiates an input + * collection flow on a Reader to display input forms and collect information from your + * customers. + */ public Reader collectInputs(String reader, ReaderCollectInputsParams params) throws StripeException { return collectInputs(reader, params, (RequestOptions) null); } - /** Initiates an input collection flow on a Reader. */ + /** + * Initiates an input + * collection flow on a Reader to display input forms and collect information from your + * customers. + */ public Reader collectInputs( String reader, ReaderCollectInputsParams params, RequestOptions options) throws StripeException { @@ -193,7 +217,9 @@ public Reader collectInputs( } /** * Initiates a payment flow on a Reader and updates the PaymentIntent with card details before - * manual confirmation. + * manual confirmation. See Collecting + * a Payment method for more details. */ public Reader collectPaymentMethod(String reader, ReaderCollectPaymentMethodParams params) throws StripeException { @@ -201,7 +227,9 @@ public Reader collectPaymentMethod(String reader, ReaderCollectPaymentMethodPara } /** * Initiates a payment flow on a Reader and updates the PaymentIntent with card details before - * manual confirmation. + * manual confirmation. See Collecting + * a Payment method for more details. */ public Reader collectPaymentMethod( String reader, ReaderCollectPaymentMethodParams params, RequestOptions options) @@ -218,12 +246,20 @@ public Reader collectPaymentMethod( options); return this.request(request, Reader.class); } - /** Finalizes a payment on a Reader. */ + /** + * Finalizes a payment on a Reader. See Confirming + * a Payment for more details. + */ public Reader confirmPaymentIntent(String reader, ReaderConfirmPaymentIntentParams params) throws StripeException { return confirmPaymentIntent(reader, params, (RequestOptions) null); } - /** Finalizes a payment on a Reader. */ + /** + * Finalizes a payment on a Reader. See Confirming + * a Payment for more details. + */ public Reader confirmPaymentIntent( String reader, ReaderConfirmPaymentIntentParams params, RequestOptions options) throws StripeException { @@ -239,12 +275,20 @@ public Reader confirmPaymentIntent( options); return this.request(request, Reader.class); } - /** Initiates a payment flow on a Reader. */ + /** + * Initiates a payment flow on a Reader. See process + * the payment for more details. + */ public Reader processPaymentIntent(String reader, ReaderProcessPaymentIntentParams params) throws StripeException { return processPaymentIntent(reader, params, (RequestOptions) null); } - /** Initiates a payment flow on a Reader. */ + /** + * Initiates a payment flow on a Reader. See process + * the payment for more details. + */ public Reader processPaymentIntent( String reader, ReaderProcessPaymentIntentParams params, RequestOptions options) throws StripeException { @@ -260,12 +304,20 @@ public Reader processPaymentIntent( options); return this.request(request, Reader.class); } - /** Initiates a setup intent flow on a Reader. */ + /** + * Initiates a SetupIntent flow on a Reader. See Save + * directly without charging for more details. + */ public Reader processSetupIntent(String reader, ReaderProcessSetupIntentParams params) throws StripeException { return processSetupIntent(reader, params, (RequestOptions) null); } - /** Initiates a setup intent flow on a Reader. */ + /** + * Initiates a SetupIntent flow on a Reader. See Save + * directly without charging for more details. + */ public Reader processSetupIntent( String reader, ReaderProcessSetupIntentParams params, RequestOptions options) throws StripeException { @@ -281,20 +333,36 @@ public Reader processSetupIntent( options); return this.request(request, Reader.class); } - /** Initiates a refund on a Reader. */ + /** + * Initiates an in-person refund on a Reader. See Refund + * an Interac Payment for more details. + */ public Reader refundPayment(String reader, ReaderRefundPaymentParams params) throws StripeException { return refundPayment(reader, params, (RequestOptions) null); } - /** Initiates a refund on a Reader. */ + /** + * Initiates an in-person refund on a Reader. See Refund + * an Interac Payment for more details. + */ public Reader refundPayment(String reader, RequestOptions options) throws StripeException { return refundPayment(reader, (ReaderRefundPaymentParams) null, options); } - /** Initiates a refund on a Reader. */ + /** + * Initiates an in-person refund on a Reader. See Refund + * an Interac Payment for more details. + */ public Reader refundPayment(String reader) throws StripeException { return refundPayment(reader, (ReaderRefundPaymentParams) null, (RequestOptions) null); } - /** Initiates a refund on a Reader. */ + /** + * Initiates an in-person refund on a Reader. See Refund + * an Interac Payment for more details. + */ public Reader refundPayment( String reader, ReaderRefundPaymentParams params, RequestOptions options) throws StripeException { @@ -309,12 +377,18 @@ public Reader refundPayment( options); return this.request(request, Reader.class); } - /** Sets reader display to show cart details. */ + /** + * Sets the reader display to show cart details. + */ public Reader setReaderDisplay(String reader, ReaderSetReaderDisplayParams params) throws StripeException { return setReaderDisplay(reader, params, (RequestOptions) null); } - /** Sets reader display to show cart details. */ + /** + * Sets the reader display to show cart details. + */ public Reader setReaderDisplay( String reader, ReaderSetReaderDisplayParams params, RequestOptions options) throws StripeException {