Skip to content

Repository files navigation

SDK for Order-Track v4 API

Tests

This is where your description should go. Try and limit it to a paragraph or two. Consider adding a small example.

Installation

You can install the package via composer, but first you need to add PDF's composer repository to your composer.json file:

{
    "repositories": [
        {
            "type": "composer",
            "url": "https://satis.pdfsystems.com"
        }
    ]
}

Then you can install the package:

composer require pdf-systems-inc/order-track-sdk

Usage

Creating a Client

$client = new Pdfsystems\OrderTrackSdk\OrderTrackClient('{Auth Token}', '{Team ID}');

Customers

Searching for Customers

$client->customers()->search(params: [
    'customer_number' => '123456',
    'name' => 'John Doe',    
]);

Loading a Specific Customer

$client->customers()->findByCustomerNumber('123456');

Products

Searching for Products

$client->products()->search(params: [
    'item_number' => '1000-01',
    'style_name' => 'Kensington',
    'color_name' => 'Red',
    'discontinued' => 'false',    
]);

Loading a Specific Product

$client->products()->findByItemNumber('1000-01');

Orders

Searching for Orders

$client->orders()->search(params: [
    'customer' => 123456,
    'customer_number' => 'A1234',
    'start_date' => '2023-01-01',
    'end_date' => '2023-12-31',    
]);

Loading a Specific Order

$client->orders()->findByOrderNumber('100000-0');

Sample Orders

Searching for Sample Orders

$client->sampleOrders()->search(params: [
    'shippable_items' => ['1000-01', '1000-02'],
    'start_date' => '2023-01-01',
    'end_date' => '2023-12-31',    
]);

Creating a Sample Order

$sampleOrder = new Pdfsystems\OrderTrackSdk\Dtos\SampleOrder([
    'customer_id' => 1,
    'items' => [
        [
            'item_number' => '1000-01',
            'quantity_ordered' => 1,
        ],    
    ],
    'sample_usage_type_id' => 1,
    'sample_order_source_id' => 1,
]);
$client->sampleOrders()->create($sampleOrder);

Testing

composer test

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

The MIT License (MIT). Please see License File for more information.

About

SDK for interfacing with Order-Track v4

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Sponsor this project

Packages

Used by

Contributors

Languages