io.sphere.sdk.carts.commands.updateactions.SetBillingAddress Maven / Gradle / Ivy
package io.sphere.sdk.carts.commands.updateactions;
import io.sphere.sdk.carts.Cart;
import io.sphere.sdk.commands.UpdateAction;
import io.sphere.sdk.models.Address;
import java.util.Optional;
/**
{@include.example io.sphere.sdk.carts.commands.CartUpdateCommandTest#setBillingAddress()}
@see io.sphere.sdk.carts.commands.updateactions.SetShippingAddress
*/
public class SetBillingAddress extends UpdateAction {
private final Optional address;
private SetBillingAddress(final Optional address) {
super("setBillingAddress");
this.address = address;
}
public static SetBillingAddress of(final Optional address) {
return new SetBillingAddress(address);
}
public static SetBillingAddress of(final Address address) {
return of(Optional.of(address));
}
public Optional getAddress() {
return address;
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy