name file | size | edit | permission | action |
---|---|---|---|---|
.env | 2733 KB | December 22 2024 06:20:07 | 0644 | |
404.html | 58370 KB | November 20 2024 15:32:22 | 0644 | |
502.html | 58368 KB | November 20 2024 15:32:22 | 0644 | |
Modules | - | December 11 2024 21:02:56 | 0755 | |
README.md | 4158 KB | February 14 2023 12:31:56 | 0644 | |
app | - | December 11 2024 17:57:48 | 0755 | |
artisan | 1686 KB | February 14 2023 12:31:56 | 0644 | |
bootstrap | - | December 11 2024 20:23:36 | 0755 | |
composer.json | 3761 KB | December 11 2024 22:15:00 | 0644 | |
composer.lock | 512048 KB | December 11 2024 22:13:28 | 0644 | |
config | - | June 15 2025 02:09:36 | 0755 | |
database | - | December 05 2024 20:18:12 | 0755 | |
dfsdf dfds fd fds findex.html | 1420 KB | November 20 2024 15:32:24 | 0644 | |
error_log | 19235408 KB | July 18 2025 20:14:36 | 0644 | |
firoz | - | December 23 2024 13:24:46 | 0755 | |
index.php | 1667 KB | December 14 2024 05:20:36 | 0644 | |
lang | - | December 11 2024 21:02:48 | 0755 | |
modules_statuses.json | 472 KB | November 20 2024 15:32:24 | 0644 | |
mpos | - | March 31 2025 02:36:31 | 0755 | |
package.json | 226 KB | February 14 2023 12:31:56 | 0644 | |
phpunit.xml | 1146 KB | February 14 2023 12:31:56 | 0644 | |
public | - | March 31 2025 02:36:31 | 0755 | |
resources | - | December 11 2024 21:10:22 | 0755 | |
routes | - | June 15 2025 02:09:31 | 0755 | |
storage | - | December 11 2024 21:12:44 | 0755 | |
tests | - | December 05 2024 20:18:12 | 0755 | |
vendor | - | December 11 2024 22:13:30 | 0755 | |
vite.config.js | 263 KB | February 14 2023 12:31:56 | 0644 |
invoice
field, at which point it will be included as
* an invoice line item within
* invoice.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. 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, Subscription Invoices.
*
* @property string $id Unique identifier for the object.
* @property string $object String representing the object's type. Objects of the same type share the same value.
* @property int $amount Amount (in the currency
specified) of the invoice item. This should always be equal to unit_amount * quantity
.
* @property string $currency Three-letter ISO currency code, in lowercase. Must be a supported currency.
* @property string|\Stripe\Customer $customer The ID of the customer who will be billed when this invoice item is billed.
* @property int $date Time at which the object was created. Measured in seconds since the Unix epoch.
* @property null|string $description An arbitrary string attached to the object. Often useful for displaying to users.
* @property bool $discountable If true, discounts will apply to this invoice item. Always false for prorations.
* @property null|(string|\Stripe\Discount)[] $discounts The discounts which apply to the invoice item. Item discounts are applied before invoice discounts. Use expand[]=discounts
to expand each discount.
* @property null|string|\Stripe\Invoice $invoice The ID of the invoice this invoice item belongs to.
* @property bool $livemode Has the value true
if the object exists in live mode or the value false
if the object exists in test mode.
* @property null|\Stripe\StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
* @property \Stripe\StripeObject $period
* @property null|\Stripe\Plan $plan If the invoice item is a proration, the plan of the subscription that the proration was computed for.
* @property null|\Stripe\Price $price The price of the invoice item.
* @property bool $proration Whether the invoice item was created automatically as a proration adjustment when the customer switched plans.
* @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.
* @property null|string|\Stripe\Subscription $subscription The subscription that this invoice item has been created for, if any.
* @property null|string $subscription_item The subscription item that this invoice item has been created for, if any.
* @property null|\Stripe\TaxRate[] $tax_rates The tax rates which apply to the invoice item. When set, the default_tax_rates
on the invoice do not apply to this invoice item.
* @property null|string|\Stripe\TestHelpers\TestClock $test_clock ID of the test clock this invoice item belongs to.
* @property null|int $unit_amount Unit amount (in the currency
specified) of the invoice item.
* @property null|string $unit_amount_decimal Same as unit_amount
, but contains a decimal value with at most 12 decimal places.
*/
class InvoiceItem extends ApiResource
{
const OBJECT_NAME = 'invoiceitem';
use ApiOperations\Update;
/**
* Creates an item to be added to a draft invoice (up to 250 items per invoice). If
* no invoice is specified, the item will be on the next invoice created for the
* customer specified.
*
* @param null|array $params
* @param null|array|string $options
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\InvoiceItem the created resource
*/
public static function create($params = null, $options = null)
{
self::_validateParams($params);
$url = static::classUrl();
list($response, $opts) = static::_staticRequest('post', $url, $params, $options);
$obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts);
$obj->setLastResponse($response);
return $obj;
}
/**
* Deletes an invoice item, removing it from an invoice. Deleting invoice items is
* only possible when they’re not attached to invoices, or if it’s attached to a
* draft invoice.
*
* @param null|array $params
* @param null|array|string $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\InvoiceItem the deleted resource
*/
public function delete($params = null, $opts = null)
{
self::_validateParams($params);
$url = $this->instanceUrl();
list($response, $opts) = $this->_request('delete', $url, $params, $opts);
$this->refreshFrom($response, $opts);
return $this;
}
/**
* Returns a list of your invoice items. Invoice items are returned sorted by
* creation date, with the most recently created invoice items appearing first.
*
* @param null|array $params
* @param null|array|string $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Collection<\Stripe\InvoiceItem> of ApiResources
*/
public static function all($params = null, $opts = null)
{
$url = static::classUrl();
return static::_requestPage($url, \Stripe\Collection::class, $params, $opts);
}
/**
* Retrieves the invoice item with the given ID.
*
* @param array|string $id the ID of the API resource to retrieve, or an options array containing an `id` key
* @param null|array|string $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\InvoiceItem
*/
public static function retrieve($id, $opts = null)
{
$opts = \Stripe\Util\RequestOptions::parse($opts);
$instance = new static($id, $opts);
$instance->refresh();
return $instance;
}
/**
* Updates the amount or description of an invoice item on an upcoming invoice.
* Updating an invoice item is only possible before the invoice it’s attached to is
* closed.
*
* @param string $id the ID of the resource to update
* @param null|array $params
* @param null|array|string $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\InvoiceItem the updated resource
*/
public static function update($id, $params = null, $opts = null)
{
self::_validateParams($params);
$url = static::resourceUrl($id);
list($response, $opts) = static::_staticRequest('post', $url, $params, $opts);
$obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts);
$obj->setLastResponse($response);
return $obj;
}
}