Skip to content

Commit

Permalink
Merge pull request #167 from recurly/v3-v2019-10-10-1630513315
Browse files Browse the repository at this point in the history
Generated Latest Changes for v2019-10-10 (Dunning Campaigns feature)
  • Loading branch information
amandamfielding authored Sep 1, 2021
2 parents 63235de + eb175b3 commit b8b940b
Show file tree
Hide file tree
Showing 16 changed files with 1,182 additions and 0 deletions.
317 changes: 317 additions & 0 deletions openapi/api.yaml

Large diffs are not rendered by default.

48 changes: 48 additions & 0 deletions src/main/java/com/recurly/v3/Client.java
Original file line number Diff line number Diff line change
Expand Up @@ -2252,4 +2252,52 @@ public ExportFiles getExportFiles(String exportDate) {
Type returnType = ExportFiles.class;
return this.makeRequest("GET", path, returnType);
}

/**
* Show the dunning campaigns for a site
*
* @see <a href="https://developers.recurly.com/api/v2019-10-10#operation/list_dunning_campaigns">list_dunning_campaigns api documentation</a>
* @param queryParams The {@link QueryParams} for this endpoint.
* @return A list of the the dunning_campaigns on an account.
*/
public Pager<DunningCampaign> listDunningCampaigns(QueryParams queryParams) {
final String url = "/dunning_campaigns";
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, DunningCampaign.class).getType();
return new Pager<>(path, paramsMap, this, parameterizedType);
}

/**
* Show the settings for a dunning campaign
*
* @see <a href="https://developers.recurly.com/api/v2019-10-10#operation/get_dunning_campaign">get_dunning_campaign api documentation</a>
* @param dunningCampaignId Dunning Campaign ID, e.g. `e28zov4fw0v2`.
* @return Settings for a dunning campaign.
*/
public DunningCampaign getDunningCampaign(String dunningCampaignId) {
final String url = "/dunning_campaigns/{dunning_campaign_id}";
final HashMap<String, String> urlParams = new HashMap<String, String>();
urlParams.put("dunning_campaign_id", dunningCampaignId);
final String path = this.interpolatePath(url, urlParams);
Type returnType = DunningCampaign.class;
return this.makeRequest("GET", path, returnType);
}

/**
* Assign a dunning campaign to multiple plans
*
* @see <a href="https://developers.recurly.com/api/v2019-10-10#operation/put_dunning_campaign_bulk_update">put_dunning_campaign_bulk_update api documentation</a>
* @param body The body of the request.
* @return A list of updated plans.
*/
public DunningCampaignsBulkUpdateResponse putDunningCampaignBulkUpdate(DunningCampaignsBulkUpdate body) {
final String url = "/dunning_campaigns/{dunning_campaign_id}/bulk_update";
final HashMap<String, String> urlParams = new HashMap<String, String>();
final String path = this.interpolatePath(url, urlParams);
Type returnType = DunningCampaignsBulkUpdateResponse.class;
return this.makeRequest("PUT", path, body, returnType);
}
}
30 changes: 30 additions & 0 deletions src/main/java/com/recurly/v3/requests/AccountCreate.java
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,16 @@ public class AccountCreate extends Request {
@Expose
private List<CustomField> customFields;

/**
* Unique ID to identify a dunning campaign. Available when the Dunning Campaigns feature is
* enabled. 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. The customer will also use this
* email address to log into your hosted account management pages. This value does not need to be
Expand Down Expand Up @@ -248,6 +258,26 @@ public void setCustomFields(final List<CustomField> customFields) {
this.customFields = customFields;
}

/**
* Unique ID to identify a dunning campaign. Available when the Dunning Campaigns feature is
* enabled. 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. Available when the Dunning
* Campaigns feature is enabled. 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. The customer will also use this
* email address to log into your hosted account management pages. This value does not need to be
Expand Down
30 changes: 30 additions & 0 deletions src/main/java/com/recurly/v3/requests/AccountPurchase.java
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,16 @@ public class AccountPurchase extends Request {
@Expose
private List<CustomField> customFields;

/**
* Unique ID to identify a dunning campaign. Available when the Dunning Campaigns feature is
* enabled. 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. The customer will also use this
* email address to log into your hosted account management pages. This value does not need to be
Expand Down Expand Up @@ -252,6 +262,26 @@ public void setCustomFields(final List<CustomField> customFields) {
this.customFields = customFields;
}

/**
* Unique ID to identify a dunning campaign. Available when the Dunning Campaigns feature is
* enabled. 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. Available when the Dunning
* Campaigns feature is enabled. 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. The customer will also use this
* email address to log into your hosted account management pages. This value does not need to be
Expand Down
30 changes: 30 additions & 0 deletions src/main/java/com/recurly/v3/requests/AccountUpdate.java
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,16 @@ public class AccountUpdate extends Request {
@Expose
private List<CustomField> customFields;

/**
* Unique ID to identify a dunning campaign. Available when the Dunning Campaigns feature is
* enabled. 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. The customer will also use this
* email address to log into your hosted account management pages. This value does not need to be
Expand Down Expand Up @@ -213,6 +223,26 @@ public void setCustomFields(final List<CustomField> customFields) {
this.customFields = customFields;
}

/**
* Unique ID to identify a dunning campaign. Available when the Dunning Campaigns feature is
* enabled. 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. Available when the Dunning
* Campaigns feature is enabled. 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. The customer will also use this
* email address to log into your hosted account management pages. This value does not need to be
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
/**
* 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 DunningCampaignsBulkUpdate extends Request {

/**
* List of `plan_codes` associated with the Plans for which the dunning campaign should be
* updated. Required unless `plan_ids` is present.
*/
@SerializedName("plan_codes")
@Expose
private List<String> planCodes;

/**
* List of `plan_ids` associated with the Plans for which the dunning campaign should be updated.
* Required unless `plan_codes` is present.
*/
@SerializedName("plan_ids")
@Expose
private List<String> planIds;

/**
* List of `plan_codes` associated with the Plans for which the dunning campaign should be
* updated. Required unless `plan_ids` is present.
*/
public List<String> getPlanCodes() {
return this.planCodes;
}

/**
* @param planCodes List of `plan_codes` associated with the Plans for which the dunning campaign
* should be updated. Required unless `plan_ids` is present.
*/
public void setPlanCodes(final List<String> planCodes) {
this.planCodes = planCodes;
}

/**
* List of `plan_ids` associated with the Plans for which the dunning campaign should be updated.
* Required unless `plan_codes` is present.
*/
public List<String> getPlanIds() {
return this.planIds;
}

/**
* @param planIds List of `plan_ids` associated with the Plans for which the dunning campaign
* should be updated. Required unless `plan_codes` is present.
*/
public void setPlanIds(final List<String> planIds) {
this.planIds = planIds;
}
}
30 changes: 30 additions & 0 deletions src/main/java/com/recurly/v3/requests/PlanCreate.java
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,16 @@ public class PlanCreate extends Request {
@Expose
private String description;

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

/** Hosted pages settings */
@SerializedName("hosted_pages")
@Expose
Expand Down Expand Up @@ -302,6 +312,26 @@ public void setDescription(final String description) {
this.description = description;
}

/**
* Unique ID to identify a dunning campaign. Available when the Dunning Campaigns feature is
* enabled. Used to specify if a non-default dunning campaign should be assigned to this plan. 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. Available when the Dunning
* Campaigns feature is enabled. Used to specify if a non-default dunning campaign should be
* assigned to this plan. For sites without multiple dunning campaigns enabled, the default
* dunning campaign will always be used.
*/
public void setDunningCampaignId(final String dunningCampaignId) {
this.dunningCampaignId = dunningCampaignId;
}

/** Hosted pages settings */
public PlanHostedPages getHostedPages() {
return this.hostedPages;
Expand Down
30 changes: 30 additions & 0 deletions src/main/java/com/recurly/v3/requests/PlanUpdate.java
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,16 @@ public class PlanUpdate extends Request {
@Expose
private String description;

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

/** Hosted pages settings */
@SerializedName("hosted_pages")
@Expose
Expand Down Expand Up @@ -282,6 +292,26 @@ public void setDescription(final String description) {
this.description = description;
}

/**
* Unique ID to identify a dunning campaign. Available when the Dunning Campaigns feature is
* enabled. Used to specify if a non-default dunning campaign should be assigned to this plan. 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. Available when the Dunning
* Campaigns feature is enabled. Used to specify if a non-default dunning campaign should be
* assigned to this plan. For sites without multiple dunning campaigns enabled, the default
* dunning campaign will always be used.
*/
public void setDunningCampaignId(final String dunningCampaignId) {
this.dunningCampaignId = dunningCampaignId;
}

/** Hosted pages settings */
public PlanHostedPages getHostedPages() {
return this.hostedPages;
Expand Down
30 changes: 30 additions & 0 deletions src/main/java/com/recurly/v3/resources/Account.java
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,16 @@ public class Account extends Resource {
@Expose
private DateTime deletedAt;

/**
* Unique ID to identify a dunning campaign. Available when the Dunning Campaigns feature is
* enabled. 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. The customer will also use this
* email address to log into your hosted account management pages. This value does not need to be
Expand Down Expand Up @@ -301,6 +311,26 @@ public void setDeletedAt(final DateTime deletedAt) {
this.deletedAt = deletedAt;
}

/**
* Unique ID to identify a dunning campaign. Available when the Dunning Campaigns feature is
* enabled. 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. Available when the Dunning
* Campaigns feature is enabled. 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. The customer will also use this
* email address to log into your hosted account management pages. This value does not need to be
Expand Down
Loading

0 comments on commit b8b940b

Please sign in to comment.