InvoiceItem.php 3.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. <?php
  2. // File generated from our OpenAPI spec
  3. namespace Stripe;
  4. /**
  5. * Sometimes you want to add a charge or credit to a customer, but actually charge
  6. * or credit the customer's card only at the end of a regular billing cycle. This
  7. * is useful for combining several charges (to minimize per-transaction fees), or
  8. * for having Stripe tabulate your usage-based billing totals.
  9. *
  10. * Related guide: <a
  11. * href="https://stripe.com/docs/billing/invoices/subscription#adding-upcoming-invoice-items">Subscription
  12. * Invoices</a>.
  13. *
  14. * @property string $id Unique identifier for the object.
  15. * @property string $object String representing the object's type. Objects of the same type share the same value.
  16. * @property int $amount Amount (in the <code>currency</code> specified) of the invoice item. This should always be equal to <code>unit_amount * quantity</code>.
  17. * @property string $currency Three-letter <a href="https://www.iso.org/iso-4217-currency-codes.html">ISO currency code</a>, in lowercase. Must be a <a href="https://stripe.com/docs/currencies">supported currency</a>.
  18. * @property string|\Stripe\Customer $customer The ID of the customer who will be billed when this invoice item is billed.
  19. * @property int $date Time at which the object was created. Measured in seconds since the Unix epoch.
  20. * @property null|string $description An arbitrary string attached to the object. Often useful for displaying to users.
  21. * @property bool $discountable If true, discounts will apply to this invoice item. Always false for prorations.
  22. * @property null|(string|\Stripe\Discount)[] $discounts The discounts which apply to the invoice item. Item discounts are applied before invoice discounts. Use <code>expand[]=discounts</code> to expand each discount.
  23. * @property null|string|\Stripe\Invoice $invoice The ID of the invoice this invoice item belongs to.
  24. * @property bool $livemode Has the value <code>true</code> if the object exists in live mode or the value <code>false</code> if the object exists in test mode.
  25. * @property null|\Stripe\StripeObject $metadata Set of <a href="https://stripe.com/docs/api/metadata">key-value pairs</a> that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
  26. * @property \Stripe\StripeObject $period
  27. * @property null|\Stripe\Plan $plan If the invoice item is a proration, the plan of the subscription that the proration was computed for.
  28. * @property null|\Stripe\Price $price The price of the invoice item.
  29. * @property bool $proration Whether the invoice item was created automatically as a proration adjustment when the customer switched plans.
  30. * @property int $quantity Quantity of units for the invoice item. If the invoice item is a proration, the quantity of the subscription that the proration was computed for.
  31. * @property null|string|\Stripe\Subscription $subscription The subscription that this invoice item has been created for, if any.
  32. * @property string $subscription_item The subscription item that this invoice item has been created for, if any.
  33. * @property null|\Stripe\TaxRate[] $tax_rates The tax rates which apply to the invoice item. When set, the <code>default_tax_rates</code> on the invoice do not apply to this invoice item.
  34. * @property null|int $unit_amount Unit amount (in the <code>currency</code> specified) of the invoice item.
  35. * @property null|string $unit_amount_decimal Same as <code>unit_amount</code>, but contains a decimal value with at most 12 decimal places.
  36. */
  37. class InvoiceItem extends ApiResource
  38. {
  39. const OBJECT_NAME = 'invoiceitem';
  40. use ApiOperations\All;
  41. use ApiOperations\Create;
  42. use ApiOperations\Delete;
  43. use ApiOperations\Retrieve;
  44. use ApiOperations\Update;
  45. }