Initial Commit
This commit is contained in:
37
dependencies/stripe/stripe-php/lib/Service/Tax/CalculationService.php
vendored
Normal file
37
dependencies/stripe/stripe-php/lib/Service/Tax/CalculationService.php
vendored
Normal file
@ -0,0 +1,37 @@
|
||||
<?php
|
||||
|
||||
// File generated from our OpenAPI spec
|
||||
namespace WP_Ultimo\Dependencies\Stripe\Service\Tax;
|
||||
|
||||
class CalculationService extends \WP_Ultimo\Dependencies\Stripe\Service\AbstractService
|
||||
{
|
||||
/**
|
||||
* Retrieves the line items of a persisted tax calculation as a collection.
|
||||
*
|
||||
* @param string $id
|
||||
* @param null|array $params
|
||||
* @param null|array|\Stripe\Util\RequestOptions $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return \Stripe\Collection<\Stripe\Tax\CalculationLineItem>
|
||||
*/
|
||||
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 input and returns a Tax <code>Calculation</code> object.
|
||||
*
|
||||
* @param null|array $params
|
||||
* @param null|array|\Stripe\Util\RequestOptions $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return \Stripe\Tax\Calculation
|
||||
*/
|
||||
public function create($params = null, $opts = null)
|
||||
{
|
||||
return $this->request('post', '/v1/tax/calculations', $params, $opts);
|
||||
}
|
||||
}
|
37
dependencies/stripe/stripe-php/lib/Service/Tax/SettingsService.php
vendored
Normal file
37
dependencies/stripe/stripe-php/lib/Service/Tax/SettingsService.php
vendored
Normal file
@ -0,0 +1,37 @@
|
||||
<?php
|
||||
|
||||
// File generated from our OpenAPI spec
|
||||
namespace WP_Ultimo\Dependencies\Stripe\Service\Tax;
|
||||
|
||||
class SettingsService extends \WP_Ultimo\Dependencies\Stripe\Service\AbstractService
|
||||
{
|
||||
/**
|
||||
* Retrieves Tax <code>Settings</code> for a merchant.
|
||||
*
|
||||
* @param null|array $params
|
||||
* @param null|array|\Stripe\Util\RequestOptions $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return \Stripe\Tax\Settings
|
||||
*/
|
||||
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 $params
|
||||
* @param null|array|\Stripe\Util\RequestOptions $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return \Stripe\Tax\Settings
|
||||
*/
|
||||
public function update($params = null, $opts = null)
|
||||
{
|
||||
return $this->request('post', '/v1/tax/settings', $params, $opts);
|
||||
}
|
||||
}
|
23
dependencies/stripe/stripe-php/lib/Service/Tax/TaxServiceFactory.php
vendored
Normal file
23
dependencies/stripe/stripe-php/lib/Service/Tax/TaxServiceFactory.php
vendored
Normal file
@ -0,0 +1,23 @@
|
||||
<?php
|
||||
|
||||
// File generated from our OpenAPI spec
|
||||
namespace WP_Ultimo\Dependencies\Stripe\Service\Tax;
|
||||
|
||||
/**
|
||||
* Service factory class for API resources in the Tax namespace.
|
||||
*
|
||||
* @property CalculationService $calculations
|
||||
* @property SettingsService $settings
|
||||
* @property TransactionService $transactions
|
||||
*/
|
||||
class TaxServiceFactory extends \WP_Ultimo\Dependencies\Stripe\Service\AbstractServiceFactory
|
||||
{
|
||||
/**
|
||||
* @var array<string, string>
|
||||
*/
|
||||
private static $classMap = ['calculations' => CalculationService::class, 'settings' => SettingsService::class, 'transactions' => TransactionService::class];
|
||||
protected function getServiceClass($name)
|
||||
{
|
||||
return \array_key_exists($name, self::$classMap) ? self::$classMap[$name] : null;
|
||||
}
|
||||
}
|
66
dependencies/stripe/stripe-php/lib/Service/Tax/TransactionService.php
vendored
Normal file
66
dependencies/stripe/stripe-php/lib/Service/Tax/TransactionService.php
vendored
Normal file
@ -0,0 +1,66 @@
|
||||
<?php
|
||||
|
||||
// File generated from our OpenAPI spec
|
||||
namespace WP_Ultimo\Dependencies\Stripe\Service\Tax;
|
||||
|
||||
class TransactionService extends \WP_Ultimo\Dependencies\Stripe\Service\AbstractService
|
||||
{
|
||||
/**
|
||||
* Retrieves the line items of a committed standalone transaction as a collection.
|
||||
*
|
||||
* @param string $id
|
||||
* @param null|array $params
|
||||
* @param null|array|\Stripe\Util\RequestOptions $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return \Stripe\Collection<\Stripe\Tax\TransactionLineItem>
|
||||
*/
|
||||
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 <code>Transaction</code> from a calculation.
|
||||
*
|
||||
* @param null|array $params
|
||||
* @param null|array|\Stripe\Util\RequestOptions $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return \Stripe\Tax\Transaction
|
||||
*/
|
||||
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 $params
|
||||
* @param null|array|\Stripe\Util\RequestOptions $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return \Stripe\Tax\Transaction
|
||||
*/
|
||||
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 $params
|
||||
* @param null|array|\Stripe\Util\RequestOptions $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return \Stripe\Tax\Transaction
|
||||
*/
|
||||
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