tipo: modificación del cpanel y gitignore de la carpeta vendor

This commit is contained in:
2026-07-07 11:35:09 -06:00
parent a0c91dc567
commit 676ef0d506
8510 changed files with 1132803 additions and 4 deletions
@@ -0,0 +1,31 @@
<?php
// File generated from our OpenAPI spec
namespace Stripe\Service\V2\Billing;
/**
* Service factory class for API resources in the Billing namespace.
*
* @property MeterEventAdjustmentService $meterEventAdjustments
* @property MeterEventService $meterEvents
* @property MeterEventSessionService $meterEventSession
* @property MeterEventStreamService $meterEventStream
*/
class BillingServiceFactory extends \Stripe\Service\AbstractServiceFactory
{
/**
* @var array<string, string>
*/
private static $classMap = [
'meterEventAdjustments' => MeterEventAdjustmentService::class,
'meterEvents' => MeterEventService::class,
'meterEventSession' => MeterEventSessionService::class,
'meterEventStream' => MeterEventStreamService::class,
];
protected function getServiceClass($name)
{
return \array_key_exists($name, self::$classMap) ? self::$classMap[$name] : null;
}
}
@@ -0,0 +1,28 @@
<?php
// File generated from our OpenAPI spec
namespace Stripe\Service\V2\Billing;
/**
* @phpstan-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
*
* @psalm-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
*/
class MeterEventAdjustmentService extends \Stripe\Service\AbstractService
{
/**
* Creates a meter event adjustment to cancel a previously sent meter event.
*
* @param null|array{cancel: array{identifier: string}, event_name: string, type: string} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @return \Stripe\V2\Billing\MeterEventAdjustment
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function create($params = null, $opts = null)
{
return $this->request('post', '/v2/billing/meter_event_adjustments', $params, $opts);
}
}
@@ -0,0 +1,30 @@
<?php
// File generated from our OpenAPI spec
namespace Stripe\Service\V2\Billing;
/**
* @phpstan-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
*
* @psalm-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
*/
class MeterEventService extends \Stripe\Service\AbstractService
{
/**
* Creates a meter event. Events are validated synchronously, but are processed
* asynchronously. Supports up to 1,000 events per second in livemode. For higher
* rate-limits, please use meter event streams instead.
*
* @param null|array{event_name: string, identifier?: string, payload: array<string, string>, timestamp?: string} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @return \Stripe\V2\Billing\MeterEvent
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function create($params = null, $opts = null)
{
return $this->request('post', '/v2/billing/meter_events', $params, $opts);
}
}
@@ -0,0 +1,30 @@
<?php
// File generated from our OpenAPI spec
namespace Stripe\Service\V2\Billing;
/**
* @phpstan-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
*
* @psalm-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
*/
class MeterEventSessionService extends \Stripe\Service\AbstractService
{
/**
* Creates a meter event session to send usage on the high-throughput meter event
* stream. Authentication tokens are only valid for 15 minutes, so you will need to
* create a new meter event session when your token expires.
*
* @param null|array $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @return \Stripe\V2\Billing\MeterEventSession
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function create($params = null, $opts = null)
{
return $this->request('post', '/v2/billing/meter_event_session', $params, $opts);
}
}
@@ -0,0 +1,34 @@
<?php
// File generated from our OpenAPI spec
namespace Stripe\Service\V2\Billing;
/**
* @phpstan-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
*
* @psalm-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
*/
class MeterEventStreamService extends \Stripe\Service\AbstractService
{
/**
* Creates meter events. Events are processed asynchronously, including validation.
* Requires a meter event session for authentication. Supports up to 10,000
* requests per second in livemode. For even higher rate-limits, contact sales.
*
* @param null|array{events: array{event_name: string, identifier?: string, payload: array<string, string>, timestamp?: string}[]} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @return void
*
* @throws \Stripe\Exception\TemporarySessionExpiredException
*/
public function create($params = null, $opts = null)
{
$opts = \Stripe\Util\RequestOptions::parse($opts);
if (!isset($opts->apiBase)) {
$opts->apiBase = $this->getClient()->getMeterEventsBase();
}
$this->request('post', '/v2/billing/meter_event_stream', $params, $opts);
}
}
@@ -0,0 +1,30 @@
<?php
// File generated from our OpenAPI spec
namespace Stripe\Service\V2\Core;
/**
* @phpstan-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
*
* @psalm-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
*/
class AccountLinkService extends \Stripe\Service\AbstractService
{
/**
* Creates an AccountLink object that includes a single-use URL that an account can
* use to access a Stripe-hosted flow for collecting or updating required
* information.
*
* @param null|array{account: string, use_case: array{type: string, account_onboarding?: array{collection_options?: array{fields?: string, future_requirements?: string}, configurations: string[], refresh_url: string, return_url?: string}, account_update?: array{collection_options?: array{fields?: string, future_requirements?: string}, configurations: string[], refresh_url: string, return_url?: string}}} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @return \Stripe\V2\Core\AccountLink
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function create($params = null, $opts = null)
{
return $this->request('post', '/v2/core/account_links', $params, $opts);
}
}
File diff suppressed because one or more lines are too long
@@ -0,0 +1,44 @@
<?php
// File generated from our OpenAPI spec
namespace Stripe\Service\V2\Core;
/**
* @phpstan-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
*
* @psalm-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
*/
class AccountTokenService extends \Stripe\Service\AbstractService
{
/**
* Creates an Account Token.
*
* @param null|array{contact_email?: string, display_name?: string, identity?: array{attestations?: array{directorship_declaration?: array{attested?: bool}, ownership_declaration?: array{attested?: bool}, persons_provided?: array{directors?: bool, executives?: bool, owners?: bool, ownership_exemption_reason?: string}, representative_declaration?: array{attested?: bool}, terms_of_service?: array{account?: array{shown_and_accepted?: bool}}}, business_details?: array{address?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string, town?: string}, annual_revenue?: array{amount?: array{value?: int, currency?: string}, fiscal_year_end?: string}, documents?: array{bank_account_ownership_verification?: array{files: string[], type: string}, company_license?: array{files: string[], type: string}, company_memorandum_of_association?: array{files: string[], type: string}, company_ministerial_decree?: array{files: string[], type: string}, company_registration_verification?: array{files: string[], type: string}, company_tax_id_verification?: array{files: string[], type: string}, primary_verification?: array{front_back: array{back?: string, front?: string}, type: string}, proof_of_address?: array{files: string[], type: string}, proof_of_registration?: array{files: string[], type: string}, proof_of_ultimate_beneficial_ownership?: array{files: string[], type: string}}, estimated_worker_count?: int, id_numbers?: array{registrar?: string, type: string, value: string}[], monthly_estimated_revenue?: array{amount?: array{value?: int, currency?: string}}, phone?: string, registered_name?: string, script_addresses?: array{kana?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string, town?: string}, kanji?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string, town?: string}}, script_names?: array{kana?: array{registered_name?: string}, kanji?: array{registered_name?: string}}, structure?: string}, entity_type?: string, individual?: array{additional_addresses?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, purpose: string, state?: string, town?: string}[], additional_names?: array{full_name?: string, given_name?: string, purpose: string, surname?: string}[], address?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string, town?: string}, date_of_birth?: array{day: int, month: int, year: int}, documents?: array{company_authorization?: array{files: string[], type: string}, passport?: array{files: string[], type: string}, primary_verification?: array{front_back: array{back?: string, front?: string}, type: string}, secondary_verification?: array{front_back: array{back?: string, front?: string}, type: string}, visa?: array{files: string[], type: string}}, email?: string, given_name?: string, id_numbers?: array{type: string, value: string}[], legal_gender?: string, metadata?: array<string, null|string>, nationalities?: string[], phone?: string, political_exposure?: string, relationship?: array{director?: bool, executive?: bool, owner?: bool, percent_ownership?: string, title?: string}, script_addresses?: array{kana?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string, town?: string}, kanji?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string, town?: string}}, script_names?: array{kana?: array{given_name?: string, surname?: string}, kanji?: array{given_name?: string, surname?: string}}, surname?: string}}} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @return \Stripe\V2\Core\AccountToken
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function create($params = null, $opts = null)
{
return $this->request('post', '/v2/core/account_tokens', $params, $opts);
}
/**
* Retrieves an Account Token.
*
* @param string $id
* @param null|array $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @return \Stripe\V2\Core\AccountToken
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function retrieve($id, $params = null, $opts = null)
{
return $this->request('get', $this->buildPath('/v2/core/account_tokens/%s', $id), $params, $opts);
}
}
@@ -0,0 +1,97 @@
<?php
// File generated from our OpenAPI spec
namespace Stripe\Service\V2\Core\Accounts;
/**
* @phpstan-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
*
* @psalm-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
*/
class PersonService extends \Stripe\Service\AbstractService
{
/**
* Returns a paginated list of Persons associated with an Account.
*
* @param string $id
* @param null|array{limit?: int} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @return \Stripe\V2\Collection<\Stripe\V2\Core\AccountPerson>
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function all($id, $params = null, $opts = null)
{
return $this->requestCollection('get', $this->buildPath('/v2/core/accounts/%s/persons', $id), $params, $opts);
}
/**
* Create a Person. Adds an individual to an Account's identity. You can set
* relationship attributes and identity information at creation.
*
* @param string $id
* @param null|array{additional_addresses?: array{city?: string, country: string, line1?: string, line2?: string, postal_code?: string, purpose: string, state?: string, town?: string}[], additional_names?: array{full_name?: string, given_name?: string, purpose: string, surname?: string}[], additional_terms_of_service?: array{account?: array{date: string, ip: string, user_agent?: string}}, address?: array{city?: string, country: string, line1?: string, line2?: string, postal_code?: string, state?: string, town?: string}, date_of_birth?: array{day: int, month: int, year: int}, documents?: array{company_authorization?: array{files: string[], type: string}, passport?: array{files: string[], type: string}, primary_verification?: array{front_back: array{back?: string, front: string}, type: string}, secondary_verification?: array{front_back: array{back?: string, front: string}, type: string}, visa?: array{files: string[], type: string}}, email?: string, given_name?: string, id_numbers?: array{type: string, value: string}[], legal_gender?: string, metadata?: array<string, string>, nationalities?: string[], person_token?: string, phone?: string, political_exposure?: string, relationship?: array{authorizer?: bool, director?: bool, executive?: bool, legal_guardian?: bool, owner?: bool, percent_ownership?: string, representative?: bool, title?: string}, script_addresses?: array{kana?: array{city?: string, country: string, line1?: string, line2?: string, postal_code?: string, state?: string, town?: string}, kanji?: array{city?: string, country: string, line1?: string, line2?: string, postal_code?: string, state?: string, town?: string}}, script_names?: array{kana?: array{given_name?: string, surname?: string}, kanji?: array{given_name?: string, surname?: string}}, surname?: string} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @return \Stripe\V2\Core\AccountPerson
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function create($id, $params = null, $opts = null)
{
return $this->request('post', $this->buildPath('/v2/core/accounts/%s/persons', $id), $params, $opts);
}
/**
* Delete a Person associated with an Account.
*
* @param string $parentId
* @param string $id
* @param null|array $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @return \Stripe\V2\DeletedObject
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function delete($parentId, $id, $params = null, $opts = null)
{
return $this->request('delete', $this->buildPath('/v2/core/accounts/%s/persons/%s', $parentId, $id), $params, $opts);
}
/**
* Retrieves a Person associated with an Account.
*
* @param string $parentId
* @param string $id
* @param null|array $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @return \Stripe\V2\Core\AccountPerson
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function retrieve($parentId, $id, $params = null, $opts = null)
{
return $this->request('get', $this->buildPath('/v2/core/accounts/%s/persons/%s', $parentId, $id), $params, $opts);
}
/**
* Updates a Person associated with an Account.
*
* @param string $parentId
* @param string $id
* @param null|array{additional_addresses?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, purpose: string, state?: string, town?: string}[], additional_names?: array{full_name?: string, given_name?: string, purpose: string, surname?: string}[], additional_terms_of_service?: array{account?: array{date?: string, ip?: string, user_agent?: string}}, address?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string, town?: string}, date_of_birth?: array{day: int, month: int, year: int}, documents?: array{company_authorization?: array{files: string[], type: string}, passport?: array{files: string[], type: string}, primary_verification?: array{front_back: array{back?: string, front?: string}, type: string}, secondary_verification?: array{front_back: array{back?: string, front?: string}, type: string}, visa?: array{files: string[], type: string}}, email?: string, given_name?: string, id_numbers?: array{type: string, value: string}[], legal_gender?: string, metadata?: array<string, null|string>, nationalities?: string[], person_token?: string, phone?: string, political_exposure?: string, relationship?: array{authorizer?: bool, director?: bool, executive?: bool, legal_guardian?: bool, owner?: bool, percent_ownership?: string, representative?: bool, title?: string}, script_addresses?: array{kana?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string, town?: string}, kanji?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string, town?: string}}, script_names?: array{kana?: array{given_name?: string, surname?: string}, kanji?: array{given_name?: string, surname?: string}}, surname?: string} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @return \Stripe\V2\Core\AccountPerson
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function update($parentId, $id, $params = null, $opts = null)
{
return $this->request('post', $this->buildPath('/v2/core/accounts/%s/persons/%s', $parentId, $id), $params, $opts);
}
}
@@ -0,0 +1,46 @@
<?php
// File generated from our OpenAPI spec
namespace Stripe\Service\V2\Core\Accounts;
/**
* @phpstan-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
*
* @psalm-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
*/
class PersonTokenService extends \Stripe\Service\AbstractService
{
/**
* Creates a Person Token associated with an Account.
*
* @param string $id
* @param null|array{additional_addresses?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, purpose: string, state?: string, town?: string}[], additional_names?: array{full_name?: string, given_name?: string, purpose: string, surname?: string}[], additional_terms_of_service?: array{account?: array{shown_and_accepted?: bool}}, address?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string, town?: string}, date_of_birth?: array{day: int, month: int, year: int}, documents?: array{company_authorization?: array{files: string[], type: string}, passport?: array{files: string[], type: string}, primary_verification?: array{front_back: array{back?: string, front?: string}, type: string}, secondary_verification?: array{front_back: array{back?: string, front?: string}, type: string}, visa?: array{files: string[], type: string}}, email?: string, given_name?: string, id_numbers?: array{type: string, value: string}[], legal_gender?: string, metadata?: array<string, null|string>, nationalities?: string[], phone?: string, political_exposure?: string, relationship?: array{authorizer?: bool, director?: bool, executive?: bool, legal_guardian?: bool, owner?: bool, percent_ownership?: string, representative?: bool, title?: string}, script_addresses?: array{kana?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string, town?: string}, kanji?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string, town?: string}}, script_names?: array{kana?: array{given_name?: string, surname?: string}, kanji?: array{given_name?: string, surname?: string}}, surname?: string} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @return \Stripe\V2\Core\AccountPersonToken
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function create($id, $params = null, $opts = null)
{
return $this->request('post', $this->buildPath('/v2/core/accounts/%s/person_tokens', $id), $params, $opts);
}
/**
* Retrieves a Person Token associated with an Account.
*
* @param string $parentId
* @param string $id
* @param null|array $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @return \Stripe\V2\Core\AccountPersonToken
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function retrieve($parentId, $id, $params = null, $opts = null)
{
return $this->request('get', $this->buildPath('/v2/core/accounts/%s/person_tokens/%s', $parentId, $id), $params, $opts);
}
}
@@ -0,0 +1,35 @@
<?php
namespace Stripe\Service\V2\Core;
/**
* Service factory class for API resources in the root namespace.
* // Doc: The beginning of the section generated from our OpenAPI spec.
*
* @property AccountLinkService $accountLinks
* @property AccountService $accounts
* @property AccountTokenService $accountTokens
* @property EventDestinationService $eventDestinations
* @property EventService $events
* // Doc: The end of the section generated from our OpenAPI spec
*/
class CoreServiceFactory extends \Stripe\Service\AbstractServiceFactory
{
/**
* @var array<string, string>
*/
private static $classMap = [
// Class Map: The beginning of the section generated from our OpenAPI spec
'accountLinks' => AccountLinkService::class,
'accounts' => AccountService::class,
'accountTokens' => AccountTokenService::class,
'eventDestinations' => EventDestinationService::class,
'events' => EventService::class,
// Class Map: The end of the section generated from our OpenAPI spec
];
protected function getServiceClass($name)
{
return \array_key_exists($name, self::$classMap) ? self::$classMap[$name] : null;
}
}
@@ -0,0 +1,139 @@
<?php
// File generated from our OpenAPI spec
namespace Stripe\Service\V2\Core;
/**
* @phpstan-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
*
* @psalm-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
*/
class EventDestinationService extends \Stripe\Service\AbstractService
{
/**
* Lists all event destinations.
*
* @param null|array{include?: string[], limit?: int} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @return \Stripe\V2\Collection<\Stripe\V2\Core\EventDestination>
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function all($params = null, $opts = null)
{
return $this->requestCollection('get', '/v2/core/event_destinations', $params, $opts);
}
/**
* Create a new event destination.
*
* @param null|array{description?: string, enabled_events: string[], event_payload: string, events_from?: string[], include?: string[], metadata?: array<string, string>, name: string, snapshot_api_version?: string, type: string, amazon_eventbridge?: array{aws_account_id: string, aws_region: string}, webhook_endpoint?: array{url: string}} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @return \Stripe\V2\Core\EventDestination
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function create($params = null, $opts = null)
{
return $this->request('post', '/v2/core/event_destinations', $params, $opts);
}
/**
* Delete an event destination.
*
* @param string $id
* @param null|array $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @return \Stripe\V2\DeletedObject
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function delete($id, $params = null, $opts = null)
{
return $this->request('delete', $this->buildPath('/v2/core/event_destinations/%s', $id), $params, $opts);
}
/**
* Disable an event destination.
*
* @param string $id
* @param null|array $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @return \Stripe\V2\Core\EventDestination
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function disable($id, $params = null, $opts = null)
{
return $this->request('post', $this->buildPath('/v2/core/event_destinations/%s/disable', $id), $params, $opts);
}
/**
* Enable an event destination.
*
* @param string $id
* @param null|array $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @return \Stripe\V2\Core\EventDestination
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function enable($id, $params = null, $opts = null)
{
return $this->request('post', $this->buildPath('/v2/core/event_destinations/%s/enable', $id), $params, $opts);
}
/**
* Send a `ping` event to an event destination.
*
* @param string $id
* @param null|array $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @return \Stripe\V2\Core\Event
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function ping($id, $params = null, $opts = null)
{
return $this->request('post', $this->buildPath('/v2/core/event_destinations/%s/ping', $id), $params, $opts);
}
/**
* Retrieves the details of an event destination.
*
* @param string $id
* @param null|array{include?: string[]} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @return \Stripe\V2\Core\EventDestination
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function retrieve($id, $params = null, $opts = null)
{
return $this->request('get', $this->buildPath('/v2/core/event_destinations/%s', $id), $params, $opts);
}
/**
* Update the details of an event destination.
*
* @param string $id
* @param null|array{description?: string, enabled_events?: string[], include?: string[], metadata?: array<string, null|string>, name?: string, webhook_endpoint?: array{url: string}} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @return \Stripe\V2\Core\EventDestination
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function update($id, $params = null, $opts = null)
{
return $this->request('post', $this->buildPath('/v2/core/event_destinations/%s', $id), $params, $opts);
}
}
@@ -0,0 +1,44 @@
<?php
// File generated from our OpenAPI spec
namespace Stripe\Service\V2\Core;
/**
* @phpstan-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
*
* @psalm-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
*/
class EventService extends \Stripe\Service\AbstractService
{
/**
* List events, going back up to 30 days.
*
* @param null|array{created?: array{gt?: string, gte?: string, lt?: string, lte?: string}, limit?: int, object_id?: string, types?: string[]} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @return \Stripe\V2\Collection<\Stripe\V2\Core\Event>
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function all($params = null, $opts = null)
{
return $this->requestCollection('get', '/v2/core/events', $params, $opts);
}
/**
* Retrieves the details of an event.
*
* @param string $id
* @param null|array $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @return \Stripe\V2\Core\Event
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function retrieve($id, $params = null, $opts = null)
{
return $this->request('get', $this->buildPath('/v2/core/events/%s', $id), $params, $opts);
}
}
@@ -0,0 +1,27 @@
<?php
// File generated from our OpenAPI spec
namespace Stripe\Service\V2;
/**
* Service factory class for API resources in the V2 namespace.
*
* @property Billing\BillingServiceFactory $billing
* @property Core\CoreServiceFactory $core
*/
class V2ServiceFactory extends \Stripe\Service\AbstractServiceFactory
{
/**
* @var array<string, string>
*/
private static $classMap = [
'billing' => Billing\BillingServiceFactory::class,
'core' => Core\CoreServiceFactory::class,
];
protected function getServiceClass($name)
{
return \array_key_exists($name, self::$classMap) ? self::$classMap[$name] : null;
}
}