io.sphere.sdk.customers.commands.updateactions.SetDateOfBirth Maven / Gradle / Ivy
package io.sphere.sdk.customers.commands.updateactions;
import io.sphere.sdk.commands.UpdateAction;
import io.sphere.sdk.customers.Customer;
import java.util.Optional;
import java.time.LocalDate;
/**
* Sets a date of birth for the customer.
*
* {@include.example io.sphere.sdk.customers.commands.CustomerUpdateCommandTest#setDateOfBirth()}
*/
public class SetDateOfBirth extends UpdateAction {
private final Optional dateOfBirth;
private SetDateOfBirth(final Optional dateOfBirth) {
super("setDateOfBirth");
this.dateOfBirth = dateOfBirth;
}
public static SetDateOfBirth of(final Optional dateOfBirth) {
return new SetDateOfBirth(dateOfBirth);
}
public static SetDateOfBirth of(final LocalDate dateOfBirth) {
return of(Optional.of(dateOfBirth));
}
public Optional getDateOfBirth() {
return dateOfBirth;
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy