Skip to content

Commit

Permalink
Add RevRec POBs support
Browse files Browse the repository at this point in the history
  • Loading branch information
faiberrec committed Feb 2, 2024
1 parent e91b742 commit fb9e42e
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/recurly.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,8 @@
require_once(__DIR__ . '/recurly/note.php');
require_once(__DIR__ . '/recurly/note_list.php');
require_once(__DIR__ . '/recurly/percentage_tier.php');
require_once(__DIR__ . '/recurly/performance_obligation.php');
require_once(__DIR__ . '/recurly/performance_obligation_list.php');
require_once(__DIR__ . '/recurly/plan.php');
require_once(__DIR__ . '/recurly/plan_list.php');
require_once(__DIR__ . '/recurly/ramp_interval.php');
Expand Down
1 change: 1 addition & 0 deletions lib/recurly/client.php
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ class Recurly_Client
const PATH_EXTERNAL_ACCOUNTS = 'external_accounts';
const PATH_BUSINESS_ENTITIES = 'business_entities';
const PATH_GENERAL_LEDGER_ACCOUNTS = 'general_ledger_accounts';
const PATH_PERFORMANCE_OBLIGATIONS = 'performance_obligations';

/**
* Create a new Recurly Client
Expand Down
34 changes: 34 additions & 0 deletions lib/recurly/performance_obligation.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<?php

/**
* Class Recurly PerformanceObligation
* @property string $id
* @property string $name The name of the POB.
* @property DateTime $created_at The date and time the gla was created in Recurly.
* @property DateTime $updated_at The date and time the gla was last updated.
*/

class Recurly_PerformanceObligation extends Recurly_Resource
{
/**
* @param string $id
* @param Recurly_Client $client
* @return Recurly_PerformanceObligation
* @throws Recurly_Error
*/
public static function get($id, $client = null) {
return Recurly_Base::_get(Recurly_PerformanceObligation::uriForPerformanceObligation($id), $client);
}

protected static function uriForPerformanceObligation($id) {
return self::_safeUri(Recurly_Client::PATH_PERFORMANCE_OBLIGATIONS, $id);
}

protected function getNodeName() {
return 'performance_obligation';
}

protected function getWriteableAttributes() {
return array();
}
}

0 comments on commit fb9e42e

Please sign in to comment.