Skip to content

Commit

Permalink
Update generated code (#1835)
Browse files Browse the repository at this point in the history
* Update generated code for v1117

* Update generated code for v1118

* Update generated code for v1120

* Update generated code for v1121

* Update generated code for v1123

---------

Co-authored-by: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com>
  • Loading branch information
stripe-openapi[bot] committed Jul 11, 2024
1 parent 044eae5 commit 7ef2118
Show file tree
Hide file tree
Showing 11 changed files with 1,378 additions and 36 deletions.
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v1116
v1123
25 changes: 25 additions & 0 deletions src/main/java/com/stripe/model/ConfirmationToken.java
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,10 @@ public class ConfirmationToken extends ApiResource implements HasId {
@SerializedName("payment_intent")
String paymentIntent;

/** Payment-method-specific configuration for this ConfirmationToken. */
@SerializedName("payment_method_options")
PaymentMethodOptions paymentMethodOptions;

/**
* Payment details collected by the Payment Element, used to create a PaymentMethod when a
* PaymentIntent or SetupIntent is confirmed with this ConfirmationToken.
Expand Down Expand Up @@ -198,6 +202,26 @@ public static class Online extends StripeObject {
}
}

/** Payment-method-specific configuration. */
@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
public static class PaymentMethodOptions extends StripeObject {
/** This hash contains the card payment method options. */
@SerializedName("card")
Card card;

/** This hash contains the card payment method options. */
@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
public static class Card extends StripeObject {
/** The {@code cvc_update} Token collected from the Payment Element. */
@SerializedName("cvc_token")
String cvcToken;
}
}

/** Details of the PaymentMethod collected by Payment Element. */
@Getter
@Setter
Expand Down Expand Up @@ -1738,6 +1762,7 @@ public static ConfirmationToken create(
public void setResponseGetter(StripeResponseGetter responseGetter) {
super.setResponseGetter(responseGetter);
trySetResponseGetter(mandateData, responseGetter);
trySetResponseGetter(paymentMethodOptions, responseGetter);
trySetResponseGetter(paymentMethodPreview, responseGetter);
trySetResponseGetter(shipping, responseGetter);
}
Expand Down
102 changes: 102 additions & 0 deletions src/main/java/com/stripe/model/CustomerSession.java
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
import com.stripe.net.RequestOptions;
import com.stripe.net.StripeResponseGetter;
import com.stripe.param.CustomerSessionCreateParams;
import java.util.List;
import java.util.Map;
import lombok.EqualsAndHashCode;
import lombok.Getter;
Expand Down Expand Up @@ -143,6 +144,10 @@ public static class Components extends StripeObject {
@SerializedName("buy_button")
BuyButton buyButton;

/** 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;
Expand All @@ -157,6 +162,103 @@ public static class BuyButton extends StripeObject {
Boolean enabled;
}

/** 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 defines whether the Payment Element supports certain features. */
@SerializedName("features")
Features features;

/** This hash contains the features the Payment Element supports. */
@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
public static class Features extends StripeObject {
/**
* A list of <a
* href="https://docs.stripe.com/api/payment_methods/object#payment_method_object-allow_redisplay">{@code
* allow_redisplay}</a> values that controls which saved payment methods the Payment Element
* displays by filtering to only show payment methods with an {@code allow_redisplay} value
* that is present in this list.
*
* <p>If not specified, defaults to [&quot;always&quot;]. In order to display all saved
* payment methods, specify [&quot;always&quot;, &quot;limited&quot;,
* &quot;unspecified&quot;].
*/
@SerializedName("payment_method_allow_redisplay_filters")
List<String> paymentMethodAllowRedisplayFilters;

/**
* Controls whether or not the Payment Element shows saved payment methods. This parameter
* defaults to {@code disabled}.
*
* <p>One of {@code disabled}, or {@code enabled}.
*/
@SerializedName("payment_method_redisplay")
String paymentMethodRedisplay;

/**
* Determines the max number of saved payment methods for the Payment Element to display.
* This parameter defaults to {@code 10}.
*/
@SerializedName("payment_method_redisplay_limit")
Long paymentMethodRedisplayLimit;

/**
* Controls whether the Payment Element displays the option to remove a saved payment
* method. This parameter defaults to {@code disabled}.
*
* <p>Allowing buyers to remove their saved payment methods impacts subscriptions that
* depend on that payment method. Removing the payment method detaches the <a
* href="https://docs.stripe.com/api/payment_methods/object#payment_method_object-customer">{@code
* customer} object</a> from that <a
* href="https://docs.stripe.com/api/payment_methods">PaymentMethod</a>.
*
* <p>One of {@code disabled}, or {@code enabled}.
*/
@SerializedName("payment_method_remove")
String paymentMethodRemove;

/**
* Controls whether the Payment Element displays a checkbox offering to save a new payment
* method. This parameter defaults to {@code disabled}.
*
* <p>If a customer checks the box, the <a
* href="https://docs.stripe.com/api/payment_methods/object#payment_method_object-allow_redisplay">{@code
* allow_redisplay}</a> value on the PaymentMethod is set to {@code 'always'} at
* confirmation time. For PaymentIntents, the <a
* href="https://docs.stripe.com/api/payment_intents/object#payment_intent_object-setup_future_usage">{@code
* setup_future_usage}</a> value is also set to the value defined in {@code
* payment_method_save_usage}.
*
* <p>One of {@code disabled}, or {@code enabled}.
*/
@SerializedName("payment_method_save")
String paymentMethodSave;

/**
* When using PaymentIntents and the customer checks the save checkbox, this field
* determines the <a
* href="https://docs.stripe.com/api/payment_intents/object#payment_intent_object-setup_future_usage">{@code
* setup_future_usage}</a> value used to confirm the PaymentIntent.
*
* <p>When using SetupIntents, directly configure the <a
* href="https://docs.stripe.com/api/setup_intents/object#setup_intent_object-usage">{@code
* usage}</a> value on SetupIntent creation.
*
* <p>One of {@code off_session}, or {@code on_session}.
*/
@SerializedName("payment_method_save_usage")
String paymentMethodSaveUsage;
}
}

/** This hash contains whether the pricing table is enabled. */
@Getter
@Setter
Expand Down
9 changes: 3 additions & 6 deletions src/main/java/com/stripe/model/StripeError.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,7 @@ public class StripeError extends StripeObject {
* bank_account_bad_routing_numbers}, {@code bank_account_declined}, {@code bank_account_exists},
* {@code bank_account_restricted}, {@code bank_account_unusable}, {@code
* bank_account_unverified}, {@code bank_account_verification_failed}, {@code
* billing_invalid_mandate}, {@code billing_policy_remote_function_response_invalid}, {@code
* billing_policy_remote_function_timeout}, {@code
* billing_policy_remote_function_unexpected_status_code}, {@code
* billing_policy_remote_function_unreachable}, {@code bitcoin_upgrade_required}, {@code
* billing_invalid_mandate}, {@code bitcoin_upgrade_required}, {@code
* capture_charge_authorization_expired}, {@code capture_unauthorized_payment}, {@code
* card_decline_rate_limit_exceeded}, {@code card_declined}, {@code
* cardholder_phone_number_required}, {@code charge_already_captured}, {@code
Expand Down Expand Up @@ -60,8 +57,8 @@ public class StripeError extends StripeObject {
* parameter_invalid_integer}, {@code parameter_invalid_string_blank}, {@code
* parameter_invalid_string_empty}, {@code parameter_missing}, {@code parameter_unknown}, {@code
* parameters_exclusive}, {@code payment_intent_action_required}, {@code
* payment_intent_authentication_failure}, {@code payment_intent_fx_quote_invalid}, {@code
* payment_intent_incompatible_payment_method}, {@code payment_intent_invalid_parameter}, {@code
* payment_intent_authentication_failure}, {@code payment_intent_incompatible_payment_method},
* {@code payment_intent_invalid_parameter}, {@code
* payment_intent_konbini_rejected_confirmation_number}, {@code payment_intent_mandate_invalid},
* {@code payment_intent_payment_attempt_expired}, {@code payment_intent_payment_attempt_failed},
* {@code payment_intent_unexpected_state}, {@code payment_method_bank_account_already_verified},
Expand Down
32 changes: 20 additions & 12 deletions src/main/java/com/stripe/model/Subscription.java
Original file line number Diff line number Diff line change
Expand Up @@ -1064,7 +1064,7 @@ public static SubscriptionSearchResult search(
* Updates an existing subscription to match the specified parameters. When changing prices or
* quantities, we optionally prorate the price we charge next month to make up for any price
* changes. To preview how the proration is calculated, use the <a
* href="https://stripe.com/docs/api/invoices/upcoming">upcoming invoice</a> endpoint.
* href="https://stripe.com/docs/api/invoices/create_preview">create preview</a> endpoint.
*
* <p>By default, we prorate subscription changes. For example, if a customer signs up on May 1
* for a 100 price, they’ll be billed 100 immediately. If on May 15 they switch to a 200 price,
Expand All @@ -1080,12 +1080,14 @@ public static SubscriptionSearchResult search(
*
* <ul>
* <li>The billing interval is changed (for example, from monthly to yearly).
* <li>The subscription moves from free to paid, or paid to free.
* <li>The subscription moves from free to paid.
* <li>A trial starts or ends.
* </ul>
*
* <p>In these cases, we apply a credit for the unused time on the previous price, immediately
* charge the customer using the new price, and reset the billing date.
* charge the customer using the new price, and reset the billing date. Learn about how <a
* href="https://stripe.com/billing/subscriptions/upgrade-downgrade#immediate-payment">Stripe
* immediately attempts payment for subscription changes</a>.
*
* <p>If you want to charge for an upgrade immediately, pass {@code proration_behavior} as {@code
* always_invoice} to create prorations, automatically invoice the customer for those proration
Expand Down Expand Up @@ -1115,7 +1117,7 @@ public Subscription update(Map<String, Object> params) throws StripeException {
* Updates an existing subscription to match the specified parameters. When changing prices or
* quantities, we optionally prorate the price we charge next month to make up for any price
* changes. To preview how the proration is calculated, use the <a
* href="https://stripe.com/docs/api/invoices/upcoming">upcoming invoice</a> endpoint.
* href="https://stripe.com/docs/api/invoices/create_preview">create preview</a> endpoint.
*
* <p>By default, we prorate subscription changes. For example, if a customer signs up on May 1
* for a 100 price, they’ll be billed 100 immediately. If on May 15 they switch to a 200 price,
Expand All @@ -1131,12 +1133,14 @@ public Subscription update(Map<String, Object> params) throws StripeException {
*
* <ul>
* <li>The billing interval is changed (for example, from monthly to yearly).
* <li>The subscription moves from free to paid, or paid to free.
* <li>The subscription moves from free to paid.
* <li>A trial starts or ends.
* </ul>
*
* <p>In these cases, we apply a credit for the unused time on the previous price, immediately
* charge the customer using the new price, and reset the billing date.
* charge the customer using the new price, and reset the billing date. Learn about how <a
* href="https://stripe.com/billing/subscriptions/upgrade-downgrade#immediate-payment">Stripe
* immediately attempts payment for subscription changes</a>.
*
* <p>If you want to charge for an upgrade immediately, pass {@code proration_behavior} as {@code
* always_invoice} to create prorations, automatically invoice the customer for those proration
Expand Down Expand Up @@ -1171,7 +1175,7 @@ public Subscription update(Map<String, Object> params, RequestOptions options)
* Updates an existing subscription to match the specified parameters. When changing prices or
* quantities, we optionally prorate the price we charge next month to make up for any price
* changes. To preview how the proration is calculated, use the <a
* href="https://stripe.com/docs/api/invoices/upcoming">upcoming invoice</a> endpoint.
* href="https://stripe.com/docs/api/invoices/create_preview">create preview</a> endpoint.
*
* <p>By default, we prorate subscription changes. For example, if a customer signs up on May 1
* for a 100 price, they’ll be billed 100 immediately. If on May 15 they switch to a 200 price,
Expand All @@ -1187,12 +1191,14 @@ public Subscription update(Map<String, Object> params, RequestOptions options)
*
* <ul>
* <li>The billing interval is changed (for example, from monthly to yearly).
* <li>The subscription moves from free to paid, or paid to free.
* <li>The subscription moves from free to paid.
* <li>A trial starts or ends.
* </ul>
*
* <p>In these cases, we apply a credit for the unused time on the previous price, immediately
* charge the customer using the new price, and reset the billing date.
* charge the customer using the new price, and reset the billing date. Learn about how <a
* href="https://stripe.com/billing/subscriptions/upgrade-downgrade#immediate-payment">Stripe
* immediately attempts payment for subscription changes</a>.
*
* <p>If you want to charge for an upgrade immediately, pass {@code proration_behavior} as {@code
* always_invoice} to create prorations, automatically invoice the customer for those proration
Expand Down Expand Up @@ -1221,7 +1227,7 @@ public Subscription update(SubscriptionUpdateParams params) throws StripeExcepti
* Updates an existing subscription to match the specified parameters. When changing prices or
* quantities, we optionally prorate the price we charge next month to make up for any price
* changes. To preview how the proration is calculated, use the <a
* href="https://stripe.com/docs/api/invoices/upcoming">upcoming invoice</a> endpoint.
* href="https://stripe.com/docs/api/invoices/create_preview">create preview</a> endpoint.
*
* <p>By default, we prorate subscription changes. For example, if a customer signs up on May 1
* for a 100 price, they’ll be billed 100 immediately. If on May 15 they switch to a 200 price,
Expand All @@ -1237,12 +1243,14 @@ public Subscription update(SubscriptionUpdateParams params) throws StripeExcepti
*
* <ul>
* <li>The billing interval is changed (for example, from monthly to yearly).
* <li>The subscription moves from free to paid, or paid to free.
* <li>The subscription moves from free to paid.
* <li>A trial starts or ends.
* </ul>
*
* <p>In these cases, we apply a credit for the unused time on the previous price, immediately
* charge the customer using the new price, and reset the billing date.
* charge the customer using the new price, and reset the billing date. Learn about how <a
* href="https://stripe.com/billing/subscriptions/upgrade-downgrade#immediate-payment">Stripe
* immediately attempts payment for subscription changes</a>.
*
* <p>If you want to charge for an upgrade immediately, pass {@code proration_behavior} as {@code
* always_invoice} to create prorations, automatically invoice the customer for those proration
Expand Down
4 changes: 1 addition & 3 deletions src/main/java/com/stripe/model/billingportal/Session.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,7 @@
* URL. Create sessions on-demand when customers intend to manage their subscriptions and billing
* details.
*
* <p>Learn more in the <a
* href="https://stripe.com/docs/billing/subscriptions/integrating-customer-portal">integration
* guide</a>.
* <p>Related guide: <a href="https://stripe.com/customer-management">Customer management</a>
*/
@Getter
@Setter
Expand Down
31 changes: 31 additions & 0 deletions src/main/java/com/stripe/model/issuing/Card.java
Original file line number Diff line number Diff line change
Expand Up @@ -422,6 +422,10 @@ public static class Shipping extends StripeObject {
@SerializedName("address")
Address address;

/** Address validation details for the shipment. */
@SerializedName("address_validation")
AddressValidation addressValidation;

/**
* The delivery company that shipped a card.
*
Expand Down Expand Up @@ -495,6 +499,33 @@ public static class Shipping extends StripeObject {
@SerializedName("type")
String type;

@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
public static class AddressValidation extends StripeObject {
/**
* The address validation capabilities to use.
*
* <p>One of {@code disabled}, {@code normalization_only}, or {@code
* validation_and_normalization}.
*/
@SerializedName("mode")
String mode;

/** The normalized shipping address. */
@SerializedName("normalized_address")
Address normalizedAddress;

/**
* The validation result for the shipping address.
*
* <p>One of {@code indeterminate}, {@code likely_deliverable}, or {@code
* likely_undeliverable}.
*/
@SerializedName("result")
String result;
}

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

0 comments on commit 7ef2118

Please sign in to comment.