forked from Wavyzz/dolibarr
Update Stripe lib to 10.7.0
This commit is contained in:
@@ -15,7 +15,7 @@ class CustomerService extends \Stripe\Service\AbstractService
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return \Stripe\Collection
|
||||
* @return \Stripe\Collection<\Stripe\Customer>
|
||||
*/
|
||||
public function all($params = null, $opts = null)
|
||||
{
|
||||
@@ -32,13 +32,46 @@ class CustomerService extends \Stripe\Service\AbstractService
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return \Stripe\Collection
|
||||
* @return \Stripe\Collection<\Stripe\CustomerBalanceTransaction>
|
||||
*/
|
||||
public function allBalanceTransactions($parentId, $params = null, $opts = null)
|
||||
{
|
||||
return $this->requestCollection('get', $this->buildPath('/v1/customers/%s/balance_transactions', $parentId), $params, $opts);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a list of transactions that modified the customer’s <a
|
||||
* href="/docs/payments/customer-balance">cash balance</a>.
|
||||
*
|
||||
* @param string $parentId
|
||||
* @param null|array $params
|
||||
* @param null|array|\Stripe\Util\RequestOptions $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return \Stripe\Collection<\Stripe\CustomerCashBalanceTransaction>
|
||||
*/
|
||||
public function allCashBalanceTransactions($parentId, $params = null, $opts = null)
|
||||
{
|
||||
return $this->requestCollection('get', $this->buildPath('/v1/customers/%s/cash_balance_transactions', $parentId), $params, $opts);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a list of PaymentMethods for a given Customer.
|
||||
*
|
||||
* @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\PaymentMethod>
|
||||
*/
|
||||
public function allPaymentMethods($id, $params = null, $opts = null)
|
||||
{
|
||||
return $this->requestCollection('get', $this->buildPath('/v1/customers/%s/payment_methods', $id), $params, $opts);
|
||||
}
|
||||
|
||||
/**
|
||||
* List sources for a specified customer.
|
||||
*
|
||||
@@ -48,7 +81,7 @@ class CustomerService extends \Stripe\Service\AbstractService
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return \Stripe\Collection
|
||||
* @return \Stripe\Collection<\Stripe\BankAccount|\Stripe\Card|\Stripe\Source>
|
||||
*/
|
||||
public function allSources($parentId, $params = null, $opts = null)
|
||||
{
|
||||
@@ -64,7 +97,7 @@ class CustomerService extends \Stripe\Service\AbstractService
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return \Stripe\Collection
|
||||
* @return \Stripe\Collection<\Stripe\TaxId>
|
||||
*/
|
||||
public function allTaxIds($parentId, $params = null, $opts = null)
|
||||
{
|
||||
@@ -103,6 +136,26 @@ class CustomerService extends \Stripe\Service\AbstractService
|
||||
return $this->request('post', $this->buildPath('/v1/customers/%s/balance_transactions', $parentId), $params, $opts);
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieve funding instructions for a customer cash balance. If funding
|
||||
* instructions do not yet exist for the customer, new funding instructions will be
|
||||
* created. If funding instructions have already been created for a given customer,
|
||||
* the same funding instructions will be retrieved. In other words, we will return
|
||||
* the same funding instructions each time.
|
||||
*
|
||||
* @param string $id
|
||||
* @param null|array $params
|
||||
* @param null|array|\Stripe\Util\RequestOptions $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return \Stripe\Customer
|
||||
*/
|
||||
public function createFundingInstructions($id, $params = null, $opts = null)
|
||||
{
|
||||
return $this->request('post', $this->buildPath('/v1/customers/%s/funding_instructions', $id), $params, $opts);
|
||||
}
|
||||
|
||||
/**
|
||||
* When you create a new credit card, you must specify a customer or recipient on
|
||||
* which to create it.
|
||||
@@ -118,7 +171,7 @@ class CustomerService extends \Stripe\Service\AbstractService
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return \Stripe\AlipayAccount|\Stripe\BankAccount|\Stripe\BitcoinReceiver|\Stripe\Card|\Stripe\Source
|
||||
* @return \Stripe\BankAccount|\Stripe\Card|\Stripe\Source
|
||||
*/
|
||||
public function createSource($parentId, $params = null, $opts = null)
|
||||
{
|
||||
@@ -182,7 +235,7 @@ class CustomerService extends \Stripe\Service\AbstractService
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return \Stripe\AlipayAccount|\Stripe\BankAccount|\Stripe\BitcoinReceiver|\Stripe\Card|\Stripe\Source
|
||||
* @return \Stripe\BankAccount|\Stripe\Card|\Stripe\Source
|
||||
*/
|
||||
public function deleteSource($parentId, $id, $params = null, $opts = null)
|
||||
{
|
||||
@@ -207,8 +260,7 @@ class CustomerService extends \Stripe\Service\AbstractService
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves the details of an existing customer. You need only supply the unique
|
||||
* customer identifier that was returned upon customer creation.
|
||||
* Retrieves a Customer object.
|
||||
*
|
||||
* @param string $id
|
||||
* @param null|array $params
|
||||
@@ -241,6 +293,57 @@ class CustomerService extends \Stripe\Service\AbstractService
|
||||
return $this->request('get', $this->buildPath('/v1/customers/%s/balance_transactions/%s', $parentId, $id), $params, $opts);
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves a customer’s cash balance.
|
||||
*
|
||||
* @param string $parentId
|
||||
* @param null|array $params
|
||||
* @param null|array|\Stripe\Util\RequestOptions $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return \Stripe\CashBalance
|
||||
*/
|
||||
public function retrieveCashBalance($parentId, $params = null, $opts = null)
|
||||
{
|
||||
return $this->request('get', $this->buildPath('/v1/customers/%s/cash_balance', $parentId), $params, $opts);
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves a specific cash balance transaction, which updated the customer’s <a
|
||||
* href="/docs/payments/customer-balance">cash balance</a>.
|
||||
*
|
||||
* @param string $parentId
|
||||
* @param string $id
|
||||
* @param null|array $params
|
||||
* @param null|array|\Stripe\Util\RequestOptions $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return \Stripe\CustomerCashBalanceTransaction
|
||||
*/
|
||||
public function retrieveCashBalanceTransaction($parentId, $id, $params = null, $opts = null)
|
||||
{
|
||||
return $this->request('get', $this->buildPath('/v1/customers/%s/cash_balance_transactions/%s', $parentId, $id), $params, $opts);
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves a PaymentMethod object for a given Customer.
|
||||
*
|
||||
* @param string $parentId
|
||||
* @param string $id
|
||||
* @param null|array $params
|
||||
* @param null|array|\Stripe\Util\RequestOptions $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return \Stripe\Customer
|
||||
*/
|
||||
public function retrievePaymentMethod($parentId, $id, $params = null, $opts = null)
|
||||
{
|
||||
return $this->request('get', $this->buildPath('/v1/customers/%s/payment_methods/%s', $parentId, $id), $params, $opts);
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieve a specified source for a given customer.
|
||||
*
|
||||
@@ -251,7 +354,7 @@ class CustomerService extends \Stripe\Service\AbstractService
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return \Stripe\AlipayAccount|\Stripe\BankAccount|\Stripe\BitcoinReceiver|\Stripe\Card|\Stripe\Source
|
||||
* @return \Stripe\BankAccount|\Stripe\Card|\Stripe\Source
|
||||
*/
|
||||
public function retrieveSource($parentId, $id, $params = null, $opts = null)
|
||||
{
|
||||
@@ -275,6 +378,26 @@ class CustomerService extends \Stripe\Service\AbstractService
|
||||
return $this->request('get', $this->buildPath('/v1/customers/%s/tax_ids/%s', $parentId, $id), $params, $opts);
|
||||
}
|
||||
|
||||
/**
|
||||
* Search for customers you’ve previously created using Stripe’s <a
|
||||
* href="/docs/search#search-query-language">Search Query Language</a>. Don’t use
|
||||
* search in read-after-write flows where strict consistency is necessary. Under
|
||||
* normal operating conditions, data is searchable in less than a minute.
|
||||
* Occasionally, propagation of new or updated data can be up to an hour behind
|
||||
* during outages. Search functionality is not available to merchants in India.
|
||||
*
|
||||
* @param null|array $params
|
||||
* @param null|array|\Stripe\Util\RequestOptions $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return \Stripe\SearchResult<\Stripe\Customer>
|
||||
*/
|
||||
public function search($params = null, $opts = null)
|
||||
{
|
||||
return $this->requestSearchResult('get', '/v1/customers/search', $params, $opts);
|
||||
}
|
||||
|
||||
/**
|
||||
* Updates the specified customer by setting the values of the parameters passed.
|
||||
* Any parameters not provided will be left unchanged. For example, if you pass the
|
||||
@@ -321,6 +444,22 @@ class CustomerService extends \Stripe\Service\AbstractService
|
||||
return $this->request('post', $this->buildPath('/v1/customers/%s/balance_transactions/%s', $parentId, $id), $params, $opts);
|
||||
}
|
||||
|
||||
/**
|
||||
* Changes the settings on a customer’s cash balance.
|
||||
*
|
||||
* @param string $parentId
|
||||
* @param null|array $params
|
||||
* @param null|array|\Stripe\Util\RequestOptions $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return \Stripe\CashBalance
|
||||
*/
|
||||
public function updateCashBalance($parentId, $params = null, $opts = null)
|
||||
{
|
||||
return $this->request('post', $this->buildPath('/v1/customers/%s/cash_balance', $parentId), $params, $opts);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $parentId
|
||||
* @param string $id
|
||||
@@ -329,7 +468,7 @@ class CustomerService extends \Stripe\Service\AbstractService
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return \Stripe\AlipayAccount|\Stripe\BankAccount|\Stripe\BitcoinReceiver|\Stripe\Card|\Stripe\Source
|
||||
* @return \Stripe\BankAccount|\Stripe\Card|\Stripe\Source
|
||||
*/
|
||||
public function updateSource($parentId, $id, $params = null, $opts = null)
|
||||
{
|
||||
@@ -344,7 +483,7 @@ class CustomerService extends \Stripe\Service\AbstractService
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return \Stripe\AlipayAccount|\Stripe\BankAccount|\Stripe\BitcoinReceiver|\Stripe\Card|\Stripe\Source
|
||||
* @return \Stripe\BankAccount|\Stripe\Card|\Stripe\Source
|
||||
*/
|
||||
public function verifySource($parentId, $id, $params = null, $opts = null)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user