package com.ricardo.casarez.flighsearch.domain.entity.search.response;

import java.io.Serializable;
import java.util.List;

/**
 * Created by rush on 10/25/16.
 */
public class Solution implements Serializable {
    private String mSaleTotal;
    private String mId;
    private List<Slice> mSlices;

    public String getSaleTotal() {
        return mSaleTotal;
    }

    public void setSaleTotal(String saleTotal) {
        mSaleTotal = saleTotal;
    }

    public String getId() {
        return mId;
    }

    public void setId(String id) {
        mId = id;
    }

    public List<Slice> getSlices() {
        return mSlices;
    }

    public void setSlices(List<Slice> slices) {
        mSlices = slices;
    }

    @Override
    public String toString() {
        StringBuilder builder = new StringBuilder("Sale Price: ");
        builder.append(mSaleTotal).append("\n");
        if (mSlices != null) {
            for (int x = 0; x < mSlices.size(); x++) {
                if (mSlices.get(x) != null) {
                    builder.append("\t").append("Slice " + x).append("\n");
                    builder.append("\t\t").append(mSlices.get(x).toString()).append("\n");
                }
            }
        }
        return  builder.toString();
    }
}
