Class: Stripe::Checkout::SessionCreateParams::Item::Subscription
- Inherits:
-
RequestParams
- Object
- RequestParams
- Stripe::Checkout::SessionCreateParams::Item::Subscription
- Defined in:
- lib/stripe/params/checkout/session_create_params.rb
Defined Under Namespace
Classes: BillingCycleAnchorConfig, BillingMode, Item, PendingInvoiceItemInterval, TrialSettings
Instance Attribute Summary collapse
-
#billing_cycle_anchor_config ⇒ Object
Configures when the subscription schedule's billing cycle anchors to a specific day of the week or month.
-
#billing_mode ⇒ Object
Controls how prorations and invoices for subscriptions are calculated and orchestrated.
-
#description ⇒ Object
The subscription's description, meant to be displayable to the customer.
-
#items ⇒ Object
The list of items for the subscription.
-
#metadata ⇒ Object
Set of key-value pairs that you can attach to an object.
-
#pending_invoice_item_interval ⇒ Object
Specifies an interval for how often to bill for any pending invoice items.
-
#proration_behavior ⇒ Object
Determines how to handle prorations resulting from the
billing_cycle_anchor. -
#trial_end ⇒ Object
Unix timestamp representing the end of the trial period the customer will get before being charged for the first time.
-
#trial_period_days ⇒ Object
Integer representing the number of trial period days before the customer is charged for the first time.
-
#trial_settings ⇒ Object
Settings related to subscription trials.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(billing_cycle_anchor_config: nil, billing_mode: nil, description: nil, items: nil, metadata: nil, pending_invoice_item_interval: nil, proration_behavior: nil, trial_end: nil, trial_period_days: nil, trial_settings: nil) ⇒ Subscription
constructor
A new instance of Subscription.
Methods inherited from RequestParams
attr_accessor, coerce_params, coerce_value, new, #to_h
Constructor Details
#initialize(billing_cycle_anchor_config: nil, billing_mode: nil, description: nil, items: nil, metadata: nil, pending_invoice_item_interval: nil, proration_behavior: nil, trial_end: nil, trial_period_days: nil, trial_settings: nil) ⇒ Subscription
Returns a new instance of Subscription.
759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 |
# File 'lib/stripe/params/checkout/session_create_params.rb', line 759 def initialize( billing_cycle_anchor_config: nil, billing_mode: nil, description: nil, items: nil, metadata: nil, pending_invoice_item_interval: nil, proration_behavior: nil, trial_end: nil, trial_period_days: nil, trial_settings: nil ) @billing_cycle_anchor_config = billing_cycle_anchor_config @billing_mode = billing_mode @description = description @items = items @metadata = @pending_invoice_item_interval = pending_invoice_item_interval @proration_behavior = proration_behavior @trial_end = trial_end @trial_period_days = trial_period_days @trial_settings = trial_settings end |
Instance Attribute Details
#billing_cycle_anchor_config ⇒ Object
Configures when the subscription schedule's billing cycle anchors to a specific day of the week or month.
739 740 741 |
# File 'lib/stripe/params/checkout/session_create_params.rb', line 739 def billing_cycle_anchor_config @billing_cycle_anchor_config end |
#billing_mode ⇒ Object
Controls how prorations and invoices for subscriptions are calculated and orchestrated.
741 742 743 |
# File 'lib/stripe/params/checkout/session_create_params.rb', line 741 def billing_mode @billing_mode end |
#description ⇒ Object
The subscription's description, meant to be displayable to the customer.
743 744 745 |
# File 'lib/stripe/params/checkout/session_create_params.rb', line 743 def description @description end |
#items ⇒ Object
The list of items for the subscription.
745 746 747 |
# File 'lib/stripe/params/checkout/session_create_params.rb', line 745 def items @items end |
#metadata ⇒ Object
Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to metadata.
747 748 749 |
# File 'lib/stripe/params/checkout/session_create_params.rb', line 747 def @metadata end |
#pending_invoice_item_interval ⇒ Object
Specifies an interval for how often to bill for any pending invoice items.
749 750 751 |
# File 'lib/stripe/params/checkout/session_create_params.rb', line 749 def pending_invoice_item_interval @pending_invoice_item_interval end |
#proration_behavior ⇒ Object
Determines how to handle prorations resulting from the billing_cycle_anchor. If no value is passed, the default is create_prorations.
751 752 753 |
# File 'lib/stripe/params/checkout/session_create_params.rb', line 751 def proration_behavior @proration_behavior end |
#trial_end ⇒ Object
Unix timestamp representing the end of the trial period the customer will get before being charged for the first time. Has to be at least 48 hours in the future.
753 754 755 |
# File 'lib/stripe/params/checkout/session_create_params.rb', line 753 def trial_end @trial_end end |
#trial_period_days ⇒ Object
Integer representing the number of trial period days before the customer is charged for the first time. Has to be at least 1.
755 756 757 |
# File 'lib/stripe/params/checkout/session_create_params.rb', line 755 def trial_period_days @trial_period_days end |
#trial_settings ⇒ Object
Settings related to subscription trials.
757 758 759 |
# File 'lib/stripe/params/checkout/session_create_params.rb', line 757 def trial_settings @trial_settings end |
Class Method Details
.field_encodings ⇒ Object
783 784 785 786 787 788 789 790 791 792 793 794 795 |
# File 'lib/stripe/params/checkout/session_create_params.rb', line 783 def self.field_encodings @field_encodings = { items: { kind: :array, element: { kind: :object, fields: { price_data: { kind: :object, fields: { unit_amount_decimal: :decimal_string } }, }, }, }, } end |