Class: Stripe::QuoteCreateParams::SubscriptionData

Inherits:
RequestParams
  • Object
show all
Defined in:
lib/stripe/params/quote_create_params.rb

Defined Under Namespace

Classes: BillingMode

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from RequestParams

#to_h

Constructor Details

#initialize(billing_mode: nil, description: nil, effective_date: nil, metadata: nil, trial_period_days: nil) ⇒ SubscriptionData

Returns a new instance of SubscriptionData.



187
188
189
190
191
192
193
194
195
196
197
198
199
# File 'lib/stripe/params/quote_create_params.rb', line 187

def initialize(
  billing_mode: nil,
  description: nil,
  effective_date: nil,
  metadata: nil,
  trial_period_days: nil
)
  @billing_mode = billing_mode
  @description = description
  @effective_date = effective_date
  @metadata = 
  @trial_period_days = trial_period_days
end

Instance Attribute Details

#billing_modeObject

Controls how prorations and invoices for subscriptions are calculated and orchestrated.



177
178
179
# File 'lib/stripe/params/quote_create_params.rb', line 177

def billing_mode
  @billing_mode
end

#descriptionObject

The subscription’s description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs.



179
180
181
# File 'lib/stripe/params/quote_create_params.rb', line 179

def description
  @description
end

#effective_dateObject

When creating a new subscription, the date of which the subscription schedule will start after the quote is accepted. The ‘effective_date` is ignored if it is in the past when the quote is accepted.



181
182
183
# File 'lib/stripe/params/quote_create_params.rb', line 181

def effective_date
  @effective_date
end

#metadataObject

Set of [key-value pairs](stripe.com/docs/api/metadata) that will set metadata on the subscription or subscription schedule when the quote is accepted. If a recurring price is included in ‘line_items`, this field will be passed to the resulting subscription’s ‘metadata` field. If `subscription_data.effective_date` is used, this field will be passed to the resulting subscription schedule’s ‘phases.metadata` field. Unlike object-level metadata, this field is declarative. Updates will clear prior values.



183
184
185
# File 'lib/stripe/params/quote_create_params.rb', line 183

def 
  @metadata
end

#trial_period_daysObject

Integer representing the number of trial period days before the customer is charged for the first time.



185
186
187
# File 'lib/stripe/params/quote_create_params.rb', line 185

def trial_period_days
  @trial_period_days
end