Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

API Updates #1324

Merged
merged 3 commits into from Mar 11, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/main/java/com/stripe/model/Charge.java
Expand Up @@ -1463,6 +1463,10 @@ public static class Card extends StripeObject {
@SerializedName("last4")
String last4;

/** ID of the mandate used to make this payment or created by it. */
@SerializedName("mandate")
String mandate;

/** True if this payment was marked as MOTO and out of scope for SCA. */
@SerializedName("moto")
Boolean moto;
Expand Down
110 changes: 109 additions & 1 deletion src/main/java/com/stripe/model/PaymentIntent.java
Expand Up @@ -1131,6 +1131,9 @@ public static class NextAction extends StripeObject {
@SerializedName("boleto_display_details")
NextActionDisplayBoletoDetails boletoDisplayDetails;

@SerializedName("card_await_notification")
NextActionCardAwaitNotification cardAwaitNotification;

@SerializedName("konbini_display_details")
NextActionKonbiniDisplayDetails konbiniDisplayDetails;

Expand Down Expand Up @@ -1288,6 +1291,25 @@ public static class NextActionAlipayHandleRedirect extends StripeObject {
String url;
}

@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
public static class NextActionCardAwaitNotification extends StripeObject {
/**
* The time that payment will be attempted. If customer approval is required, they need to
* provide approval before this time.
*/
@SerializedName("charge_attempt_at")
Long chargeAttemptAt;

/**
* For payments greater than INR 5000, the customer must provide explicit approval of the
* payment with their bank. For payments of lower amount, no customer action is required.
*/
@SerializedName("customer_approval_required")
Boolean customerApprovalRequired;
}

@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
Expand Down Expand Up @@ -1765,6 +1787,10 @@ public static class Card extends StripeObject {
@SerializedName("installments")
Installments installments;

/** Configuration options for setting up an eMandate for cards issued in India. */
@SerializedName("mandate_options")
MandateOptions mandateOptions;

/**
* Selected network to process this payment intent on. Depends on the available networks of
* the card attached to the payment intent. Can be only set confirm-time.
Expand Down Expand Up @@ -1847,6 +1873,68 @@ public static class Plan extends StripeObject {
String type;
}
}

@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
public static class MandateOptions extends StripeObject {
/** Amount to be charged for future payments. */
@SerializedName("amount")
Long amount;

/**
* One of {@code fixed} or {@code maximum}. If {@code fixed}, the {@code amount} param
* refers to the exact amount to be charged in future payments. If {@code maximum}, the
* amount charged can be up to the value passed for the {@code amount} param.
*/
@SerializedName("amount_type")
String amountType;

/**
* A description of the mandate or subscription that is meant to be displayed to the
* customer.
*/
@SerializedName("description")
String description;

/**
* End date of the mandate or subscription. If not provided, the mandate will be active
* until canceled. If provided, end date should be after start date.
*/
@SerializedName("end_date")
Long endDate;

/**
* Specifies payment frequency. One of {@code day}, {@code week}, {@code month}, {@code
* year}, or {@code sporadic}.
*/
@SerializedName("interval")
String interval;

/**
* The number of intervals between payments. For example, {@code interval=month} and {@code
* interval_count=3} indicates one payment every three months. Maximum of one year interval
* allowed (1 year, 12 months, or 52 weeks). This parameter is optional when {@code
* interval=sporadic}.
*/
@SerializedName("interval_count")
Long intervalCount;

/** Unique identifier for the mandate or subscription. */
@SerializedName("reference")
String reference;

/**
* Start date of the mandate or subscription. Start date should not be lesser than
* yesterday.
*/
@SerializedName("start_date")
Long startDate;

/** Specifies the type of mandates supported. Possible values are {@code india}. */
@SerializedName("supported_types")
List<String> supportedTypes;
}
}

@Getter
Expand Down Expand Up @@ -2248,7 +2336,27 @@ public static class Processing extends StripeObject {
@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
public static class Card extends StripeObject {}
public static class Card extends StripeObject {
@SerializedName("customer_notification")
ProcessingCustomerNotification customerNotification;
kamil-stripe marked this conversation as resolved.
Show resolved Hide resolved
}
}

@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
public static class ProcessingCustomerNotification extends StripeObject {
kamil-stripe marked this conversation as resolved.
Show resolved Hide resolved
/**
* Whether customer approval has been requested for this payment. For payments greater than INR
* 5000 or mandate amount, the customer must provide explicit approval of the payment with their
* bank.
*/
@SerializedName("approval_requested")
Boolean approvalRequested;

/** If customer approval is required, they need to provide approval before this time. */
@SerializedName("completes_at")
Long completesAt;
}

@Getter
Expand Down
74 changes: 74 additions & 0 deletions src/main/java/com/stripe/model/SetupIntent.java
Expand Up @@ -852,6 +852,10 @@ public static class MandateOptions extends StripeObject {
@Setter
@EqualsAndHashCode(callSuper = false)
public static class Card extends StripeObject {
/** Configuration options for setting up an eMandate for cards issued in India. */
@SerializedName("mandate_options")
MandateOptions mandateOptions;

/**
* We strongly recommend that you rely on our SCA Engine to automatically prompt your
* customers for authentication based on risk level and <a
Expand All @@ -867,6 +871,76 @@ public static class Card extends StripeObject {
*/
@SerializedName("request_three_d_secure")
String requestThreeDSecure;

@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
public static class MandateOptions extends StripeObject {
/** Amount to be charged for future payments. */
@SerializedName("amount")
Long amount;

/**
* One of {@code fixed} or {@code maximum}. If {@code fixed}, the {@code amount} param
* refers to the exact amount to be charged in future payments. If {@code maximum}, the
* amount charged can be up to the value passed for the {@code amount} param.
*/
@SerializedName("amount_type")
String amountType;

/**
* Three-letter <a href="https://www.iso.org/iso-4217-currency-codes.html">ISO currency
* code</a>, in lowercase. Must be a <a href="https://stripe.com/docs/currencies">supported
* currency</a>.
*/
@SerializedName("currency")
String currency;

/**
* A description of the mandate or subscription that is meant to be displayed to the
* customer.
*/
@SerializedName("description")
String description;

/**
* End date of the mandate or subscription. If not provided, the mandate will be active
* until canceled. If provided, end date should be after start date.
*/
@SerializedName("end_date")
Long endDate;

/**
* Specifies payment frequency. One of {@code day}, {@code week}, {@code month}, {@code
* year}, or {@code sporadic}.
*/
@SerializedName("interval")
String interval;

/**
* The number of intervals between payments. For example, {@code interval=month} and {@code
* interval_count=3} indicates one payment every three months. Maximum of one year interval
* allowed (1 year, 12 months, or 52 weeks). This parameter is optional when {@code
* interval=sporadic}.
*/
@SerializedName("interval_count")
Long intervalCount;

/** Unique identifier for the mandate or subscription. */
@SerializedName("reference")
String reference;

/**
* Start date of the mandate or subscription. Start date should not be lesser than
* yesterday.
*/
@SerializedName("start_date")
Long startDate;

/** Specifies the type of mandates supported. Possible values are {@code india}. */
@SerializedName("supported_types")
List<String> supportedTypes;
}
}

@Getter
Expand Down
@@ -0,0 +1,11 @@
// File generated from our OpenAPI spec
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Gotta delete this.

package com.stripe.model;

import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;

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