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

io.sphere.sdk.carts.RoundingMode Maven / Gradle / Ivy

The newest version!
package io.sphere.sdk.carts;

import com.fasterxml.jackson.annotation.JsonCreator;
import io.sphere.sdk.models.SphereEnumeration;

/**
 * A rounding mode specifies how Composable Commerce should round monetary values.
 */
public enum RoundingMode implements SphereEnumeration {

    /**
     * Round half to even.
     * Default rounding mode used in IEEE 754 computing functions and operators.
     */
    HALF_EVEN,

    /**
     * Round half up.
     */
    HALF_UP,

    /**
     * Round half down.
     */
    HALF_DOWN;

    @JsonCreator
    public static RoundingMode ofSphereValue(final String value) {
        return SphereEnumeration.findBySphereName(values(), value).get();
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy