Skip to content

Commit b689f22

Browse files
Merge pull request #16 from PureClarity/dev
Release 2.1.2
2 parents fcc376e + 6259285 commit b689f22

10 files changed

Lines changed: 10 additions & 10 deletions

File tree

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"description": "PureClarity Intelligent Personalization - PHP SDK",
44
"type": "library",
55
"license": ["OSL-3.0"],
6-
"version": "2.1.1",
6+
"version": "2.1.2",
77
"require": {
88
"php": "^5.6|^7.0",
99
"ext-json": "*",

src/PureClarity/Api/Delete/Submit.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ private function send()
8080
$error = $curl->getError();
8181
$body = $curl->getBody();
8282

83-
if ($status !== 200) {
83+
if ($status < 200 || $status > 299) {
8484
throw new Exception(
8585
'Error: HTTP ' . $status . ' Response | ' .
8686
'Error Message: ' . $error . ' | ' .

src/PureClarity/Api/Delta/Base.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ private function sendDelta($body)
166166
$error = $curl->getError();
167167
$body = $curl->getBody();
168168

169-
if ($status !== 200) {
169+
if ($status < 200 || $status > 299) {
170170
throw new Exception(
171171
'Error: HTTP ' . $status . ' Response | ' .
172172
'Error Message: ' . $error . ' | ' .

src/PureClarity/Api/Feed/Transfer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ private function send($endPoint, $data)
144144
$error = $curl->getError();
145145
$body = $curl->getBody();
146146

147-
if ($status !== 200) {
147+
if ($status < 200 || $status > 299) {
148148
throw new Exception(
149149
'Error: HTTP ' . $status . ' Response | ' .
150150
'Message: ' . $error . ' | ' .

src/PureClarity/Api/Feedback/Submit.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ private function send()
8787
$error = $curl->getError();
8888
$body = $curl->getBody();
8989

90-
if ($status !== 200) {
90+
if ($status < 200 || $status > 299) {
9191
throw new Exception(
9292
'Error: HTTP ' . $status . ' Response | ' .
9393
'Error Message: ' . $error . ' | ' .

src/PureClarity/Api/Info/Dashboard.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ private function send()
7575
$error = $curl->getError();
7676
$body = $curl->getBody();
7777

78-
if ($status !== 200) {
78+
if ($status < 200 || $status > 299) {
7979
throw new Exception(
8080
'Error: HTTP ' . $status . ' Response | ' .
8181
'Error Message: ' . $error . ' | ' .

src/PureClarity/Api/NextSteps/Complete.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ private function send()
7575
$error = $curl->getError();
7676
$body = $curl->getBody();
7777

78-
if ($status !== 200) {
78+
if ($status < 200 || $status > 299) {
7979
throw new Exception(
8080
'Error: HTTP ' . $status . ' Response | ' .
8181
'Error Message: ' . $error . ' | ' .

src/PureClarity/Api/Signup/AddStore/Processor.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public function process($response)
3939
$result['response'] = $this->processBody($response);
4040
$result['errors'] = $this->processErrors($result['response'], $response);
4141

42-
if ($response['status'] === 200) {
42+
if ($response['status'] >= 200 && $response['status'] <= 299) {
4343
$result['success'] = true;
4444
}
4545
}

src/PureClarity/Api/Signup/Status/Processor.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ private function processErrors($processedBody, $response)
9292
private function isComplete($response)
9393
{
9494
$complete = false;
95-
if ($response['status'] === 200 &&
95+
if (($response['status'] >= 200 && $response['status'] <= 299) &&
9696
$this->isResponseBodyValid($response['response']) &&
9797
$response['response']['Complete'] === true
9898
) {

src/PureClarity/Api/Signup/Submit/Processor.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public function process($response)
3939
$result['response'] = $this->processBody($response);
4040
$result['errors'] = $this->processErrors($result['response'], $response);
4141

42-
if ($response['status'] === 200) {
42+
if ($response['status'] >= 200 && $response['status'] <= 299) {
4343
$result['success'] = true;
4444
}
4545
}

0 commit comments

Comments
 (0)