-
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
API version 2.7 #319
API version 2.7 #319
Conversation
lib/recurly/purchase.php
Outdated
@@ -7,6 +7,9 @@ | |||
* @property string $currency The currency to use in this invoice | |||
* @property string $po_number The po number for the invoice | |||
* @property integer $net_terms The net terms of the invoice | |||
* @property array $coupon_codes An array of coupon codes to apply to the purchase | |||
* @property array $subscriptions An array of subscriptions to apply to the purchase |
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.
Looking at the PHPDoc docs for types, it seems like we can document the types in the array using:
* @property string[] $coupon_codes An array of coupon codes to apply to the purchase
* @property Recurly_Subscription[] $subscriptions An array of subscriptions to apply to the purchase
Also, I'm not sure apply is the right verb to use for subscriptions.
lib/recurly/purchase.php
Outdated
@@ -7,6 +7,9 @@ | |||
* @property string $currency The currency to use in this invoice | |||
* @property string $po_number The po number for the invoice | |||
* @property integer $net_terms The net terms of the invoice | |||
* @property array $coupon_codes An array of coupon codes to apply to the purchase | |||
* @property array $subscriptions An array of subscriptions to apply to the purchase | |||
* @property Recurly_GiftCard $gift_card A GiftCard to apply to the purchase |
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.
let's change A GiftCard
to A gift card
lib/recurly/subscription.php
Outdated
@@ -136,4 +143,9 @@ protected function getWriteableAttributes() { | |||
'shipping_address', 'shipping_address_id' | |||
); | |||
} | |||
private function isEmbedded($node) { |
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.
I think we'd talked about moving this up the inheritance tree at one point since there's a few classes using it. What do you think about doing that as part of this PR?
lib/recurly/subscription.php
Outdated
@@ -4,7 +4,6 @@ class Recurly_Subscription extends Recurly_Resource | |||
{ | |||
public function __construct($href = null, $client = null) { | |||
parent::__construct($href, $client); | |||
$this->subscription_add_ons = array(); |
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.
@bhelx and I discovered that we can't remove this or it'll break the serialization for the subscription creation endpoint. it was being removed because the purchases endpoint doesn't allow an empty array. we need to get get a fix into the purchases endpoint before we can merge this.
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.
Right, it works for purchases if we remove this line here, but breaks the library in other places.
a70c759
to
2f3bbb0
Compare
2f3bbb0
to
98e61fc
Compare
98e61fc
to
10fd024
Compare
API v2.7 only has 1 feature, the updates to the purchases endpoint.