Class: Stripe::QuoteService::UpdateParams

Inherits:
RequestParams show all
Defined in:
lib/stripe/services/quote_service.rb

Defined Under Namespace

Classes: AutomaticTax, Discount, 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, header: nil, invoice_settings: nil, line_items: nil, lines: nil, metadata: nil, on_behalf_of: nil, subscription_data: nil, subscription_data_overrides: nil, transfer_data: nil) ⇒ UpdateParams

Returns a new instance of UpdateParams.



2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
# File 'lib/stripe/services/quote_service.rb', line 2164

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,
  header: nil,
  invoice_settings: nil,
  line_items: nil,
  lines: nil,
  metadata: nil,
  on_behalf_of: nil,
  subscription_data: nil,
  subscription_data_overrides: 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
  @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
  @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.



2120
2121
2122
# File 'lib/stripe/services/quote_service.rb', line 2120

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.



2122
2123
2124
# File 'lib/stripe/services/quote_service.rb', line 2122

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.



2124
2125
2126
# File 'lib/stripe/services/quote_service.rb', line 2124

def application_fee_percent
  @application_fee_percent
end

#automatic_taxObject

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



2126
2127
2128
# File 'lib/stripe/services/quote_service.rb', line 2126

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



2128
2129
2130
# File 'lib/stripe/services/quote_service.rb', line 2128

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.



2130
2131
2132
# File 'lib/stripe/services/quote_service.rb', line 2130

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.



2132
2133
2134
# File 'lib/stripe/services/quote_service.rb', line 2132

def 
  @customer_account
end

#default_tax_ratesObject

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



2134
2135
2136
# File 'lib/stripe/services/quote_service.rb', line 2134

def default_tax_rates
  @default_tax_rates
end

#descriptionObject

A description that will be displayed on the quote PDF.



2136
2137
2138
# File 'lib/stripe/services/quote_service.rb', line 2136

def description
  @description
end

#discountsObject

The discounts applied to the quote.



2138
2139
2140
# File 'lib/stripe/services/quote_service.rb', line 2138

def discounts
  @discounts
end

#expandObject

Specifies which fields in the response should be expanded.



2140
2141
2142
# File 'lib/stripe/services/quote_service.rb', line 2140

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.



2142
2143
2144
# File 'lib/stripe/services/quote_service.rb', line 2142

def expires_at
  @expires_at
end

A footer that will be displayed on the quote PDF.



2144
2145
2146
# File 'lib/stripe/services/quote_service.rb', line 2144

def footer
  @footer
end

#headerObject

A header that will be displayed on the quote PDF.



2146
2147
2148
# File 'lib/stripe/services/quote_service.rb', line 2146

def header
  @header
end

#invoice_settingsObject

All invoices will be billed using the specified settings.



2148
2149
2150
# File 'lib/stripe/services/quote_service.rb', line 2148

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.



2150
2151
2152
# File 'lib/stripe/services/quote_service.rb', line 2150

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.



2152
2153
2154
# File 'lib/stripe/services/quote_service.rb', line 2152

def lines
  @lines
end

#metadataObject

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



2154
2155
2156
# File 'lib/stripe/services/quote_service.rb', line 2154

def 
  @metadata
end

#on_behalf_ofObject

The account on behalf of which to charge.



2156
2157
2158
# File 'lib/stripe/services/quote_service.rb', line 2156

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.



2158
2159
2160
# File 'lib/stripe/services/quote_service.rb', line 2158

def subscription_data
  @subscription_data
end

#subscription_data_overridesObject

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



2160
2161
2162
# File 'lib/stripe/services/quote_service.rb', line 2160

def subscription_data_overrides
  @subscription_data_overrides
end

#transfer_dataObject

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



2162
2163
2164
# File 'lib/stripe/services/quote_service.rb', line 2162

def transfer_data
  @transfer_data
end