Class: Stripe::QuoteUpdateParams

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

Defined Under Namespace

Classes: AutomaticTax, Discount, InvoiceSettings, LineItem, SubscriptionData, TransferData

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from RequestParams

attr_accessor, coerce_params, coerce_value, new, #to_h

Constructor Details

#initialize(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, header: nil, invoice_settings: nil, line_items: nil, metadata: nil, on_behalf_of: nil, subscription_data: nil, transfer_data: nil) ⇒ QuoteUpdateParams

Returns a new instance of QuoteUpdateParams.



235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
# File 'lib/stripe/params/quote_update_params.rb', line 235

def initialize(
  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,
  header: nil,
  invoice_settings: nil,
  line_items: nil,
  metadata: nil,
  on_behalf_of: nil,
  subscription_data: nil,
  transfer_data: nil
)
  @application_fee_amount = application_fee_amount
  @application_fee_percent = application_fee_percent
  @automatic_tax = automatic_tax
  @collection_method = collection_method
  @customer = customer
   = 
  @default_tax_rates = default_tax_rates
  @description = description
  @discounts = discounts
  @expand = expand
  @expires_at = expires_at
  @footer = footer
  @header = header
  @invoice_settings = invoice_settings
  @line_items = line_items
   = 
  @on_behalf_of = on_behalf_of
  @subscription_data = subscription_data
  @transfer_data = transfer_data
end

Instance Attribute Details

#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.



197
198
199
# File 'lib/stripe/params/quote_update_params.rb', line 197

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.



199
200
201
# File 'lib/stripe/params/quote_update_params.rb', line 199

def application_fee_percent
  @application_fee_percent
end

#automatic_taxObject

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



201
202
203
# File 'lib/stripe/params/quote_update_params.rb', line 201

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.



203
204
205
# File 'lib/stripe/params/quote_update_params.rb', line 203

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.



205
206
207
# File 'lib/stripe/params/quote_update_params.rb', line 205

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.



207
208
209
# File 'lib/stripe/params/quote_update_params.rb', line 207

def 
  
end

#default_tax_ratesObject

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



209
210
211
# File 'lib/stripe/params/quote_update_params.rb', line 209

def default_tax_rates
  @default_tax_rates
end

#descriptionObject

A description that will be displayed on the quote PDF.



211
212
213
# File 'lib/stripe/params/quote_update_params.rb', line 211

def description
  @description
end

#discountsObject

The discounts applied to the quote.



213
214
215
# File 'lib/stripe/params/quote_update_params.rb', line 213

def discounts
  @discounts
end

#expandObject

Specifies which fields in the response should be expanded.



215
216
217
# File 'lib/stripe/params/quote_update_params.rb', line 215

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.



217
218
219
# File 'lib/stripe/params/quote_update_params.rb', line 217

def expires_at
  @expires_at
end

A footer that will be displayed on the quote PDF.



219
220
221
# File 'lib/stripe/params/quote_update_params.rb', line 219

def footer
  @footer
end

#headerObject

A header that will be displayed on the quote PDF.



221
222
223
# File 'lib/stripe/params/quote_update_params.rb', line 221

def header
  @header
end

#invoice_settingsObject

All invoices will be billed using the specified settings.



223
224
225
# File 'lib/stripe/params/quote_update_params.rb', line 223

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.



225
226
227
# File 'lib/stripe/params/quote_update_params.rb', line 225

def line_items
  @line_items
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.



227
228
229
# File 'lib/stripe/params/quote_update_params.rb', line 227

def 
  
end

#on_behalf_ofObject

The account on behalf of which to charge.



229
230
231
# File 'lib/stripe/params/quote_update_params.rb', line 229

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[effective_date] is present and in the future, otherwise a subscription is created.



231
232
233
# File 'lib/stripe/params/quote_update_params.rb', line 231

def subscription_data
  @subscription_data
end

#transfer_dataObject

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



233
234
235
# File 'lib/stripe/params/quote_update_params.rb', line 233

def transfer_data
  @transfer_data
end

Class Method Details

.field_encodingsObject



277
278
279
280
281
282
283
284
285
286
287
# File 'lib/stripe/params/quote_update_params.rb', line 277

def self.field_encodings
  @field_encodings = {
    line_items: {
      kind: :array,
      element: {
        kind: :object,
        fields: { price_data: { kind: :object, fields: { unit_amount_decimal: :decimal_string } } },
      },
    },
  }
end