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

namespace PagarmeCoreApiLib\Models;

use JsonSerializable;

/**
 *Request for updating a plan item
 */
class UpdatePlanItemRequest implements JsonSerializable
{
    /**
     * Item name
     * @required
     * @var string $name public property
     */
    public $name;

    /**
     * Description
     * @required
     * @var string $description public property
     */
    public $description;

    /**
     * Item status
     * @required
     * @var string $status public property
     */
    public $status;

    /**
     * Pricing scheme
     * @required
     * @maps pricing_scheme
     * @var \PagarmeCoreApiLib\Models\UpdatePricingSchemeRequest $pricingScheme public property
     */
    public $pricingScheme;

    /**
     * Quantity
     * @var integer|null $quantity public property
     */
    public $quantity;

    /**
     * Number of cycles that the item will be charged
     * @var integer|null $cycles public property
     */
    public $cycles;

    /**
     * Constructor to set initial or default values of member properties
     * @param string                     $name          Initialization value for $this->name
     * @param string                     $description   Initialization value for $this->description
     * @param string                     $status        Initialization value for $this->status
     * @param UpdatePricingSchemeRequest $pricingScheme Initialization value for $this->pricingScheme
     * @param integer                    $quantity      Initialization value for $this->quantity
     * @param integer                    $cycles        Initialization value for $this->cycles
     */
    public function __construct()
    {
        if (6 == func_num_args()) {
            $this->name          = func_get_arg(0);
            $this->description   = func_get_arg(1);
            $this->status        = func_get_arg(2);
            $this->pricingScheme = func_get_arg(3);
            $this->quantity      = func_get_arg(4);
            $this->cycles        = func_get_arg(5);
        }
    }


    /**
     * Encode this object to JSON
     */
    public function jsonSerialize()
    {
        $json = array();
        $json['name']           = $this->name;
        $json['description']    = $this->description;
        $json['status']         = $this->status;
        $json['pricing_scheme'] = $this->pricingScheme;
        $json['quantity']       = $this->quantity;
        $json['cycles']         = $this->cycles;

        return $json;
    }
}
