<?php

/**
 * Class for Payment Gateway with IAC Pay Type.
 * This class is used to link the payment gateway and the IAC Pay Type from Hub.
 *
 * @package northmill-online-shared
 */
declare (strict_types=1);
namespace Northmill_Online_Shared_Checkout\Northmill_Online_Shared\Abstracts\Hub_API\Models\Receipts;

use Northmill_Online_Shared_Checkout\Northmill_Online_Shared\Abstracts\Hub_API\Hub_Accounts\Models\Hub_Account_Model;
use WC_Payment_Gateway;
/**
 * Class Payment_Gateway_Collection
 */
class Payment_Gateway_Collection
{
    /**
     * WC Payment Gateway.
     *
     * @var WC_Payment_Gateway $payment_gateway
     */
    public WC_Payment_Gateway $payment_gateway;
    /**
     * Income Account Code Payment Type from Hub.
     *
     * @var string $iac_pay_type
     */
    public string $iac_pay_type = 'ExternalPayment';
    /**
     * Backoffice Account Model for this specific payment gateway and IAC Pay Type.
     *
     * @var Hub_Account_Model $backoffice_account
     */
    public Hub_Account_Model $backoffice_account;
    /**
     * Construct the Payment Gateway Collection object.
     *
     * @param WC_Payment_Gateway $payment_gateway WC Payment Gateway.
     * @param string|null        $iac_pay_type    Income Account Code Payment Type from Hub.
     */
    public function __construct(WC_Payment_Gateway $payment_gateway, ?string $iac_pay_type)
    {
        $this->payment_gateway = $payment_gateway;
        $this->iac_pay_type = $iac_pay_type ?? 'ExternalPayment';
    }
}
