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

namespace PagarmeCoreApiLib\Models;

use JsonSerializable;

/**
 * @todo Write general description for this model
 */
class UpdateSubscriptionSplitRequest implements JsonSerializable
{
    /**
     * Defines if the split is enabled
     * @required
     * @var bool $enabled public property
     */
    public $enabled;

    /**
     * Split
     * @required
     * @var \PagarmeCoreApiLib\Models\CreateSplitRequest[] $rules public property
     */
    public $rules;

    /**
     * Constructor to set initial or default values of member properties
     * @param bool  $enabled Initialization value for $this->enabled
     * @param array $rules   Initialization value for $this->rules
     */
    public function __construct()
    {
        if (2 == func_num_args()) {
            $this->enabled = func_get_arg(0);
            $this->rules   = func_get_arg(1);
        }
    }


    /**
     * Encode this object to JSON
     */
    #[\ReturnTypeWillChange]
    public function jsonSerialize()
    {
        $json = array();
        $json['enabled'] = $this->enabled;
        $json['rules']   = $this->rules;

        return $json;
    }
}
