Releases: UltraCart/rest_api_v2_sdk_php
Releases · UltraCart/rest_api_v2_sdk_php
New api constructors, major doc updates
3.1.0 New api constructors, major doc updates
Another automation test, no changes
3.0.76 StoreFront Communication plan revision (internal use)
StoreFront Communication plan revision (internal use)
3.0.75 StoreFront Communication plan revision (internal use)
Testing automation. No changes
3.0.74 more bugfix around retry logic
retry logic still broken
3.0.73 more bugfix around retry logic
Breakfix for retry logic. 3.0.71 is broken
We're still trying to get this retry logic working. But we have to deploy out new versions so our merchant base can perform testing. Sorry.
Bugfix on PHP SDK Retry logic NPE
3.0.71 PHP SDK Retry logic NPE bug fix
Maintenance Release - 3.0.68
- Coupon Batching
- Screen recording api
- Email campaign/flow folder support to allow for better management
Maintenance Release - 3.0.62
Automatic Retry (v3.0.62, January 2021)
Starting with 3.0.62, we have modified the standard SDK to include retry logic. This logic was handled to allow
client code to automatically retry if it trips the server side rate limiter
Usage
Set the MaxRetyAfter (seconds) within the Configuration object. This is a failsafe to avoid having client code
hang forever if the retry-after header returns a large number. If you don't mind your code waiting for an hour, then
you may set the retry to 3600, etc.
ultracart\v2\Configuration::getDefaultConfiguration()->setMaxRetrySeconds(30);
This is the actual logic used to determine if a retry should be attempted:
try {
$response = $this->client->send($request, $options);
} catch (RequestException $e) {
// BEGIN Retry Logic
if($e->getResponse()) {
$retryAfter = 0;
if (array_key_exists('Retry-After', $headers)) {
$retryAfter = intval($headers['Retry-After'][0]);
}
if ($statusCode == 429 && $retry && $retryAfter > 0 && $retryAfter <= $this->config->getMaxRetrySeconds()) {
sleep($retryAfter);
return $this->getCustomersByQueryWithHttpInfoRetry(false, $customer_query, $_limit, $_offset, $_since, $_sort, $_expand);
}
}
// End Retry Logic
throw new ApiException(
"[{$e->getCode()}] {$e->getMessage()}",
$e->getCode(),
$e->getResponse() ? $e->getResponse()->getHeaders() : null,
$e->getResponse() ? $e->getResponse()->getBody()->getContents() : null
);
}
Maintenance Release - 3.0.60
Roll up of changes.