wickedreports/php-sdk

PHP SDK for WickedReports

1.7.0 2023-06-22 09:47 UTC

README

Documentation

You can find current API documentation in this doc.

Install

Using the composer CLI:

composer require wickedreports/php-sdk

Or manually add it to your composer.json:

{
    "require": {
        "wickedreports/php-sdk": "1.5.*"
    }
}

Authentication

To use API SDK, you should have your own API key.

$api = new \WickedReports\WickedReports($yourApiKey);
$api->addOrders($orders);

Examples

You can see list of usage examples in examples/example.php file.

Dates

DateTime objects are used instead of a DateTime string where the date(time) is a parameter in the method.

$datetime = new \DateTime('now', new \DateTimeZone('America/New_York'));

As other way, you can use simple date-time string with timezone property set.

[
    'CreateDate' => '2017-08-01 00:05:01',
    'timezone'   => 'EST'
]

You can see list of supported timezones on PHP.net website.

You have to use one of these ways to provide date time, otherwise you will get error or wrong date saved into our DB.

Provided date-time string will be automatically converted to UTC timezone, as it requires our API documentation.

Testing

$ phpunit

License

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