Class: Stripe::QuoteLine

Inherits:
APIResource show all
Defined in:
lib/stripe/resources/quote_line.rb

Overview

A quote line defines a set of changes, in the order provided, that will be applied upon quote acceptance.

Defined Under Namespace

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

Constant Summary collapse

OBJECT_NAME =
"quote_line"

Constants inherited from StripeObject

StripeObject::RESERVED_FIELD_NAMES

Instance Attribute Summary collapse

Attributes inherited from APIResource

#save_with_parent

Attributes inherited from StripeObject

#last_response

Class Method Summary collapse

Methods inherited from APIResource

class_name, custom_method, #refresh, #request_stripe_object, resource_url, #resource_url, retrieve, save_nested_resource

Methods included from APIOperations::Request

included

Methods inherited from StripeObject

#==, #[], #[]=, #_get_inner_class_type, additive_object_param, additive_object_param?, #as_json, construct_from, #deleted?, #dirty!, #each, #eql?, field_encodings, #hash, #initialize, #inspect, #keys, #marshal_dump, #marshal_load, protected_fields, #serialize_params, #to_hash, #to_json, #to_s, #update_attributes, #values

Constructor Details

This class inherits a constructor from Stripe::StripeObject

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Stripe::StripeObject

Instance Attribute Details

#actionsObject (readonly)

A list of items the customer is being quoted for.



485
486
487
# File 'lib/stripe/resources/quote_line.rb', line 485

def actions
  @actions
end

#applies_toObject (readonly)

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



487
488
489
# File 'lib/stripe/resources/quote_line.rb', line 487

def applies_to
  @applies_to
end

#billing_cycle_anchorObject (readonly)

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.



489
490
491
# File 'lib/stripe/resources/quote_line.rb', line 489

def billing_cycle_anchor
  @billing_cycle_anchor
end

#cancel_subscription_scheduleObject (readonly)

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.



491
492
493
# File 'lib/stripe/resources/quote_line.rb', line 491

def cancel_subscription_schedule
  @cancel_subscription_schedule
end

#ends_atObject (readonly)

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.



493
494
495
# File 'lib/stripe/resources/quote_line.rb', line 493

def ends_at
  @ends_at
end

#idObject (readonly)

Unique identifier for the object.



495
496
497
# File 'lib/stripe/resources/quote_line.rb', line 495

def id
  @id
end

#objectObject (readonly)

String representing the object’s type. Objects of the same type share the same value.



497
498
499
# File 'lib/stripe/resources/quote_line.rb', line 497

def object
  @object
end

#proration_behaviorObject (readonly)

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.



499
500
501
# File 'lib/stripe/resources/quote_line.rb', line 499

def proration_behavior
  @proration_behavior
end

#set_pause_collectionObject (readonly)

Details to modify the pause_collection behavior of the subscription schedule.



501
502
503
# File 'lib/stripe/resources/quote_line.rb', line 501

def set_pause_collection
  @set_pause_collection
end

#set_schedule_endObject (readonly)

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



503
504
505
# File 'lib/stripe/resources/quote_line.rb', line 503

def set_schedule_end
  @set_schedule_end
end

#starts_atObject (readonly)

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



505
506
507
# File 'lib/stripe/resources/quote_line.rb', line 505

def starts_at
  @starts_at
end

#trial_settingsObject (readonly)

Settings related to subscription trials.



507
508
509
# File 'lib/stripe/resources/quote_line.rb', line 507

def trial_settings
  @trial_settings
end

Class Method Details

.field_remappingsObject



521
522
523
# File 'lib/stripe/resources/quote_line.rb', line 521

def self.field_remappings
  @field_remappings = {}
end

.inner_class_typesObject



509
510
511
512
513
514
515
516
517
518
519
# File 'lib/stripe/resources/quote_line.rb', line 509

def self.inner_class_types
  @inner_class_types = {
    actions: Action,
    applies_to: AppliesTo,
    cancel_subscription_schedule: CancelSubscriptionSchedule,
    ends_at: EndsAt,
    set_pause_collection: SetPauseCollection,
    starts_at: StartsAt,
    trial_settings: TrialSettings,
  }
end

.object_nameObject



8
9
10
# File 'lib/stripe/resources/quote_line.rb', line 8

def self.object_name
  "quote_line"
end