Search in sources :

Example 1 with CustomerSyncOptions

use of com.commercetools.sync.customers.CustomerSyncOptions in project commercetools-sync-java by commercetools.

the class CustomerSyncIT method setUpCustomerSync.

private void setUpCustomerSync() {
    errorMessages = new ArrayList<>();
    exceptions = new ArrayList<>();
    final CustomerSyncOptions customerSyncOptions = CustomerSyncOptionsBuilder.of(CTP_TARGET_CLIENT).errorCallback((exception, oldResource, newResource, actions) -> {
        errorMessages.add(exception.getMessage());
        exceptions.add(exception);
    }).build();
    customerSync = new CustomerSync(customerSyncOptions);
    referenceIdToKeyCache = new CaffeineReferenceIdToKeyCacheImpl();
}
Also used : BeforeEach(org.junit.jupiter.api.BeforeEach) CustomerTransformUtils(com.commercetools.sync.customers.utils.CustomerTransformUtils) CTP_SOURCE_CLIENT(com.commercetools.sync.integration.commons.utils.SphereClientUtils.CTP_SOURCE_CLIENT) Assertions.assertThat(org.assertj.core.api.Assertions.assertThat) AssertionsForStatistics.assertThat(com.commercetools.sync.commons.asserts.statistics.AssertionsForStatistics.assertThat) CustomerSyncStatistics(com.commercetools.sync.customers.helpers.CustomerSyncStatistics) Address(io.sphere.sdk.models.Address) CustomerITUtils.deleteCustomerSyncTestData(com.commercetools.sync.integration.commons.utils.CustomerITUtils.deleteCustomerSyncTestData) Collections.singletonList(java.util.Collections.singletonList) ArrayList(java.util.ArrayList) AfterAll(org.junit.jupiter.api.AfterAll) CustomerITUtils.createSampleCustomerJohnDoe(com.commercetools.sync.integration.commons.utils.CustomerITUtils.createSampleCustomerJohnDoe) CustomerQuery(io.sphere.sdk.customers.queries.CustomerQuery) ReferenceIdToKeyCache(com.commercetools.sync.commons.utils.ReferenceIdToKeyCache) Nonnull(javax.annotation.Nonnull) CountryCode(com.neovisionaries.i18n.CountryCode) CustomerITUtils.createSampleCustomerJaneDoe(com.commercetools.sync.integration.commons.utils.CustomerITUtils.createSampleCustomerJaneDoe) CaffeineReferenceIdToKeyCacheImpl(com.commercetools.sync.commons.utils.CaffeineReferenceIdToKeyCacheImpl) StoreITUtils.createStore(com.commercetools.sync.integration.commons.utils.StoreITUtils.createStore) CustomerDraftBuilder(io.sphere.sdk.customers.CustomerDraftBuilder) Store(io.sphere.sdk.stores.Store) CustomerSync(com.commercetools.sync.customers.CustomerSync) ITUtils.createCustomFieldsJsonMap(com.commercetools.sync.integration.commons.utils.ITUtils.createCustomFieldsJsonMap) Customer(io.sphere.sdk.customers.Customer) Collectors(java.util.stream.Collectors) Test(org.junit.jupiter.api.Test) CustomerSyncOptionsBuilder(com.commercetools.sync.customers.CustomerSyncOptionsBuilder) CustomFieldsDraft(io.sphere.sdk.types.CustomFieldsDraft) List(java.util.List) CustomerSyncOptions(com.commercetools.sync.customers.CustomerSyncOptions) AssertionsForStatistics(com.commercetools.sync.commons.asserts.statistics.AssertionsForStatistics) CustomerDraft(io.sphere.sdk.customers.CustomerDraft) CTP_TARGET_CLIENT(com.commercetools.sync.integration.commons.utils.SphereClientUtils.CTP_TARGET_CLIENT) ResourceIdentifier(io.sphere.sdk.models.ResourceIdentifier) CustomerSyncOptions(com.commercetools.sync.customers.CustomerSyncOptions) CustomerSync(com.commercetools.sync.customers.CustomerSync) CaffeineReferenceIdToKeyCacheImpl(com.commercetools.sync.commons.utils.CaffeineReferenceIdToKeyCacheImpl)

Example 2 with CustomerSyncOptions

use of com.commercetools.sync.customers.CustomerSyncOptions in project commercetools-sync-java by commercetools.

the class CustomerUpdateActionUtilsTest method buildSetCustomerNumberUpdateAction_withDifferentValues_ShouldNotReturnActionAndAddWarningCallback.

@Test
void buildSetCustomerNumberUpdateAction_withDifferentValues_ShouldNotReturnActionAndAddWarningCallback() {
    final List<String> warningMessages = new ArrayList<>();
    final CustomerSyncOptions customerSyncOptions = CustomerSyncOptionsBuilder.of(mock(SphereClient.class)).warningCallback((exception, oldResource, newResource) -> warningMessages.add(exception.getMessage())).build();
    final Optional<UpdateAction<Customer>> result = buildSetCustomerNumberUpdateAction(old, newDifferent, customerSyncOptions);
    assertThat(result).isEmpty();
    assertThat(warningMessages).containsExactly(format(CUSTOMER_NUMBER_EXISTS_WARNING, old.getKey(), "1234"));
}
Also used : BeforeEach(org.junit.jupiter.api.BeforeEach) Reference(io.sphere.sdk.models.Reference) Assertions.assertThat(org.assertj.core.api.Assertions.assertThat) UpdateAction(io.sphere.sdk.commands.UpdateAction) SetCustomerNumber(io.sphere.sdk.customers.commands.updateactions.SetCustomerNumber) CUSTOMER_NUMBER_EXISTS_WARNING(com.commercetools.sync.customers.utils.CustomerUpdateActionUtils.CUSTOMER_NUMBER_EXISTS_WARNING) CustomerUpdateActionUtils.buildSetMiddleNameUpdateAction(com.commercetools.sync.customers.utils.CustomerUpdateActionUtils.buildSetMiddleNameUpdateAction) SetMiddleName(io.sphere.sdk.customers.commands.updateactions.SetMiddleName) SetFirstName(io.sphere.sdk.customers.commands.updateactions.SetFirstName) SetDateOfBirth(io.sphere.sdk.customers.commands.updateactions.SetDateOfBirth) Locale(java.util.Locale) SphereClient(io.sphere.sdk.client.SphereClient) SetLocale(io.sphere.sdk.customers.commands.updateactions.SetLocale) CustomerUpdateActionUtils.buildSetCustomerNumberUpdateAction(com.commercetools.sync.customers.utils.CustomerUpdateActionUtils.buildSetCustomerNumberUpdateAction) CustomerUpdateActionUtils.buildSetLocaleUpdateAction(com.commercetools.sync.customers.utils.CustomerUpdateActionUtils.buildSetLocaleUpdateAction) SetExternalId(io.sphere.sdk.customers.commands.updateactions.SetExternalId) CustomerUpdateActionUtils.buildSetVatIdUpdateAction(com.commercetools.sync.customers.utils.CustomerUpdateActionUtils.buildSetVatIdUpdateAction) ChangeEmail(io.sphere.sdk.customers.commands.updateactions.ChangeEmail) UUID(java.util.UUID) Customer(io.sphere.sdk.customers.Customer) String.format(java.lang.String.format) CustomerUpdateActionUtils.buildSetFirstNameUpdateAction(com.commercetools.sync.customers.utils.CustomerUpdateActionUtils.buildSetFirstNameUpdateAction) Test(org.junit.jupiter.api.Test) CustomerUpdateActionUtils.buildSetSalutationUpdateAction(com.commercetools.sync.customers.utils.CustomerUpdateActionUtils.buildSetSalutationUpdateAction) CustomerSyncOptionsBuilder(com.commercetools.sync.customers.CustomerSyncOptionsBuilder) CustomerName(io.sphere.sdk.customers.CustomerName) List(java.util.List) SetCustomerGroup(io.sphere.sdk.customers.commands.updateactions.SetCustomerGroup) SetVatId(io.sphere.sdk.customers.commands.updateactions.SetVatId) LocalDate(java.time.LocalDate) Optional(java.util.Optional) Mockito.mock(org.mockito.Mockito.mock) ResourceIdentifier(io.sphere.sdk.models.ResourceIdentifier) CustomerUpdateActionUtils.buildSetLastNameUpdateAction(com.commercetools.sync.customers.utils.CustomerUpdateActionUtils.buildSetLastNameUpdateAction) SetTitle(io.sphere.sdk.customers.commands.updateactions.SetTitle) CustomerUpdateActionUtils.buildSetTitleUpdateAction(com.commercetools.sync.customers.utils.CustomerUpdateActionUtils.buildSetTitleUpdateAction) CustomerUpdateActionUtils.buildSetCustomerGroupUpdateAction(com.commercetools.sync.customers.utils.CustomerUpdateActionUtils.buildSetCustomerGroupUpdateAction) ArrayList(java.util.ArrayList) SetLastName(io.sphere.sdk.customers.commands.updateactions.SetLastName) CustomerGroup(io.sphere.sdk.customergroups.CustomerGroup) SetCompanyName(io.sphere.sdk.customers.commands.updateactions.SetCompanyName) SetSalutation(io.sphere.sdk.customers.commands.updateactions.SetSalutation) CustomerUpdateActionUtils.buildSetCompanyNameUpdateAction(com.commercetools.sync.customers.utils.CustomerUpdateActionUtils.buildSetCompanyNameUpdateAction) CustomerDraftBuilder(io.sphere.sdk.customers.CustomerDraftBuilder) CustomerUpdateActionUtils.buildSetExternalIdUpdateAction(com.commercetools.sync.customers.utils.CustomerUpdateActionUtils.buildSetExternalIdUpdateAction) Mockito.when(org.mockito.Mockito.when) CustomerUpdateActionUtils.buildChangeEmailUpdateAction(com.commercetools.sync.customers.utils.CustomerUpdateActionUtils.buildChangeEmailUpdateAction) CustomerUpdateActionUtils.buildSetDateOfBirthUpdateAction(com.commercetools.sync.customers.utils.CustomerUpdateActionUtils.buildSetDateOfBirthUpdateAction) CustomerSyncOptions(com.commercetools.sync.customers.CustomerSyncOptions) CustomerDraft(io.sphere.sdk.customers.CustomerDraft) CustomerSyncOptions(com.commercetools.sync.customers.CustomerSyncOptions) UpdateAction(io.sphere.sdk.commands.UpdateAction) CustomerUpdateActionUtils.buildSetMiddleNameUpdateAction(com.commercetools.sync.customers.utils.CustomerUpdateActionUtils.buildSetMiddleNameUpdateAction) CustomerUpdateActionUtils.buildSetCustomerNumberUpdateAction(com.commercetools.sync.customers.utils.CustomerUpdateActionUtils.buildSetCustomerNumberUpdateAction) CustomerUpdateActionUtils.buildSetLocaleUpdateAction(com.commercetools.sync.customers.utils.CustomerUpdateActionUtils.buildSetLocaleUpdateAction) CustomerUpdateActionUtils.buildSetVatIdUpdateAction(com.commercetools.sync.customers.utils.CustomerUpdateActionUtils.buildSetVatIdUpdateAction) CustomerUpdateActionUtils.buildSetFirstNameUpdateAction(com.commercetools.sync.customers.utils.CustomerUpdateActionUtils.buildSetFirstNameUpdateAction) CustomerUpdateActionUtils.buildSetSalutationUpdateAction(com.commercetools.sync.customers.utils.CustomerUpdateActionUtils.buildSetSalutationUpdateAction) CustomerUpdateActionUtils.buildSetLastNameUpdateAction(com.commercetools.sync.customers.utils.CustomerUpdateActionUtils.buildSetLastNameUpdateAction) CustomerUpdateActionUtils.buildSetTitleUpdateAction(com.commercetools.sync.customers.utils.CustomerUpdateActionUtils.buildSetTitleUpdateAction) CustomerUpdateActionUtils.buildSetCustomerGroupUpdateAction(com.commercetools.sync.customers.utils.CustomerUpdateActionUtils.buildSetCustomerGroupUpdateAction) CustomerUpdateActionUtils.buildSetCompanyNameUpdateAction(com.commercetools.sync.customers.utils.CustomerUpdateActionUtils.buildSetCompanyNameUpdateAction) CustomerUpdateActionUtils.buildSetExternalIdUpdateAction(com.commercetools.sync.customers.utils.CustomerUpdateActionUtils.buildSetExternalIdUpdateAction) CustomerUpdateActionUtils.buildChangeEmailUpdateAction(com.commercetools.sync.customers.utils.CustomerUpdateActionUtils.buildChangeEmailUpdateAction) CustomerUpdateActionUtils.buildSetDateOfBirthUpdateAction(com.commercetools.sync.customers.utils.CustomerUpdateActionUtils.buildSetDateOfBirthUpdateAction) SphereClient(io.sphere.sdk.client.SphereClient) ArrayList(java.util.ArrayList) Test(org.junit.jupiter.api.Test)

Example 3 with CustomerSyncOptions

use of com.commercetools.sync.customers.CustomerSyncOptions in project commercetools-sync-java by commercetools.

the class CustomerUpdateActionUtilsTest method buildSetCustomerNumberUpdateAction_withNullOldValueAndANewValue_ShouldReturnAction.

@Test
void buildSetCustomerNumberUpdateAction_withNullOldValueAndANewValue_ShouldReturnAction() {
    final List<String> warningMessages = new ArrayList<>();
    final CustomerSyncOptions customerSyncOptions = CustomerSyncOptionsBuilder.of(mock(SphereClient.class)).warningCallback((exception, oldResource, newResource) -> warningMessages.add(exception.getMessage())).build();
    Customer oldCustomer = mock(Customer.class);
    when(oldCustomer.getCustomerNumber()).thenReturn(null);
    CustomerDraft newCustomer = mock(CustomerDraft.class);
    when(newCustomer.getCustomerNumber()).thenReturn("customer-number");
    final Optional<UpdateAction<Customer>> result = buildSetCustomerNumberUpdateAction(oldCustomer, newCustomer, customerSyncOptions);
    assertThat(result).containsInstanceOf(SetCustomerNumber.class);
    assertThat(result).contains(SetCustomerNumber.of("customer-number"));
    assertThat(warningMessages).isEmpty();
}
Also used : BeforeEach(org.junit.jupiter.api.BeforeEach) Reference(io.sphere.sdk.models.Reference) Assertions.assertThat(org.assertj.core.api.Assertions.assertThat) UpdateAction(io.sphere.sdk.commands.UpdateAction) SetCustomerNumber(io.sphere.sdk.customers.commands.updateactions.SetCustomerNumber) CUSTOMER_NUMBER_EXISTS_WARNING(com.commercetools.sync.customers.utils.CustomerUpdateActionUtils.CUSTOMER_NUMBER_EXISTS_WARNING) CustomerUpdateActionUtils.buildSetMiddleNameUpdateAction(com.commercetools.sync.customers.utils.CustomerUpdateActionUtils.buildSetMiddleNameUpdateAction) SetMiddleName(io.sphere.sdk.customers.commands.updateactions.SetMiddleName) SetFirstName(io.sphere.sdk.customers.commands.updateactions.SetFirstName) SetDateOfBirth(io.sphere.sdk.customers.commands.updateactions.SetDateOfBirth) Locale(java.util.Locale) SphereClient(io.sphere.sdk.client.SphereClient) SetLocale(io.sphere.sdk.customers.commands.updateactions.SetLocale) CustomerUpdateActionUtils.buildSetCustomerNumberUpdateAction(com.commercetools.sync.customers.utils.CustomerUpdateActionUtils.buildSetCustomerNumberUpdateAction) CustomerUpdateActionUtils.buildSetLocaleUpdateAction(com.commercetools.sync.customers.utils.CustomerUpdateActionUtils.buildSetLocaleUpdateAction) SetExternalId(io.sphere.sdk.customers.commands.updateactions.SetExternalId) CustomerUpdateActionUtils.buildSetVatIdUpdateAction(com.commercetools.sync.customers.utils.CustomerUpdateActionUtils.buildSetVatIdUpdateAction) ChangeEmail(io.sphere.sdk.customers.commands.updateactions.ChangeEmail) UUID(java.util.UUID) Customer(io.sphere.sdk.customers.Customer) String.format(java.lang.String.format) CustomerUpdateActionUtils.buildSetFirstNameUpdateAction(com.commercetools.sync.customers.utils.CustomerUpdateActionUtils.buildSetFirstNameUpdateAction) Test(org.junit.jupiter.api.Test) CustomerUpdateActionUtils.buildSetSalutationUpdateAction(com.commercetools.sync.customers.utils.CustomerUpdateActionUtils.buildSetSalutationUpdateAction) CustomerSyncOptionsBuilder(com.commercetools.sync.customers.CustomerSyncOptionsBuilder) CustomerName(io.sphere.sdk.customers.CustomerName) List(java.util.List) SetCustomerGroup(io.sphere.sdk.customers.commands.updateactions.SetCustomerGroup) SetVatId(io.sphere.sdk.customers.commands.updateactions.SetVatId) LocalDate(java.time.LocalDate) Optional(java.util.Optional) Mockito.mock(org.mockito.Mockito.mock) ResourceIdentifier(io.sphere.sdk.models.ResourceIdentifier) CustomerUpdateActionUtils.buildSetLastNameUpdateAction(com.commercetools.sync.customers.utils.CustomerUpdateActionUtils.buildSetLastNameUpdateAction) SetTitle(io.sphere.sdk.customers.commands.updateactions.SetTitle) CustomerUpdateActionUtils.buildSetTitleUpdateAction(com.commercetools.sync.customers.utils.CustomerUpdateActionUtils.buildSetTitleUpdateAction) CustomerUpdateActionUtils.buildSetCustomerGroupUpdateAction(com.commercetools.sync.customers.utils.CustomerUpdateActionUtils.buildSetCustomerGroupUpdateAction) ArrayList(java.util.ArrayList) SetLastName(io.sphere.sdk.customers.commands.updateactions.SetLastName) CustomerGroup(io.sphere.sdk.customergroups.CustomerGroup) SetCompanyName(io.sphere.sdk.customers.commands.updateactions.SetCompanyName) SetSalutation(io.sphere.sdk.customers.commands.updateactions.SetSalutation) CustomerUpdateActionUtils.buildSetCompanyNameUpdateAction(com.commercetools.sync.customers.utils.CustomerUpdateActionUtils.buildSetCompanyNameUpdateAction) CustomerDraftBuilder(io.sphere.sdk.customers.CustomerDraftBuilder) CustomerUpdateActionUtils.buildSetExternalIdUpdateAction(com.commercetools.sync.customers.utils.CustomerUpdateActionUtils.buildSetExternalIdUpdateAction) Mockito.when(org.mockito.Mockito.when) CustomerUpdateActionUtils.buildChangeEmailUpdateAction(com.commercetools.sync.customers.utils.CustomerUpdateActionUtils.buildChangeEmailUpdateAction) CustomerUpdateActionUtils.buildSetDateOfBirthUpdateAction(com.commercetools.sync.customers.utils.CustomerUpdateActionUtils.buildSetDateOfBirthUpdateAction) CustomerSyncOptions(com.commercetools.sync.customers.CustomerSyncOptions) CustomerDraft(io.sphere.sdk.customers.CustomerDraft) CustomerSyncOptions(com.commercetools.sync.customers.CustomerSyncOptions) Customer(io.sphere.sdk.customers.Customer) UpdateAction(io.sphere.sdk.commands.UpdateAction) CustomerUpdateActionUtils.buildSetMiddleNameUpdateAction(com.commercetools.sync.customers.utils.CustomerUpdateActionUtils.buildSetMiddleNameUpdateAction) CustomerUpdateActionUtils.buildSetCustomerNumberUpdateAction(com.commercetools.sync.customers.utils.CustomerUpdateActionUtils.buildSetCustomerNumberUpdateAction) CustomerUpdateActionUtils.buildSetLocaleUpdateAction(com.commercetools.sync.customers.utils.CustomerUpdateActionUtils.buildSetLocaleUpdateAction) CustomerUpdateActionUtils.buildSetVatIdUpdateAction(com.commercetools.sync.customers.utils.CustomerUpdateActionUtils.buildSetVatIdUpdateAction) CustomerUpdateActionUtils.buildSetFirstNameUpdateAction(com.commercetools.sync.customers.utils.CustomerUpdateActionUtils.buildSetFirstNameUpdateAction) CustomerUpdateActionUtils.buildSetSalutationUpdateAction(com.commercetools.sync.customers.utils.CustomerUpdateActionUtils.buildSetSalutationUpdateAction) CustomerUpdateActionUtils.buildSetLastNameUpdateAction(com.commercetools.sync.customers.utils.CustomerUpdateActionUtils.buildSetLastNameUpdateAction) CustomerUpdateActionUtils.buildSetTitleUpdateAction(com.commercetools.sync.customers.utils.CustomerUpdateActionUtils.buildSetTitleUpdateAction) CustomerUpdateActionUtils.buildSetCustomerGroupUpdateAction(com.commercetools.sync.customers.utils.CustomerUpdateActionUtils.buildSetCustomerGroupUpdateAction) CustomerUpdateActionUtils.buildSetCompanyNameUpdateAction(com.commercetools.sync.customers.utils.CustomerUpdateActionUtils.buildSetCompanyNameUpdateAction) CustomerUpdateActionUtils.buildSetExternalIdUpdateAction(com.commercetools.sync.customers.utils.CustomerUpdateActionUtils.buildSetExternalIdUpdateAction) CustomerUpdateActionUtils.buildChangeEmailUpdateAction(com.commercetools.sync.customers.utils.CustomerUpdateActionUtils.buildChangeEmailUpdateAction) CustomerUpdateActionUtils.buildSetDateOfBirthUpdateAction(com.commercetools.sync.customers.utils.CustomerUpdateActionUtils.buildSetDateOfBirthUpdateAction) SphereClient(io.sphere.sdk.client.SphereClient) ArrayList(java.util.ArrayList) CustomerDraft(io.sphere.sdk.customers.CustomerDraft) Test(org.junit.jupiter.api.Test)

Example 4 with CustomerSyncOptions

use of com.commercetools.sync.customers.CustomerSyncOptions in project commercetools-sync-java by commercetools.

the class CustomerReferenceResolverTest method setup.

@BeforeEach
void setup() {
    final CustomerSyncOptions syncOptions = CustomerSyncOptionsBuilder.of(mock(SphereClient.class)).build();
    typeService = getMockTypeService();
    customerGroupService = getMockCustomerGroupService(getMockCustomerGroup(CUSTOMER_GROUP_ID, CUSTOMER_GROUP_KEY));
    referenceResolver = new CustomerReferenceResolver(syncOptions, typeService, customerGroupService);
}
Also used : CustomerSyncOptions(com.commercetools.sync.customers.CustomerSyncOptions) BeforeEach(org.junit.jupiter.api.BeforeEach)

Example 5 with CustomerSyncOptions

use of com.commercetools.sync.customers.CustomerSyncOptions in project commercetools-project-sync by commercetools.

the class CustomerSyncer method of.

public static CustomerSyncer of(@Nonnull final SphereClient sourceClient, @Nonnull final SphereClient targetClient, @Nonnull final Clock clock) {
    final QuadConsumer<SyncException, Optional<CustomerDraft>, Optional<Customer>, List<UpdateAction<Customer>>> logErrorCallback = (exception, newResourceDraft, oldResource, updateActions) -> logErrorCallback(LOGGER, "customer", exception, oldResource, updateActions);
    final TriConsumer<SyncException, Optional<CustomerDraft>, Optional<Customer>> logWarningCallback = (exception, newResourceDraft, oldResource) -> logWarningCallback(LOGGER, "customer", exception, oldResource);
    final CustomerSyncOptions customerSyncOptions = CustomerSyncOptionsBuilder.of(targetClient).errorCallback(logErrorCallback).warningCallback(logWarningCallback).build();
    final CustomerSync customerSync = new CustomerSync(customerSyncOptions);
    final CustomObjectService customObjectService = new CustomObjectServiceImpl(targetClient);
    return new CustomerSyncer(customerSync, sourceClient, targetClient, customObjectService, clock);
}
Also used : SyncException(com.commercetools.sync.commons.exceptions.SyncException) LoggerFactory(org.slf4j.LoggerFactory) UpdateAction(io.sphere.sdk.commands.UpdateAction) QuadConsumer(com.commercetools.sync.commons.utils.QuadConsumer) CustomerSyncStatistics(com.commercetools.sync.customers.helpers.CustomerSyncStatistics) SyncUtils.logWarningCallback(com.commercetools.project.sync.util.SyncUtils.logWarningCallback) CustomerQuery(io.sphere.sdk.customers.queries.CustomerQuery) CustomerTransformUtils.toCustomerDrafts(com.commercetools.sync.customers.utils.CustomerTransformUtils.toCustomerDrafts) SphereClient(io.sphere.sdk.client.SphereClient) TriConsumer(com.commercetools.sync.commons.utils.TriConsumer) Nonnull(javax.annotation.Nonnull) SyncUtils.logErrorCallback(com.commercetools.project.sync.util.SyncUtils.logErrorCallback) Logger(org.slf4j.Logger) CustomObjectService(com.commercetools.project.sync.service.CustomObjectService) CustomerSync(com.commercetools.sync.customers.CustomerSync) Customer(io.sphere.sdk.customers.Customer) CustomerSyncOptionsBuilder(com.commercetools.sync.customers.CustomerSyncOptionsBuilder) List(java.util.List) CustomerSyncOptions(com.commercetools.sync.customers.CustomerSyncOptions) CompletionStage(java.util.concurrent.CompletionStage) Syncer(com.commercetools.project.sync.Syncer) Clock(java.time.Clock) Optional(java.util.Optional) CustomObjectServiceImpl(com.commercetools.project.sync.service.impl.CustomObjectServiceImpl) CustomerDraft(io.sphere.sdk.customers.CustomerDraft) CustomObjectService(com.commercetools.project.sync.service.CustomObjectService) Optional(java.util.Optional) CustomerSyncOptions(com.commercetools.sync.customers.CustomerSyncOptions) Customer(io.sphere.sdk.customers.Customer) CustomObjectServiceImpl(com.commercetools.project.sync.service.impl.CustomObjectServiceImpl) List(java.util.List) SyncException(com.commercetools.sync.commons.exceptions.SyncException) CustomerSync(com.commercetools.sync.customers.CustomerSync)

Aggregations

CustomerSyncOptions (com.commercetools.sync.customers.CustomerSyncOptions)11 CustomerDraft (io.sphere.sdk.customers.CustomerDraft)10 CustomerSyncOptionsBuilder (com.commercetools.sync.customers.CustomerSyncOptionsBuilder)9 Customer (io.sphere.sdk.customers.Customer)9 List (java.util.List)9 BeforeEach (org.junit.jupiter.api.BeforeEach)9 Test (org.junit.jupiter.api.Test)9 CustomerDraftBuilder (io.sphere.sdk.customers.CustomerDraftBuilder)8 ArrayList (java.util.ArrayList)8 Assertions.assertThat (org.assertj.core.api.Assertions.assertThat)8 SphereClient (io.sphere.sdk.client.SphereClient)7 ChangeEmail (io.sphere.sdk.customers.commands.updateactions.ChangeEmail)7 UpdateAction (io.sphere.sdk.commands.UpdateAction)6 ResourceIdentifier (io.sphere.sdk.models.ResourceIdentifier)6 CUSTOMER_NUMBER_EXISTS_WARNING (com.commercetools.sync.customers.utils.CustomerUpdateActionUtils.CUSTOMER_NUMBER_EXISTS_WARNING)5 CustomerGroup (io.sphere.sdk.customergroups.CustomerGroup)5 SetCompanyName (io.sphere.sdk.customers.commands.updateactions.SetCompanyName)5 SetCustomerGroup (io.sphere.sdk.customers.commands.updateactions.SetCustomerGroup)5 SetDateOfBirth (io.sphere.sdk.customers.commands.updateactions.SetDateOfBirth)5 SetFirstName (io.sphere.sdk.customers.commands.updateactions.SetFirstName)5