-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #30 from vienthuong/1.4.0
Release 1.4.0
- Loading branch information
Showing
58 changed files
with
880 additions
and
23 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
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,37 @@ | ||
<?php | ||
|
||
require __DIR__ . '/../vendor/autoload.php'; | ||
|
||
use Vin\ShopwareSdk\Data\Context; | ||
use Vin\ShopwareSdk\Service\AdminSearchService; | ||
use Vin\ShopwareSdk\Data\Criteria; | ||
use Vin\ShopwareSdk\Service\Struct\KeyValuePairs; | ||
use Vin\ShopwareSdk\Service\Struct\KeyValuePair; | ||
|
||
class AdminSearchExample { | ||
public function execute(): void | ||
{ | ||
require __DIR__ . '/token.php'; | ||
|
||
$context = new Context($config['shop_url'], $accessToken); | ||
$service = new AdminSearchService($context); | ||
|
||
$productCriteria = new Criteria(); | ||
$productCriteria->addAssociation('categories'); | ||
$productCriteria->setTerm('feeb9f03a8ca49749f8cce86c9a3d4d7'); | ||
|
||
$customerCriteria = new Criteria(); | ||
$customerCriteria->setTerm('501e41803e7b4ca8b54a7ed72b498568pharvey@example.com'); | ||
|
||
$criteriaCollection = new KeyValuePairs(); | ||
$criteriaCollection->add(KeyValuePair::create('product', $productCriteria)); | ||
$criteriaCollection->add(KeyValuePair::create('customer', $customerCriteria)); | ||
|
||
$result = $service->search($criteriaCollection); | ||
|
||
dd($result); | ||
} | ||
} | ||
|
||
$example = new AdminSearchExample(); | ||
$example->execute(); |
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,27 @@ | ||
<?php | ||
|
||
require __DIR__ . '/../vendor/autoload.php'; | ||
|
||
use Vin\ShopwareSdk\Data\Context; | ||
use Vin\ShopwareSdk\Service\NotificationService; | ||
use Vin\ShopwareSdk\Service\Struct\Notification; | ||
|
||
class NotificationServiceExample { | ||
public function execute(): void | ||
{ | ||
require __DIR__ . '/token.php'; | ||
|
||
$context = new Context($config['shop_url'], $accessToken); | ||
$service = new NotificationService($context); | ||
|
||
$notification = Notification::createNotificationSuccess('Hello from External App!'); | ||
|
||
$service->sendNotification($notification); | ||
|
||
$notifications = $service->fetchNotification(); | ||
dump($notifications); | ||
} | ||
} | ||
|
||
$example = new NotificationServiceExample(); | ||
$example->execute(); |
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,27 @@ | ||
<?php | ||
|
||
require __DIR__ . '/../vendor/autoload.php'; | ||
|
||
use Vin\ShopwareSdk\Data\Context; | ||
use Vin\ShopwareSdk\Service\SystemConfigService; | ||
use Vin\ShopwareSdk\Service\Struct\KeyValuePair; | ||
|
||
class SystemConfigServiceExample { | ||
public function execute(): void | ||
{ | ||
require __DIR__ . '/token.php'; | ||
|
||
$context = new Context($config['shop_url'], $accessToken); | ||
$service = new SystemConfigService($context); | ||
|
||
$config = KeyValuePair::create('my.config.key1', ['test' => 'my.config.value1']); | ||
|
||
$service->save($config); | ||
|
||
$config = $service->getConfiguration('core.basicInformation'); | ||
dump($config); | ||
} | ||
} | ||
|
||
$example = new SystemConfigServiceExample(); | ||
$example->execute(); |
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,31 @@ | ||
<?php | ||
|
||
require __DIR__ . '/../vendor/autoload.php'; | ||
|
||
use Vin\ShopwareSdk\Data\Context; | ||
use Vin\ShopwareSdk\Service\UserConfigService; | ||
use Vin\ShopwareSdk\Service\Struct\KeyValuePair; | ||
use Vin\ShopwareSdk\Service\Struct\KeyValuePairs; | ||
|
||
class UserConfigServiceExample { | ||
public function execute(): void | ||
{ | ||
require __DIR__ . '/token.php'; | ||
|
||
$context = new Context($config['shop_url'], $accessToken); | ||
$service = new UserConfigService($context); | ||
|
||
$config1 = KeyValuePair::create('my.config.key1', ['test' => 'my.config.value1']); | ||
$config2 = KeyValuePair::create('my.config.key2', ['another' => 'my.config.value2']); | ||
|
||
$pairs = new KeyValuePairs([$config1, $config2]); | ||
|
||
$service->saveConfigMe($pairs); | ||
|
||
$configs = $service->getConfigMe($pairs->getKeys()); | ||
dump($configs); | ||
} | ||
} | ||
|
||
$example = new UserConfigServiceExample(); | ||
$example->execute(); |
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
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
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
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
Oops, something went wrong.