diff --git a/src/Commands/TokenRefresh.php b/src/Commands/TokenRefresh.php new file mode 100644 index 0000000..bbb2b4b --- /dev/null +++ b/src/Commands/TokenRefresh.php @@ -0,0 +1,54 @@ +providerToken($this->argument('user')); + + $old = $to->refresh_token; + + $x = $to->refreshToken(); + + dump([ + 'access'=>$to->access_token, + 'old'=>$old, + 'refresh'=>$to->refresh_token, + 'expires'=>(string)$to->refresh_token_expires_at, + 'x'=>$x, + ]); + + return self::SUCCESS; + } +} diff --git a/src/Providers/IntuitServiceProvider.php b/src/Providers/IntuitServiceProvider.php index f27fa2c..f97b3be 100644 --- a/src/Providers/IntuitServiceProvider.php +++ b/src/Providers/IntuitServiceProvider.php @@ -4,7 +4,7 @@ namespace Intuit\Providers; use Illuminate\Routing\Router; use Illuminate\Support\ServiceProvider; -use Intuit\Commands\{AccountGet,InvoiceGet,PaymentGet,TaxCodeGet}; +use Intuit\Commands\{AccountGet,InvoiceGet,PaymentGet,TaxCodeGet,TokenRefresh}; /** * Class IntuitServiceProvider. @@ -27,6 +27,7 @@ class IntuitServiceProvider extends ServiceProvider InvoiceGet::class, PaymentGet::class, TaxCodeGet::class, + TokenRefresh::class, ]); }