forked from ptondereau/Laravel-UPS-Api
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add sandbox mode and Shipping class (ptondereau#4)
* Add sandbox parameter * Add sandbox parameter to constructors * Add Shipping service * Update readme * Fix code style notices * Fix indentation according to CI reqs Despite it looks weird now * Stupid CI :) * Fix review notes
- Loading branch information
1 parent
d8e2a59
commit 4d03046
Showing
7 changed files
with
150 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<?php | ||
|
||
namespace Ptondereau\LaravelUpsApi\Facades; | ||
|
||
use Illuminate\Support\Facades\Facade; | ||
|
||
/** | ||
* This is the Tradeability facade class. | ||
* | ||
* @author Pierre Tondereau <[email protected]> | ||
*/ | ||
class UpsShipping extends Facade | ||
{ | ||
/** | ||
* Get the registered name of the component. | ||
* | ||
* @return string | ||
*/ | ||
protected static function getFacadeAccessor() | ||
{ | ||
return 'ups.shipping'; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
<?php | ||
|
||
namespace Ptondereau\Tests\LaravelUpsApi\Facades; | ||
|
||
use GrahamCampbell\TestBenchCore\FacadeTrait; | ||
use Ptondereau\LaravelUpsApi\Facades\UpsShipping; | ||
use Ptondereau\Tests\LaravelUpsApi\TestCase; | ||
use Ups\Shipping; | ||
|
||
/** | ||
* This is the UpsTradeabilityTest facade test class. | ||
* | ||
* @author Pierre Tondereau <[email protected]> | ||
*/ | ||
class UpsShippingTest extends TestCase | ||
{ | ||
use FacadeTrait; | ||
|
||
/** | ||
* Get the facade accessor. | ||
* | ||
* @return string | ||
*/ | ||
protected function getFacadeAccessor() | ||
{ | ||
return 'ups.shipping'; | ||
} | ||
|
||
/** | ||
* Get the facade class. | ||
* | ||
* @return string | ||
*/ | ||
protected function getFacadeClass() | ||
{ | ||
return UpsShipping::class; | ||
} | ||
|
||
/** | ||
* Get the facade root. | ||
* | ||
* @return string | ||
*/ | ||
protected function getFacadeRoot() | ||
{ | ||
return Shipping::class; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters