Skip to content

Commit

Permalink
Update generated code for v833
Browse files Browse the repository at this point in the history
  • Loading branch information
stripe-openapi[bot] committed Feb 16, 2024
1 parent 25d02bc commit 6a06fa1
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 1 deletion.
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v832
v833
2 changes: 2 additions & 0 deletions lib/InvoiceLineItem.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,6 @@
class InvoiceLineItem extends ApiResource
{
const OBJECT_NAME = 'line_item';

use ApiOperations\Update;
}
22 changes: 22 additions & 0 deletions lib/Service/InvoiceService.php
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,28 @@ public function update($id, $params = null, $opts = null)
return $this->request('post', $this->buildPath('/v1/invoices/%s', $id), $params, $opts);
}

/**
* Updates an invoice’s line item. Some fields, such as <code>tax_amounts</code>,
* only live on the invoice line item, so they can only be updated through this
* endpoint. Other fields, such as <code>amount</code>, live on both the invoice
* item and the invoice line item, so updates on this endpoint will propagate to
* the invoice item as well. Updating an invoice’s line item is only possible
* before the invoice is finalized.
*
* @param string $parentId
* @param string $id
* @param null|array $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\InvoiceLineItem
*/
public function updateLine($parentId, $id, $params = null, $opts = null)
{
return $this->request('post', $this->buildPath('/v1/invoices/%s/lines/%s', $parentId, $id), $params, $opts);
}

/**
* Mark a finalized invoice as void. This cannot be undone. Voiding an invoice is
* similar to <a href="#delete_invoice">deletion</a>, however it only applies to
Expand Down

0 comments on commit 6a06fa1

Please sign in to comment.