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

Merged
merged 27 commits into from
Jul 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
7d26a70
Update generated code (#1721)
stripe-openapi[bot] Jul 11, 2024
29a2825
Bump version to 15.2.0
xavdid-stripe Jul 11, 2024
dbcb282
Update changelog (#1722)
prathmesh-stripe Jul 11, 2024
128e3ea
Merge upstream and update generated code for v1125
stripe-openapi[bot] Jul 12, 2024
e9ab21a
Update generated code for v1126
stripe-openapi[bot] Jul 12, 2024
c1ec2aa
Update generated code for v1130
stripe-openapi[bot] Jul 16, 2024
bfc436a
Update generated code for v1131
stripe-openapi[bot] Jul 16, 2024
2729a68
Update generated code for v1134
stripe-openapi[bot] Jul 17, 2024
195c963
Update generated code for v1135
stripe-openapi[bot] Jul 17, 2024
40ed61f
Update generated code for v1136
stripe-openapi[bot] Jul 18, 2024
5f20a9a
Update generated code (#1724)
stripe-openapi[bot] Jul 18, 2024
0ac234d
Bump version to 15.3.0
prathmesh-stripe Jul 18, 2024
6e34eac
Merge upstream and update generated code for v1137
stripe-openapi[bot] Jul 18, 2024
1d2c14d
Update generated code for v1137
stripe-openapi[bot] Jul 19, 2024
4a635f2
Update generated code for v1142
stripe-openapi[bot] Jul 22, 2024
f6f6a40
Update generated code for v1145
stripe-openapi[bot] Jul 23, 2024
50de3fa
Update generated code for v1146
stripe-openapi[bot] Jul 23, 2024
12fe479
Update generated code for v1148
stripe-openapi[bot] Jul 23, 2024
7ba35ff
Update generated code for v1150
stripe-openapi[bot] Jul 24, 2024
f55dab9
Update generated code for v1151
stripe-openapi[bot] Jul 25, 2024
afe5dce
Update generated code for v1152
stripe-openapi[bot] Jul 25, 2024
debbe8f
Update generated code for v1153
stripe-openapi[bot] Jul 25, 2024
d285546
Update generated code for v1154
stripe-openapi[bot] Jul 25, 2024
7e6e4d5
Update generated code (#1726)
stripe-openapi[bot] Jul 25, 2024
1358155
Bump version to 15.4.0
helenye-stripe Jul 25, 2024
622d9eb
Merge upstream and update generated code for v1156
stripe-openapi[bot] Jul 25, 2024
30e8e4b
Update generated code for v1157
stripe-openapi[bot] Jul 25, 2024
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
17 changes: 17 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,25 @@
# Changelog

## 15.4.0 - 2024-07-25
* [#1726](https://github.com/stripe/stripe-php/pull/1726) Update generated code
* Add support for `update` method on resource `Checkout.Session`
* Add support for new values `invoice.overdue` and `invoice.will_be_due` on enum `Event.type`
* Add support for `twint` on `PaymentMethodConfiguration`

## 15.3.0 - 2024-07-18
* [#1724](https://github.com/stripe/stripe-php/pull/1724) Update generated code
* Add support for new value `issuing_dispute.funds_rescinded` on enum `Event.type`
* Add support for new value `stripe_s700` on enum `Terminal.Reader.device_type`
* [#1722](https://github.com/stripe/stripe-php/pull/1722) Update changelog

## 15.3.0-beta.1 - 2024-07-11
* [#1720](https://github.com/stripe/stripe-php/pull/1720) Update generated code for beta

## 15.2.0 - 2024-07-11
* [#1721](https://github.com/stripe/stripe-php/pull/1721) Update generated code
* ⚠️ Remove support for values `billing_policy_remote_function_response_invalid`, `billing_policy_remote_function_timeout`, `billing_policy_remote_function_unexpected_status_code`, and `billing_policy_remote_function_unreachable` from enum `StripeError.code`.
* ⚠️ Remove support for value `payment_intent_fx_quote_invalid` from enum `StripeError.code`. The was mistakenly released last week.
* Add support for `payment_method_options` on `ConfirmationToken`

## 15.2.0-beta.1 - 2024-07-05
* [#1719](https://github.com/stripe/stripe-php/pull/1719) 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 @@
v1121
v1157
5 changes: 5 additions & 0 deletions init.php
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,8 @@
require __DIR__ . '/lib/Balance.php';
require __DIR__ . '/lib/BalanceTransaction.php';
require __DIR__ . '/lib/BankAccount.php';
require __DIR__ . '/lib/Billing/Alert.php';
require __DIR__ . '/lib/Billing/AlertTriggered.php';
require __DIR__ . '/lib/Billing/Meter.php';
require __DIR__ . '/lib/Billing/MeterEvent.php';
require __DIR__ . '/lib/Billing/MeterEventAdjustment.php';
Expand Down Expand Up @@ -197,6 +199,7 @@
require __DIR__ . '/lib/Service/Apps/SecretService.php';
require __DIR__ . '/lib/Service/BalanceService.php';
require __DIR__ . '/lib/Service/BalanceTransactionService.php';
require __DIR__ . '/lib/Service/Billing/AlertService.php';
require __DIR__ . '/lib/Service/Billing/BillingServiceFactory.php';
require __DIR__ . '/lib/Service/Billing/MeterEventAdjustmentService.php';
require __DIR__ . '/lib/Service/Billing/MeterEventService.php';
Expand Down Expand Up @@ -289,6 +292,7 @@
require __DIR__ . '/lib/Service/SubscriptionItemService.php';
require __DIR__ . '/lib/Service/SubscriptionScheduleService.php';
require __DIR__ . '/lib/Service/SubscriptionService.php';
require __DIR__ . '/lib/Service/Tax/AssociationService.php';
require __DIR__ . '/lib/Service/Tax/CalculationService.php';
require __DIR__ . '/lib/Service/Tax/FormService.php';
require __DIR__ . '/lib/Service/Tax/RegistrationService.php';
Expand Down Expand Up @@ -346,6 +350,7 @@
require __DIR__ . '/lib/Subscription.php';
require __DIR__ . '/lib/SubscriptionItem.php';
require __DIR__ . '/lib/SubscriptionSchedule.php';
require __DIR__ . '/lib/Tax/Association.php';
require __DIR__ . '/lib/Tax/Calculation.php';
require __DIR__ . '/lib/Tax/CalculationLineItem.php';
require __DIR__ . '/lib/Tax/Form.php';
Expand Down
3 changes: 3 additions & 0 deletions lib/AccountNotice.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ class AccountNotice extends ApiResource
use ApiOperations\Update;

const REASON_ISSUING_ACCOUNT_CLOSED_FOR_INACTIVITY = 'issuing.account_closed_for_inactivity';
const REASON_ISSUING_ACCOUNT_CLOSED_FOR_NOT_PROVIDING_BUSINESS_MODEL_CLARIFICATION = 'issuing.account_closed_for_not_providing_business_model_clarification';
const REASON_ISSUING_ACCOUNT_CLOSED_FOR_NOT_PROVIDING_URL_CLARIFICATION = 'issuing.account_closed_for_not_providing_url_clarification';
const REASON_ISSUING_ACCOUNT_CLOSED_FOR_NOT_PROVIDING_USE_CASE_CLARIFICATION = 'issuing.account_closed_for_not_providing_use_case_clarification';
const REASON_ISSUING_ACCOUNT_CLOSED_FOR_TERMS_OF_SERVICE_VIOLATION = 'issuing.account_closed_for_terms_of_service_violation';
const REASON_ISSUING_APPLICATION_REJECTED_FOR_FAILURE_TO_VERIFY = 'issuing.application_rejected_for_failure_to_verify';
const REASON_ISSUING_CREDIT_APPLICATION_REJECTED = 'issuing.credit_application_rejected';
Expand Down
135 changes: 135 additions & 0 deletions lib/Billing/Alert.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,135 @@
<?php

// File generated from our OpenAPI spec

namespace Stripe\Billing;

/**
* A billing alert is a resource that notifies you when a certain usage threshold on a meter is crossed. For example, you might create a billing alert to notify you when a certain user made 100 API requests.
*
* @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 string $alert_type Defines the type of the alert.
* @property null|\Stripe\StripeObject $filter Limits the scope of the alert to a specific <a href="https://stripe.com/docs/api/customers">customer</a>.
* @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 null|string $status Status of the alert. This can be active, inactive or archived.
* @property string $title Title of the alert.
* @property null|\Stripe\StripeObject $usage_threshold_config Encapsulates configuration of the alert to monitor usage on a specific <a href="https://stripe.com/docs/api/billing/meter">Billing Meter</a>.
*/
class Alert extends \Stripe\ApiResource
{
const OBJECT_NAME = 'billing.alert';

const STATUS_ACTIVE = 'active';
const STATUS_ARCHIVED = 'archived';
const STATUS_INACTIVE = 'inactive';

/**
* Creates a billing alert.
*
* @param null|array $params
* @param null|array|string $options
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Billing\Alert the created resource
*/
public static function create($params = null, $options = null)
{
self::_validateParams($params);
$url = static::classUrl();

list($response, $opts) = static::_staticRequest('post', $url, $params, $options);
$obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts);
$obj->setLastResponse($response);

return $obj;
}

/**
* Lists billing active and inactive alerts.
*
* @param null|array $params
* @param null|array|string $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Collection<\Stripe\Billing\Alert> of ApiResources
*/
public static function all($params = null, $opts = null)
{
$url = static::classUrl();

return static::_requestPage($url, \Stripe\Collection::class, $params, $opts);
}

/**
* Retrieves a billing alert given an ID.
*
* @param array|string $id the ID of the API resource to retrieve, or an options array containing an `id` key
* @param null|array|string $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Billing\Alert
*/
public static function retrieve($id, $opts = null)
{
$opts = \Stripe\Util\RequestOptions::parse($opts);
$instance = new static($id, $opts);
$instance->refresh();

return $instance;
}

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

return $this;
}

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

return $this;
}

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

return $this;
}
}
18 changes: 18 additions & 0 deletions lib/Billing/AlertTriggered.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?php

// File generated from our OpenAPI spec

namespace Stripe\Billing;

/**
* @property string $object String representing the object's type. Objects of the same type share the same value.
* @property \Stripe\Billing\Alert $alert A billing alert is a resource that notifies you when a certain usage threshold on a meter is crossed. For example, you might create a billing alert to notify you when a certain user made 100 API requests.
* @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
* @property string $customer ID of customer for which the alert triggered
* @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 int $value The value triggering the alert
*/
class AlertTriggered extends \Stripe\ApiResource
{
const OBJECT_NAME = 'billing.alert_triggered';
}
2 changes: 1 addition & 1 deletion lib/Charge.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
* @property null|string $authorization_code Authorization code on the charge.
* @property null|string|\Stripe\BalanceTransaction $balance_transaction ID of the balance transaction that describes the impact of this charge on your account balance (not including refunds or disputes).
* @property \Stripe\StripeObject $billing_details
* @property null|string $calculated_statement_descriptor The full statement descriptor that is passed to card networks, and that is displayed on your customers' credit card and bank statements. Allows you to see what the statement descriptor looks like after the static and dynamic portions are combined.
* @property null|string $calculated_statement_descriptor The full statement descriptor that is passed to card networks, and that is displayed on your customers' credit card and bank statements. Allows you to see what the statement descriptor looks like after the static and dynamic portions are combined. This only works for card payments.
* @property bool $captured If the charge was created without capturing, this Boolean represents whether it is still uncaptured or has since been captured.
* @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
* @property string $currency Three-letter <a href="https://www.iso.org/iso-4217-currency-codes.html">ISO currency code</a>, in lowercase. Must be a <a href="https://stripe.com/docs/currencies">supported currency</a>.
Expand Down
25 changes: 25 additions & 0 deletions lib/Checkout/Session.php
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,8 @@ class Session extends \Stripe\ApiResource
{
const OBJECT_NAME = 'checkout.session';

use \Stripe\ApiOperations\Update;

const BILLING_ADDRESS_COLLECTION_AUTO = 'auto';
const BILLING_ADDRESS_COLLECTION_REQUIRED = 'required';

Expand Down Expand Up @@ -171,6 +173,29 @@ public static function retrieve($id, $opts = null)
return $instance;
}

/**
* Updates a Session object.
*
* @param string $id the ID of the resource to update
* @param null|array $params
* @param null|array|string $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Checkout\Session the updated resource
*/
public static function update($id, $params = null, $opts = null)
{
self::_validateParams($params);
$url = static::resourceUrl($id);

list($response, $opts) = static::_staticRequest('post', $url, $params, $opts);
$obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts);
$obj->setLastResponse($response);

return $obj;
}

/**
* @param null|array $params
* @param null|array|string $opts
Expand Down
12 changes: 10 additions & 2 deletions lib/Event.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ class Event extends ApiResource
const APPLICATION_FEE_REFUNDED = 'application_fee.refunded';
const APPLICATION_FEE_REFUND_UPDATED = 'application_fee.refund.updated';
const BALANCE_AVAILABLE = 'balance.available';
const BILLING_ALERT_TRIGGERED = 'billing.alert.triggered';
const BILLING_PORTAL_CONFIGURATION_CREATED = 'billing_portal.configuration.created';
const BILLING_PORTAL_CONFIGURATION_UPDATED = 'billing_portal.configuration.updated';
const BILLING_PORTAL_SESSION_CREATED = 'billing_portal.session.created';
Expand Down Expand Up @@ -160,6 +161,7 @@ class Event extends ApiResource
const INVOICE_FINALIZATION_FAILED = 'invoice.finalization_failed';
const INVOICE_FINALIZED = 'invoice.finalized';
const INVOICE_MARKED_UNCOLLECTIBLE = 'invoice.marked_uncollectible';
const INVOICE_OVERDUE = 'invoice.overdue';
const INVOICE_PAID = 'invoice.paid';
const INVOICE_PAYMENT_ACTION_REQUIRED = 'invoice.payment_action_required';
const INVOICE_PAYMENT_FAILED = 'invoice.payment_failed';
Expand All @@ -169,6 +171,7 @@ class Event extends ApiResource
const INVOICE_UPCOMING = 'invoice.upcoming';
const INVOICE_UPDATED = 'invoice.updated';
const INVOICE_VOIDED = 'invoice.voided';
const INVOICE_WILL_BE_DUE = 'invoice.will_be_due';
const ISSUING_AUTHORIZATION_CREATED = 'issuing_authorization.created';
const ISSUING_AUTHORIZATION_REQUEST = 'issuing_authorization.request';
const ISSUING_AUTHORIZATION_UPDATED = 'issuing_authorization.updated';
Expand All @@ -179,6 +182,7 @@ class Event extends ApiResource
const ISSUING_DISPUTE_CLOSED = 'issuing_dispute.closed';
const ISSUING_DISPUTE_CREATED = 'issuing_dispute.created';
const ISSUING_DISPUTE_FUNDS_REINSTATED = 'issuing_dispute.funds_reinstated';
const ISSUING_DISPUTE_FUNDS_RESCINDED = 'issuing_dispute.funds_rescinded';
const ISSUING_DISPUTE_SUBMITTED = 'issuing_dispute.submitted';
const ISSUING_DISPUTE_UPDATED = 'issuing_dispute.updated';
const ISSUING_PERSONALIZATION_DESIGN_ACTIVATED = 'issuing_personalization_design.activated';
Expand Down Expand Up @@ -326,6 +330,7 @@ class Event extends ApiResource
const TYPE_APPLICATION_FEE_REFUNDED = 'application_fee.refunded';
const TYPE_APPLICATION_FEE_REFUND_UPDATED = 'application_fee.refund.updated';
const TYPE_BALANCE_AVAILABLE = 'balance.available';
const TYPE_BILLING_ALERT_TRIGGERED = 'billing.alert.triggered';
const TYPE_BILLING_PORTAL_CONFIGURATION_CREATED = 'billing_portal.configuration.created';
const TYPE_BILLING_PORTAL_CONFIGURATION_UPDATED = 'billing_portal.configuration.updated';
const TYPE_BILLING_PORTAL_SESSION_CREATED = 'billing_portal.session.created';
Expand Down Expand Up @@ -419,6 +424,7 @@ class Event extends ApiResource
const TYPE_INVOICE_FINALIZATION_FAILED = 'invoice.finalization_failed';
const TYPE_INVOICE_FINALIZED = 'invoice.finalized';
const TYPE_INVOICE_MARKED_UNCOLLECTIBLE = 'invoice.marked_uncollectible';
const TYPE_INVOICE_OVERDUE = 'invoice.overdue';
const TYPE_INVOICE_PAID = 'invoice.paid';
const TYPE_INVOICE_PAYMENT_ACTION_REQUIRED = 'invoice.payment_action_required';
const TYPE_INVOICE_PAYMENT_FAILED = 'invoice.payment_failed';
Expand All @@ -428,6 +434,7 @@ class Event extends ApiResource
const TYPE_INVOICE_UPCOMING = 'invoice.upcoming';
const TYPE_INVOICE_UPDATED = 'invoice.updated';
const TYPE_INVOICE_VOIDED = 'invoice.voided';
const TYPE_INVOICE_WILL_BE_DUE = 'invoice.will_be_due';
const TYPE_ISSUING_AUTHORIZATION_CREATED = 'issuing_authorization.created';
const TYPE_ISSUING_AUTHORIZATION_REQUEST = 'issuing_authorization.request';
const TYPE_ISSUING_AUTHORIZATION_UPDATED = 'issuing_authorization.updated';
Expand All @@ -438,6 +445,7 @@ class Event extends ApiResource
const TYPE_ISSUING_DISPUTE_CLOSED = 'issuing_dispute.closed';
const TYPE_ISSUING_DISPUTE_CREATED = 'issuing_dispute.created';
const TYPE_ISSUING_DISPUTE_FUNDS_REINSTATED = 'issuing_dispute.funds_reinstated';
const TYPE_ISSUING_DISPUTE_FUNDS_RESCINDED = 'issuing_dispute.funds_rescinded';
const TYPE_ISSUING_DISPUTE_SUBMITTED = 'issuing_dispute.submitted';
const TYPE_ISSUING_DISPUTE_UPDATED = 'issuing_dispute.updated';
const TYPE_ISSUING_PERSONALIZATION_DESIGN_ACTIVATED = 'issuing_personalization_design.activated';
Expand Down Expand Up @@ -595,8 +603,8 @@ public static function all($params = null, $opts = null)
}

/**
* Retrieves the details of an event. Supply the unique identifier of the event,
* which you might have received in a webhook.
* Retrieves the details of an event if it was created in the last 30 days. Supply
* the unique identifier of the event, which you might have received in a webhook.
*
* @param array|string $id the ID of the API resource to retrieve, or an options array containing an `id` key
* @param null|array|string $opts
Expand Down
2 changes: 1 addition & 1 deletion lib/Identity/VerificationReport.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* API. To configure and create VerificationReports, use the
* <a href="https://stripe.com/docs/api/identity/verification_sessions">VerificationSession</a> API.
*
* Related guides: <a href="https://stripe.com/docs/identity/verification-sessions#results">Accessing verification results</a>.
* Related guide: <a href="https://stripe.com/docs/identity/verification-sessions#results">Accessing verification results</a>.
*
* @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.
Expand Down
Loading
Loading