-
Notifications
You must be signed in to change notification settings - Fork 93
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Purchases endpoint #315
Purchases endpoint #315
Conversation
"<?xml version=\"1.0\"?>\n<shipping_address><address1>123 Dolores St.</address1><city>San Francisco</city><state>CA</state><zip>94110</zip><country>US</country><phone>555-555-5555</phone><email>verena@example.com</email><nickname>Work</nickname><first_name>Verena</first_name><last_name>Example</last_name><company>Recurly Inc.</company></shipping_address>\n", | ||
$shad->xml() | ||
); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 now i get a failing spec if i comment out the other branch in Recurly_ShippingAddress::populateXmlDoc()
Tests/Recurly/Purchase_Test.php
Outdated
@@ -30,7 +30,7 @@ public function mockPurchase() { | |||
$adjustment->quantity = 1; | |||
$adjustment->revenue_schedule_type = 'at_invoice'; | |||
|
|||
$purchase->adjustments = array($adjustment); | |||
$purchase->adjustments[] = $adjustment; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did we decide we needed this change?
Tests/Recurly/Purchase_Test.php
Outdated
$invoice = Recurly_Purchase::preview($purchase, $this->client); | ||
|
||
$this->assertInstanceOf('Recurly_Invoice', $invoice); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we assert a null uuid here?
lib/recurly/resource.php
Outdated
@@ -134,7 +134,7 @@ protected function populateXmlDoc(&$doc, &$node, &$obj, $nested = false) | |||
elseif (is_int($child)) { | |||
if (is_object($childValue)) { | |||
// e.g. "<subscription_add_ons><subscription_add_on>...</subscription_add_on></subscription_add_ons>" | |||
$childValue->populateXmlDoc($doc, $attribute_node, $childValue); | |||
$childValue->populateXmlDoc($doc, $attribute_node, $childValue, true); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's this change doing?
Purchases endpoint.