Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
942 changes: 388 additions & 554 deletions openapi/api.yaml

Large diffs are not rendered by default.

63 changes: 48 additions & 15 deletions src/main/java/com/recurly/v3/Client.java
Original file line number Diff line number Diff line change
Expand Up @@ -1730,7 +1730,7 @@ public Pager<Invoice> listInvoices(QueryParams queryParams) {
* Fetch an invoice
*
* @see <a href="https://developers.recurly.com/api/v2021-02-25#operation/get_invoice">get_invoice api documentation</a>
* @param invoiceId Invoice ID or number. For ID no prefix is used e.g. `e28zov4fw0v2`. For number use prefix `number-`, e.g. `number-1000`.
* @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`
* @return An invoice.
*/
public Invoice getInvoice(String invoiceId) {
Expand All @@ -1746,7 +1746,7 @@ public Invoice getInvoice(String invoiceId) {
* Update an invoice
*
* @see <a href="https://developers.recurly.com/api/v2021-02-25#operation/update_invoice">update_invoice api documentation</a>
* @param invoiceId Invoice ID or number. For ID no prefix is used e.g. `e28zov4fw0v2`. For number use prefix `number-`, e.g. `number-1000`.
* @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`
* @param body The body of the request.
* @return An invoice.
*/
Expand All @@ -1763,7 +1763,7 @@ public Invoice updateInvoice(String invoiceId, InvoiceUpdate body) {
* Fetch an invoice as a PDF
*
* @see <a href="https://developers.recurly.com/api/v2021-02-25#operation/get_invoice_pdf">get_invoice_pdf api documentation</a>
* @param invoiceId Invoice ID or number. For ID no prefix is used e.g. `e28zov4fw0v2`. For number use prefix `number-`, e.g. `number-1000`.
* @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`
* @return An invoice as a PDF.
*/
public BinaryFile getInvoicePdf(String invoiceId) {
Expand All @@ -1779,7 +1779,7 @@ public BinaryFile getInvoicePdf(String invoiceId) {
* Apply available credit to a pending or past due charge invoice
*
* @see <a href="https://developers.recurly.com/api/v2021-02-25#operation/apply_credit_balance">apply_credit_balance api documentation</a>
* @param invoiceId Invoice ID or number. For ID no prefix is used e.g. `e28zov4fw0v2`. For number use prefix `number-`, e.g. `number-1000`.
* @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`
* @return The updated invoice.
*/
public Invoice applyCreditBalance(String invoiceId) {
Expand All @@ -1795,7 +1795,7 @@ public Invoice applyCreditBalance(String invoiceId) {
* Collect a pending or past due, automatic invoice
*
* @see <a href="https://developers.recurly.com/api/v2021-02-25#operation/collect_invoice">collect_invoice api documentation</a>
* @param invoiceId Invoice ID or number. For ID no prefix is used e.g. `e28zov4fw0v2`. For number use prefix `number-`, e.g. `number-1000`.
* @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`
* @return The updated invoice.
*/
public Invoice collectInvoice(String invoiceId) {
Expand All @@ -1811,7 +1811,7 @@ public Invoice collectInvoice(String invoiceId) {
* Collect a pending or past due, automatic invoice
*
* @see <a href="https://developers.recurly.com/api/v2021-02-25#operation/collect_invoice">collect_invoice api documentation</a>
* @param invoiceId Invoice ID or number. For ID no prefix is used e.g. `e28zov4fw0v2`. For number use prefix `number-`, e.g. `number-1000`.
* @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`
* @param body The body of the request.
* @return The updated invoice.
*/
Expand All @@ -1828,7 +1828,7 @@ public Invoice collectInvoice(String invoiceId, InvoiceCollect body) {
* Mark an open invoice as failed
*
* @see <a href="https://developers.recurly.com/api/v2021-02-25#operation/mark_invoice_failed">mark_invoice_failed api documentation</a>
* @param invoiceId Invoice ID or number. For ID no prefix is used e.g. `e28zov4fw0v2`. For number use prefix `number-`, e.g. `number-1000`.
* @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`
* @return The updated invoice.
*/
public Invoice markInvoiceFailed(String invoiceId) {
Expand All @@ -1844,7 +1844,7 @@ public Invoice markInvoiceFailed(String invoiceId) {
* Mark an open invoice as successful
*
* @see <a href="https://developers.recurly.com/api/v2021-02-25#operation/mark_invoice_successful">mark_invoice_successful api documentation</a>
* @param invoiceId Invoice ID or number. For ID no prefix is used e.g. `e28zov4fw0v2`. For number use prefix `number-`, e.g. `number-1000`.
* @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`
* @return The updated invoice.
*/
public Invoice markInvoiceSuccessful(String invoiceId) {
Expand All @@ -1860,7 +1860,7 @@ public Invoice markInvoiceSuccessful(String invoiceId) {
* Reopen a closed, manual invoice
*
* @see <a href="https://developers.recurly.com/api/v2021-02-25#operation/reopen_invoice">reopen_invoice api documentation</a>
* @param invoiceId Invoice ID or number. For ID no prefix is used e.g. `e28zov4fw0v2`. For number use prefix `number-`, e.g. `number-1000`.
* @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`
* @return The updated invoice.
*/
public Invoice reopenInvoice(String invoiceId) {
Expand All @@ -1876,7 +1876,7 @@ public Invoice reopenInvoice(String invoiceId) {
* Void a credit invoice.
*
* @see <a href="https://developers.recurly.com/api/v2021-02-25#operation/void_invoice">void_invoice api documentation</a>
* @param invoiceId Invoice ID or number. For ID no prefix is used e.g. `e28zov4fw0v2`. For number use prefix `number-`, e.g. `number-1000`.
* @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`
* @return The updated invoice.
*/
public Invoice voidInvoice(String invoiceId) {
Expand All @@ -1892,7 +1892,7 @@ public Invoice voidInvoice(String invoiceId) {
* Record an external payment for a manual invoices.
*
* @see <a href="https://developers.recurly.com/api/v2021-02-25#operation/record_external_transaction">record_external_transaction api documentation</a>
* @param invoiceId Invoice ID or number. For ID no prefix is used e.g. `e28zov4fw0v2`. For number use prefix `number-`, e.g. `number-1000`.
* @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`
* @param body The body of the request.
* @return The recorded transaction.
*/
Expand All @@ -1909,7 +1909,7 @@ public Transaction recordExternalTransaction(String invoiceId, ExternalTransacti
* List an invoice's line items
*
* @see <a href="https://developers.recurly.com/api/v2021-02-25#operation/list_invoice_line_items">list_invoice_line_items api documentation</a>
* @param invoiceId Invoice ID or number. For ID no prefix is used e.g. `e28zov4fw0v2`. For number use prefix `number-`, e.g. `number-1000`.
* @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`
* @param queryParams The {@link QueryParams} for this endpoint.
* @return A list of the invoice's line items.
*/
Expand All @@ -1928,7 +1928,7 @@ public Pager<LineItem> listInvoiceLineItems(String invoiceId, QueryParams queryP
* List the coupon redemptions applied to an invoice
*
* @see <a href="https://developers.recurly.com/api/v2021-02-25#operation/list_invoice_coupon_redemptions">list_invoice_coupon_redemptions api documentation</a>
* @param invoiceId Invoice ID or number. For ID no prefix is used e.g. `e28zov4fw0v2`. For number use prefix `number-`, e.g. `number-1000`.
* @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`
* @param queryParams The {@link QueryParams} for this endpoint.
* @return A list of the the coupon redemptions associated with the invoice.
*/
Expand All @@ -1947,7 +1947,7 @@ public Pager<CouponRedemption> listInvoiceCouponRedemptions(String invoiceId, Qu
* List an invoice's related credit or charge invoices
*
* @see <a href="https://developers.recurly.com/api/v2021-02-25#operation/list_related_invoices">list_related_invoices api documentation</a>
* @param invoiceId Invoice ID or number. For ID no prefix is used e.g. `e28zov4fw0v2`. For number use prefix `number-`, e.g. `number-1000`.
* @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`
* @return A list of the credit or charge invoices associated with the invoice.
*/
public Pager<Invoice> listRelatedInvoices(String invoiceId) {
Expand All @@ -1963,7 +1963,7 @@ public Pager<Invoice> listRelatedInvoices(String invoiceId) {
* Refund an invoice
*
* @see <a href="https://developers.recurly.com/api/v2021-02-25#operation/refund_invoice">refund_invoice api documentation</a>
* @param invoiceId Invoice ID or number. For ID no prefix is used e.g. `e28zov4fw0v2`. For number use prefix `number-`, e.g. `number-1000`.
* @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`
* @param body The body of the request.
* @return Returns the new credit invoice.
*/
Expand Down Expand Up @@ -2195,6 +2195,39 @@ public AddOn removePlanAddOn(String planId, String addOnId) {
return this.makeRequest("DELETE", path, returnType);
}

/**
* List a site's price segments
*
* @see <a href="https://developers.recurly.com/api/v2021-02-25#operation/list_price_segments">list_price_segments api documentation</a>
* @param queryParams The {@link QueryParams} for this endpoint.
* @return A list of price segments.
*/
public Pager<PriceSegment> listPriceSegments(QueryParams queryParams) {
final String url = "/price_segments";
final HashMap<String, String> urlParams = new HashMap<String, String>();
if (queryParams == null) queryParams = new QueryParams();
final HashMap<String, Object> paramsMap = queryParams.getParams();
final String path = this.interpolatePath(url, urlParams);
Type parameterizedType = TypeToken.getParameterized(Pager.class, PriceSegment.class).getType();
return new Pager<>(path, paramsMap, this, parameterizedType);
}

/**
* Fetch a price segment
*
* @see <a href="https://developers.recurly.com/api/v2021-02-25#operation/get_price_segment">get_price_segment api documentation</a>
* @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`.
* @return A price segment.
*/
public PriceSegment getPriceSegment(String priceSegmentId) {
final String url = "/price_segments/{price_segment_id}";
final HashMap<String, String> urlParams = new HashMap<String, String>();
urlParams.put("price_segment_id", priceSegmentId);
final String path = this.interpolatePath(url, urlParams);
Type returnType = PriceSegment.class;
return this.makeRequest("GET", path, returnType);
}

/**
* List a site's add-ons
*
Expand Down
11 changes: 11 additions & 0 deletions src/main/java/com/recurly/v3/requests/CurrencyCode.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
/**
* This file is automatically created by Recurly's OpenAPI generation process and thus any edits you
* make by hand will be lost. If you wish to make a change to this file, please create a Github
* issue explaining the changes you need and we will usher them to the appropriate places.
*/
package com.recurly.v3.requests;

import com.recurly.v3.Request;
import com.recurly.v3.resources.*;

public class CurrencyCode extends Request {}
11 changes: 11 additions & 0 deletions src/main/java/com/recurly/v3/requests/GeneralLedgerAccountId.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
/**
* This file is automatically created by Recurly's OpenAPI generation process and thus any edits you
* make by hand will be lost. If you wish to make a change to this file, please create a Github
* issue explaining the changes you need and we will usher them to the appropriate places.
*/
package com.recurly.v3.requests;

import com.recurly.v3.Request;
import com.recurly.v3.resources.*;

public class GeneralLedgerAccountId extends Request {}
11 changes: 11 additions & 0 deletions src/main/java/com/recurly/v3/requests/PerformanceObligationId.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
/**
* This file is automatically created by Recurly's OpenAPI generation process and thus any edits you
* make by hand will be lost. If you wish to make a change to this file, please create a Github
* issue explaining the changes you need and we will usher them to the appropriate places.
*/
package com.recurly.v3.requests;

import com.recurly.v3.Request;
import com.recurly.v3.resources.*;

public class PerformanceObligationId extends Request {}
11 changes: 11 additions & 0 deletions src/main/java/com/recurly/v3/requests/PlanCode.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
/**
* This file is automatically created by Recurly's OpenAPI generation process and thus any edits you
* make by hand will be lost. If you wish to make a change to this file, please create a Github
* issue explaining the changes you need and we will usher them to the appropriate places.
*/
package com.recurly.v3.requests;

import com.recurly.v3.Request;
import com.recurly.v3.resources.*;

public class PlanCode extends Request {}
38 changes: 31 additions & 7 deletions src/main/java/com/recurly/v3/requests/PlanCreate.java
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ public class PlanCreate extends Request {
@Expose
private String code;

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

/** Setup Fees */
@SerializedName("setup_fees")
@Expose
private List<PlanSetupPricingCreate> setupFees;

/**
* Optional field used by Avalara, Vertex, and Recurly's In-the-Box tax solution to determine
* taxation rules. You can pass in specific tax codes using any of these tax integrations. For
Expand All @@ -220,7 +225,11 @@ public class PlanCreate extends Request {
@Expose
private Boolean taxExempt;

/** Automatically terminate plans after a defined number of billing cycles. */
/**
* Automatically terminate subscriptions after a defined number of billing cycles. Number of
* billing cycles before the plan automatically stops renewing, defaults to `null` for continuous,
* automatic renewal.
*/
@SerializedName("total_billing_cycles")
@Expose
private Integer totalBillingCycles;
Expand Down Expand Up @@ -368,12 +377,12 @@ public void setCode(final String code) {
this.code = code;
}

/** Pricing */
/** Required only when `pricing_model` is `'fixed'`. */
public List<PlanPricing> getCurrencies() {
return this.currencies;
}

/** @param currencies Pricing */
/** @param currencies Required only when `pricing_model` is `'fixed'`. */
public void setCurrencies(final List<PlanPricing> currencies) {
this.currencies = currencies;
}
Expand Down Expand Up @@ -636,6 +645,16 @@ public void setSetupFeeRevenueScheduleType(
this.setupFeeRevenueScheduleType = setupFeeRevenueScheduleType;
}

/** Setup Fees */
public List<PlanSetupPricingCreate> getSetupFees() {
return this.setupFees;
}

/** @param setupFees Setup Fees */
public void setSetupFees(final List<PlanSetupPricingCreate> setupFees) {
this.setupFees = setupFees;
}

/**
* Optional field used by Avalara, Vertex, and Recurly's In-the-Box tax solution to determine
* taxation rules. You can pass in specific tax codes using any of these tax integrations. For
Expand Down Expand Up @@ -666,14 +685,19 @@ public void setTaxExempt(final Boolean taxExempt) {
this.taxExempt = taxExempt;
}

/** Automatically terminate plans after a defined number of billing cycles. */
/**
* Automatically terminate subscriptions after a defined number of billing cycles. Number of
* billing cycles before the plan automatically stops renewing, defaults to `null` for continuous,
* automatic renewal.
*/
public Integer getTotalBillingCycles() {
return this.totalBillingCycles;
}

/**
* @param totalBillingCycles Automatically terminate plans after a defined number of billing
* cycles.
* @param totalBillingCycles Automatically terminate subscriptions after a defined number of
* billing cycles. Number of billing cycles before the plan automatically stops renewing,
* defaults to `null` for continuous, automatic renewal.
*/
public void setTotalBillingCycles(final Integer totalBillingCycles) {
this.totalBillingCycles = totalBillingCycles;
Expand Down
11 changes: 11 additions & 0 deletions src/main/java/com/recurly/v3/requests/PlanIntervalLength.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
/**
* This file is automatically created by Recurly's OpenAPI generation process and thus any edits you
* make by hand will be lost. If you wish to make a change to this file, please create a Github
* issue explaining the changes you need and we will usher them to the appropriate places.
*/
package com.recurly.v3.requests;

import com.recurly.v3.Request;
import com.recurly.v3.resources.*;

public class PlanIntervalLength extends Request {}
11 changes: 11 additions & 0 deletions src/main/java/com/recurly/v3/requests/PlanName.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
/**
* This file is automatically created by Recurly's OpenAPI generation process and thus any edits you
* make by hand will be lost. If you wish to make a change to this file, please create a Github
* issue explaining the changes you need and we will usher them to the appropriate places.
*/
package com.recurly.v3.requests;

import com.recurly.v3.Request;
import com.recurly.v3.resources.*;

public class PlanName extends Request {}
Loading
Loading