fleximize/php-sdk

There is no license information available for the latest version (1.0.0) of this package.

A PHP wrapper for the Fleximize API

1.0.0 2017-01-11 16:34 UTC

This package is not auto-updated.

Last update: 2020-01-10 16:22:02 UTC


README

Run the following command to install the package using composer.

$ composer require fleximize/php-sdk

Ensure that your project includes the composer autoload file.

require __DIR__ . "/vendor/autoload.php";

Review the Fleximize API documentation at https://fleximize.com/api/index.html

Creating a client instance

The Fleximize API client can be created as below, using your API token.

use FleximizePhp\Client\Client;
  
$client = new Client('{apiToken}');

Selecting an API

The Fleximize SDK currently only exposes the Application API.

An API can be selected in the following ways

$application = $client->api('application');
// or
$application = $client->application();

Application

The Application API exposes the following methods:

getStatus(applicationId)

applicationId

The application ID you received when creating a new application.

$status = $application->getStatus('{applicationId}');

This method will return an object containing response data.

To see what response data is returned see Get Application Status in our API docs.

submit(data)

data[]

The application data should be an array of properties as described in our API Docs

Note that both partial and full applications can be submitted using this method.

$response = $application->submit([
    'business_type_id'    => 1,
    'company_name'        => 'THE REBELION',
    'registration_number' => '01234567',
    'title_id'            => 1,
    'first_name'          => 'Luke',
    'last_name'           => 'Skywalker',
    'phone'               => '0512321232',
    'email'               => 'luke@rebels.com',
    'loan_amount'         => '10000.00',
    'term'                => '24'
]);

This method will return an object containing response data.

To see what response data is returned see Post a Partial Application in our API docs.