Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update generated code #1718

Merged
merged 7 commits into from
Jul 5, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update generated code for v1111
stripe-openapi[bot] committed Jul 2, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
commit bbb6d061543e3aba3b060cc780703270650e3792
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
@@ -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
@@ -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
@@ -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
51 changes: 51 additions & 0 deletions lib/Service/InvoiceService.php
Original file line number Diff line number Diff line change
@@ -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
@@ -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.
*
@@ -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