Add an append option and refactor methods to use ApiResource functions #45

Closed
wants to merge 1 commit into
from

Conversation

Projects
None yet
3 participants
Contributor

jpiasetz commented Jul 7, 2013

Refactored a few methods to use ApiResource. There are a few more place where something like this can be done.

@michelle michelle and 1 other commented on an outdated diff Mar 10, 2014

lib/Stripe/Invoice.php
@@ -40,12 +38,9 @@ public function save()
return self::_scopedSave($class);
}
- public function pay()
+ public function pay($params=null)
@michelle

michelle Mar 10, 2014

Contributor

You wouldn't ever want $params here, right? Might be less confusing to leave it out.

@jpiasetz

jpiasetz Mar 11, 2014

Contributor

Yea probably. There is a lot of duplication in these functions would probably be good to refactor them further.

Contributor

bkrausz commented Jul 11, 2014

@jpiasetz Sorry for the unacceptably long delay!

I don't think this would actually work, since these calls all use instanceUrl(), not classUrl(). I'm in favor of splitting this out, but it probably belongs more as a separate call (_scopedSubcall?). Will think about it some more and see if there's some cleanup that can be done.

Contributor

bkrausz commented Jul 28, 2015

Given that this has been sitting for years, I'm going to close it out. Feel free to open a new PR if still applicable.

bkrausz closed this Jul 28, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment