Skip to content

Commit

Permalink
Update generated code for v1111
Browse files Browse the repository at this point in the history
  • Loading branch information
stripe-openapi[bot] committed Jul 2, 2024
1 parent 5631c64 commit bbb6d06
Show file tree
Hide file tree
Showing 3 changed files with 103 additions and 1 deletion.
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v1105
v1111
51 changes: 51 additions & 0 deletions lib/Invoice.php
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,23 @@ public static function update($id, $params = null, $opts = null)
const BILLING_CHARGE_AUTOMATICALLY = 'charge_automatically';
const BILLING_SEND_INVOICE = 'send_invoice';

/**
* @param null|array $params
* @param null|array|string $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Invoice the added invoice
*/
public function addLines($params = null, $opts = null)
{
$url = $this->instanceUrl() . '/add_lines';
list($response, $opts) = $this->_request('post', $url, $params, $opts);
$this->refreshFrom($response, $opts);

return $this;
}

/**
* @param null|array $params
* @param null|array|string $opts
Expand Down Expand Up @@ -340,6 +357,23 @@ public function pay($params = null, $opts = null)
return $this;
}

/**
* @param null|array $params
* @param null|array|string $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Invoice the removed invoice
*/
public function removeLines($params = null, $opts = null)
{
$url = $this->instanceUrl() . '/remove_lines';
list($response, $opts) = $this->_request('post', $url, $params, $opts);
$this->refreshFrom($response, $opts);

return $this;
}

/**
* @param null|array $params
* @param null|array|string $opts
Expand Down Expand Up @@ -393,6 +427,23 @@ public static function upcomingLines($params = null, $opts = null)
return $obj;
}

/**
* @param null|array $params
* @param null|array|string $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Invoice the updated invoice
*/
public function updateLines($params = null, $opts = null)
{
$url = $this->instanceUrl() . '/update_lines';
list($response, $opts) = $this->_request('post', $url, $params, $opts);
$this->refreshFrom($response, $opts);

return $this;
}

/**
* @param null|array $params
* @param null|array|string $opts
Expand Down
51 changes: 51 additions & 0 deletions lib/Service/InvoiceService.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,23 @@
*/
class InvoiceService extends \Stripe\Service\AbstractService
{
/**
* Adds multiple line items to an invoice. This is only possible when an invoice is
* still a draft.
*
* @param string $id
* @param null|array $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Invoice
*/
public function addLines($id, $params = null, $opts = null)
{
return $this->request('post', $this->buildPath('/v1/invoices/%s/add_lines', $id), $params, $opts);
}

/**
* You can list all invoices, or list the invoices for a specific customer. The
* invoices are returned sorted by creation date, with the most recently created
Expand Down Expand Up @@ -177,6 +194,23 @@ public function pay($id, $params = null, $opts = null)
return $this->request('post', $this->buildPath('/v1/invoices/%s/pay', $id), $params, $opts);
}

/**
* Removes multiple line items from an invoice. This is only possible when an
* invoice is still a draft.
*
* @param string $id
* @param null|array $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Invoice
*/
public function removeLines($id, $params = null, $opts = null)
{
return $this->request('post', $this->buildPath('/v1/invoices/%s/remove_lines', $id), $params, $opts);
}

/**
* Retrieves the invoice with the given ID.
*
Expand Down Expand Up @@ -338,6 +372,23 @@ public function updateLine($parentId, $id, $params = null, $opts = null)
return $this->request('post', $this->buildPath('/v1/invoices/%s/lines/%s', $parentId, $id), $params, $opts);
}

/**
* Updates multiple line items on an invoice. This is only possible when an invoice
* is still a draft.
*
* @param string $id
* @param null|array $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Invoice
*/
public function updateLines($id, $params = null, $opts = null)
{
return $this->request('post', $this->buildPath('/v1/invoices/%s/update_lines', $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 bbb6d06

Please sign in to comment.