Skip to content
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
2 changes: 1 addition & 1 deletion API_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0de52cdca31a7c51c6d11187fc88ab23ea3a1c5b
656e3d91783827d66e226326d724dfa586b8276a
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v2031
v2045
22 changes: 15 additions & 7 deletions examples/EventNotificationWebhookHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,24 @@

// check what type of event notification we have
if ($event_notification instanceof Stripe\Events\V1BillingMeterErrorReportTriggeredEventNotification) {
$meter = $event_notification->fetchRelatedObject();
$meter_id = $meter->id;
// there's basic info about the related object in the notification
echo "Meter with id {$event_notification->related_object->id} reported an error\n";

// Record the failures and alert your team
// Add your logic here
// or you can fetch the full object form the API for more details
$meter = $event_notification->fetchRelatedObject();
echo "Meter {$meter->display_name} ({$meter->id}) had a problem\n";

// can fetch full event w/ data
// And you can always fetch the full event:
$event = $event_notification->fetchEvent();
// data is fully typed
$event->data->developer_message_summary;
echo "More info: {$event->data->developer_message_summary}\n";
} elseif ($event_notification instanceof Stripe\Events\UnknownEventNotification) {
// Events that were introduced after this SDK version release are
// represented as `UnknownEventNotification`s.
// They're valid, the SDK just doesn't have corresponding classes for them.
// You must match on the "type" property instead.
if ('some.new.event' === $event_notification->type) {
// handle it the same way as above
}
}

return $response->withStatus(200);
Expand Down
3 changes: 0 additions & 3 deletions init.php
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,6 @@
require __DIR__ . '/lib/Event.php';
require __DIR__ . '/lib/EventData/V1BillingMeterErrorReportTriggeredEventData.php';
require __DIR__ . '/lib/EventData/V1BillingMeterNoMeterFoundEventData.php';
require __DIR__ . '/lib/EventData/V2BillingBillSettingUpdatedEventData.php';
require __DIR__ . '/lib/EventData/V2CoreAccountIncludingConfigurationCustomerCapabilityStatusUpdatedEventData.php';
require __DIR__ . '/lib/EventData/V2CoreAccountIncludingConfigurationMerchantCapabilityStatusUpdatedEventData.php';
require __DIR__ . '/lib/EventData/V2CoreAccountIncludingConfigurationRecipientCapabilityStatusUpdatedEventData.php';
Expand All @@ -161,8 +160,6 @@
require __DIR__ . '/lib/Events/V1BillingMeterErrorReportTriggeredEventNotification.php';
require __DIR__ . '/lib/Events/V1BillingMeterNoMeterFoundEvent.php';
require __DIR__ . '/lib/Events/V1BillingMeterNoMeterFoundEventNotification.php';
require __DIR__ . '/lib/Events/V2BillingBillSettingUpdatedEvent.php';
require __DIR__ . '/lib/Events/V2BillingBillSettingUpdatedEventNotification.php';
require __DIR__ . '/lib/Events/V2CoreAccountClosedEvent.php';
require __DIR__ . '/lib/Events/V2CoreAccountClosedEventNotification.php';
require __DIR__ . '/lib/Events/V2CoreAccountCreatedEvent.php';
Expand Down
4 changes: 2 additions & 2 deletions lib/BillingPortal/Configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class Configuration extends \Stripe\ApiResource
* Creates a configuration that describes the functionality and behavior of a
* PortalSession.
*
* @param null|array{business_profile?: array{headline?: null|string, privacy_policy_url?: string, terms_of_service_url?: string}, default_return_url?: null|string, expand?: string[], features: array{customer_update?: array{allowed_updates?: null|string[], enabled: bool}, invoice_history?: array{enabled: bool}, payment_method_update?: array{enabled: bool}, subscription_cancel?: array{cancellation_reason?: array{enabled: bool, options: null|string[]}, enabled: bool, mode?: string, proration_behavior?: string}, subscription_update?: array{default_allowed_updates?: null|string[], enabled: bool, products?: null|array{adjustable_quantity?: array{enabled: bool, maximum?: int, minimum?: int}, prices: string[], product: string}[], proration_behavior?: string, schedule_at_period_end?: array{conditions?: array{type: string}[]}, trial_update_behavior?: string}}, login_page?: array{enabled: bool}, metadata?: array<string, string>, name?: null|string} $params
* @param null|array{business_profile?: array{headline?: null|string, privacy_policy_url?: string, terms_of_service_url?: string}, default_return_url?: null|string, expand?: string[], features: array{customer_update?: array{allowed_updates?: null|string[], enabled: bool}, invoice_history?: array{enabled: bool}, payment_method_update?: array{enabled: bool, payment_method_configuration?: null|string}, subscription_cancel?: array{cancellation_reason?: array{enabled: bool, options: null|string[]}, enabled: bool, mode?: string, proration_behavior?: string}, subscription_update?: array{default_allowed_updates?: null|string[], enabled: bool, products?: null|array{adjustable_quantity?: array{enabled: bool, maximum?: int, minimum?: int}, prices: string[], product: string}[], proration_behavior?: string, schedule_at_period_end?: array{conditions?: array{type: string}[]}, trial_update_behavior?: string}}, login_page?: array{enabled: bool}, metadata?: array<string, string>, name?: null|string} $params
* @param null|array|string $options
*
* @return Configuration the created resource
Expand Down Expand Up @@ -93,7 +93,7 @@ public static function retrieve($id, $opts = null)
* Updates a configuration that describes the functionality of the customer portal.
*
* @param string $id the ID of the resource to update
* @param null|array{active?: bool, business_profile?: array{headline?: null|string, privacy_policy_url?: null|string, terms_of_service_url?: null|string}, default_return_url?: null|string, expand?: string[], features?: array{customer_update?: array{allowed_updates?: null|string[], enabled?: bool}, invoice_history?: array{enabled: bool}, payment_method_update?: array{enabled: bool}, subscription_cancel?: array{cancellation_reason?: array{enabled: bool, options?: null|string[]}, enabled?: bool, mode?: string, proration_behavior?: string}, subscription_update?: array{default_allowed_updates?: null|string[], enabled?: bool, products?: null|array{adjustable_quantity?: array{enabled: bool, maximum?: int, minimum?: int}, prices: string[], product: string}[], proration_behavior?: string, schedule_at_period_end?: array{conditions?: null|array{type: string}[]}, trial_update_behavior?: string}}, login_page?: array{enabled: bool}, metadata?: null|array<string, string>, name?: null|string} $params
* @param null|array{active?: bool, business_profile?: array{headline?: null|string, privacy_policy_url?: null|string, terms_of_service_url?: null|string}, default_return_url?: null|string, expand?: string[], features?: array{customer_update?: array{allowed_updates?: null|string[], enabled?: bool}, invoice_history?: array{enabled: bool}, payment_method_update?: array{enabled: bool, payment_method_configuration?: null|string}, subscription_cancel?: array{cancellation_reason?: array{enabled: bool, options?: null|string[]}, enabled?: bool, mode?: string, proration_behavior?: string}, subscription_update?: array{default_allowed_updates?: null|string[], enabled?: bool, products?: null|array{adjustable_quantity?: array{enabled: bool, maximum?: int, minimum?: int}, prices: string[], product: string}[], proration_behavior?: string, schedule_at_period_end?: array{conditions?: null|array{type: string}[]}, trial_update_behavior?: string}}, login_page?: array{enabled: bool}, metadata?: null|array<string, string>, name?: null|string} $params
* @param null|array|string $opts
*
* @return Configuration the updated resource
Expand Down
2 changes: 1 addition & 1 deletion lib/Charge.php

Large diffs are not rendered by default.

10 changes: 0 additions & 10 deletions lib/EventData/V2BillingBillSettingUpdatedEventData.php

This file was deleted.

41 changes: 0 additions & 41 deletions lib/Events/V2BillingBillSettingUpdatedEvent.php

This file was deleted.

38 changes: 0 additions & 38 deletions lib/Events/V2BillingBillSettingUpdatedEventNotification.php

This file was deleted.

1 change: 1 addition & 0 deletions lib/File.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ class File extends ApiResource
const PURPOSE_IDENTITY_DOCUMENT_DOWNLOADABLE = 'identity_document_downloadable';
const PURPOSE_ISSUING_REGULATORY_REPORTING = 'issuing_regulatory_reporting';
const PURPOSE_PCI_DOCUMENT = 'pci_document';
const PURPOSE_PLATFORM_TERMS_OF_SERVICE = 'platform_terms_of_service';
const PURPOSE_SELFIE = 'selfie';
const PURPOSE_SIGMA_SCHEDULED_QUERY = 'sigma_scheduled_query';
const PURPOSE_TAX_DOCUMENT_USER_UPLOAD = 'tax_document_user_upload';
Expand Down
Loading