GroupRepositoryInterface
Magento\Customer\Api\GroupRepositoryInterface
What it does
This interface defines the contract for managing customer groups in Magento 2, providing CRUD operations (Create, Read, Update, Delete).
Developers use this repository to save, retrieve, list, and delete customer groups programmatically, such as when creating custom pricing rules, managing customer segmentation, or building admin interfaces for group management.
It follows Magento's service contract pattern for consistent API interactions.
Public Methods
- save()
- getById()
- getList()
- delete()
- deleteById()