2017 © Pedro Peláez
 

library client-php

Rebilly PHP Client

image

rebilly/client-php

Rebilly PHP Client

  • Saturday, July 21, 2018
  • by davert
  • Repository
  • 14 Watchers
  • 8 Stars
  • 13,404 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 14 Forks
  • 5 Open issues
  • 52 Versions
  • 6 % Grown

The README.md

Rebilly SDK for PHP

Latest Version on Packagist Software License Total Downloads, (*1)

The Rebilly SDK for PHP makes it easy for developers to access Rebilly REST APIs in their PHP code., (*2)

Requirements

  • PHP 8.0+.
  • CURL (verify peer requires a root certificate authority -- if you have not configured php curl to use one, and your system libs aren't linked to one, you may need to do a manual configuration to use the appropriate certificate authority)

Installation

[!WARNING]
This package does not follow semantic versioning, so minor version updates can cause backward compatibility breaks. Updates to the package should be tested before switching versions., (*3)

Using Composer is the recommended way to install the Rebilly SDK for PHP. To get started, you need run the Composer commands (assume you're in the project's root directory)., (*4)

  • Install the latest stable version of the SDK:
composer require rebilly/client-php

You can find out more on how to install Composer, configure autoloading, and other best-practices for defining dependencies at getcomposer.org., (*5)

Supported Versions

The previous version of the SDK can be outdated and won't provide all (or the correct) specifications to communicate with the REST APIs. Only the latest version is constantly supported., (*6)

Version Supported Documentation
2.x ⚠️ (security fixes only) See tab PHP-SDK-2.0
3.x ✅ (current) See tab PHP

Quick Examples

Create a Rebilly Client, (*7)

use Rebilly\Sdk\Client;
use Rebilly\Sdk\Service;

// Instantiate Rebilly client.
$client = new Client([
    'baseUrl' => Client::SANDBOX_HOST,
    'organizationId' => '{organizationId}',
    'apiKey' => '{secretKey}',
]);
$service = new Service(client: $client);

Create a Customer, (*8)

use Rebilly\Sdk\Exception\DataValidationException;
use Rebilly\Sdk\Model\ContactObject;
use Rebilly\Sdk\Model\Customer;

$customer = Customer::from([])
    ->setWebsiteId('{websiteId}')
    ->setPrimaryAddress(
        ContactObject::from([])
            ->setFirstName('John')
            ->setLastName('Doe'),
    );

try {
  $customer = $service->customers()->create($form);
} catch (DataValidationException $e) {
  var_dump($e->getValidationErrors());
}

For more see examples directory., (*9)

Documentation

Read Rebilly REST APIs documentation for more details., (*10)

Migration from SDK v2.x to v3.x

This new major version brings several new helper classes to communicate with Rebilly REST APIs and some incompatibilities that should be tested before switching SDK versions., (*11)

  • Now, a Service class can be explicitly instantiated to make the API calls instead of using only the Client, as it encapsulates the API calls., (*12)

  • To simplify the migration from the previous version, the Client object can be used to make calls to any API directly. For example, instead of instantiating a service class, one can use:, (*13)

    $client->customers()->create($form);
    
  • The namespace changed from Rebilly\Entities to Rebilly\Sdk\Model. Now, the src is Rebilly\Sdk., (*14)

  • The classes are now generated by an automated process that is triggered every time a new version of the API definitions is released. It means more frequency on the SDK updates, keeping it synced with the REST APIs., (*15)

The Versions

21/07 2018

dev-master

9999999-dev http://rebilly.com/

Rebilly PHP Client

  Sources   Download

MIT

The Requires

 

The Development Requires

api payment processing transactions subscriptions

20/07 2018

dev-plan-product-id

dev-plan-product-id http://rebilly.com/

Rebilly PHP Client

  Sources   Download

MIT

The Requires

 

The Development Requires

api payment processing transactions subscriptions

20/07 2018

dev-update_coveralls

dev-update_coveralls http://rebilly.com/

Rebilly PHP Client

  Sources   Download

MIT

The Requires

 

The Development Requires

api payment processing transactions subscriptions

16/06 2018

dev-php72

dev-php72 http://rebilly.com/

Rebilly PHP Client

  Sources   Download

MIT

The Requires

 

The Development Requires

api payment processing transactions subscriptions

31/05 2018

dev-fix-email-notifications

dev-fix-email-notifications http://rebilly.com/

Rebilly PHP Client

  Sources   Download

MIT

The Requires

 

The Development Requires

api payment processing transactions subscriptions

31/05 2018

dev-customer-lifetime-revenue

dev-customer-lifetime-revenue http://rebilly.com/

Rebilly PHP Client

  Sources   Download

MIT

The Requires

 

The Development Requires

api payment processing transactions subscriptions

01/05 2018

dev-remove-cf-deletion

dev-remove-cf-deletion http://rebilly.com/

Rebilly PHP Client

  Sources   Download

MIT

The Requires

 

The Development Requires

api payment processing transactions subscriptions

28/03 2018

dev-remove-subscription-switch

dev-remove-subscription-switch http://rebilly.com/

Rebilly PHP Client

  Sources   Download

MIT

The Requires

 

The Development Requires

api payment processing transactions subscriptions

23/03 2018

dev-add-timelines-api

dev-add-timelines-api http://rebilly.com/

Rebilly PHP Client

  Sources   Download

MIT

The Requires

 

The Development Requires

api payment processing transactions subscriptions

05/03 2018

dev-email-notifications

dev-email-notifications http://rebilly.com/

Rebilly PHP Client

  Sources   Download

MIT

The Requires

 

The Development Requires

api payment processing transactions subscriptions

04/03 2018

dev-interim-invoice

dev-interim-invoice http://rebilly.com/

Rebilly PHP Client

  Sources   Download

MIT

The Requires

 

The Development Requires

api payment processing transactions subscriptions

05/01 2018

2.1.0

2.1.0.0 http://rebilly.com/

Rebilly PHP Client

  Sources   Download

MIT

The Requires

 

The Development Requires

api payment processing transactions subscriptions

25/10 2017

dev-transactions-retries

dev-transactions-retries http://rebilly.com/

Rebilly PHP Client

  Sources   Download

MIT

The Requires

 

The Development Requires

api payment processing transactions subscriptions

13/10 2017

dev-webhook-tracking

dev-webhook-tracking http://rebilly.com/

Rebilly PHP Client

  Sources   Download

MIT

The Requires

 

The Development Requires

api payment processing transactions subscriptions

13/09 2017

2.0.7

2.0.7.0 http://rebilly.com/

Rebilly PHP Client

  Sources   Download

MIT

The Requires

 

The Development Requires

api payment processing transactions subscriptions

19/06 2017

dev-add-headers-client-version

dev-add-headers-client-version http://rebilly.com/

Rebilly PHP Client

  Sources   Download

MIT

The Requires

 

The Development Requires

api payment processing transactions subscriptions

31/05 2017

dev-invoice-item-product

dev-invoice-item-product http://rebilly.com/

Rebilly PHP Client

  Sources   Download

MIT

The Requires

 

The Development Requires

api payment processing transactions subscriptions

11/05 2017

dev-fix-invoice-contact-ids

dev-fix-invoice-contact-ids http://rebilly.com/

Rebilly PHP Client

  Sources   Download

MIT

The Requires

 

The Development Requires

api payment processing transactions subscriptions

31/03 2017

dev-global-webhooks

dev-global-webhooks http://rebilly.com/

Rebilly PHP Client

  Sources   Download

MIT

The Requires

 

The Development Requires

api payment processing transactions subscriptions

28/03 2017

dev-improve-customer-contact

dev-improve-customer-contact http://rebilly.com/

Rebilly PHP Client

  Sources   Download

MIT

The Requires

 

The Development Requires

api payment processing transactions subscriptions

24/03 2017

dev-add-shipping-amount

dev-add-shipping-amount http://rebilly.com/

Rebilly PHP Client

  Sources   Download

MIT

The Requires

 

The Development Requires

api payment processing transactions subscriptions

07/01 2017

dev-add-queue-payments

dev-add-queue-payments http://rebilly.com/

Rebilly PHP Client

  Sources   Download

MIT

The Requires

 

The Development Requires

api payment processing transactions subscriptions

07/01 2017

2.0.6

2.0.6.0 http://rebilly.com/

Rebilly PHP Client

  Sources   Download

MIT

The Requires

 

The Development Requires

api payment processing transactions subscriptions

06/01 2017

dev-fix-sessions-policy

dev-fix-sessions-policy http://rebilly.com/

Rebilly PHP Client

  Sources   Download

MIT

The Requires

 

The Development Requires

api payment processing transactions subscriptions

06/01 2017

dev-subscriptions-add-switch

dev-subscriptions-add-switch http://rebilly.com/

Rebilly PHP Client

  Sources   Download

MIT

The Requires

 

The Development Requires

api payment processing transactions subscriptions

04/01 2017

dev-GWY-4722

dev-GWY-4722 http://rebilly.com/

Rebilly PHP Client

  Sources   Download

MIT

The Requires

 

The Development Requires

api payment processing transactions subscriptions

07/12 2016

dev-update_transaction_entity

dev-update_transaction_entity http://rebilly.com/

Rebilly PHP Client

  Sources   Download

MIT

The Requires

 

The Development Requires

api payment processing transactions subscriptions

29/11 2016

2.0.5

2.0.5.0 http://rebilly.com/

Rebilly PHP Client

  Sources   Download

MIT

The Requires

 

The Development Requires

api payment processing transactions subscriptions

05/10 2016

dev-remove-deprecated-attributes

dev-remove-deprecated-attributes http://rebilly.com/

Rebilly PHP Client

  Sources   Download

MIT

The Requires

 

The Development Requires

api payment processing transactions subscriptions

25/08 2016

v2.0.x-dev

2.0.9999999.9999999-dev http://rebilly.com/

Rebilly PHP Client

  Sources   Download

MIT

The Requires

 

The Development Requires

api payment processing transactions subscriptions

12/08 2016

2.0.4

2.0.4.0 http://rebilly.com/

Rebilly PHP Client

  Sources   Download

MIT

The Requires

 

The Development Requires

api payment processing transactions subscriptions

29/07 2016

2.0.3

2.0.3.0 http://rebilly.com/

Rebilly PHP Client

  Sources   Download

MIT

The Requires

 

The Development Requires

api payment processing transactions subscriptions

14/07 2016

dev-prepare-v2.1

dev-prepare-v2.1 http://rebilly.com/

Rebilly PHP Client

  Sources   Download

MIT

The Requires

 

The Development Requires

api payment processing transactions subscriptions

04/05 2016

2.0.2

2.0.2.0 http://rebilly.com/

Rebilly PHP Client

  Sources   Download

MIT

The Requires

 

The Development Requires

api payment processing transactions subscriptions

18/03 2016

dev-reports-api

dev-reports-api http://rebilly.com/

Rebilly PHP Client

  Sources   Download

MIT

The Requires

 

The Development Requires

api payment processing transactions subscriptions

10/12 2015

dev-upgrade-phpunit

dev-upgrade-phpunit http://rebilly.com/

Rebilly PHP Client

  Sources   Download

MIT

The Requires

 

The Development Requires

api payment processing transactions subscriptions

21/09 2015

v2.0.1-rc

2.0.1.0-RC http://rebilly.com/

Rebilly PHP Client

  Sources   Download

MIT

The Requires

 

The Development Requires

api payment processing transactions subscriptions

02/09 2015

v2.0.1-beta

2.0.1.0-beta http://rebilly.com/

Rebilly PHP Client

  Sources   Download

MIT

The Requires

 

The Development Requires

api payment processing transactions subscriptions

13/08 2015

v2.0.1-alpha

2.0.1.0-alpha http://rebilly.com/

Rebilly PHP Client

  Sources   Download

MIT

The Requires

 

The Development Requires

api payment processing transactions subscriptions

13/08 2015

1.0.x-dev

1.0.9999999.9999999-dev http://rebilly.com/

Rebilly PHP Client

  Sources   Download

MIT

The Requires

  • php >=5.3
  • ext-curl *
  • ext-json *

 

The Development Requires

api payment processing transactions subscriptions

10/08 2015

1.2.1

1.2.1.0 http://rebilly.com/

Rebilly PHP Client

  Sources   Download

MIT

The Requires

  • php >=5.3
  • ext-curl *
  • ext-json *

 

The Development Requires

api payment processing transactions subscriptions

07/08 2015

1.2.0

1.2.0.0 http://rebilly.com/

Rebilly PHP Client

  Sources   Download

MIT

The Requires

  • php >=5.3
  • ext-curl *
  • ext-json *

 

The Development Requires

api payment processing transactions subscriptions

30/07 2015

1.1.0

1.1.0.0 http://rebilly.com/

Rebilly PHP Client

  Sources   Download

MIT

The Requires

  • php >=5.3
  • ext-curl *
  • ext-json *

 

The Development Requires

api payment processing transactions subscriptions

02/07 2015

1.0.8

1.0.8.0 http://rebilly.com/

Rebilly PHP Client

  Sources   Download

MIT

The Requires

  • php >=5.3
  • ext-curl *
  • ext-json *

 

The Development Requires

api payment processing transactions subscriptions

11/06 2015

1.0.7

1.0.7.0 http://rebilly.com/

Rebilly PHP Client

  Sources   Download

MIT

The Requires

  • php >=5.3
  • ext-curl *
  • ext-json *

 

The Development Requires

api payment processing transactions subscriptions

09/06 2015

1.0.6

1.0.6.0 http://rebilly.com/

Rebilly PHP Client

  Sources   Download

MIT

The Requires

  • php >=5.3
  • ext-curl *
  • ext-json *

 

The Development Requires

api payment processing transactions subscriptions

08/06 2015

1.0.5

1.0.5.0 http://rebilly.com/

Rebilly PHP Client

  Sources   Download

MIT

The Requires

  • php >=5.3
  • ext-curl *
  • ext-json *

 

The Development Requires

api payment processing transactions subscriptions

11/03 2015

1.0.4

1.0.4.0 http://rebilly.com/

Rebilly PHP Client

  Sources   Download

MIT

The Requires

  • php >=5.2
  • ext-curl *
  • ext-json *

 

The Development Requires

api payment processing transactions subscriptions

10/03 2015

1.0.3

1.0.3.0 http://rebilly.com/

Rebilly PHP Client

  Sources   Download

MIT

The Requires

  • php >=5.2
  • ext-curl *
  • ext-json *

 

The Development Requires

api payment processing transactions subscriptions

09/03 2015

1.0.2

1.0.2.0 http://rebilly.com/

Rebilly PHP Client

  Sources   Download

MIT

The Requires

  • php >=5.2
  • ext-curl *
  • ext-json *

 

The Development Requires

api payment processing transactions subscriptions

26/02 2015

1.0.1

1.0.1.0 http://rebilly.com/

Rebilly PHP Client

  Sources   Download

MIT

The Requires

  • php >=5.2
  • ext-curl *
  • ext-json *

 

The Development Requires

api payment processing transactions subscriptions

14/06 2014

1.0.0

1.0.0.0 http://rebilly.com/

Rebilly PHP Client

  Sources   Download

MIT

The Requires

  • php >=5.2
  • ext-curl *
  • ext-json *

 

The Development Requires

api payment processing transactions subscriptions