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

namespace PagarmeCoreApiLib\Models;

use JsonSerializable;

/**
 *Request for creating an order item
 */
class CreateOrderItemRequest implements JsonSerializable
{
    /**
     * Amount
     * @required
     * @var integer $amount public property
     */
    public $amount;

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

    /**
     * Quantity
     * @required
     * @var integer $quantity public property
     */
    public $quantity;

    /**
     * Item seller
     * @var \PagarmeCoreApiLib\Models\CreateSellerRequest|null $seller public property
     */
    public $seller;

    /**
     * seller identificator
     * @maps seller_id
     * @var string|null $sellerId public property
     */
    public $sellerId;

    /**
     * Category
     * @required
     * @var string $category public property
     */
    public $category;

    /**
     * The item code passed by the client
     * @var string|null $code public property
     */
    public $code;

    /**
     * Constructor to set initial or default values of member properties
     * @param integer             $amount      Initialization value for $this->amount
     * @param string              $description Initialization value for $this->description
     * @param integer             $quantity    Initialization value for $this->quantity
     * @param CreateSellerRequest $seller      Initialization value for $this->seller
     * @param string              $sellerId    Initialization value for $this->sellerId
     * @param string              $category    Initialization value for $this->category
     * @param string              $code        Initialization value for $this->code
     */
    public function __construct()
    {
        if (7 == func_num_args()) {
            $this->amount      = func_get_arg(0);
            $this->description = func_get_arg(1);
            $this->quantity    = func_get_arg(2);
            $this->seller      = func_get_arg(3);
            $this->sellerId    = func_get_arg(4);
            $this->category    = func_get_arg(5);
            $this->code        = func_get_arg(6);
        }
    }


    /**
     * Encode this object to JSON
     */
    public function jsonSerialize()
    {
        $json = array();
        $json['amount']      = $this->amount;
        $json['description'] = $this->description;
        $json['quantity']    = $this->quantity;
        $json['seller']      = $this->seller;
        $json['seller_id']   = $this->sellerId;
        $json['category']    = $this->category;
        $json['code']        = $this->code;

        return $json;
    }
}
