Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

* Your improvement here!

## 1.5.0

* Adds shopper activity v3 end points (Thanks @RickKukiela!)

## 1.4.2

* Update composer.json to allow newer PHP.
Expand Down
8 changes: 4 additions & 4 deletions src/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
*/
class Client
{
const VERSION = '1.4.2';
const VERSION = '1.5.0';

/** @var string */
protected $api_key = '';
Expand Down Expand Up @@ -450,7 +450,7 @@ public function record_event($params)
*/
public function create_or_update_cart($params)
{
if(strstr($this->api_end_point, '/v3') === false) {
if (strstr($this->api_end_point, '/v3') === false) {
throw new Exception(__CLASS__ . '::' . __METHOD__ . ' only supports the APIv3 endpoint.');
}
return $this->make_request("$this->account_id/shopper_activity/cart", $params, self::POST);
Expand All @@ -467,7 +467,7 @@ public function create_or_update_cart($params)
*/
public function create_or_update_order($params)
{
if(strstr($this->api_end_point, '/v3') === false) {
if (strstr($this->api_end_point, '/v3') === false) {
throw new Exception(__CLASS__ . '::' . __METHOD__ . ' only supports the APIv3 endpoint.');
}
return $this->make_request("$this->account_id/shopper_activity/order", $params, self::POST);
Expand All @@ -484,7 +484,7 @@ public function create_or_update_order($params)
*/
public function create_or_update_product($params)
{
if(strstr($this->api_end_point, '/v3') === false) {
if (strstr($this->api_end_point, '/v3') === false) {
throw new Exception(__CLASS__ . '::' . __METHOD__ . ' only supports the APIv3 endpoint.');
}
return $this->make_request("$this->account_id/shopper_activity/product", $params, self::POST);
Expand Down