Skip to content

Commit 0a79e2b

Browse files
author
Recurly Integrations
authored
Generated Latest Changes for v2021-02-25
1 parent 9c4969c commit 0a79e2b

40 files changed

Lines changed: 1288 additions & 621 deletions

openapi/api.yaml

Lines changed: 388 additions & 554 deletions
Large diffs are not rendered by default.

src/main/java/com/recurly/v3/Client.java

Lines changed: 48 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1730,7 +1730,7 @@ public Pager<Invoice> listInvoices(QueryParams queryParams) {
17301730
* Fetch an invoice
17311731
*
17321732
* @see <a href="https://developers.recurly.com/api/v2021-02-25#operation/get_invoice">get_invoice api documentation</a>
1733-
* @param invoiceId Invoice ID or number. For ID no prefix is used e.g. `e28zov4fw0v2`. For number use prefix `number-`, e.g. `number-1000`.
1733+
* @param invoiceId Invoice ID or number. For ID no prefix is used e.g. `e28zov4fw0v2`. For number use prefix `number-`, e.g. `number-1000`. For number with prefix or country code, use `number-` and `prefix`, e.g. `number-TEST-FR1001`
17341734
* @return An invoice.
17351735
*/
17361736
public Invoice getInvoice(String invoiceId) {
@@ -1746,7 +1746,7 @@ public Invoice getInvoice(String invoiceId) {
17461746
* Update an invoice
17471747
*
17481748
* @see <a href="https://developers.recurly.com/api/v2021-02-25#operation/update_invoice">update_invoice api documentation</a>
1749-
* @param invoiceId Invoice ID or number. For ID no prefix is used e.g. `e28zov4fw0v2`. For number use prefix `number-`, e.g. `number-1000`.
1749+
* @param invoiceId Invoice ID or number. For ID no prefix is used e.g. `e28zov4fw0v2`. For number use prefix `number-`, e.g. `number-1000`. For number with prefix or country code, use `number-` and `prefix`, e.g. `number-TEST-FR1001`
17501750
* @param body The body of the request.
17511751
* @return An invoice.
17521752
*/
@@ -1763,7 +1763,7 @@ public Invoice updateInvoice(String invoiceId, InvoiceUpdate body) {
17631763
* Fetch an invoice as a PDF
17641764
*
17651765
* @see <a href="https://developers.recurly.com/api/v2021-02-25#operation/get_invoice_pdf">get_invoice_pdf api documentation</a>
1766-
* @param invoiceId Invoice ID or number. For ID no prefix is used e.g. `e28zov4fw0v2`. For number use prefix `number-`, e.g. `number-1000`.
1766+
* @param invoiceId Invoice ID or number. For ID no prefix is used e.g. `e28zov4fw0v2`. For number use prefix `number-`, e.g. `number-1000`. For number with prefix or country code, use `number-` and `prefix`, e.g. `number-TEST-FR1001`
17671767
* @return An invoice as a PDF.
17681768
*/
17691769
public BinaryFile getInvoicePdf(String invoiceId) {
@@ -1779,7 +1779,7 @@ public BinaryFile getInvoicePdf(String invoiceId) {
17791779
* Apply available credit to a pending or past due charge invoice
17801780
*
17811781
* @see <a href="https://developers.recurly.com/api/v2021-02-25#operation/apply_credit_balance">apply_credit_balance api documentation</a>
1782-
* @param invoiceId Invoice ID or number. For ID no prefix is used e.g. `e28zov4fw0v2`. For number use prefix `number-`, e.g. `number-1000`.
1782+
* @param invoiceId Invoice ID or number. For ID no prefix is used e.g. `e28zov4fw0v2`. For number use prefix `number-`, e.g. `number-1000`. For number with prefix or country code, use `number-` and `prefix`, e.g. `number-TEST-FR1001`
17831783
* @return The updated invoice.
17841784
*/
17851785
public Invoice applyCreditBalance(String invoiceId) {
@@ -1795,7 +1795,7 @@ public Invoice applyCreditBalance(String invoiceId) {
17951795
* Collect a pending or past due, automatic invoice
17961796
*
17971797
* @see <a href="https://developers.recurly.com/api/v2021-02-25#operation/collect_invoice">collect_invoice api documentation</a>
1798-
* @param invoiceId Invoice ID or number. For ID no prefix is used e.g. `e28zov4fw0v2`. For number use prefix `number-`, e.g. `number-1000`.
1798+
* @param invoiceId Invoice ID or number. For ID no prefix is used e.g. `e28zov4fw0v2`. For number use prefix `number-`, e.g. `number-1000`. For number with prefix or country code, use `number-` and `prefix`, e.g. `number-TEST-FR1001`
17991799
* @return The updated invoice.
18001800
*/
18011801
public Invoice collectInvoice(String invoiceId) {
@@ -1811,7 +1811,7 @@ public Invoice collectInvoice(String invoiceId) {
18111811
* Collect a pending or past due, automatic invoice
18121812
*
18131813
* @see <a href="https://developers.recurly.com/api/v2021-02-25#operation/collect_invoice">collect_invoice api documentation</a>
1814-
* @param invoiceId Invoice ID or number. For ID no prefix is used e.g. `e28zov4fw0v2`. For number use prefix `number-`, e.g. `number-1000`.
1814+
* @param invoiceId Invoice ID or number. For ID no prefix is used e.g. `e28zov4fw0v2`. For number use prefix `number-`, e.g. `number-1000`. For number with prefix or country code, use `number-` and `prefix`, e.g. `number-TEST-FR1001`
18151815
* @param body The body of the request.
18161816
* @return The updated invoice.
18171817
*/
@@ -1828,7 +1828,7 @@ public Invoice collectInvoice(String invoiceId, InvoiceCollect body) {
18281828
* Mark an open invoice as failed
18291829
*
18301830
* @see <a href="https://developers.recurly.com/api/v2021-02-25#operation/mark_invoice_failed">mark_invoice_failed api documentation</a>
1831-
* @param invoiceId Invoice ID or number. For ID no prefix is used e.g. `e28zov4fw0v2`. For number use prefix `number-`, e.g. `number-1000`.
1831+
* @param invoiceId Invoice ID or number. For ID no prefix is used e.g. `e28zov4fw0v2`. For number use prefix `number-`, e.g. `number-1000`. For number with prefix or country code, use `number-` and `prefix`, e.g. `number-TEST-FR1001`
18321832
* @return The updated invoice.
18331833
*/
18341834
public Invoice markInvoiceFailed(String invoiceId) {
@@ -1844,7 +1844,7 @@ public Invoice markInvoiceFailed(String invoiceId) {
18441844
* Mark an open invoice as successful
18451845
*
18461846
* @see <a href="https://developers.recurly.com/api/v2021-02-25#operation/mark_invoice_successful">mark_invoice_successful api documentation</a>
1847-
* @param invoiceId Invoice ID or number. For ID no prefix is used e.g. `e28zov4fw0v2`. For number use prefix `number-`, e.g. `number-1000`.
1847+
* @param invoiceId Invoice ID or number. For ID no prefix is used e.g. `e28zov4fw0v2`. For number use prefix `number-`, e.g. `number-1000`. For number with prefix or country code, use `number-` and `prefix`, e.g. `number-TEST-FR1001`
18481848
* @return The updated invoice.
18491849
*/
18501850
public Invoice markInvoiceSuccessful(String invoiceId) {
@@ -1860,7 +1860,7 @@ public Invoice markInvoiceSuccessful(String invoiceId) {
18601860
* Reopen a closed, manual invoice
18611861
*
18621862
* @see <a href="https://developers.recurly.com/api/v2021-02-25#operation/reopen_invoice">reopen_invoice api documentation</a>
1863-
* @param invoiceId Invoice ID or number. For ID no prefix is used e.g. `e28zov4fw0v2`. For number use prefix `number-`, e.g. `number-1000`.
1863+
* @param invoiceId Invoice ID or number. For ID no prefix is used e.g. `e28zov4fw0v2`. For number use prefix `number-`, e.g. `number-1000`. For number with prefix or country code, use `number-` and `prefix`, e.g. `number-TEST-FR1001`
18641864
* @return The updated invoice.
18651865
*/
18661866
public Invoice reopenInvoice(String invoiceId) {
@@ -1876,7 +1876,7 @@ public Invoice reopenInvoice(String invoiceId) {
18761876
* Void a credit invoice.
18771877
*
18781878
* @see <a href="https://developers.recurly.com/api/v2021-02-25#operation/void_invoice">void_invoice api documentation</a>
1879-
* @param invoiceId Invoice ID or number. For ID no prefix is used e.g. `e28zov4fw0v2`. For number use prefix `number-`, e.g. `number-1000`.
1879+
* @param invoiceId Invoice ID or number. For ID no prefix is used e.g. `e28zov4fw0v2`. For number use prefix `number-`, e.g. `number-1000`. For number with prefix or country code, use `number-` and `prefix`, e.g. `number-TEST-FR1001`
18801880
* @return The updated invoice.
18811881
*/
18821882
public Invoice voidInvoice(String invoiceId) {
@@ -1892,7 +1892,7 @@ public Invoice voidInvoice(String invoiceId) {
18921892
* Record an external payment for a manual invoices.
18931893
*
18941894
* @see <a href="https://developers.recurly.com/api/v2021-02-25#operation/record_external_transaction">record_external_transaction api documentation</a>
1895-
* @param invoiceId Invoice ID or number. For ID no prefix is used e.g. `e28zov4fw0v2`. For number use prefix `number-`, e.g. `number-1000`.
1895+
* @param invoiceId Invoice ID or number. For ID no prefix is used e.g. `e28zov4fw0v2`. For number use prefix `number-`, e.g. `number-1000`. For number with prefix or country code, use `number-` and `prefix`, e.g. `number-TEST-FR1001`
18961896
* @param body The body of the request.
18971897
* @return The recorded transaction.
18981898
*/
@@ -1909,7 +1909,7 @@ public Transaction recordExternalTransaction(String invoiceId, ExternalTransacti
19091909
* List an invoice's line items
19101910
*
19111911
* @see <a href="https://developers.recurly.com/api/v2021-02-25#operation/list_invoice_line_items">list_invoice_line_items api documentation</a>
1912-
* @param invoiceId Invoice ID or number. For ID no prefix is used e.g. `e28zov4fw0v2`. For number use prefix `number-`, e.g. `number-1000`.
1912+
* @param invoiceId Invoice ID or number. For ID no prefix is used e.g. `e28zov4fw0v2`. For number use prefix `number-`, e.g. `number-1000`. For number with prefix or country code, use `number-` and `prefix`, e.g. `number-TEST-FR1001`
19131913
* @param queryParams The {@link QueryParams} for this endpoint.
19141914
* @return A list of the invoice's line items.
19151915
*/
@@ -1928,7 +1928,7 @@ public Pager<LineItem> listInvoiceLineItems(String invoiceId, QueryParams queryP
19281928
* List the coupon redemptions applied to an invoice
19291929
*
19301930
* @see <a href="https://developers.recurly.com/api/v2021-02-25#operation/list_invoice_coupon_redemptions">list_invoice_coupon_redemptions api documentation</a>
1931-
* @param invoiceId Invoice ID or number. For ID no prefix is used e.g. `e28zov4fw0v2`. For number use prefix `number-`, e.g. `number-1000`.
1931+
* @param invoiceId Invoice ID or number. For ID no prefix is used e.g. `e28zov4fw0v2`. For number use prefix `number-`, e.g. `number-1000`. For number with prefix or country code, use `number-` and `prefix`, e.g. `number-TEST-FR1001`
19321932
* @param queryParams The {@link QueryParams} for this endpoint.
19331933
* @return A list of the the coupon redemptions associated with the invoice.
19341934
*/
@@ -1947,7 +1947,7 @@ public Pager<CouponRedemption> listInvoiceCouponRedemptions(String invoiceId, Qu
19471947
* List an invoice's related credit or charge invoices
19481948
*
19491949
* @see <a href="https://developers.recurly.com/api/v2021-02-25#operation/list_related_invoices">list_related_invoices api documentation</a>
1950-
* @param invoiceId Invoice ID or number. For ID no prefix is used e.g. `e28zov4fw0v2`. For number use prefix `number-`, e.g. `number-1000`.
1950+
* @param invoiceId Invoice ID or number. For ID no prefix is used e.g. `e28zov4fw0v2`. For number use prefix `number-`, e.g. `number-1000`. For number with prefix or country code, use `number-` and `prefix`, e.g. `number-TEST-FR1001`
19511951
* @return A list of the credit or charge invoices associated with the invoice.
19521952
*/
19531953
public Pager<Invoice> listRelatedInvoices(String invoiceId) {
@@ -1963,7 +1963,7 @@ public Pager<Invoice> listRelatedInvoices(String invoiceId) {
19631963
* Refund an invoice
19641964
*
19651965
* @see <a href="https://developers.recurly.com/api/v2021-02-25#operation/refund_invoice">refund_invoice api documentation</a>
1966-
* @param invoiceId Invoice ID or number. For ID no prefix is used e.g. `e28zov4fw0v2`. For number use prefix `number-`, e.g. `number-1000`.
1966+
* @param invoiceId Invoice ID or number. For ID no prefix is used e.g. `e28zov4fw0v2`. For number use prefix `number-`, e.g. `number-1000`. For number with prefix or country code, use `number-` and `prefix`, e.g. `number-TEST-FR1001`
19671967
* @param body The body of the request.
19681968
* @return Returns the new credit invoice.
19691969
*/
@@ -2195,6 +2195,39 @@ public AddOn removePlanAddOn(String planId, String addOnId) {
21952195
return this.makeRequest("DELETE", path, returnType);
21962196
}
21972197

2198+
/**
2199+
* List a site's price segments
2200+
*
2201+
* @see <a href="https://developers.recurly.com/api/v2021-02-25#operation/list_price_segments">list_price_segments api documentation</a>
2202+
* @param queryParams The {@link QueryParams} for this endpoint.
2203+
* @return A list of price segments.
2204+
*/
2205+
public Pager<PriceSegment> listPriceSegments(QueryParams queryParams) {
2206+
final String url = "/price_segments";
2207+
final HashMap<String, String> urlParams = new HashMap<String, String>();
2208+
if (queryParams == null) queryParams = new QueryParams();
2209+
final HashMap<String, Object> paramsMap = queryParams.getParams();
2210+
final String path = this.interpolatePath(url, urlParams);
2211+
Type parameterizedType = TypeToken.getParameterized(Pager.class, PriceSegment.class).getType();
2212+
return new Pager<>(path, paramsMap, this, parameterizedType);
2213+
}
2214+
2215+
/**
2216+
* Fetch a price segment
2217+
*
2218+
* @see <a href="https://developers.recurly.com/api/v2021-02-25#operation/get_price_segment">get_price_segment api documentation</a>
2219+
* @param priceSegmentId The price segment ID or code. For ID no prefix is used e.g. `e28zov4fw0v2`. For code use prefix `code-`, e.g. `code-gold`.
2220+
* @return A price segment.
2221+
*/
2222+
public PriceSegment getPriceSegment(String priceSegmentId) {
2223+
final String url = "/price_segments/{price_segment_id}";
2224+
final HashMap<String, String> urlParams = new HashMap<String, String>();
2225+
urlParams.put("price_segment_id", priceSegmentId);
2226+
final String path = this.interpolatePath(url, urlParams);
2227+
Type returnType = PriceSegment.class;
2228+
return this.makeRequest("GET", path, returnType);
2229+
}
2230+
21982231
/**
21992232
* List a site's add-ons
22002233
*
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
/**
2+
* This file is automatically created by Recurly's OpenAPI generation process and thus any edits you
3+
* make by hand will be lost. If you wish to make a change to this file, please create a Github
4+
* issue explaining the changes you need and we will usher them to the appropriate places.
5+
*/
6+
package com.recurly.v3.requests;
7+
8+
import com.recurly.v3.Request;
9+
import com.recurly.v3.resources.*;
10+
11+
public class CurrencyCode extends Request {}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
/**
2+
* This file is automatically created by Recurly's OpenAPI generation process and thus any edits you
3+
* make by hand will be lost. If you wish to make a change to this file, please create a Github
4+
* issue explaining the changes you need and we will usher them to the appropriate places.
5+
*/
6+
package com.recurly.v3.requests;
7+
8+
import com.recurly.v3.Request;
9+
import com.recurly.v3.resources.*;
10+
11+
public class GeneralLedgerAccountId extends Request {}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
/**
2+
* This file is automatically created by Recurly's OpenAPI generation process and thus any edits you
3+
* make by hand will be lost. If you wish to make a change to this file, please create a Github
4+
* issue explaining the changes you need and we will usher them to the appropriate places.
5+
*/
6+
package com.recurly.v3.requests;
7+
8+
import com.recurly.v3.Request;
9+
import com.recurly.v3.resources.*;
10+
11+
public class PerformanceObligationId extends Request {}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
/**
2+
* This file is automatically created by Recurly's OpenAPI generation process and thus any edits you
3+
* make by hand will be lost. If you wish to make a change to this file, please create a Github
4+
* issue explaining the changes you need and we will usher them to the appropriate places.
5+
*/
6+
package com.recurly.v3.requests;
7+
8+
import com.recurly.v3.Request;
9+
import com.recurly.v3.resources.*;
10+
11+
public class PlanCode extends Request {}

src/main/java/com/recurly/v3/requests/PlanCreate.java

Lines changed: 31 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ public class PlanCreate extends Request {
7474
@Expose
7575
private String code;
7676

77-
/** Pricing */
77+
/** Required only when `pricing_model` is `'fixed'`. */
7878
@SerializedName("currencies")
7979
@Expose
8080
private List<PlanPricing> currencies;
@@ -205,6 +205,11 @@ public class PlanCreate extends Request {
205205
@Expose
206206
private Constants.RevenueScheduleType setupFeeRevenueScheduleType;
207207

208+
/** Setup Fees */
209+
@SerializedName("setup_fees")
210+
@Expose
211+
private List<PlanSetupPricingCreate> setupFees;
212+
208213
/**
209214
* Optional field used by Avalara, Vertex, and Recurly's In-the-Box tax solution to determine
210215
* taxation rules. You can pass in specific tax codes using any of these tax integrations. For
@@ -220,7 +225,11 @@ public class PlanCreate extends Request {
220225
@Expose
221226
private Boolean taxExempt;
222227

223-
/** Automatically terminate plans after a defined number of billing cycles. */
228+
/**
229+
* Automatically terminate subscriptions after a defined number of billing cycles. Number of
230+
* billing cycles before the plan automatically stops renewing, defaults to `null` for continuous,
231+
* automatic renewal.
232+
*/
224233
@SerializedName("total_billing_cycles")
225234
@Expose
226235
private Integer totalBillingCycles;
@@ -368,12 +377,12 @@ public void setCode(final String code) {
368377
this.code = code;
369378
}
370379

371-
/** Pricing */
380+
/** Required only when `pricing_model` is `'fixed'`. */
372381
public List<PlanPricing> getCurrencies() {
373382
return this.currencies;
374383
}
375384

376-
/** @param currencies Pricing */
385+
/** @param currencies Required only when `pricing_model` is `'fixed'`. */
377386
public void setCurrencies(final List<PlanPricing> currencies) {
378387
this.currencies = currencies;
379388
}
@@ -636,6 +645,16 @@ public void setSetupFeeRevenueScheduleType(
636645
this.setupFeeRevenueScheduleType = setupFeeRevenueScheduleType;
637646
}
638647

648+
/** Setup Fees */
649+
public List<PlanSetupPricingCreate> getSetupFees() {
650+
return this.setupFees;
651+
}
652+
653+
/** @param setupFees Setup Fees */
654+
public void setSetupFees(final List<PlanSetupPricingCreate> setupFees) {
655+
this.setupFees = setupFees;
656+
}
657+
639658
/**
640659
* Optional field used by Avalara, Vertex, and Recurly's In-the-Box tax solution to determine
641660
* taxation rules. You can pass in specific tax codes using any of these tax integrations. For
@@ -666,14 +685,19 @@ public void setTaxExempt(final Boolean taxExempt) {
666685
this.taxExempt = taxExempt;
667686
}
668687

669-
/** Automatically terminate plans after a defined number of billing cycles. */
688+
/**
689+
* Automatically terminate subscriptions after a defined number of billing cycles. Number of
690+
* billing cycles before the plan automatically stops renewing, defaults to `null` for continuous,
691+
* automatic renewal.
692+
*/
670693
public Integer getTotalBillingCycles() {
671694
return this.totalBillingCycles;
672695
}
673696

674697
/**
675-
* @param totalBillingCycles Automatically terminate plans after a defined number of billing
676-
* cycles.
698+
* @param totalBillingCycles Automatically terminate subscriptions after a defined number of
699+
* billing cycles. Number of billing cycles before the plan automatically stops renewing,
700+
* defaults to `null` for continuous, automatic renewal.
677701
*/
678702
public void setTotalBillingCycles(final Integer totalBillingCycles) {
679703
this.totalBillingCycles = totalBillingCycles;
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
/**
2+
* This file is automatically created by Recurly's OpenAPI generation process and thus any edits you
3+
* make by hand will be lost. If you wish to make a change to this file, please create a Github
4+
* issue explaining the changes you need and we will usher them to the appropriate places.
5+
*/
6+
package com.recurly.v3.requests;
7+
8+
import com.recurly.v3.Request;
9+
import com.recurly.v3.resources.*;
10+
11+
public class PlanIntervalLength extends Request {}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
/**
2+
* This file is automatically created by Recurly's OpenAPI generation process and thus any edits you
3+
* make by hand will be lost. If you wish to make a change to this file, please create a Github
4+
* issue explaining the changes you need and we will usher them to the appropriate places.
5+
*/
6+
package com.recurly.v3.requests;
7+
8+
import com.recurly.v3.Request;
9+
import com.recurly.v3.resources.*;
10+
11+
public class PlanName extends Request {}

0 commit comments

Comments
 (0)