package com.xsolla.android.sdk.data.model;

import java.util.List;

public class XHoldSubscriptionStatus {

    private String status;

    private List<XMessage> errors;

    private XApi api;

    public String getStatus() {
        return status;
    }

    public List<XMessage> getErrors() {
        return errors;
    }

    public String getErrorMsg() {
        StringBuilder sb = new StringBuilder();
        for (XMessage message : errors) {
            sb.append(message.getMessage()).append("\n");
        }
        sb.deleteCharAt(sb.length() - 1);
        return sb.toString();
    }

    @Override
    public String toString() {
        return "XHoldSubscription{" +
                "status='" + status + '\'' +
                ", errors=" + errors +
                ", api=" + api +
                '}';
    }
}
