Skip to content

Add support for jcb_payments as a Capability #1016

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
Apr 24, 2020
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
9 changes: 9 additions & 0 deletions src/main/java/com/stripe/model/Account.java
Original file line number Diff line number Diff line change
Expand Up @@ -657,6 +657,15 @@ public static class Capabilities extends StripeObject {
@SerializedName("card_payments")
String cardPayments;

/**
* The status of the JCB payments capability of the account, or whether the account (Japan only)
* can directly process JCB credit card charges in JPY currency.
*
* <p>One of {@code active}, {@code inactive}, or {@code pending}.
*/
@SerializedName("jcb_payments")
String jcbPayments;

/**
* The status of the legacy payments capability of the account.
*
Expand Down
20 changes: 4 additions & 16 deletions src/main/java/com/stripe/model/Product.java
Original file line number Diff line number Diff line change
Expand Up @@ -147,36 +147,24 @@ public class Product extends ApiResource implements HasId, MetadataStore<Product
@SerializedName("url")
String url;

/**
* Creates a new product object. To create a product for use with orders, see <a
* href="https://stripe.com/docs/api#create_product">Products</a>.
*/
/** Creates a new product object. */
public static Product create(Map<String, Object> params) throws StripeException {
return create(params, (RequestOptions) null);
}

/**
* Creates a new product object. To create a product for use with orders, see <a
* href="https://stripe.com/docs/api#create_product">Products</a>.
*/
/** Creates a new product object. */
public static Product create(Map<String, Object> params, RequestOptions options)
throws StripeException {
String url = String.format("%s%s", Stripe.getApiBase(), "/v1/products");
return ApiResource.request(ApiResource.RequestMethod.POST, url, params, Product.class, options);
}

/**
* Creates a new product object. To create a product for use with orders, see <a
* href="https://stripe.com/docs/api#create_product">Products</a>.
*/
/** Creates a new product object. */
public static Product create(ProductCreateParams params) throws StripeException {
return create(params, (RequestOptions) null);
}

/**
* Creates a new product object. To create a product for use with orders, see <a
* href="https://stripe.com/docs/api#create_product">Products</a>.
*/
/** Creates a new product object. */
public static Product create(ProductCreateParams params, RequestOptions options)
throws StripeException {
String url = String.format("%s%s", Stripe.getApiBase(), "/v1/products");
Expand Down
11 changes: 8 additions & 3 deletions src/main/java/com/stripe/model/SubscriptionItem.java
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,14 @@ public class SubscriptionItem extends ApiResource
String object;

/**
* Plans define the base price, currency, and billing cycle for subscriptions. For example, you
* might have a $5/month plan that provides limited access to your products, and a $15/month plan
* that allows full access.
* Plans define the base price, currency, and billing cycle for recurring purchases of products.
* Products help you track inventory or provisioning, and plans help you track pricing. Different
* physical goods or levels of service should be represented by products, and pricing options
* should be represented by plans. This approach lets you change prices without having to change
* your provisioning scheme.
*
* <p>For example, you might have a single &quot;gold&quot; product that has plans for $10/month,
* $100/year, €9/month, and €90/year.
*
* <p>Related guides: <a
* href="https://stripe.com/docs/billing/subscriptions/set-up-subscription">Set up a
Expand Down
11 changes: 8 additions & 3 deletions src/main/java/com/stripe/model/checkout/Session.java
Original file line number Diff line number Diff line change
Expand Up @@ -343,9 +343,14 @@ public static class DisplayItem extends StripeObject {
Custom custom;

/**
* Plans define the base price, currency, and billing cycle for subscriptions. For example, you
* might have a $5/month plan that provides limited access to your products, and a $15/month
* plan that allows full access.
* Plans define the base price, currency, and billing cycle for recurring purchases of products.
* Products help you track inventory or provisioning, and plans help you track pricing.
* Different physical goods or levels of service should be represented by products, and pricing
* options should be represented by plans. This approach lets you change prices without having
* to change your provisioning scheme.
*
* <p>For example, you might have a single &quot;gold&quot; product that has plans for
* $10/month, $100/year, €9/month, and €90/year.
*
* <p>Related guides: <a
* href="https://stripe.com/docs/billing/subscriptions/set-up-subscription">Set up a
Expand Down
3 changes: 3 additions & 0 deletions src/main/java/com/stripe/param/AccountCreateParams.java
Original file line number Diff line number Diff line change
Expand Up @@ -4071,6 +4071,9 @@ public enum RequestedCapability implements ApiRequestParams.EnumParam {
@SerializedName("card_payments")
CARD_PAYMENTS("card_payments"),

@SerializedName("jcb_payments")
JCB_PAYMENTS("jcb_payments"),

@SerializedName("legacy_payments")
LEGACY_PAYMENTS("legacy_payments"),

Expand Down
3 changes: 3 additions & 0 deletions src/main/java/com/stripe/param/AccountUpdateParams.java
Original file line number Diff line number Diff line change
Expand Up @@ -4675,6 +4675,9 @@ public enum RequestedCapability implements ApiRequestParams.EnumParam {
@SerializedName("card_payments")
CARD_PAYMENTS("card_payments"),

@SerializedName("jcb_payments")
JCB_PAYMENTS("jcb_payments"),

@SerializedName("legacy_payments")
LEGACY_PAYMENTS("legacy_payments"),

Expand Down
16 changes: 8 additions & 8 deletions src/main/java/com/stripe/param/InvoiceUpcomingParams.java
Original file line number Diff line number Diff line change
Expand Up @@ -100,10 +100,10 @@ public class InvoiceUpcomingParams extends ApiRequestParams {
List<SubscriptionItem> subscriptionItems;

/**
* If previewing an update to a subscription, this decides whether the preview will show the
* result of applying prorations or not. If set, one of {@code subscription_items} or {@code
* subscription}, and one of {@code subscription_items} or {@code subscription_trial_end} are
* required.
* This field has been renamed to {@code subscription_proration_behavior}. {@code
* subscription_prorate=true} can be replaced with {@code
* subscription_proration_behavior=create_prorations} and {@code subscription_prorate=false} can
* be replaced with {@code subscription_proration_behavior=none}.
*/
@SerializedName("subscription_prorate")
Boolean subscriptionProrate;
Expand Down Expand Up @@ -531,10 +531,10 @@ public Builder addAllSubscriptionItem(List<SubscriptionItem> elements) {
}

/**
* If previewing an update to a subscription, this decides whether the preview will show the
* result of applying prorations or not. If set, one of {@code subscription_items} or {@code
* subscription}, and one of {@code subscription_items} or {@code subscription_trial_end} are
* required.
* This field has been renamed to {@code subscription_proration_behavior}. {@code
* subscription_prorate=true} can be replaced with {@code
* subscription_proration_behavior=create_prorations} and {@code subscription_prorate=false} can
* be replaced with {@code subscription_proration_behavior=none}.
*/
public Builder setSubscriptionProrate(Boolean subscriptionProrate) {
this.subscriptionProrate = subscriptionProrate;
Expand Down