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 #1605

Merged
merged 4 commits into from
Nov 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v654
v662
15 changes: 15 additions & 0 deletions lib/Invoice.php
Original file line number Diff line number Diff line change
Expand Up @@ -310,4 +310,19 @@ public static function allLines($id, $params = null, $opts = null)
{
return self::_allNestedResources($id, static::PATH_LINES, $params, $opts);
}

/**
* @param string $id the ID of the invoice to which the invoice line item belongs
* @param string $lineId the ID of the invoice line item to update
* @param null|array $params
* @param null|array|string $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\InvoiceLineItem
*/
public static function updateLine($id, $lineId, $params = null, $opts = null)
{
return self::_updateNestedResource($id, static::PATH_LINES, $lineId, $params, $opts);
}
}
2 changes: 2 additions & 0 deletions lib/InvoiceLineItem.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,6 @@
class InvoiceLineItem extends ApiResource
{
const OBJECT_NAME = 'line_item';

use ApiOperations\Update;
}
1 change: 1 addition & 0 deletions lib/Issuing/Transaction.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
* @property string $merchant_currency The currency with which the merchant is taking payment.
* @property \Stripe\StripeObject $merchant_data
* @property \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.
* @property null|\Stripe\StripeObject $network_data Details about the transaction, such as processing dates, set by the card network.
* @property null|\Stripe\StripeObject $purchase_details Additional purchase information that is optionally provided by the merchant.
* @property null|string|\Stripe\Issuing\Token $token <a href="https://stripe.com/docs/api/issuing/tokens/object">Token</a> object used for this transaction. If a network token was not used for this transaction, this field will be null.
* @property null|\Stripe\StripeObject $treasury <a href="https://stripe.com/docs/api/treasury">Treasury</a> details related to this transaction if it was created on a [FinancialAccount](/docs/api/treasury/financial_accounts
Expand Down
22 changes: 22 additions & 0 deletions lib/Service/InvoiceService.php
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,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|array|\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
3 changes: 2 additions & 1 deletion lib/Service/PriceService.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
class PriceService extends \Stripe\Service\AbstractService
{
/**
* Returns a list of your prices.
* Returns a list of your active prices. For the list of inactive prices, set
* <code>active</code> to false.
*
* @param null|array $params
* @param null|array|\Stripe\Util\RequestOptions $opts
Expand Down
2 changes: 1 addition & 1 deletion lib/Topup.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
* @property null|string $failure_message Message to user further explaining reason for top-up failure if available.
* @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.
* @property \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.
* @property null|\Stripe\Source $source For most Stripe users, the source of every top-up is a bank account. This hash is then the <a href="https://stripe.com/docs/api#source_object">source object</a> describing that bank account.
* @property null|\Stripe\Source $source The source field is deprecated. It might not always be present in the API response.
* @property null|string $statement_descriptor Extra information about a top-up. This will appear on your source's bank statement. It must contain at least one letter.
* @property string $status The status of the top-up is either <code>canceled</code>, <code>failed</code>, <code>pending</code>, <code>reversed</code>, or <code>succeeded</code>.
* @property null|string $transfer_group A string that identifies this top-up as part of a group.
Expand Down
Loading