Skip to content

[generated] source: spec3.sdk.yaml@spec-d635d94 in master #744

New issue

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

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

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion src/main/java/com/stripe/model/Charge.java
Original file line number Diff line number Diff line change
Expand Up @@ -1214,7 +1214,13 @@ public static class Checks extends StripeObject {
@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
public static class ThreeDSecure extends StripeObject {}
public static class ThreeDSecure extends StripeObject {
@SerializedName("succeeded")
Boolean succeeded;

@SerializedName("version")
String version;
}

@Getter
@Setter
Expand Down
28 changes: 27 additions & 1 deletion src/main/java/com/stripe/model/Invoice.java
Original file line number Diff line number Diff line change
Expand Up @@ -244,8 +244,15 @@ public class Invoice extends ApiResource implements HasId, MetadataStore<Invoice
@SerializedName("paid")
Boolean paid;

/**
* The PaymentIntent associated with this invoice. The PaymentIntent is generated when the invoice
* is finalized, and can then be used to pay the invoice. Note that voiding an invoice will cancel
* the PaymentIntent.
*/
@SerializedName("payment_intent")
PaymentIntent paymentIntent;
@Getter(lombok.AccessLevel.NONE)
@Setter(lombok.AccessLevel.NONE)
ExpandableField<PaymentIntent> paymentIntent;

/** End of the usage period during which invoice items were added to this invoice. */
@SerializedName("period_end")
Expand Down Expand Up @@ -407,6 +414,25 @@ public void setDefaultSourceObject(PaymentSource expandableObject) {
new ExpandableField<PaymentSource>(expandableObject.getId(), expandableObject);
}

/** Get id of expandable `paymentIntent` object. */
public String getPaymentIntent() {
return (this.paymentIntent != null) ? this.paymentIntent.getId() : null;
}

public void setPaymentIntent(String id) {
this.paymentIntent = ApiResource.setExpandableFieldId(id, this.paymentIntent);
}

/** Get expanded `paymentIntent`. */
public PaymentIntent getPaymentIntentObject() {
return (this.paymentIntent != null) ? this.paymentIntent.getExpanded() : null;
}

public void setPaymentIntentObject(PaymentIntent expandableObject) {
this.paymentIntent =
new ExpandableField<PaymentIntent>(expandableObject.getId(), expandableObject);
}

/** Get id of expandable `subscription` object. */
public String getSubscription() {
return (this.subscription != null) ? this.subscription.getId() : null;
Expand Down
51 changes: 25 additions & 26 deletions src/main/java/com/stripe/model/PaymentIntent.java
Original file line number Diff line number Diff line change
Expand Up @@ -197,8 +197,7 @@ public class PaymentIntent extends ApiResource implements HasId, MetadataStore<P

/**
* Status of this PaymentIntent, one of `requires_payment_method`, `requires_confirmation`,
* `requires_action`, `processing`, `requires_authorization`, `requires_capture`, `canceled`, or
* `succeeded`.
* `requires_action`, `processing`, `requires_capture`, `canceled`, or `succeeded`.
*/
@SerializedName("status")
String status;
Expand Down Expand Up @@ -508,9 +507,7 @@ public PaymentIntent update(PaymentIntentUpdateParams params, RequestOptions opt
* <code>next_action</code>. If payment fails, the PaymentIntent will transition to the <code>
* requires_payment_method</code> status. If payment succeeds, the PaymentIntent will transition
* to the <code>succeeded</code> status (or <code>requires_capture</code>, if <code>capture_method
* </code> is set to <code>manual</code>). Read the <a
* href="/docs/payments/payment-intents/server-confirmation">expanded documentation</a> to learn
* more about server-side confirmation.
* </code> is set to <code>manual</code>).
*
* <p>If the <code>confirmation_method</code> is <code>automatic</code>, payment may be attempted
* using our <a href="/docs/stripe-js/reference#stripe-handle-card-payment">client SDKs</a> and
Expand All @@ -522,7 +519,9 @@ public PaymentIntent update(PaymentIntentUpdateParams params, RequestOptions opt
* initiated using a secret key. If any actions are required for the payment, the PaymentIntent
* will return to the <code>requires_confirmation</code> state after those actions are completed.
* Your server needs to then explicitly re-confirm the PaymentIntent to initiate the next payment
* attempt.
* attempt. Read the <a
* href="/docs/payments/payment-intents/quickstart#flow-manual-confirmation">expanded
* documentation</a> to learn more about manual confirmation.
*/
public PaymentIntent confirm() throws StripeException {
return confirm((Map<String, Object>) null, (RequestOptions) null);
Expand All @@ -537,9 +536,7 @@ public PaymentIntent confirm() throws StripeException {
* <code>next_action</code>. If payment fails, the PaymentIntent will transition to the <code>
* requires_payment_method</code> status. If payment succeeds, the PaymentIntent will transition
* to the <code>succeeded</code> status (or <code>requires_capture</code>, if <code>capture_method
* </code> is set to <code>manual</code>). Read the <a
* href="/docs/payments/payment-intents/server-confirmation">expanded documentation</a> to learn
* more about server-side confirmation.
* </code> is set to <code>manual</code>).
*
* <p>If the <code>confirmation_method</code> is <code>automatic</code>, payment may be attempted
* using our <a href="/docs/stripe-js/reference#stripe-handle-card-payment">client SDKs</a> and
Expand All @@ -551,7 +548,9 @@ public PaymentIntent confirm() throws StripeException {
* initiated using a secret key. If any actions are required for the payment, the PaymentIntent
* will return to the <code>requires_confirmation</code> state after those actions are completed.
* Your server needs to then explicitly re-confirm the PaymentIntent to initiate the next payment
* attempt.
* attempt. Read the <a
* href="/docs/payments/payment-intents/quickstart#flow-manual-confirmation">expanded
* documentation</a> to learn more about manual confirmation.
*/
public PaymentIntent confirm(RequestOptions options) throws StripeException {
return confirm((Map<String, Object>) null, options);
Expand All @@ -566,9 +565,7 @@ public PaymentIntent confirm(RequestOptions options) throws StripeException {
* <code>next_action</code>. If payment fails, the PaymentIntent will transition to the <code>
* requires_payment_method</code> status. If payment succeeds, the PaymentIntent will transition
* to the <code>succeeded</code> status (or <code>requires_capture</code>, if <code>capture_method
* </code> is set to <code>manual</code>). Read the <a
* href="/docs/payments/payment-intents/server-confirmation">expanded documentation</a> to learn
* more about server-side confirmation.
* </code> is set to <code>manual</code>).
*
* <p>If the <code>confirmation_method</code> is <code>automatic</code>, payment may be attempted
* using our <a href="/docs/stripe-js/reference#stripe-handle-card-payment">client SDKs</a> and
Expand All @@ -580,7 +577,9 @@ public PaymentIntent confirm(RequestOptions options) throws StripeException {
* initiated using a secret key. If any actions are required for the payment, the PaymentIntent
* will return to the <code>requires_confirmation</code> state after those actions are completed.
* Your server needs to then explicitly re-confirm the PaymentIntent to initiate the next payment
* attempt.
* attempt. Read the <a
* href="/docs/payments/payment-intents/quickstart#flow-manual-confirmation">expanded
* documentation</a> to learn more about manual confirmation.
*/
public PaymentIntent confirm(Map<String, Object> params) throws StripeException {
return confirm(params, (RequestOptions) null);
Expand All @@ -595,9 +594,7 @@ public PaymentIntent confirm(Map<String, Object> params) throws StripeException
* <code>next_action</code>. If payment fails, the PaymentIntent will transition to the <code>
* requires_payment_method</code> status. If payment succeeds, the PaymentIntent will transition
* to the <code>succeeded</code> status (or <code>requires_capture</code>, if <code>capture_method
* </code> is set to <code>manual</code>). Read the <a
* href="/docs/payments/payment-intents/server-confirmation">expanded documentation</a> to learn
* more about server-side confirmation.
* </code> is set to <code>manual</code>).
*
* <p>If the <code>confirmation_method</code> is <code>automatic</code>, payment may be attempted
* using our <a href="/docs/stripe-js/reference#stripe-handle-card-payment">client SDKs</a> and
Expand All @@ -609,7 +606,9 @@ public PaymentIntent confirm(Map<String, Object> params) throws StripeException
* initiated using a secret key. If any actions are required for the payment, the PaymentIntent
* will return to the <code>requires_confirmation</code> state after those actions are completed.
* Your server needs to then explicitly re-confirm the PaymentIntent to initiate the next payment
* attempt.
* attempt. Read the <a
* href="/docs/payments/payment-intents/quickstart#flow-manual-confirmation">expanded
* documentation</a> to learn more about manual confirmation.
*/
public PaymentIntent confirm(Map<String, Object> params, RequestOptions options)
throws StripeException {
Expand All @@ -630,9 +629,7 @@ public PaymentIntent confirm(Map<String, Object> params, RequestOptions options)
* <code>next_action</code>. If payment fails, the PaymentIntent will transition to the <code>
* requires_payment_method</code> status. If payment succeeds, the PaymentIntent will transition
* to the <code>succeeded</code> status (or <code>requires_capture</code>, if <code>capture_method
* </code> is set to <code>manual</code>). Read the <a
* href="/docs/payments/payment-intents/server-confirmation">expanded documentation</a> to learn
* more about server-side confirmation.
* </code> is set to <code>manual</code>).
*
* <p>If the <code>confirmation_method</code> is <code>automatic</code>, payment may be attempted
* using our <a href="/docs/stripe-js/reference#stripe-handle-card-payment">client SDKs</a> and
Expand All @@ -644,7 +641,9 @@ public PaymentIntent confirm(Map<String, Object> params, RequestOptions options)
* initiated using a secret key. If any actions are required for the payment, the PaymentIntent
* will return to the <code>requires_confirmation</code> state after those actions are completed.
* Your server needs to then explicitly re-confirm the PaymentIntent to initiate the next payment
* attempt.
* attempt. Read the <a
* href="/docs/payments/payment-intents/quickstart#flow-manual-confirmation">expanded
* documentation</a> to learn more about manual confirmation.
*/
public PaymentIntent confirm(PaymentIntentConfirmParams params) throws StripeException {
return confirm(params, (RequestOptions) null);
Expand All @@ -659,9 +658,7 @@ public PaymentIntent confirm(PaymentIntentConfirmParams params) throws StripeExc
* <code>next_action</code>. If payment fails, the PaymentIntent will transition to the <code>
* requires_payment_method</code> status. If payment succeeds, the PaymentIntent will transition
* to the <code>succeeded</code> status (or <code>requires_capture</code>, if <code>capture_method
* </code> is set to <code>manual</code>). Read the <a
* href="/docs/payments/payment-intents/server-confirmation">expanded documentation</a> to learn
* more about server-side confirmation.
* </code> is set to <code>manual</code>).
*
* <p>If the <code>confirmation_method</code> is <code>automatic</code>, payment may be attempted
* using our <a href="/docs/stripe-js/reference#stripe-handle-card-payment">client SDKs</a> and
Expand All @@ -673,7 +670,9 @@ public PaymentIntent confirm(PaymentIntentConfirmParams params) throws StripeExc
* initiated using a secret key. If any actions are required for the payment, the PaymentIntent
* will return to the <code>requires_confirmation</code> state after those actions are completed.
* Your server needs to then explicitly re-confirm the PaymentIntent to initiate the next payment
* attempt.
* attempt. Read the <a
* href="/docs/payments/payment-intents/quickstart#flow-manual-confirmation">expanded
* documentation</a> to learn more about manual confirmation.
*/
public PaymentIntent confirm(PaymentIntentConfirmParams params, RequestOptions options)
throws StripeException {
Expand Down
6 changes: 3 additions & 3 deletions src/main/java/com/stripe/model/Refund.java
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,9 @@ public class Refund extends ApiResource implements BalanceTransactionSource, Met
ExpandableField<TransferReversal> sourceTransferReversal;

/**
* Status of the refund. For credit card refunds, this can be `succeeded` or `failed`. For other
* types of refunds, it can be `pending`, `succeeded`, `failed`, or `canceled`. Refer to our
* [refunds](https://stripe.com/docs/refunds#failed-refunds) documentation for more details.
* Status of the refund. For credit card refunds, this can be `pending`, `succeeded`, or `failed`.
* For other types of refunds, it can be `pending`, `succeeded`, `failed`, or `canceled`. Refer to
* our [refunds](https://stripe.com/docs/refunds#failed-refunds) documentation for more details.
*/
@SerializedName("status")
String status;
Expand Down
28 changes: 28 additions & 0 deletions src/main/java/com/stripe/model/issuing/Card.java
Original file line number Diff line number Diff line change
Expand Up @@ -337,6 +337,10 @@ public static class AuthorizationControls extends StripeObject {
*/
@SerializedName("max_approvals")
Long maxApprovals;

/** Limit the spending with rules based on time intervals and categories. */
@SerializedName("spending_limits")
List<SpendingLimit> spendingLimits;
}

@Getter
Expand Down Expand Up @@ -390,4 +394,28 @@ public static class Shipping extends StripeObject {
@SerializedName("type")
String type;
}

@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
public static class SpendingLimit extends StripeObject {
/** Maximum amount allowed to spend per time interval. */
@SerializedName("amount")
Long amount;

/**
* Array of strings containing
* [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category)
* on which to apply the spending limit. Leave this blank to limit all charges.
*/
@SerializedName("categories")
List<String> categories;

/**
* The time interval with which to apply this spending limit towards. Allowed values are
* `per_authorization`, `daily`, `weekly`, `monthly`, `yearly`, or `all_time`.
*/
@SerializedName("interval")
String interval;
}
}
28 changes: 28 additions & 0 deletions src/main/java/com/stripe/model/issuing/Cardholder.java
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,10 @@ public static class AuthorizationControls extends StripeObject {
*/
@SerializedName("blocked_categories")
List<String> blockedCategories;

/** Limit the spending with rules based on time intervals and categories. */
@SerializedName("spending_limits")
List<SpendingLimit> spendingLimits;
}

@Getter
Expand All @@ -255,4 +259,28 @@ public static class Billing extends StripeObject {
@SerializedName("name")
String name;
}

@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
public static class SpendingLimit extends StripeObject {
/** Maximum amount allowed to spend per time interval. */
@SerializedName("amount")
Long amount;

/**
* Array of strings containing
* [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category)
* on which to apply the spending limit. Leave this blank to limit all charges.
*/
@SerializedName("categories")
List<String> categories;

/**
* The time interval with which to apply this spending limit towards. Allowed values are
* `per_authorization`, `daily`, `weekly`, `monthly`, `yearly`, or `all_time`.
*/
@SerializedName("interval")
String interval;
}
}
16 changes: 8 additions & 8 deletions src/main/java/com/stripe/param/PaymentIntentCreateParams.java
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,7 @@ public class PaymentIntentCreateParams extends ApiRequestParams {
/**
* Set to `true` to attempt to confirm this PaymentIntent immediately. This parameter defaults to
* `false`. If the payment method attached is a card, a return_url may be provided in case
* additional authentication is required. Read the [expanded
* documentation](https://stripe.com/docs/payments/payment-intents/server-confirmation) to learn
* more about server-side confirmation.
* additional authentication is required.
*/
@SerializedName("confirm")
Boolean confirm;
Expand All @@ -53,7 +51,9 @@ public class PaymentIntentCreateParams extends ApiRequestParams {
* <p>When the confirmation method is `manual`, all payment attempts must be made using a secret
* key. The PaymentIntent will return to the `requires_confirmation` state after handling
* `next_action`s, and requires your server to initiate each payment attempt with an explicit
* confirmation.
* confirmation. Read the [expanded
* documentation](https://stripe.com/docs/payments/payment-intents/quickstart#flow-manual-confirmation)
* to learn more about manual confirmation.
*/
@SerializedName("confirmation_method")
ConfirmationMethod confirmationMethod;
Expand Down Expand Up @@ -304,9 +304,7 @@ public Builder setCaptureMethod(CaptureMethod captureMethod) {
/**
* Set to `true` to attempt to confirm this PaymentIntent immediately. This parameter defaults
* to `false`. If the payment method attached is a card, a return_url may be provided in case
* additional authentication is required. Read the [expanded
* documentation](https://stripe.com/docs/payments/payment-intents/server-confirmation) to learn
* more about server-side confirmation.
* additional authentication is required.
*/
public Builder setConfirm(Boolean confirm) {
this.confirm = confirm;
Expand All @@ -323,7 +321,9 @@ public Builder setConfirm(Boolean confirm) {
* <p>When the confirmation method is `manual`, all payment attempts must be made using a secret
* key. The PaymentIntent will return to the `requires_confirmation` state after handling
* `next_action`s, and requires your server to initiate each payment attempt with an explicit
* confirmation.
* confirmation. Read the [expanded
* documentation](https://stripe.com/docs/payments/payment-intents/quickstart#flow-manual-confirmation)
* to learn more about manual confirmation.
*/
public Builder setConfirmationMethod(ConfirmationMethod confirmationMethod) {
this.confirmationMethod = confirmationMethod;
Expand Down
Loading