Fix: Corriger le type PDO dans StripeService et retirer getConnection()
This commit is contained in:
63
api/vendor/stripe/stripe-php/lib/Service/Tax/CalculationService.php
vendored
Normal file
63
api/vendor/stripe/stripe-php/lib/Service/Tax/CalculationService.php
vendored
Normal file
@@ -0,0 +1,63 @@
|
||||
<?php
|
||||
|
||||
// File generated from our OpenAPI spec
|
||||
|
||||
namespace Stripe\Service\Tax;
|
||||
|
||||
/**
|
||||
* @phpstan-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
|
||||
*
|
||||
* @psalm-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
|
||||
*/
|
||||
class CalculationService extends \Stripe\Service\AbstractService
|
||||
{
|
||||
/**
|
||||
* Retrieves the line items of a tax calculation as a collection, if the
|
||||
* calculation hasn’t expired.
|
||||
*
|
||||
* @param string $id
|
||||
* @param null|array{ending_before?: string, expand?: string[], limit?: int, starting_after?: string} $params
|
||||
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
|
||||
*
|
||||
* @return \Stripe\Collection<\Stripe\Tax\CalculationLineItem>
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*/
|
||||
public function allLineItems($id, $params = null, $opts = null)
|
||||
{
|
||||
return $this->requestCollection('get', $this->buildPath('/v1/tax/calculations/%s/line_items', $id), $params, $opts);
|
||||
}
|
||||
|
||||
/**
|
||||
* Calculates tax based on the input and returns a Tax <code>Calculation</code>
|
||||
* object.
|
||||
*
|
||||
* @param null|array{currency: string, customer?: string, customer_details?: array{address?: array{city?: null|string, country: string, line1?: null|string, line2?: null|string, postal_code?: null|string, state?: null|string}, address_source?: string, ip_address?: string, tax_ids?: array{type: string, value: string}[], taxability_override?: string}, expand?: string[], line_items: array{amount: int, metadata?: array<string, string>, product?: string, quantity?: int, reference?: string, tax_behavior?: string, tax_code?: string}[], ship_from_details?: array{address: array{city?: null|string, country: string, line1?: null|string, line2?: null|string, postal_code?: null|string, state?: null|string}}, shipping_cost?: array{amount?: int, shipping_rate?: string, tax_behavior?: string, tax_code?: string}, tax_date?: int} $params
|
||||
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
|
||||
*
|
||||
* @return \Stripe\Tax\Calculation
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*/
|
||||
public function create($params = null, $opts = null)
|
||||
{
|
||||
return $this->request('post', '/v1/tax/calculations', $params, $opts);
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves a Tax <code>Calculation</code> object, if the calculation hasn’t
|
||||
* expired.
|
||||
*
|
||||
* @param string $id
|
||||
* @param null|array{expand?: string[]} $params
|
||||
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
|
||||
*
|
||||
* @return \Stripe\Tax\Calculation
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*/
|
||||
public function retrieve($id, $params = null, $opts = null)
|
||||
{
|
||||
return $this->request('get', $this->buildPath('/v1/tax/calculations/%s', $id), $params, $opts);
|
||||
}
|
||||
}
|
||||
78
api/vendor/stripe/stripe-php/lib/Service/Tax/RegistrationService.php
vendored
Normal file
78
api/vendor/stripe/stripe-php/lib/Service/Tax/RegistrationService.php
vendored
Normal file
File diff suppressed because one or more lines are too long
44
api/vendor/stripe/stripe-php/lib/Service/Tax/SettingsService.php
vendored
Normal file
44
api/vendor/stripe/stripe-php/lib/Service/Tax/SettingsService.php
vendored
Normal file
@@ -0,0 +1,44 @@
|
||||
<?php
|
||||
|
||||
// File generated from our OpenAPI spec
|
||||
|
||||
namespace Stripe\Service\Tax;
|
||||
|
||||
/**
|
||||
* @phpstan-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
|
||||
*
|
||||
* @psalm-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
|
||||
*/
|
||||
class SettingsService extends \Stripe\Service\AbstractService
|
||||
{
|
||||
/**
|
||||
* Retrieves Tax <code>Settings</code> for a merchant.
|
||||
*
|
||||
* @param null|array{expand?: string[]} $params
|
||||
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
|
||||
*
|
||||
* @return \Stripe\Tax\Settings
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*/
|
||||
public function retrieve($params = null, $opts = null)
|
||||
{
|
||||
return $this->request('get', '/v1/tax/settings', $params, $opts);
|
||||
}
|
||||
|
||||
/**
|
||||
* Updates Tax <code>Settings</code> parameters used in tax calculations. All
|
||||
* parameters are editable but none can be removed once set.
|
||||
*
|
||||
* @param null|array{defaults?: array{tax_behavior?: string, tax_code?: string}, expand?: string[], head_office?: array{address: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}}} $params
|
||||
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
|
||||
*
|
||||
* @return \Stripe\Tax\Settings
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*/
|
||||
public function update($params = null, $opts = null)
|
||||
{
|
||||
return $this->request('post', '/v1/tax/settings', $params, $opts);
|
||||
}
|
||||
}
|
||||
31
api/vendor/stripe/stripe-php/lib/Service/Tax/TaxServiceFactory.php
vendored
Normal file
31
api/vendor/stripe/stripe-php/lib/Service/Tax/TaxServiceFactory.php
vendored
Normal file
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
// File generated from our OpenAPI spec
|
||||
|
||||
namespace Stripe\Service\Tax;
|
||||
|
||||
/**
|
||||
* Service factory class for API resources in the Tax namespace.
|
||||
*
|
||||
* @property CalculationService $calculations
|
||||
* @property RegistrationService $registrations
|
||||
* @property SettingsService $settings
|
||||
* @property TransactionService $transactions
|
||||
*/
|
||||
class TaxServiceFactory extends \Stripe\Service\AbstractServiceFactory
|
||||
{
|
||||
/**
|
||||
* @var array<string, string>
|
||||
*/
|
||||
private static $classMap = [
|
||||
'calculations' => CalculationService::class,
|
||||
'registrations' => RegistrationService::class,
|
||||
'settings' => SettingsService::class,
|
||||
'transactions' => TransactionService::class,
|
||||
];
|
||||
|
||||
protected function getServiceClass($name)
|
||||
{
|
||||
return \array_key_exists($name, self::$classMap) ? self::$classMap[$name] : null;
|
||||
}
|
||||
}
|
||||
76
api/vendor/stripe/stripe-php/lib/Service/Tax/TransactionService.php
vendored
Normal file
76
api/vendor/stripe/stripe-php/lib/Service/Tax/TransactionService.php
vendored
Normal file
@@ -0,0 +1,76 @@
|
||||
<?php
|
||||
|
||||
// File generated from our OpenAPI spec
|
||||
|
||||
namespace Stripe\Service\Tax;
|
||||
|
||||
/**
|
||||
* @phpstan-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
|
||||
*
|
||||
* @psalm-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
|
||||
*/
|
||||
class TransactionService extends \Stripe\Service\AbstractService
|
||||
{
|
||||
/**
|
||||
* Retrieves the line items of a committed standalone transaction as a collection.
|
||||
*
|
||||
* @param string $id
|
||||
* @param null|array{ending_before?: string, expand?: string[], limit?: int, starting_after?: string} $params
|
||||
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
|
||||
*
|
||||
* @return \Stripe\Collection<\Stripe\Tax\TransactionLineItem>
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*/
|
||||
public function allLineItems($id, $params = null, $opts = null)
|
||||
{
|
||||
return $this->requestCollection('get', $this->buildPath('/v1/tax/transactions/%s/line_items', $id), $params, $opts);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a Tax Transaction from a calculation, if that calculation hasn’t
|
||||
* expired. Calculations expire after 90 days.
|
||||
*
|
||||
* @param null|array{calculation: string, expand?: string[], metadata?: array<string, string>, posted_at?: int, reference: string} $params
|
||||
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
|
||||
*
|
||||
* @return \Stripe\Tax\Transaction
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*/
|
||||
public function createFromCalculation($params = null, $opts = null)
|
||||
{
|
||||
return $this->request('post', '/v1/tax/transactions/create_from_calculation', $params, $opts);
|
||||
}
|
||||
|
||||
/**
|
||||
* Partially or fully reverses a previously created <code>Transaction</code>.
|
||||
*
|
||||
* @param null|array{expand?: string[], flat_amount?: int, line_items?: array{amount: int, amount_tax: int, metadata?: array<string, string>, original_line_item: string, quantity?: int, reference: string}[], metadata?: array<string, string>, mode: string, original_transaction: string, reference: string, shipping_cost?: array{amount: int, amount_tax: int}} $params
|
||||
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
|
||||
*
|
||||
* @return \Stripe\Tax\Transaction
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*/
|
||||
public function createReversal($params = null, $opts = null)
|
||||
{
|
||||
return $this->request('post', '/v1/tax/transactions/create_reversal', $params, $opts);
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves a Tax <code>Transaction</code> object.
|
||||
*
|
||||
* @param string $id
|
||||
* @param null|array{expand?: string[]} $params
|
||||
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
|
||||
*
|
||||
* @return \Stripe\Tax\Transaction
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*/
|
||||
public function retrieve($id, $params = null, $opts = null)
|
||||
{
|
||||
return $this->request('get', $this->buildPath('/v1/tax/transactions/%s', $id), $params, $opts);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user