Class: Stripe::Invoice::CreateParams
- Inherits:
-
RequestParams
- Object
- RequestParams
- Stripe::Invoice::CreateParams
- Defined in:
- lib/stripe/resources/invoice.rb
Defined Under Namespace
Classes: AmountsDue, AutomaticTax, CustomField, Discount, FromInvoice, Issuer, PaymentSettings, Rendering, ShippingCost, ShippingDetails, TransferData
Instance Attribute Summary collapse
-
#account_tax_ids ⇒ Object
The account tax IDs associated with the invoice.
-
#amounts_due ⇒ Object
List of expected payments and corresponding due dates.
-
#application_fee_amount ⇒ Object
A fee in cents (or local equivalent) that will be applied to the invoice and transferred to the application owner’s Stripe account.
-
#auto_advance ⇒ Object
Controls whether Stripe performs [automatic collection](stripe.com/docs/invoicing/integration/automatic-advancement-collection) of the invoice.
-
#automatic_tax ⇒ Object
Settings for automatic tax lookup for this invoice.
-
#automatically_finalizes_at ⇒ Object
The time when this invoice should be scheduled to finalize (up to 5 years in the future).
-
#collection_method ⇒ Object
Either ‘charge_automatically`, or `send_invoice`.
-
#currency ⇒ Object
The currency to create this invoice in.
-
#custom_fields ⇒ Object
A list of up to 4 custom fields to be displayed on the invoice.
-
#customer ⇒ Object
The ID of the customer who will be billed.
-
#customer_account ⇒ Object
The ID of the account who will be billed.
-
#days_until_due ⇒ Object
The number of days from when the invoice is created until it is due.
-
#default_margins ⇒ Object
The ids of the margins to apply to the invoice.
-
#default_payment_method ⇒ Object
ID of the default payment method for the invoice.
-
#default_source ⇒ Object
ID of the default payment source for the invoice.
-
#default_tax_rates ⇒ Object
The tax rates that will apply to any line item that does not have ‘tax_rates` set.
-
#description ⇒ Object
An arbitrary string attached to the object.
-
#discounts ⇒ Object
The coupons and promotion codes to redeem into discounts for the invoice.
-
#due_date ⇒ Object
The date on which payment for this invoice is due.
-
#effective_at ⇒ Object
The date when this invoice is in effect.
-
#expand ⇒ Object
Specifies which fields in the response should be expanded.
-
#footer ⇒ Object
Footer to be displayed on the invoice.
-
#from_invoice ⇒ Object
Revise an existing invoice.
-
#issuer ⇒ Object
The connected account that issues the invoice.
-
#metadata ⇒ Object
Set of [key-value pairs](stripe.com/docs/api/metadata) that you can attach to an object.
-
#number ⇒ Object
Set the number for this invoice.
-
#on_behalf_of ⇒ Object
The account (if any) for which the funds of the invoice payment are intended.
-
#payment_settings ⇒ Object
Configuration settings for the PaymentIntent that is generated when the invoice is finalized.
-
#pending_invoice_items_behavior ⇒ Object
How to handle pending invoice items on invoice creation.
-
#rendering ⇒ Object
The rendering-related settings that control how the invoice is displayed on customer-facing surfaces such as PDF and Hosted Invoice Page.
-
#shipping_cost ⇒ Object
Settings for the cost of shipping for this invoice.
-
#shipping_details ⇒ Object
Shipping details for the invoice.
-
#statement_descriptor ⇒ Object
Extra information about a charge for the customer’s credit card statement.
-
#subscription ⇒ Object
The ID of the subscription to invoice, if any.
-
#transfer_data ⇒ Object
If specified, the funds from the invoice will be transferred to the destination and the ID of the resulting transfer will be found on the invoice’s charge.
Instance Method Summary collapse
Methods inherited from RequestParams
Constructor Details
#initialize(account_tax_ids: nil, amounts_due: nil, application_fee_amount: nil, auto_advance: nil, automatic_tax: nil, automatically_finalizes_at: nil, collection_method: nil, currency: nil, custom_fields: nil, customer: nil, customer_account: nil, days_until_due: nil, default_margins: nil, default_payment_method: nil, default_source: nil, default_tax_rates: nil, description: nil, discounts: nil, due_date: nil, effective_at: nil, expand: nil, footer: nil, from_invoice: nil, issuer: nil, metadata: nil, number: nil, on_behalf_of: nil, payment_settings: nil, pending_invoice_items_behavior: nil, rendering: nil, shipping_cost: nil, shipping_details: nil, statement_descriptor: nil, subscription: nil, transfer_data: nil) ⇒ CreateParams
Returns a new instance of CreateParams.
2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 |
# File 'lib/stripe/resources/invoice.rb', line 2270 def initialize( account_tax_ids: nil, amounts_due: nil, application_fee_amount: nil, auto_advance: nil, automatic_tax: nil, automatically_finalizes_at: nil, collection_method: nil, currency: nil, custom_fields: nil, customer: nil, customer_account: nil, days_until_due: nil, default_margins: nil, default_payment_method: nil, default_source: nil, default_tax_rates: nil, description: nil, discounts: nil, due_date: nil, effective_at: nil, expand: nil, footer: nil, from_invoice: nil, issuer: nil, metadata: nil, number: nil, on_behalf_of: nil, payment_settings: nil, pending_invoice_items_behavior: nil, rendering: nil, shipping_cost: nil, shipping_details: nil, statement_descriptor: nil, subscription: nil, transfer_data: nil ) @account_tax_ids = account_tax_ids @amounts_due = amounts_due @application_fee_amount = application_fee_amount @auto_advance = auto_advance @automatic_tax = automatic_tax @automatically_finalizes_at = automatically_finalizes_at @collection_method = collection_method @currency = currency @custom_fields = custom_fields @customer = customer @customer_account = customer_account @days_until_due = days_until_due @default_margins = default_margins @default_payment_method = default_payment_method @default_source = default_source @default_tax_rates = default_tax_rates @description = description @discounts = discounts @due_date = due_date @effective_at = effective_at @expand = @footer = @from_invoice = from_invoice @issuer = issuer @metadata = @number = number @on_behalf_of = on_behalf_of @payment_settings = payment_settings @pending_invoice_items_behavior = pending_invoice_items_behavior @rendering = rendering @shipping_cost = shipping_cost @shipping_details = shipping_details @statement_descriptor = statement_descriptor @subscription = subscription @transfer_data = transfer_data end |
Instance Attribute Details
#account_tax_ids ⇒ Object
The account tax IDs associated with the invoice. Only editable when the invoice is a draft.
2200 2201 2202 |
# File 'lib/stripe/resources/invoice.rb', line 2200 def account_tax_ids @account_tax_ids end |
#amounts_due ⇒ Object
List of expected payments and corresponding due dates. Valid only for invoices where ‘collection_method=send_invoice`.
2202 2203 2204 |
# File 'lib/stripe/resources/invoice.rb', line 2202 def amounts_due @amounts_due end |
#application_fee_amount ⇒ Object
A fee in cents (or local equivalent) that will be applied to the invoice and transferred to the application owner’s Stripe account. The request must be made with an OAuth key or the Stripe-Account header in order to take an application fee. For more information, see the application fees [documentation](stripe.com/docs/billing/invoices/connect#collecting-fees).
2204 2205 2206 |
# File 'lib/stripe/resources/invoice.rb', line 2204 def application_fee_amount @application_fee_amount end |
#auto_advance ⇒ Object
Controls whether Stripe performs [automatic collection](stripe.com/docs/invoicing/integration/automatic-advancement-collection) of the invoice. If ‘false`, the invoice’s state doesn’t automatically advance without an explicit action. Defaults to false.
2206 2207 2208 |
# File 'lib/stripe/resources/invoice.rb', line 2206 def auto_advance @auto_advance end |
#automatic_tax ⇒ Object
Settings for automatic tax lookup for this invoice.
2208 2209 2210 |
# File 'lib/stripe/resources/invoice.rb', line 2208 def automatic_tax @automatic_tax end |
#automatically_finalizes_at ⇒ Object
The time when this invoice should be scheduled to finalize (up to 5 years in the future). The invoice is finalized at this time if it’s still in draft state.
2210 2211 2212 |
# File 'lib/stripe/resources/invoice.rb', line 2210 def automatically_finalizes_at @automatically_finalizes_at end |
#collection_method ⇒ Object
Either ‘charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay this invoice using the default source attached to the customer. When sending an invoice, Stripe will email this invoice to the customer with payment instructions. Defaults to `charge_automatically`.
2212 2213 2214 |
# File 'lib/stripe/resources/invoice.rb', line 2212 def collection_method @collection_method end |
#currency ⇒ Object
The currency to create this invoice in. Defaults to that of ‘customer` if not specified.
2214 2215 2216 |
# File 'lib/stripe/resources/invoice.rb', line 2214 def currency @currency end |
#custom_fields ⇒ Object
A list of up to 4 custom fields to be displayed on the invoice.
2216 2217 2218 |
# File 'lib/stripe/resources/invoice.rb', line 2216 def custom_fields @custom_fields end |
#customer ⇒ Object
The ID of the customer who will be billed.
2218 2219 2220 |
# File 'lib/stripe/resources/invoice.rb', line 2218 def customer @customer end |
#customer_account ⇒ Object
The ID of the account who will be billed.
2220 2221 2222 |
# File 'lib/stripe/resources/invoice.rb', line 2220 def customer_account @customer_account end |
#days_until_due ⇒ Object
The number of days from when the invoice is created until it is due. Valid only for invoices where ‘collection_method=send_invoice`.
2222 2223 2224 |
# File 'lib/stripe/resources/invoice.rb', line 2222 def days_until_due @days_until_due end |
#default_margins ⇒ Object
The ids of the margins to apply to the invoice. Can be overridden by line item ‘margins`.
2224 2225 2226 |
# File 'lib/stripe/resources/invoice.rb', line 2224 def default_margins @default_margins end |
#default_payment_method ⇒ Object
ID of the default payment method for the invoice. It must belong to the customer associated with the invoice. If not set, defaults to the subscription’s default payment method, if any, or to the default payment method in the customer’s invoice settings.
2226 2227 2228 |
# File 'lib/stripe/resources/invoice.rb', line 2226 def default_payment_method @default_payment_method end |
#default_source ⇒ Object
ID of the default payment source for the invoice. It must belong to the customer associated with the invoice and be in a chargeable state. If not set, defaults to the subscription’s default source, if any, or to the customer’s default source.
2228 2229 2230 |
# File 'lib/stripe/resources/invoice.rb', line 2228 def default_source @default_source end |
#default_tax_rates ⇒ Object
The tax rates that will apply to any line item that does not have ‘tax_rates` set.
2230 2231 2232 |
# File 'lib/stripe/resources/invoice.rb', line 2230 def default_tax_rates @default_tax_rates end |
#description ⇒ Object
An arbitrary string attached to the object. Often useful for displaying to users. Referenced as ‘memo’ in the Dashboard.
2232 2233 2234 |
# File 'lib/stripe/resources/invoice.rb', line 2232 def description @description end |
#discounts ⇒ Object
The coupons and promotion codes to redeem into discounts for the invoice. If not specified, inherits the discount from the invoice’s customer. Pass an empty string to avoid inheriting any discounts.
2234 2235 2236 |
# File 'lib/stripe/resources/invoice.rb', line 2234 def discounts @discounts end |
#due_date ⇒ Object
The date on which payment for this invoice is due. Valid only for invoices where ‘collection_method=send_invoice`.
2236 2237 2238 |
# File 'lib/stripe/resources/invoice.rb', line 2236 def due_date @due_date end |
#effective_at ⇒ Object
The date when this invoice is in effect. Same as ‘finalized_at` unless overwritten. When defined, this value replaces the system-generated ’Date of issue’ printed on the invoice PDF and receipt.
2238 2239 2240 |
# File 'lib/stripe/resources/invoice.rb', line 2238 def effective_at @effective_at end |
#expand ⇒ Object
Specifies which fields in the response should be expanded.
2240 2241 2242 |
# File 'lib/stripe/resources/invoice.rb', line 2240 def @expand end |
#footer ⇒ Object
Footer to be displayed on the invoice.
2242 2243 2244 |
# File 'lib/stripe/resources/invoice.rb', line 2242 def @footer end |
#from_invoice ⇒ Object
Revise an existing invoice. The new invoice will be created in ‘status=draft`. See the [revision documentation](stripe.com/docs/invoicing/invoice-revisions) for more details.
2244 2245 2246 |
# File 'lib/stripe/resources/invoice.rb', line 2244 def from_invoice @from_invoice end |
#issuer ⇒ Object
The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.
2246 2247 2248 |
# File 'lib/stripe/resources/invoice.rb', line 2246 def issuer @issuer end |
#metadata ⇒ Object
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`.
2248 2249 2250 |
# File 'lib/stripe/resources/invoice.rb', line 2248 def @metadata end |
#number ⇒ Object
Set the number for this invoice. If no number is present then a number will be assigned automatically when the invoice is finalized. In many markets, regulations require invoices to be unique, sequential and / or gapless. You are responsible for ensuring this is true across all your different invoicing systems in the event that you edit the invoice number using our API. If you use only Stripe for your invoices and do not change invoice numbers, Stripe handles this aspect of compliance for you automatically.
2250 2251 2252 |
# File 'lib/stripe/resources/invoice.rb', line 2250 def number @number end |
#on_behalf_of ⇒ Object
The account (if any) for which the funds of the invoice payment are intended. If set, the invoice will be presented with the branding and support information of the specified account. See the [Invoices with Connect](stripe.com/docs/billing/invoices/connect) documentation for details.
2252 2253 2254 |
# File 'lib/stripe/resources/invoice.rb', line 2252 def on_behalf_of @on_behalf_of end |
#payment_settings ⇒ Object
Configuration settings for the PaymentIntent that is generated when the invoice is finalized.
2254 2255 2256 |
# File 'lib/stripe/resources/invoice.rb', line 2254 def payment_settings @payment_settings end |
#pending_invoice_items_behavior ⇒ Object
How to handle pending invoice items on invoice creation. Defaults to ‘exclude` if the parameter is omitted.
2256 2257 2258 |
# File 'lib/stripe/resources/invoice.rb', line 2256 def pending_invoice_items_behavior @pending_invoice_items_behavior end |
#rendering ⇒ Object
The rendering-related settings that control how the invoice is displayed on customer-facing surfaces such as PDF and Hosted Invoice Page.
2258 2259 2260 |
# File 'lib/stripe/resources/invoice.rb', line 2258 def rendering @rendering end |
#shipping_cost ⇒ Object
Settings for the cost of shipping for this invoice.
2260 2261 2262 |
# File 'lib/stripe/resources/invoice.rb', line 2260 def shipping_cost @shipping_cost end |
#shipping_details ⇒ Object
Shipping details for the invoice. The Invoice PDF will use the ‘shipping_details` value if it is set, otherwise the PDF will render the shipping address from the customer.
2262 2263 2264 |
# File 'lib/stripe/resources/invoice.rb', line 2262 def shipping_details @shipping_details end |
#statement_descriptor ⇒ Object
Extra information about a charge for the customer’s credit card statement. It must contain at least one letter. If not specified and this invoice is part of a subscription, the default ‘statement_descriptor` will be set to the first subscription item’s product’s ‘statement_descriptor`.
2264 2265 2266 |
# File 'lib/stripe/resources/invoice.rb', line 2264 def statement_descriptor @statement_descriptor end |
#subscription ⇒ Object
The ID of the subscription to invoice, if any. If set, the created invoice will only include pending invoice items for that subscription. The subscription’s billing cycle and regular subscription events won’t be affected.
2266 2267 2268 |
# File 'lib/stripe/resources/invoice.rb', line 2266 def subscription @subscription end |
#transfer_data ⇒ Object
If specified, the funds from the invoice will be transferred to the destination and the ID of the resulting transfer will be found on the invoice’s charge.
2268 2269 2270 |
# File 'lib/stripe/resources/invoice.rb', line 2268 def transfer_data @transfer_data end |