Class: Stripe::Checkout::SessionService::CreateParams::SubscriptionData
- Inherits:
-
RequestParams
- Object
- RequestParams
- Stripe::Checkout::SessionService::CreateParams::SubscriptionData
- Defined in:
- lib/stripe/services/checkout/session_service.rb
Defined Under Namespace
Classes: InvoiceSettings, 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.
-
#default_tax_rates ⇒ Object
The tax rates that will apply to any subscription item that does not have ‘tax_rates` set.
-
#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](stripe.com/docs/api/metadata) 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.
-
#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, default_tax_rates: nil, description: nil, invoice_settings: nil, metadata: nil, on_behalf_of: 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
Constructor Details
#initialize(application_fee_percent: nil, billing_cycle_anchor: nil, default_tax_rates: nil, description: nil, invoice_settings: nil, metadata: nil, on_behalf_of: nil, proration_behavior: nil, transfer_data: nil, trial_end: nil, trial_period_days: nil, trial_settings: nil) ⇒ SubscriptionData
Returns a new instance of SubscriptionData.
2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 |
# File 'lib/stripe/services/checkout/session_service.rb', line 2151 def initialize( application_fee_percent: nil, billing_cycle_anchor: nil, default_tax_rates: nil, description: nil, invoice_settings: nil, metadata: nil, on_behalf_of: 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 @default_tax_rates = default_tax_rates @description = description @invoice_settings = invoice_settings @metadata = @on_behalf_of = on_behalf_of @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](stripe.com/docs/connect/subscriptions#collecting-fees-on-subscriptions).
2109 2110 2111 |
# File 'lib/stripe/services/checkout/session_service.rb', line 2109 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.
2112 2113 2114 |
# File 'lib/stripe/services/checkout/session_service.rb', line 2112 def billing_cycle_anchor @billing_cycle_anchor 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.
2117 2118 2119 |
# File 'lib/stripe/services/checkout/session_service.rb', line 2117 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](stripe.com/docs/customer-management).
2122 2123 2124 |
# File 'lib/stripe/services/checkout/session_service.rb', line 2122 def description @description end |
#invoice_settings ⇒ Object
All invoices will be billed using the specified settings.
2125 2126 2127 |
# File 'lib/stripe/services/checkout/session_service.rb', line 2125 def invoice_settings @invoice_settings end |
#metadata ⇒ Object
Set of [key-value pairs](stripe.com/docs/api/metadata) 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`.
2128 2129 2130 |
# File 'lib/stripe/services/checkout/session_service.rb', line 2128 def @metadata end |
#on_behalf_of ⇒ Object
The account on behalf of which to charge, for each of the subscription’s invoices.
2131 2132 2133 |
# File 'lib/stripe/services/checkout/session_service.rb', line 2131 def on_behalf_of @on_behalf_of 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`.
2134 2135 2136 |
# File 'lib/stripe/services/checkout/session_service.rb', line 2134 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.
2137 2138 2139 |
# File 'lib/stripe/services/checkout/session_service.rb', line 2137 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.
2142 2143 2144 |
# File 'lib/stripe/services/checkout/session_service.rb', line 2142 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.
2146 2147 2148 |
# File 'lib/stripe/services/checkout/session_service.rb', line 2146 def trial_period_days @trial_period_days end |
#trial_settings ⇒ Object
Settings related to subscription trials.
2149 2150 2151 |
# File 'lib/stripe/services/checkout/session_service.rb', line 2149 def trial_settings @trial_settings end |