Invoiceitem class final
InvoiceItem
Invoice Items represent the component lines of an [invoice](https://stripe.com/docs/api/invoices). An invoice item is added to an invoice by creating or updating it with an `invoice` field, at which point it will be included as [an invoice line item](https://stripe.com/docs/api/invoices/line\_item) within [invoice.lines](https://stripe.com/docs/api/invoices/object#invoice\_object-lines). Invoice Items can be created before you are ready to actually send the invoice. This can be particularly useful when combined with a [subscription](https://stripe.com/docs/api/subscriptions). Sometimes you want to add a charge or credit to a customer, but actually charge or credit the customer’s card only at the end of a regular billing cycle. This is useful for combining several charges (to minimize per-transaction fees), or for having Stripe tabulate your usage-based billing totals. Related guides: [Integrate with the Invoicing API](https://stripe.com/docs/invoicing/integration), [Subscription Invoices](https://stripe.com/docs/billing/invoices/subscription#adding-upcoming-invoice-items).
- Implemented types
Constructors
-
Invoiceitem({required int amount, required String currency, required BankAccountCustomerOrId customer, required DateTime date, String? description, required bool discountable, List<
DiscountOrId> ? discounts, required String id, InvoiceOrId? invoice, required bool livemode, Map<String, String> ? metadata, required InvoiceLineItemPeriod period, InvoiceitemPlan? plan, InvoiceitemPrice? price, required bool proration, required int quantity, SubscriptionOrId? subscription, String? subscriptionItem, List<TaxRate> ? taxRates, TestHelpersTestClockOrId? testClock, int? unitAmount, String? unitAmountDecimal}) -
InvoiceItem
const
- Invoiceitem.fromJson(Object? json)
-
factory
Properties
- amount → int
-
final
- currency → String
-
final
- customer → BankAccountCustomerOrId
-
final
- date → DateTime
-
final
- description → String?
-
final
- discountable → bool
-
final
-
discounts
→ List<
DiscountOrId> ? -
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- id → String
-
The ID of the Invoiceitem.
final
- invoice → InvoiceOrId?
-
final
- livemode → bool
-
final
-
metadata
→ Map<
String, String> ? -
final
- object → String
-
The resource's type.
final
- period → InvoiceLineItemPeriod
-
final
- plan → InvoiceitemPlan?
-
If the invoice item is a proration, the plan of the subscription that the proration was computed for.
final
- price → InvoiceitemPrice?
-
The price of the invoice item.
final
- proration → bool
-
final
- quantity → int
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- subscription → SubscriptionOrId?
-
final
- subscriptionItem → String?
-
final
-
taxRates
→ List<
TaxRate> ? -
final
- testClock → TestHelpersTestClockOrId?
-
final
- unitAmount → int?
-
final
- unitAmountDecimal → String?
-
final
Methods
-
encodeWith<
V> (Encoder< V> encoder) → V -
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, Object?> -
override
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
encode<
V> (Invoiceitem instance, Encoder< V> encoder) → V -
override