<?php
/*
 * MundiAPILib
 *
 * This file was automatically generated by APIMATIC v2.0 ( https://apimatic.io ).
 */

namespace MundiAPILib\Models;

use JsonSerializable;

/**
 *Request for canceling a subscription
 */
class CreateCancelSubscriptionRequest implements JsonSerializable
{
    /**
     * Indicates if the pending invoices must also be canceled.
     * @required
     * @maps cancel_pending_invoices
     * @var bool $cancelPendingInvoices public property
     */
    public $cancelPendingInvoices;

    /**
     * Constructor to set initial or default values of member properties
     * @param bool $cancelPendingInvoices Initialization value for $this->cancelPendingInvoices
     */
    public function __construct()
    {
        switch (func_num_args()) {
            case 1:
                $this->cancelPendingInvoices = func_get_arg(0);
                break;

            default:
                $this->cancelPendingInvoices = true;
                break;
        }
    }


    /**
     * Encode this object to JSON
     */
    public function jsonSerialize()
    {
        $json = array();
        $json['cancel_pending_invoices'] = $this->cancelPendingInvoices;

        return $json;
    }
}
