Collections (Dart)
Le module StoreCollectionModule permet de gérer les collections de produits.
Accès : applite.app.store.collection
Méthodes
list
final response = await applite.app.store.collection.list(
ListCollectionsParams(apiKey: 'api_key', appId: 'app_id'),
);create
final response = await applite.app.store.collection.create(
CreateCollectionParams(
apiKey: 'api_key',
appId: 'app_id',
title: 'Été 2024',
slug: 'ete-2024',
description: 'Collection été',
type: CollectionType.manual,
productIds: ['prod_123', 'prod_456'],
isActive: true,
),
);get
final response = await applite.app.store.collection.get(
GetCollectionParams(apiKey: 'api_key', appId: 'app_id', id: 'collection_id'),
);update
final response = await applite.app.store.collection.update(
UpdateCollectionParams(
apiKey: 'api_key',
appId: 'app_id',
id: 'collection_id',
title: 'Été 2024 - Soldes',
productIds: ['prod_123', 'prod_456', 'prod_789'],
),
);delete
final response = await applite.app.store.collection.delete(
DeleteCollectionParams(apiKey: 'api_key', appId: 'app_id', id: 'collection_id'),
);Types
CollectionType
enum CollectionType {
manual, // Produits ajoutés manuellement
automatic, // Produits ajoutés par règles
}Last updated on