Package com.stripe.param
Class InvoiceUpcomingParams
- java.lang.Object
-
- com.stripe.net.ApiRequestParams
-
- com.stripe.param.InvoiceUpcomingParams
-
public class InvoiceUpcomingParams extends ApiRequestParams
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
InvoiceUpcomingParams.AutomaticTax
static class
InvoiceUpcomingParams.Builder
static class
InvoiceUpcomingParams.CustomerDetails
Add all map key/value pairs to `extraParams` map.static class
InvoiceUpcomingParams.Discount
static class
InvoiceUpcomingParams.InvoiceItem
Add all map key/value pairs to `extraParams` map.static class
InvoiceUpcomingParams.SubscriptionBillingCycleAnchor
The number of intervals between subscription billings.static class
InvoiceUpcomingParams.SubscriptionItem
Same asunit_amount
, but accepts a decimal value in %s with at most 12 decimal places.static class
InvoiceUpcomingParams.SubscriptionProrationBehavior
static class
InvoiceUpcomingParams.SubscriptionTrialEnd
-
Nested classes/interfaces inherited from class com.stripe.net.ApiRequestParams
ApiRequestParams.EnumParam
-
-
Field Summary
-
Fields inherited from class com.stripe.net.ApiRequestParams
EXTRA_PARAMS_KEY
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static InvoiceUpcomingParams.Builder
builder()
InvoiceUpcomingParams.AutomaticTax
getAutomaticTax()
Settings for automatic tax lookup for this invoice preview.java.lang.String
getCoupon()
The code of the coupon to apply.java.lang.String
getCustomer()
The identifier of the customer whose upcoming invoice you'd like to retrieve.InvoiceUpcomingParams.CustomerDetails
getCustomerDetails()
Details about the customer you want to invoice or overrides for an existing customer.java.lang.Object
getDiscounts()
The coupons to redeem into discounts for the invoice preview.java.util.List<java.lang.String>
getExpand()
Specifies which fields in the response should be expanded.java.util.Map<java.lang.String,java.lang.Object>
getExtraParams()
Map of extra parameters for custom features not available in this client library.java.util.List<InvoiceUpcomingParams.InvoiceItem>
getInvoiceItems()
List of invoice items to add or update in the upcoming invoice preview.java.lang.String
getSchedule()
The identifier of the unstarted schedule whose upcoming invoice you'd like to retrieve.java.lang.String
getSubscription()
The identifier of the subscription for which you'd like to retrieve the upcoming invoice.java.lang.Object
getSubscriptionBillingCycleAnchor()
For new subscriptions, a future timestamp to anchor the subscription's billing cycle.java.lang.Object
getSubscriptionCancelAt()
Timestamp indicating when the subscription should be scheduled to cancel.java.lang.Boolean
getSubscriptionCancelAtPeriodEnd()
Boolean indicating whether this subscription should cancel at the end of the current period.java.lang.Boolean
getSubscriptionCancelNow()
This simulates the subscription being canceled or expired immediately.java.lang.Object
getSubscriptionDefaultTaxRates()
If provided, the invoice returned will preview updating or creating a subscription with these default tax rates.java.util.List<InvoiceUpcomingParams.SubscriptionItem>
getSubscriptionItems()
A list of up to 20 subscription items, each with an attached price.InvoiceUpcomingParams.SubscriptionProrationBehavior
getSubscriptionProrationBehavior()
Determines how to handle prorations when the billing cycle changes (e.g., when switching plans, resettingbilling_cycle_anchor=now
, or starting a trial), or if an item'squantity
changes.java.lang.Long
getSubscriptionProrationDate()
If previewing an update to a subscription, and doing proration,subscription_proration_date
forces the proration to be calculated as though the update was done at the specified time.java.lang.Long
getSubscriptionStartDate()
Date a subscription is intended to start (can be future or past).java.lang.Object
getSubscriptionTrialEnd()
If provided, the invoice returned will preview updating or creating a subscription with that trial end.java.lang.Boolean
getSubscriptionTrialFromPlan()
Indicates if a plan'strial_period_days
should be applied to the subscription.-
Methods inherited from class com.stripe.net.ApiRequestParams
toMap
-
-
-
-
Method Detail
-
builder
public static InvoiceUpcomingParams.Builder builder()
-
getAutomaticTax
public InvoiceUpcomingParams.AutomaticTax getAutomaticTax()
Settings for automatic tax lookup for this invoice preview.
-
getCoupon
public java.lang.String getCoupon()
The code of the coupon to apply. Ifsubscription
orsubscription_items
is provided, the invoice returned will preview updating or creating a subscription with that coupon. Otherwise, it will preview applying that coupon to the customer for the next upcoming invoice from among the customer's subscriptions. The invoice can be previewed without a coupon by passing this value as an empty string.
-
getCustomer
public java.lang.String getCustomer()
The identifier of the customer whose upcoming invoice you'd like to retrieve.
-
getCustomerDetails
public InvoiceUpcomingParams.CustomerDetails getCustomerDetails()
Details about the customer you want to invoice or overrides for an existing customer.
-
getDiscounts
public java.lang.Object getDiscounts()
The coupons to redeem into discounts for the invoice preview. If not specified, inherits the discount from the customer or subscription. Pass an empty string to avoid inheriting any discounts. To preview the upcoming invoice for a subscription that hasn't been created, usecoupon
instead.
-
getExpand
public java.util.List<java.lang.String> getExpand()
Specifies which fields in the response should be expanded.
-
getExtraParams
public java.util.Map<java.lang.String,java.lang.Object> getExtraParams()
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@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.
-
getInvoiceItems
public java.util.List<InvoiceUpcomingParams.InvoiceItem> getInvoiceItems()
List of invoice items to add or update in the upcoming invoice preview.
-
getSchedule
public java.lang.String getSchedule()
The identifier of the unstarted schedule whose upcoming invoice you'd like to retrieve. Cannot be used with subscription or subscription fields.
-
getSubscription
public java.lang.String getSubscription()
The identifier of the subscription for which you'd like to retrieve the upcoming invoice. If not provided, but asubscription_items
is provided, you will preview creating a subscription with those items. If neithersubscription
norsubscription_items
is provided, you will retrieve the next upcoming invoice from among the customer's subscriptions.
-
getSubscriptionBillingCycleAnchor
public java.lang.Object getSubscriptionBillingCycleAnchor()
For new subscriptions, a future timestamp to anchor the subscription's billing cycle. This is used to determine the date of the first full invoice, and, for plans withmonth
oryear
intervals, the day of the month for subsequent invoices. For existing subscriptions, the value can only be set tonow
orunchanged
.
-
getSubscriptionCancelAt
public java.lang.Object getSubscriptionCancelAt()
Timestamp indicating when the subscription should be scheduled to cancel. Will prorate if within the current period and prorations have been enabled usingproration_behavior
.
-
getSubscriptionCancelAtPeriodEnd
public java.lang.Boolean getSubscriptionCancelAtPeriodEnd()
Boolean indicating whether this subscription should cancel at the end of the current period.
-
getSubscriptionCancelNow
public java.lang.Boolean getSubscriptionCancelNow()
This simulates the subscription being canceled or expired immediately.
-
getSubscriptionDefaultTaxRates
public java.lang.Object getSubscriptionDefaultTaxRates()
If provided, the invoice returned will preview updating or creating a subscription with these default tax rates. The default tax rates will apply to any line item that does not havetax_rates
set.
-
getSubscriptionItems
public java.util.List<InvoiceUpcomingParams.SubscriptionItem> getSubscriptionItems()
A list of up to 20 subscription items, each with an attached price.
-
getSubscriptionProrationBehavior
public InvoiceUpcomingParams.SubscriptionProrationBehavior getSubscriptionProrationBehavior()
Determines how to handle prorations when the billing cycle changes (e.g., when switching plans, resettingbilling_cycle_anchor=now
, or starting a trial), or if an item'squantity
changes. Valid values arecreate_prorations
,none
, oralways_invoice
.Passing
create_prorations
will cause proration invoice items to be created when applicable. These proration items will only be invoiced immediately under certain conditions. In order to always invoice immediately for prorations, passalways_invoice
.Prorations can be disabled by passing
none
.
-
getSubscriptionProrationDate
public java.lang.Long getSubscriptionProrationDate()
If previewing an update to a subscription, and doing proration,subscription_proration_date
forces the proration to be calculated as though the update was done at the specified time. The time given must be within the current subscription period, and cannot be before the subscription was on its current plan. If set,subscription
, and one ofsubscription_items
, orsubscription_trial_end
are required. Also,subscription_proration_behavior
cannot be set to 'none'.
-
getSubscriptionStartDate
public java.lang.Long getSubscriptionStartDate()
Date a subscription is intended to start (can be future or past).
-
getSubscriptionTrialEnd
public java.lang.Object getSubscriptionTrialEnd()
If provided, the invoice returned will preview updating or creating a subscription with that trial end. If set, one ofsubscription_items
orsubscription
is required.
-
getSubscriptionTrialFromPlan
public java.lang.Boolean getSubscriptionTrialFromPlan()
Indicates if a plan'strial_period_days
should be applied to the subscription. Settingsubscription_trial_end
per subscription is preferred, and this defaults tofalse
. Setting this flag totrue
together withsubscription_trial_end
is not allowed. See Using trial periods on subscriptions to learn more.
-
-