Editing Discount Cards is Unlinked from Editing Clients
Starting from V6, clients (IClient) and discount cards (IDiscountCard) are created and edited separately. The owner’s name (OwnerName) is now available for discount cards.
Clients and discount cards are reference lists of different types; transactional changes to discount cards within a editing session are not supported, so the simultaneous creation/editing of discount cards while creating/editing clients did not work correctly. Furthermore, small atomic methods provide more flexibility compared to bulky combinations. A discount card is an independent entity, not tied to a client, meaning you can create and use a discount card separately without using the client reference list, you can have a client separately, or you can use both together, linking them through the card number.
Starting from V6, the method CreateClient creates only a client, the arguments for simultaneous creation of a discount card have been removed, and the method ChangeClientCardNumber changes the card number only for the client, with the arguments for simultaneous modification of the discount card removed.
There are separate methods for working with discount cards:
CreateDiscountCard— creates a discount card with the specified number, owner’s name, discount type, or price category. If another card with the same number already exists, an exception will be thrown. You can check for the existence of another card with the same number through search.UpdateDiscountCard— updates the discount card with the specified id, allowing you to set new values for the card number, owner’s name, discount type, or price category. To find out the card id, you need to either remember it at the time of creation (the result of callingCreateDiscountCard), or find it at any time by number (SearchDiscountCardByNumber).