Class: Stripe::QuotePreviewSubscriptionSchedule

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

Defined Under Namespace

Classes: AppliesTo, BillingMode, BillingSchedule, CurrentPhase, DefaultSettings, LastPriceMigrationError, Phase, Prebilling

Constant Summary collapse

OBJECT_NAME =
"quote_preview_subscription_schedule"

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

#applicationObject (readonly)

ID of the Connect Application that created the schedule.



840
841
842
# File 'lib/stripe/resources/quote_preview_subscription_schedule.rb', line 840

def application
  @application
end

#applies_toObject (readonly)

Attribute for field applies_to



842
843
844
# File 'lib/stripe/resources/quote_preview_subscription_schedule.rb', line 842

def applies_to
  @applies_to
end

#billing_behaviorObject (readonly)

Configures when the subscription schedule generates prorations for phase transitions. Possible values are ‘prorate_on_next_phase` or `prorate_up_front` with the default being `prorate_on_next_phase`. `prorate_on_next_phase` will apply phase changes and generate prorations at transition time. `prorate_up_front` will bill for all phases within the current billing cycle up front.



844
845
846
# File 'lib/stripe/resources/quote_preview_subscription_schedule.rb', line 844

def billing_behavior
  @billing_behavior
end

#billing_modeObject (readonly)

The billing mode of the subscription.



846
847
848
# File 'lib/stripe/resources/quote_preview_subscription_schedule.rb', line 846

def billing_mode
  @billing_mode
end

#billing_schedulesObject (readonly)

Billing schedules for this subscription schedule.



848
849
850
# File 'lib/stripe/resources/quote_preview_subscription_schedule.rb', line 848

def billing_schedules
  @billing_schedules
end

#canceled_atObject (readonly)

Time at which the subscription schedule was canceled. Measured in seconds since the Unix epoch.



850
851
852
# File 'lib/stripe/resources/quote_preview_subscription_schedule.rb', line 850

def canceled_at
  @canceled_at
end

#completed_atObject (readonly)

Time at which the subscription schedule was completed. Measured in seconds since the Unix epoch.



852
853
854
# File 'lib/stripe/resources/quote_preview_subscription_schedule.rb', line 852

def completed_at
  @completed_at
end

#createdObject (readonly)

Time at which the object was created. Measured in seconds since the Unix epoch.



854
855
856
# File 'lib/stripe/resources/quote_preview_subscription_schedule.rb', line 854

def created
  @created
end

#current_phaseObject (readonly)

Object representing the start and end dates for the current phase of the subscription schedule, if it is ‘active`.



856
857
858
# File 'lib/stripe/resources/quote_preview_subscription_schedule.rb', line 856

def current_phase
  @current_phase
end

#customerObject (readonly)

ID of the customer who owns the subscription schedule.



858
859
860
# File 'lib/stripe/resources/quote_preview_subscription_schedule.rb', line 858

def customer
  @customer
end

#customer_accountObject (readonly)

ID of the account who owns the subscription schedule.



860
861
862
# File 'lib/stripe/resources/quote_preview_subscription_schedule.rb', line 860

def 
  @customer_account
end

#default_settingsObject (readonly)

Attribute for field default_settings



862
863
864
# File 'lib/stripe/resources/quote_preview_subscription_schedule.rb', line 862

def default_settings
  @default_settings
end

#end_behaviorObject (readonly)

Behavior of the subscription schedule and underlying subscription when it ends. Possible values are ‘release` or `cancel` with the default being `release`. `release` will end the subscription schedule and keep the underlying subscription running. `cancel` will end the subscription schedule and cancel the underlying subscription.



864
865
866
# File 'lib/stripe/resources/quote_preview_subscription_schedule.rb', line 864

def end_behavior
  @end_behavior
end

#idObject (readonly)

Unique identifier for the object.



866
867
868
# File 'lib/stripe/resources/quote_preview_subscription_schedule.rb', line 866

def id
  @id
end

#last_price_migration_errorObject (readonly)

Details of the most recent price migration that failed for the subscription schedule.



868
869
870
# File 'lib/stripe/resources/quote_preview_subscription_schedule.rb', line 868

def last_price_migration_error
  @last_price_migration_error
end

#latest_invoiceObject (readonly)

The most recent invoice this subscription schedule has generated.



870
871
872
# File 'lib/stripe/resources/quote_preview_subscription_schedule.rb', line 870

def latest_invoice
  @latest_invoice
end

#livemodeObject (readonly)

If the object exists in live mode, the value is ‘true`. If the object exists in test mode, the value is `false`.



872
873
874
# File 'lib/stripe/resources/quote_preview_subscription_schedule.rb', line 872

def livemode
  @livemode
end

#metadataObject (readonly)

Set of [key-value pairs](docs.stripe.com/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.



874
875
876
# File 'lib/stripe/resources/quote_preview_subscription_schedule.rb', line 874

def 
  @metadata
end

#objectObject (readonly)

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



876
877
878
# File 'lib/stripe/resources/quote_preview_subscription_schedule.rb', line 876

def object
  @object
end

#phasesObject (readonly)

Configuration for the subscription schedule’s phases.



878
879
880
# File 'lib/stripe/resources/quote_preview_subscription_schedule.rb', line 878

def phases
  @phases
end

#prebillingObject (readonly)

Time period and invoice for a Subscription billed in advance.



880
881
882
# File 'lib/stripe/resources/quote_preview_subscription_schedule.rb', line 880

def prebilling
  @prebilling
end

#released_atObject (readonly)

Time at which the subscription schedule was released. Measured in seconds since the Unix epoch.



882
883
884
# File 'lib/stripe/resources/quote_preview_subscription_schedule.rb', line 882

def released_at
  @released_at
end

#released_subscriptionObject (readonly)

ID of the subscription once managed by the subscription schedule (if it is released).



884
885
886
# File 'lib/stripe/resources/quote_preview_subscription_schedule.rb', line 884

def released_subscription
  @released_subscription
end

#statusObject (readonly)

The present status of the subscription schedule. Possible values are ‘not_started`, `active`, `completed`, `released`, and `canceled`. You can read more about the different states in our [behavior guide](docs.stripe.com/billing/subscriptions/subscription-schedules).



886
887
888
# File 'lib/stripe/resources/quote_preview_subscription_schedule.rb', line 886

def status
  @status
end

#subscriptionObject (readonly)

ID of the subscription managed by the subscription schedule.



888
889
890
# File 'lib/stripe/resources/quote_preview_subscription_schedule.rb', line 888

def subscription
  @subscription
end

#test_clockObject (readonly)

ID of the test clock this subscription schedule belongs to.



890
891
892
# File 'lib/stripe/resources/quote_preview_subscription_schedule.rb', line 890

def test_clock
  @test_clock
end

Class Method Details

.field_remappingsObject



905
906
907
# File 'lib/stripe/resources/quote_preview_subscription_schedule.rb', line 905

def self.field_remappings
  @field_remappings = {}
end

.inner_class_typesObject



892
893
894
895
896
897
898
899
900
901
902
903
# File 'lib/stripe/resources/quote_preview_subscription_schedule.rb', line 892

def self.inner_class_types
  @inner_class_types = {
    applies_to: AppliesTo,
    billing_mode: BillingMode,
    billing_schedules: BillingSchedule,
    current_phase: CurrentPhase,
    default_settings: DefaultSettings,
    last_price_migration_error: LastPriceMigrationError,
    phases: Phase,
    prebilling: Prebilling,
  }
end

.object_nameObject



7
8
9
# File 'lib/stripe/resources/quote_preview_subscription_schedule.rb', line 7

def self.object_name
  "quote_preview_subscription_schedule"
end