mirror of
https://github.com/itflow-org/itflow
synced 2026-08-15 20:15:12 +00:00
Split DB Updates into seperate files, with the cutoff being 2.0.0
This commit is contained in:
@@ -7,14 +7,14 @@ namespace Stripe\V2\Billing;
|
||||
/**
|
||||
* A Meter Event Adjustment is used to cancel or modify previously recorded meter events. Meter Event Adjustments allow you to correct billing data by canceling individual events or event ranges, with tracking of adjustment status and creation time.
|
||||
*
|
||||
* @property string $id The unique id of this meter event adjustment.
|
||||
* @property string $id The unique ID of this meter event adjustment.
|
||||
* @property string $object String representing the object's type. Objects of the same type share the same value of the object field.
|
||||
* @property (object{identifier: string}&\Stripe\StripeObject) $cancel Specifies which event to cancel.
|
||||
* @property int $created The time the adjustment was created.
|
||||
* @property string $event_name The name of the meter event. Corresponds with the <code>event_name</code> field on a meter.
|
||||
* @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 string $status Open Enum. The meter event adjustment’s status.
|
||||
* @property string $type Open Enum. Specifies whether to cancel a single event or a range of events for a time period. Time period cancellation is not supported yet.
|
||||
* @property string $type Open Enum. Specifies the type of cancellation. Currently supports canceling a single event.
|
||||
*/
|
||||
class MeterEventAdjustment extends \Stripe\ApiResource
|
||||
{
|
||||
|
||||
@@ -7,11 +7,11 @@ namespace Stripe\V2\Billing;
|
||||
/**
|
||||
* A Meter Event Session is an authentication session for the high-throughput meter event API. Meter Event Sessions provide temporary authentication tokens with expiration times, enabling secure and efficient bulk submission of usage events.
|
||||
*
|
||||
* @property string $id The unique id of this auth session.
|
||||
* @property string $id The unique ID of this auth session.
|
||||
* @property string $object String representing the object's type. Objects of the same type share the same value of the object field.
|
||||
* @property string $authentication_token The authentication token for this session. Use this token when calling the high-throughput meter event API.
|
||||
* @property string $authentication_token The authentication token for this session. Use this token when calling the high-throughput meter event API.
|
||||
* @property int $created The creation time of this session.
|
||||
* @property int $expires_at The time at which this session will expire.
|
||||
* @property int $expires_at The time at which this session expires.
|
||||
* @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.
|
||||
*/
|
||||
class MeterEventSession extends \Stripe\ApiResource
|
||||
|
||||
83
libs/stripe-php/lib/V2/Commerce/ProductCatalogImport.php
Normal file
83
libs/stripe-php/lib/V2/Commerce/ProductCatalogImport.php
Normal file
@@ -0,0 +1,83 @@
|
||||
<?php
|
||||
|
||||
// File generated from our OpenAPI spec
|
||||
|
||||
namespace Stripe\V2\Commerce;
|
||||
|
||||
/**
|
||||
* The ProductCatalogImport object tracks the long-running background process that handles uploading, processing and validation.
|
||||
*
|
||||
* @property string $id The unique identifier for this ProductCatalogImport.
|
||||
* @property string $object String representing the object's type. Objects of the same type share the same value of the object field.
|
||||
* @property int $created The time this ProductCatalogImport was created.
|
||||
* @property string $feed_type The type of feed data being imported into the product catalog.
|
||||
* @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 Additional information about the object in a structured format.
|
||||
* @property string $mode The import strategy for handling existing catalog data.
|
||||
* @property string $status The current status of this ProductCatalogImport.
|
||||
* @property null|(object{awaiting_upload?: (object{upload_url: (object{expires_at: int, url: string}&\Stripe\StripeObject)}&\Stripe\StripeObject), failed?: (object{code: string, failure_message: string, type: string}&\Stripe\StripeObject), processing?: (object{error_count: int, success_count: int}&\Stripe\StripeObject), succeeded?: (object{success_count: int}&\Stripe\StripeObject), succeeded_with_errors?: (object{error_count: int, error_file: (object{content_type: string, download_url: (object{expires_at: int, url: string}&\Stripe\StripeObject), size: int}&\Stripe\StripeObject), samples: (object{error_message: string, field: string, id: string, row: int}&\Stripe\StripeObject)[], success_count: int}&\Stripe\StripeObject)}&\Stripe\StripeObject) $status_details Details about the current import status.
|
||||
*/
|
||||
class ProductCatalogImport extends \Stripe\ApiResource
|
||||
{
|
||||
const OBJECT_NAME = 'v2.commerce.product_catalog_import';
|
||||
|
||||
public static function fieldEncodings()
|
||||
{
|
||||
return [
|
||||
'status_details' => [
|
||||
'kind' => 'object',
|
||||
'fields' => [
|
||||
'processing' => [
|
||||
'kind' => 'object',
|
||||
'fields' => [
|
||||
'error_count' => ['kind' => 'int64_string'],
|
||||
'success_count' => ['kind' => 'int64_string'],
|
||||
],
|
||||
],
|
||||
'succeeded' => [
|
||||
'kind' => 'object',
|
||||
'fields' => [
|
||||
'success_count' => ['kind' => 'int64_string'],
|
||||
],
|
||||
],
|
||||
'succeeded_with_errors' => [
|
||||
'kind' => 'object',
|
||||
'fields' => [
|
||||
'error_count' => ['kind' => 'int64_string'],
|
||||
'error_file' => [
|
||||
'kind' => 'object',
|
||||
'fields' => [
|
||||
'size' => ['kind' => 'int64_string'],
|
||||
],
|
||||
],
|
||||
'samples' => [
|
||||
'kind' => 'array',
|
||||
'element' => [
|
||||
'kind' => 'object',
|
||||
'fields' => [
|
||||
'row' => ['kind' => 'int64_string'],
|
||||
],
|
||||
],
|
||||
],
|
||||
'success_count' => ['kind' => 'int64_string'],
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
const FEED_TYPE_INVENTORY = 'inventory';
|
||||
const FEED_TYPE_PRICING = 'pricing';
|
||||
const FEED_TYPE_PRODUCT = 'product';
|
||||
const FEED_TYPE_PROMOTION = 'promotion';
|
||||
|
||||
const MODE_REPLACE = 'replace';
|
||||
const MODE_UPSERT = 'upsert';
|
||||
|
||||
const STATUS_AWAITING_UPLOAD = 'awaiting_upload';
|
||||
const STATUS_FAILED = 'failed';
|
||||
const STATUS_PROCESSING = 'processing';
|
||||
const STATUS_SUCCEEDED = 'succeeded';
|
||||
const STATUS_SUCCEEDED_WITH_ERRORS = 'succeeded_with_errors';
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
@@ -13,7 +13,7 @@ namespace Stripe\V2\Core;
|
||||
* @property int $expires_at The timestamp at which this Account Link will expire.
|
||||
* @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 string $url The URL at which the account can access the Stripe-hosted flow.
|
||||
* @property (object{type: string, account_onboarding?: (object{collection_options?: (object{fields?: string, future_requirements?: string}&\Stripe\StripeObject), configurations: string[], refresh_url: string, return_url?: string}&\Stripe\StripeObject), account_update?: (object{collection_options?: (object{fields?: string, future_requirements?: string}&\Stripe\StripeObject), configurations: string[], refresh_url: string, return_url?: string}&\Stripe\StripeObject)}&\Stripe\StripeObject) $use_case Hash containing usage options.
|
||||
* @property (object{account_onboarding?: (object{collection_options?: (object{fields?: string, future_requirements?: string}&\Stripe\StripeObject), configurations: string[], refresh_url: string, return_url?: string}&\Stripe\StripeObject), account_update?: (object{collection_options?: (object{fields?: string, future_requirements?: string}&\Stripe\StripeObject), configurations: string[], refresh_url: string, return_url?: string}&\Stripe\StripeObject), type: string}&\Stripe\StripeObject) $use_case Hash containing usage options.
|
||||
*/
|
||||
class AccountLink extends \Stripe\ApiResource
|
||||
{
|
||||
|
||||
@@ -36,6 +36,18 @@ class AccountPerson extends \Stripe\ApiResource
|
||||
{
|
||||
const OBJECT_NAME = 'v2.core.account_person';
|
||||
|
||||
public static function fieldEncodings()
|
||||
{
|
||||
return [
|
||||
'relationship' => [
|
||||
'kind' => 'object',
|
||||
'fields' => [
|
||||
'percent_ownership' => ['kind' => 'decimal_string'],
|
||||
],
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
const LEGAL_GENDER_FEMALE = 'female';
|
||||
const LEGAL_GENDER_MALE = 'male';
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
namespace Stripe\V2\Core;
|
||||
|
||||
/**
|
||||
* Account tokens are single-use tokens which tokenize company/individual/business information, and are used for creating or updating an Account.
|
||||
* Account tokens are single-use tokens which tokenize an account's contact_email, display_name, contact_phone, and identity.
|
||||
*
|
||||
* @property string $id Unique identifier for the token.
|
||||
* @property string $object String representing the object's type. Objects of the same type share the same value of the object field.
|
||||
|
||||
@@ -10,11 +10,12 @@ namespace Stripe\V2\Core;
|
||||
* @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 of the object field.
|
||||
* @property null|(object{aws_account_id: string, aws_event_source_arn: string, aws_event_source_status: string}&\Stripe\StripeObject) $amazon_eventbridge Amazon EventBridge configuration.
|
||||
* @property null|(object{azure_partner_topic_name: string, azure_partner_topic_status: string, azure_region: string, azure_resource_group_name: string, azure_subscription_id: string}&\Stripe\StripeObject) $azure_event_grid Azure Event Grid configuration.
|
||||
* @property int $created Time at which the object was created.
|
||||
* @property string $description An optional description of what the event destination is used for.
|
||||
* @property string[] $enabled_events The list of events to enable for this endpoint.
|
||||
* @property string $event_payload Payload type of events being subscribed to.
|
||||
* @property null|string[] $events_from Where events should be routed from.
|
||||
* @property null|string[] $events_from Specifies which accounts' events route to this destination. <code>@self</code>: Receive events from the account that owns the event destination. <code>@accounts</code>: Receive events emitted from other accounts you manage which includes your v1 and v2 accounts. <code>@organization_members</code>: Receive events from accounts directly linked to the organization. <code>@organization_members/@accounts</code>: Receive events from all accounts connected to any platform accounts in the organization.
|
||||
* @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|\Stripe\StripeObject $metadata Metadata.
|
||||
* @property string $name Event destination name.
|
||||
@@ -36,5 +37,6 @@ class EventDestination extends \Stripe\ApiResource
|
||||
const STATUS_ENABLED = 'enabled';
|
||||
|
||||
const TYPE_AMAZON_EVENTBRIDGE = 'amazon_eventbridge';
|
||||
const TYPE_AZURE_EVENT_GRID = 'azure_event_grid';
|
||||
const TYPE_WEBHOOK_ENDPOINT = 'webhook_endpoint';
|
||||
}
|
||||
|
||||
@@ -65,7 +65,7 @@ abstract class EventNotification
|
||||
|
||||
/**
|
||||
* Helper for constructing an Event Notification. Doesn't perform signature validation, so you
|
||||
* should use \Stripe\BaseStripeClient#parseEventNotification instead for
|
||||
* should use \Stripe\BaseStripeClient::parseEventNotification instead for
|
||||
* initial handling. This is useful in unit tests and working with EventNotifications that you've
|
||||
* already validated the authenticity of.
|
||||
*
|
||||
@@ -78,6 +78,12 @@ abstract class EventNotification
|
||||
{
|
||||
$json = json_decode($jsonStr, true);
|
||||
|
||||
if (isset($json['object']) && 'event' === $json['object']) {
|
||||
throw new \Stripe\Exception\UnexpectedValueException(
|
||||
'You passed a webhook payload to StripeClient::parseEventNotification, which expects an event notification. Use Webhook::constructEvent instead.'
|
||||
);
|
||||
}
|
||||
|
||||
$class = UnknownEventNotification::class;
|
||||
$eventNotificationTypes = EventNotificationTypes::v2EventMapping;
|
||||
if (\array_key_exists($json['type'], $eventNotificationTypes)) {
|
||||
|
||||
Reference in New Issue
Block a user