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

io.sphere.sdk.carts.commands.updateactions.SetShippingAddress Maven / Gradle / Ivy

There is a newer version: 1.0.0-M12
Show newest version
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;

/**
 Sets the shipping address of the cart.
 Setting the shipping address also sets the tax rates of the line items and calculates the taxed price.
 If the address is not provided, the shipping address is unset, the taxedPrice is unset and the taxRates are unset in all line items.

 {@include.example io.sphere.sdk.carts.commands.CartUpdateCommandTest#setShippingAddress()}
 */
public class SetShippingAddress extends UpdateAction {
    private final Optional
address; private SetShippingAddress(final Optional
address) { super("setShippingAddress"); this.address = address; } public static SetShippingAddress of(final Optional
address) { return new SetShippingAddress(address); } public static SetShippingAddress of(final Address address) { return of(Optional.of(address)); } public Optional
getAddress() { return address; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy