Class: Stripe::Checkout::SessionCreateParams::SubscriptionData

Inherits:
RequestParams
  • Object
show all
Defined in:
lib/stripe/params/checkout/session_create_params.rb

Defined Under Namespace

Classes: BillingCycleAnchorConfig, BillingMode, InvoiceSettings, PendingInvoiceItemInterval, TransferData, TrialSettings

Instance Attribute Summary collapse

Instance Method Summary collapse

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.



2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
# File 'lib/stripe/params/checkout/session_create_params.rb', line 2399

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_percentObject

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.



2365
2366
2367
# File 'lib/stripe/params/checkout/session_create_params.rb', line 2365

def application_fee_percent
  @application_fee_percent
end

#billing_cycle_anchorObject

A future timestamp to anchor the subscription's billing cycle for new subscriptions.



2367
2368
2369
# File 'lib/stripe/params/checkout/session_create_params.rb', line 2367

def billing_cycle_anchor
  @billing_cycle_anchor
end

#billing_cycle_anchor_configObject

Configures when the subscription schedule's billing cycle anchors to a specific day of the week or month.



2369
2370
2371
# File 'lib/stripe/params/checkout/session_create_params.rb', line 2369

def billing_cycle_anchor_config
  @billing_cycle_anchor_config
end

#billing_modeObject

Controls how prorations and invoices for subscriptions are calculated and orchestrated.



2371
2372
2373
# File 'lib/stripe/params/checkout/session_create_params.rb', line 2371

def billing_mode
  @billing_mode
end

#default_tax_ratesObject

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.



2375
2376
2377
# File 'lib/stripe/params/checkout/session_create_params.rb', line 2375

def default_tax_rates
  @default_tax_rates
end

#descriptionObject

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.



2379
2380
2381
# File 'lib/stripe/params/checkout/session_create_params.rb', line 2379

def description
  @description
end

#invoice_settingsObject

All invoices will be billed using the specified settings.



2381
2382
2383
# File 'lib/stripe/params/checkout/session_create_params.rb', line 2381

def invoice_settings
  @invoice_settings
end

#metadataObject

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.



2383
2384
2385
# File 'lib/stripe/params/checkout/session_create_params.rb', line 2383

def 
  @metadata
end

#on_behalf_ofObject

The account on behalf of which to charge, for each of the subscription's invoices.



2385
2386
2387
# File 'lib/stripe/params/checkout/session_create_params.rb', line 2385

def on_behalf_of
  @on_behalf_of
end

#pending_invoice_item_intervalObject

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.



2387
2388
2389
# File 'lib/stripe/params/checkout/session_create_params.rb', line 2387

def pending_invoice_item_interval
  @pending_invoice_item_interval
end

#proration_behaviorObject

Determines how to handle prorations resulting from the billing_cycle_anchor. If no value is passed, the default is create_prorations.



2389
2390
2391
# File 'lib/stripe/params/checkout/session_create_params.rb', line 2389

def proration_behavior
  @proration_behavior
end

#transfer_dataObject

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.



2391
2392
2393
# File 'lib/stripe/params/checkout/session_create_params.rb', line 2391

def transfer_data
  @transfer_data
end

#trial_endObject

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.



2393
2394
2395
# File 'lib/stripe/params/checkout/session_create_params.rb', line 2393

def trial_end
  @trial_end
end

#trial_period_daysObject

Integer representing the number of trial period days before the customer is charged for the first time. Has to be at least 1.



2395
2396
2397
# File 'lib/stripe/params/checkout/session_create_params.rb', line 2395

def trial_period_days
  @trial_period_days
end

#trial_settingsObject

Settings related to subscription trials.



2397
2398
2399
# File 'lib/stripe/params/checkout/session_create_params.rb', line 2397

def trial_settings
  @trial_settings
end