<?php

namespace Ezypay\Object;

/**
 * Class Invoice
 *
 * @package Ezypay\Object
 */
class Invoice
{
    /**
     * @var $invoiceId string The ID of the invoice.
     */
    private $invoiceId;
    /**
     * @var $invoiceNumber integer The running number of the invoice.
     */
    private $invoiceNumber;
    /**
     * @var $customerId string The ID of the customer.
     */
    private $customerId;
    /**
     * @var $subscriptionId string The ID of the subscription.
     */
    private $subscriptionId;
    /**
     * @var $invoiceDate string The Invoice Date
     */
    private $invoiceDate;
    /**
     * @var $status string The Current Invoice Status. Can be PENDING, PROCESSING, OVERDUE, PAID, FAILED, PENDING_REBILL, REFUNDED, REFUND_REQUESTED, REFUND_APPROVED PARTIALLY_REFUNDED, PARTIALLY_PAID, WRITTEN_OFF
     */
    private $status;
    /**
     * @var $amount number The Invoice Amount
     */
    private $amount;
    /**
     * @var $failedPaymentReason array FailedPaymentReasonResultThe Invoice Failed Reason
     */
    private $failedPaymentReason;
    /**
     * @var $description string The Invoice Description
     */
    private $description;
    /**
     * @var $statementDescription string The Invoice Statement Description
     */
    private $statementDescription;
    /**
     * @var $invoiceItems array [InvoiceItemResult]The items in the invoice
     */
    private $invoiceItems;
    /**
     * @var $createdOn string Date record is created.
     */
    private $createdOn;

    /**
     * Invoice constructor.
     * 
     * @param $data
     */
    function __construct($data)
    {
        foreach ( $data as $key => $value ){
            $this->$key = $value;
        }
    }

}
