Class: Stripe::QuoteCreateParams

Inherits:
RequestParams show all
Defined in:
lib/stripe/params/quote_create_params.rb

Defined Under Namespace

Classes: AutomaticTax, Discount, FromQuote, InvoiceSettings, Line, LineItem, SubscriptionData, SubscriptionDataOverride, TransferData

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from RequestParams

#to_h

Constructor Details

#initialize(allow_backdated_lines: nil, application_fee_amount: nil, application_fee_percent: nil, automatic_tax: nil, collection_method: nil, customer: nil, customer_account: nil, default_tax_rates: nil, description: nil, discounts: nil, expand: nil, expires_at: nil, footer: nil, from_quote: nil, header: nil, invoice_settings: nil, line_items: nil, lines: nil, metadata: nil, on_behalf_of: nil, subscription_data: nil, subscription_data_overrides: nil, test_clock: nil, transfer_data: nil) ⇒ QuoteCreateParams

Returns a new instance of QuoteCreateParams.



1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
# File 'lib/stripe/params/quote_create_params.rb', line 1271

def initialize(
  allow_backdated_lines: nil,
  application_fee_amount: nil,
  application_fee_percent: nil,
  automatic_tax: nil,
  collection_method: nil,
  customer: nil,
  customer_account: nil,
  default_tax_rates: nil,
  description: nil,
  discounts: nil,
  expand: nil,
  expires_at: nil,
  footer: nil,
  from_quote: nil,
  header: nil,
  invoice_settings: nil,
  line_items: nil,
  lines: nil,
  metadata: nil,
  on_behalf_of: nil,
  subscription_data: nil,
  subscription_data_overrides: nil,
  test_clock: nil,
  transfer_data: nil
)
  @allow_backdated_lines = allow_backdated_lines
  @application_fee_amount = application_fee_amount
  @application_fee_percent = application_fee_percent
  @automatic_tax = automatic_tax
  @collection_method = collection_method
  @customer = customer
  @customer_account = 
  @default_tax_rates = default_tax_rates
  @description = description
  @discounts = discounts
  @expand = expand
  @expires_at = expires_at
  @footer = footer
  @from_quote = from_quote
  @header = header
  @invoice_settings = invoice_settings
  @line_items = line_items
  @lines = lines
  @metadata = 
  @on_behalf_of = on_behalf_of
  @subscription_data = subscription_data
  @subscription_data_overrides = subscription_data_overrides
  @test_clock = test_clock
  @transfer_data = transfer_data
end

Instance Attribute Details

#allow_backdated_linesObject

Set to true to allow quote lines to have ‘starts_at` in the past if collection is paused between `starts_at` and now.



1223
1224
1225
# File 'lib/stripe/params/quote_create_params.rb', line 1223

def allow_backdated_lines
  @allow_backdated_lines
end

#application_fee_amountObject

The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner’s Stripe account. There cannot be any line items with recurring prices when using this field.



1225
1226
1227
# File 'lib/stripe/params/quote_create_params.rb', line 1225

def application_fee_amount
  @application_fee_amount
end

#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. There must be at least 1 line item with a recurring price to use this field.



1227
1228
1229
# File 'lib/stripe/params/quote_create_params.rb', line 1227

def application_fee_percent
  @application_fee_percent
end

#automatic_taxObject

Settings for automatic tax lookup for this quote and resulting invoices and subscriptions.



1229
1230
1231
# File 'lib/stripe/params/quote_create_params.rb', line 1229

def automatic_tax
  @automatic_tax
end

#collection_methodObject

Either ‘charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay invoices at the end of the subscription cycle or at invoice finalization using the default payment method attached to the subscription or 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`.



1231
1232
1233
# File 'lib/stripe/params/quote_create_params.rb', line 1231

def collection_method
  @collection_method
end

#customerObject

The customer for which this quote belongs to. A customer is required before finalizing the quote. Once specified, it cannot be changed.



1233
1234
1235
# File 'lib/stripe/params/quote_create_params.rb', line 1233

def customer
  @customer
end

#customer_accountObject

The account for which this quote belongs to. A customer or account is required before finalizing the quote. Once specified, it cannot be changed.



1235
1236
1237
# File 'lib/stripe/params/quote_create_params.rb', line 1235

def 
  @customer_account
end

#default_tax_ratesObject

The tax rates that will apply to any line item that does not have ‘tax_rates` set.



1237
1238
1239
# File 'lib/stripe/params/quote_create_params.rb', line 1237

def default_tax_rates
  @default_tax_rates
end

#descriptionObject

A description that will be displayed on the quote PDF. If no value is passed, the default description configured in your [quote template settings](dashboard.stripe.com/settings/billing/quote) will be used.



1239
1240
1241
# File 'lib/stripe/params/quote_create_params.rb', line 1239

def description
  @description
end

#discountsObject

The discounts applied to the quote.



1241
1242
1243
# File 'lib/stripe/params/quote_create_params.rb', line 1241

def discounts
  @discounts
end

#expandObject

Specifies which fields in the response should be expanded.



1243
1244
1245
# File 'lib/stripe/params/quote_create_params.rb', line 1243

def expand
  @expand
end

#expires_atObject

A future timestamp on which the quote will be canceled if in ‘open` or `draft` status. Measured in seconds since the Unix epoch. If no value is passed, the default expiration date configured in your [quote template settings](dashboard.stripe.com/settings/billing/quote) will be used.



1245
1246
1247
# File 'lib/stripe/params/quote_create_params.rb', line 1245

def expires_at
  @expires_at
end

A footer that will be displayed on the quote PDF. If no value is passed, the default footer configured in your [quote template settings](dashboard.stripe.com/settings/billing/quote) will be used.



1247
1248
1249
# File 'lib/stripe/params/quote_create_params.rb', line 1247

def footer
  @footer
end

#from_quoteObject

Clone an existing quote. The new quote will be created in ‘status=draft`. When using this parameter, you cannot specify any other parameters except for `expires_at`.



1249
1250
1251
# File 'lib/stripe/params/quote_create_params.rb', line 1249

def from_quote
  @from_quote
end

#headerObject

A header that will be displayed on the quote PDF. If no value is passed, the default header configured in your [quote template settings](dashboard.stripe.com/settings/billing/quote) will be used.



1251
1252
1253
# File 'lib/stripe/params/quote_create_params.rb', line 1251

def header
  @header
end

#invoice_settingsObject

All invoices will be billed using the specified settings.



1253
1254
1255
# File 'lib/stripe/params/quote_create_params.rb', line 1253

def invoice_settings
  @invoice_settings
end

#line_itemsObject

A list of line items the customer is being quoted for. Each line item includes information about the product, the quantity, and the resulting cost.



1255
1256
1257
# File 'lib/stripe/params/quote_create_params.rb', line 1255

def line_items
  @line_items
end

#linesObject

A list of [quote lines](docs.stripe.com/api/quote_lines) on the quote. These lines describe changes, in the order provided, that will be used to create new subscription schedules or update existing subscription schedules when the quote is accepted.



1257
1258
1259
# File 'lib/stripe/params/quote_create_params.rb', line 1257

def lines
  @lines
end

#metadataObject

Set of [key-value pairs](docs.stripe.com/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`.



1259
1260
1261
# File 'lib/stripe/params/quote_create_params.rb', line 1259

def 
  @metadata
end

#on_behalf_ofObject

The account on behalf of which to charge.



1261
1262
1263
# File 'lib/stripe/params/quote_create_params.rb', line 1261

def on_behalf_of
  @on_behalf_of
end

#subscription_dataObject

When creating a subscription or subscription schedule, the specified configuration data will be used. There must be at least one line item with a recurring price for a subscription or subscription schedule to be created. A subscription schedule is created if ‘subscription_data` is present and in the future, otherwise a subscription is created.



1263
1264
1265
# File 'lib/stripe/params/quote_create_params.rb', line 1263

def subscription_data
  @subscription_data
end

#subscription_data_overridesObject

List representing overrides for ‘subscription_data` configurations for specific subscription schedules.



1265
1266
1267
# File 'lib/stripe/params/quote_create_params.rb', line 1265

def subscription_data_overrides
  @subscription_data_overrides
end

#test_clockObject

ID of the test clock to attach to the quote.



1267
1268
1269
# File 'lib/stripe/params/quote_create_params.rb', line 1267

def test_clock
  @test_clock
end

#transfer_dataObject

The data with which to automatically create a Transfer for each of the invoices.



1269
1270
1271
# File 'lib/stripe/params/quote_create_params.rb', line 1269

def transfer_data
  @transfer_data
end