Skip to content
Merged
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
381 changes: 377 additions & 4 deletions openapi/api.yaml

Large diffs are not rendered by default.

15 changes: 15 additions & 0 deletions src/main/java/com/recurly/v3/Client.java
Original file line number Diff line number Diff line change
Expand Up @@ -2078,6 +2078,21 @@ public Invoice refundInvoice(String invoiceId, InvoiceRefund body) {
return this.makeRequest("POST", path, body, returnType);
}

/**
* Create an invoice for revenue recovery
*
* @see <a href="https://developers.recurly.com/api/v2021-02-25#operation/create_invoice_retry">create_invoice_retry api documentation</a>
* @param body The body of the request.
* @return Returns the new invoices.
*/
public InvoiceCollection createInvoiceRetry(RecoveryInvoiceCreate body) {
final String url = "/invoices/recovery";
final HashMap<String, String> urlParams = new HashMap<String, String>();
final String path = this.interpolatePath(url, urlParams);
Type returnType = InvoiceCollection.class;
return this.makeRequest("POST", path, body, returnType);
}

/**
* List a site's line items
*
Expand Down
3 changes: 3 additions & 0 deletions src/main/java/com/recurly/v3/Constants.java
Original file line number Diff line number Diff line change
Expand Up @@ -561,6 +561,9 @@ public enum FreeTrialUnit {
@SerializedName("week")
WEEK,

@SerializedName("billing_period")
BILLING_PERIOD,

};

public enum RedemptionResource {
Expand Down
20 changes: 14 additions & 6 deletions src/main/java/com/recurly/v3/requests/CouponCreate.java
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,8 @@ public class CouponCreate extends Request {

/**
* Description of the unit of time the coupon is for. Used with `free_trial_amount` to determine
* the duration of time the coupon is for. Required if `discount_type` is `free_trial`.
* the duration of time the coupon is for. Required if `discount_type` is `free_trial`. Use
* `billing_period` to grant a free trial for a number of billing cycles.
*/
@SerializedName("free_trial_unit")
@Expose
Expand Down Expand Up @@ -176,7 +177,9 @@ public class CouponCreate extends Request {
/**
* If `duration` is "temporal" than `temporal_unit` is multiplied by `temporal_amount` to define
* the duration that the coupon will be applied to invoices for. Use "billing_period" to apply the
* coupon for a fixed number of billing cycles. Requires `redemption_resource=subscription`.
* coupon for a fixed number of billing cycles. Requires `redemption_resource=subscription`. Not
* compatible with `discount_type=free_trial`; use `free_trial_unit=billing_period` and
* `free_trial_amount` instead.
*/
@SerializedName("temporal_unit")
@Expose
Expand Down Expand Up @@ -349,7 +352,8 @@ public void setFreeTrialAmount(final Integer freeTrialAmount) {

/**
* Description of the unit of time the coupon is for. Used with `free_trial_amount` to determine
* the duration of time the coupon is for. Required if `discount_type` is `free_trial`.
* the duration of time the coupon is for. Required if `discount_type` is `free_trial`. Use
* `billing_period` to grant a free trial for a number of billing cycles.
*/
public Constants.FreeTrialUnit getFreeTrialUnit() {
return this.freeTrialUnit;
Expand All @@ -358,7 +362,8 @@ public Constants.FreeTrialUnit getFreeTrialUnit() {
/**
* @param freeTrialUnit Description of the unit of time the coupon is for. Used with
* `free_trial_amount` to determine the duration of time the coupon is for. Required if
* `discount_type` is `free_trial`.
* `discount_type` is `free_trial`. Use `billing_period` to grant a free trial for a number of
* billing cycles.
*/
public void setFreeTrialUnit(final Constants.FreeTrialUnit freeTrialUnit) {
this.freeTrialUnit = freeTrialUnit;
Expand Down Expand Up @@ -524,7 +529,9 @@ public void setTemporalAmount(final Integer temporalAmount) {
/**
* If `duration` is "temporal" than `temporal_unit` is multiplied by `temporal_amount` to define
* the duration that the coupon will be applied to invoices for. Use "billing_period" to apply the
* coupon for a fixed number of billing cycles. Requires `redemption_resource=subscription`.
* coupon for a fixed number of billing cycles. Requires `redemption_resource=subscription`. Not
* compatible with `discount_type=free_trial`; use `free_trial_unit=billing_period` and
* `free_trial_amount` instead.
*/
public Constants.TemporalUnit getTemporalUnit() {
return this.temporalUnit;
Expand All @@ -534,7 +541,8 @@ public Constants.TemporalUnit getTemporalUnit() {
* @param temporalUnit If `duration` is "temporal" than `temporal_unit` is multiplied by
* `temporal_amount` to define the duration that the coupon will be applied to invoices for.
* Use "billing_period" to apply the coupon for a fixed number of billing cycles. Requires
* `redemption_resource=subscription`.
* `redemption_resource=subscription`. Not compatible with `discount_type=free_trial`; use
* `free_trial_unit=billing_period` and `free_trial_amount` instead.
*/
public void setTemporalUnit(final Constants.TemporalUnit temporalUnit) {
this.temporalUnit = temporalUnit;
Expand Down
142 changes: 142 additions & 0 deletions src/main/java/com/recurly/v3/requests/RecoveryAccountCreate.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,142 @@
/**
* 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.google.gson.annotations.Expose;
import com.google.gson.annotations.SerializedName;
import com.recurly.v3.Request;
import com.recurly.v3.resources.*;
import java.util.List;

public class RecoveryAccountCreate extends Request {

@SerializedName("address")
@Expose
private RecoveryAddress address;

/**
* If the premium Wallet feature is enabled, more than one payment method can be associated with
* an account, and one can be designated as a primary and one as a backup. Without the Wallet
* feature, only one payment method will be accepted.
*/
@SerializedName("billing_infos")
@Expose
private List<RecoveryBillingInfoCreate> billingInfos;

/** The unique identifier of the account. This cannot be changed once the account is created. */
@SerializedName("code")
@Expose
private String code;

/**
* The custom fields will only be altered when they are included in a request. Sending an empty
* array will not remove any existing values. To remove a field send the name with a null or empty
* value.
*/
@SerializedName("custom_fields")
@Expose
private List<CustomField> customFields;

/**
* Unique ID to identify a dunning campaign. Used to specify if a non-default dunning campaign
* should be assigned to this account. For sites without multiple dunning campaigns enabled, the
* default dunning campaign will always be used.
*/
@SerializedName("dunning_campaign_id")
@Expose
private String dunningCampaignId;

/** The email address used for communicating with this customer. */
@SerializedName("email")
@Expose
private String email;

public RecoveryAddress getAddress() {
return this.address;
}

/** @param address */
public void setAddress(final RecoveryAddress address) {
this.address = address;
}

/**
* If the premium Wallet feature is enabled, more than one payment method can be associated with
* an account, and one can be designated as a primary and one as a backup. Without the Wallet
* feature, only one payment method will be accepted.
*/
public List<RecoveryBillingInfoCreate> getBillingInfos() {
return this.billingInfos;
}

/**
* @param billingInfos If the premium Wallet feature is enabled, more than one payment method can
* be associated with an account, and one can be designated as a primary and one as a backup.
* Without the Wallet feature, only one payment method will be accepted.
*/
public void setBillingInfos(final List<RecoveryBillingInfoCreate> billingInfos) {
this.billingInfos = billingInfos;
}

/** The unique identifier of the account. This cannot be changed once the account is created. */
public String getCode() {
return this.code;
}

/**
* @param code The unique identifier of the account. This cannot be changed once the account is
* created.
*/
public void setCode(final String code) {
this.code = code;
}

/**
* The custom fields will only be altered when they are included in a request. Sending an empty
* array will not remove any existing values. To remove a field send the name with a null or empty
* value.
*/
public List<CustomField> getCustomFields() {
return this.customFields;
}

/**
* @param customFields The custom fields will only be altered when they are included in a request.
* Sending an empty array will not remove any existing values. To remove a field send the name
* with a null or empty value.
*/
public void setCustomFields(final List<CustomField> customFields) {
this.customFields = customFields;
}

/**
* Unique ID to identify a dunning campaign. Used to specify if a non-default dunning campaign
* should be assigned to this account. For sites without multiple dunning campaigns enabled, the
* default dunning campaign will always be used.
*/
public String getDunningCampaignId() {
return this.dunningCampaignId;
}

/**
* @param dunningCampaignId Unique ID to identify a dunning campaign. Used to specify if a
* non-default dunning campaign should be assigned to this account. For sites without multiple
* dunning campaigns enabled, the default dunning campaign will always be used.
*/
public void setDunningCampaignId(final String dunningCampaignId) {
this.dunningCampaignId = dunningCampaignId;
}

/** The email address used for communicating with this customer. */
public String getEmail() {
return this.email;
}

/** @param email The email address used for communicating with this customer. */
public void setEmail(final String email) {
this.email = email;
}
}
119 changes: 119 additions & 0 deletions src/main/java/com/recurly/v3/requests/RecoveryAddress.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,119 @@
/**
* 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.google.gson.annotations.Expose;
import com.google.gson.annotations.SerializedName;
import com.recurly.v3.Request;
import com.recurly.v3.resources.*;

public class RecoveryAddress extends Request {

/** City */
@SerializedName("city")
@Expose
private String city;

/** Country, 2-letter ISO 3166-1 alpha-2 code. */
@SerializedName("country")
@Expose
private String country;

/** Phone number */
@SerializedName("phone")
@Expose
private String phone;

/** Zip or postal code. */
@SerializedName("postal_code")
@Expose
private String postalCode;

/** State or province. */
@SerializedName("region")
@Expose
private String region;

/** Street 1 */
@SerializedName("street1")
@Expose
private String street1;

/** Street 2 */
@SerializedName("street2")
@Expose
private String street2;

/** City */
public String getCity() {
return this.city;
}

/** @param city City */
public void setCity(final String city) {
this.city = city;
}

/** Country, 2-letter ISO 3166-1 alpha-2 code. */
public String getCountry() {
return this.country;
}

/** @param country Country, 2-letter ISO 3166-1 alpha-2 code. */
public void setCountry(final String country) {
this.country = country;
}

/** Phone number */
public String getPhone() {
return this.phone;
}

/** @param phone Phone number */
public void setPhone(final String phone) {
this.phone = phone;
}

/** Zip or postal code. */
public String getPostalCode() {
return this.postalCode;
}

/** @param postalCode Zip or postal code. */
public void setPostalCode(final String postalCode) {
this.postalCode = postalCode;
}

/** State or province. */
public String getRegion() {
return this.region;
}

/** @param region State or province. */
public void setRegion(final String region) {
this.region = region;
}

/** Street 1 */
public String getStreet1() {
return this.street1;
}

/** @param street1 Street 1 */
public void setStreet1(final String street1) {
this.street1 = street1;
}

/** Street 2 */
public String getStreet2() {
return this.street2;
}

/** @param street2 Street 2 */
public void setStreet2(final String street2) {
this.street2 = street2;
}
}
Loading
Loading