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 for beta #1808

Open
wants to merge 15 commits into
base: beta
Choose a base branch
from
Open
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
18 changes: 17 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,24 @@
# Changelog

## 16.5.0 - 2025-01-27
* [#1804](https://github.com/stripe/stripe-php/pull/1804) Update generated code
* Add support for `close` method on resource `Treasury.FinancialAccount`
* Add support for `advice_code` on `StripeError`
* Add support for `discounts` on `Checkout.Session`
* Add support for new value `pay_by_bank` on enum `PaymentLink.payment_method_types[]`
* Add support for `pay_by_bank` on `PaymentMethodConfiguration` and `PaymentMethod`
* Add support for new value `pay_by_bank` on enum `PaymentMethod.type`
* Add support for `is_default` and `nickname` on `Treasury.FinancialAccount`
* [#1805](https://github.com/stripe/stripe-php/pull/1805) Restore testCoreEventsGet generated test
* [#1807](https://github.com/stripe/stripe-php/pull/1807) minor justfile fixes
* [#1806](https://github.com/stripe/stripe-php/pull/1806) Added CONTRIBUTING.md file
* [#1802](https://github.com/stripe/stripe-php/pull/1802) ensure dependencies are installed for format and test recipes
* [#1801](https://github.com/stripe/stripe-php/pull/1801) Add justfile, remove coveralls, and fix AUTOLOAD in CI
* [#1797](https://github.com/stripe/stripe-php/pull/1797) Added pull request template

## 16.5.0-beta.3 - 2025-01-23
* [#1803](https://github.com/stripe/stripe-php/pull/1803) Update generated code for beta
* V2 Events now are subclass of `\Stripe\V2\Event`.
* V2 Events now are subclass of `\Stripe\V2\Event`.

## 16.5.0-beta.2 - 2025-01-09
* [#1796](https://github.com/stripe/stripe-php/pull/1796) Update generated code for beta
Expand Down
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v1460
v1464
12 changes: 6 additions & 6 deletions lib/ApiRequestor.php
Original file line number Diff line number Diff line change
Expand Up @@ -436,8 +436,8 @@ private function _prepareRequest($method, $url, $params, $headers, $apiMode)
// X-Stripe-Client-User-Agent header via the optional getUserAgentInfo()
// method
$clientUAInfo = null;
if (\method_exists($this->httpClient(), 'getUserAgentInfo')) {
$clientUAInfo = $this->httpClient()->getUserAgentInfo();
if (\method_exists(self::httpClient(), 'getUserAgentInfo')) {
$clientUAInfo = self::httpClient()->getUserAgentInfo();
}

if ($params && \is_array($params)) {
Expand Down Expand Up @@ -518,7 +518,7 @@ private function _requestRaw($method, $url, $params, $headers, $apiMode, $usage)

$requestStartMs = Util\Util::currentTimeMillis();

list($rbody, $rcode, $rheaders) = $this->httpClient()->request(
list($rbody, $rcode, $rheaders) = self::httpClient()->request(
$method,
$absUrl,
$rawHeaders,
Expand Down Expand Up @@ -562,7 +562,7 @@ private function _requestRawStreaming($method, $url, $params, $headers, $apiMode

$requestStartMs = Util\Util::currentTimeMillis();

list($rbody, $rcode, $rheaders) = $this->streamingHttpClient()->requestStream(
list($rbody, $rcode, $rheaders) = self::streamingHttpClient()->requestStream(
$method,
$absUrl,
$rawHeaders,
Expand Down Expand Up @@ -673,7 +673,7 @@ public static function resetTelemetry()
/**
* @return HttpClient\ClientInterface
*/
private function httpClient()
public static function httpClient()
{
if (!self::$_httpClient) {
self::$_httpClient = HttpClient\CurlClient::instance();
Expand All @@ -685,7 +685,7 @@ private function httpClient()
/**
* @return HttpClient\StreamingClientInterface
*/
private function streamingHttpClient()
public static function streamingHttpClient()
{
if (!self::$_streamingHttpClient) {
self::$_streamingHttpClient = HttpClient\CurlClient::instance();
Expand Down
2 changes: 2 additions & 0 deletions lib/Billing/MeterEventSummary.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
* A billing meter event summary represents an aggregated view of a customer's billing meter events within a specified timeframe. It indicates how much
* usage was accrued by a customer for that period.
*
* Note: Meters events are aggregated asynchronously so the meter event summaries provide an eventually consistent view of the reported usage.
*
* @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 float $aggregated_value Aggregated value of all the events within <code>start_time</code> (inclusive) and <code>end_time</code> (inclusive). The aggregation strategy is defined on meter via <code>default_aggregation</code>.
Expand Down