PHPackages                             venditan/rapport-client - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. venditan/rapport-client

ActiveLibrary

venditan/rapport-client
=======================

Rapport

v1.0.0(10y ago)021.9k—8.3%1PHP

Since Dec 22Pushed 9y ago2 watchersCompare

[ Source](https://github.com/Venditan/rapport-client)[ Packagist](https://packagist.org/packages/venditan/rapport-client)[ Docs](http://www.venditan.com/rapport)[ RSS](/packages/venditan-rapport-client/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)Dependencies (1)Versions (2)Used By (0)

PHP Client Library for Venditan Rapport
=======================================

[](#php-client-library-for-venditan-rapport)

Table of Contents
-----------------

[](#table-of-contents)

- [Installation](#install-with-composer)
- [Order Dispatch](#order-dispatch)
- [Order Details](#order-details)
- [Service Message](#service-message)
- [Retrieve Threads, Messages](#retrieve-thread-messages)
- [Usage](#account-usage)

Install with Composer
---------------------

[](#install-with-composer)

```
composer require venditan/rapport-client dev-master
```

Examples
========

[](#examples)

In all the examples below, we will assume you have created a client object with the right credentials, like this:

```
// Create the client with your supplied client id and api key
$obj_client = new \Venditan\Rapport\Client('company', 'api-key');
```

Order Dispatch
--------------

[](#order-dispatch)

```
// Add and configure the target recipient/user
$obj_client->addUser()->id('1955')->name('Marty')->email('marty@mcfly.com')->mobile('07019551985');

// Set-up the transaction
$obj_client->addTransaction()->id('2015')->courier('Western Union')->tracking('ELB1885');

// Set the type of event and publish
$obj_client->event('order_dispatched')->send();
```

Order Details
-------------

[](#order-details)

It is possible to provide order details (lines, delivery address, notes) as well.

This would normally only be provided once, using the `order_detail` event.

```
// Set-up the transaction
$obj_txn = $obj_client->addTransaction()->id('2015');

// Address
$obj_txn->deliverTo('123 Street, Town, County, POST CODE');

// Notes
$obj_txn->notes('Will be delivered by hand');

// Line. Only the description is required, other fields are optional
$obj_txn->addLine()->describe('Paul Smith Shirt')->quantity(1)->image('https://a.b.c/d.jpg')->attribute('Colour', 'Red')->attribute('Size', '12');

// Set the type of event and publish
$obj_client->event('order_detail')->send();
```

Estimated Delivery Dates
------------------------

[](#estimated-delivery-dates)

If your event templates support an estimated delivery date this can be sent along with your request.

The date will be included as provided so please send the date as you would like it to be displayed.

```
// Add and configure the target recipient/user
$obj_client->addUser()->id('1955')->name('Marty')->email('marty@mcfly.com')->mobile('07019551985');

// Set-up the transaction
$obj_client->addTransaction()->id('2015')->estimatedDelivery('10th May 2016');

// Set the type of event and publish
$obj_client->event('stock_arrived')->send();
```

Service Message
---------------

[](#service-message)

```
// Add and configure the target recipient/user
$obj_client->addUser()->id('1955')->name('Marty')->email('marty@mcfly.com')->mobile('07019551985');

// Set-up the transaction (optional, useful context)
$obj_client->addTransaction()->id('2015');

// Set a service message
$obj_client->addMessage()->title('Order Update')->body('Hi Marty. I am safe in 1885.')->from('ELB');

// Set the type of event and publish
$obj_client->event('service_message')->send();
```

Retrieve Thread Messages
------------------------

[](#retrieve-thread-messages)

Threads exist for either transaction (order) contexts or just plain user (customer) contexts.

```
// Retrieve any thread for Order "2015"
$obj_client->getThreadForTransaction('2015');
```

OR

```
// Retrieve any thread for User "12345"
$obj_client->getThreadForUser('12345');
```

The response will be a stdClass object decoded from the following JSON structure

```
{
    "id": "oid-2015",
    "topic": "Order 2015",
    "last_read": "2015-01-01 12:00:00",
    "last_read_device": "Mobile, iPhone",
    "messages": [
        {
            "title": "Order Accepted",
            "message": "Thank you for your order.",
            "created": "2015-01-01 12:00:00"
        }
    ]
}
```

Account Usage
-------------

[](#account-usage)

```
// Retrieve basic account usage data
$obj_client->getAccountUsage();
```

The response will be a stdClass object decoded from the following JSON structure.

More usage statistics may be added in future.

```
{
    "this_month": {
        "name": "December 2015",
        "year": 2015,
        "month": 12,
        "sms": 199
    },
    "recent_months": [
        {
            "name": "October 2015",
            "year": 2015,
            "month": 10,
            "sms": 117
        },
        ...
    ]
}
```

###  Health Score

33

—

LowBetter than 75% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity26

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity63

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

3801d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/1e2b28a219ee1eb3272465e6405928b762272593849b52ecfa5576b5119d9d5e?d=identicon)[Docnet](/maintainers/Docnet)

---

Top Contributors

[![markahesketh](https://avatars.githubusercontent.com/u/1269894?v=4)](https://github.com/markahesketh "markahesketh (1 commits)")

---

Tags

smsdocnetvenditanrapport

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/venditan-rapport-client/health.svg)

```
[![Health](https://phpackages.com/badges/venditan-rapport-client/health.svg)](https://phpackages.com/packages/venditan-rapport-client)
```

###  Alternatives

[twilio/sdk

A PHP wrapper for Twilio's API

1.6k92.9M272](/packages/twilio-sdk)[daixianceng/yii2-smser

Yii2 SMS extension

862.9k1](/packages/daixianceng-yii2-smser)[fotografde/cakephp-sms

SMS Plugin for CakePHP

1273.2k](/packages/fotografde-cakephp-sms)[ender/yunpian-sms

A php SDK for yunpian(云片网络短信服务商) sms RESTFULL API

244.9k](/packages/ender-yunpian-sms)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
