-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GitAuto: [FEATURE] Implement SKU EAN API #334
GitAuto: [FEATURE] Implement SKU EAN API #334
Conversation
Important Review skippedBot user detected. To trigger a single review, invoke the You can disable this status message by setting the 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
Infisical secrets check: ✅ No secrets leaked! 💻 Scan logs12:11AM INF scanning for exposed secrets...
12:11AM INF 321 commits scanned.
12:11AM INF scan completed in 254ms
12:11AM INF no leaks found
|
Resolves #26
What is the feature
This feature implements support for the SKU EAN API, allowing users to consult, create, or update an SKU's unique identification code (barcode) within the application. By integrating this API, users can manage SKU barcodes directly, enhancing inventory management and product identification processes.
Why we need the feature
Barcodes (EANs) are essential for product identification, inventory tracking, and sales operations. Integrating the SKU EAN API enables efficient management of SKU barcodes within the application, reducing manual efforts and minimizing errors. This feature enhances the application's value by streamlining barcode management and supporting seamless synchronization with VTEX's platform.
How to implement and why
Create a New Client for SKU EAN API:
SkuEanClient
in theSrc/VTEX/Clients/Catalog
directory.Define the Interface:
ISkuEanClient
inSrc/VTEX/Clients/Catalog/Contracts
to outline the methods for consulting, creating, and updating SKU EANs.Implement API Methods:
Task<IEnumerable<string>> GetSkuEansAsync(int skuId)
to retrieve all EANs associated with a specific SKU.Task AddSkuEanAsync(int skuId, string ean)
to associate a new EAN with a SKU.Task UpdateSkuEanAsync(int skuId, string oldEan, string newEan)
to update an existing EAN for a SKU.Handle HTTP Requests and Responses:
Update Dependency Injection Configuration:
ISkuEanClient
andSkuEanClient
in the dependency injection container withinSrc/VTEX/Startup.cs
or relevant configuration files.Add Unit and Integration Tests:
Tests
directory, create corresponding test classesSkuEanClientTests
.Update Documentation:
README.md
or relevant documentation files to include usage examples and any setup instructions required for the new client.Ensure Consistent Coding Standards:
.csharpierrc.yaml
or similar configuration files.Versioning:
About backward compatibility
This addition maintains backward compatibility since it introduces new classes and interfaces without altering existing ones. Existing functionality remains unaffected, and consumers of the library or application are not required to make any changes unless they choose to utilize the new SKU EAN features. This ensures a seamless upgrade path for users who may want to adopt the new functionality at their convenience.
Test these changes locally