Class: Stripe::InvoiceCreatePreviewParams
- Inherits:
-
RequestParams
- Object
- RequestParams
- Stripe::InvoiceCreatePreviewParams
- Defined in:
- lib/stripe/params/invoice_create_preview_params.rb
Defined Under Namespace
Classes: AutomaticTax, CustomerDetails, Discount, InvoiceItem, Issuer, ScheduleDetails, SubscriptionDetails
Instance Attribute Summary collapse
-
#automatic_tax ⇒ Object
Settings for automatic tax lookup for this invoice preview.
-
#billing_cadence ⇒ Object
The identifier of the billing cadence for which you’d like to retrieve the upcoming invoice.Cannot be provided when ‘subscription`, `schedule`, `subscription_details` or `schedule_details` are provided.
-
#currency ⇒ Object
The currency to preview this invoice in.
-
#customer ⇒ Object
The identifier of the customer whose upcoming invoice you’d like to retrieve.
-
#customer_account ⇒ Object
The identifier of the account whose upcoming invoice you’d like to retrieve.
-
#customer_details ⇒ Object
Details about the customer you want to invoice or overrides for an existing customer.
-
#discounts ⇒ Object
The coupons to redeem into discounts for the invoice preview.
-
#expand ⇒ Object
Specifies which fields in the response should be expanded.
-
#invoice_items ⇒ Object
List of invoice items to add or update in the upcoming invoice preview (up to 250).
-
#issuer ⇒ Object
The connected account that issues the invoice.
-
#on_behalf_of ⇒ Object
The account (if any) for which the funds of the invoice payment are intended.
-
#preview_mode ⇒ Object
Customizes the types of values to include when calculating the invoice.
-
#schedule ⇒ Object
The identifier of the schedule whose upcoming invoice you’d like to retrieve.
-
#schedule_details ⇒ Object
The schedule creation or modification params to apply as a preview.
-
#subscription ⇒ Object
The identifier of the subscription for which you’d like to retrieve the upcoming invoice.
-
#subscription_details ⇒ Object
The subscription creation or modification params to apply as a preview.
Instance Method Summary collapse
-
#initialize(automatic_tax: nil, billing_cadence: nil, currency: nil, customer: nil, customer_account: nil, customer_details: nil, discounts: nil, expand: nil, invoice_items: nil, issuer: nil, on_behalf_of: nil, preview_mode: nil, schedule: nil, schedule_details: nil, subscription: nil, subscription_details: nil) ⇒ InvoiceCreatePreviewParams
constructor
A new instance of InvoiceCreatePreviewParams.
Methods inherited from RequestParams
Constructor Details
#initialize(automatic_tax: nil, billing_cadence: nil, currency: nil, customer: nil, customer_account: nil, customer_details: nil, discounts: nil, expand: nil, invoice_items: nil, issuer: nil, on_behalf_of: nil, preview_mode: nil, schedule: nil, schedule_details: nil, subscription: nil, subscription_details: nil) ⇒ InvoiceCreatePreviewParams
Returns a new instance of InvoiceCreatePreviewParams.
1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 |
# File 'lib/stripe/params/invoice_create_preview_params.rb', line 1857 def initialize( automatic_tax: nil, billing_cadence: nil, currency: nil, customer: nil, customer_account: nil, customer_details: nil, discounts: nil, expand: nil, invoice_items: nil, issuer: nil, on_behalf_of: nil, preview_mode: nil, schedule: nil, schedule_details: nil, subscription: nil, subscription_details: nil ) @automatic_tax = automatic_tax @billing_cadence = billing_cadence @currency = currency @customer = customer @customer_account = customer_account @customer_details = customer_details @discounts = discounts @expand = @invoice_items = invoice_items @issuer = issuer @on_behalf_of = on_behalf_of @preview_mode = preview_mode @schedule = schedule @schedule_details = schedule_details @subscription = subscription @subscription_details = subscription_details end |
Instance Attribute Details
#automatic_tax ⇒ Object
Settings for automatic tax lookup for this invoice preview.
1825 1826 1827 |
# File 'lib/stripe/params/invoice_create_preview_params.rb', line 1825 def automatic_tax @automatic_tax end |
#billing_cadence ⇒ Object
The identifier of the billing cadence for which you’d like to retrieve the upcoming invoice.Cannot be provided when ‘subscription`, `schedule`, `subscription_details` or `schedule_details` are provided.
1827 1828 1829 |
# File 'lib/stripe/params/invoice_create_preview_params.rb', line 1827 def billing_cadence @billing_cadence end |
#currency ⇒ Object
The currency to preview this invoice in. Defaults to that of ‘customer` if not specified.
1829 1830 1831 |
# File 'lib/stripe/params/invoice_create_preview_params.rb', line 1829 def currency @currency end |
#customer ⇒ Object
The identifier of the customer whose upcoming invoice you’d like to retrieve. If ‘automatic_tax` is enabled then one of `customer`, `customer_details`, `subscription`, or `schedule` must be set.
1831 1832 1833 |
# File 'lib/stripe/params/invoice_create_preview_params.rb', line 1831 def customer @customer end |
#customer_account ⇒ Object
The identifier of the account whose upcoming invoice you’d like to retrieve. If ‘automatic_tax` is enabled then one of `customer`, `customer_account`, `customer_details`, `subscription`, or `schedule` must be set.
1833 1834 1835 |
# File 'lib/stripe/params/invoice_create_preview_params.rb', line 1833 def customer_account @customer_account end |
#customer_details ⇒ Object
Details about the customer you want to invoice or overrides for an existing customer. If ‘automatic_tax` is enabled then one of `customer`, `customer_details`, `subscription`, or `schedule` must be set.
1835 1836 1837 |
# File 'lib/stripe/params/invoice_create_preview_params.rb', line 1835 def customer_details @customer_details end |
#discounts ⇒ Object
The coupons to redeem into discounts for the invoice preview. If not specified, inherits the discount from the subscription or customer. This works for both coupons directly applied to an invoice and coupons applied to a subscription. Pass an empty string to avoid inheriting any discounts.
1837 1838 1839 |
# File 'lib/stripe/params/invoice_create_preview_params.rb', line 1837 def discounts @discounts end |
#expand ⇒ Object
Specifies which fields in the response should be expanded.
1839 1840 1841 |
# File 'lib/stripe/params/invoice_create_preview_params.rb', line 1839 def @expand end |
#invoice_items ⇒ Object
List of invoice items to add or update in the upcoming invoice preview (up to 250).
1841 1842 1843 |
# File 'lib/stripe/params/invoice_create_preview_params.rb', line 1841 def invoice_items @invoice_items end |
#issuer ⇒ Object
The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.
1843 1844 1845 |
# File 'lib/stripe/params/invoice_create_preview_params.rb', line 1843 def issuer @issuer 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.
1845 1846 1847 |
# File 'lib/stripe/params/invoice_create_preview_params.rb', line 1845 def on_behalf_of @on_behalf_of end |
#preview_mode ⇒ Object
Customizes the types of values to include when calculating the invoice. Defaults to ‘next` if unspecified.
1847 1848 1849 |
# File 'lib/stripe/params/invoice_create_preview_params.rb', line 1847 def preview_mode @preview_mode end |
#schedule ⇒ Object
The identifier of the schedule whose upcoming invoice you’d like to retrieve. Cannot be used with subscription or subscription fields.
1849 1850 1851 |
# File 'lib/stripe/params/invoice_create_preview_params.rb', line 1849 def schedule @schedule end |
#schedule_details ⇒ Object
The schedule creation or modification params to apply as a preview. Cannot be used with ‘subscription` or `subscription_` prefixed fields.
1851 1852 1853 |
# File 'lib/stripe/params/invoice_create_preview_params.rb', line 1851 def schedule_details @schedule_details end |
#subscription ⇒ Object
The identifier of the subscription for which you’d like to retrieve the upcoming invoice. If not provided, but a ‘subscription_details.items` is provided, you will preview creating a subscription with those items. If neither `subscription` nor `subscription_details.items` is provided, you will retrieve the next upcoming invoice from among the customer’s subscriptions.
1853 1854 1855 |
# File 'lib/stripe/params/invoice_create_preview_params.rb', line 1853 def subscription @subscription end |
#subscription_details ⇒ Object
The subscription creation or modification params to apply as a preview. Cannot be used with ‘schedule` or `schedule_details` fields.
1855 1856 1857 |
# File 'lib/stripe/params/invoice_create_preview_params.rb', line 1855 def subscription_details @subscription_details end |