diff --git a/CHANGELOG.md b/CHANGELOG.md index 5c6c517c77d..58f8953c99f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -61,6 +61,15 @@ * Add support for new value `quote.accept_failed` on enums `WebhookEndpointCreateParams.enabled_events[]` and `WebhookEndpointUpdateParams.enabled_events[]` * [#1633](https://github.com/stripe/stripe-java/pull/1633) Merge master +## 23.7.0 - 2023-09-28 +* [#1657](https://github.com/stripe/stripe-java/pull/1657) Update generated code + * Add support for `rendering` on `InvoiceCreateParams`, `InvoiceUpdateParams`, and `Invoice` + +## 23.6.0 - 2023-09-21 +* [#1654](https://github.com/stripe/stripe-java/pull/1654) Update generated code + * Add support for `terms_of_service_acceptance` on `Checkout.Session.custom_text`, `PaymentLink.custom_text`, `PaymentLinkCreateParams.custom_text`, `PaymentLinkUpdateParams.custom_text`, and `checkout.SessionCreateParams.custom_text` +* [#1655](https://github.com/stripe/stripe-java/pull/1655) CI: Drop testing for 9, 10, 12-16 + ## 23.5.0 - 2023-09-14 * [#1647](https://github.com/stripe/stripe-java/pull/1647) Update generated code * Add support for new resource `PaymentMethodConfiguration` diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 688708d739b..1373ea073f2 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v545 \ No newline at end of file +v569 \ No newline at end of file diff --git a/src/main/java/com/stripe/model/AccountSession.java b/src/main/java/com/stripe/model/AccountSession.java index 152b4e53841..e27f660b4c3 100644 --- a/src/main/java/com/stripe/model/AccountSession.java +++ b/src/main/java/com/stripe/model/AccountSession.java @@ -157,6 +157,32 @@ public static class PaymentDetails extends StripeObject { /** Whether the embedded component is enabled. */ @SerializedName("enabled") Boolean enabled; + + @SerializedName("features") + Features features; + + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Features extends StripeObject { + /** + * Whether to allow capturing and cancelling payment intents. This is {@code true} by + * default. + */ + @SerializedName("capture_payments") + Boolean capturePayments; + + /** + * Whether to allow responding to disputes, including submitting evidence and accepting + * disputes. This is {@code true} by default. + */ + @SerializedName("dispute_management") + Boolean disputeManagement; + + /** Whether to allow sending refunds. This is {@code true} by default. */ + @SerializedName("refund_management") + Boolean refundManagement; + } } @Getter @@ -166,6 +192,32 @@ public static class Payments extends StripeObject { /** Whether the embedded component is enabled. */ @SerializedName("enabled") Boolean enabled; + + @SerializedName("features") + Features features; + + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Features extends StripeObject { + /** + * Whether to allow capturing and cancelling payment intents. This is {@code true} by + * default. + */ + @SerializedName("capture_payments") + Boolean capturePayments; + + /** + * Whether to allow responding to disputes, including submitting evidence and accepting + * disputes. This is {@code true} by default. + */ + @SerializedName("dispute_management") + Boolean disputeManagement; + + /** Whether to allow sending refunds. This is {@code true} by default. */ + @SerializedName("refund_management") + Boolean refundManagement; + } } @Getter @@ -175,6 +227,14 @@ public static class Payouts extends StripeObject { /** Whether the embedded component is enabled. */ @SerializedName("enabled") Boolean enabled; + + @SerializedName("features") + Features features; + + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Features extends StripeObject {} } } diff --git a/src/main/java/com/stripe/model/CustomerCashBalanceTransaction.java b/src/main/java/com/stripe/model/CustomerCashBalanceTransaction.java index 61279eec81e..4f01279f6c2 100644 --- a/src/main/java/com/stripe/model/CustomerCashBalanceTransaction.java +++ b/src/main/java/com/stripe/model/CustomerCashBalanceTransaction.java @@ -122,8 +122,8 @@ public void setCustomerObject(Customer expandableObject) { @EqualsAndHashCode(callSuper = false) public static class AdjustedForOverdraft extends StripeObject { /** - * The Balance Transaction that corresponds - * to funds taken out of your Stripe balance. + * The Balance Transaction + * that corresponds to funds taken out of your Stripe balance. */ @SerializedName("balance_transaction") @Getter(lombok.AccessLevel.NONE) diff --git a/src/main/java/com/stripe/model/Event.java b/src/main/java/com/stripe/model/Event.java index 39c5673a578..6b6202a82f0 100644 --- a/src/main/java/com/stripe/model/Event.java +++ b/src/main/java/com/stripe/model/Event.java @@ -94,6 +94,14 @@ public class Event extends ApiResource implements HasId { @SerializedName("pending_webhooks") Long pendingWebhooks; + /** + * Information about the action that causes the event. Only present when the event is triggered by + * an API request or an Automation action. + */ + @SerializedName("reason") + Reason reason; + /** Information on the API request that triggers the event. */ @SerializedName("request") Request request; @@ -125,8 +133,9 @@ public class Event extends ApiResource implements HasId { * customer.discount.updated}, {@code customer.source.created}, {@code customer.source.deleted}, * {@code customer.source.expiring}, {@code customer.source.updated}, {@code * customer.subscription.collection_paused}, {@code customer.subscription.collection_resumed}, - * {@code customer.subscription.created}, {@code customer.subscription.deleted}, {@code - * customer.subscription.paused}, {@code customer.subscription.pending_update_applied}, {@code + * {@code customer.subscription.created}, {@code customer.subscription.custom_event}, {@code + * customer.subscription.deleted}, {@code customer.subscription.paused}, {@code + * customer.subscription.pending_update_applied}, {@code * customer.subscription.pending_update_expired}, {@code customer.subscription.resumed}, {@code * customer.subscription.trial_will_end}, {@code customer.subscription.updated}, {@code * customer.tax_id.created}, {@code customer.tax_id.deleted}, {@code customer.tax_id.updated}, @@ -149,13 +158,13 @@ public class Event extends ApiResource implements HasId { * invoice.updated}, {@code invoice.voided}, {@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_card_design.activated}, - * {@code issuing_card_design.deactivated}, {@code issuing_card_design.rejected}, {@code - * issuing_card_design.updated}, {@code issuing_cardholder.created}, {@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.submitted}, {@code - * issuing_dispute.updated}, {@code issuing_transaction.created}, {@code - * issuing_transaction.updated}, {@code mandate.updated}, {@code order.created}, {@code + * issuing_dispute.updated}, {@code issuing_personalization_design.activated}, {@code + * issuing_personalization_design.deactivated}, {@code issuing_personalization_design.rejected}, + * {@code issuing_personalization_design.updated}, {@code issuing_transaction.created}, {@code + * issuing_transaction.updated}, {@code mandate.updated}, {@code * payment_intent.amount_capturable_updated}, {@code payment_intent.canceled}, {@code * payment_intent.created}, {@code payment_intent.partially_funded}, {@code * payment_intent.payment_failed}, {@code payment_intent.processing}, {@code @@ -171,16 +180,14 @@ public class Event extends ApiResource implements HasId { * quote.accept_failed}, {@code quote.accepted}, {@code quote.accepting}, {@code quote.canceled}, * {@code quote.created}, {@code quote.draft}, {@code quote.finalized}, {@code quote.reestimated}, * {@code quote.stale}, {@code radar.early_fraud_warning.created}, {@code - * radar.early_fraud_warning.updated}, {@code recipient.created}, {@code recipient.deleted}, - * {@code recipient.updated}, {@code refund.created}, {@code refund.updated}, {@code + * radar.early_fraud_warning.updated}, {@code refund.created}, {@code refund.updated}, {@code * reporting.report_run.failed}, {@code reporting.report_run.succeeded}, {@code * reporting.report_type.updated}, {@code review.closed}, {@code review.opened}, {@code * setup_intent.canceled}, {@code setup_intent.created}, {@code setup_intent.requires_action}, * {@code setup_intent.setup_failed}, {@code setup_intent.succeeded}, {@code - * sigma.scheduled_query_run.created}, {@code sku.created}, {@code sku.deleted}, {@code - * sku.updated}, {@code source.canceled}, {@code source.chargeable}, {@code source.failed}, {@code - * source.mandate_notification}, {@code source.refund_attributes_required}, {@code - * source.transaction.created}, {@code source.transaction.updated}, {@code + * sigma.scheduled_query_run.created}, {@code source.canceled}, {@code source.chargeable}, {@code + * source.failed}, {@code source.mandate_notification}, {@code source.refund_attributes_required}, + * {@code source.transaction.created}, {@code source.transaction.updated}, {@code * subscription_schedule.aborted}, {@code subscription_schedule.canceled}, {@code * subscription_schedule.completed}, {@code subscription_schedule.created}, {@code * subscription_schedule.expiring}, {@code subscription_schedule.released}, {@code @@ -207,7 +214,9 @@ public class Event extends ApiResource implements HasId { * treasury.outbound_transfer.failed}, {@code treasury.outbound_transfer.posted}, {@code * treasury.outbound_transfer.returned}, {@code treasury.received_credit.created}, {@code * treasury.received_credit.failed}, {@code treasury.received_credit.succeeded}, {@code - * treasury.received_debit.created}, or {@code invoiceitem.updated}. + * treasury.received_debit.created}, {@code invoiceitem.updated}, {@code order.created}, {@code + * recipient.created}, {@code recipient.deleted}, {@code recipient.updated}, {@code sku.created}, + * {@code sku.deleted}, or {@code sku.updated}. */ @SerializedName("type") String type; @@ -387,6 +396,79 @@ public void setResponseGetter(StripeResponseGetter responseGetter) { } } + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Reason extends StripeObject { + @SerializedName("automation_action") + AutomationAction automationAction; + + @SerializedName("request") + Request request; + + /** + * The type of the reason for the event. + * + *

One of {@code automation_action}, or {@code request}. + */ + @SerializedName("type") + String type; + + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class AutomationAction extends StripeObject { + @SerializedName("stripe_send_webhook_custom_event") + StripeSendWebhookCustomEvent stripeSendWebhookCustomEvent; + + /** + * The trigger name of the automation that triggered this action. Please visit Revenue + * and retention automations for all possible trigger names. + */ + @SerializedName("trigger") + String trigger; + + /** + * The type of the {@code automation_action}. + * + *

Equal to {@code stripe_send_webhook_custom_event}. + */ + @SerializedName("type") + String type; + + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class StripeSendWebhookCustomEvent extends StripeObject { + /** Set of key-value pairs attached to the action when creating an Automation. */ + @SerializedName("custom_data") + Map customData; + } + } + + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Request extends StripeObject implements HasId { + /** + * ID of the API request that caused the event. If null, the event was automatic (e.g., + * Stripe's automatic subscription handling). Request logs are available in the dashboard, but currently not in the API. + */ + @Getter(onMethod_ = {@Override}) + @SerializedName("id") + String id; + + /** + * The idempotency key transmitted during the request, if any. Note: This property is + * populated only for events on or after May 23, 2017. + */ + @SerializedName("idempotency_key") + String idempotencyKey; + } + } + @Getter @Setter @EqualsAndHashCode(callSuper = false) @@ -412,6 +494,7 @@ public static class Request extends StripeObject implements HasId { public void setResponseGetter(StripeResponseGetter responseGetter) { super.setResponseGetter(responseGetter); trySetResponseGetter(data, responseGetter); + trySetResponseGetter(reason, responseGetter); trySetResponseGetter(request, responseGetter); } } diff --git a/src/main/java/com/stripe/model/EventDataClassLookup.java b/src/main/java/com/stripe/model/EventDataClassLookup.java index 452cba40e11..ca47256f338 100644 --- a/src/main/java/com/stripe/model/EventDataClassLookup.java +++ b/src/main/java/com/stripe/model/EventDataClassLookup.java @@ -132,10 +132,11 @@ final class EventDataClassLookup { classLookup.put("issuing.authorization", com.stripe.model.issuing.Authorization.class); classLookup.put("issuing.card", com.stripe.model.issuing.Card.class); - classLookup.put("issuing.card_bundle", com.stripe.model.issuing.CardBundle.class); - classLookup.put("issuing.card_design", com.stripe.model.issuing.CardDesign.class); classLookup.put("issuing.cardholder", com.stripe.model.issuing.Cardholder.class); classLookup.put("issuing.dispute", com.stripe.model.issuing.Dispute.class); + classLookup.put( + "issuing.personalization_design", com.stripe.model.issuing.PersonalizationDesign.class); + classLookup.put("issuing.physical_bundle", com.stripe.model.issuing.PhysicalBundle.class); classLookup.put("issuing.transaction", com.stripe.model.issuing.Transaction.class); classLookup.put("radar.early_fraud_warning", com.stripe.model.radar.EarlyFraudWarning.class); diff --git a/src/main/java/com/stripe/model/Invoice.java b/src/main/java/com/stripe/model/Invoice.java index 4a808a870a7..34c6b414ce6 100644 --- a/src/main/java/com/stripe/model/Invoice.java +++ b/src/main/java/com/stripe/model/Invoice.java @@ -494,7 +494,17 @@ public class Invoice extends ApiResource implements HasId, MetadataStoreOne of {@code a4}, {@code auto}, or {@code letter}. + */ + @SerializedName("page_size") + String pageSize; + } + } + @Getter @Setter @EqualsAndHashCode(callSuper = false) @@ -2592,6 +2629,7 @@ public void setResponseGetter(StripeResponseGetter responseGetter) { trySetResponseGetter(paymentIntent, responseGetter); trySetResponseGetter(paymentSettings, responseGetter); trySetResponseGetter(quote, responseGetter); + trySetResponseGetter(rendering, responseGetter); trySetResponseGetter(renderingOptions, responseGetter); trySetResponseGetter(shippingCost, responseGetter); trySetResponseGetter(shippingDetails, responseGetter); diff --git a/src/main/java/com/stripe/model/Mandate.java b/src/main/java/com/stripe/model/Mandate.java index 0702384d3b2..0801e25e33a 100644 --- a/src/main/java/com/stripe/model/Mandate.java +++ b/src/main/java/com/stripe/model/Mandate.java @@ -17,7 +17,8 @@ import lombok.Setter; /** - * A Mandate is a record of the permission a customer has given you to debit their payment method. + * A Mandate is a record of the permission that your customer gives you to debit their payment + * method. */ @Getter @Setter @@ -49,7 +50,7 @@ public class Mandate extends ApiResource implements HasId { @SerializedName("object") String object; - /** The account (if any) for which the mandate is intended. */ + /** The account (if any) that the mandate is intended for. */ @SerializedName("on_behalf_of") String onBehalfOf; @@ -66,7 +67,7 @@ public class Mandate extends ApiResource implements HasId { SingleUse singleUse; /** - * The status of the mandate, which indicates whether it can be used to initiate a payment. + * The mandate status indicates whether or not you can use it to initiate a payment. * *

One of {@code active}, {@code inactive}, or {@code pending}. */ @@ -145,7 +146,7 @@ public static Mandate retrieve( @Setter @EqualsAndHashCode(callSuper = false) public static class CustomerAcceptance extends StripeObject { - /** The time at which the customer accepted the Mandate. */ + /** The time that the customer accepts the mandate. */ @SerializedName("accepted_at") Long acceptedAt; @@ -156,8 +157,10 @@ public static class CustomerAcceptance extends StripeObject { Online online; /** - * The type of customer acceptance information included with the Mandate. One of {@code online} - * or {@code offline}. + * The mandate includes the type of customer acceptance information, such as: {@code online} or + * {@code offline}. + * + *

One of {@code offline}, or {@code online}. */ @SerializedName("type") String type; @@ -171,11 +174,11 @@ public static class Offline extends StripeObject {} @Setter @EqualsAndHashCode(callSuper = false) public static class Online extends StripeObject { - /** The IP address from which the Mandate was accepted by the customer. */ + /** The customer accepts the mandate from this IP address. */ @SerializedName("ip_address") String ipAddress; - /** The user agent of the browser from which the Mandate was accepted by the customer. */ + /** The customer accepts the mandate using the user agent of the browser. */ @SerializedName("user_agent") String userAgent; } @@ -215,9 +218,9 @@ public static class PaymentMethodDetails extends StripeObject { SepaDebit sepaDebit; /** - * The type of the payment method associated with this mandate. An additional hash is included - * on {@code payment_method_details} with a name matching this value. It contains mandate - * information specific to the payment method. + * This mandate corresponds with a specific payment method type. The {@code + * payment_method_details} includes an additional hash with the same name and contains mandate + * information that's specific to that payment method. */ @SerializedName("type") String type; @@ -360,11 +363,11 @@ public static class UsBankAccount extends StripeObject {} @Setter @EqualsAndHashCode(callSuper = false) public static class SingleUse extends StripeObject { - /** On a single use mandate, the amount of the payment. */ + /** The amount of the payment on a single use mandate. */ @SerializedName("amount") Long amount; - /** On a single use mandate, the currency of the payment. */ + /** The currency of the payment on a single use mandate. */ @SerializedName("currency") String currency; } diff --git a/src/main/java/com/stripe/model/PaymentIntent.java b/src/main/java/com/stripe/model/PaymentIntent.java index 938adbded9f..14db0aa71ab 100644 --- a/src/main/java/com/stripe/model/PaymentIntent.java +++ b/src/main/java/com/stripe/model/PaymentIntent.java @@ -63,7 +63,7 @@ public class PaymentIntent extends ApiResource implements HasId, MetadataStore

key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a - * structured format. For more information, see the documentation. + * structured format. Learn more about storing + * information in metadata. */ @Getter(onMethod_ = {@Override}) @SerializedName("metadata") @@ -335,17 +336,17 @@ public class PaymentIntent extends ApiResource implements HasId, MetadataStore

use case for - * connected accounts for details. + * The data that automatically creates a Transfer after the payment finalizes. Learn more about + * the use case for connected + * accounts. */ @SerializedName("transfer_data") TransferData transferData; /** - * A string that identifies the resulting payment as part of a group. See the PaymentIntents use case for connected - * accounts for details. + * accounts. */ @SerializedName("transfer_group") String transferGroup; @@ -495,22 +496,22 @@ public void setSourceObject(PaymentSource expandableObject) { this.source = new ExpandableField(expandableObject.getId(), expandableObject); } - /** Manually reconcile the remaining amount for a customer_balance PaymentIntent. */ + /** Manually reconcile the remaining amount for a {@code customer_balance} PaymentIntent. */ public PaymentIntent applyCustomerBalance() throws StripeException { return applyCustomerBalance((Map) null, (RequestOptions) null); } - /** Manually reconcile the remaining amount for a customer_balance PaymentIntent. */ + /** Manually reconcile the remaining amount for a {@code customer_balance} PaymentIntent. */ public PaymentIntent applyCustomerBalance(RequestOptions options) throws StripeException { return applyCustomerBalance((Map) null, options); } - /** Manually reconcile the remaining amount for a customer_balance PaymentIntent. */ + /** Manually reconcile the remaining amount for a {@code customer_balance} PaymentIntent. */ public PaymentIntent applyCustomerBalance(Map params) throws StripeException { return applyCustomerBalance(params, (RequestOptions) null); } - /** Manually reconcile the remaining amount for a customer_balance PaymentIntent. */ + /** Manually reconcile the remaining amount for a {@code customer_balance} PaymentIntent. */ public PaymentIntent applyCustomerBalance(Map params, RequestOptions options) throws StripeException { String path = @@ -527,13 +528,13 @@ public PaymentIntent applyCustomerBalance(Map params, RequestOpt ApiMode.V1); } - /** Manually reconcile the remaining amount for a customer_balance PaymentIntent. */ + /** Manually reconcile the remaining amount for a {@code customer_balance} PaymentIntent. */ public PaymentIntent applyCustomerBalance(PaymentIntentApplyCustomerBalanceParams params) throws StripeException { return applyCustomerBalance(params, (RequestOptions) null); } - /** Manually reconcile the remaining amount for a customer_balance PaymentIntent. */ + /** Manually reconcile the remaining amount for a {@code customer_balance} PaymentIntent. */ public PaymentIntent applyCustomerBalance( PaymentIntentApplyCustomerBalanceParams params, RequestOptions options) throws StripeException { @@ -553,16 +554,16 @@ public PaymentIntent applyCustomerBalance( } /** - * A PaymentIntent object can be canceled when it is in one of these statuses: {@code + * You can cancel a PaymentIntent object when it’s in one of these statuses: {@code * requires_payment_method}, {@code requires_capture}, {@code requires_confirmation}, {@code * requires_action} or, in rare cases, * {@code processing}. * - *

Once canceled, no additional charges will be made by the PaymentIntent and any operations on - * the PaymentIntent will fail with an error. For PaymentIntents with a {@code status} of {@code - * requires_capture}, the remaining {@code amount_capturable} will automatically be refunded. + *

After it’s canceled, no additional charges are made by the PaymentIntent and any operations + * on the PaymentIntent fail with an error. For PaymentIntents with a {@code status} of {@code + * requires_capture}, the remaining {@code amount_capturable} is automatically refunded. * - *

You cannot cancel the PaymentIntent for a Checkout Session. You can’t cancel the PaymentIntent for a Checkout Session. Expire the Checkout Session * instead. */ @@ -571,16 +572,16 @@ public PaymentIntent cancel() throws StripeException { } /** - * A PaymentIntent object can be canceled when it is in one of these statuses: {@code + * You can cancel a PaymentIntent object when it’s in one of these statuses: {@code * requires_payment_method}, {@code requires_capture}, {@code requires_confirmation}, {@code * requires_action} or, in rare cases, * {@code processing}. * - *

Once canceled, no additional charges will be made by the PaymentIntent and any operations on - * the PaymentIntent will fail with an error. For PaymentIntents with a {@code status} of {@code - * requires_capture}, the remaining {@code amount_capturable} will automatically be refunded. + *

After it’s canceled, no additional charges are made by the PaymentIntent and any operations + * on the PaymentIntent fail with an error. For PaymentIntents with a {@code status} of {@code + * requires_capture}, the remaining {@code amount_capturable} is automatically refunded. * - *

You cannot cancel the PaymentIntent for a Checkout Session. You can’t cancel the PaymentIntent for a Checkout Session. Expire the Checkout Session * instead. */ @@ -589,16 +590,16 @@ public PaymentIntent cancel(RequestOptions options) throws StripeException { } /** - * A PaymentIntent object can be canceled when it is in one of these statuses: {@code + * You can cancel a PaymentIntent object when it’s in one of these statuses: {@code * requires_payment_method}, {@code requires_capture}, {@code requires_confirmation}, {@code * requires_action} or, in rare cases, * {@code processing}. * - *

Once canceled, no additional charges will be made by the PaymentIntent and any operations on - * the PaymentIntent will fail with an error. For PaymentIntents with a {@code status} of {@code - * requires_capture}, the remaining {@code amount_capturable} will automatically be refunded. + *

After it’s canceled, no additional charges are made by the PaymentIntent and any operations + * on the PaymentIntent fail with an error. For PaymentIntents with a {@code status} of {@code + * requires_capture}, the remaining {@code amount_capturable} is automatically refunded. * - *

You cannot cancel the PaymentIntent for a Checkout Session. You can’t cancel the PaymentIntent for a Checkout Session. Expire the Checkout Session * instead. */ @@ -607,16 +608,16 @@ public PaymentIntent cancel(Map params) throws StripeException { } /** - * A PaymentIntent object can be canceled when it is in one of these statuses: {@code + * You can cancel a PaymentIntent object when it’s in one of these statuses: {@code * requires_payment_method}, {@code requires_capture}, {@code requires_confirmation}, {@code * requires_action} or, in rare cases, * {@code processing}. * - *

Once canceled, no additional charges will be made by the PaymentIntent and any operations on - * the PaymentIntent will fail with an error. For PaymentIntents with a {@code status} of {@code - * requires_capture}, the remaining {@code amount_capturable} will automatically be refunded. + *

After it’s canceled, no additional charges are made by the PaymentIntent and any operations + * on the PaymentIntent fail with an error. For PaymentIntents with a {@code status} of {@code + * requires_capture}, the remaining {@code amount_capturable} is automatically refunded. * - *

You cannot cancel the PaymentIntent for a Checkout Session. You can’t cancel the PaymentIntent for a Checkout Session. Expire the Checkout Session * instead. */ @@ -636,16 +637,16 @@ public PaymentIntent cancel(Map params, RequestOptions options) } /** - * A PaymentIntent object can be canceled when it is in one of these statuses: {@code + * You can cancel a PaymentIntent object when it’s in one of these statuses: {@code * requires_payment_method}, {@code requires_capture}, {@code requires_confirmation}, {@code * requires_action} or, in rare cases, * {@code processing}. * - *

Once canceled, no additional charges will be made by the PaymentIntent and any operations on - * the PaymentIntent will fail with an error. For PaymentIntents with a {@code status} of {@code - * requires_capture}, the remaining {@code amount_capturable} will automatically be refunded. + *

After it’s canceled, no additional charges are made by the PaymentIntent and any operations + * on the PaymentIntent fail with an error. For PaymentIntents with a {@code status} of {@code + * requires_capture}, the remaining {@code amount_capturable} is automatically refunded. * - *

You cannot cancel the PaymentIntent for a Checkout Session. You can’t cancel the PaymentIntent for a Checkout Session. Expire the Checkout Session * instead. */ @@ -654,16 +655,16 @@ public PaymentIntent cancel(PaymentIntentCancelParams params) throws StripeExcep } /** - * A PaymentIntent object can be canceled when it is in one of these statuses: {@code + * You can cancel a PaymentIntent object when it’s in one of these statuses: {@code * requires_payment_method}, {@code requires_capture}, {@code requires_confirmation}, {@code * requires_action} or, in rare cases, * {@code processing}. * - *

Once canceled, no additional charges will be made by the PaymentIntent and any operations on - * the PaymentIntent will fail with an error. For PaymentIntents with a {@code status} of {@code - * requires_capture}, the remaining {@code amount_capturable} will automatically be refunded. + *

After it’s canceled, no additional charges are made by the PaymentIntent and any operations + * on the PaymentIntent fail with an error. For PaymentIntents with a {@code status} of {@code + * requires_capture}, the remaining {@code amount_capturable} is automatically refunded. * - *

You cannot cancel the PaymentIntent for a Checkout Session. You can’t cancel the PaymentIntent for a Checkout Session. Expire the Checkout Session * instead. */ @@ -687,8 +688,8 @@ public PaymentIntent cancel(PaymentIntentCancelParams params, RequestOptions opt * Capture the funds of an existing uncaptured PaymentIntent when its status is {@code * requires_capture}. * - *

Uncaptured PaymentIntents will be canceled a set number of days after they are created (7 by - * default). + *

Uncaptured PaymentIntents are cancelled a set number of days (7 by default) after their + * creation. * *

Learn more about separate * authorization and capture. @@ -701,8 +702,8 @@ public PaymentIntent capture() throws StripeException { * Capture the funds of an existing uncaptured PaymentIntent when its status is {@code * requires_capture}. * - *

Uncaptured PaymentIntents will be canceled a set number of days after they are created (7 by - * default). + *

Uncaptured PaymentIntents are cancelled a set number of days (7 by default) after their + * creation. * *

Learn more about separate * authorization and capture. @@ -715,8 +716,8 @@ public PaymentIntent capture(RequestOptions options) throws StripeException { * Capture the funds of an existing uncaptured PaymentIntent when its status is {@code * requires_capture}. * - *

Uncaptured PaymentIntents will be canceled a set number of days after they are created (7 by - * default). + *

Uncaptured PaymentIntents are cancelled a set number of days (7 by default) after their + * creation. * *

Learn more about separate * authorization and capture. @@ -729,8 +730,8 @@ public PaymentIntent capture(Map params) throws StripeException * Capture the funds of an existing uncaptured PaymentIntent when its status is {@code * requires_capture}. * - *

Uncaptured PaymentIntents will be canceled a set number of days after they are created (7 by - * default). + *

Uncaptured PaymentIntents are cancelled a set number of days (7 by default) after their + * creation. * *

Learn more about separate * authorization and capture. @@ -754,8 +755,8 @@ public PaymentIntent capture(Map params, RequestOptions options) * Capture the funds of an existing uncaptured PaymentIntent when its status is {@code * requires_capture}. * - *

Uncaptured PaymentIntents will be canceled a set number of days after they are created (7 by - * default). + *

Uncaptured PaymentIntents are cancelled a set number of days (7 by default) after their + * creation. * *

Learn more about separate * authorization and capture. @@ -768,8 +769,8 @@ public PaymentIntent capture(PaymentIntentCaptureParams params) throws StripeExc * Capture the funds of an existing uncaptured PaymentIntent when its status is {@code * requires_capture}. * - *

Uncaptured PaymentIntents will be canceled a set number of days after they are created (7 by - * default). + *

Uncaptured PaymentIntents are cancelled a set number of days (7 by default) after their + * creation. * *

Learn more about separate * authorization and capture. @@ -974,13 +975,13 @@ public PaymentIntent confirm(PaymentIntentConfirmParams params, RequestOptions o * *

After the PaymentIntent is created, attach a payment method and confirm to continue the payment. - * You can read more about the different payment flows available via the Payment Intents API here. + * Learn more about the available + * payment flows with the Payment Intents API. * - *

When {@code confirm=true} is used during creation, it is equivalent to creating and - * confirming the PaymentIntent in the same call. You may use any parameters available in the confirm API when {@code - * confirm=true} is supplied. + *

When you use {@code confirm=true} during creation, it’s equivalent to creating and + * confirming the PaymentIntent in the same call. You can use any parameters available in the confirm API when you supply + * {@code confirm=true}. */ public static PaymentIntent create(Map params) throws StripeException { return create(params, (RequestOptions) null); @@ -991,13 +992,13 @@ public static PaymentIntent create(Map params) throws StripeExce * *

After the PaymentIntent is created, attach a payment method and confirm to continue the payment. - * You can read more about the different payment flows available via the Payment Intents API here. + * Learn more about the available + * payment flows with the Payment Intents API. * - *

When {@code confirm=true} is used during creation, it is equivalent to creating and - * confirming the PaymentIntent in the same call. You may use any parameters available in the confirm API when {@code - * confirm=true} is supplied. + *

When you use {@code confirm=true} during creation, it’s equivalent to creating and + * confirming the PaymentIntent in the same call. You can use any parameters available in the confirm API when you supply + * {@code confirm=true}. */ public static PaymentIntent create(Map params, RequestOptions options) throws StripeException { @@ -1018,13 +1019,13 @@ public static PaymentIntent create(Map params, RequestOptions op * *

After the PaymentIntent is created, attach a payment method and confirm to continue the payment. - * You can read more about the different payment flows available via the Payment Intents API here. + * Learn more about the available + * payment flows with the Payment Intents API. * - *

When {@code confirm=true} is used during creation, it is equivalent to creating and - * confirming the PaymentIntent in the same call. You may use any parameters available in the confirm API when {@code - * confirm=true} is supplied. + *

When you use {@code confirm=true} during creation, it’s equivalent to creating and + * confirming the PaymentIntent in the same call. You can use any parameters available in the confirm API when you supply + * {@code confirm=true}. */ public static PaymentIntent create(PaymentIntentCreateParams params) throws StripeException { return create(params, (RequestOptions) null); @@ -1035,13 +1036,13 @@ public static PaymentIntent create(PaymentIntentCreateParams params) throws Stri * *

After the PaymentIntent is created, attach a payment method and confirm to continue the payment. - * You can read more about the different payment flows available via the Payment Intents API here. + * Learn more about the available + * payment flows with the Payment Intents API. * - *

When {@code confirm=true} is used during creation, it is equivalent to creating and - * confirming the PaymentIntent in the same call. You may use any parameters available in the confirm API when {@code - * confirm=true} is supplied. + *

When you use {@code confirm=true} during creation, it’s equivalent to creating and + * confirming the PaymentIntent in the same call. You can use any parameters available in the confirm API when you supply + * {@code confirm=true}. */ public static PaymentIntent create(PaymentIntentCreateParams params, RequestOptions options) throws StripeException { @@ -1066,20 +1067,20 @@ public static PaymentIntent create(PaymentIntentCreateParams params, RequestOpti * must be {@code true}. * *

Incremental authorizations attempt to increase the authorized amount on your customer’s card - * to the new, higher {@code amount} provided. As with the initial authorization, incremental - * authorizations may be declined. A single PaymentIntent can call this endpoint multiple times to + * to the new, higher {@code amount} provided. Similar to the initial authorization, incremental + * authorizations can be declined. A single PaymentIntent can call this endpoint multiple times to * further increase the authorized amount. * - *

If the incremental authorization succeeds, the PaymentIntent object is returned with the - * updated If the incremental authorization succeeds, the PaymentIntent object returns with the updated + * amount. * If the incremental authorization fails, a card_declined error is returned, - * and no fields on the PaymentIntent or Charge are updated. The PaymentIntent object remains + * href="https://stripe.com/docs/error-codes#card-declined">card_declined error returns, and + * no other fields on the PaymentIntent or Charge update. The PaymentIntent object remains * capturable for the previously authorized amount. * *

Each PaymentIntent can have a maximum of 10 incremental authorization attempts, including - * declines. Once captured, a PaymentIntent can no longer be incremented. + * declines. After it’s captured, a PaymentIntent can no longer be incremented. * *

Learn more about incremental @@ -1097,20 +1098,20 @@ public PaymentIntent incrementAuthorization(Map params) throws S * must be {@code true}. * *

Incremental authorizations attempt to increase the authorized amount on your customer’s card - * to the new, higher {@code amount} provided. As with the initial authorization, incremental - * authorizations may be declined. A single PaymentIntent can call this endpoint multiple times to + * to the new, higher {@code amount} provided. Similar to the initial authorization, incremental + * authorizations can be declined. A single PaymentIntent can call this endpoint multiple times to * further increase the authorized amount. * - *

If the incremental authorization succeeds, the PaymentIntent object is returned with the - * updated If the incremental authorization succeeds, the PaymentIntent object returns with the updated + * amount. * If the incremental authorization fails, a card_declined error is returned, - * and no fields on the PaymentIntent or Charge are updated. The PaymentIntent object remains + * href="https://stripe.com/docs/error-codes#card-declined">card_declined error returns, and + * no other fields on the PaymentIntent or Charge update. The PaymentIntent object remains * capturable for the previously authorized amount. * *

Each PaymentIntent can have a maximum of 10 incremental authorization attempts, including - * declines. Once captured, a PaymentIntent can no longer be incremented. + * declines. After it’s captured, a PaymentIntent can no longer be incremented. * *

Learn more about incremental @@ -1141,20 +1142,20 @@ public PaymentIntent incrementAuthorization(Map params, RequestO * must be {@code true}. * *

Incremental authorizations attempt to increase the authorized amount on your customer’s card - * to the new, higher {@code amount} provided. As with the initial authorization, incremental - * authorizations may be declined. A single PaymentIntent can call this endpoint multiple times to + * to the new, higher {@code amount} provided. Similar to the initial authorization, incremental + * authorizations can be declined. A single PaymentIntent can call this endpoint multiple times to * further increase the authorized amount. * - *

If the incremental authorization succeeds, the PaymentIntent object is returned with the - * updated If the incremental authorization succeeds, the PaymentIntent object returns with the updated + * amount. * If the incremental authorization fails, a card_declined error is returned, - * and no fields on the PaymentIntent or Charge are updated. The PaymentIntent object remains + * href="https://stripe.com/docs/error-codes#card-declined">card_declined error returns, and + * no other fields on the PaymentIntent or Charge update. The PaymentIntent object remains * capturable for the previously authorized amount. * *

Each PaymentIntent can have a maximum of 10 incremental authorization attempts, including - * declines. Once captured, a PaymentIntent can no longer be incremented. + * declines. After it’s captured, a PaymentIntent can no longer be incremented. * *

Learn more about incremental @@ -1173,20 +1174,20 @@ public PaymentIntent incrementAuthorization(PaymentIntentIncrementAuthorizationP * must be {@code true}. * *

Incremental authorizations attempt to increase the authorized amount on your customer’s card - * to the new, higher {@code amount} provided. As with the initial authorization, incremental - * authorizations may be declined. A single PaymentIntent can call this endpoint multiple times to + * to the new, higher {@code amount} provided. Similar to the initial authorization, incremental + * authorizations can be declined. A single PaymentIntent can call this endpoint multiple times to * further increase the authorized amount. * - *

If the incremental authorization succeeds, the PaymentIntent object is returned with the - * updated If the incremental authorization succeeds, the PaymentIntent object returns with the updated + * amount. * If the incremental authorization fails, a card_declined error is returned, - * and no fields on the PaymentIntent or Charge are updated. The PaymentIntent object remains + * href="https://stripe.com/docs/error-codes#card-declined">card_declined error returns, and + * no other fields on the PaymentIntent or Charge update. The PaymentIntent object remains * capturable for the previously authorized amount. * *

Each PaymentIntent can have a maximum of 10 incremental authorization attempts, including - * declines. Once captured, a PaymentIntent can no longer be incremented. + * declines. After it’s captured, a PaymentIntent can no longer be incremented. * *

Learn more about incremental @@ -2556,10 +2557,9 @@ public static class AfterpayClearpay extends StripeObject { String captureMethod; /** - * Order identifier shown to the customer in Afterpay’s online portal. We recommend using a - * value that helps you answer any questions a customer might have about the payment. The - * identifier is limited to 128 characters and may contain only letters, digits, underscores, - * backslashes and dashes. + * An internal identifier or reference that this payment corresponds to. You must limit the + * identifier to 128 characters, and it can only contain letters, numbers, underscores, + * backslashes, and dashes. This field differs from the statement descriptor and item name. */ @SerializedName("reference") String reference; @@ -3852,8 +3852,8 @@ public static class TransferData extends StripeObject { Long amount; /** - * The account (if any) the payment will be attributed to for tax reporting, and where funds - * from the payment will be transferred to upon payment success. + * The account (if any) that the payment is attributed to for tax reporting, and where funds + * from the payment are transferred to after payment success. */ @SerializedName("destination") @Getter(lombok.AccessLevel.NONE) diff --git a/src/main/java/com/stripe/model/Payout.java b/src/main/java/com/stripe/model/Payout.java index 17a969612be..d8c4eb3edad 100644 --- a/src/main/java/com/stripe/model/Payout.java +++ b/src/main/java/com/stripe/model/Payout.java @@ -24,7 +24,7 @@ * A {@code Payout} object is created when you receive funds from Stripe, or when you initiate a * payout to either a bank account or debit card of a connected Stripe account. You - * can retrieve individual payouts, as well as list all payouts. Payouts are made on varying schedules, depending on * your country and industry. * @@ -35,23 +35,22 @@ @EqualsAndHashCode(callSuper = false) public class Payout extends ApiResource implements MetadataStore, BalanceTransactionSource { /** - * Amount (in cents (or local equivalent)) to be transferred to your bank account or debit card. + * The amount (in cents (or local equivalent)) that transfers to your bank account or debit card. */ @SerializedName("amount") Long amount; /** - * Date the payout is expected to arrive in the bank. This factors in delays like weekends or bank - * holidays. + * Date that you can expect the payout to arrive in the bank. This factors in delays to account + * for weekends or bank holidays. */ @SerializedName("arrival_date") Long arrivalDate; /** - * Returns {@code true} if the payout was created by an automated payout schedule, and - * {@code false} if it was requested - * manually. + * Returns {@code true} if the payout is created by an automated payout schedule and {@code + * false} if it's requested manually. */ @SerializedName("automatic") Boolean automatic; @@ -79,16 +78,15 @@ public class Payout extends ApiResource implements MetadataStore, Balanc @SerializedName("description") String description; - /** ID of the bank account or card the payout was sent to. */ + /** ID of the bank account or card the payout is sent to. */ @SerializedName("destination") @Getter(lombok.AccessLevel.NONE) @Setter(lombok.AccessLevel.NONE) ExpandableField destination; /** - * If the payout failed or was canceled, this will be the ID of the balance transaction that - * reversed the initial balance transaction, and puts the funds from the failed payout back in - * your balance. + * If the payout fails or cancels, this is the ID of the balance transaction that reverses the + * initial balance transaction and returns the funds from the failed payout back in your balance. */ @SerializedName("failure_balance_transaction") @Getter(lombok.AccessLevel.NONE) @@ -96,14 +94,13 @@ public class Payout extends ApiResource implements MetadataStore, Balanc ExpandableField failureBalanceTransaction; /** - * Error code explaining reason for payout failure if available. See Types of payout failures for a list of - * failure codes. + * Error code that provides a reason for a payout failure, if available. View our list of failure codes. */ @SerializedName("failure_code") String failureCode; - /** Message to user further explaining reason for payout failure if available. */ + /** Message that provides the reason for a payout failure, if available. */ @SerializedName("failure_message") String failureMessage; @@ -130,9 +127,9 @@ public class Payout extends ApiResource implements MetadataStore, Balanc /** * The method used to send this payout, which can be {@code standard} or {@code instant}. {@code - * instant} is supported for payouts to debit cards and bank accounts in certain countries. (See - * Bank support for Instant - * Payouts for more information.) + * instant} is supported for payouts to debit cards and bank accounts in certain countries. Learn + * more about bank support for + * Instant Payouts. */ @SerializedName("method") String method; @@ -152,39 +149,38 @@ public class Payout extends ApiResource implements MetadataStore, Balanc ExpandableField originalPayout; /** - * If {@code completed}, the Balance - * Transactions API may be used to list all Balance Transactions that were paid out in this - * payout. + * Transactions API to list all balance transactions that are paid out in this payout. * *

One of {@code completed}, {@code in_progress}, or {@code not_applicable}. */ @SerializedName("reconciliation_status") String reconciliationStatus; - /** If the payout was reversed, this is the ID of the payout that reverses this payout. */ + /** If the payout reverses, this is the ID of the payout that reverses this payout. */ @SerializedName("reversed_by") @Getter(lombok.AccessLevel.NONE) @Setter(lombok.AccessLevel.NONE) ExpandableField reversedBy; /** - * The source balance this payout came from. One of {@code card}, {@code fpx}, or {@code - * bank_account}. + * The source balance this payout came from, which can be one of the following: {@code card}, + * {@code fpx}, or {@code bank_account}. */ @SerializedName("source_type") String sourceType; - /** Extra information about a payout to be displayed on the user's bank statement. */ + /** Extra information about a payout that displays on the user's bank statement. */ @SerializedName("statement_descriptor") String statementDescriptor; /** * Current status of the payout: {@code paid}, {@code pending}, {@code in_transit}, {@code - * canceled} or {@code failed}. A payout is {@code pending} until it is submitted to the bank, - * when it becomes {@code in_transit}. The status then changes to {@code paid} if the transaction - * goes through, or to {@code failed} or {@code canceled} (within 5 business days). Some failed - * payouts may initially show as {@code paid} but then change to {@code failed}. + * canceled} or {@code failed}. A payout is {@code pending} until it's submitted to the bank, when + * it becomes {@code in_transit}. The status changes to {@code paid} if the transaction succeeds, + * or to {@code failed} or {@code canceled} (within 5 business days). Some payouts that fail might + * initially show as {@code paid}, then change to {@code failed}. */ @SerializedName("status") String status; @@ -290,32 +286,32 @@ public void setReversedByObject(Payout expandableObject) { } /** - * A previously created payout can be canceled if it has not yet been paid out. Funds will be - * refunded to your available balance. You may not cancel automatic Stripe payouts. + * You can cancel a previously created payout if it hasn’t been paid out yet. Stripe refunds the + * funds to your available balance. You can’t cancel automatic Stripe payouts. */ public Payout cancel() throws StripeException { return cancel((Map) null, (RequestOptions) null); } /** - * A previously created payout can be canceled if it has not yet been paid out. Funds will be - * refunded to your available balance. You may not cancel automatic Stripe payouts. + * You can cancel a previously created payout if it hasn’t been paid out yet. Stripe refunds the + * funds to your available balance. You can’t cancel automatic Stripe payouts. */ public Payout cancel(RequestOptions options) throws StripeException { return cancel((Map) null, options); } /** - * A previously created payout can be canceled if it has not yet been paid out. Funds will be - * refunded to your available balance. You may not cancel automatic Stripe payouts. + * You can cancel a previously created payout if it hasn’t been paid out yet. Stripe refunds the + * funds to your available balance. You can’t cancel automatic Stripe payouts. */ public Payout cancel(Map params) throws StripeException { return cancel(params, (RequestOptions) null); } /** - * A previously created payout can be canceled if it has not yet been paid out. Funds will be - * refunded to your available balance. You may not cancel automatic Stripe payouts. + * You can cancel a previously created payout if it hasn’t been paid out yet. Stripe refunds the + * funds to your available balance. You can’t cancel automatic Stripe payouts. */ public Payout cancel(Map params, RequestOptions options) throws StripeException { String path = String.format("/v1/payouts/%s/cancel", ApiResource.urlEncodeId(this.getId())); @@ -331,16 +327,16 @@ public Payout cancel(Map params, RequestOptions options) throws } /** - * A previously created payout can be canceled if it has not yet been paid out. Funds will be - * refunded to your available balance. You may not cancel automatic Stripe payouts. + * You can cancel a previously created payout if it hasn’t been paid out yet. Stripe refunds the + * funds to your available balance. You can’t cancel automatic Stripe payouts. */ public Payout cancel(PayoutCancelParams params) throws StripeException { return cancel(params, (RequestOptions) null); } /** - * A previously created payout can be canceled if it has not yet been paid out. Funds will be - * refunded to your available balance. You may not cancel automatic Stripe payouts. + * You can cancel a previously created payout if it hasn’t been paid out yet. Stripe refunds the + * funds to your available balance. You can’t cancel automatic Stripe payouts. */ public Payout cancel(PayoutCancelParams params, RequestOptions options) throws StripeException { String path = String.format("/v1/payouts/%s/cancel", ApiResource.urlEncodeId(this.getId())); @@ -357,15 +353,15 @@ public Payout cancel(PayoutCancelParams params, RequestOptions options) throws S } /** - * To send funds to your own bank account, you create a new payout object. Your Stripe balance must be able to cover the payout - * amount, or you’ll receive an “Insufficient Funds” error. + * To send funds to your own bank account, create a new payout object. Your Stripe balance must cover the payout amount. If + * it doesn’t, you receive an “Insufficient Funds” error. * - *

If your API key is in test mode, money won’t actually be sent, though everything else will - * occur as if in live mode. + *

If your API key is in test mode, money won’t actually be sent, though every other action + * occurs as if you’re in live mode. * - *

If you are creating a manual payout on a Stripe account that uses multiple payment source - * types, you’ll need to specify the source type balance that the payout should draw from. The If you create a manual payout on a Stripe account that uses multiple payment source types, + * you need to specify the source type balance that the payout draws from. The balance object details available and * pending amounts by source type. */ @@ -374,15 +370,15 @@ public static Payout create(Map params) throws StripeException { } /** - * To send funds to your own bank account, you create a new payout object. Your Stripe balance must be able to cover the payout - * amount, or you’ll receive an “Insufficient Funds” error. + * To send funds to your own bank account, create a new payout object. Your Stripe balance must cover the payout amount. If + * it doesn’t, you receive an “Insufficient Funds” error. * - *

If your API key is in test mode, money won’t actually be sent, though everything else will - * occur as if in live mode. + *

If your API key is in test mode, money won’t actually be sent, though every other action + * occurs as if you’re in live mode. * - *

If you are creating a manual payout on a Stripe account that uses multiple payment source - * types, you’ll need to specify the source type balance that the payout should draw from. The If you create a manual payout on a Stripe account that uses multiple payment source types, + * you need to specify the source type balance that the payout draws from. The balance object details available and * pending amounts by source type. */ @@ -401,15 +397,15 @@ public static Payout create(Map params, RequestOptions options) } /** - * To send funds to your own bank account, you create a new payout object. Your Stripe balance must be able to cover the payout - * amount, or you’ll receive an “Insufficient Funds” error. + * To send funds to your own bank account, create a new payout object. Your Stripe balance must cover the payout amount. If + * it doesn’t, you receive an “Insufficient Funds” error. * - *

If your API key is in test mode, money won’t actually be sent, though everything else will - * occur as if in live mode. + *

If your API key is in test mode, money won’t actually be sent, though every other action + * occurs as if you’re in live mode. * - *

If you are creating a manual payout on a Stripe account that uses multiple payment source - * types, you’ll need to specify the source type balance that the payout should draw from. The If you create a manual payout on a Stripe account that uses multiple payment source types, + * you need to specify the source type balance that the payout draws from. The balance object details available and * pending amounts by source type. */ @@ -418,15 +414,15 @@ public static Payout create(PayoutCreateParams params) throws StripeException { } /** - * To send funds to your own bank account, you create a new payout object. Your Stripe balance must be able to cover the payout - * amount, or you’ll receive an “Insufficient Funds” error. + * To send funds to your own bank account, create a new payout object. Your Stripe balance must cover the payout amount. If + * it doesn’t, you receive an “Insufficient Funds” error. * - *

If your API key is in test mode, money won’t actually be sent, though everything else will - * occur as if in live mode. + *

If your API key is in test mode, money won’t actually be sent, though every other action + * occurs as if you’re in live mode. * - *

If you are creating a manual payout on a Stripe account that uses multiple payment source - * types, you’ll need to specify the source type balance that the payout should draw from. The If you create a manual payout on a Stripe account that uses multiple payment source types, + * you need to specify the source type balance that the payout draws from. The balance object details available and * pending amounts by source type. */ @@ -446,18 +442,18 @@ public static Payout create(PayoutCreateParams params, RequestOptions options) } /** - * Returns a list of existing payouts sent to third-party bank accounts or that Stripe has sent - * you. The payouts are returned in sorted order, with the most recently created payouts appearing - * first. + * Returns a list of existing payouts sent to third-party bank accounts or payouts that Stripe + * sent to you. The payouts return in sorted order, with the most recently created payouts + * appearing first. */ public static PayoutCollection list(Map params) throws StripeException { return list(params, (RequestOptions) null); } /** - * Returns a list of existing payouts sent to third-party bank accounts or that Stripe has sent - * you. The payouts are returned in sorted order, with the most recently created payouts appearing - * first. + * Returns a list of existing payouts sent to third-party bank accounts or payouts that Stripe + * sent to you. The payouts return in sorted order, with the most recently created payouts + * appearing first. */ public static PayoutCollection list(Map params, RequestOptions options) throws StripeException { @@ -474,18 +470,18 @@ public static PayoutCollection list(Map params, RequestOptions o } /** - * Returns a list of existing payouts sent to third-party bank accounts or that Stripe has sent - * you. The payouts are returned in sorted order, with the most recently created payouts appearing - * first. + * Returns a list of existing payouts sent to third-party bank accounts or payouts that Stripe + * sent to you. The payouts return in sorted order, with the most recently created payouts + * appearing first. */ public static PayoutCollection list(PayoutListParams params) throws StripeException { return list(params, (RequestOptions) null); } /** - * Returns a list of existing payouts sent to third-party bank accounts or that Stripe has sent - * you. The payouts are returned in sorted order, with the most recently created payouts appearing - * first. + * Returns a list of existing payouts sent to third-party bank accounts or payouts that Stripe + * sent to you. The payouts return in sorted order, with the most recently created payouts + * appearing first. */ public static PayoutCollection list(PayoutListParams params, RequestOptions options) throws StripeException { @@ -504,8 +500,7 @@ public static PayoutCollection list(PayoutListParams params, RequestOptions opti /** * Retrieves the details of an existing payout. Supply the unique payout ID from either a payout - * creation request or the payout list, and Stripe will return the corresponding payout - * information. + * creation request or the payout list. Stripe returns the corresponding payout information. */ public static Payout retrieve(String payout) throws StripeException { return retrieve(payout, (Map) null, (RequestOptions) null); @@ -513,8 +508,7 @@ public static Payout retrieve(String payout) throws StripeException { /** * Retrieves the details of an existing payout. Supply the unique payout ID from either a payout - * creation request or the payout list, and Stripe will return the corresponding payout - * information. + * creation request or the payout list. Stripe returns the corresponding payout information. */ public static Payout retrieve(String payout, RequestOptions options) throws StripeException { return retrieve(payout, (Map) null, options); @@ -522,8 +516,7 @@ public static Payout retrieve(String payout, RequestOptions options) throws Stri /** * Retrieves the details of an existing payout. Supply the unique payout ID from either a payout - * creation request or the payout list, and Stripe will return the corresponding payout - * information. + * creation request or the payout list. Stripe returns the corresponding payout information. */ public static Payout retrieve(String payout, Map params, RequestOptions options) throws StripeException { @@ -541,8 +534,7 @@ public static Payout retrieve(String payout, Map params, Request /** * Retrieves the details of an existing payout. Supply the unique payout ID from either a payout - * creation request or the payout list, and Stripe will return the corresponding payout - * information. + * creation request or the payout list. Stripe returns the corresponding payout information. */ public static Payout retrieve(String payout, PayoutRetrieveParams params, RequestOptions options) throws StripeException { @@ -560,52 +552,52 @@ public static Payout retrieve(String payout, PayoutRetrieveParams params, Reques } /** - * Reverses a payout by debiting the destination bank account. Only payouts for connected accounts - * to US bank accounts may be reversed at this time. If the payout is in the {@code pending} - * status, {@code /v1/payouts/:id/cancel} should be used instead. + * Reverses a payout by debiting the destination bank account. At this time, you can only reverse + * payouts for connected accounts to US bank accounts. If the payout is in the {@code pending} + * status, use {@code /v1/payouts/:id/cancel} instead. * - *

By requesting a reversal via {@code /v1/payouts/:id/reverse}, you confirm that the - * authorized signatory of the selected bank account has authorized the debit on the bank account - * and that no other authorization is required. + *

By requesting a reversal through {@code /v1/payouts/:id/reverse}, you confirm that the + * authorized signatory of the selected bank account authorizes the debit on the bank account and + * that no other authorization is required. */ public Payout reverse() throws StripeException { return reverse((Map) null, (RequestOptions) null); } /** - * Reverses a payout by debiting the destination bank account. Only payouts for connected accounts - * to US bank accounts may be reversed at this time. If the payout is in the {@code pending} - * status, {@code /v1/payouts/:id/cancel} should be used instead. + * Reverses a payout by debiting the destination bank account. At this time, you can only reverse + * payouts for connected accounts to US bank accounts. If the payout is in the {@code pending} + * status, use {@code /v1/payouts/:id/cancel} instead. * - *

By requesting a reversal via {@code /v1/payouts/:id/reverse}, you confirm that the - * authorized signatory of the selected bank account has authorized the debit on the bank account - * and that no other authorization is required. + *

By requesting a reversal through {@code /v1/payouts/:id/reverse}, you confirm that the + * authorized signatory of the selected bank account authorizes the debit on the bank account and + * that no other authorization is required. */ public Payout reverse(RequestOptions options) throws StripeException { return reverse((Map) null, options); } /** - * Reverses a payout by debiting the destination bank account. Only payouts for connected accounts - * to US bank accounts may be reversed at this time. If the payout is in the {@code pending} - * status, {@code /v1/payouts/:id/cancel} should be used instead. + * Reverses a payout by debiting the destination bank account. At this time, you can only reverse + * payouts for connected accounts to US bank accounts. If the payout is in the {@code pending} + * status, use {@code /v1/payouts/:id/cancel} instead. * - *

By requesting a reversal via {@code /v1/payouts/:id/reverse}, you confirm that the - * authorized signatory of the selected bank account has authorized the debit on the bank account - * and that no other authorization is required. + *

By requesting a reversal through {@code /v1/payouts/:id/reverse}, you confirm that the + * authorized signatory of the selected bank account authorizes the debit on the bank account and + * that no other authorization is required. */ public Payout reverse(Map params) throws StripeException { return reverse(params, (RequestOptions) null); } /** - * Reverses a payout by debiting the destination bank account. Only payouts for connected accounts - * to US bank accounts may be reversed at this time. If the payout is in the {@code pending} - * status, {@code /v1/payouts/:id/cancel} should be used instead. + * Reverses a payout by debiting the destination bank account. At this time, you can only reverse + * payouts for connected accounts to US bank accounts. If the payout is in the {@code pending} + * status, use {@code /v1/payouts/:id/cancel} instead. * - *

By requesting a reversal via {@code /v1/payouts/:id/reverse}, you confirm that the - * authorized signatory of the selected bank account has authorized the debit on the bank account - * and that no other authorization is required. + *

By requesting a reversal through {@code /v1/payouts/:id/reverse}, you confirm that the + * authorized signatory of the selected bank account authorizes the debit on the bank account and + * that no other authorization is required. */ public Payout reverse(Map params, RequestOptions options) throws StripeException { String path = String.format("/v1/payouts/%s/reverse", ApiResource.urlEncodeId(this.getId())); @@ -621,26 +613,26 @@ public Payout reverse(Map params, RequestOptions options) throws } /** - * Reverses a payout by debiting the destination bank account. Only payouts for connected accounts - * to US bank accounts may be reversed at this time. If the payout is in the {@code pending} - * status, {@code /v1/payouts/:id/cancel} should be used instead. + * Reverses a payout by debiting the destination bank account. At this time, you can only reverse + * payouts for connected accounts to US bank accounts. If the payout is in the {@code pending} + * status, use {@code /v1/payouts/:id/cancel} instead. * - *

By requesting a reversal via {@code /v1/payouts/:id/reverse}, you confirm that the - * authorized signatory of the selected bank account has authorized the debit on the bank account - * and that no other authorization is required. + *

By requesting a reversal through {@code /v1/payouts/:id/reverse}, you confirm that the + * authorized signatory of the selected bank account authorizes the debit on the bank account and + * that no other authorization is required. */ public Payout reverse(PayoutReverseParams params) throws StripeException { return reverse(params, (RequestOptions) null); } /** - * Reverses a payout by debiting the destination bank account. Only payouts for connected accounts - * to US bank accounts may be reversed at this time. If the payout is in the {@code pending} - * status, {@code /v1/payouts/:id/cancel} should be used instead. + * Reverses a payout by debiting the destination bank account. At this time, you can only reverse + * payouts for connected accounts to US bank accounts. If the payout is in the {@code pending} + * status, use {@code /v1/payouts/:id/cancel} instead. * - *

By requesting a reversal via {@code /v1/payouts/:id/reverse}, you confirm that the - * authorized signatory of the selected bank account has authorized the debit on the bank account - * and that no other authorization is required. + *

By requesting a reversal through {@code /v1/payouts/:id/reverse}, you confirm that the + * authorized signatory of the selected bank account authorizes the debit on the bank account and + * that no other authorization is required. */ public Payout reverse(PayoutReverseParams params, RequestOptions options) throws StripeException { String path = String.format("/v1/payouts/%s/reverse", ApiResource.urlEncodeId(this.getId())); @@ -657,8 +649,8 @@ public Payout reverse(PayoutReverseParams params, RequestOptions options) throws } /** - * Updates the specified payout by setting the values of the parameters passed. Any parameters not - * provided will be left unchanged. This request accepts only the metadata as arguments. + * Updates the specified payout by setting the values of the parameters you pass. We don’t change + * parameters that you don’t provide. This request only accepts the metadata as arguments. */ @Override public Payout update(Map params) throws StripeException { @@ -666,8 +658,8 @@ public Payout update(Map params) throws StripeException { } /** - * Updates the specified payout by setting the values of the parameters passed. Any parameters not - * provided will be left unchanged. This request accepts only the metadata as arguments. + * Updates the specified payout by setting the values of the parameters you pass. We don’t change + * parameters that you don’t provide. This request only accepts the metadata as arguments. */ @Override public Payout update(Map params, RequestOptions options) throws StripeException { @@ -684,16 +676,16 @@ public Payout update(Map params, RequestOptions options) throws } /** - * Updates the specified payout by setting the values of the parameters passed. Any parameters not - * provided will be left unchanged. This request accepts only the metadata as arguments. + * Updates the specified payout by setting the values of the parameters you pass. We don’t change + * parameters that you don’t provide. This request only accepts the metadata as arguments. */ public Payout update(PayoutUpdateParams params) throws StripeException { return update(params, (RequestOptions) null); } /** - * Updates the specified payout by setting the values of the parameters passed. Any parameters not - * provided will be left unchanged. This request accepts only the metadata as arguments. + * Updates the specified payout by setting the values of the parameters you pass. We don’t change + * parameters that you don’t provide. This request only accepts the metadata as arguments. */ public Payout update(PayoutUpdateParams params, RequestOptions options) throws StripeException { String path = String.format("/v1/payouts/%s", ApiResource.urlEncodeId(this.getId())); diff --git a/src/main/java/com/stripe/model/QuotePreviewInvoice.java b/src/main/java/com/stripe/model/QuotePreviewInvoice.java index d8c35175a33..237bc81e035 100644 --- a/src/main/java/com/stripe/model/QuotePreviewInvoice.java +++ b/src/main/java/com/stripe/model/QuotePreviewInvoice.java @@ -446,7 +446,17 @@ public class QuotePreviewInvoice extends ApiResource implements HasId { @SerializedName("receipt_number") String receiptNumber; - /** Options for invoice PDF rendering. */ + /** + * The rendering-related settings that control how the invoice is displayed on customer-facing + * surfaces such as PDF and Hosted Invoice Page. + */ + @SerializedName("rendering") + Rendering rendering; + + /** + * This is a legacy field that will be removed soon. For details about {@code rendering_options}, + * refer to {@code rendering} instead. Options for invoice PDF rendering. + */ @SerializedName("rendering_options") RenderingOptions renderingOptions; @@ -897,9 +907,9 @@ public static class AutomaticTax extends StripeObject { Boolean enabled; /** - * The connected account that's liable for tax. If set, the business address and tax - * registrations required to perform the tax calculation are loaded from this account. The tax - * transaction is returned in the report of the connected account. + * The account that's liable for tax. If set, the business address and tax registrations + * required to perform the tax calculation are loaded from this account. The tax transaction is + * returned in the report of the connected account. */ @SerializedName("liability") Liability liability; @@ -1292,6 +1302,33 @@ public static class FinancialConnections extends StripeObject { } } + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Rendering extends StripeObject { + /** How line-item prices and amounts will be displayed with respect to tax on invoice PDFs. */ + @SerializedName("amount_tax_display") + String amountTaxDisplay; + + /** Invoice pdf rendering options. */ + @SerializedName("pdf") + Pdf pdf; + + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Pdf extends StripeObject { + /** + * Page size of invoice pdf. Options include a4, letter, and auto. If set to auto, page size + * will be switched to a4 or letter based on customer locale. + * + *

One of {@code a4}, {@code auto}, or {@code letter}. + */ + @SerializedName("page_size") + String pageSize; + } + } + @Getter @Setter @EqualsAndHashCode(callSuper = false) @@ -1612,6 +1649,7 @@ public void setResponseGetter(StripeResponseGetter responseGetter) { trySetResponseGetter(paymentIntent, responseGetter); trySetResponseGetter(paymentSettings, responseGetter); trySetResponseGetter(quote, responseGetter); + trySetResponseGetter(rendering, responseGetter); trySetResponseGetter(renderingOptions, responseGetter); trySetResponseGetter(shippingCost, responseGetter); trySetResponseGetter(shippingDetails, responseGetter); diff --git a/src/main/java/com/stripe/model/QuotePreviewSchedule.java b/src/main/java/com/stripe/model/QuotePreviewSchedule.java index 2ee58201c92..9957756273a 100644 --- a/src/main/java/com/stripe/model/QuotePreviewSchedule.java +++ b/src/main/java/com/stripe/model/QuotePreviewSchedule.java @@ -444,9 +444,9 @@ public static class AutomaticTax extends StripeObject { Boolean enabled; /** - * The connected account that's liable for tax. If set, the business address and tax - * registrations required to perform the tax calculation are loaded from this account. The tax - * transaction is returned in the report of the connected account. + * The account that's liable for tax. If set, the business address and tax registrations + * required to perform the tax calculation are loaded from this account. The tax transaction + * is returned in the report of the connected account. */ @SerializedName("liability") Liability liability; @@ -966,9 +966,9 @@ public static class AutomaticTax extends StripeObject { Boolean enabled; /** - * The connected account that's liable for tax. If set, the business address and tax - * registrations required to perform the tax calculation are loaded from this account. The tax - * transaction is returned in the report of the connected account. + * The account that's liable for tax. If set, the business address and tax registrations + * required to perform the tax calculation are loaded from this account. The tax transaction + * is returned in the report of the connected account. */ @SerializedName("liability") Liability liability; diff --git a/src/main/java/com/stripe/model/Refund.java b/src/main/java/com/stripe/model/Refund.java index c08260e6779..11b28353b35 100644 --- a/src/main/java/com/stripe/model/Refund.java +++ b/src/main/java/com/stripe/model/Refund.java @@ -21,8 +21,8 @@ import lombok.Setter; /** - * {@code Refund} objects allow you to refund a charge that has previously been created but not yet - * refunded. Funds will be refunded to the credit or debit card that was originally charged. + * Refund objects allow you to refund a previously created charge that isn't refunded yet. Funds are + * refunded to the credit or debit card that's initially charged. * *

Related guide: Refunds */ @@ -40,7 +40,7 @@ public class Refund extends ApiResource implements MetadataStore, Balanc @Setter(lombok.AccessLevel.NONE) ExpandableField balanceTransaction; - /** ID of the charge that was refunded. */ + /** ID of the charge that's refunded. */ @SerializedName("charge") @Getter(lombok.AccessLevel.NONE) @Setter(lombok.AccessLevel.NONE) @@ -58,14 +58,14 @@ public class Refund extends ApiResource implements MetadataStore, Balanc String currency; /** - * An arbitrary string attached to the object. Often useful for displaying to users. (Available on - * non-card refunds only) + * An arbitrary string attached to the object. You can use this for displaying to users (available + * on non-card refunds only). */ @SerializedName("description") String description; /** - * If the refund failed, this balance transaction describes the adjustment made on your account + * After the refund fails, this balance transaction describes the adjustment made on your account * balance that reverses the initial balance transaction. */ @SerializedName("failure_balance_transaction") @@ -74,10 +74,9 @@ public class Refund extends ApiResource implements MetadataStore, Balanc ExpandableField failureBalanceTransaction; /** - * If the refund failed, the reason for refund failure if known. Possible values are {@code - * lost_or_stolen_card}, {@code expired_or_canceled_card}, {@code - * charge_for_pending_refund_disputed}, {@code insufficient_funds}, {@code declined}, {@code - * merchant_request} or {@code unknown}. + * Provides the reason for the refund failure. Possible values are: {@code lost_or_stolen_card}, + * {@code expired_or_canceled_card}, {@code charge_for_pending_refund_disputed}, {@code + * insufficient_funds}, {@code declined}, {@code merchant_request}, or {@code unknown}. */ @SerializedName("failure_reason") String failureReason; @@ -88,8 +87,8 @@ public class Refund extends ApiResource implements MetadataStore, Balanc String id; /** - * For payment methods without native refund support (e.g., Konbini, PromptPay), email for the - * customer to receive refund instructions. + * For payment methods without native refund support (for example, Konbini, PromptPay), provide an + * email address for the customer to receive refund instructions. */ @SerializedName("instructions_email") String instructionsEmail; @@ -114,15 +113,16 @@ public class Refund extends ApiResource implements MetadataStore, Balanc @SerializedName("object") String object; - /** ID of the PaymentIntent that was refunded. */ + /** ID of the PaymentIntent that's refunded. */ @SerializedName("payment_intent") @Getter(lombok.AccessLevel.NONE) @Setter(lombok.AccessLevel.NONE) ExpandableField paymentIntent; /** - * Reason for the refund, either user-provided ({@code duplicate}, {@code fraudulent}, or {@code - * requested_by_customer}) or generated by Stripe internally ({@code expired_uncaptured_charge}). + * Reason for the refund, which is either user-provided ({@code duplicate}, {@code fraudulent}, or + * {@code requested_by_customer}) or generated by Stripe internally ({@code + * expired_uncaptured_charge}). * *

One of {@code duplicate}, {@code expired_uncaptured_charge}, {@code fraudulent}, or {@code * requested_by_customer}. @@ -135,8 +135,8 @@ public class Refund extends ApiResource implements MetadataStore, Balanc String receiptNumber; /** - * The transfer reversal that is associated with the refund. Only present if the charge came from - * another Stripe account. See the Connect documentation for details. + * The transfer reversal that's associated with the refund. Only present if the charge came from + * another Stripe account. */ @SerializedName("source_transfer_reversal") @Getter(lombok.AccessLevel.NONE) @@ -146,16 +146,15 @@ public class Refund extends ApiResource implements MetadataStore, Balanc /** * 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}. Refer to our refunds documentation for more - * details. + * requires_action}, {@code succeeded}, {@code failed}, or {@code canceled}. Learn more about failed refunds. */ @SerializedName("status") String status; /** - * If the accompanying transfer was reversed, the transfer reversal object. Only applicable if the - * charge was created using the destination parameter. + * This refers to the transfer reversal object if the accompanying transfer reverses. This is only + * applicable if the charge was created using the destination parameter. */ @SerializedName("transfer_reversal") @Getter(lombok.AccessLevel.NONE) @@ -281,8 +280,8 @@ public void setTransferReversalObject(TransferReversal expandableObject) { /** * Cancels a refund with a status of {@code requires_action}. * - *

Refunds in other states cannot be canceled, and only refunds for payment methods that - * require customer action will enter the {@code requires_action} state. + *

You can’t cancel refunds in other states. Only refunds for payment methods that require + * customer action can enter the {@code requires_action} state. */ public Refund cancel() throws StripeException { return cancel((Map) null, (RequestOptions) null); @@ -291,8 +290,8 @@ public Refund cancel() throws StripeException { /** * Cancels a refund with a status of {@code requires_action}. * - *

Refunds in other states cannot be canceled, and only refunds for payment methods that - * require customer action will enter the {@code requires_action} state. + *

You can’t cancel refunds in other states. Only refunds for payment methods that require + * customer action can enter the {@code requires_action} state. */ public Refund cancel(RequestOptions options) throws StripeException { return cancel((Map) null, options); @@ -301,8 +300,8 @@ public Refund cancel(RequestOptions options) throws StripeException { /** * Cancels a refund with a status of {@code requires_action}. * - *

Refunds in other states cannot be canceled, and only refunds for payment methods that - * require customer action will enter the {@code requires_action} state. + *

You can’t cancel refunds in other states. Only refunds for payment methods that require + * customer action can enter the {@code requires_action} state. */ public Refund cancel(Map params) throws StripeException { return cancel(params, (RequestOptions) null); @@ -311,8 +310,8 @@ public Refund cancel(Map params) throws StripeException { /** * Cancels a refund with a status of {@code requires_action}. * - *

Refunds in other states cannot be canceled, and only refunds for payment methods that - * require customer action will enter the {@code requires_action} state. + *

You can’t cancel refunds in other states. Only refunds for payment methods that require + * customer action can enter the {@code requires_action} state. */ public Refund cancel(Map params, RequestOptions options) throws StripeException { String path = String.format("/v1/refunds/%s/cancel", ApiResource.urlEncodeId(this.getId())); @@ -330,8 +329,8 @@ public Refund cancel(Map params, RequestOptions options) throws /** * Cancels a refund with a status of {@code requires_action}. * - *

Refunds in other states cannot be canceled, and only refunds for payment methods that - * require customer action will enter the {@code requires_action} state. + *

You can’t cancel refunds in other states. Only refunds for payment methods that require + * customer action can enter the {@code requires_action} state. */ public Refund cancel(RefundCancelParams params) throws StripeException { return cancel(params, (RequestOptions) null); @@ -340,8 +339,8 @@ public Refund cancel(RefundCancelParams params) throws StripeException { /** * Cancels a refund with a status of {@code requires_action}. * - *

Refunds in other states cannot be canceled, and only refunds for payment methods that - * require customer action will enter the {@code requires_action} state. + *

You can’t cancel refunds in other states. Only refunds for payment methods that require + * customer action can enter the {@code requires_action} state. */ public Refund cancel(RefundCancelParams params, RequestOptions options) throws StripeException { String path = String.format("/v1/refunds/%s/cancel", ApiResource.urlEncodeId(this.getId())); @@ -357,12 +356,38 @@ public Refund cancel(RefundCancelParams params, RequestOptions options) throws S ApiMode.V1); } - /** Create a refund. */ + /** + * When you create a new refund, you must specify a Charge or a PaymentIntent object on which to + * create it. + * + *

Creating a new refund will refund a charge that has previously been created but not yet + * refunded. Funds will be refunded to the credit or debit card that was originally charged. + * + *

You can optionally refund only part of a charge. You can do so multiple times, until the + * entire charge has been refunded. + * + *

Once entirely refunded, a charge can’t be refunded again. This method will raise an error + * when called on an already-refunded charge, or when trying to refund more money than is left on + * a charge. + */ public static Refund create(Map params) throws StripeException { return create(params, (RequestOptions) null); } - /** Create a refund. */ + /** + * When you create a new refund, you must specify a Charge or a PaymentIntent object on which to + * create it. + * + *

Creating a new refund will refund a charge that has previously been created but not yet + * refunded. Funds will be refunded to the credit or debit card that was originally charged. + * + *

You can optionally refund only part of a charge. You can do so multiple times, until the + * entire charge has been refunded. + * + *

Once entirely refunded, a charge can’t be refunded again. This method will raise an error + * when called on an already-refunded charge, or when trying to refund more money than is left on + * a charge. + */ public static Refund create(Map params, RequestOptions options) throws StripeException { String path = "/v1/refunds"; @@ -377,12 +402,38 @@ public static Refund create(Map params, RequestOptions options) ApiMode.V1); } - /** Create a refund. */ + /** + * When you create a new refund, you must specify a Charge or a PaymentIntent object on which to + * create it. + * + *

Creating a new refund will refund a charge that has previously been created but not yet + * refunded. Funds will be refunded to the credit or debit card that was originally charged. + * + *

You can optionally refund only part of a charge. You can do so multiple times, until the + * entire charge has been refunded. + * + *

Once entirely refunded, a charge can’t be refunded again. This method will raise an error + * when called on an already-refunded charge, or when trying to refund more money than is left on + * a charge. + */ public static Refund create(RefundCreateParams params) throws StripeException { return create(params, (RequestOptions) null); } - /** Create a refund. */ + /** + * When you create a new refund, you must specify a Charge or a PaymentIntent object on which to + * create it. + * + *

Creating a new refund will refund a charge that has previously been created but not yet + * refunded. Funds will be refunded to the credit or debit card that was originally charged. + * + *

You can optionally refund only part of a charge. You can do so multiple times, until the + * entire charge has been refunded. + * + *

Once entirely refunded, a charge can’t be refunded again. This method will raise an error + * when called on an already-refunded charge, or when trying to refund more money than is left on + * a charge. + */ public static Refund create(RefundCreateParams params, RequestOptions options) throws StripeException { String path = "/v1/refunds"; @@ -399,18 +450,18 @@ public static Refund create(RefundCreateParams params, RequestOptions options) } /** - * Returns a list of all refunds you’ve previously created. The refunds are returned in sorted - * order, with the most recent refunds appearing first. For convenience, the 10 most recent - * refunds are always available by default on the charge object. + * Returns a list of all refunds you created. We return the refunds in sorted order, with the most + * recent refunds appearing first The 10 most recent refunds are always available by default on + * the Charge object. */ public static RefundCollection list(Map params) throws StripeException { return list(params, (RequestOptions) null); } /** - * Returns a list of all refunds you’ve previously created. The refunds are returned in sorted - * order, with the most recent refunds appearing first. For convenience, the 10 most recent - * refunds are always available by default on the charge object. + * Returns a list of all refunds you created. We return the refunds in sorted order, with the most + * recent refunds appearing first The 10 most recent refunds are always available by default on + * the Charge object. */ public static RefundCollection list(Map params, RequestOptions options) throws StripeException { @@ -427,18 +478,18 @@ public static RefundCollection list(Map params, RequestOptions o } /** - * Returns a list of all refunds you’ve previously created. The refunds are returned in sorted - * order, with the most recent refunds appearing first. For convenience, the 10 most recent - * refunds are always available by default on the charge object. + * Returns a list of all refunds you created. We return the refunds in sorted order, with the most + * recent refunds appearing first The 10 most recent refunds are always available by default on + * the Charge object. */ public static RefundCollection list(RefundListParams params) throws StripeException { return list(params, (RequestOptions) null); } /** - * Returns a list of all refunds you’ve previously created. The refunds are returned in sorted - * order, with the most recent refunds appearing first. For convenience, the 10 most recent - * refunds are always available by default on the charge object. + * Returns a list of all refunds you created. We return the refunds in sorted order, with the most + * recent refunds appearing first The 10 most recent refunds are always available by default on + * the Charge object. */ public static RefundCollection list(RefundListParams params, RequestOptions options) throws StripeException { @@ -497,8 +548,8 @@ public static Refund retrieve(String refund, RefundRetrieveParams params, Reques } /** - * Updates the specified refund by setting the values of the parameters passed. Any parameters not - * provided will be left unchanged. + * Updates the refund that you specify by setting the values of the passed parameters. Any + * parameters that you don’t provide remain unchanged. * *

This request only accepts {@code metadata} as an argument. */ @@ -508,8 +559,8 @@ public Refund update(Map params) throws StripeException { } /** - * Updates the specified refund by setting the values of the parameters passed. Any parameters not - * provided will be left unchanged. + * Updates the refund that you specify by setting the values of the passed parameters. Any + * parameters that you don’t provide remain unchanged. * *

This request only accepts {@code metadata} as an argument. */ @@ -528,8 +579,8 @@ public Refund update(Map params, RequestOptions options) throws } /** - * Updates the specified refund by setting the values of the parameters passed. Any parameters not - * provided will be left unchanged. + * Updates the refund that you specify by setting the values of the passed parameters. Any + * parameters that you don’t provide remain unchanged. * *

This request only accepts {@code metadata} as an argument. */ @@ -538,8 +589,8 @@ public Refund update(RefundUpdateParams params) throws StripeException { } /** - * Updates the specified refund by setting the values of the parameters passed. Any parameters not - * provided will be left unchanged. + * Updates the refund that you specify by setting the values of the passed parameters. Any + * parameters that you don’t provide remain unchanged. * *

This request only accepts {@code metadata} as an argument. */ diff --git a/src/main/java/com/stripe/model/SetupAttempt.java b/src/main/java/com/stripe/model/SetupAttempt.java index 14325a0730b..ca3345420f0 100644 --- a/src/main/java/com/stripe/model/SetupAttempt.java +++ b/src/main/java/com/stripe/model/SetupAttempt.java @@ -18,8 +18,8 @@ /** * A SetupAttempt describes one attempted confirmation of a SetupIntent, whether that confirmation - * was successful or unsuccessful. You can use SetupAttempts to inspect details of a specific - * attempt at setting up a payment method using a SetupIntent. + * is successful or unsuccessful. You can use SetupAttempts to inspect details of a specific attempt + * at setting up a payment method using a SetupIntent. */ @Getter @Setter @@ -226,12 +226,12 @@ public void setSetupIntentObject(SetupIntent expandableObject) { this.setupIntent = new ExpandableField(expandableObject.getId(), expandableObject); } - /** Returns a list of SetupAttempts associated with a provided SetupIntent. */ + /** Returns a list of SetupAttempts that associate with a provided SetupIntent. */ public static SetupAttemptCollection list(Map params) throws StripeException { return list(params, (RequestOptions) null); } - /** Returns a list of SetupAttempts associated with a provided SetupIntent. */ + /** Returns a list of SetupAttempts that associate with a provided SetupIntent. */ public static SetupAttemptCollection list(Map params, RequestOptions options) throws StripeException { String path = "/v1/setup_attempts"; @@ -246,12 +246,12 @@ public static SetupAttemptCollection list(Map params, RequestOpt ApiMode.V1); } - /** Returns a list of SetupAttempts associated with a provided SetupIntent. */ + /** Returns a list of SetupAttempts that associate with a provided SetupIntent. */ public static SetupAttemptCollection list(SetupAttemptListParams params) throws StripeException { return list(params, (RequestOptions) null); } - /** Returns a list of SetupAttempts associated with a provided SetupIntent. */ + /** Returns a list of SetupAttempts that associate with a provided SetupIntent. */ public static SetupAttemptCollection list(SetupAttemptListParams params, RequestOptions options) throws StripeException { String path = "/v1/setup_attempts"; diff --git a/src/main/java/com/stripe/model/Subscription.java b/src/main/java/com/stripe/model/Subscription.java index c05fb749aed..1e3cdcef6d8 100644 --- a/src/main/java/com/stripe/model/Subscription.java +++ b/src/main/java/com/stripe/model/Subscription.java @@ -1146,9 +1146,9 @@ public static class AutomaticTax extends StripeObject { Boolean enabled; /** - * The connected account that's liable for tax. If set, the business address and tax - * registrations required to perform the tax calculation are loaded from this account. The tax - * transaction is returned in the report of the connected account. + * The account that's liable for tax. If set, the business address and tax registrations + * required to perform the tax calculation are loaded from this account. The tax transaction is + * returned in the report of the connected account. */ @SerializedName("liability") Liability liability; diff --git a/src/main/java/com/stripe/model/SubscriptionSchedule.java b/src/main/java/com/stripe/model/SubscriptionSchedule.java index 773a9b08b73..6557b3d15a8 100644 --- a/src/main/java/com/stripe/model/SubscriptionSchedule.java +++ b/src/main/java/com/stripe/model/SubscriptionSchedule.java @@ -807,9 +807,9 @@ public static class AutomaticTax extends StripeObject { Boolean enabled; /** - * The connected account that's liable for tax. If set, the business address and tax - * registrations required to perform the tax calculation are loaded from this account. The tax - * transaction is returned in the report of the connected account. + * The account that's liable for tax. If set, the business address and tax registrations + * required to perform the tax calculation are loaded from this account. The tax transaction + * is returned in the report of the connected account. */ @SerializedName("liability") Liability liability; @@ -1329,9 +1329,9 @@ public static class AutomaticTax extends StripeObject { Boolean enabled; /** - * The connected account that's liable for tax. If set, the business address and tax - * registrations required to perform the tax calculation are loaded from this account. The tax - * transaction is returned in the report of the connected account. + * The account that's liable for tax. If set, the business address and tax registrations + * required to perform the tax calculation are loaded from this account. The tax transaction + * is returned in the report of the connected account. */ @SerializedName("liability") Liability liability; diff --git a/src/main/java/com/stripe/model/billingportal/Session.java b/src/main/java/com/stripe/model/billingportal/Session.java index 2f01e16565f..a3380efa41f 100644 --- a/src/main/java/com/stripe/model/billingportal/Session.java +++ b/src/main/java/com/stripe/model/billingportal/Session.java @@ -347,7 +347,7 @@ public static class Item extends StripeObject implements HasId { /** * The price the customer should subscribe to through this flow. The price must also be * included in the configuration's {@code + * href="https://stripe.com/docs/api/customer_portal/configuration#portal_configuration_object-features-subscription_update-products">{@code * features.subscription_update.products}. */ @SerializedName("price") diff --git a/src/main/java/com/stripe/model/capital/FinancingSummary.java b/src/main/java/com/stripe/model/capital/FinancingSummary.java index f9f30564f8b..1e1ccb6e7ea 100644 --- a/src/main/java/com/stripe/model/capital/FinancingSummary.java +++ b/src/main/java/com/stripe/model/capital/FinancingSummary.java @@ -109,7 +109,7 @@ public static class Details extends StripeObject { * in milliseconds since unix epoch. */ @SerializedName("advance_paid_out_at") - BigDecimal advancePaidOutAt; + Long advancePaidOutAt; /** Currency that the financing offer is transacted in. For example, {@code usd}. */ @SerializedName("currency") @@ -136,7 +136,7 @@ public static class Details extends StripeObject { * epoch. */ @SerializedName("repayments_begin_at") - BigDecimal repaymentsBeginAt; + Long repaymentsBeginAt; /** Per-transaction rate at which Stripe will withhold funds to repay the financing. */ @SerializedName("withhold_rate") @@ -153,7 +153,7 @@ public static class CurrentRepaymentInterval extends StripeObject { * epoch. */ @SerializedName("due_at") - BigDecimal dueAt; + Long dueAt; /** The amount that has already been paid in the current repayment interval. */ @SerializedName("paid_amount") diff --git a/src/main/java/com/stripe/model/issuing/Card.java b/src/main/java/com/stripe/model/issuing/Card.java index df31406fdaa..481998d5459 100644 --- a/src/main/java/com/stripe/model/issuing/Card.java +++ b/src/main/java/com/stripe/model/issuing/Card.java @@ -48,12 +48,6 @@ public class Card extends ApiResource implements HasId, MetadataStore { @SerializedName("cancellation_reason") String cancellationReason; - /** The card design object belonging to this card. */ - @SerializedName("card_design") - @Getter(lombok.AccessLevel.NONE) - @Setter(lombok.AccessLevel.NONE) - ExpandableField cardDesign; - /** * An Issuing {@code Cardholder} object represents an individual or business entity who is issued cards. @@ -143,6 +137,12 @@ public class Card extends ApiResource implements HasId, MetadataStore { @SerializedName("object") String object; + /** The personalization design object belonging to this card. */ + @SerializedName("personalization_design") + @Getter(lombok.AccessLevel.NONE) + @Setter(lombok.AccessLevel.NONE) + ExpandableField personalizationDesign; + /** The latest card that replaces this card, if any. */ @SerializedName("replaced_by") @Getter(lombok.AccessLevel.NONE) @@ -191,22 +191,23 @@ public class Card extends ApiResource implements HasId, MetadataStore { @SerializedName("wallets") Wallets wallets; - /** Get ID of expandable {@code cardDesign} object. */ - public String getCardDesign() { - return (this.cardDesign != null) ? this.cardDesign.getId() : null; + /** Get ID of expandable {@code personalizationDesign} object. */ + public String getPersonalizationDesign() { + return (this.personalizationDesign != null) ? this.personalizationDesign.getId() : null; } - public void setCardDesign(String id) { - this.cardDesign = ApiResource.setExpandableFieldId(id, this.cardDesign); + public void setPersonalizationDesign(String id) { + this.personalizationDesign = ApiResource.setExpandableFieldId(id, this.personalizationDesign); } - /** Get expanded {@code cardDesign}. */ - public CardDesign getCardDesignObject() { - return (this.cardDesign != null) ? this.cardDesign.getExpanded() : null; + /** Get expanded {@code personalizationDesign}. */ + public PersonalizationDesign getPersonalizationDesignObject() { + return (this.personalizationDesign != null) ? this.personalizationDesign.getExpanded() : null; } - public void setCardDesignObject(CardDesign expandableObject) { - this.cardDesign = new ExpandableField(expandableObject.getId(), expandableObject); + public void setPersonalizationDesignObject(PersonalizationDesign expandableObject) { + this.personalizationDesign = + new ExpandableField(expandableObject.getId(), expandableObject); } /** Get ID of expandable {@code replacedBy} object. */ @@ -980,8 +981,8 @@ public Card failCard(CardFailCardParams params, RequestOptions options) throws S @Override public void setResponseGetter(StripeResponseGetter responseGetter) { super.setResponseGetter(responseGetter); - trySetResponseGetter(cardDesign, responseGetter); trySetResponseGetter(cardholder, responseGetter); + trySetResponseGetter(personalizationDesign, responseGetter); trySetResponseGetter(replacedBy, responseGetter); trySetResponseGetter(replacementFor, responseGetter); trySetResponseGetter(shipping, responseGetter); diff --git a/src/main/java/com/stripe/model/issuing/CardDesign.java b/src/main/java/com/stripe/model/issuing/CardDesign.java deleted file mode 100644 index b894cecef6e..00000000000 --- a/src/main/java/com/stripe/model/issuing/CardDesign.java +++ /dev/null @@ -1,596 +0,0 @@ -// File generated from our OpenAPI spec -package com.stripe.model.issuing; - -import com.google.gson.annotations.SerializedName; -import com.stripe.exception.StripeException; -import com.stripe.model.ExpandableField; -import com.stripe.model.File; -import com.stripe.model.HasId; -import com.stripe.model.MetadataStore; -import com.stripe.model.StripeObject; -import com.stripe.net.ApiMode; -import com.stripe.net.ApiRequestParams; -import com.stripe.net.ApiResource; -import com.stripe.net.BaseAddress; -import com.stripe.net.RequestOptions; -import com.stripe.net.StripeResponseGetter; -import com.stripe.param.issuing.CardDesignActivateTestmodeParams; -import com.stripe.param.issuing.CardDesignCreateParams; -import com.stripe.param.issuing.CardDesignDeactivateTestmodeParams; -import com.stripe.param.issuing.CardDesignListParams; -import com.stripe.param.issuing.CardDesignRejectTestmodeParams; -import com.stripe.param.issuing.CardDesignRetrieveParams; -import com.stripe.param.issuing.CardDesignUpdateParams; -import java.util.List; -import java.util.Map; -import lombok.EqualsAndHashCode; -import lombok.Getter; -import lombok.Setter; - -/** - * A Card Design is a logical grouping of a Card Bundle, card logo, and carrier text that represents - * a product line. - */ -@Getter -@Setter -@EqualsAndHashCode(callSuper = false) -public class CardDesign extends ApiResource implements HasId, MetadataStore { - /** The card bundle object belonging to this card design. */ - @SerializedName("card_bundle") - @Getter(lombok.AccessLevel.NONE) - @Setter(lombok.AccessLevel.NONE) - ExpandableField cardBundle; - - /** The file for the card logo, for use with card bundles that support card logos. */ - @SerializedName("card_logo") - @Getter(lombok.AccessLevel.NONE) - @Setter(lombok.AccessLevel.NONE) - ExpandableField cardLogo; - - /** Hash containing carrier text, for use with card bundles that support carrier text. */ - @SerializedName("carrier_text") - CarrierText carrierText; - - /** Unique identifier for the object. */ - @Getter(onMethod_ = {@Override}) - @SerializedName("id") - String id; - - /** - * A lookup key used to retrieve card designs dynamically from a static string. This may be up to - * 200 characters. - */ - @SerializedName("lookup_key") - String lookupKey; - - /** - * Set of key-value pairs that you can attach - * to an object. This can be useful for storing additional information about the object in a - * structured format. - */ - @Getter(onMethod_ = {@Override}) - @SerializedName("metadata") - Map metadata; - - /** Friendly display name. */ - @SerializedName("name") - String name; - - /** - * String representing the object's type. Objects of the same type share the same value. - * - *

Equal to {@code issuing.card_design}. - */ - @SerializedName("object") - String object; - - @SerializedName("preferences") - Preferences preferences; - - @SerializedName("rejection_reasons") - RejectionReasons rejectionReasons; - - /** - * Whether this card design can be used to create cards. - * - *

One of {@code active}, {@code inactive}, {@code rejected}, or {@code review}. - */ - @SerializedName("status") - String status; - - /** Get ID of expandable {@code cardBundle} object. */ - public String getCardBundle() { - return (this.cardBundle != null) ? this.cardBundle.getId() : null; - } - - public void setCardBundle(String id) { - this.cardBundle = ApiResource.setExpandableFieldId(id, this.cardBundle); - } - - /** Get expanded {@code cardBundle}. */ - public CardBundle getCardBundleObject() { - return (this.cardBundle != null) ? this.cardBundle.getExpanded() : null; - } - - public void setCardBundleObject(CardBundle expandableObject) { - this.cardBundle = new ExpandableField(expandableObject.getId(), expandableObject); - } - - /** Get ID of expandable {@code cardLogo} object. */ - public String getCardLogo() { - return (this.cardLogo != null) ? this.cardLogo.getId() : null; - } - - public void setCardLogo(String id) { - this.cardLogo = ApiResource.setExpandableFieldId(id, this.cardLogo); - } - - /** Get expanded {@code cardLogo}. */ - public File getCardLogoObject() { - return (this.cardLogo != null) ? this.cardLogo.getExpanded() : null; - } - - public void setCardLogoObject(File expandableObject) { - this.cardLogo = new ExpandableField(expandableObject.getId(), expandableObject); - } - - /** Creates a card design object. */ - public static CardDesign create(Map params) throws StripeException { - return create(params, (RequestOptions) null); - } - - /** Creates a card design object. */ - public static CardDesign create(Map params, RequestOptions options) - throws StripeException { - String path = "/v1/issuing/card_designs"; - return getGlobalResponseGetter() - .request( - BaseAddress.API, - ApiResource.RequestMethod.POST, - path, - params, - CardDesign.class, - options, - ApiMode.V1); - } - - /** Creates a card design object. */ - public static CardDesign create(CardDesignCreateParams params) throws StripeException { - return create(params, (RequestOptions) null); - } - - /** Creates a card design object. */ - public static CardDesign create(CardDesignCreateParams params, RequestOptions options) - throws StripeException { - String path = "/v1/issuing/card_designs"; - ApiResource.checkNullTypedParams(path, params); - return getGlobalResponseGetter() - .request( - BaseAddress.API, - ApiResource.RequestMethod.POST, - path, - ApiRequestParams.paramsToMap(params), - CardDesign.class, - options, - ApiMode.V1); - } - - /** - * Returns a list of card design objects. The objects are sorted in descending order by creation - * date, with the most recently created object appearing first. - */ - public static CardDesignCollection list(Map params) throws StripeException { - return list(params, (RequestOptions) null); - } - - /** - * Returns a list of card design objects. The objects are sorted in descending order by creation - * date, with the most recently created object appearing first. - */ - public static CardDesignCollection list(Map params, RequestOptions options) - throws StripeException { - String path = "/v1/issuing/card_designs"; - return getGlobalResponseGetter() - .request( - BaseAddress.API, - ApiResource.RequestMethod.GET, - path, - params, - CardDesignCollection.class, - options, - ApiMode.V1); - } - - /** - * Returns a list of card design objects. The objects are sorted in descending order by creation - * date, with the most recently created object appearing first. - */ - public static CardDesignCollection list(CardDesignListParams params) throws StripeException { - return list(params, (RequestOptions) null); - } - - /** - * Returns a list of card design objects. The objects are sorted in descending order by creation - * date, with the most recently created object appearing first. - */ - public static CardDesignCollection list(CardDesignListParams params, RequestOptions options) - throws StripeException { - String path = "/v1/issuing/card_designs"; - ApiResource.checkNullTypedParams(path, params); - return getGlobalResponseGetter() - .request( - BaseAddress.API, - ApiResource.RequestMethod.GET, - path, - ApiRequestParams.paramsToMap(params), - CardDesignCollection.class, - options, - ApiMode.V1); - } - - /** Retrieves a card design object. */ - public static CardDesign retrieve(String cardDesign) throws StripeException { - return retrieve(cardDesign, (Map) null, (RequestOptions) null); - } - - /** Retrieves a card design object. */ - public static CardDesign retrieve(String cardDesign, RequestOptions options) - throws StripeException { - return retrieve(cardDesign, (Map) null, options); - } - - /** Retrieves a card design object. */ - public static CardDesign retrieve( - String cardDesign, Map params, RequestOptions options) - throws StripeException { - String path = String.format("/v1/issuing/card_designs/%s", ApiResource.urlEncodeId(cardDesign)); - return getGlobalResponseGetter() - .request( - BaseAddress.API, - ApiResource.RequestMethod.GET, - path, - params, - CardDesign.class, - options, - ApiMode.V1); - } - - /** Retrieves a card design object. */ - public static CardDesign retrieve( - String cardDesign, CardDesignRetrieveParams params, RequestOptions options) - throws StripeException { - String path = String.format("/v1/issuing/card_designs/%s", ApiResource.urlEncodeId(cardDesign)); - ApiResource.checkNullTypedParams(path, params); - return getGlobalResponseGetter() - .request( - BaseAddress.API, - ApiResource.RequestMethod.GET, - path, - ApiRequestParams.paramsToMap(params), - CardDesign.class, - options, - ApiMode.V1); - } - - /** Updates a card design object. */ - @Override - public CardDesign update(Map params) throws StripeException { - return update(params, (RequestOptions) null); - } - - /** Updates a card design object. */ - @Override - public CardDesign update(Map params, RequestOptions options) - throws StripeException { - String path = - String.format("/v1/issuing/card_designs/%s", ApiResource.urlEncodeId(this.getId())); - return getResponseGetter() - .request( - BaseAddress.API, - ApiResource.RequestMethod.POST, - path, - params, - CardDesign.class, - options, - ApiMode.V1); - } - - /** Updates a card design object. */ - public CardDesign update(CardDesignUpdateParams params) throws StripeException { - return update(params, (RequestOptions) null); - } - - /** Updates a card design object. */ - public CardDesign update(CardDesignUpdateParams params, RequestOptions options) - throws StripeException { - String path = - String.format("/v1/issuing/card_designs/%s", ApiResource.urlEncodeId(this.getId())); - ApiResource.checkNullTypedParams(path, params); - return getResponseGetter() - .request( - BaseAddress.API, - ApiResource.RequestMethod.POST, - path, - ApiRequestParams.paramsToMap(params), - CardDesign.class, - options, - ApiMode.V1); - } - - @Getter - @Setter - @EqualsAndHashCode(callSuper = false) - public static class CarrierText extends StripeObject { - /** The footer body text of the carrier letter. */ - @SerializedName("footer_body") - String footerBody; - - /** The footer title text of the carrier letter. */ - @SerializedName("footer_title") - String footerTitle; - - /** The header body text of the carrier letter. */ - @SerializedName("header_body") - String headerBody; - - /** The header title text of the carrier letter. */ - @SerializedName("header_title") - String headerTitle; - } - - @Getter - @Setter - @EqualsAndHashCode(callSuper = false) - public static class Preferences extends StripeObject { - /** - * Whether this card design is used to create cards when one is not specified. A connected - * account will use the Connect platform's default if no card design is set as the account - * default. - */ - @SerializedName("account_default") - Boolean accountDefault; - - /** - * Whether this card design is used to create cards when one is not specified and an account - * default for this connected account does not exist. - */ - @SerializedName("platform_default") - Boolean platformDefault; - } - - @Getter - @Setter - @EqualsAndHashCode(callSuper = false) - public static class RejectionReasons extends StripeObject { - /** The reason(s) the card logo was rejected. */ - @SerializedName("card_logo") - List cardLogo; - - /** The reason(s) the carrier text was rejected. */ - @SerializedName("carrier_text") - List carrierText; - } - - public TestHelpers getTestHelpers() { - return new TestHelpers(this); - } - - public static class TestHelpers { - private final CardDesign resource; - - private TestHelpers(CardDesign resource) { - this.resource = resource; - } - - /** - * Updates the {@code status} of the specified testmode card design object to {@code active}. - */ - public CardDesign activateTestmode() throws StripeException { - return activateTestmode((Map) null, (RequestOptions) null); - } - - /** - * Updates the {@code status} of the specified testmode card design object to {@code active}. - */ - public CardDesign activateTestmode(RequestOptions options) throws StripeException { - return activateTestmode((Map) null, options); - } - - /** - * Updates the {@code status} of the specified testmode card design object to {@code active}. - */ - public CardDesign activateTestmode(Map params) throws StripeException { - return activateTestmode(params, (RequestOptions) null); - } - - /** - * Updates the {@code status} of the specified testmode card design object to {@code active}. - */ - public CardDesign activateTestmode(Map params, RequestOptions options) - throws StripeException { - String path = - String.format( - "/v1/test_helpers/issuing/card_designs/%s/status/activate", - ApiResource.urlEncodeId(this.resource.getId())); - return resource - .getResponseGetter() - .request( - BaseAddress.API, - ApiResource.RequestMethod.POST, - path, - params, - CardDesign.class, - options, - ApiMode.V1); - } - - /** - * Updates the {@code status} of the specified testmode card design object to {@code active}. - */ - public CardDesign activateTestmode(CardDesignActivateTestmodeParams params) - throws StripeException { - return activateTestmode(params, (RequestOptions) null); - } - - /** - * Updates the {@code status} of the specified testmode card design object to {@code active}. - */ - public CardDesign activateTestmode( - CardDesignActivateTestmodeParams params, RequestOptions options) throws StripeException { - String path = - String.format( - "/v1/test_helpers/issuing/card_designs/%s/status/activate", - ApiResource.urlEncodeId(this.resource.getId())); - ApiResource.checkNullTypedParams(path, params); - return resource - .getResponseGetter() - .request( - BaseAddress.API, - ApiResource.RequestMethod.POST, - path, - ApiRequestParams.paramsToMap(params), - CardDesign.class, - options, - ApiMode.V1); - } - - /** - * Updates the {@code status} of the specified testmode card design object to {@code inactive}. - */ - public CardDesign deactivateTestmode() throws StripeException { - return deactivateTestmode((Map) null, (RequestOptions) null); - } - - /** - * Updates the {@code status} of the specified testmode card design object to {@code inactive}. - */ - public CardDesign deactivateTestmode(RequestOptions options) throws StripeException { - return deactivateTestmode((Map) null, options); - } - - /** - * Updates the {@code status} of the specified testmode card design object to {@code inactive}. - */ - public CardDesign deactivateTestmode(Map params) throws StripeException { - return deactivateTestmode(params, (RequestOptions) null); - } - - /** - * Updates the {@code status} of the specified testmode card design object to {@code inactive}. - */ - public CardDesign deactivateTestmode(Map params, RequestOptions options) - throws StripeException { - String path = - String.format( - "/v1/test_helpers/issuing/card_designs/%s/status/deactivate", - ApiResource.urlEncodeId(this.resource.getId())); - return resource - .getResponseGetter() - .request( - BaseAddress.API, - ApiResource.RequestMethod.POST, - path, - params, - CardDesign.class, - options, - ApiMode.V1); - } - - /** - * Updates the {@code status} of the specified testmode card design object to {@code inactive}. - */ - public CardDesign deactivateTestmode(CardDesignDeactivateTestmodeParams params) - throws StripeException { - return deactivateTestmode(params, (RequestOptions) null); - } - - /** - * Updates the {@code status} of the specified testmode card design object to {@code inactive}. - */ - public CardDesign deactivateTestmode( - CardDesignDeactivateTestmodeParams params, RequestOptions options) throws StripeException { - String path = - String.format( - "/v1/test_helpers/issuing/card_designs/%s/status/deactivate", - ApiResource.urlEncodeId(this.resource.getId())); - ApiResource.checkNullTypedParams(path, params); - return resource - .getResponseGetter() - .request( - BaseAddress.API, - ApiResource.RequestMethod.POST, - path, - ApiRequestParams.paramsToMap(params), - CardDesign.class, - options, - ApiMode.V1); - } - - /** - * Updates the {@code status} of the specified testmode card design object to {@code rejected}. - */ - public CardDesign rejectTestmode(Map params) throws StripeException { - return rejectTestmode(params, (RequestOptions) null); - } - - /** - * Updates the {@code status} of the specified testmode card design object to {@code rejected}. - */ - public CardDesign rejectTestmode(Map params, RequestOptions options) - throws StripeException { - String path = - String.format( - "/v1/test_helpers/issuing/card_designs/%s/status/reject", - ApiResource.urlEncodeId(this.resource.getId())); - return resource - .getResponseGetter() - .request( - BaseAddress.API, - ApiResource.RequestMethod.POST, - path, - params, - CardDesign.class, - options, - ApiMode.V1); - } - - /** - * Updates the {@code status} of the specified testmode card design object to {@code rejected}. - */ - public CardDesign rejectTestmode(CardDesignRejectTestmodeParams params) throws StripeException { - return rejectTestmode(params, (RequestOptions) null); - } - - /** - * Updates the {@code status} of the specified testmode card design object to {@code rejected}. - */ - public CardDesign rejectTestmode(CardDesignRejectTestmodeParams params, RequestOptions options) - throws StripeException { - String path = - String.format( - "/v1/test_helpers/issuing/card_designs/%s/status/reject", - ApiResource.urlEncodeId(this.resource.getId())); - ApiResource.checkNullTypedParams(path, params); - return resource - .getResponseGetter() - .request( - BaseAddress.API, - ApiResource.RequestMethod.POST, - path, - ApiRequestParams.paramsToMap(params), - CardDesign.class, - options, - ApiMode.V1); - } - } - - @Override - public void setResponseGetter(StripeResponseGetter responseGetter) { - super.setResponseGetter(responseGetter); - trySetResponseGetter(cardBundle, responseGetter); - trySetResponseGetter(cardLogo, responseGetter); - trySetResponseGetter(carrierText, responseGetter); - trySetResponseGetter(preferences, responseGetter); - trySetResponseGetter(rejectionReasons, responseGetter); - } -} diff --git a/src/main/java/com/stripe/model/issuing/PersonalizationDesign.java b/src/main/java/com/stripe/model/issuing/PersonalizationDesign.java new file mode 100644 index 00000000000..8cd259f30cf --- /dev/null +++ b/src/main/java/com/stripe/model/issuing/PersonalizationDesign.java @@ -0,0 +1,631 @@ +// File generated from our OpenAPI spec +package com.stripe.model.issuing; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.ExpandableField; +import com.stripe.model.File; +import com.stripe.model.HasId; +import com.stripe.model.MetadataStore; +import com.stripe.model.StripeObject; +import com.stripe.net.ApiMode; +import com.stripe.net.ApiRequestParams; +import com.stripe.net.ApiResource; +import com.stripe.net.BaseAddress; +import com.stripe.net.RequestOptions; +import com.stripe.net.StripeResponseGetter; +import com.stripe.param.issuing.PersonalizationDesignActivateParams; +import com.stripe.param.issuing.PersonalizationDesignCreateParams; +import com.stripe.param.issuing.PersonalizationDesignDeactivateParams; +import com.stripe.param.issuing.PersonalizationDesignListParams; +import com.stripe.param.issuing.PersonalizationDesignRejectParams; +import com.stripe.param.issuing.PersonalizationDesignRetrieveParams; +import com.stripe.param.issuing.PersonalizationDesignUpdateParams; +import java.util.List; +import java.util.Map; +import lombok.EqualsAndHashCode; +import lombok.Getter; +import lombok.Setter; + +/** + * A Personalization Design is a logical grouping of a Physical Bundle, card logo, and carrier text + * that represents a product line. + */ +@Getter +@Setter +@EqualsAndHashCode(callSuper = false) +public class PersonalizationDesign extends ApiResource + implements HasId, MetadataStore { + /** The file for the card logo, for use with physical bundles that support card logos. */ + @SerializedName("card_logo") + @Getter(lombok.AccessLevel.NONE) + @Setter(lombok.AccessLevel.NONE) + ExpandableField cardLogo; + + /** Hash containing carrier text, for use with physical bundles that support carrier text. */ + @SerializedName("carrier_text") + CarrierText carrierText; + + /** Unique identifier for the object. */ + @Getter(onMethod_ = {@Override}) + @SerializedName("id") + String id; + + /** + * A lookup key used to retrieve personalization designs dynamically from a static string. This + * may be up to 200 characters. + */ + @SerializedName("lookup_key") + String lookupKey; + + /** + * Set of key-value pairs that you can attach + * to an object. This can be useful for storing additional information about the object in a + * structured format. + */ + @Getter(onMethod_ = {@Override}) + @SerializedName("metadata") + Map metadata; + + /** Friendly display name. */ + @SerializedName("name") + String name; + + /** + * String representing the object's type. Objects of the same type share the same value. + * + *

Equal to {@code issuing.personalization_design}. + */ + @SerializedName("object") + String object; + + /** The physical bundle object belonging to this personalization design. */ + @SerializedName("physical_bundle") + @Getter(lombok.AccessLevel.NONE) + @Setter(lombok.AccessLevel.NONE) + ExpandableField physicalBundle; + + @SerializedName("preferences") + Preferences preferences; + + @SerializedName("rejection_reasons") + RejectionReasons rejectionReasons; + + /** + * Whether this personalization design can be used to create cards. + * + *

One of {@code active}, {@code inactive}, {@code rejected}, or {@code review}. + */ + @SerializedName("status") + String status; + + /** Get ID of expandable {@code cardLogo} object. */ + public String getCardLogo() { + return (this.cardLogo != null) ? this.cardLogo.getId() : null; + } + + public void setCardLogo(String id) { + this.cardLogo = ApiResource.setExpandableFieldId(id, this.cardLogo); + } + + /** Get expanded {@code cardLogo}. */ + public File getCardLogoObject() { + return (this.cardLogo != null) ? this.cardLogo.getExpanded() : null; + } + + public void setCardLogoObject(File expandableObject) { + this.cardLogo = new ExpandableField(expandableObject.getId(), expandableObject); + } + + /** Get ID of expandable {@code physicalBundle} object. */ + public String getPhysicalBundle() { + return (this.physicalBundle != null) ? this.physicalBundle.getId() : null; + } + + public void setPhysicalBundle(String id) { + this.physicalBundle = ApiResource.setExpandableFieldId(id, this.physicalBundle); + } + + /** Get expanded {@code physicalBundle}. */ + public PhysicalBundle getPhysicalBundleObject() { + return (this.physicalBundle != null) ? this.physicalBundle.getExpanded() : null; + } + + public void setPhysicalBundleObject(PhysicalBundle expandableObject) { + this.physicalBundle = + new ExpandableField(expandableObject.getId(), expandableObject); + } + + /** Creates a personalization design object. */ + public static PersonalizationDesign create(Map params) throws StripeException { + return create(params, (RequestOptions) null); + } + + /** Creates a personalization design object. */ + public static PersonalizationDesign create(Map params, RequestOptions options) + throws StripeException { + String path = "/v1/issuing/personalization_designs"; + return getGlobalResponseGetter() + .request( + BaseAddress.API, + ApiResource.RequestMethod.POST, + path, + params, + PersonalizationDesign.class, + options, + ApiMode.V1); + } + + /** Creates a personalization design object. */ + public static PersonalizationDesign create(PersonalizationDesignCreateParams params) + throws StripeException { + return create(params, (RequestOptions) null); + } + + /** Creates a personalization design object. */ + public static PersonalizationDesign create( + PersonalizationDesignCreateParams params, RequestOptions options) throws StripeException { + String path = "/v1/issuing/personalization_designs"; + ApiResource.checkNullTypedParams(path, params); + return getGlobalResponseGetter() + .request( + BaseAddress.API, + ApiResource.RequestMethod.POST, + path, + ApiRequestParams.paramsToMap(params), + PersonalizationDesign.class, + options, + ApiMode.V1); + } + + /** + * Returns a list of personalization design objects. The objects are sorted in descending order by + * creation date, with the most recently created object appearing first. + */ + public static PersonalizationDesignCollection list(Map params) + throws StripeException { + return list(params, (RequestOptions) null); + } + + /** + * Returns a list of personalization design objects. The objects are sorted in descending order by + * creation date, with the most recently created object appearing first. + */ + public static PersonalizationDesignCollection list( + Map params, RequestOptions options) throws StripeException { + String path = "/v1/issuing/personalization_designs"; + return getGlobalResponseGetter() + .request( + BaseAddress.API, + ApiResource.RequestMethod.GET, + path, + params, + PersonalizationDesignCollection.class, + options, + ApiMode.V1); + } + + /** + * Returns a list of personalization design objects. The objects are sorted in descending order by + * creation date, with the most recently created object appearing first. + */ + public static PersonalizationDesignCollection list(PersonalizationDesignListParams params) + throws StripeException { + return list(params, (RequestOptions) null); + } + + /** + * Returns a list of personalization design objects. The objects are sorted in descending order by + * creation date, with the most recently created object appearing first. + */ + public static PersonalizationDesignCollection list( + PersonalizationDesignListParams params, RequestOptions options) throws StripeException { + String path = "/v1/issuing/personalization_designs"; + ApiResource.checkNullTypedParams(path, params); + return getGlobalResponseGetter() + .request( + BaseAddress.API, + ApiResource.RequestMethod.GET, + path, + ApiRequestParams.paramsToMap(params), + PersonalizationDesignCollection.class, + options, + ApiMode.V1); + } + + /** Retrieves a personalization design object. */ + public static PersonalizationDesign retrieve(String personalizationDesign) + throws StripeException { + return retrieve(personalizationDesign, (Map) null, (RequestOptions) null); + } + + /** Retrieves a personalization design object. */ + public static PersonalizationDesign retrieve(String personalizationDesign, RequestOptions options) + throws StripeException { + return retrieve(personalizationDesign, (Map) null, options); + } + + /** Retrieves a personalization design object. */ + public static PersonalizationDesign retrieve( + String personalizationDesign, Map params, RequestOptions options) + throws StripeException { + String path = + String.format( + "/v1/issuing/personalization_designs/%s", + ApiResource.urlEncodeId(personalizationDesign)); + return getGlobalResponseGetter() + .request( + BaseAddress.API, + ApiResource.RequestMethod.GET, + path, + params, + PersonalizationDesign.class, + options, + ApiMode.V1); + } + + /** Retrieves a personalization design object. */ + public static PersonalizationDesign retrieve( + String personalizationDesign, + PersonalizationDesignRetrieveParams params, + RequestOptions options) + throws StripeException { + String path = + String.format( + "/v1/issuing/personalization_designs/%s", + ApiResource.urlEncodeId(personalizationDesign)); + ApiResource.checkNullTypedParams(path, params); + return getGlobalResponseGetter() + .request( + BaseAddress.API, + ApiResource.RequestMethod.GET, + path, + ApiRequestParams.paramsToMap(params), + PersonalizationDesign.class, + options, + ApiMode.V1); + } + + /** Updates a card personalization object. */ + @Override + public PersonalizationDesign update(Map params) throws StripeException { + return update(params, (RequestOptions) null); + } + + /** Updates a card personalization object. */ + @Override + public PersonalizationDesign update(Map params, RequestOptions options) + throws StripeException { + String path = + String.format( + "/v1/issuing/personalization_designs/%s", ApiResource.urlEncodeId(this.getId())); + return getResponseGetter() + .request( + BaseAddress.API, + ApiResource.RequestMethod.POST, + path, + params, + PersonalizationDesign.class, + options, + ApiMode.V1); + } + + /** Updates a card personalization object. */ + public PersonalizationDesign update(PersonalizationDesignUpdateParams params) + throws StripeException { + return update(params, (RequestOptions) null); + } + + /** Updates a card personalization object. */ + public PersonalizationDesign update( + PersonalizationDesignUpdateParams params, RequestOptions options) throws StripeException { + String path = + String.format( + "/v1/issuing/personalization_designs/%s", ApiResource.urlEncodeId(this.getId())); + ApiResource.checkNullTypedParams(path, params); + return getResponseGetter() + .request( + BaseAddress.API, + ApiResource.RequestMethod.POST, + path, + ApiRequestParams.paramsToMap(params), + PersonalizationDesign.class, + options, + ApiMode.V1); + } + + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class CarrierText extends StripeObject { + /** The footer body text of the carrier letter. */ + @SerializedName("footer_body") + String footerBody; + + /** The footer title text of the carrier letter. */ + @SerializedName("footer_title") + String footerTitle; + + /** The header body text of the carrier letter. */ + @SerializedName("header_body") + String headerBody; + + /** The header title text of the carrier letter. */ + @SerializedName("header_title") + String headerTitle; + } + + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Preferences extends StripeObject { + /** + * Whether this personalization design is used to create cards when one is not specified. A + * connected account will use the Connect platform's default if no personalization design is set + * as the account default. + */ + @SerializedName("account_default") + Boolean accountDefault; + + /** + * Whether this personalization design is used to create cards when one is not specified and an + * account default for this connected account does not exist. + */ + @SerializedName("platform_default") + Boolean platformDefault; + } + + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class RejectionReasons extends StripeObject { + /** The reason(s) the card logo was rejected. */ + @SerializedName("card_logo") + List cardLogo; + + /** The reason(s) the carrier text was rejected. */ + @SerializedName("carrier_text") + List carrierText; + } + + public TestHelpers getTestHelpers() { + return new TestHelpers(this); + } + + public static class TestHelpers { + private final PersonalizationDesign resource; + + private TestHelpers(PersonalizationDesign resource) { + this.resource = resource; + } + + /** + * Updates the {@code status} of the specified testmode personalization design object to {@code + * active}. + */ + public PersonalizationDesign activate() throws StripeException { + return activate((Map) null, (RequestOptions) null); + } + + /** + * Updates the {@code status} of the specified testmode personalization design object to {@code + * active}. + */ + public PersonalizationDesign activate(RequestOptions options) throws StripeException { + return activate((Map) null, options); + } + + /** + * Updates the {@code status} of the specified testmode personalization design object to {@code + * active}. + */ + public PersonalizationDesign activate(Map params) throws StripeException { + return activate(params, (RequestOptions) null); + } + + /** + * Updates the {@code status} of the specified testmode personalization design object to {@code + * active}. + */ + public PersonalizationDesign activate(Map params, RequestOptions options) + throws StripeException { + String path = + String.format( + "/v1/test_helpers/issuing/personalization_designs/%s/activate", + ApiResource.urlEncodeId(this.resource.getId())); + return resource + .getResponseGetter() + .request( + BaseAddress.API, + ApiResource.RequestMethod.POST, + path, + params, + PersonalizationDesign.class, + options, + ApiMode.V1); + } + + /** + * Updates the {@code status} of the specified testmode personalization design object to {@code + * active}. + */ + public PersonalizationDesign activate(PersonalizationDesignActivateParams params) + throws StripeException { + return activate(params, (RequestOptions) null); + } + + /** + * Updates the {@code status} of the specified testmode personalization design object to {@code + * active}. + */ + public PersonalizationDesign activate( + PersonalizationDesignActivateParams params, RequestOptions options) throws StripeException { + String path = + String.format( + "/v1/test_helpers/issuing/personalization_designs/%s/activate", + ApiResource.urlEncodeId(this.resource.getId())); + ApiResource.checkNullTypedParams(path, params); + return resource + .getResponseGetter() + .request( + BaseAddress.API, + ApiResource.RequestMethod.POST, + path, + ApiRequestParams.paramsToMap(params), + PersonalizationDesign.class, + options, + ApiMode.V1); + } + + /** + * Updates the {@code status} of the specified testmode personalization design object to {@code + * inactive}. + */ + public PersonalizationDesign deactivate() throws StripeException { + return deactivate((Map) null, (RequestOptions) null); + } + + /** + * Updates the {@code status} of the specified testmode personalization design object to {@code + * inactive}. + */ + public PersonalizationDesign deactivate(RequestOptions options) throws StripeException { + return deactivate((Map) null, options); + } + + /** + * Updates the {@code status} of the specified testmode personalization design object to {@code + * inactive}. + */ + public PersonalizationDesign deactivate(Map params) throws StripeException { + return deactivate(params, (RequestOptions) null); + } + + /** + * Updates the {@code status} of the specified testmode personalization design object to {@code + * inactive}. + */ + public PersonalizationDesign deactivate(Map params, RequestOptions options) + throws StripeException { + String path = + String.format( + "/v1/test_helpers/issuing/personalization_designs/%s/deactivate", + ApiResource.urlEncodeId(this.resource.getId())); + return resource + .getResponseGetter() + .request( + BaseAddress.API, + ApiResource.RequestMethod.POST, + path, + params, + PersonalizationDesign.class, + options, + ApiMode.V1); + } + + /** + * Updates the {@code status} of the specified testmode personalization design object to {@code + * inactive}. + */ + public PersonalizationDesign deactivate(PersonalizationDesignDeactivateParams params) + throws StripeException { + return deactivate(params, (RequestOptions) null); + } + + /** + * Updates the {@code status} of the specified testmode personalization design object to {@code + * inactive}. + */ + public PersonalizationDesign deactivate( + PersonalizationDesignDeactivateParams params, RequestOptions options) + throws StripeException { + String path = + String.format( + "/v1/test_helpers/issuing/personalization_designs/%s/deactivate", + ApiResource.urlEncodeId(this.resource.getId())); + ApiResource.checkNullTypedParams(path, params); + return resource + .getResponseGetter() + .request( + BaseAddress.API, + ApiResource.RequestMethod.POST, + path, + ApiRequestParams.paramsToMap(params), + PersonalizationDesign.class, + options, + ApiMode.V1); + } + + /** + * Updates the {@code status} of the specified testmode personalization design object to {@code + * rejected}. + */ + public PersonalizationDesign reject(Map params) throws StripeException { + return reject(params, (RequestOptions) null); + } + + /** + * Updates the {@code status} of the specified testmode personalization design object to {@code + * rejected}. + */ + public PersonalizationDesign reject(Map params, RequestOptions options) + throws StripeException { + String path = + String.format( + "/v1/test_helpers/issuing/personalization_designs/%s/reject", + ApiResource.urlEncodeId(this.resource.getId())); + return resource + .getResponseGetter() + .request( + BaseAddress.API, + ApiResource.RequestMethod.POST, + path, + params, + PersonalizationDesign.class, + options, + ApiMode.V1); + } + + /** + * Updates the {@code status} of the specified testmode personalization design object to {@code + * rejected}. + */ + public PersonalizationDesign reject(PersonalizationDesignRejectParams params) + throws StripeException { + return reject(params, (RequestOptions) null); + } + + /** + * Updates the {@code status} of the specified testmode personalization design object to {@code + * rejected}. + */ + public PersonalizationDesign reject( + PersonalizationDesignRejectParams params, RequestOptions options) throws StripeException { + String path = + String.format( + "/v1/test_helpers/issuing/personalization_designs/%s/reject", + ApiResource.urlEncodeId(this.resource.getId())); + ApiResource.checkNullTypedParams(path, params); + return resource + .getResponseGetter() + .request( + BaseAddress.API, + ApiResource.RequestMethod.POST, + path, + ApiRequestParams.paramsToMap(params), + PersonalizationDesign.class, + options, + ApiMode.V1); + } + } + + @Override + public void setResponseGetter(StripeResponseGetter responseGetter) { + super.setResponseGetter(responseGetter); + trySetResponseGetter(cardLogo, responseGetter); + trySetResponseGetter(carrierText, responseGetter); + trySetResponseGetter(physicalBundle, responseGetter); + trySetResponseGetter(preferences, responseGetter); + trySetResponseGetter(rejectionReasons, responseGetter); + } +} diff --git a/src/main/java/com/stripe/model/issuing/CardDesignCollection.java b/src/main/java/com/stripe/model/issuing/PersonalizationDesignCollection.java similarity index 55% rename from src/main/java/com/stripe/model/issuing/CardDesignCollection.java rename to src/main/java/com/stripe/model/issuing/PersonalizationDesignCollection.java index fab093aafa4..fb15877a7f8 100644 --- a/src/main/java/com/stripe/model/issuing/CardDesignCollection.java +++ b/src/main/java/com/stripe/model/issuing/PersonalizationDesignCollection.java @@ -3,4 +3,4 @@ import com.stripe.model.StripeCollection; -public class CardDesignCollection extends StripeCollection {} +public class PersonalizationDesignCollection extends StripeCollection {} diff --git a/src/main/java/com/stripe/model/issuing/CardBundle.java b/src/main/java/com/stripe/model/issuing/PhysicalBundle.java similarity index 54% rename from src/main/java/com/stripe/model/issuing/CardBundle.java rename to src/main/java/com/stripe/model/issuing/PhysicalBundle.java index a3da5fe218c..f29a2fd9063 100644 --- a/src/main/java/com/stripe/model/issuing/CardBundle.java +++ b/src/main/java/com/stripe/model/issuing/PhysicalBundle.java @@ -11,21 +11,21 @@ import com.stripe.net.BaseAddress; import com.stripe.net.RequestOptions; import com.stripe.net.StripeResponseGetter; -import com.stripe.param.issuing.CardBundleListParams; -import com.stripe.param.issuing.CardBundleRetrieveParams; +import com.stripe.param.issuing.PhysicalBundleListParams; +import com.stripe.param.issuing.PhysicalBundleRetrieveParams; import java.util.Map; import lombok.EqualsAndHashCode; import lombok.Getter; import lombok.Setter; /** - * A Card Bundle represents the bundle of physical items - card stock, carrier letter, and envelope - * - that is shipped to a cardholder when you create a physical card. + * A Physical Bundle represents the bundle of physical items - card stock, carrier letter, and + * envelope - that is shipped to a cardholder when you create a physical card. */ @Getter @Setter @EqualsAndHashCode(callSuper = false) -public class CardBundle extends ApiResource implements HasId { +public class PhysicalBundle extends ApiResource implements HasId { @SerializedName("features") Features features; @@ -48,13 +48,13 @@ public class CardBundle extends ApiResource implements HasId { /** * String representing the object's type. Objects of the same type share the same value. * - *

Equal to {@code issuing.card_bundle}. + *

Equal to {@code issuing.physical_bundle}. */ @SerializedName("object") String object; /** - * Whether this card bundle can be used to create cards. + * Whether this physical bundle can be used to create cards. * *

One of {@code active}, {@code inactive}, or {@code review}. */ @@ -62,7 +62,7 @@ public class CardBundle extends ApiResource implements HasId { String status; /** - * Whether this card bundle is a standard Stripe offering or custom-made for you. + * Whether this physical bundle is a standard Stripe offering or custom-made for you. * *

One of {@code custom}, or {@code standard}. */ @@ -70,46 +70,47 @@ public class CardBundle extends ApiResource implements HasId { String type; /** - * Returns a list of card bundle objects. The objects are sorted in descending order by creation - * date, with the most recently created object appearing first. + * Returns a list of physical bundle objects. The objects are sorted in descending order by + * creation date, with the most recently created object appearing first. */ - public static CardBundleCollection list(Map params) throws StripeException { + public static PhysicalBundleCollection list(Map params) throws StripeException { return list(params, (RequestOptions) null); } /** - * Returns a list of card bundle objects. The objects are sorted in descending order by creation - * date, with the most recently created object appearing first. + * Returns a list of physical bundle objects. The objects are sorted in descending order by + * creation date, with the most recently created object appearing first. */ - public static CardBundleCollection list(Map params, RequestOptions options) + public static PhysicalBundleCollection list(Map params, RequestOptions options) throws StripeException { - String path = "/v1/issuing/card_bundles"; + String path = "/v1/issuing/physical_bundles"; return getGlobalResponseGetter() .request( BaseAddress.API, ApiResource.RequestMethod.GET, path, params, - CardBundleCollection.class, + PhysicalBundleCollection.class, options, ApiMode.V1); } /** - * Returns a list of card bundle objects. The objects are sorted in descending order by creation - * date, with the most recently created object appearing first. + * Returns a list of physical bundle objects. The objects are sorted in descending order by + * creation date, with the most recently created object appearing first. */ - public static CardBundleCollection list(CardBundleListParams params) throws StripeException { + public static PhysicalBundleCollection list(PhysicalBundleListParams params) + throws StripeException { return list(params, (RequestOptions) null); } /** - * Returns a list of card bundle objects. The objects are sorted in descending order by creation - * date, with the most recently created object appearing first. + * Returns a list of physical bundle objects. The objects are sorted in descending order by + * creation date, with the most recently created object appearing first. */ - public static CardBundleCollection list(CardBundleListParams params, RequestOptions options) - throws StripeException { - String path = "/v1/issuing/card_bundles"; + public static PhysicalBundleCollection list( + PhysicalBundleListParams params, RequestOptions options) throws StripeException { + String path = "/v1/issuing/physical_bundles"; ApiResource.checkNullTypedParams(path, params); return getGlobalResponseGetter() .request( @@ -117,43 +118,45 @@ public static CardBundleCollection list(CardBundleListParams params, RequestOpti ApiResource.RequestMethod.GET, path, ApiRequestParams.paramsToMap(params), - CardBundleCollection.class, + PhysicalBundleCollection.class, options, ApiMode.V1); } - /** Retrieves a card bundle object. */ - public static CardBundle retrieve(String cardBundle) throws StripeException { - return retrieve(cardBundle, (Map) null, (RequestOptions) null); + /** Retrieves a physical bundle object. */ + public static PhysicalBundle retrieve(String physicalBundle) throws StripeException { + return retrieve(physicalBundle, (Map) null, (RequestOptions) null); } - /** Retrieves a card bundle object. */ - public static CardBundle retrieve(String cardBundle, RequestOptions options) + /** Retrieves a physical bundle object. */ + public static PhysicalBundle retrieve(String physicalBundle, RequestOptions options) throws StripeException { - return retrieve(cardBundle, (Map) null, options); + return retrieve(physicalBundle, (Map) null, options); } - /** Retrieves a card bundle object. */ - public static CardBundle retrieve( - String cardBundle, Map params, RequestOptions options) + /** Retrieves a physical bundle object. */ + public static PhysicalBundle retrieve( + String physicalBundle, Map params, RequestOptions options) throws StripeException { - String path = String.format("/v1/issuing/card_bundles/%s", ApiResource.urlEncodeId(cardBundle)); + String path = + String.format("/v1/issuing/physical_bundles/%s", ApiResource.urlEncodeId(physicalBundle)); return getGlobalResponseGetter() .request( BaseAddress.API, ApiResource.RequestMethod.GET, path, params, - CardBundle.class, + PhysicalBundle.class, options, ApiMode.V1); } - /** Retrieves a card bundle object. */ - public static CardBundle retrieve( - String cardBundle, CardBundleRetrieveParams params, RequestOptions options) + /** Retrieves a physical bundle object. */ + public static PhysicalBundle retrieve( + String physicalBundle, PhysicalBundleRetrieveParams params, RequestOptions options) throws StripeException { - String path = String.format("/v1/issuing/card_bundles/%s", ApiResource.urlEncodeId(cardBundle)); + String path = + String.format("/v1/issuing/physical_bundles/%s", ApiResource.urlEncodeId(physicalBundle)); ApiResource.checkNullTypedParams(path, params); return getGlobalResponseGetter() .request( @@ -161,7 +164,7 @@ public static CardBundle retrieve( ApiResource.RequestMethod.GET, path, ApiRequestParams.paramsToMap(params), - CardBundle.class, + PhysicalBundle.class, options, ApiMode.V1); } @@ -171,7 +174,7 @@ public static CardBundle retrieve( @EqualsAndHashCode(callSuper = false) public static class Features extends StripeObject { /** - * The policy for how to use card logo images in a card design with this card bundle. + * The policy for how to use card logo images in a card design with this physical bundle. * *

One of {@code optional}, {@code required}, or {@code unsupported}. */ @@ -179,7 +182,7 @@ public static class Features extends StripeObject { String cardLogo; /** - * The policy for how to use carrier letter text in a card design with this card bundle. + * The policy for how to use carrier letter text in a card design with this physical bundle. * *

One of {@code optional}, {@code required}, or {@code unsupported}. */ diff --git a/src/main/java/com/stripe/model/issuing/CardBundleCollection.java b/src/main/java/com/stripe/model/issuing/PhysicalBundleCollection.java similarity index 59% rename from src/main/java/com/stripe/model/issuing/CardBundleCollection.java rename to src/main/java/com/stripe/model/issuing/PhysicalBundleCollection.java index a6ad9db7fc3..c3791196223 100644 --- a/src/main/java/com/stripe/model/issuing/CardBundleCollection.java +++ b/src/main/java/com/stripe/model/issuing/PhysicalBundleCollection.java @@ -3,4 +3,4 @@ import com.stripe.model.StripeCollection; -public class CardBundleCollection extends StripeCollection {} +public class PhysicalBundleCollection extends StripeCollection {} diff --git a/src/main/java/com/stripe/model/treasury/ReceivedCredit.java b/src/main/java/com/stripe/model/treasury/ReceivedCredit.java index aa2a49a08cd..ff19608ddc7 100644 --- a/src/main/java/com/stripe/model/treasury/ReceivedCredit.java +++ b/src/main/java/com/stripe/model/treasury/ReceivedCredit.java @@ -404,9 +404,9 @@ public static class SourceFlowDetails extends StripeObject { * A {@code Payout} object is created when you receive funds from Stripe, or when you initiate * a payout to either a bank account or debit card of a connected Stripe - * account. You can retrieve individual payouts, as well as list all payouts. Payouts are - * made on varying - * schedules, depending on your country and industry. + * account. You can retrieve individual payouts, and list all payouts. Payouts are made on + * varying schedules, + * depending on your country and industry. * *

Related guide: Receiving payouts */ diff --git a/src/main/java/com/stripe/param/AccountLinkCreateParams.java b/src/main/java/com/stripe/param/AccountLinkCreateParams.java index 873b51f0d2d..7763d71c707 100644 --- a/src/main/java/com/stripe/param/AccountLinkCreateParams.java +++ b/src/main/java/com/stripe/param/AccountLinkCreateParams.java @@ -221,7 +221,13 @@ public enum Type implements ApiRequestParams.EnumParam { ACCOUNT_ONBOARDING("account_onboarding"), @SerializedName("account_update") - ACCOUNT_UPDATE("account_update"); + ACCOUNT_UPDATE("account_update"), + + @SerializedName("capital_financing_offer") + CAPITAL_FINANCING_OFFER("capital_financing_offer"), + + @SerializedName("capital_financing_reporting") + CAPITAL_FINANCING_REPORTING("capital_financing_reporting"); @Getter(onMethod_ = {@Override}) private final String value; diff --git a/src/main/java/com/stripe/param/AccountSessionCreateParams.java b/src/main/java/com/stripe/param/AccountSessionCreateParams.java index 4bf9e08a424..70e29c045da 100644 --- a/src/main/java/com/stripe/param/AccountSessionCreateParams.java +++ b/src/main/java/com/stripe/param/AccountSessionCreateParams.java @@ -265,9 +265,15 @@ public static class AccountOnboarding { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - private AccountOnboarding(Boolean enabled, Map extraParams) { + /** The list of features enabled in the embedded component. */ + @SerializedName("features") + Features features; + + private AccountOnboarding( + Boolean enabled, Map extraParams, Features features) { this.enabled = enabled; this.extraParams = extraParams; + this.features = features; } public static Builder builder() { @@ -279,10 +285,12 @@ public static class Builder { private Map extraParams; + private Features features; + /** Finalize and obtain parameter instance from this builder. */ public AccountSessionCreateParams.Components.AccountOnboarding build() { return new AccountSessionCreateParams.Components.AccountOnboarding( - this.enabled, this.extraParams); + this.enabled, this.extraParams, this.features); } /** Required. Whether the embedded component is enabled. */ @@ -318,6 +326,74 @@ public Builder putAllExtraParam(Map map) { this.extraParams.putAll(map); return this; } + + /** The list of features enabled in the embedded component. */ + public Builder setFeatures( + AccountSessionCreateParams.Components.AccountOnboarding.Features features) { + this.features = features; + return this; + } + } + + @Getter + public static class Features { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + private Features(Map extraParams) { + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountSessionCreateParams.Components.AccountOnboarding.Features build() { + return new AccountSessionCreateParams.Components.AccountOnboarding.Features( + this.extraParams); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * AccountSessionCreateParams.Components.AccountOnboarding.Features#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * AccountSessionCreateParams.Components.AccountOnboarding.Features#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } } } @@ -336,9 +412,14 @@ public static class PaymentDetails { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - private PaymentDetails(Boolean enabled, Map extraParams) { + /** The list of features enabled in the embedded component. */ + @SerializedName("features") + Features features; + + private PaymentDetails(Boolean enabled, Map extraParams, Features features) { this.enabled = enabled; this.extraParams = extraParams; + this.features = features; } public static Builder builder() { @@ -350,10 +431,12 @@ public static class Builder { private Map extraParams; + private Features features; + /** Finalize and obtain parameter instance from this builder. */ public AccountSessionCreateParams.Components.PaymentDetails build() { return new AccountSessionCreateParams.Components.PaymentDetails( - this.enabled, this.extraParams); + this.enabled, this.extraParams, this.features); } /** Required. Whether the embedded component is enabled. */ @@ -389,6 +472,132 @@ public Builder putAllExtraParam(Map map) { this.extraParams.putAll(map); return this; } + + /** The list of features enabled in the embedded component. */ + public Builder setFeatures( + AccountSessionCreateParams.Components.PaymentDetails.Features features) { + this.features = features; + return this; + } + } + + @Getter + public static class Features { + /** + * Whether to allow capturing and cancelling payment intents. This is {@code true} by + * default. + */ + @SerializedName("capture_payments") + Boolean capturePayments; + + /** + * Whether to allow responding to disputes, including submitting evidence and accepting + * disputes. This is {@code true} by default. + */ + @SerializedName("dispute_management") + Boolean disputeManagement; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Whether to allow sending refunds. This is {@code true} by default. */ + @SerializedName("refund_management") + Boolean refundManagement; + + private Features( + Boolean capturePayments, + Boolean disputeManagement, + Map extraParams, + Boolean refundManagement) { + this.capturePayments = capturePayments; + this.disputeManagement = disputeManagement; + this.extraParams = extraParams; + this.refundManagement = refundManagement; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Boolean capturePayments; + + private Boolean disputeManagement; + + private Map extraParams; + + private Boolean refundManagement; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountSessionCreateParams.Components.PaymentDetails.Features build() { + return new AccountSessionCreateParams.Components.PaymentDetails.Features( + this.capturePayments, + this.disputeManagement, + this.extraParams, + this.refundManagement); + } + + /** + * Whether to allow capturing and cancelling payment intents. This is {@code true} by + * default. + */ + public Builder setCapturePayments(Boolean capturePayments) { + this.capturePayments = capturePayments; + return this; + } + + /** + * Whether to allow responding to disputes, including submitting evidence and accepting + * disputes. This is {@code true} by default. + */ + public Builder setDisputeManagement(Boolean disputeManagement) { + this.disputeManagement = disputeManagement; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * AccountSessionCreateParams.Components.PaymentDetails.Features#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * AccountSessionCreateParams.Components.PaymentDetails.Features#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Whether to allow sending refunds. This is {@code true} by default. */ + public Builder setRefundManagement(Boolean refundManagement) { + this.refundManagement = refundManagement; + return this; + } + } } } @@ -407,9 +616,14 @@ public static class Payments { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - private Payments(Boolean enabled, Map extraParams) { + /** The list of features enabled in the embedded component. */ + @SerializedName("features") + Features features; + + private Payments(Boolean enabled, Map extraParams, Features features) { this.enabled = enabled; this.extraParams = extraParams; + this.features = features; } public static Builder builder() { @@ -421,9 +635,12 @@ public static class Builder { private Map extraParams; + private Features features; + /** Finalize and obtain parameter instance from this builder. */ public AccountSessionCreateParams.Components.Payments build() { - return new AccountSessionCreateParams.Components.Payments(this.enabled, this.extraParams); + return new AccountSessionCreateParams.Components.Payments( + this.enabled, this.extraParams, this.features); } /** Required. Whether the embedded component is enabled. */ @@ -459,6 +676,130 @@ public Builder putAllExtraParam(Map map) { this.extraParams.putAll(map); return this; } + + /** The list of features enabled in the embedded component. */ + public Builder setFeatures( + AccountSessionCreateParams.Components.Payments.Features features) { + this.features = features; + return this; + } + } + + @Getter + public static class Features { + /** + * Whether to allow capturing and cancelling payment intents. This is {@code true} by + * default. + */ + @SerializedName("capture_payments") + Boolean capturePayments; + + /** + * Whether to allow responding to disputes, including submitting evidence and accepting + * disputes. This is {@code true} by default. + */ + @SerializedName("dispute_management") + Boolean disputeManagement; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Whether to allow sending refunds. This is {@code true} by default. */ + @SerializedName("refund_management") + Boolean refundManagement; + + private Features( + Boolean capturePayments, + Boolean disputeManagement, + Map extraParams, + Boolean refundManagement) { + this.capturePayments = capturePayments; + this.disputeManagement = disputeManagement; + this.extraParams = extraParams; + this.refundManagement = refundManagement; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Boolean capturePayments; + + private Boolean disputeManagement; + + private Map extraParams; + + private Boolean refundManagement; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountSessionCreateParams.Components.Payments.Features build() { + return new AccountSessionCreateParams.Components.Payments.Features( + this.capturePayments, + this.disputeManagement, + this.extraParams, + this.refundManagement); + } + + /** + * Whether to allow capturing and cancelling payment intents. This is {@code true} by + * default. + */ + public Builder setCapturePayments(Boolean capturePayments) { + this.capturePayments = capturePayments; + return this; + } + + /** + * Whether to allow responding to disputes, including submitting evidence and accepting + * disputes. This is {@code true} by default. + */ + public Builder setDisputeManagement(Boolean disputeManagement) { + this.disputeManagement = disputeManagement; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AccountSessionCreateParams.Components.Payments.Features#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AccountSessionCreateParams.Components.Payments.Features#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Whether to allow sending refunds. This is {@code true} by default. */ + public Builder setRefundManagement(Boolean refundManagement) { + this.refundManagement = refundManagement; + return this; + } + } } } @@ -477,9 +818,14 @@ public static class Payouts { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - private Payouts(Boolean enabled, Map extraParams) { + /** The list of features enabled in the embedded component. */ + @SerializedName("features") + Features features; + + private Payouts(Boolean enabled, Map extraParams, Features features) { this.enabled = enabled; this.extraParams = extraParams; + this.features = features; } public static Builder builder() { @@ -491,9 +837,12 @@ public static class Builder { private Map extraParams; + private Features features; + /** Finalize and obtain parameter instance from this builder. */ public AccountSessionCreateParams.Components.Payouts build() { - return new AccountSessionCreateParams.Components.Payouts(this.enabled, this.extraParams); + return new AccountSessionCreateParams.Components.Payouts( + this.enabled, this.extraParams, this.features); } /** Required. Whether the embedded component is enabled. */ @@ -529,6 +878,71 @@ public Builder putAllExtraParam(Map map) { this.extraParams.putAll(map); return this; } + + /** The list of features enabled in the embedded component. */ + public Builder setFeatures( + AccountSessionCreateParams.Components.Payouts.Features features) { + this.features = features; + return this; + } + } + + @Getter + public static class Features { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + private Features(Map extraParams) { + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountSessionCreateParams.Components.Payouts.Features build() { + return new AccountSessionCreateParams.Components.Payouts.Features(this.extraParams); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AccountSessionCreateParams.Components.Payouts.Features#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AccountSessionCreateParams.Components.Payouts.Features#extraParams} for + * the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } } } } diff --git a/src/main/java/com/stripe/param/InvoiceCreateParams.java b/src/main/java/com/stripe/param/InvoiceCreateParams.java index 896dce1fb4b..c416126935f 100644 --- a/src/main/java/com/stripe/param/InvoiceCreateParams.java +++ b/src/main/java/com/stripe/param/InvoiceCreateParams.java @@ -184,7 +184,17 @@ public class InvoiceCreateParams extends ApiRequestParams { @SerializedName("pending_invoice_items_behavior") PendingInvoiceItemsBehavior pendingInvoiceItemsBehavior; - /** Options for invoice PDF rendering. */ + /** + * The rendering-related settings that control how the invoice is displayed on customer-facing + * surfaces such as PDF and Hosted Invoice Page. + */ + @SerializedName("rendering") + Rendering rendering; + + /** + * This is a legacy field that will be removed soon. For details about {@code rendering_options}, + * refer to {@code rendering} instead. Options for invoice PDF rendering. + */ @SerializedName("rendering_options") Object renderingOptions; @@ -249,6 +259,7 @@ private InvoiceCreateParams( String onBehalfOf, PaymentSettings paymentSettings, PendingInvoiceItemsBehavior pendingInvoiceItemsBehavior, + Rendering rendering, Object renderingOptions, ShippingCost shippingCost, ShippingDetails shippingDetails, @@ -280,6 +291,7 @@ private InvoiceCreateParams( this.onBehalfOf = onBehalfOf; this.paymentSettings = paymentSettings; this.pendingInvoiceItemsBehavior = pendingInvoiceItemsBehavior; + this.rendering = rendering; this.renderingOptions = renderingOptions; this.shippingCost = shippingCost; this.shippingDetails = shippingDetails; @@ -343,6 +355,8 @@ public static class Builder { private PendingInvoiceItemsBehavior pendingInvoiceItemsBehavior; + private Rendering rendering; + private Object renderingOptions; private ShippingCost shippingCost; @@ -383,6 +397,7 @@ public InvoiceCreateParams build() { this.onBehalfOf, this.paymentSettings, this.pendingInvoiceItemsBehavior, + this.rendering, this.renderingOptions, this.shippingCost, this.shippingDetails, @@ -818,13 +833,28 @@ public Builder setPendingInvoiceItemsBehavior( return this; } - /** Options for invoice PDF rendering. */ + /** + * The rendering-related settings that control how the invoice is displayed on customer-facing + * surfaces such as PDF and Hosted Invoice Page. + */ + public Builder setRendering(InvoiceCreateParams.Rendering rendering) { + this.rendering = rendering; + return this; + } + + /** + * This is a legacy field that will be removed soon. For details about {@code + * rendering_options}, refer to {@code rendering} instead. Options for invoice PDF rendering. + */ public Builder setRenderingOptions(InvoiceCreateParams.RenderingOptions renderingOptions) { this.renderingOptions = renderingOptions; return this; } - /** Options for invoice PDF rendering. */ + /** + * This is a legacy field that will be removed soon. For details about {@code + * rendering_options}, refer to {@code rendering} instead. Options for invoice PDF rendering. + */ public Builder setRenderingOptions(EmptyParam renderingOptions) { this.renderingOptions = renderingOptions; return this; @@ -3569,6 +3599,219 @@ public enum PaymentMethodType implements ApiRequestParams.EnumParam { } } + @Getter + public static class Rendering { + /** + * How line-item prices and amounts will be displayed with respect to tax on invoice PDFs. One + * of {@code exclude_tax} or {@code include_inclusive_tax}. {@code include_inclusive_tax} will + * include inclusive tax (and exclude exclusive tax) in invoice PDF amounts. {@code exclude_tax} + * will exclude all tax (inclusive and exclusive alike) from invoice PDF amounts. + */ + @SerializedName("amount_tax_display") + ApiRequestParams.EnumParam amountTaxDisplay; + + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-level field (serialized) name in this + * param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Invoice pdf rendering options. */ + @SerializedName("pdf") + Pdf pdf; + + private Rendering( + ApiRequestParams.EnumParam amountTaxDisplay, Map extraParams, Pdf pdf) { + this.amountTaxDisplay = amountTaxDisplay; + this.extraParams = extraParams; + this.pdf = pdf; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private ApiRequestParams.EnumParam amountTaxDisplay; + + private Map extraParams; + + private Pdf pdf; + + /** Finalize and obtain parameter instance from this builder. */ + public InvoiceCreateParams.Rendering build() { + return new InvoiceCreateParams.Rendering(this.amountTaxDisplay, this.extraParams, this.pdf); + } + + /** + * How line-item prices and amounts will be displayed with respect to tax on invoice PDFs. One + * of {@code exclude_tax} or {@code include_inclusive_tax}. {@code include_inclusive_tax} will + * include inclusive tax (and exclude exclusive tax) in invoice PDF amounts. {@code + * exclude_tax} will exclude all tax (inclusive and exclusive alike) from invoice PDF amounts. + */ + public Builder setAmountTaxDisplay( + InvoiceCreateParams.Rendering.AmountTaxDisplay amountTaxDisplay) { + this.amountTaxDisplay = amountTaxDisplay; + return this; + } + + /** + * How line-item prices and amounts will be displayed with respect to tax on invoice PDFs. One + * of {@code exclude_tax} or {@code include_inclusive_tax}. {@code include_inclusive_tax} will + * include inclusive tax (and exclude exclusive tax) in invoice PDF amounts. {@code + * exclude_tax} will exclude all tax (inclusive and exclusive alike) from invoice PDF amounts. + */ + public Builder setAmountTaxDisplay(EmptyParam amountTaxDisplay) { + this.amountTaxDisplay = amountTaxDisplay; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` + * call, and subsequent calls add additional key/value pairs to the original map. See {@link + * InvoiceCreateParams.Rendering#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link InvoiceCreateParams.Rendering#extraParams} for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Invoice pdf rendering options. */ + public Builder setPdf(InvoiceCreateParams.Rendering.Pdf pdf) { + this.pdf = pdf; + return this; + } + } + + @Getter + public static class Pdf { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Page size for invoice PDF. Can be set to a4, letter, or auto. If set to auto, page size + * will be switched to a4 or letter based on customer locale. + */ + @SerializedName("page_size") + PageSize pageSize; + + private Pdf(Map extraParams, PageSize pageSize) { + this.extraParams = extraParams; + this.pageSize = pageSize; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private PageSize pageSize; + + /** Finalize and obtain parameter instance from this builder. */ + public InvoiceCreateParams.Rendering.Pdf build() { + return new InvoiceCreateParams.Rendering.Pdf(this.extraParams, this.pageSize); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link InvoiceCreateParams.Rendering.Pdf#extraParams} for the field + * documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link InvoiceCreateParams.Rendering.Pdf#extraParams} for the field + * documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Page size for invoice PDF. Can be set to a4, letter, or auto. If set to auto, page size + * will be switched to a4 or letter based on customer locale. + */ + public Builder setPageSize(InvoiceCreateParams.Rendering.Pdf.PageSize pageSize) { + this.pageSize = pageSize; + return this; + } + } + + public enum PageSize implements ApiRequestParams.EnumParam { + @SerializedName("a4") + A4("a4"), + + @SerializedName("auto") + AUTO("auto"), + + @SerializedName("letter") + LETTER("letter"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + PageSize(String value) { + this.value = value; + } + } + } + + public enum AmountTaxDisplay implements ApiRequestParams.EnumParam { + @SerializedName("exclude_tax") + EXCLUDE_TAX("exclude_tax"), + + @SerializedName("include_inclusive_tax") + INCLUDE_INCLUSIVE_TAX("include_inclusive_tax"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + AmountTaxDisplay(String value) { + this.value = value; + } + } + } + @Getter public static class RenderingOptions { /** diff --git a/src/main/java/com/stripe/param/InvoiceUpdateParams.java b/src/main/java/com/stripe/param/InvoiceUpdateParams.java index aac8c4bdb4c..e6c7b3cb410 100644 --- a/src/main/java/com/stripe/param/InvoiceUpdateParams.java +++ b/src/main/java/com/stripe/param/InvoiceUpdateParams.java @@ -161,7 +161,17 @@ public class InvoiceUpdateParams extends ApiRequestParams { @SerializedName("payment_settings") PaymentSettings paymentSettings; - /** Options for invoice PDF rendering. */ + /** + * The rendering-related settings that control how the invoice is displayed on customer-facing + * surfaces such as PDF and Hosted Invoice Page. + */ + @SerializedName("rendering") + Rendering rendering; + + /** + * This is a legacy field that will be removed soon. For details about {@code rendering_options}, + * refer to {@code rendering} instead. Options for invoice PDF rendering. + */ @SerializedName("rendering_options") Object renderingOptions; @@ -215,6 +225,7 @@ private InvoiceUpdateParams( Object metadata, Object onBehalfOf, PaymentSettings paymentSettings, + Rendering rendering, Object renderingOptions, Object shippingCost, Object shippingDetails, @@ -241,6 +252,7 @@ private InvoiceUpdateParams( this.metadata = metadata; this.onBehalfOf = onBehalfOf; this.paymentSettings = paymentSettings; + this.rendering = rendering; this.renderingOptions = renderingOptions; this.shippingCost = shippingCost; this.shippingDetails = shippingDetails; @@ -295,6 +307,8 @@ public static class Builder { private PaymentSettings paymentSettings; + private Rendering rendering; + private Object renderingOptions; private Object shippingCost; @@ -329,6 +343,7 @@ public InvoiceUpdateParams build() { this.metadata, this.onBehalfOf, this.paymentSettings, + this.rendering, this.renderingOptions, this.shippingCost, this.shippingDetails, @@ -807,13 +822,28 @@ public Builder setPaymentSettings(InvoiceUpdateParams.PaymentSettings paymentSet return this; } - /** Options for invoice PDF rendering. */ + /** + * The rendering-related settings that control how the invoice is displayed on customer-facing + * surfaces such as PDF and Hosted Invoice Page. + */ + public Builder setRendering(InvoiceUpdateParams.Rendering rendering) { + this.rendering = rendering; + return this; + } + + /** + * This is a legacy field that will be removed soon. For details about {@code + * rendering_options}, refer to {@code rendering} instead. Options for invoice PDF rendering. + */ public Builder setRenderingOptions(InvoiceUpdateParams.RenderingOptions renderingOptions) { this.renderingOptions = renderingOptions; return this; } - /** Options for invoice PDF rendering. */ + /** + * This is a legacy field that will be removed soon. For details about {@code + * rendering_options}, refer to {@code rendering} instead. Options for invoice PDF rendering. + */ public Builder setRenderingOptions(EmptyParam renderingOptions) { this.renderingOptions = renderingOptions; return this; @@ -3555,6 +3585,219 @@ public enum PaymentMethodType implements ApiRequestParams.EnumParam { } } + @Getter + public static class Rendering { + /** + * How line-item prices and amounts will be displayed with respect to tax on invoice PDFs. One + * of {@code exclude_tax} or {@code include_inclusive_tax}. {@code include_inclusive_tax} will + * include inclusive tax (and exclude exclusive tax) in invoice PDF amounts. {@code exclude_tax} + * will exclude all tax (inclusive and exclusive alike) from invoice PDF amounts. + */ + @SerializedName("amount_tax_display") + ApiRequestParams.EnumParam amountTaxDisplay; + + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-level field (serialized) name in this + * param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Invoice pdf rendering options. */ + @SerializedName("pdf") + Pdf pdf; + + private Rendering( + ApiRequestParams.EnumParam amountTaxDisplay, Map extraParams, Pdf pdf) { + this.amountTaxDisplay = amountTaxDisplay; + this.extraParams = extraParams; + this.pdf = pdf; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private ApiRequestParams.EnumParam amountTaxDisplay; + + private Map extraParams; + + private Pdf pdf; + + /** Finalize and obtain parameter instance from this builder. */ + public InvoiceUpdateParams.Rendering build() { + return new InvoiceUpdateParams.Rendering(this.amountTaxDisplay, this.extraParams, this.pdf); + } + + /** + * How line-item prices and amounts will be displayed with respect to tax on invoice PDFs. One + * of {@code exclude_tax} or {@code include_inclusive_tax}. {@code include_inclusive_tax} will + * include inclusive tax (and exclude exclusive tax) in invoice PDF amounts. {@code + * exclude_tax} will exclude all tax (inclusive and exclusive alike) from invoice PDF amounts. + */ + public Builder setAmountTaxDisplay( + InvoiceUpdateParams.Rendering.AmountTaxDisplay amountTaxDisplay) { + this.amountTaxDisplay = amountTaxDisplay; + return this; + } + + /** + * How line-item prices and amounts will be displayed with respect to tax on invoice PDFs. One + * of {@code exclude_tax} or {@code include_inclusive_tax}. {@code include_inclusive_tax} will + * include inclusive tax (and exclude exclusive tax) in invoice PDF amounts. {@code + * exclude_tax} will exclude all tax (inclusive and exclusive alike) from invoice PDF amounts. + */ + public Builder setAmountTaxDisplay(EmptyParam amountTaxDisplay) { + this.amountTaxDisplay = amountTaxDisplay; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` + * call, and subsequent calls add additional key/value pairs to the original map. See {@link + * InvoiceUpdateParams.Rendering#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link InvoiceUpdateParams.Rendering#extraParams} for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Invoice pdf rendering options. */ + public Builder setPdf(InvoiceUpdateParams.Rendering.Pdf pdf) { + this.pdf = pdf; + return this; + } + } + + @Getter + public static class Pdf { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Page size for invoice PDF. Can be set to a4, letter, or auto. If set to auto, page size + * will be switched to a4 or letter based on customer locale. + */ + @SerializedName("page_size") + PageSize pageSize; + + private Pdf(Map extraParams, PageSize pageSize) { + this.extraParams = extraParams; + this.pageSize = pageSize; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private PageSize pageSize; + + /** Finalize and obtain parameter instance from this builder. */ + public InvoiceUpdateParams.Rendering.Pdf build() { + return new InvoiceUpdateParams.Rendering.Pdf(this.extraParams, this.pageSize); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link InvoiceUpdateParams.Rendering.Pdf#extraParams} for the field + * documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link InvoiceUpdateParams.Rendering.Pdf#extraParams} for the field + * documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Page size for invoice PDF. Can be set to a4, letter, or auto. If set to auto, page size + * will be switched to a4 or letter based on customer locale. + */ + public Builder setPageSize(InvoiceUpdateParams.Rendering.Pdf.PageSize pageSize) { + this.pageSize = pageSize; + return this; + } + } + + public enum PageSize implements ApiRequestParams.EnumParam { + @SerializedName("a4") + A4("a4"), + + @SerializedName("auto") + AUTO("auto"), + + @SerializedName("letter") + LETTER("letter"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + PageSize(String value) { + this.value = value; + } + } + } + + public enum AmountTaxDisplay implements ApiRequestParams.EnumParam { + @SerializedName("exclude_tax") + EXCLUDE_TAX("exclude_tax"), + + @SerializedName("include_inclusive_tax") + INCLUDE_INCLUSIVE_TAX("include_inclusive_tax"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + AmountTaxDisplay(String value) { + this.value = value; + } + } + } + @Getter public static class RenderingOptions { /** diff --git a/src/main/java/com/stripe/param/PaymentIntentApplyCustomerBalanceParams.java b/src/main/java/com/stripe/param/PaymentIntentApplyCustomerBalanceParams.java index 43577857869..1d270512f33 100644 --- a/src/main/java/com/stripe/param/PaymentIntentApplyCustomerBalanceParams.java +++ b/src/main/java/com/stripe/param/PaymentIntentApplyCustomerBalanceParams.java @@ -12,15 +12,16 @@ @Getter public class PaymentIntentApplyCustomerBalanceParams extends ApiRequestParams { /** - * Amount intended to be applied to this PaymentIntent from the customer’s cash balance. + * Amount that you intend to apply to this PaymentIntent from the customer’s cash balance. * *

A positive integer representing how much to charge in the smallest currency unit (e.g., 100 - * cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). + * href="https://stripe.com/docs/currencies#zero-decimal">smallest currency unit (for example, + * 100 cents to charge 1 USD or 100 to charge 100 JPY, a zero-decimal currency). * *

The maximum amount is the amount of the PaymentIntent. * - *

When omitted, the amount defaults to the remaining amount requested on the PaymentIntent. + *

When you omit the amount, it defaults to the remaining amount requested on the + * PaymentIntent. */ @SerializedName("amount") Long amount; @@ -73,15 +74,16 @@ public PaymentIntentApplyCustomerBalanceParams build() { } /** - * Amount intended to be applied to this PaymentIntent from the customer’s cash balance. + * Amount that you intend to apply to this PaymentIntent from the customer’s cash balance. * *

A positive integer representing how much to charge in the smallest currency unit (e.g., 100 - * cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). + * href="https://stripe.com/docs/currencies#zero-decimal">smallest currency unit (for + * example, 100 cents to charge 1 USD or 100 to charge 100 JPY, a zero-decimal currency). * *

The maximum amount is the amount of the PaymentIntent. * - *

When omitted, the amount defaults to the remaining amount requested on the PaymentIntent. + *

When you omit the amount, it defaults to the remaining amount requested on the + * PaymentIntent. */ public Builder setAmount(Long amount) { this.amount = amount; diff --git a/src/main/java/com/stripe/param/PaymentIntentCancelParams.java b/src/main/java/com/stripe/param/PaymentIntentCancelParams.java index 74f52167c3e..daca3fa3ab8 100644 --- a/src/main/java/com/stripe/param/PaymentIntentCancelParams.java +++ b/src/main/java/com/stripe/param/PaymentIntentCancelParams.java @@ -12,7 +12,7 @@ @Getter public class PaymentIntentCancelParams extends ApiRequestParams { /** - * Reason for canceling this PaymentIntent. Possible values are {@code duplicate}, {@code + * Reason for canceling this PaymentIntent. Possible values are: {@code duplicate}, {@code * fraudulent}, {@code requested_by_customer}, or {@code abandoned} */ @SerializedName("cancellation_reason") @@ -55,7 +55,7 @@ public PaymentIntentCancelParams build() { } /** - * Reason for canceling this PaymentIntent. Possible values are {@code duplicate}, {@code + * Reason for canceling this PaymentIntent. Possible values are: {@code duplicate}, {@code * fraudulent}, {@code requested_by_customer}, or {@code abandoned} */ public Builder setCancellationReason( diff --git a/src/main/java/com/stripe/param/PaymentIntentCaptureParams.java b/src/main/java/com/stripe/param/PaymentIntentCaptureParams.java index 669217fb9e0..b7f5413ac0c 100644 --- a/src/main/java/com/stripe/param/PaymentIntentCaptureParams.java +++ b/src/main/java/com/stripe/param/PaymentIntentCaptureParams.java @@ -14,8 +14,8 @@ public class PaymentIntentCaptureParams extends ApiRequestParams { /** * The amount to capture from the PaymentIntent, which must be less than or equal to the original - * amount. Any additional amount will be automatically refunded. Defaults to the full {@code - * amount_capturable} if not provided. + * amount. Any additional amount is automatically refunded. Defaults to the full {@code + * amount_capturable} if it's not provided. */ @SerializedName("amount_to_capture") Long amountToCapture; @@ -66,14 +66,15 @@ public class PaymentIntentCaptureParams extends ApiRequestParams { /** * Provides information about a card payment that customers see on their statements. Concatenated * with the prefix (shortened descriptor) or statement descriptor that’s set on the account to - * form the complete statement descriptor. Maximum 22 characters for the concatenated descriptor. + * form the complete statement descriptor. The concatenated descriptor must be 1-22 characters + * long. */ @SerializedName("statement_descriptor_suffix") String statementDescriptorSuffix; /** - * The parameters used to automatically create a Transfer when the payment is captured. For more - * information, see the PaymentIntents use case for connected accounts. */ @SerializedName("transfer_data") @@ -139,8 +140,8 @@ public PaymentIntentCaptureParams build() { /** * The amount to capture from the PaymentIntent, which must be less than or equal to the - * original amount. Any additional amount will be automatically refunded. Defaults to the full - * {@code amount_capturable} if not provided. + * original amount. Any additional amount is automatically refunded. Defaults to the full {@code + * amount_capturable} if it's not provided. */ public Builder setAmountToCapture(Long amountToCapture) { this.amountToCapture = amountToCapture; @@ -285,8 +286,8 @@ public Builder setStatementDescriptor(String statementDescriptor) { /** * Provides information about a card payment that customers see on their statements. * Concatenated with the prefix (shortened descriptor) or statement descriptor that’s set on the - * account to form the complete statement descriptor. Maximum 22 characters for the concatenated - * descriptor. + * account to form the complete statement descriptor. The concatenated descriptor must be 1-22 + * characters long. */ public Builder setStatementDescriptorSuffix(String statementDescriptorSuffix) { this.statementDescriptorSuffix = statementDescriptorSuffix; @@ -294,8 +295,8 @@ public Builder setStatementDescriptorSuffix(String statementDescriptorSuffix) { } /** - * The parameters used to automatically create a Transfer when the payment is captured. For more - * information, see the PaymentIntents use case for connected * accounts. */ diff --git a/src/main/java/com/stripe/param/PaymentIntentConfirmParams.java b/src/main/java/com/stripe/param/PaymentIntentConfirmParams.java index a7f86db0873..6bcde4a0153 100644 --- a/src/main/java/com/stripe/param/PaymentIntentConfirmParams.java +++ b/src/main/java/com/stripe/param/PaymentIntentConfirmParams.java @@ -58,19 +58,18 @@ public class PaymentIntentConfirmParams extends ApiRequestParams { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** ID of the mandate to be used for this payment. */ + /** ID of the mandate that's used for this payment. */ @SerializedName("mandate") String mandate; - /** This hash contains details about the Mandate to create. */ @SerializedName("mandate_data") Object mandateData; /** - * Set to {@code true} to indicate that the customer is not in your checkout flow during this - * payment attempt, and therefore is unable to authenticate. This parameter is intended for - * scenarios where you collect card details and charge them later. + * Set to {@code true} to indicate that the customer isn't in your checkout flow during this + * payment attempt and can't authenticate. Use this parameter in scenarios where you collect card + * details and charge them + * later. */ @SerializedName("off_session") Object offSession; @@ -96,13 +95,13 @@ public class PaymentIntentConfirmParams extends ApiRequestParams { @SerializedName("payment_method_data") PaymentMethodData paymentMethodData; - /** Payment-method-specific configuration for this PaymentIntent. */ + /** Payment method-specific configuration for this PaymentIntent. */ @SerializedName("payment_method_options") PaymentMethodOptions paymentMethodOptions; /** - * Options to configure Radar. See Radar - * Session for more information. + * Options to configure Radar. Learn more about Radar Sessions. */ @SerializedName("radar_options") RadarOptions radarOptions; @@ -369,29 +368,27 @@ public Builder putAllExtraParam(Map map) { return this; } - /** ID of the mandate to be used for this payment. */ + /** ID of the mandate that's used for this payment. */ public Builder setMandate(String mandate) { this.mandate = mandate; return this; } - /** This hash contains details about the Mandate to create. */ public Builder setMandateData(PaymentIntentConfirmParams.MandateData mandateData) { this.mandateData = mandateData; return this; } - /** This hash contains details about the Mandate to create. */ public Builder setMandateData(EmptyParam mandateData) { this.mandateData = mandateData; return this; } /** - * Set to {@code true} to indicate that the customer is not in your checkout flow during this - * payment attempt, and therefore is unable to authenticate. This parameter is intended for - * scenarios where you collect card details and charge them later. + * Set to {@code true} to indicate that the customer isn't in your checkout flow during this + * payment attempt and can't authenticate. Use this parameter in scenarios where you collect + * card details and charge + * them later. */ public Builder setOffSession(Boolean offSession) { this.offSession = offSession; @@ -399,10 +396,10 @@ public Builder setOffSession(Boolean offSession) { } /** - * Set to {@code true} to indicate that the customer is not in your checkout flow during this - * payment attempt, and therefore is unable to authenticate. This parameter is intended for - * scenarios where you collect card details and charge them later. + * Set to {@code true} to indicate that the customer isn't in your checkout flow during this + * payment attempt and can't authenticate. Use this parameter in scenarios where you collect + * card details and charge + * them later. */ public Builder setOffSession(PaymentIntentConfirmParams.OffSession offSession) { this.offSession = offSession; @@ -443,7 +440,7 @@ public Builder setPaymentMethodData( return this; } - /** Payment-method-specific configuration for this PaymentIntent. */ + /** Payment method-specific configuration for this PaymentIntent. */ public Builder setPaymentMethodOptions( PaymentIntentConfirmParams.PaymentMethodOptions paymentMethodOptions) { this.paymentMethodOptions = paymentMethodOptions; @@ -451,8 +448,8 @@ public Builder setPaymentMethodOptions( } /** - * Options to configure Radar. See Radar - * Session for more information. + * Options to configure Radar. Learn more about Radar Sessions. */ public Builder setRadarOptions(PaymentIntentConfirmParams.RadarOptions radarOptions) { this.radarOptions = radarOptions; @@ -8200,10 +8197,9 @@ public static class AfterpayClearpay { Map extraParams; /** - * Order identifier shown to the customer in Afterpay’s online portal. We recommend using a - * value that helps you answer any questions a customer might have about the payment. The - * identifier is limited to 128 characters and may contain only letters, digits, underscores, - * backslashes and dashes. + * An internal identifier or reference that this payment corresponds to. You must limit the + * identifier to 128 characters, and it can only contain letters, numbers, underscores, + * backslashes, and dashes. This field differs from the statement descriptor and item name. */ @SerializedName("reference") String reference; @@ -8321,10 +8317,9 @@ public Builder putAllExtraParam(Map map) { } /** - * Order identifier shown to the customer in Afterpay’s online portal. We recommend using a - * value that helps you answer any questions a customer might have about the payment. The - * identifier is limited to 128 characters and may contain only letters, digits, - * underscores, backslashes and dashes. + * An internal identifier or reference that this payment corresponds to. You must limit the + * identifier to 128 characters, and it can only contain letters, numbers, underscores, + * backslashes, and dashes. This field differs from the statement descriptor and item name. */ public Builder setReference(String reference) { this.reference = reference; diff --git a/src/main/java/com/stripe/param/PaymentIntentCreateParams.java b/src/main/java/com/stripe/param/PaymentIntentCreateParams.java index 91bc775cc85..67dbfb9ba65 100644 --- a/src/main/java/com/stripe/param/PaymentIntentCreateParams.java +++ b/src/main/java/com/stripe/param/PaymentIntentCreateParams.java @@ -36,8 +36,8 @@ public class PaymentIntentCreateParams extends ApiRequestParams { Long applicationFeeAmount; /** - * When enabled, this PaymentIntent will accept payment methods that you have enabled in the - * Dashboard and are compatible with this PaymentIntent's other parameters. + * When you enable this parameter, this PaymentIntent accepts payment methods that you enable in + * the Dashboard and that are compatible with this PaymentIntent's other parameters. */ @SerializedName("automatic_payment_methods") AutomaticPaymentMethods automaticPaymentMethods; @@ -48,11 +48,10 @@ public class PaymentIntentCreateParams extends ApiRequestParams { /** * Set to {@code true} to attempt to confirm this PaymentIntent - * immediately. This parameter defaults to {@code false}. When creating and confirming a - * PaymentIntent at the same time, parameters available in the confirm API may also be - * provided. + * href="https://stripe.com/docs/api/payment_intents/confirm">confirm this PaymentIntent this + * PaymentIntent immediately. This parameter defaults to {@code false}. When creating and + * confirming a PaymentIntent at the same time, you can also provide the parameters available in + * the Confirm API. */ @SerializedName("confirm") Boolean confirm; @@ -96,8 +95,8 @@ public class PaymentIntentCreateParams extends ApiRequestParams { /** * Set to {@code true} to fail the payment attempt if the PaymentIntent transitions into {@code - * requires_action}. This parameter is intended for simpler integrations that do not handle - * customer actions, like saving cards without * authentication. This parameter can only be used with {@code @@ -120,7 +119,7 @@ public class PaymentIntentCreateParams extends ApiRequestParams { Map extraParams; /** - * ID of the mandate to be used for this payment. This parameter can only be used with {@code * confirm=true}. */ @@ -145,11 +144,10 @@ public class PaymentIntentCreateParams extends ApiRequestParams { Map metadata; /** - * Set to {@code true} to indicate that the customer is not in your checkout flow during this - * payment attempt, and therefore is unable to authenticate. This parameter is intended for - * scenarios where you collect card details and charge them later. This - * parameter can only be used with charge them + * later. This parameter can only be used with {@code * confirm=true}. */ @@ -157,9 +155,8 @@ public class PaymentIntentCreateParams extends ApiRequestParams { Object offSession; /** - * The Stripe account ID for which these funds are intended. For details, see the PaymentIntents - * use case for connected - * accounts. + * The Stripe account ID that these funds are intended for. Learn more about the use case for connected accounts. */ @SerializedName("on_behalf_of") String onBehalfOf; @@ -173,10 +170,10 @@ public class PaymentIntentCreateParams extends ApiRequestParams { * href="https://stripe.com/docs/payments/payment-methods#compatibility">compatible Source * object) to attach to this PaymentIntent. * - *

If neither the {@code payment_method} parameter nor the {@code source} parameter are - * provided with {@code confirm=true}, {@code source} will be automatically populated with {@code - * customer.default_source} to improve the migration experience for users of the Charges API. We - * recommend that you explicitly provide the {@code payment_method} going forward. + *

If you don't provide the {@code payment_method} parameter or the {@code source} parameter + * with {@code confirm=true}, {@code source} automatically populates with {@code + * customer.default_source} to improve migration for users of the Charges API. We recommend that + * you explicitly provide the {@code payment_method} moving forward. */ @SerializedName("payment_method") String paymentMethod; @@ -194,30 +191,30 @@ public class PaymentIntentCreateParams extends ApiRequestParams { @SerializedName("payment_method_data") PaymentMethodData paymentMethodData; - /** Payment-method-specific configuration for this PaymentIntent. */ + /** Payment method-specific configuration for this PaymentIntent. */ @SerializedName("payment_method_options") PaymentMethodOptions paymentMethodOptions; /** - * The list of payment method types (e.g. card) that this PaymentIntent is allowed to use. If this - * is not provided, defaults to ["card"]. Use automatic_payment_methods to manage - * payment methods from the Stripe - * Dashboard. + * The list of payment method types (for example, a card) that this PaymentIntent can use. If you + * don't provide this, it defaults to ["card"]. Use {@code automatic_payment_methods} to + * manage payment methods from the Stripe Dashboard. */ @SerializedName("payment_method_types") List paymentMethodTypes; /** - * Options to configure Radar. See Radar - * Session for more information. + * Options to configure Radar. Learn more about Radar Sessions. */ @SerializedName("radar_options") RadarOptions radarOptions; /** - * Email address that the receipt for the resulting payment will be sent to. If {@code - * receipt_email} is specified for a payment in live mode, a receipt will be sent regardless of - * your email settings. + * Email address to send the receipt to. If you specify {@code receipt_email} for a payment in + * live mode, you send a receipt regardless of your email settings. */ @SerializedName("receipt_email") String receiptEmail; @@ -262,7 +259,7 @@ public class PaymentIntentCreateParams extends ApiRequestParams { /** * For non-card charges, you can use this value as the complete description that appears on your - * customers’ statements. Must contain at least one letter, maximum 22 characters. + * customers’ statements. It must contain at least one letter and be 1–22 characters long. */ @SerializedName("statement_descriptor") String statementDescriptor; @@ -270,23 +267,24 @@ public class PaymentIntentCreateParams extends ApiRequestParams { /** * Provides information about a card payment that customers see on their statements. Concatenated * with the prefix (shortened descriptor) or statement descriptor that’s set on the account to - * form the complete statement descriptor. Maximum 22 characters for the concatenated descriptor. + * form the complete statement descriptor. The concatenated descriptor must contain 1-22 + * characters. */ @SerializedName("statement_descriptor_suffix") String statementDescriptorSuffix; /** - * The parameters used to automatically create a Transfer when the payment succeeds. For more - * information, see the PaymentIntents use case for connected accounts. + * The parameters that you can use to automatically create a Transfer after the payment succeeds. + * Learn more about the use case for + * connected accounts. */ @SerializedName("transfer_data") TransferData transferData; /** - * A string that identifies the resulting payment as part of a group. See the PaymentIntents use case for connected - * accounts for details. + * accounts. */ @SerializedName("transfer_group") String transferGroup; @@ -514,8 +512,8 @@ public Builder setApplicationFeeAmount(Long applicationFeeAmount) { } /** - * When enabled, this PaymentIntent will accept payment methods that you have enabled in the - * Dashboard and are compatible with this PaymentIntent's other parameters. + * When you enable this parameter, this PaymentIntent accepts payment methods that you enable in + * the Dashboard and that are compatible with this PaymentIntent's other parameters. */ public Builder setAutomaticPaymentMethods( PaymentIntentCreateParams.AutomaticPaymentMethods automaticPaymentMethods) { @@ -531,11 +529,10 @@ public Builder setCaptureMethod(PaymentIntentCreateParams.CaptureMethod captureM /** * Set to {@code true} to attempt to confirm this PaymentIntent - * immediately. This parameter defaults to {@code false}. When creating and confirming a - * PaymentIntent at the same time, parameters available in the confirm API may also be - * provided. + * href="https://stripe.com/docs/api/payment_intents/confirm">confirm this PaymentIntent + * this PaymentIntent immediately. This parameter defaults to {@code false}. When creating and + * confirming a PaymentIntent at the same time, you can also provide the parameters available in + * the Confirm API. */ public Builder setConfirm(Boolean confirm) { this.confirm = confirm; @@ -593,8 +590,8 @@ public Builder setDescription(String description) { /** * Set to {@code true} to fail the payment attempt if the PaymentIntent transitions into {@code - * requires_action}. This parameter is intended for simpler integrations that do not handle - * customer actions, like saving cards without * authentication. This parameter can only be used with {@code @@ -658,7 +655,7 @@ public Builder putAllExtraParam(Map map) { } /** - * ID of the mandate to be used for this payment. This parameter can only be used with {@code * confirm=true}. */ @@ -716,11 +713,10 @@ public Builder putAllMetadata(Map map) { } /** - * Set to {@code true} to indicate that the customer is not in your checkout flow during this - * payment attempt, and therefore is unable to authenticate. This parameter is intended for - * scenarios where you collect card details and charge them later. - * This parameter can only be used with charge + * them later. This parameter can only be used with {@code * confirm=true}. */ @@ -730,11 +726,10 @@ public Builder setOffSession(Boolean offSession) { } /** - * Set to {@code true} to indicate that the customer is not in your checkout flow during this - * payment attempt, and therefore is unable to authenticate. This parameter is intended for - * scenarios where you collect card details and charge them later. - * This parameter can only be used with charge + * them later. This parameter can only be used with {@code * confirm=true}. */ @@ -744,8 +739,8 @@ public Builder setOffSession(PaymentIntentCreateParams.OffSession offSession) { } /** - * The Stripe account ID for which these funds are intended. For details, see the PaymentIntents - * use case for connected + * The Stripe account ID that these funds are intended for. Learn more about the use case for connected * accounts. */ public Builder setOnBehalfOf(String onBehalfOf) { @@ -764,10 +759,10 @@ public Builder setPaymentDetails(PaymentIntentCreateParams.PaymentDetails paymen * href="https://stripe.com/docs/payments/payment-methods#compatibility">compatible Source * object) to attach to this PaymentIntent. * - *

If neither the {@code payment_method} parameter nor the {@code source} parameter are - * provided with {@code confirm=true}, {@code source} will be automatically populated with - * {@code customer.default_source} to improve the migration experience for users of the Charges - * API. We recommend that you explicitly provide the {@code payment_method} going forward. + *

If you don't provide the {@code payment_method} parameter or the {@code source} parameter + * with {@code confirm=true}, {@code source} automatically populates with {@code + * customer.default_source} to improve migration for users of the Charges API. We recommend that + * you explicitly provide the {@code payment_method} moving forward. */ public Builder setPaymentMethod(String paymentMethod) { this.paymentMethod = paymentMethod; @@ -792,7 +787,7 @@ public Builder setPaymentMethodData( return this; } - /** Payment-method-specific configuration for this PaymentIntent. */ + /** Payment method-specific configuration for this PaymentIntent. */ public Builder setPaymentMethodOptions( PaymentIntentCreateParams.PaymentMethodOptions paymentMethodOptions) { this.paymentMethodOptions = paymentMethodOptions; @@ -826,8 +821,8 @@ public Builder addAllPaymentMethodType(List elements) { } /** - * Options to configure Radar. See Radar - * Session for more information. + * Options to configure Radar. Learn more about Radar Sessions. */ public Builder setRadarOptions(PaymentIntentCreateParams.RadarOptions radarOptions) { this.radarOptions = radarOptions; @@ -835,9 +830,9 @@ public Builder setRadarOptions(PaymentIntentCreateParams.RadarOptions radarOptio } /** - * Email address that the receipt for the resulting payment will be sent to. If {@code - * receipt_email} is specified for a payment in live mode, a receipt will be sent regardless of - * your email settings. + * Email address to send the receipt to. If you specify {@code receipt_email} for a payment in + * live mode, you send a receipt regardless of your email settings. */ public Builder setReceiptEmail(String receiptEmail) { this.receiptEmail = receiptEmail; @@ -894,7 +889,7 @@ public Builder setShipping(PaymentIntentCreateParams.Shipping shipping) { /** * For non-card charges, you can use this value as the complete description that appears on your - * customers’ statements. Must contain at least one letter, maximum 22 characters. + * customers’ statements. It must contain at least one letter and be 1–22 characters long. */ public Builder setStatementDescriptor(String statementDescriptor) { this.statementDescriptor = statementDescriptor; @@ -904,8 +899,8 @@ public Builder setStatementDescriptor(String statementDescriptor) { /** * Provides information about a card payment that customers see on their statements. * Concatenated with the prefix (shortened descriptor) or statement descriptor that’s set on the - * account to form the complete statement descriptor. Maximum 22 characters for the concatenated - * descriptor. + * account to form the complete statement descriptor. The concatenated descriptor must contain + * 1-22 characters. */ public Builder setStatementDescriptorSuffix(String statementDescriptorSuffix) { this.statementDescriptorSuffix = statementDescriptorSuffix; @@ -913,8 +908,8 @@ public Builder setStatementDescriptorSuffix(String statementDescriptorSuffix) { } /** - * The parameters used to automatically create a Transfer when the payment succeeds. For more - * information, see the PaymentIntents use case for connected * accounts. */ @@ -924,9 +919,9 @@ public Builder setTransferData(PaymentIntentCreateParams.TransferData transferDa } /** - * A string that identifies the resulting payment as part of a group. See the PaymentIntents use case for connected - * accounts for details. + * accounts. */ public Builder setTransferGroup(String transferGroup) { this.transferGroup = transferGroup; @@ -8687,10 +8682,9 @@ public static class AfterpayClearpay { Map extraParams; /** - * Order identifier shown to the customer in Afterpay’s online portal. We recommend using a - * value that helps you answer any questions a customer might have about the payment. The - * identifier is limited to 128 characters and may contain only letters, digits, underscores, - * backslashes and dashes. + * An internal identifier or reference that this payment corresponds to. You must limit the + * identifier to 128 characters, and it can only contain letters, numbers, underscores, + * backslashes, and dashes. This field differs from the statement descriptor and item name. */ @SerializedName("reference") String reference; @@ -8808,10 +8802,9 @@ public Builder putAllExtraParam(Map map) { } /** - * Order identifier shown to the customer in Afterpay’s online portal. We recommend using a - * value that helps you answer any questions a customer might have about the payment. The - * identifier is limited to 128 characters and may contain only letters, digits, - * underscores, backslashes and dashes. + * An internal identifier or reference that this payment corresponds to. You must limit the + * identifier to 128 characters, and it can only contain letters, numbers, underscores, + * backslashes, and dashes. This field differs from the statement descriptor and item name. */ public Builder setReference(String reference) { this.reference = reference; diff --git a/src/main/java/com/stripe/param/PaymentIntentIncrementAuthorizationParams.java b/src/main/java/com/stripe/param/PaymentIntentIncrementAuthorizationParams.java index 52a234eb26e..8bb9d4a4372 100644 --- a/src/main/java/com/stripe/param/PaymentIntentIncrementAuthorizationParams.java +++ b/src/main/java/com/stripe/param/PaymentIntentIncrementAuthorizationParams.java @@ -12,8 +12,8 @@ @Getter public class PaymentIntentIncrementAuthorizationParams extends ApiRequestParams { /** - * Required. The updated total amount you intend to collect from the cardholder. - * This amount must be greater than the currently authorized amount. + * Required. The updated total amount that you intend to collect from the + * cardholder. This amount must be greater than the currently authorized amount. */ @SerializedName("amount") Long amount; @@ -62,9 +62,9 @@ public class PaymentIntentIncrementAuthorizationParams extends ApiRequestParams String statementDescriptor; /** - * The parameters used to automatically create a Transfer when the payment is captured. For more - * information, see the PaymentIntents use case for connected accounts. + * The parameters used to automatically create a transfer after the payment is captured. Learn + * more about the use case for + * connected accounts. */ @SerializedName("transfer_data") TransferData transferData; @@ -123,7 +123,7 @@ public PaymentIntentIncrementAuthorizationParams build() { } /** - * Required. The updated total amount you intend to collect from the + * Required. The updated total amount that you intend to collect from the * cardholder. This amount must be greater than the currently authorized amount. */ public Builder setAmount(Long amount) { @@ -238,10 +238,9 @@ public Builder setStatementDescriptor(String statementDescriptor) { } /** - * The parameters used to automatically create a Transfer when the payment is captured. For more - * information, see the PaymentIntents use case for connected - * accounts. + * The parameters used to automatically create a transfer after the payment is captured. Learn + * more about the use case for + * connected accounts. */ public Builder setTransferData( PaymentIntentIncrementAuthorizationParams.TransferData transferData) { diff --git a/src/main/java/com/stripe/param/PaymentIntentListParams.java b/src/main/java/com/stripe/param/PaymentIntentListParams.java index 3b46deac77f..ec194bedc13 100644 --- a/src/main/java/com/stripe/param/PaymentIntentListParams.java +++ b/src/main/java/com/stripe/param/PaymentIntentListParams.java @@ -13,12 +13,12 @@ public class PaymentIntentListParams extends ApiRequestParams { /** * A filter on the list, based on the object {@code created} field. The value can be a string with - * an integer Unix timestamp, or it can be a dictionary with a number of different query options. + * an integer Unix timestamp or a dictionary with a number of different query options. */ @SerializedName("created") Object created; - /** Only return PaymentIntents for the customer specified by this customer ID. */ + /** Only return PaymentIntents for the customer that this customer ID specifies. */ @SerializedName("customer") String customer; @@ -110,8 +110,7 @@ public PaymentIntentListParams build() { /** * A filter on the list, based on the object {@code created} field. The value can be a string - * with an integer Unix timestamp, or it can be a dictionary with a number of different query - * options. + * with an integer Unix timestamp or a dictionary with a number of different query options. */ public Builder setCreated(PaymentIntentListParams.Created created) { this.created = created; @@ -120,15 +119,14 @@ public Builder setCreated(PaymentIntentListParams.Created created) { /** * A filter on the list, based on the object {@code created} field. The value can be a string - * with an integer Unix timestamp, or it can be a dictionary with a number of different query - * options. + * with an integer Unix timestamp or a dictionary with a number of different query options. */ public Builder setCreated(Long created) { this.created = created; return this; } - /** Only return PaymentIntents for the customer specified by this customer ID. */ + /** Only return PaymentIntents for the customer that this customer ID specifies. */ public Builder setCustomer(String customer) { this.customer = customer; return this; diff --git a/src/main/java/com/stripe/param/PaymentIntentRetrieveParams.java b/src/main/java/com/stripe/param/PaymentIntentRetrieveParams.java index 92cb9e799e4..e40828bcbcf 100644 --- a/src/main/java/com/stripe/param/PaymentIntentRetrieveParams.java +++ b/src/main/java/com/stripe/param/PaymentIntentRetrieveParams.java @@ -12,7 +12,7 @@ @Getter public class PaymentIntentRetrieveParams extends ApiRequestParams { /** - * The client secret of the PaymentIntent. It's required if you use a publishable key to retrieve + * The client secret of the PaymentIntent. We require it if you use a publishable key to retrieve * the source. */ @SerializedName("client_secret") @@ -55,7 +55,7 @@ public PaymentIntentRetrieveParams build() { } /** - * The client secret of the PaymentIntent. It's required if you use a publishable key to + * The client secret of the PaymentIntent. We require it if you use a publishable key to * retrieve the source. */ public Builder setClientSecret(String clientSecret) { diff --git a/src/main/java/com/stripe/param/PaymentIntentUpdateParams.java b/src/main/java/com/stripe/param/PaymentIntentUpdateParams.java index 7d3f0ac2c78..57f028e0640 100644 --- a/src/main/java/com/stripe/param/PaymentIntentUpdateParams.java +++ b/src/main/java/com/stripe/param/PaymentIntentUpdateParams.java @@ -8693,10 +8693,9 @@ public static class AfterpayClearpay { Map extraParams; /** - * Order identifier shown to the customer in Afterpay’s online portal. We recommend using a - * value that helps you answer any questions a customer might have about the payment. The - * identifier is limited to 128 characters and may contain only letters, digits, underscores, - * backslashes and dashes. + * An internal identifier or reference that this payment corresponds to. You must limit the + * identifier to 128 characters, and it can only contain letters, numbers, underscores, + * backslashes, and dashes. This field differs from the statement descriptor and item name. */ @SerializedName("reference") Object reference; @@ -8814,10 +8813,9 @@ public Builder putAllExtraParam(Map map) { } /** - * Order identifier shown to the customer in Afterpay’s online portal. We recommend using a - * value that helps you answer any questions a customer might have about the payment. The - * identifier is limited to 128 characters and may contain only letters, digits, - * underscores, backslashes and dashes. + * An internal identifier or reference that this payment corresponds to. You must limit the + * identifier to 128 characters, and it can only contain letters, numbers, underscores, + * backslashes, and dashes. This field differs from the statement descriptor and item name. */ public Builder setReference(String reference) { this.reference = reference; @@ -8825,10 +8823,9 @@ public Builder setReference(String reference) { } /** - * Order identifier shown to the customer in Afterpay’s online portal. We recommend using a - * value that helps you answer any questions a customer might have about the payment. The - * identifier is limited to 128 characters and may contain only letters, digits, - * underscores, backslashes and dashes. + * An internal identifier or reference that this payment corresponds to. You must limit the + * identifier to 128 characters, and it can only contain letters, numbers, underscores, + * backslashes, and dashes. This field differs from the statement descriptor and item name. */ public Builder setReference(EmptyParam reference) { this.reference = reference; diff --git a/src/main/java/com/stripe/param/PaymentSourceVerifyParams.java b/src/main/java/com/stripe/param/PaymentSourceVerifyParams.java new file mode 100644 index 00000000000..dcff5b2494d --- /dev/null +++ b/src/main/java/com/stripe/param/PaymentSourceVerifyParams.java @@ -0,0 +1,135 @@ +// File generated from our OpenAPI spec +package com.stripe.param; + +import com.google.gson.annotations.SerializedName; +import com.stripe.net.ApiRequestParams; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import lombok.Getter; + +@Getter +public class PaymentSourceVerifyParams extends ApiRequestParams { + /** + * Two positive integers, in cents, equal to the values of the microdeposits sent to the + * bank account. + */ + @SerializedName("amounts") + List amounts; + + /** Specifies which fields in the response should be expanded. */ + @SerializedName("expand") + List expand; + + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-level field (serialized) name in this + * param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + private PaymentSourceVerifyParams( + List amounts, List expand, Map extraParams) { + this.amounts = amounts; + this.expand = expand; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private List amounts; + + private List expand; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentSourceVerifyParams build() { + return new PaymentSourceVerifyParams(this.amounts, this.expand, this.extraParams); + } + + /** + * Add an element to `amounts` list. A list is initialized for the first `add/addAll` call, and + * subsequent calls adds additional elements to the original list. See {@link + * PaymentSourceVerifyParams#amounts} for the field documentation. + */ + public Builder addAmount(Long element) { + if (this.amounts == null) { + this.amounts = new ArrayList<>(); + } + this.amounts.add(element); + return this; + } + + /** + * Add all elements to `amounts` list. A list is initialized for the first `add/addAll` call, + * and subsequent calls adds additional elements to the original list. See {@link + * PaymentSourceVerifyParams#amounts} for the field documentation. + */ + public Builder addAllAmount(List elements) { + if (this.amounts == null) { + this.amounts = new ArrayList<>(); + } + this.amounts.addAll(elements); + return this; + } + + /** + * Add an element to `expand` list. A list is initialized for the first `add/addAll` call, and + * subsequent calls adds additional elements to the original list. See {@link + * PaymentSourceVerifyParams#expand} for the field documentation. + */ + public Builder addExpand(String element) { + if (this.expand == null) { + this.expand = new ArrayList<>(); + } + this.expand.add(element); + return this; + } + + /** + * Add all elements to `expand` list. A list is initialized for the first `add/addAll` call, and + * subsequent calls adds additional elements to the original list. See {@link + * PaymentSourceVerifyParams#expand} for the field documentation. + */ + public Builder addAllExpand(List elements) { + if (this.expand == null) { + this.expand = new ArrayList<>(); + } + this.expand.addAll(elements); + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` + * call, and subsequent calls add additional key/value pairs to the original map. See {@link + * PaymentSourceVerifyParams#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link PaymentSourceVerifyParams#extraParams} for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } +} diff --git a/src/main/java/com/stripe/param/PayoutCreateParams.java b/src/main/java/com/stripe/param/PayoutCreateParams.java index 271d792d01d..5e70e7bd6b0 100644 --- a/src/main/java/com/stripe/param/PayoutCreateParams.java +++ b/src/main/java/com/stripe/param/PayoutCreateParams.java @@ -28,8 +28,8 @@ public class PayoutCreateParams extends ApiRequestParams { String description; /** - * The ID of a bank account or a card to send the payout to. If no destination is supplied, the - * default external account for the specified currency will be used. + * The ID of a bank account or a card to send the payout to. If you don't provide a destination, + * we use the default external account for the specified currency. */ @SerializedName("destination") String destination; @@ -57,27 +57,27 @@ public class PayoutCreateParams extends ApiRequestParams { Map metadata; /** - * The method used to send this payout, which can be {@code standard} or {@code instant}. {@code - * instant} is supported for payouts to debit cards and bank accounts in certain countries. (See - * Bank support for Instant - * Payouts for more information.) + * The method used to send this payout, which is {@code standard} or {@code instant}. We support + * {@code instant} for payouts to debit cards and bank accounts in certain countries. Learn more + * about bank support for Instant + * Payouts. */ @SerializedName("method") Method method; /** * The balance type of your Stripe balance to draw this payout from. Balances for different - * payment sources are kept separately. You can find the amounts with the balances API. One of + * payment sources are kept separately. You can find the amounts with the Balances API. One of * {@code bank_account}, {@code card}, or {@code fpx}. */ @SerializedName("source_type") SourceType sourceType; /** - * A string to be displayed on the recipient's bank or card statement. This may be at most 22 - * characters. Attempting to use a {@code statement_descriptor} longer than 22 characters will - * return an error. Note: Most banks will truncate this information and/or display it - * inconsistently. Some may not display it at all. + * A string that displays on the recipient's bank or card statement (up to 22 characters). A + * {@code statement_descriptor} that's longer than 22 characters return an error. Most banks + * truncate this information and display it inconsistently. Some banks might not display it at + * all. */ @SerializedName("statement_descriptor") String statementDescriptor; @@ -168,8 +168,8 @@ public Builder setDescription(String description) { } /** - * The ID of a bank account or a card to send the payout to. If no destination is supplied, the - * default external account for the specified currency will be used. + * The ID of a bank account or a card to send the payout to. If you don't provide a destination, + * we use the default external account for the specified currency. */ public Builder setDestination(String destination) { this.destination = destination; @@ -255,10 +255,10 @@ public Builder putAllMetadata(Map map) { } /** - * The method used to send this payout, which can be {@code standard} or {@code instant}. {@code - * instant} is supported for payouts to debit cards and bank accounts in certain countries. (See - * Bank support for Instant - * Payouts for more information.) + * The method used to send this payout, which is {@code standard} or {@code instant}. We support + * {@code instant} for payouts to debit cards and bank accounts in certain countries. Learn more + * about bank support for + * Instant Payouts. */ public Builder setMethod(PayoutCreateParams.Method method) { this.method = method; @@ -267,7 +267,7 @@ public Builder setMethod(PayoutCreateParams.Method method) { /** * The balance type of your Stripe balance to draw this payout from. Balances for different - * payment sources are kept separately. You can find the amounts with the balances API. One of + * payment sources are kept separately. You can find the amounts with the Balances API. One of * {@code bank_account}, {@code card}, or {@code fpx}. */ public Builder setSourceType(PayoutCreateParams.SourceType sourceType) { @@ -276,10 +276,10 @@ public Builder setSourceType(PayoutCreateParams.SourceType sourceType) { } /** - * A string to be displayed on the recipient's bank or card statement. This may be at most 22 - * characters. Attempting to use a {@code statement_descriptor} longer than 22 characters will - * return an error. Note: Most banks will truncate this information and/or display it - * inconsistently. Some may not display it at all. + * A string that displays on the recipient's bank or card statement (up to 22 characters). A + * {@code statement_descriptor} that's longer than 22 characters return an error. Most banks + * truncate this information and display it inconsistently. Some banks might not display it at + * all. */ public Builder setStatementDescriptor(String statementDescriptor) { this.statementDescriptor = statementDescriptor; diff --git a/src/main/java/com/stripe/param/RefundCreateParams.java b/src/main/java/com/stripe/param/RefundCreateParams.java index fba7eddce21..4ffb7133cc1 100644 --- a/src/main/java/com/stripe/param/RefundCreateParams.java +++ b/src/main/java/com/stripe/param/RefundCreateParams.java @@ -12,10 +12,10 @@ @Getter public class RefundCreateParams extends ApiRequestParams { - /** A positive integer representing how much to refund. */ @SerializedName("amount") Long amount; + /** The identifier of the charge to refund. */ @SerializedName("charge") String charge; @@ -63,15 +63,36 @@ public class RefundCreateParams extends ApiRequestParams { @SerializedName("origin") Origin origin; + /** The identifier of the PaymentIntent to refund. */ @SerializedName("payment_intent") String paymentIntent; + /** + * String indicating the reason for the refund. If set, possible values are {@code duplicate}, + * {@code fraudulent}, and {@code requested_by_customer}. If you believe the charge to be + * fraudulent, specifying {@code fraudulent} as the reason will add the associated card and email + * to your block lists, and will also help us + * improve our fraud detection algorithms. + */ @SerializedName("reason") Reason reason; + /** + * Boolean indicating whether the application fee should be refunded when refunding this charge. + * If a full charge refund is given, the full application fee will be refunded. Otherwise, the + * application fee will be refunded in an amount proportional to the amount of the charge + * refunded. An application fee can be refunded only by the application that created the charge. + */ @SerializedName("refund_application_fee") Boolean refundApplicationFee; + /** + * Boolean indicating whether the transfer should be reversed when refunding this charge. The + * transfer will be reversed proportionally to the amount being refunded (either the entire or + * partial amount).
+ *
+ * A transfer can be reversed only by the application that created the charge. + */ @SerializedName("reverse_transfer") Boolean reverseTransfer; @@ -153,12 +174,12 @@ public RefundCreateParams build() { this.reverseTransfer); } - /** A positive integer representing how much to refund. */ public Builder setAmount(Long amount) { this.amount = amount; return this; } + /** The identifier of the charge to refund. */ public Builder setCharge(String charge) { this.charge = charge; return this; @@ -297,21 +318,42 @@ public Builder setOrigin(RefundCreateParams.Origin origin) { return this; } + /** The identifier of the PaymentIntent to refund. */ public Builder setPaymentIntent(String paymentIntent) { this.paymentIntent = paymentIntent; return this; } + /** + * String indicating the reason for the refund. If set, possible values are {@code duplicate}, + * {@code fraudulent}, and {@code requested_by_customer}. If you believe the charge to be + * fraudulent, specifying {@code fraudulent} as the reason will add the associated card and + * email to your block lists, and will also + * help us improve our fraud detection algorithms. + */ public Builder setReason(RefundCreateParams.Reason reason) { this.reason = reason; return this; } + /** + * Boolean indicating whether the application fee should be refunded when refunding this charge. + * If a full charge refund is given, the full application fee will be refunded. Otherwise, the + * application fee will be refunded in an amount proportional to the amount of the charge + * refunded. An application fee can be refunded only by the application that created the charge. + */ public Builder setRefundApplicationFee(Boolean refundApplicationFee) { this.refundApplicationFee = refundApplicationFee; return this; } + /** + * Boolean indicating whether the transfer should be reversed when refunding this charge. The + * transfer will be reversed proportionally to the amount being refunded (either the entire or + * partial amount).
+ *
+ * A transfer can be reversed only by the application that created the charge. + */ public Builder setReverseTransfer(Boolean reverseTransfer) { this.reverseTransfer = reverseTransfer; return this; diff --git a/src/main/java/com/stripe/param/SetupAttemptListParams.java b/src/main/java/com/stripe/param/SetupAttemptListParams.java index 2480381f9fd..65e36d83d6c 100644 --- a/src/main/java/com/stripe/param/SetupAttemptListParams.java +++ b/src/main/java/com/stripe/param/SetupAttemptListParams.java @@ -13,7 +13,7 @@ public class SetupAttemptListParams extends ApiRequestParams { /** * A filter on the list, based on the object {@code created} field. The value can be a string with - * an integer Unix timestamp, or it can be a dictionary with a number of different query options. + * an integer Unix timestamp or a dictionary with a number of different query options. */ @SerializedName("created") Object created; @@ -113,8 +113,7 @@ public SetupAttemptListParams build() { /** * A filter on the list, based on the object {@code created} field. The value can be a string - * with an integer Unix timestamp, or it can be a dictionary with a number of different query - * options. + * with an integer Unix timestamp or a dictionary with a number of different query options. */ public Builder setCreated(SetupAttemptListParams.Created created) { this.created = created; @@ -123,8 +122,7 @@ public Builder setCreated(SetupAttemptListParams.Created created) { /** * A filter on the list, based on the object {@code created} field. The value can be a string - * with an integer Unix timestamp, or it can be a dictionary with a number of different query - * options. + * with an integer Unix timestamp or a dictionary with a number of different query options. */ public Builder setCreated(Long created) { this.created = created; diff --git a/src/main/java/com/stripe/param/WebhookEndpointCreateParams.java b/src/main/java/com/stripe/param/WebhookEndpointCreateParams.java index fe39a10d040..ec880c15ec6 100644 --- a/src/main/java/com/stripe/param/WebhookEndpointCreateParams.java +++ b/src/main/java/com/stripe/param/WebhookEndpointCreateParams.java @@ -768,6 +768,9 @@ public enum EnabledEvent implements ApiRequestParams.EnumParam { @SerializedName("customer.subscription.created") CUSTOMER__SUBSCRIPTION__CREATED("customer.subscription.created"), + @SerializedName("customer.subscription.custom_event") + CUSTOMER__SUBSCRIPTION__CUSTOM_EVENT("customer.subscription.custom_event"), + @SerializedName("customer.subscription.deleted") CUSTOMER__SUBSCRIPTION__DELETED("customer.subscription.deleted"), @@ -916,18 +919,6 @@ public enum EnabledEvent implements ApiRequestParams.EnumParam { @SerializedName("issuing_card.updated") ISSUING_CARD__UPDATED("issuing_card.updated"), - @SerializedName("issuing_card_design.activated") - ISSUING_CARD_DESIGN__ACTIVATED("issuing_card_design.activated"), - - @SerializedName("issuing_card_design.deactivated") - ISSUING_CARD_DESIGN__DEACTIVATED("issuing_card_design.deactivated"), - - @SerializedName("issuing_card_design.rejected") - ISSUING_CARD_DESIGN__REJECTED("issuing_card_design.rejected"), - - @SerializedName("issuing_card_design.updated") - ISSUING_CARD_DESIGN__UPDATED("issuing_card_design.updated"), - @SerializedName("issuing_cardholder.created") ISSUING_CARDHOLDER__CREATED("issuing_cardholder.created"), @@ -949,6 +940,18 @@ public enum EnabledEvent implements ApiRequestParams.EnumParam { @SerializedName("issuing_dispute.updated") ISSUING_DISPUTE__UPDATED("issuing_dispute.updated"), + @SerializedName("issuing_personalization_design.activated") + ISSUING_PERSONALIZATION_DESIGN__ACTIVATED("issuing_personalization_design.activated"), + + @SerializedName("issuing_personalization_design.deactivated") + ISSUING_PERSONALIZATION_DESIGN__DEACTIVATED("issuing_personalization_design.deactivated"), + + @SerializedName("issuing_personalization_design.rejected") + ISSUING_PERSONALIZATION_DESIGN__REJECTED("issuing_personalization_design.rejected"), + + @SerializedName("issuing_personalization_design.updated") + ISSUING_PERSONALIZATION_DESIGN__UPDATED("issuing_personalization_design.updated"), + @SerializedName("issuing_transaction.created") ISSUING_TRANSACTION__CREATED("issuing_transaction.created"), @@ -958,9 +961,6 @@ public enum EnabledEvent implements ApiRequestParams.EnumParam { @SerializedName("mandate.updated") MANDATE__UPDATED("mandate.updated"), - @SerializedName("order.created") - ORDER__CREATED("order.created"), - @SerializedName("payment_intent.amount_capturable_updated") PAYMENT_INTENT__AMOUNT_CAPTURABLE_UPDATED("payment_intent.amount_capturable_updated"), @@ -1096,15 +1096,6 @@ public enum EnabledEvent implements ApiRequestParams.EnumParam { @SerializedName("radar.early_fraud_warning.updated") RADAR__EARLY_FRAUD_WARNING__UPDATED("radar.early_fraud_warning.updated"), - @SerializedName("recipient.created") - RECIPIENT__CREATED("recipient.created"), - - @SerializedName("recipient.deleted") - RECIPIENT__DELETED("recipient.deleted"), - - @SerializedName("recipient.updated") - RECIPIENT__UPDATED("recipient.updated"), - @SerializedName("refund.created") REFUND__CREATED("refund.created"), @@ -1144,15 +1135,6 @@ public enum EnabledEvent implements ApiRequestParams.EnumParam { @SerializedName("sigma.scheduled_query_run.created") SIGMA__SCHEDULED_QUERY_RUN__CREATED("sigma.scheduled_query_run.created"), - @SerializedName("sku.created") - SKU__CREATED("sku.created"), - - @SerializedName("sku.deleted") - SKU__DELETED("sku.deleted"), - - @SerializedName("sku.updated") - SKU__UPDATED("sku.updated"), - @SerializedName("source.canceled") SOURCE__CANCELED("source.canceled"), @@ -1344,7 +1326,28 @@ public enum EnabledEvent implements ApiRequestParams.EnumParam { TREASURY__RECEIVED_DEBIT__CREATED("treasury.received_debit.created"), @SerializedName("invoiceitem.updated") - INVOICEITEM__UPDATED("invoiceitem.updated"); + INVOICEITEM__UPDATED("invoiceitem.updated"), + + @SerializedName("order.created") + ORDER__CREATED("order.created"), + + @SerializedName("recipient.created") + RECIPIENT__CREATED("recipient.created"), + + @SerializedName("recipient.deleted") + RECIPIENT__DELETED("recipient.deleted"), + + @SerializedName("recipient.updated") + RECIPIENT__UPDATED("recipient.updated"), + + @SerializedName("sku.created") + SKU__CREATED("sku.created"), + + @SerializedName("sku.deleted") + SKU__DELETED("sku.deleted"), + + @SerializedName("sku.updated") + SKU__UPDATED("sku.updated"); @Getter(onMethod_ = {@Override}) private final String value; diff --git a/src/main/java/com/stripe/param/WebhookEndpointUpdateParams.java b/src/main/java/com/stripe/param/WebhookEndpointUpdateParams.java index b843ecf8098..115437e52c4 100644 --- a/src/main/java/com/stripe/param/WebhookEndpointUpdateParams.java +++ b/src/main/java/com/stripe/param/WebhookEndpointUpdateParams.java @@ -441,6 +441,9 @@ public enum EnabledEvent implements ApiRequestParams.EnumParam { @SerializedName("customer.subscription.created") CUSTOMER__SUBSCRIPTION__CREATED("customer.subscription.created"), + @SerializedName("customer.subscription.custom_event") + CUSTOMER__SUBSCRIPTION__CUSTOM_EVENT("customer.subscription.custom_event"), + @SerializedName("customer.subscription.deleted") CUSTOMER__SUBSCRIPTION__DELETED("customer.subscription.deleted"), @@ -589,18 +592,6 @@ public enum EnabledEvent implements ApiRequestParams.EnumParam { @SerializedName("issuing_card.updated") ISSUING_CARD__UPDATED("issuing_card.updated"), - @SerializedName("issuing_card_design.activated") - ISSUING_CARD_DESIGN__ACTIVATED("issuing_card_design.activated"), - - @SerializedName("issuing_card_design.deactivated") - ISSUING_CARD_DESIGN__DEACTIVATED("issuing_card_design.deactivated"), - - @SerializedName("issuing_card_design.rejected") - ISSUING_CARD_DESIGN__REJECTED("issuing_card_design.rejected"), - - @SerializedName("issuing_card_design.updated") - ISSUING_CARD_DESIGN__UPDATED("issuing_card_design.updated"), - @SerializedName("issuing_cardholder.created") ISSUING_CARDHOLDER__CREATED("issuing_cardholder.created"), @@ -622,6 +613,18 @@ public enum EnabledEvent implements ApiRequestParams.EnumParam { @SerializedName("issuing_dispute.updated") ISSUING_DISPUTE__UPDATED("issuing_dispute.updated"), + @SerializedName("issuing_personalization_design.activated") + ISSUING_PERSONALIZATION_DESIGN__ACTIVATED("issuing_personalization_design.activated"), + + @SerializedName("issuing_personalization_design.deactivated") + ISSUING_PERSONALIZATION_DESIGN__DEACTIVATED("issuing_personalization_design.deactivated"), + + @SerializedName("issuing_personalization_design.rejected") + ISSUING_PERSONALIZATION_DESIGN__REJECTED("issuing_personalization_design.rejected"), + + @SerializedName("issuing_personalization_design.updated") + ISSUING_PERSONALIZATION_DESIGN__UPDATED("issuing_personalization_design.updated"), + @SerializedName("issuing_transaction.created") ISSUING_TRANSACTION__CREATED("issuing_transaction.created"), @@ -631,9 +634,6 @@ public enum EnabledEvent implements ApiRequestParams.EnumParam { @SerializedName("mandate.updated") MANDATE__UPDATED("mandate.updated"), - @SerializedName("order.created") - ORDER__CREATED("order.created"), - @SerializedName("payment_intent.amount_capturable_updated") PAYMENT_INTENT__AMOUNT_CAPTURABLE_UPDATED("payment_intent.amount_capturable_updated"), @@ -769,15 +769,6 @@ public enum EnabledEvent implements ApiRequestParams.EnumParam { @SerializedName("radar.early_fraud_warning.updated") RADAR__EARLY_FRAUD_WARNING__UPDATED("radar.early_fraud_warning.updated"), - @SerializedName("recipient.created") - RECIPIENT__CREATED("recipient.created"), - - @SerializedName("recipient.deleted") - RECIPIENT__DELETED("recipient.deleted"), - - @SerializedName("recipient.updated") - RECIPIENT__UPDATED("recipient.updated"), - @SerializedName("refund.created") REFUND__CREATED("refund.created"), @@ -817,15 +808,6 @@ public enum EnabledEvent implements ApiRequestParams.EnumParam { @SerializedName("sigma.scheduled_query_run.created") SIGMA__SCHEDULED_QUERY_RUN__CREATED("sigma.scheduled_query_run.created"), - @SerializedName("sku.created") - SKU__CREATED("sku.created"), - - @SerializedName("sku.deleted") - SKU__DELETED("sku.deleted"), - - @SerializedName("sku.updated") - SKU__UPDATED("sku.updated"), - @SerializedName("source.canceled") SOURCE__CANCELED("source.canceled"), @@ -1017,7 +999,28 @@ public enum EnabledEvent implements ApiRequestParams.EnumParam { TREASURY__RECEIVED_DEBIT__CREATED("treasury.received_debit.created"), @SerializedName("invoiceitem.updated") - INVOICEITEM__UPDATED("invoiceitem.updated"); + INVOICEITEM__UPDATED("invoiceitem.updated"), + + @SerializedName("order.created") + ORDER__CREATED("order.created"), + + @SerializedName("recipient.created") + RECIPIENT__CREATED("recipient.created"), + + @SerializedName("recipient.deleted") + RECIPIENT__DELETED("recipient.deleted"), + + @SerializedName("recipient.updated") + RECIPIENT__UPDATED("recipient.updated"), + + @SerializedName("sku.created") + SKU__CREATED("sku.created"), + + @SerializedName("sku.deleted") + SKU__DELETED("sku.deleted"), + + @SerializedName("sku.updated") + SKU__UPDATED("sku.updated"); @Getter(onMethod_ = {@Override}) private final String value; diff --git a/src/main/java/com/stripe/param/issuing/CardCreateParams.java b/src/main/java/com/stripe/param/issuing/CardCreateParams.java index a8af9d5d9c1..087d66c342d 100644 --- a/src/main/java/com/stripe/param/issuing/CardCreateParams.java +++ b/src/main/java/com/stripe/param/issuing/CardCreateParams.java @@ -11,10 +11,6 @@ @Getter public class CardCreateParams extends ApiRequestParams { - /** The card design object belonging to this card. */ - @SerializedName("card_design") - String cardDesign; - /** * The Cardholder object with * which the card will be associated. @@ -51,6 +47,10 @@ public class CardCreateParams extends ApiRequestParams { @SerializedName("metadata") Map metadata; + /** The personalization design object belonging to this card. */ + @SerializedName("personalization_design") + String personalizationDesign; + /** The card this is meant to be a replacement for (if any). */ @SerializedName("replacement_for") String replacementFor; @@ -88,26 +88,26 @@ public class CardCreateParams extends ApiRequestParams { Type type; private CardCreateParams( - String cardDesign, String cardholder, String currency, List expand, Map extraParams, String financialAccount, Map metadata, + String personalizationDesign, String replacementFor, ReplacementReason replacementReason, Shipping shipping, SpendingControls spendingControls, Status status, Type type) { - this.cardDesign = cardDesign; this.cardholder = cardholder; this.currency = currency; this.expand = expand; this.extraParams = extraParams; this.financialAccount = financialAccount; this.metadata = metadata; + this.personalizationDesign = personalizationDesign; this.replacementFor = replacementFor; this.replacementReason = replacementReason; this.shipping = shipping; @@ -121,8 +121,6 @@ public static Builder builder() { } public static class Builder { - private String cardDesign; - private String cardholder; private String currency; @@ -135,6 +133,8 @@ public static class Builder { private Map metadata; + private String personalizationDesign; + private String replacementFor; private ReplacementReason replacementReason; @@ -150,13 +150,13 @@ public static class Builder { /** Finalize and obtain parameter instance from this builder. */ public CardCreateParams build() { return new CardCreateParams( - this.cardDesign, this.cardholder, this.currency, this.expand, this.extraParams, this.financialAccount, this.metadata, + this.personalizationDesign, this.replacementFor, this.replacementReason, this.shipping, @@ -165,12 +165,6 @@ public CardCreateParams build() { this.type); } - /** The card design object belonging to this card. */ - public Builder setCardDesign(String cardDesign) { - this.cardDesign = cardDesign; - return this; - } - /** * The Cardholder object * with which the card will be associated. @@ -269,6 +263,12 @@ public Builder putAllMetadata(Map map) { return this; } + /** The personalization design object belonging to this card. */ + public Builder setPersonalizationDesign(String personalizationDesign) { + this.personalizationDesign = personalizationDesign; + return this; + } + /** The card this is meant to be a replacement for (if any). */ public Builder setReplacementFor(String replacementFor) { this.replacementFor = replacementFor; diff --git a/src/main/java/com/stripe/param/issuing/CardUpdateParams.java b/src/main/java/com/stripe/param/issuing/CardUpdateParams.java index b9b7fb48b83..e9bcae4bca9 100644 --- a/src/main/java/com/stripe/param/issuing/CardUpdateParams.java +++ b/src/main/java/com/stripe/param/issuing/CardUpdateParams.java @@ -16,9 +16,6 @@ public class CardUpdateParams extends ApiRequestParams { @SerializedName("cancellation_reason") CancellationReason cancellationReason; - @SerializedName("card_design") - Object cardDesign; - /** Specifies which fields in the response should be expanded. */ @SerializedName("expand") List expand; @@ -41,6 +38,9 @@ public class CardUpdateParams extends ApiRequestParams { @SerializedName("metadata") Object metadata; + @SerializedName("personalization_design") + Object personalizationDesign; + /** The desired new PIN for this card. */ @SerializedName("pin") Pin pin; @@ -68,19 +68,19 @@ public class CardUpdateParams extends ApiRequestParams { private CardUpdateParams( CancellationReason cancellationReason, - Object cardDesign, List expand, Map extraParams, Object metadata, + Object personalizationDesign, Pin pin, Shipping shipping, SpendingControls spendingControls, Status status) { this.cancellationReason = cancellationReason; - this.cardDesign = cardDesign; this.expand = expand; this.extraParams = extraParams; this.metadata = metadata; + this.personalizationDesign = personalizationDesign; this.pin = pin; this.shipping = shipping; this.spendingControls = spendingControls; @@ -94,14 +94,14 @@ public static Builder builder() { public static class Builder { private CancellationReason cancellationReason; - private Object cardDesign; - private List expand; private Map extraParams; private Object metadata; + private Object personalizationDesign; + private Pin pin; private Shipping shipping; @@ -114,10 +114,10 @@ public static class Builder { public CardUpdateParams build() { return new CardUpdateParams( this.cancellationReason, - this.cardDesign, this.expand, this.extraParams, this.metadata, + this.personalizationDesign, this.pin, this.shipping, this.spendingControls, @@ -130,16 +130,6 @@ public Builder setCancellationReason(CardUpdateParams.CancellationReason cancell return this; } - public Builder setCardDesign(String cardDesign) { - this.cardDesign = cardDesign; - return this; - } - - public Builder setCardDesign(EmptyParam cardDesign) { - this.cardDesign = cardDesign; - return this; - } - /** * Add an element to `expand` list. A list is initialized for the first `add/addAll` call, and * subsequent calls adds additional elements to the original list. See {@link @@ -242,6 +232,16 @@ public Builder setMetadata(Map metadata) { return this; } + public Builder setPersonalizationDesign(String personalizationDesign) { + this.personalizationDesign = personalizationDesign; + return this; + } + + public Builder setPersonalizationDesign(EmptyParam personalizationDesign) { + this.personalizationDesign = personalizationDesign; + return this; + } + /** The desired new PIN for this card. */ public Builder setPin(CardUpdateParams.Pin pin) { this.pin = pin; diff --git a/src/main/java/com/stripe/param/issuing/CardBundleRetrieveParams.java b/src/main/java/com/stripe/param/issuing/PersonalizationDesignActivateParams.java similarity index 81% rename from src/main/java/com/stripe/param/issuing/CardBundleRetrieveParams.java rename to src/main/java/com/stripe/param/issuing/PersonalizationDesignActivateParams.java index 6068744c1a6..a14212eda91 100644 --- a/src/main/java/com/stripe/param/issuing/CardBundleRetrieveParams.java +++ b/src/main/java/com/stripe/param/issuing/PersonalizationDesignActivateParams.java @@ -10,7 +10,7 @@ import lombok.Getter; @Getter -public class CardBundleRetrieveParams extends ApiRequestParams { +public class PersonalizationDesignActivateParams extends ApiRequestParams { /** Specifies which fields in the response should be expanded. */ @SerializedName("expand") List expand; @@ -24,7 +24,8 @@ public class CardBundleRetrieveParams extends ApiRequestParams { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - private CardBundleRetrieveParams(List expand, Map extraParams) { + private PersonalizationDesignActivateParams( + List expand, Map extraParams) { this.expand = expand; this.extraParams = extraParams; } @@ -39,14 +40,14 @@ public static class Builder { private Map extraParams; /** Finalize and obtain parameter instance from this builder. */ - public CardBundleRetrieveParams build() { - return new CardBundleRetrieveParams(this.expand, this.extraParams); + public PersonalizationDesignActivateParams build() { + return new PersonalizationDesignActivateParams(this.expand, this.extraParams); } /** * Add an element to `expand` list. A list is initialized for the first `add/addAll` call, and * subsequent calls adds additional elements to the original list. See {@link - * CardBundleRetrieveParams#expand} for the field documentation. + * PersonalizationDesignActivateParams#expand} for the field documentation. */ public Builder addExpand(String element) { if (this.expand == null) { @@ -59,7 +60,7 @@ public Builder addExpand(String element) { /** * Add all elements to `expand` list. A list is initialized for the first `add/addAll` call, and * subsequent calls adds additional elements to the original list. See {@link - * CardBundleRetrieveParams#expand} for the field documentation. + * PersonalizationDesignActivateParams#expand} for the field documentation. */ public Builder addAllExpand(List elements) { if (this.expand == null) { @@ -72,7 +73,7 @@ public Builder addAllExpand(List elements) { /** * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` * call, and subsequent calls add additional key/value pairs to the original map. See {@link - * CardBundleRetrieveParams#extraParams} for the field documentation. + * PersonalizationDesignActivateParams#extraParams} for the field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -85,7 +86,7 @@ public Builder putExtraParam(String key, Object value) { /** * Add all map key/value pairs to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. - * See {@link CardBundleRetrieveParams#extraParams} for the field documentation. + * See {@link PersonalizationDesignActivateParams#extraParams} for the field documentation. */ public Builder putAllExtraParam(Map map) { if (this.extraParams == null) { diff --git a/src/main/java/com/stripe/param/issuing/CardDesignCreateParams.java b/src/main/java/com/stripe/param/issuing/PersonalizationDesignCreateParams.java similarity index 70% rename from src/main/java/com/stripe/param/issuing/CardDesignCreateParams.java rename to src/main/java/com/stripe/param/issuing/PersonalizationDesignCreateParams.java index de338ca2cfe..fdd80223a4f 100644 --- a/src/main/java/com/stripe/param/issuing/CardDesignCreateParams.java +++ b/src/main/java/com/stripe/param/issuing/PersonalizationDesignCreateParams.java @@ -3,6 +3,7 @@ import com.google.gson.annotations.SerializedName; import com.stripe.net.ApiRequestParams; +import com.stripe.param.common.EmptyParam; import java.util.ArrayList; import java.util.HashMap; import java.util.List; @@ -10,16 +11,15 @@ import lombok.Getter; @Getter -public class CardDesignCreateParams extends ApiRequestParams { - /** Required. The card bundle object belonging to this card design. */ - @SerializedName("card_bundle") - String cardBundle; - - /** The file for the card logo, for use with card bundles that support card logos. */ +public class PersonalizationDesignCreateParams extends ApiRequestParams { + /** + * The file for the card logo, for use with physical bundles that support card logos. Must have + * {@code purpose} value of {@code issuing_logo}. + */ @SerializedName("card_logo") String cardLogo; - /** Hash containing carrier text, for use with card bundles that support carrier text. */ + /** Hash containing carrier text, for use with physical bundles that support carrier text. */ @SerializedName("carrier_text") CarrierText carrierText; @@ -37,8 +37,8 @@ public class CardDesignCreateParams extends ApiRequestParams { Map extraParams; /** - * A lookup key used to retrieve card designs dynamically from a static string. This may be up to - * 200 characters. + * A lookup key used to retrieve personalization designs dynamically from a static string. This + * may be up to 200 characters. */ @SerializedName("lookup_key") String lookupKey; @@ -56,19 +56,27 @@ public class CardDesignCreateParams extends ApiRequestParams { @SerializedName("name") String name; - /** Information on whether this card design is used to create cards when one is not specified. */ + /** + * Required. The physical bundle object belonging to this personalization design. + */ + @SerializedName("physical_bundle") + String physicalBundle; + + /** + * Information on whether this personalization design is used to create cards when one is not + * specified. + */ @SerializedName("preferences") Preferences preferences; /** - * If set to true, will atomically remove the lookup key from the existing card design, and assign - * it to this card design. + * If set to true, will atomically remove the lookup key from the existing personalization design, + * and assign it to this personalization design. */ @SerializedName("transfer_lookup_key") Boolean transferLookupKey; - private CardDesignCreateParams( - String cardBundle, + private PersonalizationDesignCreateParams( String cardLogo, CarrierText carrierText, List expand, @@ -76,9 +84,9 @@ private CardDesignCreateParams( String lookupKey, Map metadata, String name, + String physicalBundle, Preferences preferences, Boolean transferLookupKey) { - this.cardBundle = cardBundle; this.cardLogo = cardLogo; this.carrierText = carrierText; this.expand = expand; @@ -86,6 +94,7 @@ private CardDesignCreateParams( this.lookupKey = lookupKey; this.metadata = metadata; this.name = name; + this.physicalBundle = physicalBundle; this.preferences = preferences; this.transferLookupKey = transferLookupKey; } @@ -95,8 +104,6 @@ public static Builder builder() { } public static class Builder { - private String cardBundle; - private String cardLogo; private CarrierText carrierText; @@ -111,14 +118,15 @@ public static class Builder { private String name; + private String physicalBundle; + private Preferences preferences; private Boolean transferLookupKey; /** Finalize and obtain parameter instance from this builder. */ - public CardDesignCreateParams build() { - return new CardDesignCreateParams( - this.cardBundle, + public PersonalizationDesignCreateParams build() { + return new PersonalizationDesignCreateParams( this.cardLogo, this.carrierText, this.expand, @@ -126,24 +134,22 @@ public CardDesignCreateParams build() { this.lookupKey, this.metadata, this.name, + this.physicalBundle, this.preferences, this.transferLookupKey); } - /** Required. The card bundle object belonging to this card design. */ - public Builder setCardBundle(String cardBundle) { - this.cardBundle = cardBundle; - return this; - } - - /** The file for the card logo, for use with card bundles that support card logos. */ + /** + * The file for the card logo, for use with physical bundles that support card logos. Must have + * {@code purpose} value of {@code issuing_logo}. + */ public Builder setCardLogo(String cardLogo) { this.cardLogo = cardLogo; return this; } - /** Hash containing carrier text, for use with card bundles that support carrier text. */ - public Builder setCarrierText(CardDesignCreateParams.CarrierText carrierText) { + /** Hash containing carrier text, for use with physical bundles that support carrier text. */ + public Builder setCarrierText(PersonalizationDesignCreateParams.CarrierText carrierText) { this.carrierText = carrierText; return this; } @@ -151,7 +157,7 @@ public Builder setCarrierText(CardDesignCreateParams.CarrierText carrierText) { /** * Add an element to `expand` list. A list is initialized for the first `add/addAll` call, and * subsequent calls adds additional elements to the original list. See {@link - * CardDesignCreateParams#expand} for the field documentation. + * PersonalizationDesignCreateParams#expand} for the field documentation. */ public Builder addExpand(String element) { if (this.expand == null) { @@ -164,7 +170,7 @@ public Builder addExpand(String element) { /** * Add all elements to `expand` list. A list is initialized for the first `add/addAll` call, and * subsequent calls adds additional elements to the original list. See {@link - * CardDesignCreateParams#expand} for the field documentation. + * PersonalizationDesignCreateParams#expand} for the field documentation. */ public Builder addAllExpand(List elements) { if (this.expand == null) { @@ -177,7 +183,7 @@ public Builder addAllExpand(List elements) { /** * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` * call, and subsequent calls add additional key/value pairs to the original map. See {@link - * CardDesignCreateParams#extraParams} for the field documentation. + * PersonalizationDesignCreateParams#extraParams} for the field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -190,7 +196,7 @@ public Builder putExtraParam(String key, Object value) { /** * Add all map key/value pairs to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. - * See {@link CardDesignCreateParams#extraParams} for the field documentation. + * See {@link PersonalizationDesignCreateParams#extraParams} for the field documentation. */ public Builder putAllExtraParam(Map map) { if (this.extraParams == null) { @@ -201,8 +207,8 @@ public Builder putAllExtraParam(Map map) { } /** - * A lookup key used to retrieve card designs dynamically from a static string. This may be up - * to 200 characters. + * A lookup key used to retrieve personalization designs dynamically from a static string. This + * may be up to 200 characters. */ public Builder setLookupKey(String lookupKey) { this.lookupKey = lookupKey; @@ -212,7 +218,7 @@ public Builder setLookupKey(String lookupKey) { /** * Add a key/value pair to `metadata` map. A map is initialized for the first `put/putAll` call, * and subsequent calls add additional key/value pairs to the original map. See {@link - * CardDesignCreateParams#metadata} for the field documentation. + * PersonalizationDesignCreateParams#metadata} for the field documentation. */ public Builder putMetadata(String key, String value) { if (this.metadata == null) { @@ -225,7 +231,7 @@ public Builder putMetadata(String key, String value) { /** * Add all map key/value pairs to `metadata` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. - * See {@link CardDesignCreateParams#metadata} for the field documentation. + * See {@link PersonalizationDesignCreateParams#metadata} for the field documentation. */ public Builder putAllMetadata(Map map) { if (this.metadata == null) { @@ -242,16 +248,26 @@ public Builder setName(String name) { } /** - * Information on whether this card design is used to create cards when one is not specified. + * Required. The physical bundle object belonging to this personalization + * design. + */ + public Builder setPhysicalBundle(String physicalBundle) { + this.physicalBundle = physicalBundle; + return this; + } + + /** + * Information on whether this personalization design is used to create cards when one is not + * specified. */ - public Builder setPreferences(CardDesignCreateParams.Preferences preferences) { + public Builder setPreferences(PersonalizationDesignCreateParams.Preferences preferences) { this.preferences = preferences; return this; } /** - * If set to true, will atomically remove the lookup key from the existing card design, and - * assign it to this card design. + * If set to true, will atomically remove the lookup key from the existing personalization + * design, and assign it to this personalization design. */ public Builder setTransferLookupKey(Boolean transferLookupKey) { this.transferLookupKey = transferLookupKey; @@ -272,26 +288,26 @@ public static class CarrierText { /** The footer body text of the carrier letter. */ @SerializedName("footer_body") - String footerBody; + Object footerBody; /** The footer title text of the carrier letter. */ @SerializedName("footer_title") - String footerTitle; + Object footerTitle; /** The header body text of the carrier letter. */ @SerializedName("header_body") - String headerBody; + Object headerBody; /** The header title text of the carrier letter. */ @SerializedName("header_title") - String headerTitle; + Object headerTitle; private CarrierText( Map extraParams, - String footerBody, - String footerTitle, - String headerBody, - String headerTitle) { + Object footerBody, + Object footerTitle, + Object headerBody, + Object headerTitle) { this.extraParams = extraParams; this.footerBody = footerBody; this.footerTitle = footerTitle; @@ -306,24 +322,24 @@ public static Builder builder() { public static class Builder { private Map extraParams; - private String footerBody; + private Object footerBody; - private String footerTitle; + private Object footerTitle; - private String headerBody; + private Object headerBody; - private String headerTitle; + private Object headerTitle; /** Finalize and obtain parameter instance from this builder. */ - public CardDesignCreateParams.CarrierText build() { - return new CardDesignCreateParams.CarrierText( + public PersonalizationDesignCreateParams.CarrierText build() { + return new PersonalizationDesignCreateParams.CarrierText( this.extraParams, this.footerBody, this.footerTitle, this.headerBody, this.headerTitle); } /** * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` * call, and subsequent calls add additional key/value pairs to the original map. See {@link - * CardDesignCreateParams.CarrierText#extraParams} for the field documentation. + * PersonalizationDesignCreateParams.CarrierText#extraParams} for the field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -336,7 +352,8 @@ public Builder putExtraParam(String key, Object value) { /** * Add all map key/value pairs to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. - * See {@link CardDesignCreateParams.CarrierText#extraParams} for the field documentation. + * See {@link PersonalizationDesignCreateParams.CarrierText#extraParams} for the field + * documentation. */ public Builder putAllExtraParam(Map map) { if (this.extraParams == null) { @@ -352,32 +369,56 @@ public Builder setFooterBody(String footerBody) { return this; } + /** The footer body text of the carrier letter. */ + public Builder setFooterBody(EmptyParam footerBody) { + this.footerBody = footerBody; + return this; + } + /** The footer title text of the carrier letter. */ public Builder setFooterTitle(String footerTitle) { this.footerTitle = footerTitle; return this; } + /** The footer title text of the carrier letter. */ + public Builder setFooterTitle(EmptyParam footerTitle) { + this.footerTitle = footerTitle; + return this; + } + /** The header body text of the carrier letter. */ public Builder setHeaderBody(String headerBody) { this.headerBody = headerBody; return this; } + /** The header body text of the carrier letter. */ + public Builder setHeaderBody(EmptyParam headerBody) { + this.headerBody = headerBody; + return this; + } + /** The header title text of the carrier letter. */ public Builder setHeaderTitle(String headerTitle) { this.headerTitle = headerTitle; return this; } + + /** The header title text of the carrier letter. */ + public Builder setHeaderTitle(EmptyParam headerTitle) { + this.headerTitle = headerTitle; + return this; + } } } @Getter public static class Preferences { /** - * Required. Whether this card design is used to create cards when one is not - * specified. A connected account will use the Connect platform's default if no card design is - * set as the account default. + * Required. Whether this personalization design is used to create cards when + * one is not specified. A connected account will use the Connect platform's default if no + * personalization design is set as the account default. */ @SerializedName("account_default") Boolean accountDefault; @@ -406,14 +447,15 @@ public static class Builder { private Map extraParams; /** Finalize and obtain parameter instance from this builder. */ - public CardDesignCreateParams.Preferences build() { - return new CardDesignCreateParams.Preferences(this.accountDefault, this.extraParams); + public PersonalizationDesignCreateParams.Preferences build() { + return new PersonalizationDesignCreateParams.Preferences( + this.accountDefault, this.extraParams); } /** - * Required. Whether this card design is used to create cards when one is not - * specified. A connected account will use the Connect platform's default if no card design is - * set as the account default. + * Required. Whether this personalization design is used to create cards when + * one is not specified. A connected account will use the Connect platform's default if no + * personalization design is set as the account default. */ public Builder setAccountDefault(Boolean accountDefault) { this.accountDefault = accountDefault; @@ -423,7 +465,7 @@ public Builder setAccountDefault(Boolean accountDefault) { /** * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` * call, and subsequent calls add additional key/value pairs to the original map. See {@link - * CardDesignCreateParams.Preferences#extraParams} for the field documentation. + * PersonalizationDesignCreateParams.Preferences#extraParams} for the field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -436,7 +478,8 @@ public Builder putExtraParam(String key, Object value) { /** * Add all map key/value pairs to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. - * See {@link CardDesignCreateParams.Preferences#extraParams} for the field documentation. + * See {@link PersonalizationDesignCreateParams.Preferences#extraParams} for the field + * documentation. */ public Builder putAllExtraParam(Map map) { if (this.extraParams == null) { diff --git a/src/main/java/com/stripe/param/issuing/CardDesignActivateTestmodeParams.java b/src/main/java/com/stripe/param/issuing/PersonalizationDesignDeactivateParams.java similarity index 81% rename from src/main/java/com/stripe/param/issuing/CardDesignActivateTestmodeParams.java rename to src/main/java/com/stripe/param/issuing/PersonalizationDesignDeactivateParams.java index 8c71f1d8f67..6c07970b377 100644 --- a/src/main/java/com/stripe/param/issuing/CardDesignActivateTestmodeParams.java +++ b/src/main/java/com/stripe/param/issuing/PersonalizationDesignDeactivateParams.java @@ -10,7 +10,7 @@ import lombok.Getter; @Getter -public class CardDesignActivateTestmodeParams extends ApiRequestParams { +public class PersonalizationDesignDeactivateParams extends ApiRequestParams { /** Specifies which fields in the response should be expanded. */ @SerializedName("expand") List expand; @@ -24,7 +24,8 @@ public class CardDesignActivateTestmodeParams extends ApiRequestParams { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - private CardDesignActivateTestmodeParams(List expand, Map extraParams) { + private PersonalizationDesignDeactivateParams( + List expand, Map extraParams) { this.expand = expand; this.extraParams = extraParams; } @@ -39,14 +40,14 @@ public static class Builder { private Map extraParams; /** Finalize and obtain parameter instance from this builder. */ - public CardDesignActivateTestmodeParams build() { - return new CardDesignActivateTestmodeParams(this.expand, this.extraParams); + public PersonalizationDesignDeactivateParams build() { + return new PersonalizationDesignDeactivateParams(this.expand, this.extraParams); } /** * Add an element to `expand` list. A list is initialized for the first `add/addAll` call, and * subsequent calls adds additional elements to the original list. See {@link - * CardDesignActivateTestmodeParams#expand} for the field documentation. + * PersonalizationDesignDeactivateParams#expand} for the field documentation. */ public Builder addExpand(String element) { if (this.expand == null) { @@ -59,7 +60,7 @@ public Builder addExpand(String element) { /** * Add all elements to `expand` list. A list is initialized for the first `add/addAll` call, and * subsequent calls adds additional elements to the original list. See {@link - * CardDesignActivateTestmodeParams#expand} for the field documentation. + * PersonalizationDesignDeactivateParams#expand} for the field documentation. */ public Builder addAllExpand(List elements) { if (this.expand == null) { @@ -72,7 +73,7 @@ public Builder addAllExpand(List elements) { /** * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` * call, and subsequent calls add additional key/value pairs to the original map. See {@link - * CardDesignActivateTestmodeParams#extraParams} for the field documentation. + * PersonalizationDesignDeactivateParams#extraParams} for the field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -85,7 +86,7 @@ public Builder putExtraParam(String key, Object value) { /** * Add all map key/value pairs to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. - * See {@link CardDesignActivateTestmodeParams#extraParams} for the field documentation. + * See {@link PersonalizationDesignDeactivateParams#extraParams} for the field documentation. */ public Builder putAllExtraParam(Map map) { if (this.extraParams == null) { diff --git a/src/main/java/com/stripe/param/issuing/CardDesignListParams.java b/src/main/java/com/stripe/param/issuing/PersonalizationDesignListParams.java similarity index 81% rename from src/main/java/com/stripe/param/issuing/CardDesignListParams.java rename to src/main/java/com/stripe/param/issuing/PersonalizationDesignListParams.java index 32c59f9be40..59b909dc95b 100644 --- a/src/main/java/com/stripe/param/issuing/CardDesignListParams.java +++ b/src/main/java/com/stripe/param/issuing/PersonalizationDesignListParams.java @@ -10,7 +10,7 @@ import lombok.Getter; @Getter -public class CardDesignListParams extends ApiRequestParams { +public class PersonalizationDesignListParams extends ApiRequestParams { /** * A cursor for use in pagination. {@code ending_before} is an object ID that defines your place * in the list. For instance, if you make a list request and receive 100 objects, starting with @@ -40,11 +40,11 @@ public class CardDesignListParams extends ApiRequestParams { @SerializedName("limit") Long limit; - /** Only return card designs with the given lookup keys. */ + /** Only return personalization designs with the given lookup keys. */ @SerializedName("lookup_keys") List lookupKeys; - /** Only return card designs with the given preferences. */ + /** Only return personalization designs with the given preferences. */ @SerializedName("preferences") Preferences preferences; @@ -57,11 +57,11 @@ public class CardDesignListParams extends ApiRequestParams { @SerializedName("starting_after") String startingAfter; - /** Only return card designs with the given status. */ + /** Only return personalization designs with the given status. */ @SerializedName("status") Status status; - private CardDesignListParams( + private PersonalizationDesignListParams( String endingBefore, List expand, Map extraParams, @@ -102,8 +102,8 @@ public static class Builder { private Status status; /** Finalize and obtain parameter instance from this builder. */ - public CardDesignListParams build() { - return new CardDesignListParams( + public PersonalizationDesignListParams build() { + return new PersonalizationDesignListParams( this.endingBefore, this.expand, this.extraParams, @@ -128,7 +128,7 @@ public Builder setEndingBefore(String endingBefore) { /** * Add an element to `expand` list. A list is initialized for the first `add/addAll` call, and * subsequent calls adds additional elements to the original list. See {@link - * CardDesignListParams#expand} for the field documentation. + * PersonalizationDesignListParams#expand} for the field documentation. */ public Builder addExpand(String element) { if (this.expand == null) { @@ -141,7 +141,7 @@ public Builder addExpand(String element) { /** * Add all elements to `expand` list. A list is initialized for the first `add/addAll` call, and * subsequent calls adds additional elements to the original list. See {@link - * CardDesignListParams#expand} for the field documentation. + * PersonalizationDesignListParams#expand} for the field documentation. */ public Builder addAllExpand(List elements) { if (this.expand == null) { @@ -154,7 +154,7 @@ public Builder addAllExpand(List elements) { /** * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` * call, and subsequent calls add additional key/value pairs to the original map. See {@link - * CardDesignListParams#extraParams} for the field documentation. + * PersonalizationDesignListParams#extraParams} for the field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -167,7 +167,7 @@ public Builder putExtraParam(String key, Object value) { /** * Add all map key/value pairs to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. - * See {@link CardDesignListParams#extraParams} for the field documentation. + * See {@link PersonalizationDesignListParams#extraParams} for the field documentation. */ public Builder putAllExtraParam(Map map) { if (this.extraParams == null) { @@ -189,7 +189,7 @@ public Builder setLimit(Long limit) { /** * Add an element to `lookupKeys` list. A list is initialized for the first `add/addAll` call, * and subsequent calls adds additional elements to the original list. See {@link - * CardDesignListParams#lookupKeys} for the field documentation. + * PersonalizationDesignListParams#lookupKeys} for the field documentation. */ public Builder addLookupKey(String element) { if (this.lookupKeys == null) { @@ -202,7 +202,7 @@ public Builder addLookupKey(String element) { /** * Add all elements to `lookupKeys` list. A list is initialized for the first `add/addAll` call, * and subsequent calls adds additional elements to the original list. See {@link - * CardDesignListParams#lookupKeys} for the field documentation. + * PersonalizationDesignListParams#lookupKeys} for the field documentation. */ public Builder addAllLookupKey(List elements) { if (this.lookupKeys == null) { @@ -212,8 +212,8 @@ public Builder addAllLookupKey(List elements) { return this; } - /** Only return card designs with the given preferences. */ - public Builder setPreferences(CardDesignListParams.Preferences preferences) { + /** Only return personalization designs with the given preferences. */ + public Builder setPreferences(PersonalizationDesignListParams.Preferences preferences) { this.preferences = preferences; return this; } @@ -229,8 +229,8 @@ public Builder setStartingAfter(String startingAfter) { return this; } - /** Only return card designs with the given status. */ - public Builder setStatus(CardDesignListParams.Status status) { + /** Only return personalization designs with the given status. */ + public Builder setStatus(PersonalizationDesignListParams.Status status) { this.status = status; return this; } @@ -239,8 +239,9 @@ public Builder setStatus(CardDesignListParams.Status status) { @Getter public static class Preferences { /** - * Only return the card design that is set as the account default. A connected account will use - * the Connect platform's default if no card design is set as the account default. + * Only return the personalization design that is set as the account default. A connected + * account will use the Connect platform's default if no personalization design is set as the + * account default. */ @SerializedName("account_default") Boolean accountDefault; @@ -255,8 +256,8 @@ public static class Preferences { Map extraParams; /** - * Only return the card design that is set as the Connect platform's default. This parameter is - * only applicable to connected accounts. + * Only return the personalization design that is set as the Connect platform's default. This + * parameter is only applicable to connected accounts. */ @SerializedName("platform_default") Boolean platformDefault; @@ -280,14 +281,15 @@ public static class Builder { private Boolean platformDefault; /** Finalize and obtain parameter instance from this builder. */ - public CardDesignListParams.Preferences build() { - return new CardDesignListParams.Preferences( + public PersonalizationDesignListParams.Preferences build() { + return new PersonalizationDesignListParams.Preferences( this.accountDefault, this.extraParams, this.platformDefault); } /** - * Only return the card design that is set as the account default. A connected account will - * use the Connect platform's default if no card design is set as the account default. + * Only return the personalization design that is set as the account default. A connected + * account will use the Connect platform's default if no personalization design is set as the + * account default. */ public Builder setAccountDefault(Boolean accountDefault) { this.accountDefault = accountDefault; @@ -297,7 +299,7 @@ public Builder setAccountDefault(Boolean accountDefault) { /** * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` * call, and subsequent calls add additional key/value pairs to the original map. See {@link - * CardDesignListParams.Preferences#extraParams} for the field documentation. + * PersonalizationDesignListParams.Preferences#extraParams} for the field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -310,7 +312,8 @@ public Builder putExtraParam(String key, Object value) { /** * Add all map key/value pairs to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. - * See {@link CardDesignListParams.Preferences#extraParams} for the field documentation. + * See {@link PersonalizationDesignListParams.Preferences#extraParams} for the field + * documentation. */ public Builder putAllExtraParam(Map map) { if (this.extraParams == null) { @@ -321,8 +324,8 @@ public Builder putAllExtraParam(Map map) { } /** - * Only return the card design that is set as the Connect platform's default. This parameter - * is only applicable to connected accounts. + * Only return the personalization design that is set as the Connect platform's default. This + * parameter is only applicable to connected accounts. */ public Builder setPlatformDefault(Boolean platformDefault) { this.platformDefault = platformDefault; diff --git a/src/main/java/com/stripe/param/issuing/CardDesignRejectTestmodeParams.java b/src/main/java/com/stripe/param/issuing/PersonalizationDesignRejectParams.java similarity index 77% rename from src/main/java/com/stripe/param/issuing/CardDesignRejectTestmodeParams.java rename to src/main/java/com/stripe/param/issuing/PersonalizationDesignRejectParams.java index ff8331f33a1..547df70389c 100644 --- a/src/main/java/com/stripe/param/issuing/CardDesignRejectTestmodeParams.java +++ b/src/main/java/com/stripe/param/issuing/PersonalizationDesignRejectParams.java @@ -10,7 +10,7 @@ import lombok.Getter; @Getter -public class CardDesignRejectTestmodeParams extends ApiRequestParams { +public class PersonalizationDesignRejectParams extends ApiRequestParams { /** Specifies which fields in the response should be expanded. */ @SerializedName("expand") List expand; @@ -24,11 +24,11 @@ public class CardDesignRejectTestmodeParams extends ApiRequestParams { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Required. The reason(s) the card design was rejected. */ + /** Required. The reason(s) the personalization design was rejected. */ @SerializedName("rejection_reasons") RejectionReasons rejectionReasons; - private CardDesignRejectTestmodeParams( + private PersonalizationDesignRejectParams( List expand, Map extraParams, RejectionReasons rejectionReasons) { this.expand = expand; this.extraParams = extraParams; @@ -47,15 +47,15 @@ public static class Builder { private RejectionReasons rejectionReasons; /** Finalize and obtain parameter instance from this builder. */ - public CardDesignRejectTestmodeParams build() { - return new CardDesignRejectTestmodeParams( + public PersonalizationDesignRejectParams build() { + return new PersonalizationDesignRejectParams( this.expand, this.extraParams, this.rejectionReasons); } /** * Add an element to `expand` list. A list is initialized for the first `add/addAll` call, and * subsequent calls adds additional elements to the original list. See {@link - * CardDesignRejectTestmodeParams#expand} for the field documentation. + * PersonalizationDesignRejectParams#expand} for the field documentation. */ public Builder addExpand(String element) { if (this.expand == null) { @@ -68,7 +68,7 @@ public Builder addExpand(String element) { /** * Add all elements to `expand` list. A list is initialized for the first `add/addAll` call, and * subsequent calls adds additional elements to the original list. See {@link - * CardDesignRejectTestmodeParams#expand} for the field documentation. + * PersonalizationDesignRejectParams#expand} for the field documentation. */ public Builder addAllExpand(List elements) { if (this.expand == null) { @@ -81,7 +81,7 @@ public Builder addAllExpand(List elements) { /** * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` * call, and subsequent calls add additional key/value pairs to the original map. See {@link - * CardDesignRejectTestmodeParams#extraParams} for the field documentation. + * PersonalizationDesignRejectParams#extraParams} for the field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -94,7 +94,7 @@ public Builder putExtraParam(String key, Object value) { /** * Add all map key/value pairs to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. - * See {@link CardDesignRejectTestmodeParams#extraParams} for the field documentation. + * See {@link PersonalizationDesignRejectParams#extraParams} for the field documentation. */ public Builder putAllExtraParam(Map map) { if (this.extraParams == null) { @@ -104,9 +104,9 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Required. The reason(s) the card design was rejected. */ + /** Required. The reason(s) the personalization design was rejected. */ public Builder setRejectionReasons( - CardDesignRejectTestmodeParams.RejectionReasons rejectionReasons) { + PersonalizationDesignRejectParams.RejectionReasons rejectionReasons) { this.rejectionReasons = rejectionReasons; return this; } @@ -116,11 +116,11 @@ public Builder setRejectionReasons( public static class RejectionReasons { /** The reason(s) the card logo was rejected. */ @SerializedName("card_logo") - List cardLogo; + List cardLogo; /** The reason(s) the carrier text was rejected. */ @SerializedName("carrier_text") - List carrierText; + List carrierText; /** * Map of extra parameters for custom features not available in this client library. The content @@ -132,8 +132,8 @@ public static class RejectionReasons { Map extraParams; private RejectionReasons( - List cardLogo, - List carrierText, + List cardLogo, + List carrierText, Map extraParams) { this.cardLogo = cardLogo; this.carrierText = carrierText; @@ -145,24 +145,25 @@ public static Builder builder() { } public static class Builder { - private List cardLogo; + private List cardLogo; - private List carrierText; + private List carrierText; private Map extraParams; /** Finalize and obtain parameter instance from this builder. */ - public CardDesignRejectTestmodeParams.RejectionReasons build() { - return new CardDesignRejectTestmodeParams.RejectionReasons( + public PersonalizationDesignRejectParams.RejectionReasons build() { + return new PersonalizationDesignRejectParams.RejectionReasons( this.cardLogo, this.carrierText, this.extraParams); } /** * Add an element to `cardLogo` list. A list is initialized for the first `add/addAll` call, * and subsequent calls adds additional elements to the original list. See {@link - * CardDesignRejectTestmodeParams.RejectionReasons#cardLogo} for the field documentation. + * PersonalizationDesignRejectParams.RejectionReasons#cardLogo} for the field documentation. */ - public Builder addCardLogo(CardDesignRejectTestmodeParams.RejectionReasons.CardLogo element) { + public Builder addCardLogo( + PersonalizationDesignRejectParams.RejectionReasons.CardLogo element) { if (this.cardLogo == null) { this.cardLogo = new ArrayList<>(); } @@ -173,10 +174,10 @@ public Builder addCardLogo(CardDesignRejectTestmodeParams.RejectionReasons.CardL /** * Add all elements to `cardLogo` list. A list is initialized for the first `add/addAll` call, * and subsequent calls adds additional elements to the original list. See {@link - * CardDesignRejectTestmodeParams.RejectionReasons#cardLogo} for the field documentation. + * PersonalizationDesignRejectParams.RejectionReasons#cardLogo} for the field documentation. */ public Builder addAllCardLogo( - List elements) { + List elements) { if (this.cardLogo == null) { this.cardLogo = new ArrayList<>(); } @@ -187,10 +188,11 @@ public Builder addAllCardLogo( /** * Add an element to `carrierText` list. A list is initialized for the first `add/addAll` * call, and subsequent calls adds additional elements to the original list. See {@link - * CardDesignRejectTestmodeParams.RejectionReasons#carrierText} for the field documentation. + * PersonalizationDesignRejectParams.RejectionReasons#carrierText} for the field + * documentation. */ public Builder addCarrierText( - CardDesignRejectTestmodeParams.RejectionReasons.CarrierText element) { + PersonalizationDesignRejectParams.RejectionReasons.CarrierText element) { if (this.carrierText == null) { this.carrierText = new ArrayList<>(); } @@ -201,10 +203,11 @@ public Builder addCarrierText( /** * Add all elements to `carrierText` list. A list is initialized for the first `add/addAll` * call, and subsequent calls adds additional elements to the original list. See {@link - * CardDesignRejectTestmodeParams.RejectionReasons#carrierText} for the field documentation. + * PersonalizationDesignRejectParams.RejectionReasons#carrierText} for the field + * documentation. */ public Builder addAllCarrierText( - List elements) { + List elements) { if (this.carrierText == null) { this.carrierText = new ArrayList<>(); } @@ -215,7 +218,8 @@ public Builder addAllCarrierText( /** * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` * call, and subsequent calls add additional key/value pairs to the original map. See {@link - * CardDesignRejectTestmodeParams.RejectionReasons#extraParams} for the field documentation. + * PersonalizationDesignRejectParams.RejectionReasons#extraParams} for the field + * documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -228,7 +232,7 @@ public Builder putExtraParam(String key, Object value) { /** * Add all map key/value pairs to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. - * See {@link CardDesignRejectTestmodeParams.RejectionReasons#extraParams} for the field + * See {@link PersonalizationDesignRejectParams.RejectionReasons#extraParams} for the field * documentation. */ public Builder putAllExtraParam(Map map) { diff --git a/src/main/java/com/stripe/param/issuing/CardDesignDeactivateTestmodeParams.java b/src/main/java/com/stripe/param/issuing/PersonalizationDesignRetrieveParams.java similarity index 81% rename from src/main/java/com/stripe/param/issuing/CardDesignDeactivateTestmodeParams.java rename to src/main/java/com/stripe/param/issuing/PersonalizationDesignRetrieveParams.java index 80e974014d1..0da463a9854 100644 --- a/src/main/java/com/stripe/param/issuing/CardDesignDeactivateTestmodeParams.java +++ b/src/main/java/com/stripe/param/issuing/PersonalizationDesignRetrieveParams.java @@ -10,7 +10,7 @@ import lombok.Getter; @Getter -public class CardDesignDeactivateTestmodeParams extends ApiRequestParams { +public class PersonalizationDesignRetrieveParams extends ApiRequestParams { /** Specifies which fields in the response should be expanded. */ @SerializedName("expand") List expand; @@ -24,7 +24,8 @@ public class CardDesignDeactivateTestmodeParams extends ApiRequestParams { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - private CardDesignDeactivateTestmodeParams(List expand, Map extraParams) { + private PersonalizationDesignRetrieveParams( + List expand, Map extraParams) { this.expand = expand; this.extraParams = extraParams; } @@ -39,14 +40,14 @@ public static class Builder { private Map extraParams; /** Finalize and obtain parameter instance from this builder. */ - public CardDesignDeactivateTestmodeParams build() { - return new CardDesignDeactivateTestmodeParams(this.expand, this.extraParams); + public PersonalizationDesignRetrieveParams build() { + return new PersonalizationDesignRetrieveParams(this.expand, this.extraParams); } /** * Add an element to `expand` list. A list is initialized for the first `add/addAll` call, and * subsequent calls adds additional elements to the original list. See {@link - * CardDesignDeactivateTestmodeParams#expand} for the field documentation. + * PersonalizationDesignRetrieveParams#expand} for the field documentation. */ public Builder addExpand(String element) { if (this.expand == null) { @@ -59,7 +60,7 @@ public Builder addExpand(String element) { /** * Add all elements to `expand` list. A list is initialized for the first `add/addAll` call, and * subsequent calls adds additional elements to the original list. See {@link - * CardDesignDeactivateTestmodeParams#expand} for the field documentation. + * PersonalizationDesignRetrieveParams#expand} for the field documentation. */ public Builder addAllExpand(List elements) { if (this.expand == null) { @@ -72,7 +73,7 @@ public Builder addAllExpand(List elements) { /** * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` * call, and subsequent calls add additional key/value pairs to the original map. See {@link - * CardDesignDeactivateTestmodeParams#extraParams} for the field documentation. + * PersonalizationDesignRetrieveParams#extraParams} for the field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -85,7 +86,7 @@ public Builder putExtraParam(String key, Object value) { /** * Add all map key/value pairs to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. - * See {@link CardDesignDeactivateTestmodeParams#extraParams} for the field documentation. + * See {@link PersonalizationDesignRetrieveParams#extraParams} for the field documentation. */ public Builder putAllExtraParam(Map map) { if (this.extraParams == null) { diff --git a/src/main/java/com/stripe/param/issuing/CardDesignUpdateParams.java b/src/main/java/com/stripe/param/issuing/PersonalizationDesignUpdateParams.java similarity index 75% rename from src/main/java/com/stripe/param/issuing/CardDesignUpdateParams.java rename to src/main/java/com/stripe/param/issuing/PersonalizationDesignUpdateParams.java index e7ce6525913..e21b04393d1 100644 --- a/src/main/java/com/stripe/param/issuing/CardDesignUpdateParams.java +++ b/src/main/java/com/stripe/param/issuing/PersonalizationDesignUpdateParams.java @@ -11,16 +11,15 @@ import lombok.Getter; @Getter -public class CardDesignUpdateParams extends ApiRequestParams { - /** The card bundle object belonging to this card design. */ - @SerializedName("card_bundle") - Object cardBundle; - - /** The file for the card logo, for use with card bundles that support card logos. */ +public class PersonalizationDesignUpdateParams extends ApiRequestParams { + /** + * The file for the card logo, for use with physical bundles that support card logos. Must have + * {@code purpose} value of {@code issuing_logo}. + */ @SerializedName("card_logo") Object cardLogo; - /** Hash containing carrier text, for use with card bundles that support carrier text. */ + /** Hash containing carrier text, for use with physical bundles that support carrier text. */ @SerializedName("carrier_text") Object carrierText; @@ -38,8 +37,8 @@ public class CardDesignUpdateParams extends ApiRequestParams { Map extraParams; /** - * A lookup key used to retrieve card designs dynamically from a static string. This may be up to - * 200 characters. + * A lookup key used to retrieve personalization designs dynamically from a static string. This + * may be up to 200 characters. */ @SerializedName("lookup_key") Object lookupKey; @@ -57,19 +56,25 @@ public class CardDesignUpdateParams extends ApiRequestParams { @SerializedName("name") Object name; - /** Information on whether this card design is used to create cards when one is not specified. */ + /** The physical bundle object belonging to this personalization design. */ + @SerializedName("physical_bundle") + Object physicalBundle; + + /** + * Information on whether this personalization design is used to create cards when one is not + * specified. + */ @SerializedName("preferences") Preferences preferences; /** - * If set to true, will atomically remove the lookup key from the existing card design, and assign - * it to this card design. + * If set to true, will atomically remove the lookup key from the existing personalization design, + * and assign it to this personalization design. */ @SerializedName("transfer_lookup_key") Boolean transferLookupKey; - private CardDesignUpdateParams( - Object cardBundle, + private PersonalizationDesignUpdateParams( Object cardLogo, Object carrierText, List expand, @@ -77,9 +82,9 @@ private CardDesignUpdateParams( Object lookupKey, Map metadata, Object name, + Object physicalBundle, Preferences preferences, Boolean transferLookupKey) { - this.cardBundle = cardBundle; this.cardLogo = cardLogo; this.carrierText = carrierText; this.expand = expand; @@ -87,6 +92,7 @@ private CardDesignUpdateParams( this.lookupKey = lookupKey; this.metadata = metadata; this.name = name; + this.physicalBundle = physicalBundle; this.preferences = preferences; this.transferLookupKey = transferLookupKey; } @@ -96,8 +102,6 @@ public static Builder builder() { } public static class Builder { - private Object cardBundle; - private Object cardLogo; private Object carrierText; @@ -112,14 +116,15 @@ public static class Builder { private Object name; + private Object physicalBundle; + private Preferences preferences; private Boolean transferLookupKey; /** Finalize and obtain parameter instance from this builder. */ - public CardDesignUpdateParams build() { - return new CardDesignUpdateParams( - this.cardBundle, + public PersonalizationDesignUpdateParams build() { + return new PersonalizationDesignUpdateParams( this.cardLogo, this.carrierText, this.expand, @@ -127,41 +132,36 @@ public CardDesignUpdateParams build() { this.lookupKey, this.metadata, this.name, + this.physicalBundle, this.preferences, this.transferLookupKey); } - /** The card bundle object belonging to this card design. */ - public Builder setCardBundle(String cardBundle) { - this.cardBundle = cardBundle; - return this; - } - - /** The card bundle object belonging to this card design. */ - public Builder setCardBundle(EmptyParam cardBundle) { - this.cardBundle = cardBundle; - return this; - } - - /** The file for the card logo, for use with card bundles that support card logos. */ + /** + * The file for the card logo, for use with physical bundles that support card logos. Must have + * {@code purpose} value of {@code issuing_logo}. + */ public Builder setCardLogo(String cardLogo) { this.cardLogo = cardLogo; return this; } - /** The file for the card logo, for use with card bundles that support card logos. */ + /** + * The file for the card logo, for use with physical bundles that support card logos. Must have + * {@code purpose} value of {@code issuing_logo}. + */ public Builder setCardLogo(EmptyParam cardLogo) { this.cardLogo = cardLogo; return this; } - /** Hash containing carrier text, for use with card bundles that support carrier text. */ - public Builder setCarrierText(CardDesignUpdateParams.CarrierText carrierText) { + /** Hash containing carrier text, for use with physical bundles that support carrier text. */ + public Builder setCarrierText(PersonalizationDesignUpdateParams.CarrierText carrierText) { this.carrierText = carrierText; return this; } - /** Hash containing carrier text, for use with card bundles that support carrier text. */ + /** Hash containing carrier text, for use with physical bundles that support carrier text. */ public Builder setCarrierText(EmptyParam carrierText) { this.carrierText = carrierText; return this; @@ -170,7 +170,7 @@ public Builder setCarrierText(EmptyParam carrierText) { /** * Add an element to `expand` list. A list is initialized for the first `add/addAll` call, and * subsequent calls adds additional elements to the original list. See {@link - * CardDesignUpdateParams#expand} for the field documentation. + * PersonalizationDesignUpdateParams#expand} for the field documentation. */ public Builder addExpand(String element) { if (this.expand == null) { @@ -183,7 +183,7 @@ public Builder addExpand(String element) { /** * Add all elements to `expand` list. A list is initialized for the first `add/addAll` call, and * subsequent calls adds additional elements to the original list. See {@link - * CardDesignUpdateParams#expand} for the field documentation. + * PersonalizationDesignUpdateParams#expand} for the field documentation. */ public Builder addAllExpand(List elements) { if (this.expand == null) { @@ -196,7 +196,7 @@ public Builder addAllExpand(List elements) { /** * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` * call, and subsequent calls add additional key/value pairs to the original map. See {@link - * CardDesignUpdateParams#extraParams} for the field documentation. + * PersonalizationDesignUpdateParams#extraParams} for the field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -209,7 +209,7 @@ public Builder putExtraParam(String key, Object value) { /** * Add all map key/value pairs to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. - * See {@link CardDesignUpdateParams#extraParams} for the field documentation. + * See {@link PersonalizationDesignUpdateParams#extraParams} for the field documentation. */ public Builder putAllExtraParam(Map map) { if (this.extraParams == null) { @@ -220,8 +220,8 @@ public Builder putAllExtraParam(Map map) { } /** - * A lookup key used to retrieve card designs dynamically from a static string. This may be up - * to 200 characters. + * A lookup key used to retrieve personalization designs dynamically from a static string. This + * may be up to 200 characters. */ public Builder setLookupKey(String lookupKey) { this.lookupKey = lookupKey; @@ -229,8 +229,8 @@ public Builder setLookupKey(String lookupKey) { } /** - * A lookup key used to retrieve card designs dynamically from a static string. This may be up - * to 200 characters. + * A lookup key used to retrieve personalization designs dynamically from a static string. This + * may be up to 200 characters. */ public Builder setLookupKey(EmptyParam lookupKey) { this.lookupKey = lookupKey; @@ -240,7 +240,7 @@ public Builder setLookupKey(EmptyParam lookupKey) { /** * Add a key/value pair to `metadata` map. A map is initialized for the first `put/putAll` call, * and subsequent calls add additional key/value pairs to the original map. See {@link - * CardDesignUpdateParams#metadata} for the field documentation. + * PersonalizationDesignUpdateParams#metadata} for the field documentation. */ public Builder putMetadata(String key, String value) { if (this.metadata == null) { @@ -253,7 +253,7 @@ public Builder putMetadata(String key, String value) { /** * Add all map key/value pairs to `metadata` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. - * See {@link CardDesignUpdateParams#metadata} for the field documentation. + * See {@link PersonalizationDesignUpdateParams#metadata} for the field documentation. */ public Builder putAllMetadata(Map map) { if (this.metadata == null) { @@ -275,17 +275,30 @@ public Builder setName(EmptyParam name) { return this; } + /** The physical bundle object belonging to this personalization design. */ + public Builder setPhysicalBundle(String physicalBundle) { + this.physicalBundle = physicalBundle; + return this; + } + + /** The physical bundle object belonging to this personalization design. */ + public Builder setPhysicalBundle(EmptyParam physicalBundle) { + this.physicalBundle = physicalBundle; + return this; + } + /** - * Information on whether this card design is used to create cards when one is not specified. + * Information on whether this personalization design is used to create cards when one is not + * specified. */ - public Builder setPreferences(CardDesignUpdateParams.Preferences preferences) { + public Builder setPreferences(PersonalizationDesignUpdateParams.Preferences preferences) { this.preferences = preferences; return this; } /** - * If set to true, will atomically remove the lookup key from the existing card design, and - * assign it to this card design. + * If set to true, will atomically remove the lookup key from the existing personalization + * design, and assign it to this personalization design. */ public Builder setTransferLookupKey(Boolean transferLookupKey) { this.transferLookupKey = transferLookupKey; @@ -349,15 +362,15 @@ public static class Builder { private Object headerTitle; /** Finalize and obtain parameter instance from this builder. */ - public CardDesignUpdateParams.CarrierText build() { - return new CardDesignUpdateParams.CarrierText( + public PersonalizationDesignUpdateParams.CarrierText build() { + return new PersonalizationDesignUpdateParams.CarrierText( this.extraParams, this.footerBody, this.footerTitle, this.headerBody, this.headerTitle); } /** * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` * call, and subsequent calls add additional key/value pairs to the original map. See {@link - * CardDesignUpdateParams.CarrierText#extraParams} for the field documentation. + * PersonalizationDesignUpdateParams.CarrierText#extraParams} for the field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -370,7 +383,8 @@ public Builder putExtraParam(String key, Object value) { /** * Add all map key/value pairs to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. - * See {@link CardDesignUpdateParams.CarrierText#extraParams} for the field documentation. + * See {@link PersonalizationDesignUpdateParams.CarrierText#extraParams} for the field + * documentation. */ public Builder putAllExtraParam(Map map) { if (this.extraParams == null) { @@ -433,9 +447,9 @@ public Builder setHeaderTitle(EmptyParam headerTitle) { @Getter public static class Preferences { /** - * Required. Whether this card design is used to create cards when one is not - * specified. A connected account will use the Connect platform's default if no card design is - * set as the account default. + * Required. Whether this personalization design is used to create cards when + * one is not specified. A connected account will use the Connect platform's default if no + * personalization design is set as the account default. */ @SerializedName("account_default") Boolean accountDefault; @@ -464,14 +478,15 @@ public static class Builder { private Map extraParams; /** Finalize and obtain parameter instance from this builder. */ - public CardDesignUpdateParams.Preferences build() { - return new CardDesignUpdateParams.Preferences(this.accountDefault, this.extraParams); + public PersonalizationDesignUpdateParams.Preferences build() { + return new PersonalizationDesignUpdateParams.Preferences( + this.accountDefault, this.extraParams); } /** - * Required. Whether this card design is used to create cards when one is not - * specified. A connected account will use the Connect platform's default if no card design is - * set as the account default. + * Required. Whether this personalization design is used to create cards when + * one is not specified. A connected account will use the Connect platform's default if no + * personalization design is set as the account default. */ public Builder setAccountDefault(Boolean accountDefault) { this.accountDefault = accountDefault; @@ -481,7 +496,7 @@ public Builder setAccountDefault(Boolean accountDefault) { /** * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` * call, and subsequent calls add additional key/value pairs to the original map. See {@link - * CardDesignUpdateParams.Preferences#extraParams} for the field documentation. + * PersonalizationDesignUpdateParams.Preferences#extraParams} for the field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -494,7 +509,8 @@ public Builder putExtraParam(String key, Object value) { /** * Add all map key/value pairs to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. - * See {@link CardDesignUpdateParams.Preferences#extraParams} for the field documentation. + * See {@link PersonalizationDesignUpdateParams.Preferences#extraParams} for the field + * documentation. */ public Builder putAllExtraParam(Map map) { if (this.extraParams == null) { diff --git a/src/main/java/com/stripe/param/issuing/CardBundleListParams.java b/src/main/java/com/stripe/param/issuing/PhysicalBundleListParams.java similarity index 88% rename from src/main/java/com/stripe/param/issuing/CardBundleListParams.java rename to src/main/java/com/stripe/param/issuing/PhysicalBundleListParams.java index 206f085ef67..9be09087600 100644 --- a/src/main/java/com/stripe/param/issuing/CardBundleListParams.java +++ b/src/main/java/com/stripe/param/issuing/PhysicalBundleListParams.java @@ -10,7 +10,7 @@ import lombok.Getter; @Getter -public class CardBundleListParams extends ApiRequestParams { +public class PhysicalBundleListParams extends ApiRequestParams { /** * A cursor for use in pagination. {@code ending_before} is an object ID that defines your place * in the list. For instance, if you make a list request and receive 100 objects, starting with @@ -49,15 +49,15 @@ public class CardBundleListParams extends ApiRequestParams { @SerializedName("starting_after") String startingAfter; - /** Only return card bundles with the given status. */ + /** Only return physical bundles with the given status. */ @SerializedName("status") Status status; - /** Only return card bundles with the given type. */ + /** Only return physical bundles with the given type. */ @SerializedName("type") Type type; - private CardBundleListParams( + private PhysicalBundleListParams( String endingBefore, List expand, Map extraParams, @@ -94,8 +94,8 @@ public static class Builder { private Type type; /** Finalize and obtain parameter instance from this builder. */ - public CardBundleListParams build() { - return new CardBundleListParams( + public PhysicalBundleListParams build() { + return new PhysicalBundleListParams( this.endingBefore, this.expand, this.extraParams, @@ -119,7 +119,7 @@ public Builder setEndingBefore(String endingBefore) { /** * Add an element to `expand` list. A list is initialized for the first `add/addAll` call, and * subsequent calls adds additional elements to the original list. See {@link - * CardBundleListParams#expand} for the field documentation. + * PhysicalBundleListParams#expand} for the field documentation. */ public Builder addExpand(String element) { if (this.expand == null) { @@ -132,7 +132,7 @@ public Builder addExpand(String element) { /** * Add all elements to `expand` list. A list is initialized for the first `add/addAll` call, and * subsequent calls adds additional elements to the original list. See {@link - * CardBundleListParams#expand} for the field documentation. + * PhysicalBundleListParams#expand} for the field documentation. */ public Builder addAllExpand(List elements) { if (this.expand == null) { @@ -145,7 +145,7 @@ public Builder addAllExpand(List elements) { /** * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` * call, and subsequent calls add additional key/value pairs to the original map. See {@link - * CardBundleListParams#extraParams} for the field documentation. + * PhysicalBundleListParams#extraParams} for the field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -158,7 +158,7 @@ public Builder putExtraParam(String key, Object value) { /** * Add all map key/value pairs to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. - * See {@link CardBundleListParams#extraParams} for the field documentation. + * See {@link PhysicalBundleListParams#extraParams} for the field documentation. */ public Builder putAllExtraParam(Map map) { if (this.extraParams == null) { @@ -188,14 +188,14 @@ public Builder setStartingAfter(String startingAfter) { return this; } - /** Only return card bundles with the given status. */ - public Builder setStatus(CardBundleListParams.Status status) { + /** Only return physical bundles with the given status. */ + public Builder setStatus(PhysicalBundleListParams.Status status) { this.status = status; return this; } - /** Only return card bundles with the given type. */ - public Builder setType(CardBundleListParams.Type type) { + /** Only return physical bundles with the given type. */ + public Builder setType(PhysicalBundleListParams.Type type) { this.type = type; return this; } diff --git a/src/main/java/com/stripe/param/issuing/CardDesignRetrieveParams.java b/src/main/java/com/stripe/param/issuing/PhysicalBundleRetrieveParams.java similarity index 82% rename from src/main/java/com/stripe/param/issuing/CardDesignRetrieveParams.java rename to src/main/java/com/stripe/param/issuing/PhysicalBundleRetrieveParams.java index 92a31e97458..f597a08e0c4 100644 --- a/src/main/java/com/stripe/param/issuing/CardDesignRetrieveParams.java +++ b/src/main/java/com/stripe/param/issuing/PhysicalBundleRetrieveParams.java @@ -10,7 +10,7 @@ import lombok.Getter; @Getter -public class CardDesignRetrieveParams extends ApiRequestParams { +public class PhysicalBundleRetrieveParams extends ApiRequestParams { /** Specifies which fields in the response should be expanded. */ @SerializedName("expand") List expand; @@ -24,7 +24,7 @@ public class CardDesignRetrieveParams extends ApiRequestParams { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - private CardDesignRetrieveParams(List expand, Map extraParams) { + private PhysicalBundleRetrieveParams(List expand, Map extraParams) { this.expand = expand; this.extraParams = extraParams; } @@ -39,14 +39,14 @@ public static class Builder { private Map extraParams; /** Finalize and obtain parameter instance from this builder. */ - public CardDesignRetrieveParams build() { - return new CardDesignRetrieveParams(this.expand, this.extraParams); + public PhysicalBundleRetrieveParams build() { + return new PhysicalBundleRetrieveParams(this.expand, this.extraParams); } /** * Add an element to `expand` list. A list is initialized for the first `add/addAll` call, and * subsequent calls adds additional elements to the original list. See {@link - * CardDesignRetrieveParams#expand} for the field documentation. + * PhysicalBundleRetrieveParams#expand} for the field documentation. */ public Builder addExpand(String element) { if (this.expand == null) { @@ -59,7 +59,7 @@ public Builder addExpand(String element) { /** * Add all elements to `expand` list. A list is initialized for the first `add/addAll` call, and * subsequent calls adds additional elements to the original list. See {@link - * CardDesignRetrieveParams#expand} for the field documentation. + * PhysicalBundleRetrieveParams#expand} for the field documentation. */ public Builder addAllExpand(List elements) { if (this.expand == null) { @@ -72,7 +72,7 @@ public Builder addAllExpand(List elements) { /** * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` * call, and subsequent calls add additional key/value pairs to the original map. See {@link - * CardDesignRetrieveParams#extraParams} for the field documentation. + * PhysicalBundleRetrieveParams#extraParams} for the field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -85,7 +85,7 @@ public Builder putExtraParam(String key, Object value) { /** * Add all map key/value pairs to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. - * See {@link CardDesignRetrieveParams#extraParams} for the field documentation. + * See {@link PhysicalBundleRetrieveParams#extraParams} for the field documentation. */ public Builder putAllExtraParam(Map map) { if (this.extraParams == null) { diff --git a/src/main/java/com/stripe/service/IssuingService.java b/src/main/java/com/stripe/service/IssuingService.java index 7c27be6a86b..22b97f98fa4 100644 --- a/src/main/java/com/stripe/service/IssuingService.java +++ b/src/main/java/com/stripe/service/IssuingService.java @@ -13,14 +13,6 @@ public com.stripe.service.issuing.AuthorizationService authorizations() { return new com.stripe.service.issuing.AuthorizationService(this.getResponseGetter()); } - public com.stripe.service.issuing.CardBundleService cardBundles() { - return new com.stripe.service.issuing.CardBundleService(this.getResponseGetter()); - } - - public com.stripe.service.issuing.CardDesignService cardDesigns() { - return new com.stripe.service.issuing.CardDesignService(this.getResponseGetter()); - } - public com.stripe.service.issuing.CardholderService cardholders() { return new com.stripe.service.issuing.CardholderService(this.getResponseGetter()); } @@ -33,6 +25,14 @@ public com.stripe.service.issuing.DisputeService disputes() { return new com.stripe.service.issuing.DisputeService(this.getResponseGetter()); } + public com.stripe.service.issuing.PersonalizationDesignService personalizationDesigns() { + return new com.stripe.service.issuing.PersonalizationDesignService(this.getResponseGetter()); + } + + public com.stripe.service.issuing.PhysicalBundleService physicalBundles() { + return new com.stripe.service.issuing.PhysicalBundleService(this.getResponseGetter()); + } + public com.stripe.service.issuing.TransactionService transactions() { return new com.stripe.service.issuing.TransactionService(this.getResponseGetter()); } diff --git a/src/main/java/com/stripe/service/PaymentIntentService.java b/src/main/java/com/stripe/service/PaymentIntentService.java index d620e1be7ea..43b109ae854 100644 --- a/src/main/java/com/stripe/service/PaymentIntentService.java +++ b/src/main/java/com/stripe/service/PaymentIntentService.java @@ -68,13 +68,13 @@ public StripeSearchResult search( * *

After the PaymentIntent is created, attach a payment method and confirm to continue the payment. - * You can read more about the different payment flows available via the Payment Intents API here. + * Learn more about the available + * payment flows with the Payment Intents API. * - *

When {@code confirm=true} is used during creation, it is equivalent to creating and - * confirming the PaymentIntent in the same call. You may use any parameters available in the confirm API when {@code - * confirm=true} is supplied. + *

When you use {@code confirm=true} during creation, it’s equivalent to creating and + * confirming the PaymentIntent in the same call. You can use any parameters available in the confirm API when you supply + * {@code confirm=true}. */ public PaymentIntent create(PaymentIntentCreateParams params) throws StripeException { return create(params, (RequestOptions) null); @@ -84,13 +84,13 @@ public PaymentIntent create(PaymentIntentCreateParams params) throws StripeExcep * *

After the PaymentIntent is created, attach a payment method and confirm to continue the payment. - * You can read more about the different payment flows available via the Payment Intents API here. + * Learn more about the available + * payment flows with the Payment Intents API. * - *

When {@code confirm=true} is used during creation, it is equivalent to creating and - * confirming the PaymentIntent in the same call. You may use any parameters available in the confirm API when {@code - * confirm=true} is supplied. + *

When you use {@code confirm=true} during creation, it’s equivalent to creating and + * confirming the PaymentIntent in the same call. You can use any parameters available in the confirm API when you supply + * {@code confirm=true}. */ public PaymentIntent create(PaymentIntentCreateParams params, RequestOptions options) throws StripeException { @@ -369,16 +369,16 @@ public PaymentIntent confirm( ApiMode.V1); } /** - * A PaymentIntent object can be canceled when it is in one of these statuses: {@code + * You can cancel a PaymentIntent object when it’s in one of these statuses: {@code * requires_payment_method}, {@code requires_capture}, {@code requires_confirmation}, {@code * requires_action} or, in rare cases, * {@code processing}. * - *

Once canceled, no additional charges will be made by the PaymentIntent and any operations on - * the PaymentIntent will fail with an error. For PaymentIntents with a {@code status} of {@code - * requires_capture}, the remaining {@code amount_capturable} will automatically be refunded. + *

After it’s canceled, no additional charges are made by the PaymentIntent and any operations + * on the PaymentIntent fail with an error. For PaymentIntents with a {@code status} of {@code + * requires_capture}, the remaining {@code amount_capturable} is automatically refunded. * - *

You cannot cancel the PaymentIntent for a Checkout Session. You can’t cancel the PaymentIntent for a Checkout Session. Expire the Checkout Session * instead. */ @@ -387,16 +387,16 @@ public PaymentIntent cancel(String intent, PaymentIntentCancelParams params) return cancel(intent, params, (RequestOptions) null); } /** - * A PaymentIntent object can be canceled when it is in one of these statuses: {@code + * You can cancel a PaymentIntent object when it’s in one of these statuses: {@code * requires_payment_method}, {@code requires_capture}, {@code requires_confirmation}, {@code * requires_action} or, in rare cases, * {@code processing}. * - *

Once canceled, no additional charges will be made by the PaymentIntent and any operations on - * the PaymentIntent will fail with an error. For PaymentIntents with a {@code status} of {@code - * requires_capture}, the remaining {@code amount_capturable} will automatically be refunded. + *

After it’s canceled, no additional charges are made by the PaymentIntent and any operations + * on the PaymentIntent fail with an error. For PaymentIntents with a {@code status} of {@code + * requires_capture}, the remaining {@code amount_capturable} is automatically refunded. * - *

You cannot cancel the PaymentIntent for a Checkout Session. You can’t cancel the PaymentIntent for a Checkout Session. Expire the Checkout Session * instead. */ @@ -404,16 +404,16 @@ public PaymentIntent cancel(String intent, RequestOptions options) throws Stripe return cancel(intent, (PaymentIntentCancelParams) null, options); } /** - * A PaymentIntent object can be canceled when it is in one of these statuses: {@code + * You can cancel a PaymentIntent object when it’s in one of these statuses: {@code * requires_payment_method}, {@code requires_capture}, {@code requires_confirmation}, {@code * requires_action} or, in rare cases, * {@code processing}. * - *

Once canceled, no additional charges will be made by the PaymentIntent and any operations on - * the PaymentIntent will fail with an error. For PaymentIntents with a {@code status} of {@code - * requires_capture}, the remaining {@code amount_capturable} will automatically be refunded. + *

After it’s canceled, no additional charges are made by the PaymentIntent and any operations + * on the PaymentIntent fail with an error. For PaymentIntents with a {@code status} of {@code + * requires_capture}, the remaining {@code amount_capturable} is automatically refunded. * - *

You cannot cancel the PaymentIntent for a Checkout Session. You can’t cancel the PaymentIntent for a Checkout Session. Expire the Checkout Session * instead. */ @@ -421,16 +421,16 @@ public PaymentIntent cancel(String intent) throws StripeException { return cancel(intent, (PaymentIntentCancelParams) null, (RequestOptions) null); } /** - * A PaymentIntent object can be canceled when it is in one of these statuses: {@code + * You can cancel a PaymentIntent object when it’s in one of these statuses: {@code * requires_payment_method}, {@code requires_capture}, {@code requires_confirmation}, {@code * requires_action} or, in rare cases, * {@code processing}. * - *

Once canceled, no additional charges will be made by the PaymentIntent and any operations on - * the PaymentIntent will fail with an error. For PaymentIntents with a {@code status} of {@code - * requires_capture}, the remaining {@code amount_capturable} will automatically be refunded. + *

After it’s canceled, no additional charges are made by the PaymentIntent and any operations + * on the PaymentIntent fail with an error. For PaymentIntents with a {@code status} of {@code + * requires_capture}, the remaining {@code amount_capturable} is automatically refunded. * - *

You cannot cancel the PaymentIntent for a Checkout Session. You can’t cancel the PaymentIntent for a Checkout Session. Expire the Checkout Session * instead. */ @@ -452,8 +452,8 @@ public PaymentIntent cancel( * Capture the funds of an existing uncaptured PaymentIntent when its status is {@code * requires_capture}. * - *

Uncaptured PaymentIntents will be canceled a set number of days after they are created (7 by - * default). + *

Uncaptured PaymentIntents are cancelled a set number of days (7 by default) after their + * creation. * *

Learn more about separate * authorization and capture. @@ -466,8 +466,8 @@ public PaymentIntent capture(String intent, PaymentIntentCaptureParams params) * Capture the funds of an existing uncaptured PaymentIntent when its status is {@code * requires_capture}. * - *

Uncaptured PaymentIntents will be canceled a set number of days after they are created (7 by - * default). + *

Uncaptured PaymentIntents are cancelled a set number of days (7 by default) after their + * creation. * *

Learn more about separate * authorization and capture. @@ -479,8 +479,8 @@ public PaymentIntent capture(String intent, RequestOptions options) throws Strip * Capture the funds of an existing uncaptured PaymentIntent when its status is {@code * requires_capture}. * - *

Uncaptured PaymentIntents will be canceled a set number of days after they are created (7 by - * default). + *

Uncaptured PaymentIntents are cancelled a set number of days (7 by default) after their + * creation. * *

Learn more about separate * authorization and capture. @@ -492,8 +492,8 @@ public PaymentIntent capture(String intent) throws StripeException { * Capture the funds of an existing uncaptured PaymentIntent when its status is {@code * requires_capture}. * - *

Uncaptured PaymentIntents will be canceled a set number of days after they are created (7 by - * default). + *

Uncaptured PaymentIntents are cancelled a set number of days (7 by default) after their + * creation. * *

Learn more about separate * authorization and capture. @@ -520,20 +520,20 @@ public PaymentIntent capture( * must be {@code true}. * *

Incremental authorizations attempt to increase the authorized amount on your customer’s card - * to the new, higher {@code amount} provided. As with the initial authorization, incremental - * authorizations may be declined. A single PaymentIntent can call this endpoint multiple times to + * to the new, higher {@code amount} provided. Similar to the initial authorization, incremental + * authorizations can be declined. A single PaymentIntent can call this endpoint multiple times to * further increase the authorized amount. * - *

If the incremental authorization succeeds, the PaymentIntent object is returned with the - * updated If the incremental authorization succeeds, the PaymentIntent object returns with the updated + * amount. * If the incremental authorization fails, a card_declined error is returned, - * and no fields on the PaymentIntent or Charge are updated. The PaymentIntent object remains + * href="https://stripe.com/docs/error-codes#card-declined">card_declined error returns, and + * no other fields on the PaymentIntent or Charge update. The PaymentIntent object remains * capturable for the previously authorized amount. * *

Each PaymentIntent can have a maximum of 10 incremental authorization attempts, including - * declines. Once captured, a PaymentIntent can no longer be incremented. + * declines. After it’s captured, a PaymentIntent can no longer be incremented. * *

Learn more about incremental @@ -551,20 +551,20 @@ public PaymentIntent incrementAuthorization( * must be {@code true}. * *

Incremental authorizations attempt to increase the authorized amount on your customer’s card - * to the new, higher {@code amount} provided. As with the initial authorization, incremental - * authorizations may be declined. A single PaymentIntent can call this endpoint multiple times to + * to the new, higher {@code amount} provided. Similar to the initial authorization, incremental + * authorizations can be declined. A single PaymentIntent can call this endpoint multiple times to * further increase the authorized amount. * - *

If the incremental authorization succeeds, the PaymentIntent object is returned with the - * updated If the incremental authorization succeeds, the PaymentIntent object returns with the updated + * amount. * If the incremental authorization fails, a card_declined error is returned, - * and no fields on the PaymentIntent or Charge are updated. The PaymentIntent object remains + * href="https://stripe.com/docs/error-codes#card-declined">card_declined error returns, and + * no other fields on the PaymentIntent or Charge update. The PaymentIntent object remains * capturable for the previously authorized amount. * *

Each PaymentIntent can have a maximum of 10 incremental authorization attempts, including - * declines. Once captured, a PaymentIntent can no longer be incremented. + * declines. After it’s captured, a PaymentIntent can no longer be incremented. * *

Learn more about incremental @@ -618,22 +618,22 @@ public PaymentIntent verifyMicrodeposits( options, ApiMode.V1); } - /** Manually reconcile the remaining amount for a customer_balance PaymentIntent. */ + /** Manually reconcile the remaining amount for a {@code customer_balance} PaymentIntent. */ public PaymentIntent applyCustomerBalance( String intent, PaymentIntentApplyCustomerBalanceParams params) throws StripeException { return applyCustomerBalance(intent, params, (RequestOptions) null); } - /** Manually reconcile the remaining amount for a customer_balance PaymentIntent. */ + /** Manually reconcile the remaining amount for a {@code customer_balance} PaymentIntent. */ public PaymentIntent applyCustomerBalance(String intent, RequestOptions options) throws StripeException { return applyCustomerBalance(intent, (PaymentIntentApplyCustomerBalanceParams) null, options); } - /** Manually reconcile the remaining amount for a customer_balance PaymentIntent. */ + /** Manually reconcile the remaining amount for a {@code customer_balance} PaymentIntent. */ public PaymentIntent applyCustomerBalance(String intent) throws StripeException { return applyCustomerBalance( intent, (PaymentIntentApplyCustomerBalanceParams) null, (RequestOptions) null); } - /** Manually reconcile the remaining amount for a customer_balance PaymentIntent. */ + /** Manually reconcile the remaining amount for a {@code customer_balance} PaymentIntent. */ public PaymentIntent applyCustomerBalance( String intent, PaymentIntentApplyCustomerBalanceParams params, RequestOptions options) throws StripeException { diff --git a/src/main/java/com/stripe/service/PaymentSourceService.java b/src/main/java/com/stripe/service/PaymentSourceService.java index 247db3a5aaa..96766ed99d5 100644 --- a/src/main/java/com/stripe/service/PaymentSourceService.java +++ b/src/main/java/com/stripe/service/PaymentSourceService.java @@ -3,6 +3,7 @@ import com.google.gson.reflect.TypeToken; import com.stripe.exception.StripeException; +import com.stripe.model.BankAccount; import com.stripe.model.PaymentSource; import com.stripe.model.StripeCollection; import com.stripe.net.ApiMode; @@ -17,6 +18,7 @@ import com.stripe.param.PaymentSourceListParams; import com.stripe.param.PaymentSourceRetrieveParams; import com.stripe.param.PaymentSourceUpdateParams; +import com.stripe.param.PaymentSourceVerifyParams; public final class PaymentSourceService extends ApiService { public PaymentSourceService(StripeResponseGetter responseGetter) { @@ -184,4 +186,36 @@ public PaymentSource delete( options, ApiMode.V1); } + /** Verify a specified bank account for a given customer. */ + public BankAccount verify(String customer, String id, PaymentSourceVerifyParams params) + throws StripeException { + return verify(customer, id, params, (RequestOptions) null); + } + /** Verify a specified bank account for a given customer. */ + public BankAccount verify(String customer, String id, RequestOptions options) + throws StripeException { + return verify(customer, id, (PaymentSourceVerifyParams) null, options); + } + /** Verify a specified bank account for a given customer. */ + public BankAccount verify(String customer, String id) throws StripeException { + return verify(customer, id, (PaymentSourceVerifyParams) null, (RequestOptions) null); + } + /** Verify a specified bank account for a given customer. */ + public BankAccount verify( + String customer, String id, PaymentSourceVerifyParams params, RequestOptions options) + throws StripeException { + String path = + String.format( + "/v1/customers/%s/sources/%s/verify", + ApiResource.urlEncodeId(customer), ApiResource.urlEncodeId(id)); + return getResponseGetter() + .request( + BaseAddress.API, + ApiResource.RequestMethod.POST, + path, + ApiRequestParams.paramsToMap(params), + BankAccount.class, + options, + ApiMode.V1); + } } diff --git a/src/main/java/com/stripe/service/PayoutService.java b/src/main/java/com/stripe/service/PayoutService.java index bd4632ac4fa..618d6c6feb0 100644 --- a/src/main/java/com/stripe/service/PayoutService.java +++ b/src/main/java/com/stripe/service/PayoutService.java @@ -26,32 +26,28 @@ public PayoutService(StripeResponseGetter responseGetter) { /** * Retrieves the details of an existing payout. Supply the unique payout ID from either a payout - * creation request or the payout list, and Stripe will return the corresponding payout - * information. + * creation request or the payout list. Stripe returns the corresponding payout information. */ public Payout retrieve(String payout, PayoutRetrieveParams params) throws StripeException { return retrieve(payout, params, (RequestOptions) null); } /** * Retrieves the details of an existing payout. Supply the unique payout ID from either a payout - * creation request or the payout list, and Stripe will return the corresponding payout - * information. + * creation request or the payout list. Stripe returns the corresponding payout information. */ public Payout retrieve(String payout, RequestOptions options) throws StripeException { return retrieve(payout, (PayoutRetrieveParams) null, options); } /** * Retrieves the details of an existing payout. Supply the unique payout ID from either a payout - * creation request or the payout list, and Stripe will return the corresponding payout - * information. + * creation request or the payout list. Stripe returns the corresponding payout information. */ public Payout retrieve(String payout) throws StripeException { return retrieve(payout, (PayoutRetrieveParams) null, (RequestOptions) null); } /** * Retrieves the details of an existing payout. Supply the unique payout ID from either a payout - * creation request or the payout list, and Stripe will return the corresponding payout - * information. + * creation request or the payout list. Stripe returns the corresponding payout information. */ public Payout retrieve(String payout, PayoutRetrieveParams params, RequestOptions options) throws StripeException { @@ -67,29 +63,29 @@ public Payout retrieve(String payout, PayoutRetrieveParams params, RequestOption ApiMode.V1); } /** - * Updates the specified payout by setting the values of the parameters passed. Any parameters not - * provided will be left unchanged. This request accepts only the metadata as arguments. + * Updates the specified payout by setting the values of the parameters you pass. We don’t change + * parameters that you don’t provide. This request only accepts the metadata as arguments. */ public Payout update(String payout, PayoutUpdateParams params) throws StripeException { return update(payout, params, (RequestOptions) null); } /** - * Updates the specified payout by setting the values of the parameters passed. Any parameters not - * provided will be left unchanged. This request accepts only the metadata as arguments. + * Updates the specified payout by setting the values of the parameters you pass. We don’t change + * parameters that you don’t provide. This request only accepts the metadata as arguments. */ public Payout update(String payout, RequestOptions options) throws StripeException { return update(payout, (PayoutUpdateParams) null, options); } /** - * Updates the specified payout by setting the values of the parameters passed. Any parameters not - * provided will be left unchanged. This request accepts only the metadata as arguments. + * Updates the specified payout by setting the values of the parameters you pass. We don’t change + * parameters that you don’t provide. This request only accepts the metadata as arguments. */ public Payout update(String payout) throws StripeException { return update(payout, (PayoutUpdateParams) null, (RequestOptions) null); } /** - * Updates the specified payout by setting the values of the parameters passed. Any parameters not - * provided will be left unchanged. This request accepts only the metadata as arguments. + * Updates the specified payout by setting the values of the parameters you pass. We don’t change + * parameters that you don’t provide. This request only accepts the metadata as arguments. */ public Payout update(String payout, PayoutUpdateParams params, RequestOptions options) throws StripeException { @@ -105,33 +101,33 @@ public Payout update(String payout, PayoutUpdateParams params, RequestOptions op ApiMode.V1); } /** - * Returns a list of existing payouts sent to third-party bank accounts or that Stripe has sent - * you. The payouts are returned in sorted order, with the most recently created payouts appearing - * first. + * Returns a list of existing payouts sent to third-party bank accounts or payouts that Stripe + * sent to you. The payouts return in sorted order, with the most recently created payouts + * appearing first. */ public StripeCollection list(PayoutListParams params) throws StripeException { return list(params, (RequestOptions) null); } /** - * Returns a list of existing payouts sent to third-party bank accounts or that Stripe has sent - * you. The payouts are returned in sorted order, with the most recently created payouts appearing - * first. + * Returns a list of existing payouts sent to third-party bank accounts or payouts that Stripe + * sent to you. The payouts return in sorted order, with the most recently created payouts + * appearing first. */ public StripeCollection list(RequestOptions options) throws StripeException { return list((PayoutListParams) null, options); } /** - * Returns a list of existing payouts sent to third-party bank accounts or that Stripe has sent - * you. The payouts are returned in sorted order, with the most recently created payouts appearing - * first. + * Returns a list of existing payouts sent to third-party bank accounts or payouts that Stripe + * sent to you. The payouts return in sorted order, with the most recently created payouts + * appearing first. */ public StripeCollection list() throws StripeException { return list((PayoutListParams) null, (RequestOptions) null); } /** - * Returns a list of existing payouts sent to third-party bank accounts or that Stripe has sent - * you. The payouts are returned in sorted order, with the most recently created payouts appearing - * first. + * Returns a list of existing payouts sent to third-party bank accounts or payouts that Stripe + * sent to you. The payouts return in sorted order, with the most recently created payouts + * appearing first. */ public StripeCollection list(PayoutListParams params, RequestOptions options) throws StripeException { @@ -147,15 +143,15 @@ public StripeCollection list(PayoutListParams params, RequestOptions opt ApiMode.V1); } /** - * To send funds to your own bank account, you create a new payout object. Your Stripe balance must be able to cover the payout - * amount, or you’ll receive an “Insufficient Funds” error. + * To send funds to your own bank account, create a new payout object. Your Stripe balance must cover the payout amount. If + * it doesn’t, you receive an “Insufficient Funds” error. * - *

If your API key is in test mode, money won’t actually be sent, though everything else will - * occur as if in live mode. + *

If your API key is in test mode, money won’t actually be sent, though every other action + * occurs as if you’re in live mode. * - *

If you are creating a manual payout on a Stripe account that uses multiple payment source - * types, you’ll need to specify the source type balance that the payout should draw from. The If you create a manual payout on a Stripe account that uses multiple payment source types, + * you need to specify the source type balance that the payout draws from. The balance object details available and * pending amounts by source type. */ @@ -163,15 +159,15 @@ public Payout create(PayoutCreateParams params) throws StripeException { return create(params, (RequestOptions) null); } /** - * To send funds to your own bank account, you create a new payout object. Your Stripe balance must be able to cover the payout - * amount, or you’ll receive an “Insufficient Funds” error. + * To send funds to your own bank account, create a new payout object. Your Stripe balance must cover the payout amount. If + * it doesn’t, you receive an “Insufficient Funds” error. * - *

If your API key is in test mode, money won’t actually be sent, though everything else will - * occur as if in live mode. + *

If your API key is in test mode, money won’t actually be sent, though every other action + * occurs as if you’re in live mode. * - *

If you are creating a manual payout on a Stripe account that uses multiple payment source - * types, you’ll need to specify the source type balance that the payout should draw from. The If you create a manual payout on a Stripe account that uses multiple payment source types, + * you need to specify the source type balance that the payout draws from. The balance object details available and * pending amounts by source type. */ @@ -188,29 +184,29 @@ public Payout create(PayoutCreateParams params, RequestOptions options) throws S ApiMode.V1); } /** - * A previously created payout can be canceled if it has not yet been paid out. Funds will be - * refunded to your available balance. You may not cancel automatic Stripe payouts. + * You can cancel a previously created payout if it hasn’t been paid out yet. Stripe refunds the + * funds to your available balance. You can’t cancel automatic Stripe payouts. */ public Payout cancel(String payout, PayoutCancelParams params) throws StripeException { return cancel(payout, params, (RequestOptions) null); } /** - * A previously created payout can be canceled if it has not yet been paid out. Funds will be - * refunded to your available balance. You may not cancel automatic Stripe payouts. + * You can cancel a previously created payout if it hasn’t been paid out yet. Stripe refunds the + * funds to your available balance. You can’t cancel automatic Stripe payouts. */ public Payout cancel(String payout, RequestOptions options) throws StripeException { return cancel(payout, (PayoutCancelParams) null, options); } /** - * A previously created payout can be canceled if it has not yet been paid out. Funds will be - * refunded to your available balance. You may not cancel automatic Stripe payouts. + * You can cancel a previously created payout if it hasn’t been paid out yet. Stripe refunds the + * funds to your available balance. You can’t cancel automatic Stripe payouts. */ public Payout cancel(String payout) throws StripeException { return cancel(payout, (PayoutCancelParams) null, (RequestOptions) null); } /** - * A previously created payout can be canceled if it has not yet been paid out. Funds will be - * refunded to your available balance. You may not cancel automatic Stripe payouts. + * You can cancel a previously created payout if it hasn’t been paid out yet. Stripe refunds the + * funds to your available balance. You can’t cancel automatic Stripe payouts. */ public Payout cancel(String payout, PayoutCancelParams params, RequestOptions options) throws StripeException { @@ -226,49 +222,49 @@ public Payout cancel(String payout, PayoutCancelParams params, RequestOptions op ApiMode.V1); } /** - * Reverses a payout by debiting the destination bank account. Only payouts for connected accounts - * to US bank accounts may be reversed at this time. If the payout is in the {@code pending} - * status, {@code /v1/payouts/:id/cancel} should be used instead. + * Reverses a payout by debiting the destination bank account. At this time, you can only reverse + * payouts for connected accounts to US bank accounts. If the payout is in the {@code pending} + * status, use {@code /v1/payouts/:id/cancel} instead. * - *

By requesting a reversal via {@code /v1/payouts/:id/reverse}, you confirm that the - * authorized signatory of the selected bank account has authorized the debit on the bank account - * and that no other authorization is required. + *

By requesting a reversal through {@code /v1/payouts/:id/reverse}, you confirm that the + * authorized signatory of the selected bank account authorizes the debit on the bank account and + * that no other authorization is required. */ public Payout reverse(String payout, PayoutReverseParams params) throws StripeException { return reverse(payout, params, (RequestOptions) null); } /** - * Reverses a payout by debiting the destination bank account. Only payouts for connected accounts - * to US bank accounts may be reversed at this time. If the payout is in the {@code pending} - * status, {@code /v1/payouts/:id/cancel} should be used instead. + * Reverses a payout by debiting the destination bank account. At this time, you can only reverse + * payouts for connected accounts to US bank accounts. If the payout is in the {@code pending} + * status, use {@code /v1/payouts/:id/cancel} instead. * - *

By requesting a reversal via {@code /v1/payouts/:id/reverse}, you confirm that the - * authorized signatory of the selected bank account has authorized the debit on the bank account - * and that no other authorization is required. + *

By requesting a reversal through {@code /v1/payouts/:id/reverse}, you confirm that the + * authorized signatory of the selected bank account authorizes the debit on the bank account and + * that no other authorization is required. */ public Payout reverse(String payout, RequestOptions options) throws StripeException { return reverse(payout, (PayoutReverseParams) null, options); } /** - * Reverses a payout by debiting the destination bank account. Only payouts for connected accounts - * to US bank accounts may be reversed at this time. If the payout is in the {@code pending} - * status, {@code /v1/payouts/:id/cancel} should be used instead. + * Reverses a payout by debiting the destination bank account. At this time, you can only reverse + * payouts for connected accounts to US bank accounts. If the payout is in the {@code pending} + * status, use {@code /v1/payouts/:id/cancel} instead. * - *

By requesting a reversal via {@code /v1/payouts/:id/reverse}, you confirm that the - * authorized signatory of the selected bank account has authorized the debit on the bank account - * and that no other authorization is required. + *

By requesting a reversal through {@code /v1/payouts/:id/reverse}, you confirm that the + * authorized signatory of the selected bank account authorizes the debit on the bank account and + * that no other authorization is required. */ public Payout reverse(String payout) throws StripeException { return reverse(payout, (PayoutReverseParams) null, (RequestOptions) null); } /** - * Reverses a payout by debiting the destination bank account. Only payouts for connected accounts - * to US bank accounts may be reversed at this time. If the payout is in the {@code pending} - * status, {@code /v1/payouts/:id/cancel} should be used instead. + * Reverses a payout by debiting the destination bank account. At this time, you can only reverse + * payouts for connected accounts to US bank accounts. If the payout is in the {@code pending} + * status, use {@code /v1/payouts/:id/cancel} instead. * - *

By requesting a reversal via {@code /v1/payouts/:id/reverse}, you confirm that the - * authorized signatory of the selected bank account has authorized the debit on the bank account - * and that no other authorization is required. + *

By requesting a reversal through {@code /v1/payouts/:id/reverse}, you confirm that the + * authorized signatory of the selected bank account authorizes the debit on the bank account and + * that no other authorization is required. */ public Payout reverse(String payout, PayoutReverseParams params, RequestOptions options) throws StripeException { diff --git a/src/main/java/com/stripe/service/RefundService.java b/src/main/java/com/stripe/service/RefundService.java index 44a3f4a2aa9..02ad1c5d28d 100644 --- a/src/main/java/com/stripe/service/RefundService.java +++ b/src/main/java/com/stripe/service/RefundService.java @@ -24,33 +24,33 @@ public RefundService(StripeResponseGetter responseGetter) { } /** - * Returns a list of all refunds you’ve previously created. The refunds are returned in sorted - * order, with the most recent refunds appearing first. For convenience, the 10 most recent - * refunds are always available by default on the charge object. + * Returns a list of all refunds you created. We return the refunds in sorted order, with the most + * recent refunds appearing first The 10 most recent refunds are always available by default on + * the Charge object. */ public StripeCollection list(RefundListParams params) throws StripeException { return list(params, (RequestOptions) null); } /** - * Returns a list of all refunds you’ve previously created. The refunds are returned in sorted - * order, with the most recent refunds appearing first. For convenience, the 10 most recent - * refunds are always available by default on the charge object. + * Returns a list of all refunds you created. We return the refunds in sorted order, with the most + * recent refunds appearing first The 10 most recent refunds are always available by default on + * the Charge object. */ public StripeCollection list(RequestOptions options) throws StripeException { return list((RefundListParams) null, options); } /** - * Returns a list of all refunds you’ve previously created. The refunds are returned in sorted - * order, with the most recent refunds appearing first. For convenience, the 10 most recent - * refunds are always available by default on the charge object. + * Returns a list of all refunds you created. We return the refunds in sorted order, with the most + * recent refunds appearing first The 10 most recent refunds are always available by default on + * the Charge object. */ public StripeCollection list() throws StripeException { return list((RefundListParams) null, (RequestOptions) null); } /** - * Returns a list of all refunds you’ve previously created. The refunds are returned in sorted - * order, with the most recent refunds appearing first. For convenience, the 10 most recent - * refunds are always available by default on the charge object. + * Returns a list of all refunds you created. We return the refunds in sorted order, with the most + * recent refunds appearing first The 10 most recent refunds are always available by default on + * the Charge object. */ public StripeCollection list(RefundListParams params, RequestOptions options) throws StripeException { @@ -65,19 +65,71 @@ public StripeCollection list(RefundListParams params, RequestOptions opt options, ApiMode.V1); } - /** Create a refund. */ + /** + * When you create a new refund, you must specify a Charge or a PaymentIntent object on which to + * create it. + * + *

Creating a new refund will refund a charge that has previously been created but not yet + * refunded. Funds will be refunded to the credit or debit card that was originally charged. + * + *

You can optionally refund only part of a charge. You can do so multiple times, until the + * entire charge has been refunded. + * + *

Once entirely refunded, a charge can’t be refunded again. This method will raise an error + * when called on an already-refunded charge, or when trying to refund more money than is left on + * a charge. + */ public Refund create(RefundCreateParams params) throws StripeException { return create(params, (RequestOptions) null); } - /** Create a refund. */ + /** + * When you create a new refund, you must specify a Charge or a PaymentIntent object on which to + * create it. + * + *

Creating a new refund will refund a charge that has previously been created but not yet + * refunded. Funds will be refunded to the credit or debit card that was originally charged. + * + *

You can optionally refund only part of a charge. You can do so multiple times, until the + * entire charge has been refunded. + * + *

Once entirely refunded, a charge can’t be refunded again. This method will raise an error + * when called on an already-refunded charge, or when trying to refund more money than is left on + * a charge. + */ public Refund create(RequestOptions options) throws StripeException { return create((RefundCreateParams) null, options); } - /** Create a refund. */ + /** + * When you create a new refund, you must specify a Charge or a PaymentIntent object on which to + * create it. + * + *

Creating a new refund will refund a charge that has previously been created but not yet + * refunded. Funds will be refunded to the credit or debit card that was originally charged. + * + *

You can optionally refund only part of a charge. You can do so multiple times, until the + * entire charge has been refunded. + * + *

Once entirely refunded, a charge can’t be refunded again. This method will raise an error + * when called on an already-refunded charge, or when trying to refund more money than is left on + * a charge. + */ public Refund create() throws StripeException { return create((RefundCreateParams) null, (RequestOptions) null); } - /** Create a refund. */ + /** + * When you create a new refund, you must specify a Charge or a PaymentIntent object on which to + * create it. + * + *

Creating a new refund will refund a charge that has previously been created but not yet + * refunded. Funds will be refunded to the credit or debit card that was originally charged. + * + *

You can optionally refund only part of a charge. You can do so multiple times, until the + * entire charge has been refunded. + * + *

Once entirely refunded, a charge can’t be refunded again. This method will raise an error + * when called on an already-refunded charge, or when trying to refund more money than is left on + * a charge. + */ public Refund create(RefundCreateParams params, RequestOptions options) throws StripeException { String path = "/v1/refunds"; return getResponseGetter() @@ -117,8 +169,8 @@ public Refund retrieve(String refund, RefundRetrieveParams params, RequestOption ApiMode.V1); } /** - * Updates the specified refund by setting the values of the parameters passed. Any parameters not - * provided will be left unchanged. + * Updates the refund that you specify by setting the values of the passed parameters. Any + * parameters that you don’t provide remain unchanged. * *

This request only accepts {@code metadata} as an argument. */ @@ -126,8 +178,8 @@ public Refund update(String refund, RefundUpdateParams params) throws StripeExce return update(refund, params, (RequestOptions) null); } /** - * Updates the specified refund by setting the values of the parameters passed. Any parameters not - * provided will be left unchanged. + * Updates the refund that you specify by setting the values of the passed parameters. Any + * parameters that you don’t provide remain unchanged. * *

This request only accepts {@code metadata} as an argument. */ @@ -135,8 +187,8 @@ public Refund update(String refund, RequestOptions options) throws StripeExcepti return update(refund, (RefundUpdateParams) null, options); } /** - * Updates the specified refund by setting the values of the parameters passed. Any parameters not - * provided will be left unchanged. + * Updates the refund that you specify by setting the values of the passed parameters. Any + * parameters that you don’t provide remain unchanged. * *

This request only accepts {@code metadata} as an argument. */ @@ -144,8 +196,8 @@ public Refund update(String refund) throws StripeException { return update(refund, (RefundUpdateParams) null, (RequestOptions) null); } /** - * Updates the specified refund by setting the values of the parameters passed. Any parameters not - * provided will be left unchanged. + * Updates the refund that you specify by setting the values of the passed parameters. Any + * parameters that you don’t provide remain unchanged. * *

This request only accepts {@code metadata} as an argument. */ @@ -165,8 +217,8 @@ public Refund update(String refund, RefundUpdateParams params, RequestOptions op /** * Cancels a refund with a status of {@code requires_action}. * - *

Refunds in other states cannot be canceled, and only refunds for payment methods that - * require customer action will enter the {@code requires_action} state. + *

You can’t cancel refunds in other states. Only refunds for payment methods that require + * customer action can enter the {@code requires_action} state. */ public Refund cancel(String refund, RefundCancelParams params) throws StripeException { return cancel(refund, params, (RequestOptions) null); @@ -174,8 +226,8 @@ public Refund cancel(String refund, RefundCancelParams params) throws StripeExce /** * Cancels a refund with a status of {@code requires_action}. * - *

Refunds in other states cannot be canceled, and only refunds for payment methods that - * require customer action will enter the {@code requires_action} state. + *

You can’t cancel refunds in other states. Only refunds for payment methods that require + * customer action can enter the {@code requires_action} state. */ public Refund cancel(String refund, RequestOptions options) throws StripeException { return cancel(refund, (RefundCancelParams) null, options); @@ -183,8 +235,8 @@ public Refund cancel(String refund, RequestOptions options) throws StripeExcepti /** * Cancels a refund with a status of {@code requires_action}. * - *

Refunds in other states cannot be canceled, and only refunds for payment methods that - * require customer action will enter the {@code requires_action} state. + *

You can’t cancel refunds in other states. Only refunds for payment methods that require + * customer action can enter the {@code requires_action} state. */ public Refund cancel(String refund) throws StripeException { return cancel(refund, (RefundCancelParams) null, (RequestOptions) null); @@ -192,8 +244,8 @@ public Refund cancel(String refund) throws StripeException { /** * Cancels a refund with a status of {@code requires_action}. * - *

Refunds in other states cannot be canceled, and only refunds for payment methods that - * require customer action will enter the {@code requires_action} state. + *

You can’t cancel refunds in other states. Only refunds for payment methods that require + * customer action can enter the {@code requires_action} state. */ public Refund cancel(String refund, RefundCancelParams params, RequestOptions options) throws StripeException { diff --git a/src/main/java/com/stripe/service/SetupAttemptService.java b/src/main/java/com/stripe/service/SetupAttemptService.java index 669017d5dfe..12c7a9a3311 100644 --- a/src/main/java/com/stripe/service/SetupAttemptService.java +++ b/src/main/java/com/stripe/service/SetupAttemptService.java @@ -19,11 +19,11 @@ public SetupAttemptService(StripeResponseGetter responseGetter) { super(responseGetter); } - /** Returns a list of SetupAttempts associated with a provided SetupIntent. */ + /** Returns a list of SetupAttempts that associate with a provided SetupIntent. */ public StripeCollection list(SetupAttemptListParams params) throws StripeException { return list(params, (RequestOptions) null); } - /** Returns a list of SetupAttempts associated with a provided SetupIntent. */ + /** Returns a list of SetupAttempts that associate with a provided SetupIntent. */ public StripeCollection list(SetupAttemptListParams params, RequestOptions options) throws StripeException { String path = "/v1/setup_attempts"; diff --git a/src/main/java/com/stripe/service/issuing/CardBundleService.java b/src/main/java/com/stripe/service/issuing/CardBundleService.java deleted file mode 100644 index 5620965b7d2..00000000000 --- a/src/main/java/com/stripe/service/issuing/CardBundleService.java +++ /dev/null @@ -1,89 +0,0 @@ -// File generated from our OpenAPI spec -package com.stripe.service.issuing; - -import com.google.gson.reflect.TypeToken; -import com.stripe.exception.StripeException; -import com.stripe.model.StripeCollection; -import com.stripe.model.issuing.CardBundle; -import com.stripe.net.ApiMode; -import com.stripe.net.ApiRequestParams; -import com.stripe.net.ApiResource; -import com.stripe.net.ApiService; -import com.stripe.net.BaseAddress; -import com.stripe.net.RequestOptions; -import com.stripe.net.StripeResponseGetter; -import com.stripe.param.issuing.CardBundleListParams; -import com.stripe.param.issuing.CardBundleRetrieveParams; - -public final class CardBundleService extends ApiService { - public CardBundleService(StripeResponseGetter responseGetter) { - super(responseGetter); - } - - /** - * Returns a list of card bundle objects. The objects are sorted in descending order by creation - * date, with the most recently created object appearing first. - */ - public StripeCollection list(CardBundleListParams params) throws StripeException { - return list(params, (RequestOptions) null); - } - /** - * Returns a list of card bundle objects. The objects are sorted in descending order by creation - * date, with the most recently created object appearing first. - */ - public StripeCollection list(RequestOptions options) throws StripeException { - return list((CardBundleListParams) null, options); - } - /** - * Returns a list of card bundle objects. The objects are sorted in descending order by creation - * date, with the most recently created object appearing first. - */ - public StripeCollection list() throws StripeException { - return list((CardBundleListParams) null, (RequestOptions) null); - } - /** - * Returns a list of card bundle objects. The objects are sorted in descending order by creation - * date, with the most recently created object appearing first. - */ - public StripeCollection list(CardBundleListParams params, RequestOptions options) - throws StripeException { - String path = "/v1/issuing/card_bundles"; - return getResponseGetter() - .request( - BaseAddress.API, - ApiResource.RequestMethod.GET, - path, - ApiRequestParams.paramsToMap(params), - new TypeToken>() {}.getType(), - options, - ApiMode.V1); - } - /** Retrieves a card bundle object. */ - public CardBundle retrieve(String cardBundle, CardBundleRetrieveParams params) - throws StripeException { - return retrieve(cardBundle, params, (RequestOptions) null); - } - /** Retrieves a card bundle object. */ - public CardBundle retrieve(String cardBundle, RequestOptions options) throws StripeException { - return retrieve(cardBundle, (CardBundleRetrieveParams) null, options); - } - /** Retrieves a card bundle object. */ - public CardBundle retrieve(String cardBundle) throws StripeException { - return retrieve(cardBundle, (CardBundleRetrieveParams) null, (RequestOptions) null); - } - /** Retrieves a card bundle object. */ - public CardBundle retrieve( - String cardBundle, CardBundleRetrieveParams params, RequestOptions options) - throws StripeException { - String path = String.format("/v1/issuing/card_bundles/%s", ApiResource.urlEncodeId(cardBundle)); - return getResponseGetter() - .request( - BaseAddress.API, - ApiResource.RequestMethod.GET, - path, - ApiRequestParams.paramsToMap(params), - CardBundle.class, - options, - ApiMode.V1); - } -} diff --git a/src/main/java/com/stripe/service/issuing/CardDesignService.java b/src/main/java/com/stripe/service/issuing/CardDesignService.java deleted file mode 100644 index dab8d670114..00000000000 --- a/src/main/java/com/stripe/service/issuing/CardDesignService.java +++ /dev/null @@ -1,136 +0,0 @@ -// File generated from our OpenAPI spec -package com.stripe.service.issuing; - -import com.google.gson.reflect.TypeToken; -import com.stripe.exception.StripeException; -import com.stripe.model.StripeCollection; -import com.stripe.model.issuing.CardDesign; -import com.stripe.net.ApiMode; -import com.stripe.net.ApiRequestParams; -import com.stripe.net.ApiResource; -import com.stripe.net.ApiService; -import com.stripe.net.BaseAddress; -import com.stripe.net.RequestOptions; -import com.stripe.net.StripeResponseGetter; -import com.stripe.param.issuing.CardDesignCreateParams; -import com.stripe.param.issuing.CardDesignListParams; -import com.stripe.param.issuing.CardDesignRetrieveParams; -import com.stripe.param.issuing.CardDesignUpdateParams; - -public final class CardDesignService extends ApiService { - public CardDesignService(StripeResponseGetter responseGetter) { - super(responseGetter); - } - - /** - * Returns a list of card design objects. The objects are sorted in descending order by creation - * date, with the most recently created object appearing first. - */ - public StripeCollection list(CardDesignListParams params) throws StripeException { - return list(params, (RequestOptions) null); - } - /** - * Returns a list of card design objects. The objects are sorted in descending order by creation - * date, with the most recently created object appearing first. - */ - public StripeCollection list(RequestOptions options) throws StripeException { - return list((CardDesignListParams) null, options); - } - /** - * Returns a list of card design objects. The objects are sorted in descending order by creation - * date, with the most recently created object appearing first. - */ - public StripeCollection list() throws StripeException { - return list((CardDesignListParams) null, (RequestOptions) null); - } - /** - * Returns a list of card design objects. The objects are sorted in descending order by creation - * date, with the most recently created object appearing first. - */ - public StripeCollection list(CardDesignListParams params, RequestOptions options) - throws StripeException { - String path = "/v1/issuing/card_designs"; - return getResponseGetter() - .request( - BaseAddress.API, - ApiResource.RequestMethod.GET, - path, - ApiRequestParams.paramsToMap(params), - new TypeToken>() {}.getType(), - options, - ApiMode.V1); - } - /** Creates a card design object. */ - public CardDesign create(CardDesignCreateParams params) throws StripeException { - return create(params, (RequestOptions) null); - } - /** Creates a card design object. */ - public CardDesign create(CardDesignCreateParams params, RequestOptions options) - throws StripeException { - String path = "/v1/issuing/card_designs"; - return getResponseGetter() - .request( - BaseAddress.API, - ApiResource.RequestMethod.POST, - path, - ApiRequestParams.paramsToMap(params), - CardDesign.class, - options, - ApiMode.V1); - } - /** Retrieves a card design object. */ - public CardDesign retrieve(String cardDesign, CardDesignRetrieveParams params) - throws StripeException { - return retrieve(cardDesign, params, (RequestOptions) null); - } - /** Retrieves a card design object. */ - public CardDesign retrieve(String cardDesign, RequestOptions options) throws StripeException { - return retrieve(cardDesign, (CardDesignRetrieveParams) null, options); - } - /** Retrieves a card design object. */ - public CardDesign retrieve(String cardDesign) throws StripeException { - return retrieve(cardDesign, (CardDesignRetrieveParams) null, (RequestOptions) null); - } - /** Retrieves a card design object. */ - public CardDesign retrieve( - String cardDesign, CardDesignRetrieveParams params, RequestOptions options) - throws StripeException { - String path = String.format("/v1/issuing/card_designs/%s", ApiResource.urlEncodeId(cardDesign)); - return getResponseGetter() - .request( - BaseAddress.API, - ApiResource.RequestMethod.GET, - path, - ApiRequestParams.paramsToMap(params), - CardDesign.class, - options, - ApiMode.V1); - } - /** Updates a card design object. */ - public CardDesign update(String cardDesign, CardDesignUpdateParams params) - throws StripeException { - return update(cardDesign, params, (RequestOptions) null); - } - /** Updates a card design object. */ - public CardDesign update(String cardDesign, RequestOptions options) throws StripeException { - return update(cardDesign, (CardDesignUpdateParams) null, options); - } - /** Updates a card design object. */ - public CardDesign update(String cardDesign) throws StripeException { - return update(cardDesign, (CardDesignUpdateParams) null, (RequestOptions) null); - } - /** Updates a card design object. */ - public CardDesign update(String cardDesign, CardDesignUpdateParams params, RequestOptions options) - throws StripeException { - String path = String.format("/v1/issuing/card_designs/%s", ApiResource.urlEncodeId(cardDesign)); - return getResponseGetter() - .request( - BaseAddress.API, - ApiResource.RequestMethod.POST, - path, - ApiRequestParams.paramsToMap(params), - CardDesign.class, - options, - ApiMode.V1); - } -} diff --git a/src/main/java/com/stripe/service/issuing/PersonalizationDesignService.java b/src/main/java/com/stripe/service/issuing/PersonalizationDesignService.java new file mode 100644 index 00000000000..6597cef6025 --- /dev/null +++ b/src/main/java/com/stripe/service/issuing/PersonalizationDesignService.java @@ -0,0 +1,156 @@ +// File generated from our OpenAPI spec +package com.stripe.service.issuing; + +import com.google.gson.reflect.TypeToken; +import com.stripe.exception.StripeException; +import com.stripe.model.StripeCollection; +import com.stripe.model.issuing.PersonalizationDesign; +import com.stripe.net.ApiMode; +import com.stripe.net.ApiRequestParams; +import com.stripe.net.ApiResource; +import com.stripe.net.ApiService; +import com.stripe.net.BaseAddress; +import com.stripe.net.RequestOptions; +import com.stripe.net.StripeResponseGetter; +import com.stripe.param.issuing.PersonalizationDesignCreateParams; +import com.stripe.param.issuing.PersonalizationDesignListParams; +import com.stripe.param.issuing.PersonalizationDesignRetrieveParams; +import com.stripe.param.issuing.PersonalizationDesignUpdateParams; + +public final class PersonalizationDesignService extends ApiService { + public PersonalizationDesignService(StripeResponseGetter responseGetter) { + super(responseGetter); + } + + /** + * Returns a list of personalization design objects. The objects are sorted in descending order by + * creation date, with the most recently created object appearing first. + */ + public StripeCollection list(PersonalizationDesignListParams params) + throws StripeException { + return list(params, (RequestOptions) null); + } + /** + * Returns a list of personalization design objects. The objects are sorted in descending order by + * creation date, with the most recently created object appearing first. + */ + public StripeCollection list(RequestOptions options) + throws StripeException { + return list((PersonalizationDesignListParams) null, options); + } + /** + * Returns a list of personalization design objects. The objects are sorted in descending order by + * creation date, with the most recently created object appearing first. + */ + public StripeCollection list() throws StripeException { + return list((PersonalizationDesignListParams) null, (RequestOptions) null); + } + /** + * Returns a list of personalization design objects. The objects are sorted in descending order by + * creation date, with the most recently created object appearing first. + */ + public StripeCollection list( + PersonalizationDesignListParams params, RequestOptions options) throws StripeException { + String path = "/v1/issuing/personalization_designs"; + return getResponseGetter() + .request( + BaseAddress.API, + ApiResource.RequestMethod.GET, + path, + ApiRequestParams.paramsToMap(params), + new TypeToken>() {}.getType(), + options, + ApiMode.V1); + } + /** Creates a personalization design object. */ + public PersonalizationDesign create(PersonalizationDesignCreateParams params) + throws StripeException { + return create(params, (RequestOptions) null); + } + /** Creates a personalization design object. */ + public PersonalizationDesign create( + PersonalizationDesignCreateParams params, RequestOptions options) throws StripeException { + String path = "/v1/issuing/personalization_designs"; + return getResponseGetter() + .request( + BaseAddress.API, + ApiResource.RequestMethod.POST, + path, + ApiRequestParams.paramsToMap(params), + PersonalizationDesign.class, + options, + ApiMode.V1); + } + /** Retrieves a personalization design object. */ + public PersonalizationDesign retrieve( + String personalizationDesign, PersonalizationDesignRetrieveParams params) + throws StripeException { + return retrieve(personalizationDesign, params, (RequestOptions) null); + } + /** Retrieves a personalization design object. */ + public PersonalizationDesign retrieve(String personalizationDesign, RequestOptions options) + throws StripeException { + return retrieve(personalizationDesign, (PersonalizationDesignRetrieveParams) null, options); + } + /** Retrieves a personalization design object. */ + public PersonalizationDesign retrieve(String personalizationDesign) throws StripeException { + return retrieve( + personalizationDesign, (PersonalizationDesignRetrieveParams) null, (RequestOptions) null); + } + /** Retrieves a personalization design object. */ + public PersonalizationDesign retrieve( + String personalizationDesign, + PersonalizationDesignRetrieveParams params, + RequestOptions options) + throws StripeException { + String path = + String.format( + "/v1/issuing/personalization_designs/%s", + ApiResource.urlEncodeId(personalizationDesign)); + return getResponseGetter() + .request( + BaseAddress.API, + ApiResource.RequestMethod.GET, + path, + ApiRequestParams.paramsToMap(params), + PersonalizationDesign.class, + options, + ApiMode.V1); + } + /** Updates a card personalization object. */ + public PersonalizationDesign update( + String personalizationDesign, PersonalizationDesignUpdateParams params) + throws StripeException { + return update(personalizationDesign, params, (RequestOptions) null); + } + /** Updates a card personalization object. */ + public PersonalizationDesign update(String personalizationDesign, RequestOptions options) + throws StripeException { + return update(personalizationDesign, (PersonalizationDesignUpdateParams) null, options); + } + /** Updates a card personalization object. */ + public PersonalizationDesign update(String personalizationDesign) throws StripeException { + return update( + personalizationDesign, (PersonalizationDesignUpdateParams) null, (RequestOptions) null); + } + /** Updates a card personalization object. */ + public PersonalizationDesign update( + String personalizationDesign, + PersonalizationDesignUpdateParams params, + RequestOptions options) + throws StripeException { + String path = + String.format( + "/v1/issuing/personalization_designs/%s", + ApiResource.urlEncodeId(personalizationDesign)); + return getResponseGetter() + .request( + BaseAddress.API, + ApiResource.RequestMethod.POST, + path, + ApiRequestParams.paramsToMap(params), + PersonalizationDesign.class, + options, + ApiMode.V1); + } +} diff --git a/src/main/java/com/stripe/service/issuing/PhysicalBundleService.java b/src/main/java/com/stripe/service/issuing/PhysicalBundleService.java new file mode 100644 index 00000000000..4a67080907a --- /dev/null +++ b/src/main/java/com/stripe/service/issuing/PhysicalBundleService.java @@ -0,0 +1,92 @@ +// File generated from our OpenAPI spec +package com.stripe.service.issuing; + +import com.google.gson.reflect.TypeToken; +import com.stripe.exception.StripeException; +import com.stripe.model.StripeCollection; +import com.stripe.model.issuing.PhysicalBundle; +import com.stripe.net.ApiMode; +import com.stripe.net.ApiRequestParams; +import com.stripe.net.ApiResource; +import com.stripe.net.ApiService; +import com.stripe.net.BaseAddress; +import com.stripe.net.RequestOptions; +import com.stripe.net.StripeResponseGetter; +import com.stripe.param.issuing.PhysicalBundleListParams; +import com.stripe.param.issuing.PhysicalBundleRetrieveParams; + +public final class PhysicalBundleService extends ApiService { + public PhysicalBundleService(StripeResponseGetter responseGetter) { + super(responseGetter); + } + + /** + * Returns a list of physical bundle objects. The objects are sorted in descending order by + * creation date, with the most recently created object appearing first. + */ + public StripeCollection list(PhysicalBundleListParams params) + throws StripeException { + return list(params, (RequestOptions) null); + } + /** + * Returns a list of physical bundle objects. The objects are sorted in descending order by + * creation date, with the most recently created object appearing first. + */ + public StripeCollection list(RequestOptions options) throws StripeException { + return list((PhysicalBundleListParams) null, options); + } + /** + * Returns a list of physical bundle objects. The objects are sorted in descending order by + * creation date, with the most recently created object appearing first. + */ + public StripeCollection list() throws StripeException { + return list((PhysicalBundleListParams) null, (RequestOptions) null); + } + /** + * Returns a list of physical bundle objects. The objects are sorted in descending order by + * creation date, with the most recently created object appearing first. + */ + public StripeCollection list( + PhysicalBundleListParams params, RequestOptions options) throws StripeException { + String path = "/v1/issuing/physical_bundles"; + return getResponseGetter() + .request( + BaseAddress.API, + ApiResource.RequestMethod.GET, + path, + ApiRequestParams.paramsToMap(params), + new TypeToken>() {}.getType(), + options, + ApiMode.V1); + } + /** Retrieves a physical bundle object. */ + public PhysicalBundle retrieve(String physicalBundle, PhysicalBundleRetrieveParams params) + throws StripeException { + return retrieve(physicalBundle, params, (RequestOptions) null); + } + /** Retrieves a physical bundle object. */ + public PhysicalBundle retrieve(String physicalBundle, RequestOptions options) + throws StripeException { + return retrieve(physicalBundle, (PhysicalBundleRetrieveParams) null, options); + } + /** Retrieves a physical bundle object. */ + public PhysicalBundle retrieve(String physicalBundle) throws StripeException { + return retrieve(physicalBundle, (PhysicalBundleRetrieveParams) null, (RequestOptions) null); + } + /** Retrieves a physical bundle object. */ + public PhysicalBundle retrieve( + String physicalBundle, PhysicalBundleRetrieveParams params, RequestOptions options) + throws StripeException { + String path = + String.format("/v1/issuing/physical_bundles/%s", ApiResource.urlEncodeId(physicalBundle)); + return getResponseGetter() + .request( + BaseAddress.API, + ApiResource.RequestMethod.GET, + path, + ApiRequestParams.paramsToMap(params), + PhysicalBundle.class, + options, + ApiMode.V1); + } +} diff --git a/src/main/java/com/stripe/service/testhelpers/IssuingService.java b/src/main/java/com/stripe/service/testhelpers/IssuingService.java index 7a44e2d93bf..6cb54ec6f92 100644 --- a/src/main/java/com/stripe/service/testhelpers/IssuingService.java +++ b/src/main/java/com/stripe/service/testhelpers/IssuingService.java @@ -14,14 +14,16 @@ public com.stripe.service.testhelpers.issuing.AuthorizationService authorization this.getResponseGetter()); } - public com.stripe.service.testhelpers.issuing.CardDesignService cardDesigns() { - return new com.stripe.service.testhelpers.issuing.CardDesignService(this.getResponseGetter()); - } - public com.stripe.service.testhelpers.issuing.CardService cards() { return new com.stripe.service.testhelpers.issuing.CardService(this.getResponseGetter()); } + public com.stripe.service.testhelpers.issuing.PersonalizationDesignService + personalizationDesigns() { + return new com.stripe.service.testhelpers.issuing.PersonalizationDesignService( + this.getResponseGetter()); + } + public com.stripe.service.testhelpers.issuing.TransactionService transactions() { return new com.stripe.service.testhelpers.issuing.TransactionService(this.getResponseGetter()); } diff --git a/src/main/java/com/stripe/service/testhelpers/issuing/CardDesignService.java b/src/main/java/com/stripe/service/testhelpers/issuing/CardDesignService.java deleted file mode 100644 index e735760e855..00000000000 --- a/src/main/java/com/stripe/service/testhelpers/issuing/CardDesignService.java +++ /dev/null @@ -1,123 +0,0 @@ -// File generated from our OpenAPI spec -package com.stripe.service.testhelpers.issuing; - -import com.stripe.exception.StripeException; -import com.stripe.model.issuing.CardDesign; -import com.stripe.net.ApiMode; -import com.stripe.net.ApiRequestParams; -import com.stripe.net.ApiResource; -import com.stripe.net.ApiService; -import com.stripe.net.BaseAddress; -import com.stripe.net.RequestOptions; -import com.stripe.net.StripeResponseGetter; -import com.stripe.param.issuing.CardDesignActivateTestmodeParams; -import com.stripe.param.issuing.CardDesignDeactivateTestmodeParams; -import com.stripe.param.issuing.CardDesignRejectTestmodeParams; - -public final class CardDesignService extends ApiService { - public CardDesignService(StripeResponseGetter responseGetter) { - super(responseGetter); - } - - /** Updates the {@code status} of the specified testmode card design object to {@code active}. */ - public CardDesign activateTestmode(String cardDesign, CardDesignActivateTestmodeParams params) - throws StripeException { - return activateTestmode(cardDesign, params, (RequestOptions) null); - } - /** Updates the {@code status} of the specified testmode card design object to {@code active}. */ - public CardDesign activateTestmode(String cardDesign, RequestOptions options) - throws StripeException { - return activateTestmode(cardDesign, (CardDesignActivateTestmodeParams) null, options); - } - /** Updates the {@code status} of the specified testmode card design object to {@code active}. */ - public CardDesign activateTestmode(String cardDesign) throws StripeException { - return activateTestmode( - cardDesign, (CardDesignActivateTestmodeParams) null, (RequestOptions) null); - } - /** Updates the {@code status} of the specified testmode card design object to {@code active}. */ - public CardDesign activateTestmode( - String cardDesign, CardDesignActivateTestmodeParams params, RequestOptions options) - throws StripeException { - String path = - String.format( - "/v1/test_helpers/issuing/card_designs/%s/status/activate", - ApiResource.urlEncodeId(cardDesign)); - return getResponseGetter() - .request( - BaseAddress.API, - ApiResource.RequestMethod.POST, - path, - ApiRequestParams.paramsToMap(params), - CardDesign.class, - options, - ApiMode.V1); - } - /** - * Updates the {@code status} of the specified testmode card design object to {@code inactive}. - */ - public CardDesign deactivateTestmode(String cardDesign, CardDesignDeactivateTestmodeParams params) - throws StripeException { - return deactivateTestmode(cardDesign, params, (RequestOptions) null); - } - /** - * Updates the {@code status} of the specified testmode card design object to {@code inactive}. - */ - public CardDesign deactivateTestmode(String cardDesign, RequestOptions options) - throws StripeException { - return deactivateTestmode(cardDesign, (CardDesignDeactivateTestmodeParams) null, options); - } - /** - * Updates the {@code status} of the specified testmode card design object to {@code inactive}. - */ - public CardDesign deactivateTestmode(String cardDesign) throws StripeException { - return deactivateTestmode( - cardDesign, (CardDesignDeactivateTestmodeParams) null, (RequestOptions) null); - } - /** - * Updates the {@code status} of the specified testmode card design object to {@code inactive}. - */ - public CardDesign deactivateTestmode( - String cardDesign, CardDesignDeactivateTestmodeParams params, RequestOptions options) - throws StripeException { - String path = - String.format( - "/v1/test_helpers/issuing/card_designs/%s/status/deactivate", - ApiResource.urlEncodeId(cardDesign)); - return getResponseGetter() - .request( - BaseAddress.API, - ApiResource.RequestMethod.POST, - path, - ApiRequestParams.paramsToMap(params), - CardDesign.class, - options, - ApiMode.V1); - } - /** - * Updates the {@code status} of the specified testmode card design object to {@code rejected}. - */ - public CardDesign rejectTestmode(String cardDesign, CardDesignRejectTestmodeParams params) - throws StripeException { - return rejectTestmode(cardDesign, params, (RequestOptions) null); - } - /** - * Updates the {@code status} of the specified testmode card design object to {@code rejected}. - */ - public CardDesign rejectTestmode( - String cardDesign, CardDesignRejectTestmodeParams params, RequestOptions options) - throws StripeException { - String path = - String.format( - "/v1/test_helpers/issuing/card_designs/%s/status/reject", - ApiResource.urlEncodeId(cardDesign)); - return getResponseGetter() - .request( - BaseAddress.API, - ApiResource.RequestMethod.POST, - path, - ApiRequestParams.paramsToMap(params), - CardDesign.class, - options, - ApiMode.V1); - } -} diff --git a/src/main/java/com/stripe/service/testhelpers/issuing/PersonalizationDesignService.java b/src/main/java/com/stripe/service/testhelpers/issuing/PersonalizationDesignService.java new file mode 100644 index 00000000000..71472a437d4 --- /dev/null +++ b/src/main/java/com/stripe/service/testhelpers/issuing/PersonalizationDesignService.java @@ -0,0 +1,150 @@ +// File generated from our OpenAPI spec +package com.stripe.service.testhelpers.issuing; + +import com.stripe.exception.StripeException; +import com.stripe.model.issuing.PersonalizationDesign; +import com.stripe.net.ApiMode; +import com.stripe.net.ApiRequestParams; +import com.stripe.net.ApiResource; +import com.stripe.net.ApiService; +import com.stripe.net.BaseAddress; +import com.stripe.net.RequestOptions; +import com.stripe.net.StripeResponseGetter; +import com.stripe.param.issuing.PersonalizationDesignActivateParams; +import com.stripe.param.issuing.PersonalizationDesignDeactivateParams; +import com.stripe.param.issuing.PersonalizationDesignRejectParams; + +public final class PersonalizationDesignService extends ApiService { + public PersonalizationDesignService(StripeResponseGetter responseGetter) { + super(responseGetter); + } + + /** + * Updates the {@code status} of the specified testmode personalization design object to {@code + * active}. + */ + public PersonalizationDesign activate( + String personalizationDesign, PersonalizationDesignActivateParams params) + throws StripeException { + return activate(personalizationDesign, params, (RequestOptions) null); + } + /** + * Updates the {@code status} of the specified testmode personalization design object to {@code + * active}. + */ + public PersonalizationDesign activate(String personalizationDesign, RequestOptions options) + throws StripeException { + return activate(personalizationDesign, (PersonalizationDesignActivateParams) null, options); + } + /** + * Updates the {@code status} of the specified testmode personalization design object to {@code + * active}. + */ + public PersonalizationDesign activate(String personalizationDesign) throws StripeException { + return activate( + personalizationDesign, (PersonalizationDesignActivateParams) null, (RequestOptions) null); + } + /** + * Updates the {@code status} of the specified testmode personalization design object to {@code + * active}. + */ + public PersonalizationDesign activate( + String personalizationDesign, + PersonalizationDesignActivateParams params, + RequestOptions options) + throws StripeException { + String path = + String.format( + "/v1/test_helpers/issuing/personalization_designs/%s/activate", + ApiResource.urlEncodeId(personalizationDesign)); + return getResponseGetter() + .request( + BaseAddress.API, + ApiResource.RequestMethod.POST, + path, + ApiRequestParams.paramsToMap(params), + PersonalizationDesign.class, + options, + ApiMode.V1); + } + /** + * Updates the {@code status} of the specified testmode personalization design object to {@code + * inactive}. + */ + public PersonalizationDesign deactivate( + String personalizationDesign, PersonalizationDesignDeactivateParams params) + throws StripeException { + return deactivate(personalizationDesign, params, (RequestOptions) null); + } + /** + * Updates the {@code status} of the specified testmode personalization design object to {@code + * inactive}. + */ + public PersonalizationDesign deactivate(String personalizationDesign, RequestOptions options) + throws StripeException { + return deactivate(personalizationDesign, (PersonalizationDesignDeactivateParams) null, options); + } + /** + * Updates the {@code status} of the specified testmode personalization design object to {@code + * inactive}. + */ + public PersonalizationDesign deactivate(String personalizationDesign) throws StripeException { + return deactivate( + personalizationDesign, (PersonalizationDesignDeactivateParams) null, (RequestOptions) null); + } + /** + * Updates the {@code status} of the specified testmode personalization design object to {@code + * inactive}. + */ + public PersonalizationDesign deactivate( + String personalizationDesign, + PersonalizationDesignDeactivateParams params, + RequestOptions options) + throws StripeException { + String path = + String.format( + "/v1/test_helpers/issuing/personalization_designs/%s/deactivate", + ApiResource.urlEncodeId(personalizationDesign)); + return getResponseGetter() + .request( + BaseAddress.API, + ApiResource.RequestMethod.POST, + path, + ApiRequestParams.paramsToMap(params), + PersonalizationDesign.class, + options, + ApiMode.V1); + } + /** + * Updates the {@code status} of the specified testmode personalization design object to {@code + * rejected}. + */ + public PersonalizationDesign reject( + String personalizationDesign, PersonalizationDesignRejectParams params) + throws StripeException { + return reject(personalizationDesign, params, (RequestOptions) null); + } + /** + * Updates the {@code status} of the specified testmode personalization design object to {@code + * rejected}. + */ + public PersonalizationDesign reject( + String personalizationDesign, + PersonalizationDesignRejectParams params, + RequestOptions options) + throws StripeException { + String path = + String.format( + "/v1/test_helpers/issuing/personalization_designs/%s/reject", + ApiResource.urlEncodeId(personalizationDesign)); + return getResponseGetter() + .request( + BaseAddress.API, + ApiResource.RequestMethod.POST, + path, + ApiRequestParams.paramsToMap(params), + PersonalizationDesign.class, + options, + ApiMode.V1); + } +} diff --git a/src/test/java/com/stripe/functional/GeneratedExamples.java b/src/test/java/com/stripe/functional/GeneratedExamples.java index 7e849ac4333..0029de2355d 100644 --- a/src/test/java/com/stripe/functional/GeneratedExamples.java +++ b/src/test/java/com/stripe/functional/GeneratedExamples.java @@ -4651,14 +4651,14 @@ public void testPaymentSourceServiceUpdate3() throws StripeException { } @Test - public void testBankAccountServiceVerify() throws StripeException { + public void testPaymentSourceServiceVerify() throws StripeException { StripeClient client = new StripeClient(networkSpy); - com.stripe.param.BankAccountVerifyParams params = - com.stripe.param.BankAccountVerifyParams.builder().addAmount(32L).addAmount(45L).build(); + com.stripe.param.PaymentSourceVerifyParams params = + com.stripe.param.PaymentSourceVerifyParams.builder().addAmount(32L).addAmount(45L).build(); com.stripe.model.BankAccount bankAccount = - client.bankAccounts().verify("cus_xxxxxxxxxxxxx", "ba_xxxxxxxxxxxxx", params); + client.customers().paymentSources().verify("cus_xxxxxxxxxxxxx", "ba_xxxxxxxxxxxxx", params); assertNotNull(bankAccount); verifyRequest( BaseAddress.API, @@ -14903,4 +14903,32 @@ public void testTransactionServiceRefund() throws StripeException { params.toMap(), null); } + + @Test + public void testSubscriptionDeleteDiscount() throws StripeException { + Subscription resource = Subscription.retrieve("sub_xyz"); + + Discount discount = resource.deleteDiscount(); + assertNotNull(discount); + verifyRequest( + BaseAddress.API, + ApiResource.RequestMethod.DELETE, + "/v1/subscriptions/sub_xyz/discount", + null, + null); + } + + @Test + public void testSubscriptionServiceDeleteDiscount() throws StripeException { + StripeClient client = new StripeClient(networkSpy); + + com.stripe.model.Discount discount = client.subscriptions().deleteDiscount("sub_xyz"); + assertNotNull(discount); + verifyRequest( + BaseAddress.API, + ApiResource.RequestMethod.DELETE, + "/v1/subscriptions/sub_xyz/discount", + null, + null); + } }