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

io.sphere.sdk.shippingmethods.ShippingMethodImpl Maven / Gradle / Ivy

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

import io.sphere.sdk.models.DefaultModelImpl;
import io.sphere.sdk.models.Reference;
import io.sphere.sdk.taxcategories.TaxCategory;

import java.time.Instant;
import java.util.List;
import java.util.Optional;

final class ShippingMethodImpl extends DefaultModelImpl implements ShippingMethod {
    private final String name;
    private final Optional description;
    private final Reference taxCategory;
    private final List zoneRates;
    private final boolean isDefault;

    private ShippingMethodImpl(final String id, final long version, final Instant createdAt, final Instant lastModifiedAt, final String name, final Optional description, final Reference taxCategory, final List zoneRates, final boolean isDefault) {
        super(id, version, createdAt, lastModifiedAt);
        this.name = name;
        this.description = description;
        this.taxCategory = taxCategory;
        this.zoneRates = zoneRates;
        this.isDefault = isDefault;
    }

    @Override
    public String getName() {
        return name;
    }

    @Override
    public Optional getDescription() {
        return description;
    }

    @Override
    public Reference getTaxCategory() {
        return taxCategory;
    }

    @Override
    public List getZoneRates() {
        return zoneRates;
    }

    @Override
    public boolean isDefault() {
        return isDefault;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy