Skip to content

Commit

Permalink
Merge pull request #1624 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 Aug 11, 2023
2 parents e874c69 + 3a17551 commit 2b19eb7
Show file tree
Hide file tree
Showing 17 changed files with 537 additions and 48 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,13 @@
* Add support for `marked_stale` on `Quote.status_details.stale.last_reason`
* Change `tax.FormListParams.payee.type` to be optional

## 22.30.0 - 2023-08-03
* [#1620](https://github.com/stripe/stripe-java/pull/1620) Update generated code
* Change type of `AccountCreateParams.settings.card_issuing.tos_acceptance.user_agent`, `AccountCreateParams.settings.treasury.tos_acceptance.user_agent`, `AccountUpdateParams.settings.card_issuing.tos_acceptance.user_agent`, `AccountUpdateParams.settings.treasury.tos_acceptance.user_agent`, `InvoiceCreateParams.payment_settings.default_mandate`, `InvoiceCreateParams.shipping_details.phone`, `InvoicePayParams.mandate`, `InvoiceUpdateParams.default_source`, `InvoiceUpdateParams.payment_settings.default_mandate`, `InvoiceUpdateParams.shipping_details.phone`, `PaymentIntentConfirmParams.payment_method_data.billing_details.name`, `PaymentIntentConfirmParams.payment_method_data.billing_details.phone`, `PaymentIntentConfirmParams.payment_method_options.konbini.confirmation_number`, `PaymentIntentConfirmParams.payment_method_options.konbini.product_description`, `PaymentIntentCreateParams.payment_method_data.billing_details.name`, `PaymentIntentCreateParams.payment_method_data.billing_details.phone`, `PaymentIntentCreateParams.payment_method_options.konbini.confirmation_number`, `PaymentIntentCreateParams.payment_method_options.konbini.product_description`, `PaymentIntentUpdateParams.payment_method_data.billing_details.name`, `PaymentIntentUpdateParams.payment_method_data.billing_details.phone`, `PaymentIntentUpdateParams.payment_method_options.konbini.confirmation_number`, `PaymentIntentUpdateParams.payment_method_options.konbini.product_description`, `PaymentMethodCreateParams.billing_details.name`, `PaymentMethodCreateParams.billing_details.phone`, `PaymentMethodUpdateParams.billing_details.name`, `PaymentMethodUpdateParams.billing_details.phone`, `ProductUpdateParams.caption`, `ProductUpdateParams.description`, `ProductUpdateParams.unit_label`, `QuoteCreateParams.description`, `QuoteCreateParams.footer`, `QuoteCreateParams.header`, `QuoteUpdateParams.description`, `QuoteUpdateParams.footer`, `QuoteUpdateParams.header`, `QuoteUpdateParams.subscription_data.description`, `SetupIntentConfirmParams.payment_method_data.billing_details.name`, `SetupIntentConfirmParams.payment_method_data.billing_details.phone`, `SetupIntentCreateParams.payment_method_data.billing_details.name`, `SetupIntentCreateParams.payment_method_data.billing_details.phone`, `SetupIntentUpdateParams.payment_method_data.billing_details.name`, `SetupIntentUpdateParams.payment_method_data.billing_details.phone`, `SubscriptionCancelParams.cancellation_details.comment`, `SubscriptionScheduleCreateParams.default_settings.description`, `SubscriptionScheduleCreateParams.phases[].description`, `SubscriptionScheduleUpdateParams.default_settings.description`, `SubscriptionScheduleUpdateParams.phases[].description`, `SubscriptionUpdateParams.cancellation_details.comment`, `SubscriptionUpdateParams.default_source`, `SubscriptionUpdateParams.description`, `TokenCreateParams.person.documents.company_authorization.files[]`, `TokenCreateParams.person.documents.passport.files[]`, `TokenCreateParams.person.documents.visa.files[]`, `WebhookEndpointCreateParams.description`, `WebhookEndpointUpdateParams.description`, `billingportal.ConfigurationCreateParams.business_profile.headline`, `billingportal.ConfigurationUpdateParams.business_profile.headline`, `issuing.CardholderCreateParams.individual.card_issuing.user_terms_acceptance.user_agent`, `issuing.CardholderUpdateParams.individual.card_issuing.user_terms_acceptance.user_agent`, `issuing.DisputeCreateParams.evidence.canceled.cancellation_reason`, `issuing.DisputeCreateParams.evidence.canceled.explanation`, `issuing.DisputeCreateParams.evidence.canceled.product_description`, `issuing.DisputeCreateParams.evidence.duplicate.explanation`, `issuing.DisputeCreateParams.evidence.fraudulent.explanation`, `issuing.DisputeCreateParams.evidence.merchandise_not_as_described.explanation`, `issuing.DisputeCreateParams.evidence.merchandise_not_as_described.return_description`, `issuing.DisputeCreateParams.evidence.not_received.explanation`, `issuing.DisputeCreateParams.evidence.not_received.product_description`, `issuing.DisputeCreateParams.evidence.other.explanation`, `issuing.DisputeCreateParams.evidence.other.product_description`, `issuing.DisputeCreateParams.evidence.service_not_as_described.cancellation_reason`, `issuing.DisputeCreateParams.evidence.service_not_as_described.explanation`, `issuing.DisputeUpdateParams.evidence.canceled.cancellation_reason`, `issuing.DisputeUpdateParams.evidence.canceled.explanation`, `issuing.DisputeUpdateParams.evidence.canceled.product_description`, `issuing.DisputeUpdateParams.evidence.duplicate.explanation`, `issuing.DisputeUpdateParams.evidence.fraudulent.explanation`, `issuing.DisputeUpdateParams.evidence.merchandise_not_as_described.explanation`, `issuing.DisputeUpdateParams.evidence.merchandise_not_as_described.return_description`, `issuing.DisputeUpdateParams.evidence.not_received.explanation`, `issuing.DisputeUpdateParams.evidence.not_received.product_description`, `issuing.DisputeUpdateParams.evidence.other.explanation`, `issuing.DisputeUpdateParams.evidence.other.product_description`, `issuing.DisputeUpdateParams.evidence.service_not_as_described.cancellation_reason`, `issuing.DisputeUpdateParams.evidence.service_not_as_described.explanation`, `tax.CalculationCreateParams.customer_details.address.city`, `tax.CalculationCreateParams.customer_details.address.line1`, `tax.CalculationCreateParams.customer_details.address.line2`, `tax.CalculationCreateParams.customer_details.address.postal_code`, `tax.CalculationCreateParams.customer_details.address.state`, `terminal.LocationUpdateParams.configuration_overrides`, `terminal.ReaderUpdateParams.label`, `treasury.OutboundPaymentCreateParams.destination_payment_method_data.billing_details.name`, and `treasury.OutboundPaymentCreateParams.destination_payment_method_data.billing_details.phone` from `string` to `emptyStringable(string)`
* Add support for `subscription_details` on `Invoice`
* Add support for `preferred_settlement_speed` on `PaymentIntent.payment_method_options.us_bank_account`, `PaymentIntentConfirmParams.payment_method_options.us_bank_account`, `PaymentIntentCreateParams.payment_method_options.us_bank_account`, and `PaymentIntentUpdateParams.payment_method_options.us_bank_account`
* Add support for new values `sepa_debit_fingerprint` and `us_bank_account_fingerprint` on enum `radar.ValueListCreateParams.item_type`

## 22.30.0-beta.1 - 2023-07-27
* [#1617](https://github.com/stripe/stripe-java/pull/1617) Update generated code for beta
* Updated stable APIs to the latest version
Expand Down
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v446
v458
29 changes: 15 additions & 14 deletions src/main/java/com/stripe/model/Account.java
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ public static Account create(AccountCreateParams params, RequestOptions options)
* can only be deleted once all balances are zero.
*
* <p>If you want to delete your own account, use the <a
* href="https://dashboard.stripe.com/account">account information tab in your account
* href="https://dashboard.stripe.com/settings/account">account information tab in your account
* settings</a> instead.
*/
public Account delete() throws StripeException {
Expand All @@ -296,7 +296,7 @@ public Account delete() throws StripeException {
* can only be deleted once all balances are zero.
*
* <p>If you want to delete your own account, use the <a
* href="https://dashboard.stripe.com/account">account information tab in your account
* href="https://dashboard.stripe.com/settings/account">account information tab in your account
* settings</a> instead.
*/
public Account delete(RequestOptions options) throws StripeException {
Expand All @@ -311,7 +311,7 @@ public Account delete(RequestOptions options) throws StripeException {
* can only be deleted once all balances are zero.
*
* <p>If you want to delete your own account, use the <a
* href="https://dashboard.stripe.com/account">account information tab in your account
* href="https://dashboard.stripe.com/settings/account">account information tab in your account
* settings</a> instead.
*/
public Account delete(Map<String, Object> params) throws StripeException {
Expand All @@ -326,7 +326,7 @@ public Account delete(Map<String, Object> params) throws StripeException {
* can only be deleted once all balances are zero.
*
* <p>If you want to delete your own account, use the <a
* href="https://dashboard.stripe.com/account">account information tab in your account
* href="https://dashboard.stripe.com/settings/account">account information tab in your account
* settings</a> instead.
*/
public Account delete(Map<String, Object> params, RequestOptions options) throws StripeException {
Expand Down Expand Up @@ -556,7 +556,7 @@ public static Account retrieve(
* <strong>Custom Only</strong> or <strong>Custom and Express</strong> below.
*
* <p>To update your own account, use the <a
* href="https://dashboard.stripe.com/account">Dashboard</a>. Refer to our <a
* href="https://dashboard.stripe.com/settings/account">Dashboard</a>. Refer to our <a
* href="https://stripe.com/docs/connect/updating-accounts">Connect</a> documentation to learn
* more about updating accounts.
*/
Expand All @@ -576,7 +576,7 @@ public Account update(Map<String, Object> params) throws StripeException {
* <strong>Custom Only</strong> or <strong>Custom and Express</strong> below.
*
* <p>To update your own account, use the <a
* href="https://dashboard.stripe.com/account">Dashboard</a>. Refer to our <a
* href="https://dashboard.stripe.com/settings/account">Dashboard</a>. Refer to our <a
* href="https://stripe.com/docs/connect/updating-accounts">Connect</a> documentation to learn
* more about updating accounts.
*/
Expand All @@ -601,7 +601,7 @@ public Account update(Map<String, Object> params, RequestOptions options) throws
* <strong>Custom Only</strong> or <strong>Custom and Express</strong> below.
*
* <p>To update your own account, use the <a
* href="https://dashboard.stripe.com/account">Dashboard</a>. Refer to our <a
* href="https://dashboard.stripe.com/settings/account">Dashboard</a>. Refer to our <a
* href="https://stripe.com/docs/connect/updating-accounts">Connect</a> documentation to learn
* more about updating accounts.
*/
Expand All @@ -620,7 +620,7 @@ public Account update(AccountUpdateParams params) throws StripeException {
* <strong>Custom Only</strong> or <strong>Custom and Express</strong> below.
*
* <p>To update your own account, use the <a
* href="https://dashboard.stripe.com/account">Dashboard</a>. Refer to our <a
* href="https://dashboard.stripe.com/settings/account">Dashboard</a>. Refer to our <a
* href="https://stripe.com/docs/connect/updating-accounts">Connect</a> documentation to learn
* more about updating accounts.
*/
Expand Down Expand Up @@ -1121,12 +1121,13 @@ public static class Company extends StripeObject {
*
* <p>One of {@code free_zone_establishment}, {@code free_zone_llc}, {@code
* government_instrumentality}, {@code governmental_unit}, {@code incorporated_non_profit},
* {@code limited_liability_partnership}, {@code llc}, {@code multi_member_llc}, {@code
* private_company}, {@code private_corporation}, {@code private_partnership}, {@code
* public_company}, {@code public_corporation}, {@code public_partnership}, {@code
* single_member_llc}, {@code sole_establishment}, {@code sole_proprietorship}, {@code
* tax_exempt_government_instrumentality}, {@code unincorporated_association}, or {@code
* unincorporated_non_profit}.
* {@code incorporated_partnership}, {@code limited_liability_partnership}, {@code llc}, {@code
* multi_member_llc}, {@code private_company}, {@code private_corporation}, {@code
* private_partnership}, {@code public_company}, {@code public_corporation}, {@code
* public_partnership}, {@code single_member_llc}, {@code sole_establishment}, {@code
* sole_proprietorship}, {@code tax_exempt_government_instrumentality}, {@code
* unincorporated_association}, {@code unincorporated_non_profit}, or {@code
* unincorporated_partnership}.
*/
@SerializedName("structure")
String structure;
Expand Down
26 changes: 13 additions & 13 deletions src/main/java/com/stripe/model/BalanceTransaction.java
Original file line number Diff line number Diff line change
Expand Up @@ -113,25 +113,25 @@ public class BalanceTransaction extends ApiResource implements HasId {
* charge}, {@code connect_collection_transfer}, {@code contribution}, {@code
* issuing_authorization_hold}, {@code issuing_authorization_release}, {@code issuing_dispute},
* {@code issuing_transaction}, {@code payment}, {@code payment_failure_refund}, {@code
* payment_refund}, {@code payout}, {@code payout_cancel}, {@code payout_failure}, {@code refund},
* {@code refund_failure}, {@code reserve_transaction}, {@code reserved_funds}, {@code
* stripe_fee}, {@code stripe_fx_fee}, {@code tax_fee}, {@code topup}, {@code topup_reversal},
* {@code transfer}, {@code transfer_cancel}, {@code transfer_failure}, or {@code
* transfer_refund}. <a href="https://stripe.com/docs/reports/balance-transaction-types">Learn
* more</a> about balance transaction types and what they represent. If you are looking to
* classify transactions for accounting purposes, you might want to consider {@code
* reporting_category} instead.
* payment_refund}, {@code payment_reversal}, {@code payout}, {@code payout_cancel}, {@code
* payout_failure}, {@code refund}, {@code refund_failure}, {@code reserve_transaction}, {@code
* reserved_funds}, {@code stripe_fee}, {@code stripe_fx_fee}, {@code tax_fee}, {@code topup},
* {@code topup_reversal}, {@code transfer}, {@code transfer_cancel}, {@code transfer_failure}, or
* {@code transfer_refund}. <a
* href="https://stripe.com/docs/reports/balance-transaction-types">Learn more</a> about balance
* transaction types and what they represent. If you are looking to classify transactions for
* accounting purposes, you might want to consider {@code reporting_category} instead.
*
* <p>One of {@code adjustment}, {@code advance}, {@code advance_funding}, {@code
* anticipation_repayment}, {@code application_fee}, {@code application_fee_refund}, {@code
* charge}, {@code connect_collection_transfer}, {@code contribution}, {@code
* issuing_authorization_hold}, {@code issuing_authorization_release}, {@code issuing_dispute},
* {@code issuing_transaction}, {@code payment}, {@code payment_failure_refund}, {@code
* payment_refund}, {@code payout}, {@code payout_cancel}, {@code payout_failure}, {@code refund},
* {@code refund_failure}, {@code reserve_transaction}, {@code reserved_funds}, {@code
* stripe_fee}, {@code stripe_fx_fee}, {@code tax_fee}, {@code topup}, {@code topup_reversal},
* {@code transfer}, {@code transfer_cancel}, {@code transfer_failure}, or {@code
* transfer_refund}.
* payment_refund}, {@code payment_reversal}, {@code payout}, {@code payout_cancel}, {@code
* payout_failure}, {@code refund}, {@code refund_failure}, {@code reserve_transaction}, {@code
* reserved_funds}, {@code stripe_fee}, {@code stripe_fx_fee}, {@code tax_fee}, {@code topup},
* {@code topup_reversal}, {@code transfer}, {@code transfer_cancel}, {@code transfer_failure}, or
* {@code transfer_refund}.
*/
@SerializedName("type")
String type;
Expand Down
1 change: 1 addition & 0 deletions src/main/java/com/stripe/model/CreditNoteLineItem.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import lombok.Getter;
import lombok.Setter;

/** The credit note line item object. */
@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
Expand Down
43 changes: 40 additions & 3 deletions src/main/java/com/stripe/model/CustomerCashBalanceTransaction.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@
@Setter
@EqualsAndHashCode(callSuper = false)
public class CustomerCashBalanceTransaction extends StripeObject implements HasId {
@SerializedName("adjusted_for_overdraft")
AdjustedForOverdraft adjustedForOverdraft;

@SerializedName("applied_to_payment")
AppliedToPayment appliedToPayment;

Expand Down Expand Up @@ -85,9 +88,9 @@ public class CustomerCashBalanceTransaction extends StripeObject implements HasI
* href="https://stripe.com/docs/payments/customer-balance#types">Customer Balance</a> to learn
* more about these types.
*
* <p>One of {@code applied_to_payment}, {@code funded}, {@code funding_reversed}, {@code
* refunded_from_payment}, {@code return_canceled}, {@code return_initiated}, or {@code
* unapplied_from_payment}.
* <p>One of {@code adjusted_for_overdraft}, {@code applied_to_payment}, {@code funded}, {@code
* funding_reversed}, {@code refunded_from_payment}, {@code return_canceled}, {@code
* return_initiated}, or {@code unapplied_from_payment}.
*/
@SerializedName("type")
String type;
Expand All @@ -113,6 +116,40 @@ public void setCustomerObject(Customer expandableObject) {
this.customer = new ExpandableField<Customer>(expandableObject.getId(), expandableObject);
}

@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
public static class AdjustedForOverdraft extends StripeObject {
/**
* The <a href="https://stripe.com/docs/api/cash_balance_transactions/object">Cash Balance
* Transaction</a> that brought the customer balance negative, triggering the clawback of funds.
*/
@SerializedName("linked_transaction")
@Getter(lombok.AccessLevel.NONE)
@Setter(lombok.AccessLevel.NONE)
ExpandableField<CustomerCashBalanceTransaction> linkedTransaction;

/** Get ID of expandable {@code linkedTransaction} object. */
public String getLinkedTransaction() {
return (this.linkedTransaction != null) ? this.linkedTransaction.getId() : null;
}

public void setLinkedTransaction(String id) {
this.linkedTransaction = ApiResource.setExpandableFieldId(id, this.linkedTransaction);
}

/** Get expanded {@code linkedTransaction}. */
public CustomerCashBalanceTransaction getLinkedTransactionObject() {
return (this.linkedTransaction != null) ? this.linkedTransaction.getExpanded() : null;
}

public void setLinkedTransactionObject(CustomerCashBalanceTransaction expandableObject) {
this.linkedTransaction =
new ExpandableField<CustomerCashBalanceTransaction>(
expandableObject.getId(), expandableObject);
}
}

@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
Expand Down
46 changes: 46 additions & 0 deletions src/main/java/com/stripe/model/PaymentMethodConfiguration.java
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,9 @@ public class PaymentMethodConfiguration extends ApiResource implements HasId {
@SerializedName("paynow")
Paynow paynow;

@SerializedName("paypal")
Paypal paypal;

@SerializedName("promptpay")
Promptpay promptpay;

Expand Down Expand Up @@ -1604,6 +1607,49 @@ public static class DisplayPreference extends StripeObject {
}
}

@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
public static class Paypal 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;

@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
public static class DisplayPreference extends StripeObject {
/**
* For child configurations, whether or not the account's preference will be observed. If
* {@code false}, the parent configuration's preference is used.
*/
@SerializedName("overridable")
Boolean overridable;

/**
* The account's display preference.
*
* <p>One of {@code none}, {@code off}, or {@code on}.
*/
@SerializedName("preference")
String preference;

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

@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
Expand Down
Loading

0 comments on commit 2b19eb7

Please sign in to comment.