Skip to content

Commit

Permalink
Merge pull request #241 from recurly/less-getRequiredAttributes
Browse files Browse the repository at this point in the history
Provide default getWriteableAttributes()
  • Loading branch information
bhelx committed Jun 22, 2016
2 parents b896a78 + 947454d commit 5805e80
Show file tree
Hide file tree
Showing 16 changed files with 4 additions and 46 deletions.
1 change: 0 additions & 1 deletion Tests/Recurly/Pager_Test.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ public function _loadFrom($uri, $params = null) {
class Mock_Item extends Recurly_Resource {
protected function getNodeName() { return 'mock'; }
protected function getWriteableAttributes() { return array(); }
protected function getRequiredAttributes() { return array(); }
}
Recurly_Resource::$class_map['mock'] = 'Mock_Item';

Expand Down
3 changes: 0 additions & 3 deletions lib/recurly/addon.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,6 @@ protected function getNodeName() {
protected function getWriteableAttributes() {
return Recurly_Addon::$_writeableAttributes;
}
protected function getRequiredAttributes() {
return array();
}
}

Recurly_Addon::init();
4 changes: 0 additions & 4 deletions lib/recurly/address.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,6 @@ protected function getNodeName() {
protected function getWriteableAttributes() {
return Recurly_Address::$_writeableAttributes;
}
protected function getRequiredAttributes() {
return array();
}

}

Recurly_Address::init();
3 changes: 0 additions & 3 deletions lib/recurly/adjustment.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,6 @@ protected function getNodeName() {
protected function getWriteableAttributes() {
return Recurly_Adjustment::$_writeableAttributes;
}
protected function getRequiredAttributes() {
return array();
}
}

Recurly_Adjustment::init();
3 changes: 0 additions & 3 deletions lib/recurly/billing_info.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,6 @@ protected function getNodeName() {
protected function getWriteableAttributes() {
return Recurly_BillingInfo::$_writeableAttributes;
}
protected function getRequiredAttributes() {
return array();
}
}

Recurly_BillingInfo::init();
3 changes: 0 additions & 3 deletions lib/recurly/coupon.php
Original file line number Diff line number Diff line change
Expand Up @@ -124,9 +124,6 @@ protected function getWriteableAttributes() {
protected function getUpdatableAttributes() {
return Recurly_Coupon::$_updatableAttributes;
}
protected function getRequiredAttributes() {
return array();
}
}

Recurly_Coupon::init();
3 changes: 0 additions & 3 deletions lib/recurly/invoice.php
Original file line number Diff line number Diff line change
Expand Up @@ -123,9 +123,6 @@ protected function getNodeName() {
protected function getWriteableAttributes() {
return Recurly_Invoice::$_writeableAttributes;
}
protected function getRequiredAttributes() {
return array();
}
protected function uri() {
$invoiceNumberWithPrefix = $this->invoiceNumberWithPrefix();
if (!empty($this->_href))
Expand Down
3 changes: 0 additions & 3 deletions lib/recurly/measured_unit.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,6 @@ protected function getNodeName() {
protected function getWriteableAttributes() {
return Recurly_MeasuredUnit::$_writeableAttributes;
}
protected function getRequiredAttributes() {
return array();
}
}

Recurly_MeasuredUnit::init();
4 changes: 0 additions & 4 deletions lib/recurly/note.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,4 @@ protected function getNodeName() {
protected function getWriteableAttributes() {
return array();
}

protected function getRequiredAttributes() {
return array();
}
}
3 changes: 0 additions & 3 deletions lib/recurly/plan.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,6 @@ protected function getNodeName() {
protected function getWriteableAttributes() {
return Recurly_Plan::$_writeableAttributes;
}
protected function getRequiredAttributes() {
return array();
}
}

Recurly_Plan::init();
5 changes: 4 additions & 1 deletion lib/recurly/resource.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@ abstract class Recurly_Resource extends Recurly_Base

abstract protected function getNodeName();
abstract protected function getWriteableAttributes();
abstract protected function getRequiredAttributes();
protected function getRequiredAttributes()
{
return array();
}

public function __construct($href = null, $client = null)
{
Expand Down
3 changes: 0 additions & 3 deletions lib/recurly/subscription.php
Original file line number Diff line number Diff line change
Expand Up @@ -134,9 +134,6 @@ protected function getNodeName() {
protected function getWriteableAttributes() {
return Recurly_Subscription::$_writeableAttributes;
}
protected function getRequiredAttributes() {
return array();
}
}

Recurly_Subscription::init();
3 changes: 0 additions & 3 deletions lib/recurly/subscription_addon.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,6 @@ protected function getNodeName() {
protected function getWriteableAttributes() {
return Recurly_SubscriptionAddOn::$_writeableAttributes;
}
protected function getRequiredAttributes() {
return array();
}

protected function populateXmlDoc(&$doc, &$node, &$obj, $nested = false) {
$addonNode = $node->appendChild($doc->createElement($this->getNodeName()));
Expand Down
3 changes: 0 additions & 3 deletions lib/recurly/tax_detail.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,4 @@ protected function getNodeName() {
protected function getWriteableAttributes() {
return array();
}
protected function getRequiredAttributes() {
return array();
}
}
3 changes: 0 additions & 3 deletions lib/recurly/transaction.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,6 @@ protected function getNodeName() {
protected function getWriteableAttributes() {
return Recurly_Transaction::$_writeableAttributes;
}
protected function getRequiredAttributes() {
return array();
}
}

Recurly_Transaction::init();
3 changes: 0 additions & 3 deletions lib/recurly/usage.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,6 @@ protected function getNodeName() {
protected function getWriteableAttributes() {
return Recurly_Usage::$_writeableAttributes;
}
protected function getRequiredAttributes() {
return array();
}
}

Recurly_Usage::init();

0 comments on commit 5805e80

Please sign in to comment.