Class: Stripe::Checkout::SessionCreateParams::SubscriptionData
- Inherits:
-
RequestParams
- Object
- RequestParams
- Stripe::Checkout::SessionCreateParams::SubscriptionData
- Defined in:
- lib/stripe/params/checkout/session_create_params.rb
Defined Under Namespace
Classes: BillingCycleAnchorConfig, BillingMode, InvoiceSettings, PendingInvoiceItemInterval, TransferData, TrialSettings
Instance Attribute Summary collapse
-
#application_fee_percent ⇒ Object
A non-negative decimal between 0 and 100, with at most two decimal places.
-
#billing_cycle_anchor ⇒ Object
A future timestamp to anchor the subscription's billing cycle for new subscriptions.
-
#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.
-
#default_tax_rates ⇒ Object
The tax rates that will apply to any subscription item that does not have
tax_ratesset. -
#description ⇒ Object
The subscription's description, meant to be displayable to the customer.
-
#invoice_settings ⇒ Object
All invoices will be billed using the specified settings.
-
#metadata ⇒ Object
Set of key-value pairs that you can attach to an object.
-
#on_behalf_of ⇒ Object
The account on behalf of which to charge, for each of the subscription's invoices.
-
#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. -
#transfer_data ⇒ Object
If specified, the funds from the subscription's invoices will be transferred to the destination and the ID of the resulting transfers will be found on the resulting charges.
-
#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.
Instance Method Summary collapse
-
#initialize(application_fee_percent: nil, billing_cycle_anchor: nil, billing_cycle_anchor_config: nil, billing_mode: nil, default_tax_rates: nil, description: nil, invoice_settings: nil, metadata: nil, on_behalf_of: nil, pending_invoice_item_interval: nil, proration_behavior: nil, transfer_data: nil, trial_end: nil, trial_period_days: nil, trial_settings: nil) ⇒ SubscriptionData
constructor
A new instance of SubscriptionData.
Methods inherited from RequestParams
attr_accessor, coerce_params, coerce_value, field_encodings, new, #to_h
Constructor Details
#initialize(application_fee_percent: nil, billing_cycle_anchor: nil, billing_cycle_anchor_config: nil, billing_mode: nil, default_tax_rates: nil, description: nil, invoice_settings: nil, metadata: nil, on_behalf_of: nil, pending_invoice_item_interval: nil, proration_behavior: nil, transfer_data: nil, trial_end: nil, trial_period_days: nil, trial_settings: nil) ⇒ SubscriptionData
Returns a new instance of SubscriptionData.
2912 2913 2914 2915 2916 2917 2918 2919 2920 2921 2922 2923 2924 2925 2926 2927 2928 2929 2930 2931 2932 2933 2934 2935 2936 2937 2938 2939 2940 2941 2942 2943 2944 |
# File 'lib/stripe/params/checkout/session_create_params.rb', line 2912 def initialize( application_fee_percent: nil, billing_cycle_anchor: nil, billing_cycle_anchor_config: nil, billing_mode: nil, default_tax_rates: nil, description: nil, invoice_settings: nil, metadata: nil, on_behalf_of: nil, pending_invoice_item_interval: nil, proration_behavior: nil, transfer_data: nil, trial_end: nil, trial_period_days: nil, trial_settings: nil ) @application_fee_percent = application_fee_percent @billing_cycle_anchor = billing_cycle_anchor @billing_cycle_anchor_config = billing_cycle_anchor_config @billing_mode = billing_mode @default_tax_rates = default_tax_rates @description = description @invoice_settings = invoice_settings @metadata = @on_behalf_of = on_behalf_of @pending_invoice_item_interval = pending_invoice_item_interval @proration_behavior = proration_behavior @transfer_data = transfer_data @trial_end = trial_end @trial_period_days = trial_period_days @trial_settings = trial_settings end |
Instance Attribute Details
#application_fee_percent ⇒ Object
A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. To use an application fee percent, the request must be made on behalf of another account, using the Stripe-Account header or an OAuth key. For more information, see the application fees documentation.
2878 2879 2880 |
# File 'lib/stripe/params/checkout/session_create_params.rb', line 2878 def application_fee_percent @application_fee_percent end |
#billing_cycle_anchor ⇒ Object
A future timestamp to anchor the subscription's billing cycle for new subscriptions.
2880 2881 2882 |
# File 'lib/stripe/params/checkout/session_create_params.rb', line 2880 def billing_cycle_anchor @billing_cycle_anchor end |
#billing_cycle_anchor_config ⇒ Object
Configures when the subscription schedule's billing cycle anchors to a specific day of the week or month.
2882 2883 2884 |
# File 'lib/stripe/params/checkout/session_create_params.rb', line 2882 def billing_cycle_anchor_config @billing_cycle_anchor_config end |
#billing_mode ⇒ Object
Controls how prorations and invoices for subscriptions are calculated and orchestrated.
2884 2885 2886 |
# File 'lib/stripe/params/checkout/session_create_params.rb', line 2884 def billing_mode @billing_mode end |
#default_tax_rates ⇒ Object
The tax rates that will apply to any subscription item that does not have
tax_rates set. Invoices created will have their default_tax_rates populated
from the subscription.
2888 2889 2890 |
# File 'lib/stripe/params/checkout/session_create_params.rb', line 2888 def default_tax_rates @default_tax_rates end |
#description ⇒ Object
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 the customer portal.
2892 2893 2894 |
# File 'lib/stripe/params/checkout/session_create_params.rb', line 2892 def description @description end |
#invoice_settings ⇒ Object
All invoices will be billed using the specified settings.
2894 2895 2896 |
# File 'lib/stripe/params/checkout/session_create_params.rb', line 2894 def invoice_settings @invoice_settings 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.
2896 2897 2898 |
# File 'lib/stripe/params/checkout/session_create_params.rb', line 2896 def @metadata end |
#on_behalf_of ⇒ Object
The account on behalf of which to charge, for each of the subscription's invoices.
2898 2899 2900 |
# File 'lib/stripe/params/checkout/session_create_params.rb', line 2898 def on_behalf_of @on_behalf_of end |
#pending_invoice_item_interval ⇒ Object
Specifies an interval for how often to bill for any pending invoice items. It is analogous to calling Create an invoice for the given subscription at the specified interval.
2900 2901 2902 |
# File 'lib/stripe/params/checkout/session_create_params.rb', line 2900 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.
2902 2903 2904 |
# File 'lib/stripe/params/checkout/session_create_params.rb', line 2902 def proration_behavior @proration_behavior end |
#transfer_data ⇒ Object
If specified, the funds from the subscription's invoices will be transferred to the destination and the ID of the resulting transfers will be found on the resulting charges.
2904 2905 2906 |
# File 'lib/stripe/params/checkout/session_create_params.rb', line 2904 def transfer_data @transfer_data 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.
2906 2907 2908 |
# File 'lib/stripe/params/checkout/session_create_params.rb', line 2906 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.
2908 2909 2910 |
# File 'lib/stripe/params/checkout/session_create_params.rb', line 2908 def trial_period_days @trial_period_days end |
#trial_settings ⇒ Object
Settings related to subscription trials.
2910 2911 2912 |
# File 'lib/stripe/params/checkout/session_create_params.rb', line 2910 def trial_settings @trial_settings end |