Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update generated code #1677

Merged
merged 12 commits into from
Nov 2, 2023
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v624
v645
9 changes: 9 additions & 0 deletions src/main/java/com/stripe/model/Account.java
Original file line number Diff line number Diff line change
Expand Up @@ -1053,6 +1053,15 @@ public static class Capabilities extends StripeObject {
@SerializedName("promptpay_payments")
String promptpayPayments;

/**
* The status of the RevolutPay capability of the account, or whether the account can directly
* process RevolutPay payments.
*
* <p>One of {@code active}, {@code inactive}, or {@code pending}.
*/
@SerializedName("revolut_pay_payments")
String revolutPayPayments;

/**
* The status of the SEPA Direct Debits payments capability of the account, or whether the
* account can directly process SEPA Direct Debits charges.
Expand Down
20 changes: 10 additions & 10 deletions src/main/java/com/stripe/model/BalanceTransaction.java
Original file line number Diff line number Diff line change
Expand Up @@ -126,11 +126,11 @@ public class BalanceTransaction extends ApiResource implements HasId {
* {@code issuing_transaction}, {@code obligation_inbound}, {@code obligation_outbound}, {@code
* obligation_reversal_inbound}, {@code obligation_reversal_outbound}, {@code obligation_payout},
* {@code obligation_payout_failure}, {@code payment}, {@code payment_failure_refund}, {@code
* 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}. Learn more about <a
* payment_refund}, {@code payment_reversal}, {@code payment_unreconciled}, {@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}. Learn more about <a
* href="https://stripe.com/docs/reports/balance-transaction-types">balance transaction types and
* what they represent</a>. To classify transactions for accounting purposes, consider {@code
* reporting_category} instead.
Expand All @@ -142,11 +142,11 @@ public class BalanceTransaction extends ApiResource implements HasId {
* {@code issuing_transaction}, {@code obligation_inbound}, {@code obligation_outbound}, {@code
* obligation_payout}, {@code obligation_payout_failure}, {@code obligation_reversal_inbound},
* {@code obligation_reversal_outbound}, {@code payment}, {@code payment_failure_refund}, {@code
* 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}.
* payment_refund}, {@code payment_reversal}, {@code payment_unreconciled}, {@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
10 changes: 6 additions & 4 deletions src/main/java/com/stripe/model/BankAccount.java
Original file line number Diff line number Diff line change
Expand Up @@ -156,12 +156,14 @@ public class BankAccount extends ApiResource
* for smaller credit unions), and the validation is not always run. If customer bank account
* verification has succeeded, the bank account status will be {@code verified}. If the
* verification failed for any reason, such as microdeposit failure, the status will be {@code
* verification_failed}. If a transfer sent to this bank account fails, we'll set the status to
* {@code errored} and will not continue to send transfers until the bank details are updated.
* verification_failed}. If a payout sent to this bank account fails, we'll set the status to
* {@code errored} and will not continue to send <a
* href="https://stripe.com/docs/payouts#payout-schedule">scheduled payouts</a> until the bank
* details are updated.
*
* <p>For external accounts, possible values are {@code new}, {@code errored} and {@code
* verification_failed}. If a transfer fails, the status is set to {@code errored} and transfers
* are stopped until account details are updated. In India, if we can't <a
* verification_failed}. If a payouts fails, the status is set to {@code errored} and scheduled
* payouts are stopped until account details are updated. In India, if we can't <a
* href="https://support.stripe.com/questions/bank-account-ownership-verification">verify the
* owner of the bank account</a>, we'll set the status to {@code verification_failed}. Other
* validations aren't run against external accounts because they're only used for payouts. This
Expand Down
7 changes: 4 additions & 3 deletions src/main/java/com/stripe/model/Card.java
Original file line number Diff line number Diff line change
Expand Up @@ -215,9 +215,10 @@ public class Card extends ApiResource
String object;

/**
* For external accounts, possible values are {@code new} and {@code errored}. If a transfer
* fails, the status is set to {@code errored} and transfers are stopped until account details are
* updated.
* For external accounts that are cards, possible values are {@code new} and {@code errored}. If a
* payout fails, the status is set to {@code errored} and <a
* href="https://stripe.com/docs/payouts#payout-schedule">scheduled payouts</a> are stopped until
* account details are updated.
*/
@SerializedName("status")
String status;
Expand Down
8 changes: 8 additions & 0 deletions src/main/java/com/stripe/model/Charge.java
Original file line number Diff line number Diff line change
Expand Up @@ -1238,6 +1238,9 @@ public static class PaymentMethodDetails extends StripeObject {
@SerializedName("promptpay")
Promptpay promptpay;

@SerializedName("revolut_pay")
RevolutPay revolutPay;

@SerializedName("sepa_credit_transfer")
SepaCreditTransfer sepaCreditTransfer;

Expand Down Expand Up @@ -2736,6 +2739,11 @@ public static class Promptpay extends StripeObject {
String reference;
}

@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
public static class RevolutPay extends StripeObject {}

@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ public class CustomerCashBalanceTransaction extends StripeObject
*
* <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}.
* return_initiated}, {@code transferred_to_balance}, or {@code unapplied_from_payment}.
*/
@SerializedName("type")
String type;
Expand Down
1 change: 1 addition & 0 deletions src/main/java/com/stripe/model/EventDataClassLookup.java
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ final class EventDataClassLookup {

classLookup.put("tax.calculation", com.stripe.model.tax.Calculation.class);
classLookup.put("tax.calculation_line_item", com.stripe.model.tax.CalculationLineItem.class);
classLookup.put("tax.registration", com.stripe.model.tax.Registration.class);
classLookup.put("tax.settings", com.stripe.model.tax.Settings.class);
classLookup.put("tax.transaction", com.stripe.model.tax.Transaction.class);
classLookup.put("tax.transaction_line_item", com.stripe.model.tax.TransactionLineItem.class);
Expand Down
29 changes: 24 additions & 5 deletions src/main/java/com/stripe/model/ExchangeRate.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,34 @@
import lombok.Setter;

/**
* {@code Exchange Rate} objects allow you to determine the rates that Stripe is currently using to
* {@code ExchangeRate} objects allow you to determine the rates that Stripe is currently using to
* convert from one currency to another. Since this number is variable throughout the day, there are
* various reasons why you might want to know the current rate (for example, to dynamically price an
* item for a user with a default payment in a foreign currency).
*
* <p>If you want a guarantee that the charge is made with a certain exchange rate you expect is
* current, you can pass in {@code exchange_rate} to charges endpoints. If the value is no longer up
* to date, the charge won't go through. Please refer to our <a
* href="https://stripe.com/docs/exchange-rates">Exchange Rates API</a> guide for more details.
* <p>Please refer to our <a href="https://stripe.com/docs/fx-rates">Exchange Rates API</a> guide
* for more details.
*
* <p><em>[Note: this integration path is supported but no longer recommended]</em> Additionally,
* you can guarantee that a charge is made with an exchange rate that you expect is current. To do
* so, you must pass in the exchange_rate to charges endpoints. If the value is no longer up to
* date, the charge won't go through. Please refer to our <a
* href="https://stripe.com/docs/exchange-rates">Using with charges</a> guide for more details.
*
* <p>-----
*
* <p>
*
* <p><em>This Exchange Rates API is a Beta Service and is subject to Stripe's terms of service. You
* may use the API solely for the purpose of transacting on Stripe. For example, the API may be
* queried in order to:</em>
*
* <p>- <em>localize prices for processing payments on Stripe</em> - <em>reconcile Stripe
* transactions</em> - <em>determine how much money to send to a connected account</em> -
* <em>determine app fees to charge a connected account</em>
*
* <p><em>Using this Exchange Rates API beta for any purpose other than to transact on Stripe is
* strictly prohibited and constitutes a violation of Stripe's terms of service.</em>
*/
@Getter
@Setter
Expand Down
47 changes: 46 additions & 1 deletion src/main/java/com/stripe/model/FundingInstructions.java
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,10 @@ public static class BankTransfer extends StripeObject {
@Setter
@EqualsAndHashCode(callSuper = false)
public static class FinancialAddress extends StripeObject {
/** ABA Records contain U.S. bank account details per the ABA format. */
@SerializedName("aba")
Aba aba;

/** Iban Records contain E.U. bank account details per the SEPA format. */
@SerializedName("iban")
Iban iban;
Expand All @@ -94,10 +98,15 @@ public static class FinancialAddress extends StripeObject {
@SerializedName("supported_networks")
List<String> supportedNetworks;

/** SWIFT Records contain U.S. bank account details per the SWIFT format. */
@SerializedName("swift")
Swift swift;

/**
* The type of financial address
*
* <p>One of {@code iban}, {@code sort_code}, {@code spei}, or {@code zengin}.
* <p>One of {@code aba}, {@code iban}, {@code sort_code}, {@code spei}, {@code swift}, or
* {@code zengin}.
*/
@SerializedName("type")
String type;
Expand All @@ -106,6 +115,24 @@ public static class FinancialAddress extends StripeObject {
@SerializedName("zengin")
Zengin zengin;

/** ABA Records contain U.S. bank account details per the ABA format. */
@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
public static class Aba extends StripeObject {
/** The ABA account number. */
@SerializedName("account_number")
String accountNumber;

/** The bank name. */
@SerializedName("bank_name")
String bankName;

/** The ABA routing number. */
@SerializedName("routing_number")
String routingNumber;
}

/** Iban Records contain E.U. bank account details per the SEPA format. */
@Getter
@Setter
Expand Down Expand Up @@ -167,6 +194,24 @@ public static class Spei extends StripeObject {
String clabe;
}

/** SWIFT Records contain U.S. bank account details per the SWIFT format. */
@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
public static class Swift extends StripeObject {
/** The account number. */
@SerializedName("account_number")
String accountNumber;

/** The bank name. */
@SerializedName("bank_name")
String bankName;

/** The SWIFT code. */
@SerializedName("swift_code")
String swiftCode;
}

/** Zengin Records contain Japan bank account details per the Zengin format. */
@Getter
@Setter
Expand Down
55 changes: 54 additions & 1 deletion src/main/java/com/stripe/model/PaymentIntent.java
Original file line number Diff line number Diff line change
Expand Up @@ -1784,6 +1784,10 @@ public static class DisplayBankTransferInstructions extends StripeObject {
@Setter
@EqualsAndHashCode(callSuper = false)
public static class FinancialAddress extends StripeObject {
/** ABA Records contain U.S. bank account details per the ABA format. */
@SerializedName("aba")
Aba aba;

/** Iban Records contain E.U. bank account details per the SEPA format. */
@SerializedName("iban")
Iban iban;
Expand All @@ -1800,10 +1804,15 @@ public static class FinancialAddress extends StripeObject {
@SerializedName("supported_networks")
List<String> supportedNetworks;

/** SWIFT Records contain U.S. bank account details per the SWIFT format. */
@SerializedName("swift")
Swift swift;

/**
* The type of financial address
*
* <p>One of {@code iban}, {@code sort_code}, {@code spei}, or {@code zengin}.
* <p>One of {@code aba}, {@code iban}, {@code sort_code}, {@code spei}, {@code swift}, or
* {@code zengin}.
*/
@SerializedName("type")
String type;
Expand All @@ -1812,6 +1821,24 @@ public static class FinancialAddress extends StripeObject {
@SerializedName("zengin")
Zengin zengin;

/** ABA Records contain U.S. bank account details per the ABA format. */
@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
public static class Aba extends StripeObject {
/** The ABA account number. */
@SerializedName("account_number")
String accountNumber;

/** The bank name. */
@SerializedName("bank_name")
String bankName;

/** The ABA routing number. */
@SerializedName("routing_number")
String routingNumber;
}

/** Iban Records contain E.U. bank account details per the SEPA format. */
@Getter
@Setter
Expand Down Expand Up @@ -1873,6 +1900,24 @@ public static class Spei extends StripeObject {
String clabe;
}

/** SWIFT Records contain U.S. bank account details per the SWIFT format. */
@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
public static class Swift extends StripeObject {
/** The account number. */
@SerializedName("account_number")
String accountNumber;

/** The bank name. */
@SerializedName("bank_name")
String bankName;

/** The SWIFT code. */
@SerializedName("swift_code")
String swiftCode;
}

/** Zengin Records contain Japan bank account details per the Zengin format. */
@Getter
@Setter
Expand Down Expand Up @@ -2330,6 +2375,9 @@ public static class PaymentMethodOptions extends StripeObject {
@SerializedName("promptpay")
Promptpay promptpay;

@SerializedName("revolut_pay")
RevolutPay revolutPay;

@SerializedName("sepa_debit")
SepaDebit sepaDebit;

Expand Down Expand Up @@ -3471,6 +3519,11 @@ public static class Promptpay extends StripeObject {
String setupFutureUsage;
}

@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
public static class RevolutPay extends StripeObject {}

@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
Expand Down
4 changes: 4 additions & 0 deletions src/main/java/com/stripe/model/PaymentLink.java
Original file line number Diff line number Diff line change
Expand Up @@ -844,6 +844,10 @@ public static class PaymentIntentData extends StripeObject {
@SerializedName("capture_method")
String captureMethod;

/** An arbitrary string attached to the object. Often useful for displaying to users. */
@SerializedName("description")
String description;

/**
* Set of <a href="https://stripe.com/docs/api/metadata">key-value pairs</a> that will set
* metadata on <a href="https://stripe.com/docs/api/payment_intents">Payment Intents</a>
Expand Down
13 changes: 11 additions & 2 deletions src/main/java/com/stripe/model/PaymentMethod.java
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,9 @@ public class PaymentMethod extends ApiResource implements HasId, MetadataStore<P
@SerializedName("radar_options")
RadarOptions radarOptions;

@SerializedName("revolut_pay")
RevolutPay revolutPay;

@SerializedName("sepa_debit")
SepaDebit sepaDebit;

Expand All @@ -184,8 +187,8 @@ public class PaymentMethod extends ApiResource implements HasId, MetadataStore<P
* card}, {@code card_present}, {@code cashapp}, {@code customer_balance}, {@code eps}, {@code
* fpx}, {@code giropay}, {@code grabpay}, {@code ideal}, {@code interac_present}, {@code klarna},
* {@code konbini}, {@code link}, {@code oxxo}, {@code p24}, {@code paynow}, {@code paypal},
* {@code pix}, {@code promptpay}, {@code sepa_debit}, {@code sofort}, {@code us_bank_account},
* {@code wechat_pay}, or {@code zip}.
* {@code pix}, {@code promptpay}, {@code revolut_pay}, {@code sepa_debit}, {@code sofort}, {@code
* us_bank_account}, {@code wechat_pay}, or {@code zip}.
*/
@SerializedName("type")
String type;
Expand Down Expand Up @@ -1458,6 +1461,11 @@ public static class RadarOptions extends StripeObject {
String session;
}

@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
public static class RevolutPay extends StripeObject {}

@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
Expand Down Expand Up @@ -1694,6 +1702,7 @@ public void setResponseGetter(StripeResponseGetter responseGetter) {
trySetResponseGetter(pix, responseGetter);
trySetResponseGetter(promptpay, responseGetter);
trySetResponseGetter(radarOptions, responseGetter);
trySetResponseGetter(revolutPay, responseGetter);
trySetResponseGetter(sepaDebit, responseGetter);
trySetResponseGetter(sofort, responseGetter);
trySetResponseGetter(usBankAccount, responseGetter);
Expand Down
Loading
Loading