Skip to content

Commit

Permalink
Merge pull request #1917 from stripe/latest-codegen-beta
Browse files Browse the repository at this point in the history
Update generated code for beta
  • Loading branch information
stripe-openapi[bot] authored Nov 7, 2024
2 parents 23267db + 8bc976f commit a6ff74b
Show file tree
Hide file tree
Showing 90 changed files with 7,097 additions and 462 deletions.
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,17 @@
* [#1909](https://github.com/stripe/stripe-java/pull/1909) Do not allow setting Stripe.stripeVersion
* `Stripe.stripeVersion` is no longer settable. If you were using this to set the beta headers, use the helper method `Stripe.addBetaVersion()` instead.

## 28.0.1 - 2024-11-06
* [#1919](https://github.com/stripe/stripe-java/pull/1919) Catch `JsonSyntaxException` when processing all errors
* [#1916](https://github.com/stripe/stripe-java/pull/1916) Restore `testReportsRawRequestUsageTelemetry` test
* [#1915](https://github.com/stripe/stripe-java/pull/1915) add major version blurb to changelog

## 28.0.0 - 2024-10-29

Historically, when upgrading webhooks to a new API version, you also had to upgrade your SDK version. Your webhook's API version needed to match the API version pinned by the SDK you were using to ensure successful deserialization of events. With the `2024-09-30.acacia` release, Stripe follows a [new API release process](https://stripe.com/blog/introducing-stripes-new-api-release-process). As a result, you can safely upgrade your webhook endpoints to any API version within a biannual release (like `acacia`) without upgrading the SDK.

However, [a bug](https://github.com/stripe/stripe-java/pull/1906) in the `27.x.y` SDK releases meant that webhook version upgrades from the SDK's pinned `2024-09-30.acacia` version to the new `2024-10-28.acacia` version would fail. Therefore, we are shipping SDK support for `2024-10-28.acacia` as a major version to enforce the idea that an SDK upgrade is also required. Future API versions in the `acacia` line will be released as minor versions.

* [#1896](https://github.com/stripe/stripe-java/pull/1896) This release changes the pinned API version to `2024-10-28.acacia`.
* Add support for new resource `V2.EventDestinations`
* Add support for `create`, `retrieve`, `update`, `list`, `delete`, `disable`, `enable` and `ping` methods on resource `V2.EventDestinations`
Expand Down
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v1319
v1333
8 changes: 8 additions & 0 deletions src/main/java/com/stripe/StripeClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,10 @@ public com.stripe.service.OrderService orders() {
return new com.stripe.service.OrderService(this.getResponseGetter());
}

public com.stripe.service.PaymentAttemptRecordService paymentAttemptRecords() {
return new com.stripe.service.PaymentAttemptRecordService(this.getResponseGetter());
}

public com.stripe.service.PaymentIntentService paymentIntents() {
return new com.stripe.service.PaymentIntentService(this.getResponseGetter());
}
Expand All @@ -293,6 +297,10 @@ public com.stripe.service.PaymentMethodService paymentMethods() {
return new com.stripe.service.PaymentMethodService(this.getResponseGetter());
}

public com.stripe.service.PaymentRecordService paymentRecords() {
return new com.stripe.service.PaymentRecordService(this.getResponseGetter());
}

public com.stripe.service.PayoutService payouts() {
return new com.stripe.service.PayoutService(this.getResponseGetter());
}
Expand Down
26 changes: 19 additions & 7 deletions src/main/java/com/stripe/model/Account.java
Original file line number Diff line number Diff line change
Expand Up @@ -1936,7 +1936,16 @@ public static class FutureRequirements extends StripeObject {
@SerializedName("currently_due")
List<String> currentlyDue;

/** This is typed as a string for consistency with {@code requirements.disabled_reason}. */
/**
* This is typed as an enum for consistency with {@code requirements.disabled_reason}.
*
* <p>One of {@code action_required.requested_capabilities}, {@code listed}, {@code other},
* {@code platform_paused}, {@code rejected.fraud}, {@code rejected.incomplete_verification},
* {@code rejected.listed}, {@code rejected.other}, {@code rejected.platform_fraud}, {@code
* rejected.platform_other}, {@code rejected.platform_terms_of_service}, {@code
* rejected.terms_of_service}, {@code requirements.past_due}, {@code
* requirements.pending_verification}, or {@code under_review}.
*/
@SerializedName("disabled_reason")
String disabledReason;

Expand Down Expand Up @@ -2128,13 +2137,16 @@ public static class Requirements extends StripeObject {
List<String> currentlyDue;

/**
* If the account is disabled, this string describes why. <a
* If the account is disabled, this enum describes why. <a
* href="https://stripe.com/docs/connect/handling-api-verification">Learn more about handling
* verification issues</a>. Can be {@code action_required.requested_capabilities}, {@code
* requirements.past_due}, {@code requirements.pending_verification}, {@code listed}, {@code
* platform_paused}, {@code rejected.fraud}, {@code rejected.incomplete_verification}, {@code
* rejected.listed}, {@code rejected.other}, {@code rejected.terms_of_service}, {@code
* under_review}, or {@code other}.
* verification issues</a>.
*
* <p>One of {@code action_required.requested_capabilities}, {@code listed}, {@code other},
* {@code platform_paused}, {@code rejected.fraud}, {@code rejected.incomplete_verification},
* {@code rejected.listed}, {@code rejected.other}, {@code rejected.platform_fraud}, {@code
* rejected.platform_other}, {@code rejected.platform_terms_of_service}, {@code
* rejected.terms_of_service}, {@code requirements.past_due}, {@code
* requirements.pending_verification}, or {@code under_review}.
*/
@SerializedName("disabled_reason")
String disabledReason;
Expand Down
15 changes: 10 additions & 5 deletions src/main/java/com/stripe/model/Charge.java
Original file line number Diff line number Diff line change
Expand Up @@ -1696,7 +1696,8 @@ public static class Card extends StripeObject {

/**
* Card brand. Can be {@code amex}, {@code diners}, {@code discover}, {@code eftpos_au},
* {@code jcb}, {@code mastercard}, {@code unionpay}, {@code visa}, or {@code unknown}.
* {@code jcb}, {@code link}, {@code mastercard}, {@code unionpay}, {@code visa}, or {@code
* unknown}.
*/
@SerializedName("brand")
String brand;
Expand Down Expand Up @@ -1803,7 +1804,8 @@ public static class Card extends StripeObject {
/**
* Identifies which network this charge was processed on. Can be {@code amex}, {@code
* cartes_bancaires}, {@code diners}, {@code discover}, {@code eftpos_au}, {@code interac},
* {@code jcb}, {@code mastercard}, {@code unionpay}, {@code visa}, or {@code unknown}.
* {@code jcb}, {@code link}, {@code mastercard}, {@code unionpay}, {@code visa}, or {@code
* unknown}.
*/
@SerializedName("network")
String network;
Expand Down Expand Up @@ -2259,7 +2261,8 @@ public static class CardPresent extends StripeObject {

/**
* Card brand. Can be {@code amex}, {@code diners}, {@code discover}, {@code eftpos_au},
* {@code jcb}, {@code mastercard}, {@code unionpay}, {@code visa}, or {@code unknown}.
* {@code jcb}, {@code link}, {@code mastercard}, {@code unionpay}, {@code visa}, or {@code
* unknown}.
*/
@SerializedName("brand")
String brand;
Expand Down Expand Up @@ -2371,7 +2374,8 @@ public static class CardPresent extends StripeObject {
/**
* Identifies which network this charge was processed on. Can be {@code amex}, {@code
* cartes_bancaires}, {@code diners}, {@code discover}, {@code eftpos_au}, {@code interac},
* {@code jcb}, {@code mastercard}, {@code unionpay}, {@code visa}, or {@code unknown}.
* {@code jcb}, {@code link}, {@code mastercard}, {@code unionpay}, {@code visa}, or {@code
* unknown}.
*/
@SerializedName("network")
String network;
Expand Down Expand Up @@ -2878,7 +2882,8 @@ public static class InteracPresent extends StripeObject {
/**
* Identifies which network this charge was processed on. Can be {@code amex}, {@code
* cartes_bancaires}, {@code diners}, {@code discover}, {@code eftpos_au}, {@code interac},
* {@code jcb}, {@code mastercard}, {@code unionpay}, {@code visa}, or {@code unknown}.
* {@code jcb}, {@code link}, {@code mastercard}, {@code unionpay}, {@code visa}, or {@code
* unknown}.
*/
@SerializedName("network")
String network;
Expand Down
13 changes: 8 additions & 5 deletions src/main/java/com/stripe/model/ConfirmationToken.java
Original file line number Diff line number Diff line change
Expand Up @@ -632,7 +632,8 @@ public static class Boleto extends StripeObject {
public static class Card extends StripeObject {
/**
* Card brand. Can be {@code amex}, {@code diners}, {@code discover}, {@code eftpos_au},
* {@code jcb}, {@code mastercard}, {@code unionpay}, {@code visa}, or {@code unknown}.
* {@code jcb}, {@code link}, {@code mastercard}, {@code unionpay}, {@code visa}, or {@code
* unknown}.
*/
@SerializedName("brand")
String brand;
Expand Down Expand Up @@ -829,7 +830,8 @@ public static class CardPresent extends StripeObject {

/**
* Card brand. Can be {@code amex}, {@code diners}, {@code discover}, {@code eftpos_au},
* {@code jcb}, {@code mastercard}, {@code unionpay}, {@code visa}, or {@code unknown}.
* {@code jcb}, {@code link}, {@code mastercard}, {@code unionpay}, {@code visa}, or
* {@code unknown}.
*/
@SerializedName("brand")
String brand;
Expand Down Expand Up @@ -942,8 +944,8 @@ public static class CardPresent extends StripeObject {
/**
* Identifies which network this charge was processed on. Can be {@code amex}, {@code
* cartes_bancaires}, {@code diners}, {@code discover}, {@code eftpos_au}, {@code
* interac}, {@code jcb}, {@code mastercard}, {@code unionpay}, {@code visa}, or {@code
* unknown}.
* interac}, {@code jcb}, {@code link}, {@code mastercard}, {@code unionpay}, {@code
* visa}, or {@code unknown}.
*/
@SerializedName("network")
String network;
Expand Down Expand Up @@ -1299,7 +1301,8 @@ public static class VisaCheckout extends StripeObject {
public static class CardPresent extends StripeObject {
/**
* Card brand. Can be {@code amex}, {@code diners}, {@code discover}, {@code eftpos_au},
* {@code jcb}, {@code mastercard}, {@code unionpay}, {@code visa}, or {@code unknown}.
* {@code jcb}, {@code link}, {@code mastercard}, {@code unionpay}, {@code visa}, or {@code
* unknown}.
*/
@SerializedName("brand")
String brand;
Expand Down
3 changes: 2 additions & 1 deletion src/main/java/com/stripe/model/Dispute.java
Original file line number Diff line number Diff line change
Expand Up @@ -1113,7 +1113,8 @@ public static class AmazonPay extends StripeObject {
public static class Card extends StripeObject {
/**
* Card brand. Can be {@code amex}, {@code diners}, {@code discover}, {@code eftpos_au},
* {@code jcb}, {@code mastercard}, {@code unionpay}, {@code visa}, or {@code unknown}.
* {@code jcb}, {@code link}, {@code mastercard}, {@code unionpay}, {@code visa}, or {@code
* unknown}.
*/
@SerializedName("brand")
String brand;
Expand Down
23 changes: 12 additions & 11 deletions src/main/java/com/stripe/model/Event.java
Original file line number Diff line number Diff line change
Expand Up @@ -163,19 +163,20 @@ public class Event extends ApiResource implements HasId {
* {@code invoice.created}, {@code invoice.deleted}, {@code invoice.finalization_failed}, {@code
* invoice.finalized}, {@code invoice.marked_uncollectible}, {@code invoice.overdue}, {@code
* invoice.paid}, {@code invoice.payment.overpaid}, {@code invoice.payment_action_required},
* {@code invoice.payment_failed}, {@code invoice.payment_succeeded}, {@code invoice.sent}, {@code
* invoice.upcoming}, {@code invoice.updated}, {@code invoice.voided}, {@code
* invoice.will_be_due}, {@code invoiceitem.created}, {@code invoiceitem.deleted}, {@code
* issuing_authorization.created}, {@code issuing_authorization.request}, {@code
* issuing_authorization.updated}, {@code issuing_card.created}, {@code issuing_card.updated},
* {@code issuing_cardholder.created}, {@code issuing_cardholder.updated}, {@code
* issuing_dispute.closed}, {@code issuing_dispute.created}, {@code
* issuing_dispute.funds_reinstated}, {@code issuing_dispute.funds_rescinded}, {@code
* {@code invoice.payment_attempt_required}, {@code invoice.payment_failed}, {@code
* invoice.payment_succeeded}, {@code invoice.sent}, {@code invoice.upcoming}, {@code
* invoice.updated}, {@code invoice.voided}, {@code invoice.will_be_due}, {@code
* invoiceitem.created}, {@code invoiceitem.deleted}, {@code issuing_authorization.created},
* {@code issuing_authorization.request}, {@code issuing_authorization.updated}, {@code
* issuing_card.created}, {@code issuing_card.updated}, {@code issuing_cardholder.created}, {@code
* issuing_cardholder.updated}, {@code issuing_dispute.closed}, {@code issuing_dispute.created},
* {@code issuing_dispute.funds_reinstated}, {@code issuing_dispute.funds_rescinded}, {@code
* issuing_dispute.submitted}, {@code issuing_dispute.updated}, {@code
* issuing_dispute_settlement_detail.created}, {@code issuing_dispute_settlement_detail.updated},
* {@code issuing_personalization_design.activated}, {@code
* issuing_personalization_design.deactivated}, {@code issuing_personalization_design.rejected},
* {@code issuing_personalization_design.updated}, {@code issuing_settlement.created}, {@code
* {@code issuing_fraud_liability_debit.created}, {@code
* issuing_personalization_design.activated}, {@code issuing_personalization_design.deactivated},
* {@code issuing_personalization_design.rejected}, {@code
* issuing_personalization_design.updated}, {@code issuing_settlement.created}, {@code
* issuing_settlement.updated}, {@code issuing_token.created}, {@code issuing_token.updated},
* {@code issuing_transaction.created}, {@code
* issuing_transaction.purchase_details_receipt_updated}, {@code issuing_transaction.updated},
Expand Down
4 changes: 4 additions & 0 deletions src/main/java/com/stripe/model/EventDataClassLookup.java
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,13 @@ public final class EventDataClassLookup {
classLookup.put("mandate", Mandate.class);
classLookup.put("margin", Margin.class);
classLookup.put("order", Order.class);
classLookup.put("payment_attempt_record", PaymentAttemptRecord.class);
classLookup.put("payment_intent", PaymentIntent.class);
classLookup.put("payment_link", PaymentLink.class);
classLookup.put("payment_method", PaymentMethod.class);
classLookup.put("payment_method_configuration", PaymentMethodConfiguration.class);
classLookup.put("payment_method_domain", PaymentMethodDomain.class);
classLookup.put("payment_record", PaymentRecord.class);
classLookup.put("payout", Payout.class);
classLookup.put("person", Person.class);
classLookup.put("plan", Plan.class);
Expand Down Expand Up @@ -177,6 +179,8 @@ public final class EventDataClassLookup {
classLookup.put(
"issuing.dispute_settlement_detail",
com.stripe.model.issuing.DisputeSettlementDetail.class);
classLookup.put(
"issuing.fraud_liability_debit", com.stripe.model.issuing.FraudLiabilityDebit.class);
classLookup.put(
"issuing.personalization_design", com.stripe.model.issuing.PersonalizationDesign.class);
classLookup.put("issuing.physical_bundle", com.stripe.model.issuing.PhysicalBundle.class);
Expand Down
28 changes: 28 additions & 0 deletions src/main/java/com/stripe/model/FundingInstructions.java
Original file line number Diff line number Diff line change
Expand Up @@ -124,10 +124,24 @@ public static class FinancialAddress extends StripeObject {
@Setter
@EqualsAndHashCode(callSuper = false)
public static class Aba extends StripeObject {
@SerializedName("account_holder_address")
Address accountHolderAddress;

/** The account holder name. */
@SerializedName("account_holder_name")
String accountHolderName;

/** The ABA account number. */
@SerializedName("account_number")
String accountNumber;

/** The account type. */
@SerializedName("account_type")
String accountType;

@SerializedName("bank_address")
Address bankAddress;

/** The bank name. */
@SerializedName("bank_name")
String bankName;
Expand Down Expand Up @@ -203,10 +217,24 @@ public static class Spei extends StripeObject {
@Setter
@EqualsAndHashCode(callSuper = false)
public static class Swift extends StripeObject {
@SerializedName("account_holder_address")
Address accountHolderAddress;

/** The account holder name. */
@SerializedName("account_holder_name")
String accountHolderName;

/** The account number. */
@SerializedName("account_number")
String accountNumber;

/** The account type. */
@SerializedName("account_type")
String accountType;

@SerializedName("bank_address")
Address bankAddress;

/** The bank name. */
@SerializedName("bank_name")
String bankName;
Expand Down
24 changes: 16 additions & 8 deletions src/main/java/com/stripe/model/Invoice.java
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,13 @@ public class Invoice extends ApiResource implements HasId, MetadataStore<Invoice
@SerializedName("amount_due")
Long amountDue;

/**
* Amount that was overpaid on the invoice. Overpayments are debited to the customer's credit
* balance.
*/
@SerializedName("amount_overpaid")
Long amountOverpaid;

/** The amount, in cents (or local equivalent), that was paid. */
@SerializedName("amount_paid")
Long amountPaid;
Expand Down Expand Up @@ -2609,14 +2616,15 @@ public static class CustomerTaxId extends StripeObject {
* {@code gb_vat}, {@code nz_gst}, {@code au_abn}, {@code au_arn}, {@code in_gst}, {@code
* no_vat}, {@code no_voec}, {@code za_vat}, {@code ch_vat}, {@code mx_rfc}, {@code sg_uen},
* {@code ru_inn}, {@code ru_kpp}, {@code ca_bn}, {@code hk_br}, {@code es_cif}, {@code tw_vat},
* {@code th_vat}, {@code jp_cn}, {@code jp_rn}, {@code jp_trn}, {@code li_uid}, {@code my_itn},
* {@code us_ein}, {@code kr_brn}, {@code ca_qst}, {@code ca_gst_hst}, {@code 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}, or {@code unknown}.
* {@code th_vat}, {@code jp_cn}, {@code jp_rn}, {@code jp_trn}, {@code li_uid}, {@code li_vat},
* {@code my_itn}, {@code us_ein}, {@code kr_brn}, {@code ca_qst}, {@code ca_gst_hst}, {@code
* 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}, or
* {@code unknown}.
*/
@SerializedName("type")
String type;
Expand Down
Loading

0 comments on commit a6ff74b

Please sign in to comment.