unified/unified-to

v0.17.2 2024-09-06 00:23 UTC

README

SDK Installation

The SDK relies on Composer to manage its dependencies.

To install the SDK and add it as a dependency to an existing composer.json file:

composer require "unified/unified-to"

SDK Example Usage

Example

declare(strict_types=1);

require 'vendor/autoload.php';

use Unified\Unified_to;
use Unified\Unified_to\Models\Operations;
use Unified\Unified_to\Models\Shared;
use Unified\Unified_to\Utils;

$security = new Shared\Security();
$security->jwt = '<YOUR_API_KEY_HERE>';

$sdk = Unified_to\UnifiedTo::builder()->setSecurity($security)->build();

try {
    $request = new Operations\CreateAccountingAccountRequest(
        connectionId: '<value>',
        accountingAccount: new Shared\AccountingAccount(
            balance: 6602.56,
            createdAt: Utils\Utils::parseDateTime('2023-09-02T22:12:31.771Z'),
            currency: 'Saint Helena Pound',
            customerDefinedCode: '<value>',
            description: 'Cross-group zero defect task-force',
            group: '<value>',
            id: '<id>',
            isPayable: false,
            name: '<value>',
            parentAccountId: '<value>',
            raw: [
                'Ruble' => '<value>',
            ],
            section: '<value>',
            status: Shared\Status::Active,
            subgroup: '<value>',
            subsection: '<value>',
            type: Shared\Type::FixedAsset,
            updatedAt: Utils\Utils::parseDateTime('2024-10-01T23:54:12.882Z'),
        ),
    );
    $response = $sdk->accounting->createAccountingAccount($request);

    if ($response->accountingAccount !== null) {
        // handle response
    }
} catch (Throwable $e) {
    // handle exception
}

Available Resources and Operations

Accounting

Account

Contact

Invoice

Journal

Organization

Taxrate

Transaction

Ats

Activity

Application

Applicationstatus

Candidate

Company

Document

Interview

Job

Scorecard

Commerce

Collection

Inventory

Item

Location

Crm

Deal

Event

Lead

Pipeline

Enrich

Person

Genai

Model

Prompt

Hris

Employee

Group

Payslip

Timeoff

Kms

Page

Space

Martech

ListT

Member

Messaging

Channel

Message

Passthrough

Payment

Link

Payout

Refund

Storage

File

Task

Project

Ticketing

Customer

Note

Ticket

Uc

Call

Unified

Apicall

Connection

Integration

Auth

Login

Issue

Webhook

Server Selection

Server Selection

Select Server by Index

You can override the default server globally by passing a server index to the server_idx: int optional parameter when initializing the SDK client instance. The selected server will then be used as the default on the operations that use it. This table lists the indexes associated with the available servers:

Override Server URL Per-Client

The default server can also be overridden globally by passing a URL to the server_url: str optional parameter when initializing the SDK client instance. For example:

Summary

Unified.to API: One API to Rule Them All

Table of Contents

Maturity

This SDK is in beta, and there may be breaking changes between versions without a major version update. Therefore, we recommend pinning usage to a specific package version. This way, you can install the same version each time without breaking changes unless you are intentionally looking for the latest version.

Contributions

While we value open-source contributions to this SDK, this library is generated programmatically. Feel free to open a PR or a Github issue as a proof of concept and we'll do our best to include it in a future release!

SDK Created by Speakeasy