<?php

/**
 * InstallmentPlanApiTest
 * PHP version 7.4
 *
 * @category Class
 * @package  Splitit
 * @author   Konfig
 * @link     https://konfigthis.com
 */

/**
 * splitit-web-api-v3
 *
 * Splitit's Web API
 *
 * The version of the OpenAPI document: 1.0.0
 * Generated by: https://konfigthis.com
 */


namespace Splitit\Test\Api;

use \Splitit\Configuration;
use \Splitit\ApiException;
use \Splitit\ObjectSerializer;
use PHPUnit\Framework\TestCase;
use Splitit\Model\PurchaseMethod;

class InstallmentPlanApiTest extends TestCase
{

    /** @var \Splitit\Client */
    protected $splitit;

    /**
     * Setup before running any test cases
     */
    public static function setUpBeforeClass(): void
    {
    }

    /**
     * Setup before running each test case
     */
    public function setUp(): void
    {
        $this->splitit = new \Splitit\Client(
            "https://id.sandbox.splitit.com/connect/token",
            getenv("SPLITIT_CLIENT_ID"),
            getenv("SPLITIT_CLIENT_SECRET"),
            null,
            "https://web-api-v3.sandbox.splitit.com"
        );
    }

    /**
     * Clean up after running each test case
     */
    public function tearDown(): void
    {
    }

    /**
     * Clean up after running all test cases
     */
    public static function tearDownAfterClass(): void
    {
    }

    /**
     * Test case for cancel
     *
     * .
     *
     */
    public function testCancel()
    {
        // TODO: implement
        $this->markTestIncomplete('Not implemented');
    }

    /**
     * Test case for checkEligibility
     *
     * .
     *
     */
    public function testCheckEligibility()
    {
        // TODO: implement
        $this->markTestIncomplete('Not implemented');
    }

    /**
     * Test case for get
     *
     * .
     *
     */
    public function testGet()
    {
        // TODO: implement
        $this->markTestIncomplete('Not implemented');
    }

    /**
     * Test case for post
     *
     * .
     *
     */
    public function testPost()
    {
        $response = $this->splitit->installmentPlan->post(
            true,
            date("c"),
            date("c"),
            true,
            [
                'email' => 'fake@email.com',
            ],
            [
                'total_amount' => 10,
                'number_of_installments' => 10,
                'currency' => 'USD',
                'purchase_method' => "InStore",
            ],
            [
                'address_line1' => '144 Union St',
                'city' => 'Brooklyn',
                'state' => 'North Dakota',
                'zip' => '11231',
                'country' => 'United States',
            ],
            []
        );
        $this->assertNotNull(
            $response,
            "response is null"
        );
    }

    /**
     * Test case for post2
     *
     * .
     *
     */
    public function testPost2()
    {
        // TODO: implement
        $this->markTestIncomplete('Not implemented');
    }

    /**
     * Test case for refund
     *
     * .
     *
     */
    public function testRefund()
    {
        // TODO: implement
        $this->markTestIncomplete('Not implemented');
    }

    /**
     * Test case for search
     *
     * .
     *
     */
    public function testSearch()
    {
        // TODO: implement
        $this->markTestIncomplete('Not implemented');
    }

    /**
     * Test case for updateOrder
     *
     * .
     *
     */
    public function testUpdateOrder()
    {
        // TODO: implement
        $this->markTestIncomplete('Not implemented');
    }

    /**
     * Test case for updateOrder2
     *
     * .
     *
     */
    public function testUpdateOrder2()
    {
        // TODO: implement
        $this->markTestIncomplete('Not implemented');
    }

    /**
     * Test case for verifyAuthorization
     *
     * .
     *
     */
    public function testVerifyAuthorization()
    {
        // TODO: implement
        $this->markTestIncomplete('Not implemented');
    }
}
