<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
openpublicmedia / pbs-membership-vault-php example snippets
use OpenPublicMedia\PbsMembershipVault\Client;
$api_key = 'xxxxxxxxxxxxxx';
$api_secret = 'xxxxxxxxxxx';
$station_id = 'xxxxxxxxxxx';
$client = new Client($api_key, $api_secret, $station_id);
$id = 'xxxxxxxxxxx';
$membership = $client->getMembershipById($id);
var_dump($membership);
class stdClass#34 (18) {
public $grace_period => string
public $update_date => string
public $first_name => string
public $last_name => string
public $create_date => string
public $offer => string
public $notes => string
public $current_state =>
class stdClass#28 (2) {
public $explanation =>
class stdClass#35 (3) {
public $status => string
public $timing => string
public $token_activated bool
}
public $has_access => bool
}
public $membership_id => string
public $start_date => string
public $status => string
public $token => string
public $additional_metadata => string
public $activation_date => string
public $provisional => bool
public $expire_date => string
public $pbs_profile =>
class stdClass#24 (7) {
public $first_name => string
public $last_name => string
public $UID => string
public $birth_date => string
public $retrieval_status =>
class stdClass#23 (2) {
public $status => int
public $message => string
}
public $email => string
public $login_provider => string
}
public $email => string
}
$memberships = $client->getActivatedMemberships();
var_dump(count($memberships));
int(51763)
foreach ($memberships as $membership) {
var_dump($membership);
class stdClass#29 (18) {...}
}