@labdigital/commercetools-mock 2.15.0 → 2.16.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -3287,6 +3287,14 @@ var CustomerRepository = class extends AbstractResourceRepository {
3287
3287
  throw new Error("Resource has no custom field");
3288
3288
  }
3289
3289
  resource.custom.fields[name] = value;
3290
+ },
3291
+ setCustomerNumber: (_context, resource, { customerNumber }) => {
3292
+ if (resource.customerNumber) {
3293
+ throw new Error(
3294
+ "A Customer number already exists and cannot be set again."
3295
+ );
3296
+ }
3297
+ resource.customerNumber = customerNumber;
3290
3298
  }
3291
3299
  };
3292
3300
  };