-
Notifications
You must be signed in to change notification settings - Fork 97
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
GET /external_subscriptions/{external_subscription_id}/external_payment_phases GET /external_subscriptions/{external_subscription_id}/external_payment_phases/{external_payment_phase_id} GET /external_payment_phases/{external_payment_phase_id}
- Loading branch information
1 parent
0fcf37e
commit e6e1016
Showing
11 changed files
with
452 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
179 changes: 179 additions & 0 deletions
179
src/main/java/com/ning/billing/recurly/model/ExternalPaymentPhase.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,179 @@ | ||
/* | ||
* Copyright 2010-2014 Ning, Inc. | ||
* Copyright 2014-2015 The Billing Project, LLC | ||
* | ||
* The Billing Project licenses this file to you under the Apache License, version 2.0 | ||
* (the "License"); you may not use this file except in compliance with the | ||
* License. You may obtain a copy of the License at: | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT | ||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the | ||
* License for the specific language governing permissions and limitations | ||
* under the License. | ||
*/ | ||
package com.ning.billing.recurly.model; | ||
|
||
import java.math.BigDecimal; | ||
|
||
import javax.xml.bind.annotation.XmlElement; | ||
import javax.xml.bind.annotation.XmlRootElement; | ||
|
||
import org.joda.time.DateTime; | ||
|
||
@XmlRootElement(name = "external_payment_phase") | ||
public class ExternalPaymentPhase extends RecurlyObject { | ||
|
||
@XmlElement(name = "started_at") | ||
private DateTime startedAt; | ||
|
||
@XmlElement(name = "ends_at") | ||
private DateTime endsAt; | ||
|
||
@XmlElement(name = "starting_billing_period_index") | ||
private int startingBillingPeriodIndex; | ||
|
||
@XmlElement(name = "ending_billing_period_index") | ||
private int endingBillingPeriodIndex; | ||
|
||
@XmlElement(name = "offer_type") | ||
private String offerType; | ||
|
||
@XmlElement(name = "offer_name") | ||
private String offerName; | ||
|
||
@XmlElement(name = "period_count") | ||
private int periodCount; | ||
|
||
@XmlElement(name = "period_length") | ||
private String periodLength; | ||
|
||
@XmlElement(name = "amount") | ||
private BigDecimal amount; | ||
|
||
@XmlElement(name = "currency") | ||
private String currency; | ||
|
||
@XmlElement(name = "created_at") | ||
private DateTime createdAt; | ||
|
||
@XmlElement(name = "updated_at") | ||
private DateTime updatedAt; | ||
|
||
public DateTime getStartedAt() { | ||
return this.startedAt; | ||
} | ||
|
||
public void setStartedAt(final Object startedAt) { | ||
this.startedAt = dateTimeOrNull(startedAt); | ||
} | ||
|
||
public DateTime getEndsAt() { | ||
return this.endsAt; | ||
} | ||
|
||
public void setEndsAt(final Object endsAt) { | ||
this.endsAt = dateTimeOrNull(endsAt); | ||
} | ||
|
||
public int getStartingBillingPeriodIndex() { | ||
return this.startingBillingPeriodIndex; | ||
} | ||
|
||
public void setStartingBillingPeriodIndex(final Object startingBillingPeriodIndex) { | ||
this.startingBillingPeriodIndex = integerOrNull(startingBillingPeriodIndex); | ||
} | ||
|
||
public int getEndingBillingPeriodIndex() { | ||
return this.endingBillingPeriodIndex; | ||
} | ||
|
||
public void setEndingBillingPeriodIndex(final Object endingBillingPeriodIndex) { | ||
this.endingBillingPeriodIndex = integerOrNull(endingBillingPeriodIndex); | ||
} | ||
|
||
public String getOfferType() { | ||
return this.offerType; | ||
} | ||
|
||
public void setOfferType(final Object offerType) { | ||
this.offerType = stringOrNull(offerType); | ||
} | ||
|
||
public String getOfferName() { | ||
return this.offerName; | ||
} | ||
|
||
public void setOfferName(final Object offerName) { | ||
this.offerName = stringOrNull(offerName); | ||
} | ||
|
||
public int getPeriodCount() { | ||
return this.periodCount; | ||
} | ||
|
||
public void setPeriodCount(final Object periodCount) { | ||
this.periodCount = integerOrNull(periodCount); | ||
} | ||
|
||
public String getPeriodLength() { | ||
return this.periodLength; | ||
} | ||
|
||
public void setPeriodLength(final Object periodLength) { | ||
this.periodLength = stringOrNull(periodLength); | ||
} | ||
|
||
public BigDecimal getAmount() { | ||
return this.amount; | ||
} | ||
|
||
public void setAmount(final Object amount) { | ||
this.amount = bigDecimalOrNull(amount); | ||
} | ||
|
||
public String getCurrency() { | ||
return this.currency; | ||
} | ||
|
||
public void setCurrency(final Object currency) { | ||
this.currency = stringOrNull(currency); | ||
} | ||
|
||
public DateTime getCreatedAt() { | ||
return this.createdAt; | ||
} | ||
|
||
public void setCreatedAt(final Object createdAt) { | ||
this.createdAt = dateTimeOrNull(createdAt); | ||
} | ||
|
||
public DateTime getUpdatedAt() { | ||
return this.updatedAt; | ||
} | ||
|
||
public void setUpdatedAt(final Object updatedAt) { | ||
this.updatedAt = dateTimeOrNull(updatedAt); | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
final StringBuilder sb = new StringBuilder("ExternalPaymentPhase{"); | ||
sb.append("started_at=").append(startedAt); | ||
sb.append(", ends_at=").append(endsAt); | ||
sb.append(", starting_billing_period_index=").append(startingBillingPeriodIndex); | ||
sb.append(", ending_billing_period_index=").append(endingBillingPeriodIndex); | ||
sb.append(", offer_type=").append(offerType); | ||
sb.append(", offer_name=").append(offerName); | ||
sb.append(", period_count=").append(periodCount); | ||
sb.append(", period_length=").append(periodLength); | ||
sb.append(", amount=").append(amount); | ||
sb.append(", currency=").append(currency); | ||
sb.append(", createdAt=").append(createdAt); | ||
sb.append(", updatedAt=").append(updatedAt); | ||
sb.append('}'); | ||
return sb.toString(); | ||
} | ||
} |
52 changes: 52 additions & 0 deletions
52
src/main/java/com/ning/billing/recurly/model/ExternalPaymentPhases.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
/* | ||
* Copyright 2010-2014 Ning, Inc. | ||
* Copyright 2014-2015 The Billing Project, LLC | ||
* | ||
* The Billing Project licenses this file to you under the Apache License, version 2.0 | ||
* (the "License"); you may not use this file except in compliance with the | ||
* License. You may obtain a copy of the License at: | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT | ||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the | ||
* License for the specific language governing permissions and limitations | ||
* under the License. | ||
*/ | ||
package com.ning.billing.recurly.model; | ||
|
||
import javax.xml.bind.annotation.XmlRootElement; | ||
import javax.xml.bind.annotation.XmlTransient; | ||
|
||
import com.fasterxml.jackson.annotation.JsonIgnore; | ||
import com.fasterxml.jackson.annotation.JsonSetter; | ||
|
||
@XmlRootElement(name = "external_payment_phases") | ||
public class ExternalPaymentPhases extends RecurlyObjects<ExternalPaymentPhase> { | ||
|
||
@XmlTransient | ||
public static final String EXTERNAL_PAYMENT_PHASES_RESOURCE = "/external_payment_phases"; | ||
|
||
@XmlTransient | ||
public static final String PROPERTY_NAME = "external_payment_phase"; | ||
|
||
@JsonSetter(value = PROPERTY_NAME) | ||
@Override | ||
public void setRecurlyObject(final ExternalPaymentPhase value) { | ||
super.setRecurlyObject(value); | ||
} | ||
|
||
@JsonIgnore | ||
@Override | ||
public ExternalPaymentPhases getStart() { | ||
return getStart(ExternalPaymentPhases.class); | ||
} | ||
|
||
@JsonIgnore | ||
@Override | ||
public ExternalPaymentPhases getNext() { | ||
return getNext(ExternalPaymentPhases.class); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.