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

namespace MundiAPILib\Models;

use JsonSerializable;

/**
 * @todo Write general description for this model
 */
class CreateTransfer implements JsonSerializable
{
    /**
     * @todo Write general description for this property
     * @required
     * @var integer $amount public property
     */
    public $amount;

    /**
     * @todo Write general description for this property
     * @required
     * @maps source_id
     * @var string $sourceId public property
     */
    public $sourceId;

    /**
     * @todo Write general description for this property
     * @required
     * @maps target_id
     * @var string $targetId public property
     */
    public $targetId;

    /**
     * @todo Write general description for this property
     * @var array|null $metadata public property
     */
    public $metadata;

    /**
     * Constructor to set initial or default values of member properties
     * @param integer $amount   Initialization value for $this->amount
     * @param string  $sourceId Initialization value for $this->sourceId
     * @param string  $targetId Initialization value for $this->targetId
     * @param array   $metadata Initialization value for $this->metadata
     */
    public function __construct()
    {
        if (4 == func_num_args()) {
            $this->amount   = func_get_arg(0);
            $this->sourceId = func_get_arg(1);
            $this->targetId = func_get_arg(2);
            $this->metadata = func_get_arg(3);
        }
    }


    /**
     * Encode this object to JSON
     */
    public function jsonSerialize()
    {
        $json = array();
        $json['amount']    = $this->amount;
        $json['source_id'] = $this->sourceId;
        $json['target_id'] = $this->targetId;
        $json['metadata']  = $this->metadata;

        return $json;
    }
}
