-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Defaulting label to Office for supplier address.
- Loading branch information
1 parent
e6a016a
commit f462983
Showing
3 changed files
with
41 additions
and
24 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 |
---|---|---|
@@ -1,6 +1,7 @@ | ||
<?php | ||
|
||
use PHPUnit\Framework\TestCase; | ||
use Skuio\Sdk\DataType\Address; | ||
use Skuio\Sdk\DataType\Supplier; | ||
use Skuio\Sdk\Service\Suppliers; | ||
use Skuio\Sdk\Sdk; | ||
|
@@ -34,12 +35,27 @@ public function testCreateSupplier(){ | |
$supplier = new Supplier(); | ||
$supplier->name = 'Default Supplier API'; | ||
|
||
$supplier->setOfficeAddress([ | ||
'label' => 'Address Name', | ||
'email' => '[email protected]', | ||
'country_code' => 'US', | ||
'province_code' => '90210' | ||
]); | ||
// Add address with Address object | ||
$address = new Address(); | ||
// $address->name = 'Office Address'; | ||
$address->address1 = '123 High St.'; | ||
$address->address2 = 'Unit 4483'; | ||
$address->address3 = 'Left Lane'; | ||
$address->country_code = 'US'; | ||
$address->zip = '90210'; | ||
$address->city = 'Los Angeles'; | ||
$address->province = 'California'; | ||
$address->province_code = 'CA'; | ||
$supplier->addOfficeAddress($address); | ||
|
||
|
||
// Add address with array | ||
// $supplier->addOfficeAddress([ | ||
// 'label' => 'Address Name', | ||
// 'email' => '[email protected]', | ||
// 'country_code' => 'US', | ||
// 'zip' => '90210' | ||
// ]); | ||
|
||
$suppliers = new Suppliers(); | ||
$response = $suppliers->store($supplier); | ||
|