Skip to content

Commit

Permalink
Update generated code for beta (#1932)
Browse files Browse the repository at this point in the history
* Update generated code for v1407

* Update generated code for v1408

* Update generated code for v1409

* Update generated code for v1410

* Update generated code for v1411

* Update generated code for v1413

* Update generated code for v1414

* Update generated code for v1415

* Update generated code for v1416

* Update generated code (#1931)

* Update generated code for v1399

* Update generated code for v1402

* Update generated code for v1409

* Update generated code for v1412

---------

Co-authored-by: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com>

* Bump version to 28.2.0

* Added pull request template (#1933)

* Update generated code for v1423

* Update generated code for v1429

* Update generated code for v1430

* Update generated code for v1431

* Update generated code for v1432

* Update generated code for v1433

* Update generated code for v1435

* Update generated code for v1436

---------

Co-authored-by: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com>
Co-authored-by: Jesse Rosalia <[email protected]>
  • Loading branch information
stripe-openapi[bot] and jar-stripe authored Jan 9, 2025
1 parent 9aeb03b commit 6e34290
Show file tree
Hide file tree
Showing 50 changed files with 6,243 additions and 2,694 deletions.
11 changes: 11 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
### Why?
<!-- Describe why this change is being made. Briefly include history and context, high-level what this PR does, and what the world looks like afterward. -->

### What?
<!--
List out the key changes made in this PR, e.g.
- implements the antimatter particle trace in the nitronium microfilament drive
- updated tests -->

### See Also
<!-- Include any links or additional information that help explain this change. -->
21 changes: 21 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,26 @@
# Changelog

## 28.2.0 - 2024-12-18
* [#1931](https://github.com/stripe/stripe-java/pull/1931) This release changes the pinned API version to `2024-12-18.acacia`.
* Add support for `network_advice_code` and `network_decline_code` on `Charge.outcome`, `Invoice.last_finalization_error`, `PaymentIntent.last_payment_error`, `SetupAttempt.setup_error`, `SetupIntent.last_setup_error`, and `StripeError`
* Add support for `credits_application_invoice_voided` on `Billing.CreditBalanceTransaction.credit`
* Change type of `Billing.CreditBalanceTransaction.credit.type` from `literal('credits_granted')` to `enum('credits_application_invoice_voided'|'credits_granted')`
* Add support for `allow_redisplay` on `Card` and `Source`
* Add support for `regulated_status` on `Card`, `Charge.payment_method_details.card`, `ConfirmationToken.payment_method_preview.card`, and `PaymentMethod.card`
* Add support for `funding` on `Charge.payment_method_details.amazon_pay` and `Charge.payment_method_details.revolut_pay`
* Add support for `network_transaction_id` on `Charge.payment_method_details.card`
* Add support for `reference_prefix` on `Checkout.Session.payment_method_options.bacs_debit.mandate_options`, `Checkout.Session.payment_method_options.sepa_debit.mandate_options`, `PaymentIntent.payment_method_options.bacs_debit.mandate_options`, `PaymentIntent.payment_method_options.sepa_debit.mandate_options`, `PaymentIntentConfirmParams.payment_method_options.bacs_debit.mandate_options`, `PaymentIntentConfirmParams.payment_method_options.sepa_debit.mandate_options`, `PaymentIntentCreateParams.payment_method_options.bacs_debit.mandate_options`, `PaymentIntentCreateParams.payment_method_options.sepa_debit.mandate_options`, `PaymentIntentUpdateParams.payment_method_options.bacs_debit.mandate_options`, `PaymentIntentUpdateParams.payment_method_options.sepa_debit.mandate_options`, `SetupIntent.payment_method_options.bacs_debit.mandate_options`, `SetupIntent.payment_method_options.sepa_debit.mandate_options`, `SetupIntentConfirmParams.payment_method_options.bacs_debit.mandate_options`, `SetupIntentConfirmParams.payment_method_options.sepa_debit.mandate_options`, `SetupIntentCreateParams.payment_method_options.bacs_debit.mandate_options`, `SetupIntentCreateParams.payment_method_options.sepa_debit.mandate_options`, `SetupIntentUpdateParams.payment_method_options.bacs_debit.mandate_options`, `SetupIntentUpdateParams.payment_method_options.sepa_debit.mandate_options`, `checkout.SessionCreateParams.payment_method_options.bacs_debit.mandate_options`, and `checkout.SessionCreateParams.payment_method_options.sepa_debit.mandate_options`
* Add support for new values `al_tin`, `am_tin`, `ao_tin`, `ba_tin`, `bb_tin`, `bs_tin`, `cd_nif`, `gn_nif`, `kh_tin`, `me_pib`, `mk_vat`, `mr_nif`, `np_pan`, `sn_ninea`, `sr_fin`, `tj_tin`, `ug_tin`, `zm_tin`, and `zw_tin` on enums `CustomerCreateParams.tax_id_data[].type`, `InvoiceCreatePreviewParams.customer_details.tax_ids[].type`, `InvoiceUpcomingLinesParams.customer_details.tax_ids[].type`, `InvoiceUpcomingParams.customer_details.tax_ids[].type`, `TaxIdCreateParams.type`, and `tax.CalculationCreateParams.customer_details.tax_ids[].type`
* Add support for `visa_compliance` on `Dispute.evidence.enhanced_evidence`, `Dispute.evidence_details.enhanced_eligibility`, and `DisputeUpdateParams.evidence.enhanced_evidence`
* Add support for new value `request_signature` on enum `forwarding.RequestCreateParams.replacements[]`
* Add support for `account_holder_address` and `bank_address` on `FundingInstructions.bank_transfer.financial_addresses[].iban`, `FundingInstructions.bank_transfer.financial_addresses[].sort_code`, `FundingInstructions.bank_transfer.financial_addresses[].spei`, `FundingInstructions.bank_transfer.financial_addresses[].zengin`, `PaymentIntent.next_action.display_bank_transfer_instructions.financial_addresses[].iban`, `PaymentIntent.next_action.display_bank_transfer_instructions.financial_addresses[].sort_code`, `PaymentIntent.next_action.display_bank_transfer_instructions.financial_addresses[].spei`, and `PaymentIntent.next_action.display_bank_transfer_instructions.financial_addresses[].zengin`
* Add support for `account_holder_name` on `FundingInstructions.bank_transfer.financial_addresses[].spei` and `PaymentIntent.next_action.display_bank_transfer_instructions.financial_addresses[].spei`
* Add support for `disabled_reason` on `Invoice.automatic_tax`, `Subscription.automatic_tax`, `SubscriptionSchedule.default_settings.automatic_tax`, and `SubscriptionSchedule.phases[].automatic_tax`
* Add support for `tax_id` on `Issuing.Authorization.merchant_data` and `Issuing.Transaction.merchant_data`
* Add support for `trial_period_days` on `PaymentLinkUpdateParams.subscription_data`
* Add support for `al`, `am`, `ao`, `ba`, `bb`, `bs`, `cd`, `gn`, `kh`, `me`, `mk`, `mr`, `np`, `pe`, `sn`, `sr`, `tj`, `ug`, `uy`, `zm`, and `zw` on `Tax.Registration.country_options` and `tax.RegistrationCreateParams.country_options`
* Add support for new value `2024-12-18.acacia` on enum `WebhookEndpointCreateParams.api_version`

## 28.2.0-beta.4 - 2024-12-12
* [#1929](https://github.com/stripe/stripe-java/pull/1929) Update generated code for beta
* Add support for `allow_redisplay` on `Card` and `Source`
Expand Down
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v1406
v1436
34 changes: 34 additions & 0 deletions src/main/java/com/stripe/model/Account.java
Original file line number Diff line number Diff line change
Expand Up @@ -1474,6 +1474,13 @@ public static class Company extends StripeObject {
@SerializedName("directors_provided")
Boolean directorsProvided;

/**
* This hash is used to attest that the director information provided to Stripe is both current
* and correct.
*/
@SerializedName("directorship_declaration")
DirectorshipDeclaration directorshipDeclaration;

/**
* Whether the company's executives have been provided. This Boolean will be {@code true} if
* you've manually indicated that all executives are provided via <a
Expand Down Expand Up @@ -1526,6 +1533,9 @@ public static class Company extends StripeObject {
@SerializedName("ownership_declaration")
OwnershipDeclaration ownershipDeclaration;

@SerializedName("ownership_exemption_reason")
String ownershipExemptionReason;

/** The company's phone number (used for verification). */
@SerializedName("phone")
String phone;
Expand Down Expand Up @@ -1646,6 +1656,30 @@ public static class AddressKanji extends StripeObject {
String town;
}

/**
* For more details about DirectorshipDeclaration, please refer to the <a
* href="https://docs.stripe.com/api">API Reference.</a>
*/
@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
public static class DirectorshipDeclaration extends StripeObject {
/** The Unix timestamp marking when the directorship declaration attestation was made. */
@SerializedName("date")
Long date;

/** The IP address from which the directorship declaration attestation was made. */
@SerializedName("ip")
String ip;

/**
* The user-agent string from the browser where the directorship declaration attestation was
* made.
*/
@SerializedName("user_agent")
String userAgent;
}

/**
* For more details about OwnershipDeclaration, please refer to the <a
* href="https://docs.stripe.com/api">API Reference.</a>
Expand Down
8 changes: 8 additions & 0 deletions src/main/java/com/stripe/model/Card.java
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,14 @@ public class Card extends ApiResource
@SerializedName("brand")
String brand;

/**
* The <a href="https://stripe.com/docs/card-product-codes">product code</a> that identifies the
* specific program or product associated with a card. (For internal use only and not typically
* available in standard API requests.)
*/
@SerializedName("brand_product")
String brandProduct;

/**
* Two-letter ISO code representing the country of the card. You could use this attribute to get a
* sense of the international breakdown of cards you've collected.
Expand Down
18 changes: 18 additions & 0 deletions src/main/java/com/stripe/model/Charge.java
Original file line number Diff line number Diff line change
Expand Up @@ -1028,6 +1028,16 @@ public static class LineItem extends StripeObject {
@Setter
@EqualsAndHashCode(callSuper = false)
public static class Outcome extends StripeObject {
/**
* An enumerated value providing a more detailed explanation on <a
* href="https://stripe.com/docs/declines#retrying-issuer-declines">how to proceed with an
* error</a>.
*
* <p>One of {@code confirm_card_data}, {@code do_not_try_again}, or {@code try_again_later}.
*/
@SerializedName("advice_code")
String adviceCode;

/**
* For charges declined by the network, a 2 digit code which indicates the advice returned by
* the network on how to proceed with an error.
Expand Down Expand Up @@ -3413,6 +3423,14 @@ public static class Paynow extends StripeObject {
@Setter
@EqualsAndHashCode(callSuper = false)
public static class Paypal extends StripeObject {
/**
* Two-letter ISO code representing the buyer's country. Values are provided by PayPal
* directly (if supported) at the time of authorization or settlement. They cannot be set or
* mutated.
*/
@SerializedName("country")
String country;

/**
* Owner's email. Values are provided by PayPal directly (if supported) at the time of
* authorization or settlement. They cannot be set or mutated.
Expand Down
8 changes: 8 additions & 0 deletions src/main/java/com/stripe/model/ConfirmationToken.java
Original file line number Diff line number Diff line change
Expand Up @@ -1938,6 +1938,14 @@ public static class Paynow extends StripeObject {}
@Setter
@EqualsAndHashCode(callSuper = false)
public static class Paypal extends StripeObject {
/**
* Two-letter ISO code representing the buyer's country. Values are provided by PayPal
* directly (if supported) at the time of authorization or settlement. They cannot be set or
* mutated.
*/
@SerializedName("country")
String country;

/**
* Uniquely identifies this particular PayPal account. You can use this attribute to check
* whether two PayPal accounts are the same.
Expand Down
10 changes: 6 additions & 4 deletions src/main/java/com/stripe/model/Dispute.java
Original file line number Diff line number Diff line change
Expand Up @@ -993,9 +993,11 @@ public static class ShippingAddress extends StripeObject {
@EqualsAndHashCode(callSuper = false)
public static class VisaCompliance extends StripeObject {
/**
* A field acknowledging the fee incurred when countering a Visa Compliance dispute. If this
* field is set to true, evidence can be submitted for the compliance dispute, and you may
* incur a $500 fee if the case is lost.
* A field acknowledging the fee incurred when countering a Visa compliance dispute. If this
* field is set to true, evidence can be submitted for the compliance dispute. Stripe
* collects a 500 USD (or local equivalent) amount to cover the network costs associated
* with resolving compliance disputes. Stripe refunds the 500 USD network fee if you win the
* dispute.
*/
@SerializedName("fee_acknowledged")
Boolean feeAcknowledged;
Expand Down Expand Up @@ -1088,7 +1090,7 @@ public static class VisaCompellingEvidence3 extends StripeObject {
@EqualsAndHashCode(callSuper = false)
public static class VisaCompliance extends StripeObject {
/**
* Visa Compelling Evidence 3.0 eligibility status.
* Visa compliance eligibility status.
*
* <p>One of {@code fee_acknowledged}, or {@code requires_fee_acknowledgement}.
*/
Expand Down
14 changes: 7 additions & 7 deletions src/main/java/com/stripe/model/Invoice.java
Original file line number Diff line number Diff line change
Expand Up @@ -2630,13 +2630,13 @@ public static class CustomerTaxId extends StripeObject {
* ca_pst_bc}, {@code ca_pst_mb}, {@code ca_pst_sk}, {@code my_sst}, {@code sg_gst}, {@code
* ae_trn}, {@code cl_tin}, {@code sa_vat}, {@code id_npwp}, {@code my_frp}, {@code il_vat},
* {@code ge_vat}, {@code ua_vat}, {@code is_vat}, {@code bg_uic}, {@code hu_tin}, {@code
* si_tin}, {@code ke_pin}, {@code tr_tin}, {@code eg_tin}, {@code ph_tin}, {@code bh_vat},
* {@code kz_bin}, {@code ng_tin}, {@code om_vat}, {@code de_stn}, {@code ch_uid}, {@code
* tz_vat}, {@code uz_vat}, {@code uz_tin}, {@code md_vat}, {@code ma_vat}, {@code by_tin},
* {@code ao_tin}, {@code bs_tin}, {@code bb_tin}, {@code cd_nif}, {@code mr_nif}, {@code
* me_pib}, {@code zw_tin}, {@code ba_tin}, {@code gn_nif}, {@code mk_vat}, {@code sr_fin},
* {@code sn_ninea}, {@code am_tin}, {@code np_pan}, {@code tj_tin}, {@code ug_tin}, {@code
* zm_tin}, {@code kh_tin}, or {@code unknown}.
* si_tin}, {@code ke_pin}, {@code tr_tin}, {@code eg_tin}, {@code ph_tin}, {@code al_tin},
* {@code bh_vat}, {@code kz_bin}, {@code ng_tin}, {@code om_vat}, {@code de_stn}, {@code
* ch_uid}, {@code tz_vat}, {@code uz_vat}, {@code uz_tin}, {@code md_vat}, {@code ma_vat},
* {@code by_tin}, {@code ao_tin}, {@code bs_tin}, {@code bb_tin}, {@code cd_nif}, {@code
* mr_nif}, {@code me_pib}, {@code zw_tin}, {@code ba_tin}, {@code gn_nif}, {@code mk_vat},
* {@code sr_fin}, {@code sn_ninea}, {@code am_tin}, {@code np_pan}, {@code tj_tin}, {@code
* ug_tin}, {@code zm_tin}, {@code kh_tin}, or {@code unknown}.
*/
@SerializedName("type")
String type;
Expand Down
12 changes: 6 additions & 6 deletions src/main/java/com/stripe/model/Order.java
Original file line number Diff line number Diff line change
Expand Up @@ -1936,12 +1936,12 @@ public static class TaxId extends StripeObject {
* {@code sg_gst}, {@code ae_trn}, {@code cl_tin}, {@code sa_vat}, {@code id_npwp}, {@code
* my_frp}, {@code il_vat}, {@code ge_vat}, {@code ua_vat}, {@code is_vat}, {@code bg_uic},
* {@code hu_tin}, {@code si_tin}, {@code ke_pin}, {@code tr_tin}, {@code eg_tin}, {@code
* ph_tin}, {@code bh_vat}, {@code kz_bin}, {@code ng_tin}, {@code om_vat}, {@code de_stn},
* {@code ch_uid}, {@code tz_vat}, {@code uz_vat}, {@code uz_tin}, {@code md_vat}, {@code
* ma_vat}, {@code by_tin}, {@code ao_tin}, {@code bs_tin}, {@code bb_tin}, {@code cd_nif},
* {@code mr_nif}, {@code me_pib}, {@code zw_tin}, {@code ba_tin}, {@code gn_nif}, {@code
* mk_vat}, {@code sr_fin}, {@code sn_ninea}, {@code am_tin}, {@code np_pan}, {@code tj_tin},
* {@code ug_tin}, {@code zm_tin}, {@code kh_tin}, or {@code unknown}.
* ph_tin}, {@code al_tin}, {@code bh_vat}, {@code kz_bin}, {@code ng_tin}, {@code om_vat},
* {@code de_stn}, {@code ch_uid}, {@code tz_vat}, {@code uz_vat}, {@code uz_tin}, {@code
* md_vat}, {@code ma_vat}, {@code by_tin}, {@code ao_tin}, {@code bs_tin}, {@code bb_tin},
* {@code cd_nif}, {@code mr_nif}, {@code me_pib}, {@code zw_tin}, {@code ba_tin}, {@code
* gn_nif}, {@code mk_vat}, {@code sr_fin}, {@code sn_ninea}, {@code am_tin}, {@code np_pan},
* {@code tj_tin}, {@code ug_tin}, {@code zm_tin}, {@code kh_tin}, or {@code unknown}.
*/
@SerializedName("type")
String type;
Expand Down
7 changes: 7 additions & 0 deletions src/main/java/com/stripe/model/PaymentMethod.java
Original file line number Diff line number Diff line change
Expand Up @@ -2161,6 +2161,13 @@ public static class Paynow extends StripeObject {}
@Setter
@EqualsAndHashCode(callSuper = false)
public static class Paypal extends StripeObject {
/**
* Two-letter ISO code representing the buyer's country. Values are provided by PayPal directly
* (if supported) at the time of authorization or settlement. They cannot be set or mutated.
*/
@SerializedName("country")
String country;

/**
* Uniquely identifies this particular PayPal account. You can use this attribute to check
* whether two PayPal accounts are the same.
Expand Down
14 changes: 7 additions & 7 deletions src/main/java/com/stripe/model/QuotePreviewInvoice.java
Original file line number Diff line number Diff line change
Expand Up @@ -1146,13 +1146,13 @@ public static class CustomerTaxId extends StripeObject {
* ca_pst_bc}, {@code ca_pst_mb}, {@code ca_pst_sk}, {@code my_sst}, {@code sg_gst}, {@code
* ae_trn}, {@code cl_tin}, {@code sa_vat}, {@code id_npwp}, {@code my_frp}, {@code il_vat},
* {@code ge_vat}, {@code ua_vat}, {@code is_vat}, {@code bg_uic}, {@code hu_tin}, {@code
* si_tin}, {@code ke_pin}, {@code tr_tin}, {@code eg_tin}, {@code ph_tin}, {@code bh_vat},
* {@code kz_bin}, {@code ng_tin}, {@code om_vat}, {@code de_stn}, {@code ch_uid}, {@code
* tz_vat}, {@code uz_vat}, {@code uz_tin}, {@code md_vat}, {@code ma_vat}, {@code by_tin},
* {@code ao_tin}, {@code bs_tin}, {@code bb_tin}, {@code cd_nif}, {@code mr_nif}, {@code
* me_pib}, {@code zw_tin}, {@code ba_tin}, {@code gn_nif}, {@code mk_vat}, {@code sr_fin},
* {@code sn_ninea}, {@code am_tin}, {@code np_pan}, {@code tj_tin}, {@code ug_tin}, {@code
* zm_tin}, {@code kh_tin}, or {@code unknown}.
* si_tin}, {@code ke_pin}, {@code tr_tin}, {@code eg_tin}, {@code ph_tin}, {@code al_tin},
* {@code bh_vat}, {@code kz_bin}, {@code ng_tin}, {@code om_vat}, {@code de_stn}, {@code
* ch_uid}, {@code tz_vat}, {@code uz_vat}, {@code uz_tin}, {@code md_vat}, {@code ma_vat},
* {@code by_tin}, {@code ao_tin}, {@code bs_tin}, {@code bb_tin}, {@code cd_nif}, {@code
* mr_nif}, {@code me_pib}, {@code zw_tin}, {@code ba_tin}, {@code gn_nif}, {@code mk_vat},
* {@code sr_fin}, {@code sn_ninea}, {@code am_tin}, {@code np_pan}, {@code tj_tin}, {@code
* ug_tin}, {@code zm_tin}, {@code kh_tin}, or {@code unknown}.
*/
@SerializedName("type")
String type;
Expand Down
9 changes: 9 additions & 0 deletions src/main/java/com/stripe/model/Source.java
Original file line number Diff line number Diff line change
Expand Up @@ -669,6 +669,9 @@ public static class Card extends StripeObject {
@SerializedName("brand")
String brand;

@SerializedName("brand_product")
String brandProduct;

@SerializedName("country")
String country;

Expand Down Expand Up @@ -735,6 +738,9 @@ public static class CardPresent extends StripeObject {
@SerializedName("brand")
String brand;

@SerializedName("brand_product")
String brandProduct;

@SerializedName("country")
String country;

Expand Down Expand Up @@ -1396,6 +1402,9 @@ public static class ThreeDSecure extends StripeObject {
@SerializedName("brand")
String brand;

@SerializedName("brand_product")
String brandProduct;

@SerializedName("card")
String card;

Expand Down
8 changes: 8 additions & 0 deletions src/main/java/com/stripe/model/StripeError.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,14 @@
@Setter
@EqualsAndHashCode(callSuper = false)
public class StripeError extends StripeObject {
/**
* For card errors resulting from a card issuer decline, a short string indicating <a
* href="https://stripe.com/docs/declines#retrying-issuer-declines">how to proceed with an
* error</a> if they provide one.
*/
@SerializedName("advice_code")
String adviceCode;

/** For card errors, the ID of the failed charge. */
@SerializedName("charge")
String charge;
Expand Down
Loading

0 comments on commit 6e34290

Please sign in to comment.