class

Stripe::SubscriptionDetailsParams

Inherits OpenApi::Json < OpenApi::Validatable < JSON::Serializable::Unmapped < JSON::Serializable < Reference < Object

Constants

ERROR_MESSAGE_FOR_PRORATION_BEHAVIOR = "invalid value for \"proration_behavior\", must be one of [always_invoice, create_prorations, none]."
ERROR_MESSAGE_FOR_RESUME_AT = "invalid value for \"resume_at\", must be one of [now]."
MAX_LENGTH_FOR_RESUME_AT = 5000
VALID_VALUES_FOR_PRORATION_BEHAVIOR = String.static_array("always_invoice", "create_prorations", "none")
VALID_VALUES_FOR_RESUME_AT = String.static_array("now")

Constructors

new(*, __pull_for_json_serializable pull : JSON::PullParser)
Source
new(*, billing_cycle_anchor : Stripe::SubscriptionDetailsParamsBillingCycleAnchor | Nil = nil, cancel_at : Stripe::PostSubscriptionsSubscriptionExposedIdRequestCancelAt | Nil = nil, cancel_at_period_end : Bool | Nil = nil, cancel_now : Bool | Nil = nil, default_tax_rates : Stripe::SubscriptionDetailsParamsDefaultTaxRates | Nil = nil, items : Array(Stripe::SubscriptionItemUpdateParams) | Nil = nil, proration_behavior : String | Nil = nil, proration_date : Int64 | Nil = nil, resume_at : String | Nil = nil, start_date : Int64 | Nil = nil, trial_end : Stripe::SubscriptionDetailsParamsTrialEnd | Nil = nil)

Initializes the object @param [Hash] attributes Model attributes in the form of hash

Source

Instance methods

==(other : self)

Generates #hash and #== methods from all fields #== @return [Bool] #hash calculates hash code according to all attributes. #hash @return [UInt64] Hash code

billing_cycle_anchor
Source
billing_cycle_anchor=(new_value : Stripe::SubscriptionDetailsParamsBillingCycleAnchor | Nil)

Custom attribute writer method checking allowed values (enum). @param [Object] billing_cycle_anchor Object to be assigned

Source
cancel_at
Source

Custom attribute writer method checking allowed values (enum). @param [Object] cancel_at Object to be assigned

Source
cancel_at_period_end

Indicate whether this subscription should cancel at the end of the current period (current_period_end). Defaults to false.

Source
cancel_at_period_end=(new_value : Bool | Nil)

Custom attribute writer method checking allowed values (enum). @param [Object] cancel_at_period_end Object to be assigned

Source
cancel_now

This simulates the subscription being canceled or expired immediately.

Source
cancel_now=(new_value : Bool | Nil)

Custom attribute writer method checking allowed values (enum). @param [Object] cancel_now Object to be assigned

Source
default_tax_rates
Source
default_tax_rates=(new_value : Stripe::SubscriptionDetailsParamsDefaultTaxRates | Nil)

Custom attribute writer method checking allowed values (enum). @param [Object] default_tax_rates Object to be assigned

Source
hash(hasher)

Generates #hash and #== methods from all fields #== @return [Bool] #hash calculates hash code according to all attributes. #hash @return [UInt64] Hash code

items

A list of up to 20 subscription items, each with an attached price.

Source
items=(new_value : Array(Stripe::SubscriptionItemUpdateParams) | Nil)

Custom attribute writer method checking allowed values (enum). @param [Object] items Object to be assigned

Source
list_invalid_properties

Show invalid properties with the reasons. Usually used together with valid? @return Array for valid properties with the reasons

Source
proration_behavior

Determines how to handle prorations when the billing cycle changes (e.g., when switching plans, resetting billing_cycle_anchor=now, or starting a trial), or if an item's quantity changes. The default value is create_prorations.

Source
proration_behavior=(new_value : String | Nil)

Custom attribute writer method checking allowed values (enum). @param [Object] proration_behavior Object to be assigned

Source
proration_date

If previewing an update to a subscription, and doing proration, subscription_details.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 within the current phase of the schedule backing this subscription, if the schedule exists. If set, subscription, and one of subscription_details.items, or subscription_details.trial_end are required. Also, subscription_details.proration_behavior cannot be set to 'none'.

Source
proration_date=(new_value : Int64 | Nil)

Custom attribute writer method checking allowed values (enum). @param [Object] proration_date Object to be assigned

Source
resume_at

For paused subscriptions, setting subscription_details.resume_at to now will preview the invoice that will be generated if the subscription is resumed.

Source
resume_at=(new_value : String | Nil)

Custom attribute writer method checking allowed values (enum). @param [Object] resume_at Object to be assigned

Source
start_date

Date a subscription is intended to start (can be future or past).

Source
start_date=(new_value : Int64 | Nil)

Custom attribute writer method checking allowed values (enum). @param [Object] start_date Object to be assigned

Source
trial_end
Source
trial_end=(new_value : Stripe::SubscriptionDetailsParamsTrialEnd | Nil)

Custom attribute writer method checking allowed values (enum). @param [Object] trial_end Object to be assigned

Source
valid?

Check to see if the all the properties in the model are valid @return true if the model is valid

Source