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-M26
Show newest version
package io.sphere.sdk.shippingmethods;

import com.fasterxml.jackson.annotation.JsonCreator;
import io.sphere.sdk.models.ResourceImpl;
import io.sphere.sdk.models.Reference;
import io.sphere.sdk.taxcategories.TaxCategory;

import javax.annotation.Nullable;
import java.time.ZonedDateTime;
import java.util.List;

final class ShippingMethodImpl extends ResourceImpl implements ShippingMethod {
    private final String name;
    @Nullable
    private final String description;
    private final Reference taxCategory;
    private final List zoneRates;
    private final Boolean isDefault;

    @JsonCreator
    private ShippingMethodImpl(final String id, final Long version, final ZonedDateTime createdAt, final ZonedDateTime lastModifiedAt, final String name, final String 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
    @Nullable
    public String 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