Class: Stripe::SubscriptionScheduleCreateParams::DefaultSettings
- Inherits:
-
RequestParams
- Object
- RequestParams
- Stripe::SubscriptionScheduleCreateParams::DefaultSettings
- Defined in:
- lib/stripe/params/subscription_schedule_create_params.rb
Defined Under Namespace
Classes: AutomaticTax, BillingThresholds, InvoiceSettings, TransferData
Instance Attribute Summary collapse
-
#application_fee_percent ⇒ Object
A non-negative decimal between 0 and 100, with at most two decimal places.
-
#automatic_tax ⇒ Object
Default settings for automatic tax computation.
-
#billing_cycle_anchor ⇒ Object
Can be set to
phase_startto set the anchor to the start of the phase orautomaticto automatically change it if needed. -
#billing_thresholds ⇒ Object
Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period.
-
#collection_method ⇒ Object
Either
charge_automatically, orsend_invoice. -
#default_payment_method ⇒ Object
ID of the default payment method for the subscription schedule.
-
#description ⇒ Object
Subscription description, meant to be displayable to the customer.
-
#invoice_settings ⇒ Object
All invoices will be billed using the specified settings.
-
#on_behalf_of ⇒ Object
The account on behalf of which to charge, for each of the associated subscription's invoices.
-
#phase_effective_at ⇒ Object
Configures how the subscription schedule handles billing for phase transitions.
-
#transfer_data ⇒ Object
The data with which to automatically create a Transfer for each of the associated subscription's invoices.
Instance Method Summary collapse
-
#initialize(application_fee_percent: nil, automatic_tax: nil, billing_cycle_anchor: nil, billing_thresholds: nil, collection_method: nil, default_payment_method: nil, description: nil, invoice_settings: nil, on_behalf_of: nil, phase_effective_at: nil, transfer_data: nil) ⇒ DefaultSettings
constructor
A new instance of DefaultSettings.
Methods inherited from RequestParams
attr_accessor, coerce_params, coerce_value, field_encodings, new, #to_h
Constructor Details
#initialize(application_fee_percent: nil, automatic_tax: nil, billing_cycle_anchor: nil, billing_thresholds: nil, collection_method: nil, default_payment_method: nil, description: nil, invoice_settings: nil, on_behalf_of: nil, phase_effective_at: nil, transfer_data: nil) ⇒ DefaultSettings
Returns a new instance of DefaultSettings.
202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 |
# File 'lib/stripe/params/subscription_schedule_create_params.rb', line 202 def initialize( application_fee_percent: nil, automatic_tax: nil, billing_cycle_anchor: nil, billing_thresholds: nil, collection_method: nil, default_payment_method: nil, description: nil, invoice_settings: nil, on_behalf_of: nil, phase_effective_at: nil, transfer_data: nil ) @application_fee_percent = application_fee_percent @automatic_tax = automatic_tax @billing_cycle_anchor = billing_cycle_anchor @billing_thresholds = billing_thresholds @collection_method = collection_method @default_payment_method = default_payment_method @description = description @invoice_settings = invoice_settings @on_behalf_of = on_behalf_of @phase_effective_at = phase_effective_at @transfer_data = transfer_data 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. The request must be made by a platform account on a connected account in order to set an application fee percentage. For more information, see the application fees documentation.
180 181 182 |
# File 'lib/stripe/params/subscription_schedule_create_params.rb', line 180 def application_fee_percent @application_fee_percent end |
#automatic_tax ⇒ Object
Default settings for automatic tax computation.
182 183 184 |
# File 'lib/stripe/params/subscription_schedule_create_params.rb', line 182 def automatic_tax @automatic_tax end |
#billing_cycle_anchor ⇒ Object
Can be set to phase_start to set the anchor to the start of the phase or automatic to automatically change it if needed. Cannot be set to phase_start if this phase specifies a trial. For more information, see the billing cycle documentation.
184 185 186 |
# File 'lib/stripe/params/subscription_schedule_create_params.rb', line 184 def billing_cycle_anchor @billing_cycle_anchor end |
#billing_thresholds ⇒ Object
Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. Pass an empty string to remove previously-defined thresholds.
186 187 188 |
# File 'lib/stripe/params/subscription_schedule_create_params.rb', line 186 def billing_thresholds @billing_thresholds end |
#collection_method ⇒ Object
Either charge_automatically, or send_invoice. When charging automatically, Stripe will attempt to pay the underlying subscription at the end of each billing cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as active. Defaults to charge_automatically on creation.
188 189 190 |
# File 'lib/stripe/params/subscription_schedule_create_params.rb', line 188 def collection_method @collection_method end |
#default_payment_method ⇒ Object
ID of the default payment method for the subscription schedule. It must belong to the customer associated with the subscription schedule. If not set, invoices will use the default payment method in the customer's invoice settings.
190 191 192 |
# File 'lib/stripe/params/subscription_schedule_create_params.rb', line 190 def default_payment_method @default_payment_method end |
#description ⇒ Object
Subscription description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs.
192 193 194 |
# File 'lib/stripe/params/subscription_schedule_create_params.rb', line 192 def description @description end |
#invoice_settings ⇒ Object
All invoices will be billed using the specified settings.
194 195 196 |
# File 'lib/stripe/params/subscription_schedule_create_params.rb', line 194 def invoice_settings @invoice_settings end |
#on_behalf_of ⇒ Object
The account on behalf of which to charge, for each of the associated subscription's invoices.
196 197 198 |
# File 'lib/stripe/params/subscription_schedule_create_params.rb', line 196 def on_behalf_of @on_behalf_of end |
#phase_effective_at ⇒ Object
Configures how the subscription schedule handles billing for phase transitions.
198 199 200 |
# File 'lib/stripe/params/subscription_schedule_create_params.rb', line 198 def phase_effective_at @phase_effective_at end |
#transfer_data ⇒ Object
The data with which to automatically create a Transfer for each of the associated subscription's invoices.
200 201 202 |
# File 'lib/stripe/params/subscription_schedule_create_params.rb', line 200 def transfer_data @transfer_data end |