Class: Stripe::Quote::CreateParams::Line

Inherits:
RequestParams show all
Defined in:
lib/stripe/resources/quote.rb

Defined Under Namespace

Classes: Action, AppliesTo, CancelSubscriptionSchedule, EndsAt, SetPauseCollection, StartsAt, TrialSettings

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from RequestParams

#to_h

Constructor Details

#initialize(actions: nil, applies_to: nil, billing_cycle_anchor: nil, cancel_subscription_schedule: nil, ends_at: nil, proration_behavior: nil, set_pause_collection: nil, set_schedule_end: nil, starts_at: nil, trial_settings: nil) ⇒ Line

Returns a new instance of Line.



1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
# File 'lib/stripe/resources/quote.rb', line 1232

def initialize(
  actions: nil,
  applies_to: nil,
  billing_cycle_anchor: nil,
  cancel_subscription_schedule: nil,
  ends_at: nil,
  proration_behavior: nil,
  set_pause_collection: nil,
  set_schedule_end: nil,
  starts_at: nil,
  trial_settings: nil
)
  @actions = actions
  @applies_to = applies_to
  @billing_cycle_anchor = billing_cycle_anchor
  @cancel_subscription_schedule = cancel_subscription_schedule
  @ends_at = ends_at
  @proration_behavior = proration_behavior
  @set_pause_collection = set_pause_collection
  @set_schedule_end = set_schedule_end
  @starts_at = starts_at
  @trial_settings = trial_settings
end

Instance Attribute Details

#actionsObject

An array of operations the quote line performs.



1203
1204
1205
# File 'lib/stripe/resources/quote.rb', line 1203

def actions
  @actions
end

#applies_toObject

Details to identify the subscription schedule the quote line applies to.



1206
1207
1208
# File 'lib/stripe/resources/quote.rb', line 1206

def applies_to
  @applies_to
end

#billing_cycle_anchorObject

For point-in-time quote lines (having no ‘ends_at` timestamp), this attribute lets you set or remove whether the subscription’s billing cycle anchor is reset at the Quote Line ‘starts_at` timestamp.For time-span based quote lines (having both `starts_at` and `ends_at`), the only valid value is `automatic`, which removes any previously configured billing cycle anchor resets during the window of time spanning the quote line.



1209
1210
1211
# File 'lib/stripe/resources/quote.rb', line 1209

def billing_cycle_anchor
  @billing_cycle_anchor
end

#cancel_subscription_scheduleObject

A point-in-time operation that cancels an existing subscription schedule at the line’s starts_at timestamp. Currently only compatible with ‘quote_acceptance_date` for `starts_at`. When using cancel_subscription_schedule, the subscription schedule on the quote remains unalterable, except for modifications to the metadata, collection_method or invoice_settings.



1212
1213
1214
# File 'lib/stripe/resources/quote.rb', line 1212

def cancel_subscription_schedule
  @cancel_subscription_schedule
end

#ends_atObject

Details to identify the end of the time range modified by the proposed change. If not supplied, the quote line is considered a point-in-time operation that only affects the exact timestamp at ‘starts_at`, and a restricted set of attributes is supported on the quote line.



1215
1216
1217
# File 'lib/stripe/resources/quote.rb', line 1215

def ends_at
  @ends_at
end

#proration_behaviorObject

Changes to how Stripe handles prorations during the quote line’s time span. Affects if and how prorations are created when a future phase starts.



1218
1219
1220
# File 'lib/stripe/resources/quote.rb', line 1218

def proration_behavior
  @proration_behavior
end

#set_pause_collectionObject

Defines how to pause collection for the underlying subscription throughout the duration of the amendment.



1221
1222
1223
# File 'lib/stripe/resources/quote.rb', line 1221

def set_pause_collection
  @set_pause_collection
end

#set_schedule_endObject

Timestamp helper to end the underlying schedule early, based on the acompanying line’s start or end date.



1224
1225
1226
# File 'lib/stripe/resources/quote.rb', line 1224

def set_schedule_end
  @set_schedule_end
end

#starts_atObject

Details to identify the earliest timestamp where the proposed change should take effect.



1227
1228
1229
# File 'lib/stripe/resources/quote.rb', line 1227

def starts_at
  @starts_at
end

#trial_settingsObject

Settings related to subscription trials.



1230
1231
1232
# File 'lib/stripe/resources/quote.rb', line 1230

def trial_settings
  @trial_settings
end