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
Add support for Subscription Schedule APIs #673
Conversation
e725bce
to
9d0613b
Compare
This is now ready to be reviewed. r? @mickjermsurawong-stripe |
9d0613b
to
db4f030
Compare
|
||
// <editor-fold desc="cancel"> | ||
/** | ||
* Pay a subscription schedule. |
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 be cancel a subscription schedule?
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.
damn copy/paste and replace. Fixed all 8 of them.
db4f030
to
4ae1863
Compare
import com.stripe.net.RequestOptions; | ||
import java.util.Map; | ||
|
||
public class SubscriptionScheduleRevisionCollection |
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.
Hmm.. actually no other resource returns this collection, so we can never get an instance of this collection to make the API request (with the existing url)..
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 can go with the followings..
In SubscriptionSchedule.java
we have
public SubscriptionScheduleRevisionCollection revisions()
Then, we remove the list
method from the SubscriptionScheduleRevisionCollection.java
..
I fixed my client metadata and the generated outcome looks like this..
stripe-java/src/main/java/com/stripe/model/SubscriptionSchedule.java
Lines 338 to 356 in abaada5
public SubscriptionScheduleRevisionCollection revisions() throws StripeException { | |
return revisions((Map<String, Object>) null, (RequestOptions) null); | |
} | |
/** Retrieves the list of subscription schedule revisions for a subscription schedule. */ | |
public SubscriptionScheduleRevisionCollection revisions(Map<String, Object> params) | |
throws StripeException { | |
return revisions(params, (RequestOptions) null); | |
} | |
/** Retrieves the list of subscription schedule revisions for a subscription schedule. */ | |
public SubscriptionScheduleRevisionCollection revisions( | |
Map<String, Object> params, RequestOptions options) throws StripeException { | |
String url = | |
String.format( | |
"%s%s", | |
Stripe.getApiBase(), | |
String.format("/v1/subscription_schedules/%s/revisions", this.getId())); | |
return requestCollection(url, params, SubscriptionScheduleRevisionCollection.class, options); |
I believe this is similar to account/person relationship
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.
@mickjermsurawong-stripe Nice catch, fixed!
ptal @remi-stripe just on the revision collection because it is currently not returned anywhere.. |
4ae1863
to
db4119b
Compare
thank @remi-stripe |
Add support for Subscription Schedule APIs
invoice_settings
on the Customercc @stripe/api-libraries