Skip to content

Commit 651071a

Browse files
authored
Merge pull request #327 from recurly/v3-v2021-02-25-27222841158
Generated Latest Changes for v2021-02-25
2 parents 7a81328 + 9122701 commit 651071a

17 files changed

Lines changed: 1521 additions & 19 deletions

openapi/api.yaml

Lines changed: 377 additions & 4 deletions
Large diffs are not rendered by default.

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

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2078,6 +2078,21 @@ public Invoice refundInvoice(String invoiceId, InvoiceRefund body) {
20782078
return this.makeRequest("POST", path, body, returnType);
20792079
}
20802080

2081+
/**
2082+
* Create an invoice for revenue recovery
2083+
*
2084+
* @see <a href="https://developers.recurly.com/api/v2021-02-25#operation/create_invoice_retry">create_invoice_retry api documentation</a>
2085+
* @param body The body of the request.
2086+
* @return Returns the new invoices.
2087+
*/
2088+
public InvoiceCollection createInvoiceRetry(RecoveryInvoiceCreate body) {
2089+
final String url = "/invoices/recovery";
2090+
final HashMap<String, String> urlParams = new HashMap<String, String>();
2091+
final String path = this.interpolatePath(url, urlParams);
2092+
Type returnType = InvoiceCollection.class;
2093+
return this.makeRequest("POST", path, body, returnType);
2094+
}
2095+
20812096
/**
20822097
* List a site's line items
20832098
*

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -561,6 +561,9 @@ public enum FreeTrialUnit {
561561
@SerializedName("week")
562562
WEEK,
563563

564+
@SerializedName("billing_period")
565+
BILLING_PERIOD,
566+
564567
};
565568

566569
public enum RedemptionResource {

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

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,8 @@ public class CouponCreate extends Request {
9090

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

350353
/**
351354
* Description of the unit of time the coupon is for. Used with `free_trial_amount` to determine
352-
* the duration of time the coupon is for. Required if `discount_type` is `free_trial`.
355+
* the duration of time the coupon is for. Required if `discount_type` is `free_trial`. Use
356+
* `billing_period` to grant a free trial for a number of billing cycles.
353357
*/
354358
public Constants.FreeTrialUnit getFreeTrialUnit() {
355359
return this.freeTrialUnit;
@@ -358,7 +362,8 @@ public Constants.FreeTrialUnit getFreeTrialUnit() {
358362
/**
359363
* @param freeTrialUnit Description of the unit of time the coupon is for. Used with
360364
* `free_trial_amount` to determine the duration of time the coupon is for. Required if
361-
* `discount_type` is `free_trial`.
365+
* `discount_type` is `free_trial`. Use `billing_period` to grant a free trial for a number of
366+
* billing cycles.
362367
*/
363368
public void setFreeTrialUnit(final Constants.FreeTrialUnit freeTrialUnit) {
364369
this.freeTrialUnit = freeTrialUnit;
@@ -524,7 +529,9 @@ public void setTemporalAmount(final Integer temporalAmount) {
524529
/**
525530
* If `duration` is "temporal" than `temporal_unit` is multiplied by `temporal_amount` to define
526531
* the duration that the coupon will be applied to invoices for. Use "billing_period" to apply the
527-
* coupon for a fixed number of billing cycles. Requires `redemption_resource=subscription`.
532+
* coupon for a fixed number of billing cycles. Requires `redemption_resource=subscription`. Not
533+
* compatible with `discount_type=free_trial`; use `free_trial_unit=billing_period` and
534+
* `free_trial_amount` instead.
528535
*/
529536
public Constants.TemporalUnit getTemporalUnit() {
530537
return this.temporalUnit;
@@ -534,7 +541,8 @@ public Constants.TemporalUnit getTemporalUnit() {
534541
* @param temporalUnit If `duration` is "temporal" than `temporal_unit` is multiplied by
535542
* `temporal_amount` to define the duration that the coupon will be applied to invoices for.
536543
* Use "billing_period" to apply the coupon for a fixed number of billing cycles. Requires
537-
* `redemption_resource=subscription`.
544+
* `redemption_resource=subscription`. Not compatible with `discount_type=free_trial`; use
545+
* `free_trial_unit=billing_period` and `free_trial_amount` instead.
538546
*/
539547
public void setTemporalUnit(final Constants.TemporalUnit temporalUnit) {
540548
this.temporalUnit = temporalUnit;
Lines changed: 142 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,142 @@
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.google.gson.annotations.Expose;
9+
import com.google.gson.annotations.SerializedName;
10+
import com.recurly.v3.Request;
11+
import com.recurly.v3.resources.*;
12+
import java.util.List;
13+
14+
public class RecoveryAccountCreate extends Request {
15+
16+
@SerializedName("address")
17+
@Expose
18+
private RecoveryAddress address;
19+
20+
/**
21+
* If the premium Wallet feature is enabled, more than one payment method can be associated with
22+
* an account, and one can be designated as a primary and one as a backup. Without the Wallet
23+
* feature, only one payment method will be accepted.
24+
*/
25+
@SerializedName("billing_infos")
26+
@Expose
27+
private List<RecoveryBillingInfoCreate> billingInfos;
28+
29+
/** The unique identifier of the account. This cannot be changed once the account is created. */
30+
@SerializedName("code")
31+
@Expose
32+
private String code;
33+
34+
/**
35+
* The custom fields will only be altered when they are included in a request. Sending an empty
36+
* array will not remove any existing values. To remove a field send the name with a null or empty
37+
* value.
38+
*/
39+
@SerializedName("custom_fields")
40+
@Expose
41+
private List<CustomField> customFields;
42+
43+
/**
44+
* Unique ID to identify a dunning campaign. Used to specify if a non-default dunning campaign
45+
* should be assigned to this account. For sites without multiple dunning campaigns enabled, the
46+
* default dunning campaign will always be used.
47+
*/
48+
@SerializedName("dunning_campaign_id")
49+
@Expose
50+
private String dunningCampaignId;
51+
52+
/** The email address used for communicating with this customer. */
53+
@SerializedName("email")
54+
@Expose
55+
private String email;
56+
57+
public RecoveryAddress getAddress() {
58+
return this.address;
59+
}
60+
61+
/** @param address */
62+
public void setAddress(final RecoveryAddress address) {
63+
this.address = address;
64+
}
65+
66+
/**
67+
* If the premium Wallet feature is enabled, more than one payment method can be associated with
68+
* an account, and one can be designated as a primary and one as a backup. Without the Wallet
69+
* feature, only one payment method will be accepted.
70+
*/
71+
public List<RecoveryBillingInfoCreate> getBillingInfos() {
72+
return this.billingInfos;
73+
}
74+
75+
/**
76+
* @param billingInfos If the premium Wallet feature is enabled, more than one payment method can
77+
* be associated with an account, and one can be designated as a primary and one as a backup.
78+
* Without the Wallet feature, only one payment method will be accepted.
79+
*/
80+
public void setBillingInfos(final List<RecoveryBillingInfoCreate> billingInfos) {
81+
this.billingInfos = billingInfos;
82+
}
83+
84+
/** The unique identifier of the account. This cannot be changed once the account is created. */
85+
public String getCode() {
86+
return this.code;
87+
}
88+
89+
/**
90+
* @param code The unique identifier of the account. This cannot be changed once the account is
91+
* created.
92+
*/
93+
public void setCode(final String code) {
94+
this.code = code;
95+
}
96+
97+
/**
98+
* The custom fields will only be altered when they are included in a request. Sending an empty
99+
* array will not remove any existing values. To remove a field send the name with a null or empty
100+
* value.
101+
*/
102+
public List<CustomField> getCustomFields() {
103+
return this.customFields;
104+
}
105+
106+
/**
107+
* @param customFields The custom fields will only be altered when they are included in a request.
108+
* Sending an empty array will not remove any existing values. To remove a field send the name
109+
* with a null or empty value.
110+
*/
111+
public void setCustomFields(final List<CustomField> customFields) {
112+
this.customFields = customFields;
113+
}
114+
115+
/**
116+
* Unique ID to identify a dunning campaign. Used to specify if a non-default dunning campaign
117+
* should be assigned to this account. For sites without multiple dunning campaigns enabled, the
118+
* default dunning campaign will always be used.
119+
*/
120+
public String getDunningCampaignId() {
121+
return this.dunningCampaignId;
122+
}
123+
124+
/**
125+
* @param dunningCampaignId Unique ID to identify a dunning campaign. Used to specify if a
126+
* non-default dunning campaign should be assigned to this account. For sites without multiple
127+
* dunning campaigns enabled, the default dunning campaign will always be used.
128+
*/
129+
public void setDunningCampaignId(final String dunningCampaignId) {
130+
this.dunningCampaignId = dunningCampaignId;
131+
}
132+
133+
/** The email address used for communicating with this customer. */
134+
public String getEmail() {
135+
return this.email;
136+
}
137+
138+
/** @param email The email address used for communicating with this customer. */
139+
public void setEmail(final String email) {
140+
this.email = email;
141+
}
142+
}
Lines changed: 119 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,119 @@
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.google.gson.annotations.Expose;
9+
import com.google.gson.annotations.SerializedName;
10+
import com.recurly.v3.Request;
11+
import com.recurly.v3.resources.*;
12+
13+
public class RecoveryAddress extends Request {
14+
15+
/** City */
16+
@SerializedName("city")
17+
@Expose
18+
private String city;
19+
20+
/** Country, 2-letter ISO 3166-1 alpha-2 code. */
21+
@SerializedName("country")
22+
@Expose
23+
private String country;
24+
25+
/** Phone number */
26+
@SerializedName("phone")
27+
@Expose
28+
private String phone;
29+
30+
/** Zip or postal code. */
31+
@SerializedName("postal_code")
32+
@Expose
33+
private String postalCode;
34+
35+
/** State or province. */
36+
@SerializedName("region")
37+
@Expose
38+
private String region;
39+
40+
/** Street 1 */
41+
@SerializedName("street1")
42+
@Expose
43+
private String street1;
44+
45+
/** Street 2 */
46+
@SerializedName("street2")
47+
@Expose
48+
private String street2;
49+
50+
/** City */
51+
public String getCity() {
52+
return this.city;
53+
}
54+
55+
/** @param city City */
56+
public void setCity(final String city) {
57+
this.city = city;
58+
}
59+
60+
/** Country, 2-letter ISO 3166-1 alpha-2 code. */
61+
public String getCountry() {
62+
return this.country;
63+
}
64+
65+
/** @param country Country, 2-letter ISO 3166-1 alpha-2 code. */
66+
public void setCountry(final String country) {
67+
this.country = country;
68+
}
69+
70+
/** Phone number */
71+
public String getPhone() {
72+
return this.phone;
73+
}
74+
75+
/** @param phone Phone number */
76+
public void setPhone(final String phone) {
77+
this.phone = phone;
78+
}
79+
80+
/** Zip or postal code. */
81+
public String getPostalCode() {
82+
return this.postalCode;
83+
}
84+
85+
/** @param postalCode Zip or postal code. */
86+
public void setPostalCode(final String postalCode) {
87+
this.postalCode = postalCode;
88+
}
89+
90+
/** State or province. */
91+
public String getRegion() {
92+
return this.region;
93+
}
94+
95+
/** @param region State or province. */
96+
public void setRegion(final String region) {
97+
this.region = region;
98+
}
99+
100+
/** Street 1 */
101+
public String getStreet1() {
102+
return this.street1;
103+
}
104+
105+
/** @param street1 Street 1 */
106+
public void setStreet1(final String street1) {
107+
this.street1 = street1;
108+
}
109+
110+
/** Street 2 */
111+
public String getStreet2() {
112+
return this.street2;
113+
}
114+
115+
/** @param street2 Street 2 */
116+
public void setStreet2(final String street2) {
117+
this.street2 = street2;
118+
}
119+
}

0 commit comments

Comments
 (0)