export var DisputeStatus;
(function (DisputeStatus) {
    DisputeStatus["won"] = "won";
    DisputeStatus["lost"] = "lost";
    DisputeStatus["underReview"] = "under_review";
    DisputeStatus["needsResponse"] = "needs_response";
})(DisputeStatus || (DisputeStatus = {}));
export class Dispute {
    get needsResponse() {
        return this.status == DisputeStatus.needsResponse;
    }
    get underReview() {
        return this.status == DisputeStatus.underReview;
    }
    get won() {
        return this.status == DisputeStatus.won;
    }
    get lost() {
        return this.status == DisputeStatus.lost;
    }
    constructor(dispute) {
        this.id = dispute.id;
        this.amount = dispute.amount;
        this.currency = dispute.currency;
        this.payment_id = dispute.payment_id;
        this.reason = dispute.reason;
        this.due_date = dispute.due_date;
        this.status = dispute.status;
        this.metadata = dispute.metadata;
        this.created_at = dispute.created_at;
        this.updated_at = dispute.updated_at;
        this.dispute_response = dispute.dispute_response ? new DisputeResponse(dispute.dispute_response) : undefined;
    }
}
export class DisputeResponse {
    constructor(response) {
        this.additional_statement = response.additional_statement;
        this.cancellation_policy_disclosure = response.cancellation_policy_disclosure;
        this.cancellation_rebuttal = response.cancellation_rebuttal;
        this.customer_billing_address = response.customer_billing_address;
        this.customer_email_address = response.customer_email_address;
        this.customer_name = response.customer_name;
        this.customer_purchase_ip_address = response.customer_purchase_ip_address;
        this.duplicate_charge_explanation = response.duplicate_charge_explanation;
        this.product_description = response.product_description;
        this.refund_policy_disclosure = response.refund_policy_disclosure;
        this.refund_refusal_explanation = response.refund_refusal_explanation;
        this.service_date = response.service_date;
        this.shipping_address = response.shipping_address;
        this.shipping_carrier = response.shipping_carrier;
        this.shipping_date = response.shipping_date;
        this.shipping_tracking_number = response.shipping_tracking_number;
        this.duplicate_charge_original_payment_id = response.duplicate_charge_original_payment_id;
    }
}
