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 for beta #1691

Merged
merged 11 commits into from
Nov 22, 2023
46 changes: 30 additions & 16 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,20 @@
# Changelog

## 24.5.0 - 2023-11-21
* [#1693](https://github.com/stripe/stripe-java/pull/1693) Update generated code
* Add support for `electronic_commerce_indicator` and `transaction_id` on `Charge.payment_method_details.card.three_d_secure` and `SetupAttempt.payment_method_details.card.three_d_secure`
* Add support for `exemption_indicator_applied` and `exemption_indicator` on `Charge.payment_method_details.card.three_d_secure`
* Add support for `three_d_secure` on `PaymentIntentConfirmParams.payment_method_options.card`, `PaymentIntentCreateParams.payment_method_options.card`, `PaymentIntentUpdateParams.payment_method_options.card`, `SetupIntentConfirmParams.payment_method_options.card`, `SetupIntentCreateParams.payment_method_options.card`, and `SetupIntentUpdateParams.payment_method_options.card`

## 24.4.0 - 2023-11-21
* [#1690](https://github.com/stripe/stripe-java/pull/1690) Update generated code
* Add support for `offline` on `Charge.payment_method_details.card_present`
* Add support for `system_trace_audit_number` on `Issuing.Authorization.network_data`
* Add support for `transaction_id` on `Issuing.Authorization.network_data` and `Issuing.Transaction.network_data`
* Add support for `network_risk_score` on `Issuing.Authorization.pending_request` and `Issuing.Authorization.request_history[]`
* Add support for `requested_at` on `Issuing.Authorization.request_history[]`
* Add support for `authorization_code` on `Issuing.Transaction.network_data`

## 24.4.0-beta.1 - 2023-11-16
* [#1682](https://github.com/stripe/stripe-java/pull/1682) Update generated code for beta
* Add support for `issuing_card` and `issuing_cards_list` on `AccountSessionCreateParams.components`
Expand All @@ -9,12 +24,27 @@
* Add support for `passengers` on `ChargeCaptureParams.payment_details.flight`, `ChargeCaptureParams.payment_details.lodging`, `ChargeUpdateParams.payment_details.flight`, `ChargeUpdateParams.payment_details.lodging`, `PaymentIntentCaptureParams.payment_details.flight`, `PaymentIntentCaptureParams.payment_details.lodging`, `PaymentIntentConfirmParams.payment_details.flight`, `PaymentIntentConfirmParams.payment_details.lodging`, `PaymentIntentCreateParams.payment_details.flight`, `PaymentIntentCreateParams.payment_details.lodging`, `PaymentIntentUpdateParams.payment_details.flight`, and `PaymentIntentUpdateParams.payment_details.lodging`
* Add support for `created` on `CustomerSession`

## 24.3.0 - 2023-11-16
* [#1685](https://github.com/stripe/stripe-java/pull/1685) Update generated code
* Add support for `status` on `checkout.SessionListParams`
* [#1683](https://github.com/stripe/stripe-java/pull/1683) Update generated code
* Add support for `bacs_debit_payments` on `AccountCreateParams.settings` and `AccountUpdateParams.settings`
* Add support for `service_user_number` on `Account.settings.bacs_debit_payments`
* Add support for `capture_before` on `Charge.payment_method_details.card`
* Add support for `paypal` on `Checkout.Session.payment_method_options`
* Add support for `tax_amounts` on `CreditNoteCreateParams.lines[]`, `CreditNotePreviewLinesParams.lines[]`, and `CreditNotePreviewParams.lines[]`
* Add support for `network_data` on `Issuing.Transaction`

## 24.3.0-beta.1 - 2023-11-10
* [#1681](https://github.com/stripe/stripe-java/pull/1681) Update generated code for beta
* Add support for `metadata` on `QuoteCreateParams.phases[]`, `QuotePhase`, and `QuoteUpdateParams.phases[]`
* Add support for `last_reestimation_details` on `Quote.computed`
* Add support for new value `quote.reestimate_failed` on enums `WebhookEndpointCreateParams.enabled_events[]` and `WebhookEndpointUpdateParams.enabled_events[]`

## 24.2.0 - 2023-11-09
* [#1679](https://github.com/stripe/stripe-java/pull/1679) Update generated code
* Add support for `metadata` on `Quote.subscription_data`, `QuoteCreateParams.subscription_data`, and `QuoteUpdateParams.subscription_data`

## 24.2.0-beta.1 - 2023-11-02
* [#1678](https://github.com/stripe/stripe-java/pull/1678) Update generated code for beta
* Add support for `attach_payment_intent` method on resource `Invoice`
Expand All @@ -29,21 +59,6 @@
* Change type of `tax.RegistrationCreateParams.active_from` to `DateTime | 'now'`
* Add support for new value `invoice.payment.overpaid` on enums `WebhookEndpointCreateParams.enabled_events[]` and `WebhookEndpointUpdateParams.enabled_events[]`

## 24.3.0 - 2023-11-16
* [#1685](https://github.com/stripe/stripe-java/pull/1685) Update generated code
* Add support for `status` on `checkout.SessionListParams`
* [#1683](https://github.com/stripe/stripe-java/pull/1683) Update generated code
* Add support for `bacs_debit_payments` on `AccountCreateParams.settings` and `AccountUpdateParams.settings`
* Add support for `service_user_number` on `Account.settings.bacs_debit_payments`
* Add support for `capture_before` on `Charge.payment_method_details.card`
* Add support for `paypal` on `Checkout.Session.payment_method_options`
* Add support for `tax_amounts` on `CreditNoteCreateParams.lines[]`, `CreditNotePreviewLinesParams.lines[]`, and `CreditNotePreviewParams.lines[]`
* Add support for `network_data` on `Issuing.Transaction`

## 24.2.0 - 2023-11-09
* [#1679](https://github.com/stripe/stripe-java/pull/1679) Update generated code
* Add support for `metadata` on `Quote.subscription_data`, `QuoteCreateParams.subscription_data`, and `QuoteUpdateParams.subscription_data`

## 24.1.0 - 2023-11-02
* [#1677](https://github.com/stripe/stripe-java/pull/1677) Update generated code
* Add support for new resource `Tax.Registration`
Expand All @@ -54,7 +69,6 @@
* Add support for `description` on `PaymentLink.payment_intent_data`, `PaymentLinkCreateParams.payment_intent_data`, and `PaymentLinkUpdateParams.payment_intent_data`
* Add support for new value `unreconciled_customer_funds` on enum `reporting.ReportRunCreateParams.parameters.reporting_category`


## 24.1.0-beta.2 - 2023-10-26
* [#1675](https://github.com/stripe/stripe-java/pull/1675) Update generated code for beta
* Add support for new resource `Margin`
Expand Down
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v669
v681
44 changes: 44 additions & 0 deletions src/main/java/com/stripe/model/Charge.java
Original file line number Diff line number Diff line change
Expand Up @@ -1839,6 +1839,30 @@ public static class ThreeDSecure extends StripeObject {
@SerializedName("authentication_flow")
String authenticationFlow;

/**
* The Electronic Commerce Indicator (ECI). A protocol-level field indicating what degree of
* authentication was performed.
*
* <p>One of {@code 01}, {@code 02}, {@code 05}, {@code 06}, or {@code 07}.
*/
@SerializedName("electronic_commerce_indicator")
String electronicCommerceIndicator;

/**
* The exemption requested via 3DS and accepted by the issuer at authentication time.
*
* <p>One of {@code low_risk}, or {@code none}.
*/
@SerializedName("exemption_indicator")
String exemptionIndicator;

/**
* Whether Stripe requested the value of {@code exemption_indicator} in the transaction.
* This will depend on the outcome of Stripe's internal risk assessment.
*/
@SerializedName("exemption_indicator_applied")
Boolean exemptionIndicatorApplied;

/**
* Indicates the outcome of 3D Secure authentication.
*
Expand All @@ -1859,6 +1883,13 @@ public static class ThreeDSecure extends StripeObject {
@SerializedName("result_reason")
String resultReason;

/**
* The 3D Secure 1 XID or 3D Secure 2 Directory Server Transaction ID (dsTransId) for this
* payment.
*/
@SerializedName("transaction_id")
String transactionId;

/**
* The version of 3D Secure that was used.
*
Expand Down Expand Up @@ -2123,6 +2154,10 @@ public static class CardPresent extends StripeObject {
@SerializedName("network")
String network;

/** Details about payments collected offline. */
@SerializedName("offline")
Offline offline;

/** Defines whether the authorized amount can be over-captured or not. */
@SerializedName("overcapture_supported")
Boolean overcaptureSupported;
Expand All @@ -2143,6 +2178,15 @@ public static class CardPresent extends StripeObject {
@SerializedName("receipt")
Receipt receipt;

@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
public static class Offline extends StripeObject {
/** Time at which the payment was collected while offline. */
@SerializedName("stored_at")
Long storedAt;
}

@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
Expand Down
36 changes: 36 additions & 0 deletions src/main/java/com/stripe/model/CustomerCashBalanceTransaction.java
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,9 @@ public class CustomerCashBalanceTransaction extends StripeObject
@SerializedName("refunded_from_payment")
RefundedFromPayment refundedFromPayment;

@SerializedName("transferred_to_balance")
TransferredToBalance transferredToBalance;

/**
* The type of the cash balance transaction. New types may be added in future. See <a
* href="https://stripe.com/docs/payments/customer-balance#types">Customer Balance</a> to learn
Expand Down Expand Up @@ -352,6 +355,39 @@ public void setRefundObject(Refund expandableObject) {
}
}

@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
public static class TransferredToBalance extends StripeObject {
/**
* The <a href="https://stripe.com/docs/api/balance_transactions/object">Balance Transaction</a>
* that corresponds to funds transferred to your Stripe balance.
*/
@SerializedName("balance_transaction")
@Getter(lombok.AccessLevel.NONE)
@Setter(lombok.AccessLevel.NONE)
ExpandableField<BalanceTransaction> balanceTransaction;

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

public void setBalanceTransaction(String id) {
this.balanceTransaction = ApiResource.setExpandableFieldId(id, this.balanceTransaction);
}

/** Get expanded {@code balanceTransaction}. */
public BalanceTransaction getBalanceTransactionObject() {
return (this.balanceTransaction != null) ? this.balanceTransaction.getExpanded() : null;
}

public void setBalanceTransactionObject(BalanceTransaction expandableObject) {
this.balanceTransaction =
new ExpandableField<BalanceTransaction>(expandableObject.getId(), expandableObject);
}
}

@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
Expand Down
73 changes: 73 additions & 0 deletions src/main/java/com/stripe/model/CustomerSession.java
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ public class CustomerSession extends ApiResource {
@SerializedName("client_secret")
String clientSecret;

/** Configuration for the components supported by this customer session. */
@SerializedName("components")
Components components;

/** Time at which the object was created. Measured in seconds since the Unix epoch. */
@SerializedName("created")
Long created;
Expand Down Expand Up @@ -134,9 +138,78 @@ public static CustomerSession create(CustomerSessionCreateParams params, Request
ApiMode.V1);
}

/** Configuration for the components supported by this customer session. */
@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
public static class Components extends StripeObject {
/** This hash contains whether the payment element is enabled and the features it supports. */
@SerializedName("payment_element")
PaymentElement paymentElement;

/** This hash contains whether the pricing table is enabled. */
@SerializedName("pricing_table")
PricingTable pricingTable;

/** This hash contains whether the payment element is enabled and the features it supports. */
@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
public static class PaymentElement extends StripeObject {
/** Whether the payment element is enabled. */
@SerializedName("enabled")
Boolean enabled;

/** This hash contains the features the Payment Element supports. */
@SerializedName("features")
Features features;

/** This hash contains the features the Payment Element supports. */
@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
public static class Features extends StripeObject {
/**
* Whether the payment element supports detaching payment methods.
*
* <p>One of {@code auto}, or {@code never}.
*/
@SerializedName("payment_method_detach")
String paymentMethodDetach;

/**
* Whether the payment element supports setting payment methods as the customer's default.
*
* <p>One of {@code auto}, or {@code never}.
*/
@SerializedName("payment_method_set_as_customer_default")
String paymentMethodSetAsCustomerDefault;

/**
* Whether the payment element supports updating payment methods.
*
* <p>One of {@code auto}, or {@code never}.
*/
@SerializedName("payment_method_update")
String paymentMethodUpdate;
}
}

/** This hash contains whether the pricing table is enabled. */
@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
public static class PricingTable extends StripeObject {
/** Whether the pricing table is enabled. */
@SerializedName("enabled")
Boolean enabled;
}
}

@Override
public void setResponseGetter(StripeResponseGetter responseGetter) {
super.setResponseGetter(responseGetter);
trySetResponseGetter(components, responseGetter);
trySetResponseGetter(customer, responseGetter);
}
}
5 changes: 3 additions & 2 deletions src/main/java/com/stripe/model/Event.java
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,9 @@
* href="https://stripe.com/docs/api#list_events">list of events</a> from the API. We also have a
* separate <a href="http://en.wikipedia.org/wiki/Webhook">webhooks</a> system for sending the
* {@code Event} objects directly to an endpoint on your server. You can manage webhooks in your <a
* href="https://dashboard.stripe.com/account/webhooks">account settings</a>. Learn how to [listen
* for events] (/docs/webhooks) so that your integration can automatically trigger reactions.
* href="https://dashboard.stripe.com/account/webhooks">account settings</a>. Learn how to <a
* href="https://stripe.com/docs/webhooks">listen for events</a> so that your integration can
* automatically trigger reactions.
*
* <p>When using <a href="https://stripe.com/docs/connect">Connect</a>, you can also receive event
* notifications that occur in connected accounts. For these events, there's an additional {@code
Expand Down
12 changes: 6 additions & 6 deletions src/main/java/com/stripe/model/PaymentIntent.java
Original file line number Diff line number Diff line change
Expand Up @@ -2402,13 +2402,13 @@ public static class Delivery extends StripeObject {
@SerializedName("mode")
String mode;

@SerializedName("receipient")
Receipient receipient;
@SerializedName("recipient")
Recipient recipient;

@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
public static class Receipient extends StripeObject {
public static class Recipient extends StripeObject {
/** The email of the recipient the ticket is delivered to. */
@SerializedName("email")
String email;
Expand Down Expand Up @@ -2491,13 +2491,13 @@ public static class Delivery extends StripeObject {
@SerializedName("mode")
String mode;

@SerializedName("receipient")
Receipient receipient;
@SerializedName("recipient")
Recipient recipient;

@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
public static class Receipient extends StripeObject {
public static class Recipient extends StripeObject {
/** The email of the recipient the ticket is delivered to. */
@SerializedName("email")
String email;
Expand Down
20 changes: 12 additions & 8 deletions src/main/java/com/stripe/model/Price.java
Original file line number Diff line number Diff line change
Expand Up @@ -259,16 +259,18 @@ public static Price create(PriceCreateParams params, RequestOptions options)
}

/**
* Returns a list of your active prices. For the list of inactive prices, set {@code active} to
* false.
* Returns a list of your active prices, excluding <a
* href="https://stripe.com/docs/products-prices/pricing-models#inline-pricing">inline prices</a>.
* For the list of inactive prices, set {@code active} to false.
*/
public static PriceCollection list(Map<String, Object> params) throws StripeException {
return list(params, (RequestOptions) null);
}

/**
* Returns a list of your active prices. For the list of inactive prices, set {@code active} to
* false.
* Returns a list of your active prices, excluding <a
* href="https://stripe.com/docs/products-prices/pricing-models#inline-pricing">inline prices</a>.
* For the list of inactive prices, set {@code active} to false.
*/
public static PriceCollection list(Map<String, Object> params, RequestOptions options)
throws StripeException {
Expand All @@ -285,16 +287,18 @@ public static PriceCollection list(Map<String, Object> params, RequestOptions op
}

/**
* Returns a list of your active prices. For the list of inactive prices, set {@code active} to
* false.
* Returns a list of your active prices, excluding <a
* href="https://stripe.com/docs/products-prices/pricing-models#inline-pricing">inline prices</a>.
* For the list of inactive prices, set {@code active} to false.
*/
public static PriceCollection list(PriceListParams params) throws StripeException {
return list(params, (RequestOptions) null);
}

/**
* Returns a list of your active prices. For the list of inactive prices, set {@code active} to
* false.
* Returns a list of your active prices, excluding <a
* href="https://stripe.com/docs/products-prices/pricing-models#inline-pricing">inline prices</a>.
* For the list of inactive prices, set {@code active} to false.
*/
public static PriceCollection list(PriceListParams params, RequestOptions options)
throws StripeException {
Expand Down
5 changes: 2 additions & 3 deletions src/main/java/com/stripe/model/Refund.java
Original file line number Diff line number Diff line change
Expand Up @@ -144,9 +144,8 @@ public class Refund extends ApiResource implements MetadataStore<Refund>, Balanc
ExpandableField<TransferReversal> sourceTransferReversal;

/**
* Status of the refund. For credit card refunds, this can be {@code pending}, {@code succeeded},
* or {@code failed}. For other types of refunds, it can be {@code pending}, {@code
* requires_action}, {@code succeeded}, {@code failed}, or {@code canceled}. Learn more about <a
* Status of the refund. This can be {@code pending}, {@code requires_action}, {@code succeeded},
* {@code failed}, or {@code canceled}. Learn more about <a
* href="https://stripe.com/docs/refunds#failed-refunds">failed refunds</a>.
*/
@SerializedName("status")
Expand Down
Loading
Loading