Skip to content

Commit

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

* Update generated code for v1462

* Update generated code for v1463

* Updated upload artifact ci action (#1941)

* Update generated code (#1936)

* Update generated code for v1441

* Update generated code for v1455

---------

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

* Bump version to 28.3.0

* Update generated code for v1464

* Update generated code for v1466

* Update generated code for v1467

* Ensure `getRawJsonObject` returns data for constructed webhooks (#1946)

* construct fake response during webhook parsing

* formatting

* Update generated code for v1472

---------

Co-authored-by: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com>
Co-authored-by: prathmesh-stripe <[email protected]>
Co-authored-by: helenye-stripe <[email protected]>
Co-authored-by: Helen Ye <[email protected]>
Co-authored-by: David Brownman <[email protected]>
  • Loading branch information
5 people authored Feb 7, 2025
1 parent 804e041 commit b9d6f53
Show file tree
Hide file tree
Showing 36 changed files with 939 additions and 148 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ jobs:
mv ../japi-compliance-checker/compat_reports/stripe-java/*/compat_report.html report.html
- name: Upload report as artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: JAPI Compliance Report
path: report.html
Expand Down
32 changes: 32 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,37 @@
# Changelog

## 28.3.0 - 2025-01-27
* [#1936](https://github.com/stripe/stripe-java/pull/1936) Update generated code
* Add support for `close` method on resource `Treasury.FinancialAccount`
* Add support for `pay_by_bank_payments` on `Account.capabilities`, `AccountCreateParams.capabilities`, and `AccountUpdateParams.capabilities`
* Add support for `directorship_declaration` and `ownership_exemption_reason` on `Account.company`, `AccountCreateParams.company`, `AccountUpdateParams.company`, and `TokenCreateParams.account.company`
* Add support for `proof_of_ultimate_beneficial_ownership` on `AccountCreateParams.documents` and `AccountUpdateParams.documents`
* Add support for `financial_account` on `AccountSession.components`, `AccountSessionCreateParams.components`, and `Treasury.OutboundTransfer.destination_payment_method_details`
* Add support for `financial_account_transactions`, `issuing_card`, and `issuing_cards_list` on `AccountSession.components` and `AccountSessionCreateParams.components`
* Add support for `advice_code` on `Charge.outcome`, `Invoice.last_finalization_error`, `PaymentIntent.last_payment_error`, `SetupAttempt.setup_error`, `SetupIntent.last_setup_error`, and `StripeError`
* Add support for `pay_by_bank` on `Charge.payment_method_details`, `ConfirmationToken.payment_method_preview`, `ConfirmationTokenCreateParams.payment_method_data`, `PaymentIntent.payment_method_options`, `PaymentIntentConfirmParams.payment_method_data`, `PaymentIntentConfirmParams.payment_method_options`, `PaymentIntentCreateParams.payment_method_data`, `PaymentIntentCreateParams.payment_method_options`, `PaymentIntentUpdateParams.payment_method_data`, `PaymentIntentUpdateParams.payment_method_options`, `PaymentMethodConfigurationCreateParams`, `PaymentMethodConfigurationUpdateParams`, `PaymentMethodConfiguration`, `PaymentMethodCreateParams`, `PaymentMethodUpdateParams`, `PaymentMethod`, `SetupIntentConfirmParams.payment_method_data`, `SetupIntentCreateParams.payment_method_data`, `SetupIntentUpdateParams.payment_method_data`, and `checkout.SessionCreateParams.payment_method_options`
* Add support for `country` on `Charge.payment_method_details.paypal`, `ConfirmationToken.payment_method_preview.paypal`, and `PaymentMethod.paypal`
* Add support for new value `pay_by_bank` on enums `CustomerListPaymentMethodsParams.type`, `PaymentMethodCreateParams.type`, `PaymentMethodListParams.type`, and `checkout.SessionCreateParams.payment_method_types[]`
* Add support for new value `SD` on enums `PaymentLinkCreateParams.shipping_address_collection.allowed_countries[]`, `PaymentLinkUpdateParams.shipping_address_collection.allowed_countries[]`, and `checkout.SessionCreateParams.shipping_address_collection.allowed_countries[]`
* Add support for `discounts` on `Checkout.Session`
* Add support for new value `pay_by_bank` on enums `ConfirmationTokenCreateParams.payment_method_data.type`, `PaymentIntentConfirmParams.payment_method_data.type`, `PaymentIntentCreateParams.payment_method_data.type`, `PaymentIntentUpdateParams.payment_method_data.type`, `SetupIntentConfirmParams.payment_method_data.type`, `SetupIntentCreateParams.payment_method_data.type`, and `SetupIntentUpdateParams.payment_method_data.type`
* Add support for new value `pay_by_bank` on enums `PaymentLinkCreateParams.payment_method_types[]` and `PaymentLinkUpdateParams.payment_method_types[]`
* Add support for `phone_number_collection` on `PaymentLinkUpdateParams`
* Add support for `jpy` on `Terminal.Configuration.tipping`, `terminal.ConfigurationCreateParams.tipping`, and `terminal.ConfigurationUpdateParams.tipping`
* Add support for `nickname` on `Treasury.FinancialAccount`, `treasury.FinancialAccountCreateParams`, and `treasury.FinancialAccountUpdateParams`
* Add support for `forwarding_settings` on `treasury.FinancialAccountUpdateParams`
* Add support for `is_default` on `Treasury.FinancialAccount`
* Add support for `destination_payment_method_data` on `treasury.OutboundTransferCreateParams`
* Change type of `Treasury.OutboundTransfer.destination_payment_method_details.type` from `literal('us_bank_account')` to `enum('financial_account'|'us_bank_account')`
* Add support for new value `outbound_transfer` on enum `treasury.ReceivedCreditListParams.linked_flows.source_flow_type`
* Add support for `outbound_transfer` on `Treasury.ReceivedCredit.linked_flows.source_flow_details`
* Add support for new value `2025-01-27.acacia` on enum `WebhookEndpointCreateParams.api_version`
* [#1941](https://github.com/stripe/stripe-java/pull/1941) Updated upload artifact ci action
* [#1938](https://github.com/stripe/stripe-java/pull/1938) update justfile import & pin CI ubuntu
* [#1937](https://github.com/stripe/stripe-java/pull/1937) Added CONTRIBUTING.md file
* [#1934](https://github.com/stripe/stripe-java/pull/1934) add justfile tweak readme, remove coveralls
* [#1933](https://github.com/stripe/stripe-java/pull/1933) Added pull request template

## 28.3.0-beta.3 - 2025-01-23
* [#1939](https://github.com/stripe/stripe-java/pull/1939) Update generated code for beta
* Remove support for `stripe_account` on `Terminal.Reader.action.collect_payment_method`, `Terminal.Reader.action.confirm_payment_intent`, `Terminal.Reader.action.process_payment_intent`, and `Terminal.Reader.action.refund_payment`
Expand Down
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v1460
v1472
12 changes: 12 additions & 0 deletions src/main/java/com/stripe/model/Account.java
Original file line number Diff line number Diff line change
Expand Up @@ -2353,6 +2353,18 @@ public static class RiskControls extends StripeObject {
@SerializedName("payouts")
Payouts payouts;

/**
* Represents the rejected reason of the account. Empty if account is not rejected, or rejected
* by Stripe. Please see <a href="https://stripe.com/docs/connect/">this page for more
* details</a>
*
* <p>One of {@code credit}, {@code fraud}, {@code fraud_no_intent_to_fulfill}, {@code
* fraud_other}, {@code fraud_payment_method_casher}, {@code fraud_payment_method_tester},
* {@code other}, or {@code terms_of_service}.
*/
@SerializedName("rejected_reason")
String rejectedReason;

/**
* For more details about Charges, please refer to the <a href="https://docs.stripe.com/api">API
* Reference.</a>
Expand Down
90 changes: 72 additions & 18 deletions src/main/java/com/stripe/model/Balance.java
Original file line number Diff line number Diff line change
Expand Up @@ -166,15 +166,24 @@ public static class Available extends StripeObject {
@Setter
@EqualsAndHashCode(callSuper = false)
public static class SourceTypes extends StripeObject {
/** Amount for bank account. */
/**
* Amount coming from <a href="https://docs.stripe.com/ach-deprecated">legacy US ACH
* payments</a>.
*/
@SerializedName("bank_account")
Long bankAccount;

/** Amount for card. */
/**
* Amount coming from most payment methods, including cards as well as <a
* href="https://docs.stripe.com/payments/bank-debits">non-legacy bank debits</a>.
*/
@SerializedName("card")
Long card;

/** Amount for FPX. */
/**
* Amount coming from <a href="https://docs.stripe.com/payments/fpx">FPX</a>, a Malaysian
* payment method.
*/
@SerializedName("fpx")
Long fpx;
}
Expand Down Expand Up @@ -211,15 +220,24 @@ public static class ConnectReserved extends StripeObject {
@Setter
@EqualsAndHashCode(callSuper = false)
public static class SourceTypes extends StripeObject {
/** Amount for bank account. */
/**
* Amount coming from <a href="https://docs.stripe.com/ach-deprecated">legacy US ACH
* payments</a>.
*/
@SerializedName("bank_account")
Long bankAccount;

/** Amount for card. */
/**
* Amount coming from most payment methods, including cards as well as <a
* href="https://docs.stripe.com/payments/bank-debits">non-legacy bank debits</a>.
*/
@SerializedName("card")
Long card;

/** Amount for FPX. */
/**
* Amount coming from <a href="https://docs.stripe.com/payments/fpx">FPX</a>, a Malaysian
* payment method.
*/
@SerializedName("fpx")
Long fpx;
}
Expand Down Expand Up @@ -279,15 +297,24 @@ public static class NetAvailable extends StripeObject {
@Setter
@EqualsAndHashCode(callSuper = false)
public static class SourceTypes extends StripeObject {
/** Amount for bank account. */
/**
* Amount coming from <a href="https://docs.stripe.com/ach-deprecated">legacy US ACH
* payments</a>.
*/
@SerializedName("bank_account")
Long bankAccount;

/** Amount for card. */
/**
* Amount coming from most payment methods, including cards as well as <a
* href="https://docs.stripe.com/payments/bank-debits">non-legacy bank debits</a>.
*/
@SerializedName("card")
Long card;

/** Amount for FPX. */
/**
* Amount coming from <a href="https://docs.stripe.com/payments/fpx">FPX</a>, a Malaysian
* payment method.
*/
@SerializedName("fpx")
Long fpx;
}
Expand All @@ -301,15 +328,24 @@ public static class SourceTypes extends StripeObject {
@Setter
@EqualsAndHashCode(callSuper = false)
public static class SourceTypes extends StripeObject {
/** Amount for bank account. */
/**
* Amount coming from <a href="https://docs.stripe.com/ach-deprecated">legacy US ACH
* payments</a>.
*/
@SerializedName("bank_account")
Long bankAccount;

/** Amount for card. */
/**
* Amount coming from most payment methods, including cards as well as <a
* href="https://docs.stripe.com/payments/bank-debits">non-legacy bank debits</a>.
*/
@SerializedName("card")
Long card;

/** Amount for FPX. */
/**
* Amount coming from <a href="https://docs.stripe.com/payments/fpx">FPX</a>, a Malaysian
* payment method.
*/
@SerializedName("fpx")
Long fpx;
}
Expand Down Expand Up @@ -358,15 +394,24 @@ public static class Available extends StripeObject {
@Setter
@EqualsAndHashCode(callSuper = false)
public static class SourceTypes extends StripeObject {
/** Amount for bank account. */
/**
* Amount coming from <a href="https://docs.stripe.com/ach-deprecated">legacy US ACH
* payments</a>.
*/
@SerializedName("bank_account")
Long bankAccount;

/** Amount for card. */
/**
* Amount coming from most payment methods, including cards as well as <a
* href="https://docs.stripe.com/payments/bank-debits">non-legacy bank debits</a>.
*/
@SerializedName("card")
Long card;

/** Amount for FPX. */
/**
* Amount coming from <a href="https://docs.stripe.com/payments/fpx">FPX</a>, a Malaysian
* payment method.
*/
@SerializedName("fpx")
Long fpx;
}
Expand Down Expand Up @@ -404,15 +449,24 @@ public static class Pending extends StripeObject {
@Setter
@EqualsAndHashCode(callSuper = false)
public static class SourceTypes extends StripeObject {
/** Amount for bank account. */
/**
* Amount coming from <a href="https://docs.stripe.com/ach-deprecated">legacy US ACH
* payments</a>.
*/
@SerializedName("bank_account")
Long bankAccount;

/** Amount for card. */
/**
* Amount coming from most payment methods, including cards as well as <a
* href="https://docs.stripe.com/payments/bank-debits">non-legacy bank debits</a>.
*/
@SerializedName("card")
Long card;

/** Amount for FPX. */
/**
* Amount coming from <a href="https://docs.stripe.com/payments/fpx">FPX</a>, a Malaysian
* payment method.
*/
@SerializedName("fpx")
Long fpx;
}
Expand Down
16 changes: 16 additions & 0 deletions src/main/java/com/stripe/model/Charge.java
Original file line number Diff line number Diff line change
Expand Up @@ -1563,6 +1563,14 @@ public static class Card extends StripeObject {
@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 Expand Up @@ -3633,6 +3641,14 @@ public static class Card extends StripeObject {
@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
15 changes: 12 additions & 3 deletions src/main/java/com/stripe/model/ConfirmationToken.java
Original file line number Diff line number Diff line change
Expand Up @@ -1107,7 +1107,10 @@ public static class Wallet extends StripeObject {
@Setter
@EqualsAndHashCode(callSuper = false)
public static class Networks extends StripeObject {
/** All available networks for the card. */
/**
* All networks available for selection via <a
* href="https://stripe.com/api/payment_intents/confirm#confirm_payment_intent-payment_method_options-card-network">payment_method_options.card.network</a>.
*/
@SerializedName("available")
List<String> available;

Expand Down Expand Up @@ -1425,7 +1428,10 @@ public static class CardPresent extends StripeObject {
@Setter
@EqualsAndHashCode(callSuper = false)
public static class Networks extends StripeObject {
/** All available networks for the card. */
/**
* All networks available for selection via <a
* href="https://stripe.com/api/payment_intents/confirm#confirm_payment_intent-payment_method_options-card-network">payment_method_options.card.network</a>.
*/
@SerializedName("available")
List<String> available;

Expand Down Expand Up @@ -1732,7 +1738,10 @@ public static class InteracPresent extends StripeObject {
@Setter
@EqualsAndHashCode(callSuper = false)
public static class Networks extends StripeObject {
/** All available networks for the card. */
/**
* All networks available for selection via <a
* href="https://stripe.com/api/payment_intents/confirm#confirm_payment_intent-payment_method_options-card-network">payment_method_options.card.network</a>.
*/
@SerializedName("available")
List<String> available;

Expand Down
10 changes: 5 additions & 5 deletions src/main/java/com/stripe/model/CreditNote.java
Original file line number Diff line number Diff line change
Expand Up @@ -841,12 +841,12 @@ public static class Tax extends StripeObject {

/**
* Tax rates can be applied to <a
* href="https://stripe.com/docs/billing/invoices/tax-rates">invoices</a>, <a
* href="https://stripe.com/docs/billing/subscriptions/taxes">subscriptions</a> and <a
* href="https://stripe.com/docs/payments/checkout/set-up-a-subscription#tax-rates">Checkout
* Sessions</a> to collect tax.
* href="https://stripe.com/invoicing/taxes/tax-rates">invoices</a>, <a
* href="https://stripe.com/billing/taxes/tax-rates">subscriptions</a> and <a
* href="https://stripe.com/payments/checkout/use-manual-tax-rates">Checkout Sessions</a> to
* collect tax.
*
* <p>Related guide: <a href="https://stripe.com/docs/billing/taxes/tax-rates">Tax rates</a>
* <p>Related guide: <a href="https://stripe.com/billing/taxes/tax-rates">Tax rates</a>
*/
@SerializedName("rate")
TaxRate rate;
Expand Down
10 changes: 5 additions & 5 deletions src/main/java/com/stripe/model/Invoice.java
Original file line number Diff line number Diff line change
Expand Up @@ -3169,12 +3169,12 @@ public static class Tax extends StripeObject {

/**
* Tax rates can be applied to <a
* href="https://stripe.com/docs/billing/invoices/tax-rates">invoices</a>, <a
* href="https://stripe.com/docs/billing/subscriptions/taxes">subscriptions</a> and <a
* href="https://stripe.com/docs/payments/checkout/set-up-a-subscription#tax-rates">Checkout
* Sessions</a> to collect tax.
* href="https://stripe.com/invoicing/taxes/tax-rates">invoices</a>, <a
* href="https://stripe.com/billing/taxes/tax-rates">subscriptions</a> and <a
* href="https://stripe.com/payments/checkout/use-manual-tax-rates">Checkout Sessions</a> to
* collect tax.
*
* <p>Related guide: <a href="https://stripe.com/docs/billing/taxes/tax-rates">Tax rates</a>
* <p>Related guide: <a href="https://stripe.com/billing/taxes/tax-rates">Tax rates</a>
*/
@SerializedName("rate")
TaxRate rate;
Expand Down
10 changes: 5 additions & 5 deletions src/main/java/com/stripe/model/LineItem.java
Original file line number Diff line number Diff line change
Expand Up @@ -190,12 +190,12 @@ public static class Tax extends StripeObject {

/**
* Tax rates can be applied to <a
* href="https://stripe.com/docs/billing/invoices/tax-rates">invoices</a>, <a
* href="https://stripe.com/docs/billing/subscriptions/taxes">subscriptions</a> and <a
* href="https://stripe.com/docs/payments/checkout/set-up-a-subscription#tax-rates">Checkout
* Sessions</a> to collect tax.
* href="https://stripe.com/invoicing/taxes/tax-rates">invoices</a>, <a
* href="https://stripe.com/billing/taxes/tax-rates">subscriptions</a> and <a
* href="https://stripe.com/payments/checkout/use-manual-tax-rates">Checkout Sessions</a> to
* collect tax.
*
* <p>Related guide: <a href="https://stripe.com/docs/billing/taxes/tax-rates">Tax rates</a>
* <p>Related guide: <a href="https://stripe.com/billing/taxes/tax-rates">Tax rates</a>
*/
@SerializedName("rate")
TaxRate rate;
Expand Down
Loading

0 comments on commit b9d6f53

Please sign in to comment.