Download the PHP package openpublicmedia/pbs-membership-vault-php without Composer
On this page you can find all versions of the php package openpublicmedia/pbs-membership-vault-php. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download openpublicmedia/pbs-membership-vault-php
More information about openpublicmedia/pbs-membership-vault-php
Files in openpublicmedia/pbs-membership-vault-php
Package pbs-membership-vault-php
Short Description PHP client for interacting with the PBS Membership Vault (MVault) API.
License Apache-2.0
Informations about the package pbs-membership-vault-php
PBS Membership Vault PHP Library
This library abstracts interactions with the PBS Membership Vault API.
Installation
Install via composer:
Use
The primary class provided by this library is OpenPublicMedia\PbsMembershipVault\Client
.
A Client
instance can be used to interact with membership data in various ways.
Response data structures
Responses from the Client
class will return a Generator when querying for
multiple memberships (e.g. with getMemberships
) or a single stdClass
object
when querying for a specific membership record (e.g. with getMembershipById($id)
).
Examples
Creating a client
Getting a Membership by ID
Getting all activated Memberships
Adding a new Membership
Updating an existing Membership
Handling exceptions
Most Client
methods can throw OpenPublicMedia\PbsMembershipVault\Exception\BadRequestException
.
This exception will include a JSON encoded message that can be used to determine
follow-up actions.
The exception OpenPublicMedia\PbsMembershipVault\Exception\MembershipNotFoundException
indicates a Membership has not been found for a provided ID.
The exception \OpenPublicMedia\PbsMembershipVault\Exception\MembershipActivatedException
indicates a Membership has already been activated by a PBS Account other than the one request.
The exception \OpenPublicMedia\PbsMembershipVault\Exception\AnotherMembershipActivatedException
indicates a PBS Account has already activated a different membership.
Development goals
See CONTRIBUTING for information about contributing to this project.
v1
- [x] API authentication (
OpenPublicMedia\PbsMembershipVault\Client
) - [x] API direct querying (
$client->request()
) - [x] Result/error handling
- [x] Transparent paged response handling (
OpenPublicMedia\PbsMembershipVault\Response\PagedResponse
) - [x] Membership
- [x] Membership:get
- [x] Membership:list_token (this "list" endpoint returns a single result)
- [x] Membership:put
- [x] Membership:update (PATCH)
- [x] Membership:delete
- [x] Memberships
- [x] Membership:list
- [x] Memberships:last_updated_since
- [x] Memberships:active?
- [x] Memberships:email
- [x] Membership:deleted
- [x] Membership:deleted?since
- [x] Membership:list_activated
- [x] Membership:list_activated/?since
- [x] Membership:list_provisional
- [x] Membership:list_provisional/?since
- [x] Membership:list_grace_period
- [x] Membership:list_uid
- [x] Examples/detailed documentation
v2
- [x] PHP 8 support
v3.x
- [ ] Membership entity (to replace stdClass)
- [x] Improved handling of API error responses
- [x] Improved handling of activation specifically
- [x] Get membership by MVault ID
All versions of pbs-membership-vault-php with dependencies
ext-json Version *
guzzlehttp/guzzle Version ^6.3 || ^7.0
league/uri Version ^6.5
league/uri-components Version ^2.0