mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-12-10 19:41:26 +01:00
Update Stripe lib to 10.7.0
This commit is contained in:
@@ -12,6 +12,11 @@ abstract class AbstractService
|
||||
*/
|
||||
protected $client;
|
||||
|
||||
/**
|
||||
* @var \Stripe\StripeStreamingClientInterface
|
||||
*/
|
||||
protected $streamingClient;
|
||||
|
||||
/**
|
||||
* Initializes a new instance of the {@link AbstractService} class.
|
||||
*
|
||||
@@ -20,6 +25,7 @@ abstract class AbstractService
|
||||
public function __construct($client)
|
||||
{
|
||||
$this->client = $client;
|
||||
$this->streamingClient = $client;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -32,6 +38,16 @@ abstract class AbstractService
|
||||
return $this->client;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the client used by this service to send requests.
|
||||
*
|
||||
* @return \Stripe\StripeStreamingClientInterface
|
||||
*/
|
||||
public function getStreamingClient()
|
||||
{
|
||||
return $this->streamingClient;
|
||||
}
|
||||
|
||||
/**
|
||||
* Translate null values to empty strings. For service methods,
|
||||
* we interpret null as a request to unset the field, which
|
||||
@@ -59,11 +75,21 @@ abstract class AbstractService
|
||||
return $this->getClient()->request($method, $path, static::formatParams($params), $opts);
|
||||
}
|
||||
|
||||
protected function requestStream($method, $path, $readBodyChunkCallable, $params, $opts)
|
||||
{
|
||||
return $this->getStreamingClient()->requestStream($method, $path, $readBodyChunkCallable, static::formatParams($params), $opts);
|
||||
}
|
||||
|
||||
protected function requestCollection($method, $path, $params, $opts)
|
||||
{
|
||||
return $this->getClient()->requestCollection($method, $path, static::formatParams($params), $opts);
|
||||
}
|
||||
|
||||
protected function requestSearchResult($method, $path, $params, $opts)
|
||||
{
|
||||
return $this->getClient()->requestSearchResult($method, $path, static::formatParams($params), $opts);
|
||||
}
|
||||
|
||||
protected function buildPath($basePath, ...$ids)
|
||||
{
|
||||
foreach ($ids as $id) {
|
||||
|
||||
Reference in New Issue
Block a user