All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.sphere.sdk.customers.commands.updateactions.SetExternalId Maven / Gradle / Ivy

There is a newer version: 1.0.0-M12
Show newest version
package io.sphere.sdk.customers.commands.updateactions;

import io.sphere.sdk.commands.UpdateAction;
import io.sphere.sdk.customers.Customer;

import java.util.Optional;

/**
 * Sets a new ID which can be used as additional identifier for external Systems like CRM or ERP.
 *
 * {@include.example io.sphere.sdk.customers.commands.CustomerUpdateCommandTest#setExternalId()}
 */
public class SetExternalId extends UpdateAction {
    private final Optional externalId;

    private SetExternalId(final Optional externalId) {
        super("setExternalId");
        this.externalId = externalId;
    }

    public static SetExternalId of(final Optional externalId) {
        return new SetExternalId(externalId);
    }

    public static SetExternalId of(final String externalId) {
        return of(Optional.of(externalId));
    }

    public Optional getExternalId() {
        return externalId;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy