Skip to content

Codegen for openapi a63c117 #866

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 1 commit into from
Oct 23, 2019
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
16 changes: 8 additions & 8 deletions src/main/java/com/stripe/model/AccountLink.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,16 +32,16 @@ public class AccountLink extends ApiResource {
String url;

/**
* Creates an AccountLink object that returns a Stripe URL that the user can redirect their user
* to in order to take them through the Connect Onboarding flow.
* Creates an AccountLink object that returns a single-use Stripe URL that the user can redirect
* their user to in order to take them through the Connect Onboarding flow.
*/
public static AccountLink create(Map<String, Object> params) throws StripeException {
return create(params, (RequestOptions) null);
}

/**
* Creates an AccountLink object that returns a Stripe URL that the user can redirect their user
* to in order to take them through the Connect Onboarding flow.
* Creates an AccountLink object that returns a single-use Stripe URL that the user can redirect
* their user to in order to take them through the Connect Onboarding flow.
*/
public static AccountLink create(Map<String, Object> params, RequestOptions options)
throws StripeException {
Expand All @@ -51,16 +51,16 @@ public static AccountLink create(Map<String, Object> params, RequestOptions opti
}

/**
* Creates an AccountLink object that returns a Stripe URL that the user can redirect their user
* to in order to take them through the Connect Onboarding flow.
* Creates an AccountLink object that returns a single-use Stripe URL that the user can redirect
* their user to in order to take them through the Connect Onboarding flow.
*/
public static AccountLink create(AccountLinkCreateParams params) throws StripeException {
return create(params, (RequestOptions) null);
}

/**
* Creates an AccountLink object that returns a Stripe URL that the user can redirect their user
* to in order to take them through the Connect Onboarding flow.
* Creates an AccountLink object that returns a single-use Stripe URL that the user can redirect
* their user to in order to take them through the Connect Onboarding flow.
*/
public static AccountLink create(AccountLinkCreateParams params, RequestOptions options)
throws StripeException {
Expand Down
18 changes: 18 additions & 0 deletions src/main/java/com/stripe/model/Charge.java
Original file line number Diff line number Diff line change
Expand Up @@ -1235,6 +1235,15 @@ public static class Card extends StripeObject {
@SerializedName("iin")
String iin;

/**
* Installment details for this payment (Mexico only).
*
* <p>For more information, see the [installments integration
* guide](https://stripe.com/docs/payments/installments).
*/
@SerializedName("installments")
Installments installments;

/**
* Issuer bank name of the card. (Only for internal use only and not typically available in
* standard API requests.)
Expand Down Expand Up @@ -1284,6 +1293,15 @@ public static class Checks extends StripeObject {
String cvcCheck;
}

@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
public static class Installments extends StripeObject {
/** Installment plan selected for the payment. */
@SerializedName("plan")
PaymentIntent.PaymentMethodOptions.Card.Installments.Plan plan;
}

@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/com/stripe/model/Invoice.java
Original file line number Diff line number Diff line change
Expand Up @@ -1245,8 +1245,8 @@ public static class CustomField extends StripeObject {
@EqualsAndHashCode(callSuper = false)
public static class CustomerTaxId extends StripeObject {
/**
* The type of the tax ID, one of `au_abn`, `ch_vat`, `eu_vat`, `in_gst`, `no_vat`, `nz_gst`,
* `unknown`, or `za_vat`.
* The type of the tax ID, one of `au_abn`, `ch_vat`, `eu_vat`, `in_gst`, `mx_rfc`, `no_vat`,
* `nz_gst`, `unknown`, or `za_vat`.
*/
@SerializedName("type")
String type;
Expand Down
49 changes: 49 additions & 0 deletions src/main/java/com/stripe/model/PaymentIntent.java
Original file line number Diff line number Diff line change
Expand Up @@ -1085,6 +1085,15 @@ public static class PaymentMethodOptions extends StripeObject {
@Setter
@EqualsAndHashCode(callSuper = false)
public static class Card extends StripeObject {
/**
* Installment details for this payment (Mexico only).
*
* <p>For more information, see the [installments integration
* guide](https://stripe.com/docs/payments/installments).
*/
@SerializedName("installments")
Installments installments;

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

@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
public static class Installments extends StripeObject {
/** Installment plans that may be selected for this PaymentIntent. */
@SerializedName("available_plans")
List<PaymentIntent.PaymentMethodOptions.Card.Installments.Plan> availablePlans;

/** Whether Installments are enabled for this PaymentIntent. */
@SerializedName("enabled")
Boolean enabled;

/** Installment plan selected for this PaymentIntent. */
@SerializedName("plan")
Plan plan;

@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
public static class Plan extends StripeObject {
/**
* For `fixed_count` installment plans, this is the number of installment payments your
* customer will make to their credit card.
*/
@SerializedName("count")
Long count;

/**
* For `fixed_count` installment plans, this is the interval between installment payments
* your customer will make to their credit card. One of `month`.
*/
@SerializedName("interval")
String interval;

/** Type of installment plan, one of `fixed_count`. */
@SerializedName("type")
String type;
}
}
}
}

Expand Down
32 changes: 32 additions & 0 deletions src/main/java/com/stripe/model/Subscription.java
Original file line number Diff line number Diff line change
Expand Up @@ -170,10 +170,25 @@ public class Subscription extends ApiResource implements HasId, MetadataStore<Su
@SerializedName("metadata")
Map<String, String> metadata;

/**
* Specifies the approximate timestamp on which any pending invoice items will be billed according
* to the schedule provided at `pending_invoice_item_interval`.
*/
@SerializedName("next_pending_invoice_item_invoice")
Long nextPendingInvoiceItemInvoice;

/** String representing the object's type. Objects of the same type share the same value. */
@SerializedName("object")
String object;

/**
* Specifies an interval for how often to bill for any pending invoice items. It is analogous to
* calling [Create an invoice](https://stripe.com/docs/api#create_invoice) for the given
* subscription at the specified interval.
*/
@SerializedName("pending_invoice_item_interval")
PendingInvoiceItemInterval pendingInvoiceItemInterval;

/**
* You can use this [SetupIntent](https://stripe.com/docs/api/setup_intents) to collect user
* authentication when creating a subscription without immediate payment or updating a
Expand Down Expand Up @@ -684,4 +699,21 @@ public static class BillingThresholds extends StripeObject {
@SerializedName("reset_billing_cycle_anchor")
Boolean resetBillingCycleAnchor;
}

@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
public static class PendingInvoiceItemInterval extends StripeObject {
/** Specifies invoicing frequency. Either `day`, `week`, `month` or `year`. */
@SerializedName("interval")
String interval;

/**
* The number of intervals between invoices. For example, `interval=month` and
* `interval_count=3` bills every 3 months. Maximum of one year interval allowed (1 year, 12
* months, or 52 weeks).
*/
@SerializedName("interval_count")
Long intervalCount;
}
}
4 changes: 2 additions & 2 deletions src/main/java/com/stripe/model/TaxId.java
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ public class TaxId extends ApiResource implements HasId {
String object;

/**
* Type of the tax ID, one of `au_abn`, `ch_vat`, `eu_vat`, `in_gst`, `no_vat`, `nz_gst`,
* `unknown`, or `za_vat`.
* Type of the tax ID, one of `au_abn`, `ch_vat`, `eu_vat`, `in_gst`, `mx_rfc`, `no_vat`,
* `nz_gst`, `za_vat`, or `unknown`.
*/
@SerializedName("type")
String type;
Expand Down
3 changes: 2 additions & 1 deletion src/main/java/com/stripe/model/WebhookEndpoint.java
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ public class WebhookEndpoint extends ApiResource implements HasId {
Boolean deleted;

/**
* The list of events to enable for this endpoint. You may specify `['*']` to enable all events.
* The list of events to enable for this endpoint. `['*']` indicates that all events are enabled,
* except those that require explicit selection.
*/
@SerializedName("enabled_events")
List<String> enabledEvents;
Expand Down
10 changes: 8 additions & 2 deletions src/main/java/com/stripe/param/AccountLinkCreateParams.java
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,10 @@ public class AccountLinkCreateParams extends ApiRequestParams {
@SerializedName("failure_url")
String failureUrl;

/** The URL that the user will be redirected to upon completing the linked flow successfully. */
/**
* The URL that the user will be redirected to upon leaving or completing the linked flow
* successfully.
*/
@SerializedName("success_url")
String successUrl;

Expand Down Expand Up @@ -170,7 +173,10 @@ public Builder setFailureUrl(String failureUrl) {
return this;
}

/** The URL that the user will be redirected to upon completing the linked flow successfully. */
/**
* The URL that the user will be redirected to upon leaving or completing the linked flow
* successfully.
*/
public Builder setSuccessUrl(String successUrl) {
this.successUrl = successUrl;
return this;
Expand Down
11 changes: 7 additions & 4 deletions src/main/java/com/stripe/param/CustomerCreateParams.java
Original file line number Diff line number Diff line change
Expand Up @@ -1062,8 +1062,8 @@ public static class TaxIdData {
Map<String, Object> extraParams;

/**
* Type of the tax ID, one of `au_abn`, `ch_vat`, `eu_vat`, `in_gst`, `no_vat`, `nz_gst`, or
* `za_vat`.
* Type of the tax ID, one of `au_abn`, `ch_vat`, `eu_vat`, `in_gst`, `mx_rfc`, `no_vat`,
* `nz_gst`, or `za_vat`.
*/
@SerializedName("type")
Type type;
Expand Down Expand Up @@ -1121,8 +1121,8 @@ public Builder putAllExtraParam(Map<String, Object> map) {
}

/**
* Type of the tax ID, one of `au_abn`, `ch_vat`, `eu_vat`, `in_gst`, `no_vat`, `nz_gst`, or
* `za_vat`.
* Type of the tax ID, one of `au_abn`, `ch_vat`, `eu_vat`, `in_gst`, `mx_rfc`, `no_vat`,
* `nz_gst`, or `za_vat`.
*/
public Builder setType(Type type) {
this.type = type;
Expand All @@ -1149,6 +1149,9 @@ public enum Type implements ApiRequestParams.EnumParam {
@SerializedName("in_gst")
IN_GST("in_gst"),

@SerializedName("mx_rfc")
MX_RFC("mx_rfc"),

@SerializedName("no_vat")
NO_VAT("no_vat"),

Expand Down
Loading