Extension and action examples
Use the action functions with records and Data objects supplied by your application. They pass each argument to the package operation and return its result.
These adapters show container registration. Use the owning package registry when a contract requires contributor discovery.
Contract adapters wrap an existing implementation. Call their registration function from your service provider with that implementation; tagged contracts keep their declared tag. Resolve the backend by its concrete class before registration so the replacement contract does not resolve itself. Static contract metadata uses one backend class per adapter.
Action ingestShopifyWebhook
Section titled “Action ingestShopifyWebhook”<?phpdeclare(strict_types=1);
namespace App\CapellExamples\ShopifyCommerce;
function runIngestShopifyWebhook(\Capell\ShopifyCommerce\Models\ShopifyConnection $connection, string $topic, array $payload): void{ \Capell\ShopifyCommerce\Actions\Webhooks\IngestShopifyWebhookAction::run($connection, $topic, $payload);}Action install
Section titled “Action install”<?phpdeclare(strict_types=1);
namespace App\CapellExamples\ShopifyCommerce;
function runInstall(\Capell\Core\Data\PackageData $package, array $arguments = [], ?\Capell\Core\Contracts\ProgressReporter $reporter = null): void{ \Capell\ShopifyCommerce\Actions\InstallShopifyCommercePackageAction::run($package, $arguments, $reporter);}Action persistShopifyProduct
Section titled “Action persistShopifyProduct”<?phpdeclare(strict_types=1);
namespace App\CapellExamples\ShopifyCommerce;
function runPersistShopifyProduct(\Capell\ShopifyCommerce\Models\ShopifyConnection $connection, \Capell\ShopifyCommerce\Data\ShopifyProductData $product, \Carbon\CarbonInterface $syncedAt): \Capell\ShopifyCommerce\Models\ShopifyProduct{ return \Capell\ShopifyCommerce\Actions\Catalog\PersistShopifyProductAction::run($connection, $product, $syncedAt);}Action pruneExpiredShopifyOAuthStates
Section titled “Action pruneExpiredShopifyOAuthStates”<?phpdeclare(strict_types=1);
namespace App\CapellExamples\ShopifyCommerce;
function runPruneExpiredShopifyOAuthStates(): int{ return \Capell\ShopifyCommerce\Actions\OAuth\PruneExpiredShopifyOAuthStatesAction::run();}Action syncShopifyCustomers
Section titled “Action syncShopifyCustomers”<?phpdeclare(strict_types=1);
namespace App\CapellExamples\ShopifyCommerce;
function runSyncShopifyCustomers(\Capell\ShopifyCommerce\Models\ShopifyConnection|int $connection): int{ return \Capell\ShopifyCommerce\Actions\Customers\SyncShopifyCustomersAction::run($connection);}Action upsertShopifyCustomer
Section titled “Action upsertShopifyCustomer”<?phpdeclare(strict_types=1);
namespace App\CapellExamples\ShopifyCommerce;
function runUpsertShopifyCustomer(\Capell\ShopifyCommerce\Models\ShopifyConnection $connection, array $snapshot): \Capell\ShopifyCommerce\Models\ShopifyCustomer{ return \Capell\ShopifyCommerce\Actions\Customers\UpsertShopifyCustomerAction::run($connection, $snapshot);}