Skip to content

Commit

Permalink
Merge pull request #64 from recurly/balance-in-cents
Browse files Browse the repository at this point in the history
Added support for balance_in_cents(invoiced,uninvoiced)
  • Loading branch information
drewish committed May 8, 2014
2 parents 1061709 + bff23ed commit e7e5598
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 0 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Recurly PHP Client Library CHANGELOG

## Version 2.2.6 (?)

* Added support for field balance_in_cents_invoiced
* Added support for field balance_in_cents_uninvoiced

## Version 2.2.5 (Apr 24th, 2014)

* Explictly call `Recurly_Resource`'s constructor [#67](https://github.com/recurly/recurly-client-php/pull/67)
Expand Down
8 changes: 8 additions & 0 deletions Tests/fixtures/accounts/show-200.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,14 @@ Content-Type: application/xml; charset=utf-8
<last_name>David</last_name>
<company_name>Home Box Office</company_name>
<vat_number>ST-1937</vat_number>
<balance_in_cents_invoiced>
<USD type="integer">1000</USD>
<EUR type="integer">800</EUR>
</balance_in_cents_invoiced>
<balance_in_cents_uninvoiced>
<USD type="integer">1200</USD>
<EUR type="integer">700</EUR>
</balance_in_cents_uninvoiced>
<address>
<address1>123 Main St.</address1>
<address2>APT #6</address2>
Expand Down
2 changes: 2 additions & 0 deletions lib/recurly/account.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ function __construct($accountCode = null, $client = null) {
if (!is_null($accountCode))
$this->account_code = $accountCode;
$this->address = new Recurly_Address();
$this->balance_in_cents_invoiced = new Recurly_CurrencyList('balance_in_cents_invoiced');
$this->balance_in_cents_uninvoiced = new Recurly_CurrencyList('balance_in_cents_uninvoiced');
}

public static function init()
Expand Down
2 changes: 2 additions & 0 deletions lib/recurly/base.php
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,8 @@ private function addLink($name, $href, $method){
'address' => 'Recurly_Address',
'add_on' => 'Recurly_Addon',
'add_ons' => 'Recurly_AddonList',
'balance_in_cents_invoiced' => 'Recurly_CurrencyList',
'balance_in_cents_uninvoiced' => 'Recurly_CurrencyList',
'billing_info' => 'Recurly_BillingInfo',
'adjustment' => 'Recurly_Adjustment',
'adjustments' => 'Recurly_AdjustmentList',
Expand Down

0 comments on commit e7e5598

Please sign in to comment.