Skip to content

Commit 07b3819

Browse files
schaebostoilkov
authored andcommitted
add missing status "failed" and "expired" in enum Subscription.Status, thanks to @schaebo #59
removed subscriotion update by string
1 parent fd4f921 commit 07b3819

File tree

2 files changed

+1
-33
lines changed

2 files changed

+1
-33
lines changed

src/main/java/com/paymill/models/Subscription.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -493,7 +493,7 @@ public Subscription.Order byCreatedAt() {
493493

494494
public enum Status {
495495

496-
ACTIVE("active"), INACTIVE("inactive");
496+
ACTIVE("active"), INACTIVE("inactive"), FAILED("failed"), EXPIRED("expired");
497497

498498
private String value;
499499

src/main/java/com/paymill/services/SubscriptionService.java

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -697,36 +697,4 @@ private Subscription delete( Subscription subscription, boolean remove ) {
697697
public Subscription update( Subscription subscription ) {
698698
return RestfulUtils.update( SubscriptionService.PATH, subscription, Subscription.class, super.httpClient );
699699
}
700-
701-
/**
702-
* Updates a subscription.Following fields will be updated:<br />
703-
* <p>
704-
* <ul>
705-
* <li>interval (note, that nextCaptureAt will not change.)
706-
* <li>currency
707-
* <li>name
708-
* <ul>
709-
* <p>
710-
* To update further properties of a subscription use following methods:<br />
711-
* <p>
712-
* <ul>
713-
* <li>{@link SubscriptionService#cancel(Subscription)} to cancel
714-
* <li>{@link SubscriptionService#changeAmount(Subscription, Integer)} to change the amount
715-
* <li>{@link SubscriptionService#changeOfferChangeCaptureDateAndRefund(Subscription, Offer)} to change the offer.
716-
* <li>{@link SubscriptionService#changeOfferKeepCaptureDateAndRefund(Subscription, Offer)} to change the offer.
717-
* <li>{@link SubscriptionService#changeOfferKeepCaptureDateNoRefund(Subscription, Offer)} to change the offer.
718-
* <li>{@link SubscriptionService#endTrial(Subscription)} to end the trial
719-
* <li>{@link SubscriptionService#limitValidity(Subscription, com.paymill.models.Interval.Period} to change the validity.
720-
* <li>{@link SubscriptionService#pause(Subscription)} to pause
721-
* <li>{@link SubscriptionService#unlimitValidity(Subscription)} to change the validity.
722-
* <li>{@link SubscriptionService#unpause(Subscription)} to unpause.
723-
* <ul>
724-
* <p>
725-
* @param subscriptionId
726-
* Id of the {@link Subscription} to be updated.
727-
* @return
728-
*/
729-
public Subscription update( String subscriptionId ) {
730-
return RestfulUtils.update( SubscriptionService.PATH, new Subscription( subscriptionId ), Subscription.class, super.httpClient );
731-
}
732700
}

0 commit comments

Comments
 (0)