From aaa4ff6c3cb8adbc7c90876b077d92cccd9b7332 Mon Sep 17 00:00:00 2001 From: Cristian Asenjo Date: Thu, 5 May 2016 13:15:59 -0700 Subject: [PATCH 1/3] Add missing delete() method to Address facade --- src/Facade/Address.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Facade/Address.php b/src/Facade/Address.php index ad82bef..440a06d 100755 --- a/src/Facade/Address.php +++ b/src/Facade/Address.php @@ -54,6 +54,11 @@ public static function Listing($customer, $terms = array()) return self::$sdk->get('customers/'.$customer.'/addresses', $terms); } + public static function Delete($customer, $id) + { + return self::$sdk->delete('customers/'.$customer.'/addresses/'.$id); + } + public static function Fields($customer = null, $id = null) { $uri = 'customers'; From 5ddd3e44aa7fd8f257e6be9d2c403b73fdca7e1b Mon Sep 17 00:00:00 2001 From: Cristian Asenjo Date: Thu, 5 May 2016 13:21:25 -0700 Subject: [PATCH 2/3] Patch SDK to force token refresh authenticate() --- src/SDK.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/SDK.php b/src/SDK.php index 8b6f657..0de802a 100755 --- a/src/SDK.php +++ b/src/SDK.php @@ -67,7 +67,7 @@ public function __construct(\Moltin\SDK\StorageInterface $store, \Moltin\SDK\Req public function authenticate(\Moltin\SDK\AuthenticateInterface $auth, $args = array()) { // Skip active auth or refresh current - if ($this->expires > 0 and $this->expires > time()) { + if ($this->expires > 0 and $this->expires > time() and false) { return true; } else if ($this->expires > 0 and $this->expires < time() and $this->refresh !== null) { return $this->refresh($args); From b504c8ff8f2e525f1fd738f40d91956cfaafc489 Mon Sep 17 00:00:00 2001 From: Cristian Asenjo Date: Fri, 13 May 2016 10:54:01 -0400 Subject: [PATCH 3/3] Undo auth patch --- src/SDK.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/SDK.php b/src/SDK.php index 0de802a..8b6f657 100755 --- a/src/SDK.php +++ b/src/SDK.php @@ -67,7 +67,7 @@ public function __construct(\Moltin\SDK\StorageInterface $store, \Moltin\SDK\Req public function authenticate(\Moltin\SDK\AuthenticateInterface $auth, $args = array()) { // Skip active auth or refresh current - if ($this->expires > 0 and $this->expires > time() and false) { + if ($this->expires > 0 and $this->expires > time()) { return true; } else if ($this->expires > 0 and $this->expires < time() and $this->refresh !== null) { return $this->refresh($args);