<?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 GetUsagesDetailsResponse implements JsonSerializable
{
    /**
     * Subscription Identifier
     * @required
     * @maps subscription_id
     * @var string $subscriptionId public property
     */
    public $subscriptionId;

    /**
     * Current Invoice Amount
     * @required
     * @maps total_amount
     * @var integer $totalAmount public property
     */
    public $totalAmount;

    /**
     * Period Details
     * @maps Period
     * @var \PagarmeCoreApiLib\Models\GetPeriodResponse|null $period public property
     */
    public $period;

    /**
     * Usages Details
     * @required
     * @maps Usages
     * @var \PagarmeCoreApiLib\Models\ListUsagesDetailsResponse $usages public property
     */
    public $usages;

    /**
     * Total discounted value
     * @maps total_discount
     * @var integer|null $totalDiscount public property
     */
    public $totalDiscount;

    /**
     * Total inremented value
     * @maps total_increment
     * @var integer|null $totalIncrement public property
     */
    public $totalIncrement;

    /**
     * Constructor to set initial or default values of member properties
     * @param string                    $subscriptionId Initialization value for $this->subscriptionId
     * @param integer                   $totalAmount    Initialization value for $this->totalAmount
     * @param GetPeriodResponse         $period         Initialization value for $this->period
     * @param ListUsagesDetailsResponse $usages         Initialization value for $this->usages
     * @param integer                   $totalDiscount  Initialization value for $this->totalDiscount
     * @param integer                   $totalIncrement Initialization value for $this->totalIncrement
     */
    public function __construct()
    {
        if (6 == func_num_args()) {
            $this->subscriptionId = func_get_arg(0);
            $this->totalAmount    = func_get_arg(1);
            $this->period         = func_get_arg(2);
            $this->usages         = func_get_arg(3);
            $this->totalDiscount  = func_get_arg(4);
            $this->totalIncrement = func_get_arg(5);
        }
    }


    /**
     * Encode this object to JSON
     */
    public function jsonSerialize()
    {
        $json = array();
        $json['subscription_id'] = $this->subscriptionId;
        $json['total_amount']    = $this->totalAmount;
        $json['Period']          = $this->period;
        $json['Usages']          = $this->usages;
        $json['total_discount']  = $this->totalDiscount;
        $json['total_increment'] = $this->totalIncrement;

        return $json;
    }
}
