genyaa/shopware-api-sdk

This package is abandoned and no longer maintained. The author suggests using the sas/shopware-laravel-sdk package instead.

Laravel package for the shopware API.

v0.8.8 2021-07-08 21:29 UTC

This package is auto-updated.

Last update: 2023-02-16 14:20:32 UTC


README

This package provides an SDK for Laravel to connect to Shopware 6 default API scheme.

This package is a WIP and will be updated on the main branch until stable.

How to setup

Publish config file:

php artisan vendor:publish --provider="GeNyaa\ShopwareApiSdk\ShopwareApiSdkServiceProvider" --tag="config"

Initial client:

$client = app(\GeNyaa\ShopwareApiSdk\ShopwareApiClient::class);

Helper functions

shopwareCollect(string $resource, mixed $value = null)

Creates a resource collection of Resource(s).

Example usage:

use GeNyaa\ShopwareApiSdk\Dto\Resources\Category;

shopwareCollect(Category::class, []);

shopwareCustomFields(array $value = []): CustomFields

Creates a CustomFields class from array.

Example usage:

shopwareCustomFields([
    'fieldName' => 'fieldValue',
]);

shopwareParameters(array $value = []): Parameters

Creates a Parameters class from array.

Example usage:

shopwareParameters([
    'parameterName' => 'parameterValue',
]);

shopwareHeader(array $value = []): Header

Creates a Header class from array.

Example usage:

shopwareHeader([
    'headerName' => 'headerValue',
]);

shopwareUuid(): string

Generates a Uuid to Shopware spec.