Class: Stripe::Invoice::CreatePreviewParams
- Inherits:
-
RequestParams
- Object
- RequestParams
- Stripe::Invoice::CreatePreviewParams
- Defined in:
- lib/stripe/resources/invoice.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.
-
#coupon ⇒ Object
The ID of the coupon to apply to this phase of the subscription schedule.
-
#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_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, coupon: nil, currency: nil, customer: 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) ⇒ CreatePreviewParams
constructor
A new instance of CreatePreviewParams.
Methods inherited from RequestParams
Constructor Details
#initialize(automatic_tax: nil, coupon: nil, currency: nil, customer: 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) ⇒ CreatePreviewParams
Returns a new instance of CreatePreviewParams.
9008 9009 9010 9011 9012 9013 9014 9015 9016 9017 9018 9019 9020 9021 9022 9023 9024 9025 9026 9027 9028 9029 9030 9031 9032 9033 9034 9035 9036 9037 9038 9039 9040 |
# File 'lib/stripe/resources/invoice.rb', line 9008 def initialize( automatic_tax: nil, coupon: nil, currency: nil, customer: 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 @coupon = coupon @currency = currency @customer = customer @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.
8964 8965 8966 |
# File 'lib/stripe/resources/invoice.rb', line 8964 def automatic_tax @automatic_tax end |
#coupon ⇒ Object
The ID of the coupon to apply to this phase of the subscription schedule. This field has been deprecated and will be removed in a future API version. Use ‘discounts` instead.
8967 8968 8969 |
# File 'lib/stripe/resources/invoice.rb', line 8967 def coupon @coupon end |
#currency ⇒ Object
The currency to preview this invoice in. Defaults to that of ‘customer` if not specified.
8970 8971 8972 |
# File 'lib/stripe/resources/invoice.rb', line 8970 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.
8973 8974 8975 |
# File 'lib/stripe/resources/invoice.rb', line 8973 def customer @customer 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.
8976 8977 8978 |
# File 'lib/stripe/resources/invoice.rb', line 8976 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.
8979 8980 8981 |
# File 'lib/stripe/resources/invoice.rb', line 8979 def discounts @discounts end |
#expand ⇒ Object
Specifies which fields in the response should be expanded.
8982 8983 8984 |
# File 'lib/stripe/resources/invoice.rb', line 8982 def @expand end |
#invoice_items ⇒ Object
List of invoice items to add or update in the upcoming invoice preview (up to 250).
8985 8986 8987 |
# File 'lib/stripe/resources/invoice.rb', line 8985 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.
8988 8989 8990 |
# File 'lib/stripe/resources/invoice.rb', line 8988 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.
8991 8992 8993 |
# File 'lib/stripe/resources/invoice.rb', line 8991 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.
8994 8995 8996 |
# File 'lib/stripe/resources/invoice.rb', line 8994 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.
8997 8998 8999 |
# File 'lib/stripe/resources/invoice.rb', line 8997 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.
9000 9001 9002 |
# File 'lib/stripe/resources/invoice.rb', line 9000 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.
9003 9004 9005 |
# File 'lib/stripe/resources/invoice.rb', line 9003 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.
9006 9007 9008 |
# File 'lib/stripe/resources/invoice.rb', line 9006 def subscription_details @subscription_details end |