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;
+ }
+}
diff --git a/src/main/java/com/recurly/v3/requests/RecoveryAddress.java b/src/main/java/com/recurly/v3/requests/RecoveryAddress.java
new file mode 100644
index 0000000..9495488
--- /dev/null
+++ b/src/main/java/com/recurly/v3/requests/RecoveryAddress.java
@@ -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;
+ }
+}
diff --git a/src/main/java/com/recurly/v3/requests/RecoveryBillingInfoCreate.java b/src/main/java/com/recurly/v3/requests/RecoveryBillingInfoCreate.java
new file mode 100644
index 0000000..1f4e883
--- /dev/null
+++ b/src/main/java/com/recurly/v3/requests/RecoveryBillingInfoCreate.java
@@ -0,0 +1,243 @@
+/**
+ * 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 RecoveryBillingInfoCreate extends Request {
+
+ @SerializedName("address")
+ @Expose
+ private RecoveryAddress address;
+
+ /**
+ * The `backup_payment_method` field is used to designate a billing info as a backup on the
+ * account that will be tried if the initial billing info used for an invoice is declined. All
+ * payment methods, including the billing info marked `primary_payment_method` can be set as a
+ * backup. An account can have a maximum of 1 backup, if a user sets a different payment method as
+ * a backup, the existing backup will no longer be marked as such.
+ */
+ @SerializedName("backup_payment_method")
+ @Expose
+ private Boolean backupPaymentMethod;
+
+ /** Company name */
+ @SerializedName("company")
+ @Expose
+ private String company;
+
+ /** First name */
+ @SerializedName("first_name")
+ @Expose
+ private String firstName;
+
+ /** An identifier for a specific payment gateway. */
+ @SerializedName("gateway_code")
+ @Expose
+ private String gatewayCode;
+
+ /** *STRONGLY RECOMMENDED* Customer's IP address when updating their billing information. */
+ @SerializedName("ip_address")
+ @Expose
+ private String ipAddress;
+
+ /** Last name */
+ @SerializedName("last_name")
+ @Expose
+ private String lastName;
+
+ /**
+ * Network transaction ID from the previous customer-in-session subscription signup or billing
+ * info storage.
+ *
+ * - 10-15 alphanumeric characters for Mastercard - 14-15 alphanumeric for Visa - 15 digits for
+ * all other brands - 16 alphanumeric characters for Cartes Bancaires, which are processed as Visa
+ * or Mastercard
+ */
+ @SerializedName("network_transaction_id")
+ @Expose
+ private String networkTransactionId;
+
+ /**
+ * Array of Payment Gateway References, each a reference to a third-party gateway object of
+ * varying types.
+ */
+ @SerializedName("payment_gateway_references")
+ @Expose
+ private List paymentGatewayReferences;
+
+ /**
+ * The `primary_payment_method` field is used to designate the primary billing info on the
+ * account. An account can have a maximum of 1 primary. If a user sets a different payment method
+ * as a primary, then the existing primary will no longer be marked as such.
+ */
+ @SerializedName("primary_payment_method")
+ @Expose
+ private Boolean primaryPaymentMethod;
+
+ /** Transactions from previous collection attempts for this payment method. */
+ @SerializedName("transactions")
+ @Expose
+ private List transactions;
+
+ public RecoveryAddress getAddress() {
+ return this.address;
+ }
+
+ /** @param address */
+ public void setAddress(final RecoveryAddress address) {
+ this.address = address;
+ }
+
+ /**
+ * The `backup_payment_method` field is used to designate a billing info as a backup on the
+ * account that will be tried if the initial billing info used for an invoice is declined. All
+ * payment methods, including the billing info marked `primary_payment_method` can be set as a
+ * backup. An account can have a maximum of 1 backup, if a user sets a different payment method as
+ * a backup, the existing backup will no longer be marked as such.
+ */
+ public Boolean getBackupPaymentMethod() {
+ return this.backupPaymentMethod;
+ }
+
+ /**
+ * @param backupPaymentMethod The `backup_payment_method` field is used to designate a billing
+ * info as a backup on the account that will be tried if the initial billing info used for an
+ * invoice is declined. All payment methods, including the billing info marked
+ * `primary_payment_method` can be set as a backup. An account can have a maximum of 1 backup,
+ * if a user sets a different payment method as a backup, the existing backup will no longer
+ * be marked as such.
+ */
+ public void setBackupPaymentMethod(final Boolean backupPaymentMethod) {
+ this.backupPaymentMethod = backupPaymentMethod;
+ }
+
+ /** Company name */
+ public String getCompany() {
+ return this.company;
+ }
+
+ /** @param company Company name */
+ public void setCompany(final String company) {
+ this.company = company;
+ }
+
+ /** First name */
+ public String getFirstName() {
+ return this.firstName;
+ }
+
+ /** @param firstName First name */
+ public void setFirstName(final String firstName) {
+ this.firstName = firstName;
+ }
+
+ /** An identifier for a specific payment gateway. */
+ public String getGatewayCode() {
+ return this.gatewayCode;
+ }
+
+ /** @param gatewayCode An identifier for a specific payment gateway. */
+ public void setGatewayCode(final String gatewayCode) {
+ this.gatewayCode = gatewayCode;
+ }
+
+ /** *STRONGLY RECOMMENDED* Customer's IP address when updating their billing information. */
+ public String getIpAddress() {
+ return this.ipAddress;
+ }
+
+ /**
+ * @param ipAddress *STRONGLY RECOMMENDED* Customer's IP address when updating their billing
+ * information.
+ */
+ public void setIpAddress(final String ipAddress) {
+ this.ipAddress = ipAddress;
+ }
+
+ /** Last name */
+ public String getLastName() {
+ return this.lastName;
+ }
+
+ /** @param lastName Last name */
+ public void setLastName(final String lastName) {
+ this.lastName = lastName;
+ }
+
+ /**
+ * Network transaction ID from the previous customer-in-session subscription signup or billing
+ * info storage.
+ *
+ * - 10-15 alphanumeric characters for Mastercard - 14-15 alphanumeric for Visa - 15 digits for
+ * all other brands - 16 alphanumeric characters for Cartes Bancaires, which are processed as Visa
+ * or Mastercard
+ */
+ public String getNetworkTransactionId() {
+ return this.networkTransactionId;
+ }
+
+ /**
+ * @param networkTransactionId Network transaction ID from the previous customer-in-session
+ * subscription signup or billing info storage.
+ *
- 10-15 alphanumeric characters for Mastercard - 14-15 alphanumeric for Visa - 15 digits
+ * for all other brands - 16 alphanumeric characters for Cartes Bancaires, which are processed
+ * as Visa or Mastercard
+ */
+ public void setNetworkTransactionId(final String networkTransactionId) {
+ this.networkTransactionId = networkTransactionId;
+ }
+
+ /**
+ * Array of Payment Gateway References, each a reference to a third-party gateway object of
+ * varying types.
+ */
+ public List getPaymentGatewayReferences() {
+ return this.paymentGatewayReferences;
+ }
+
+ /**
+ * @param paymentGatewayReferences Array of Payment Gateway References, each a reference to a
+ * third-party gateway object of varying types.
+ */
+ public void setPaymentGatewayReferences(
+ final List paymentGatewayReferences) {
+ this.paymentGatewayReferences = paymentGatewayReferences;
+ }
+
+ /**
+ * The `primary_payment_method` field is used to designate the primary billing info on the
+ * account. An account can have a maximum of 1 primary. If a user sets a different payment method
+ * as a primary, then the existing primary will no longer be marked as such.
+ */
+ public Boolean getPrimaryPaymentMethod() {
+ return this.primaryPaymentMethod;
+ }
+
+ /**
+ * @param primaryPaymentMethod The `primary_payment_method` field is used to designate the primary
+ * billing info on the account. An account can have a maximum of 1 primary. If a user sets a
+ * different payment method as a primary, then the existing primary will no longer be marked
+ * as such.
+ */
+ public void setPrimaryPaymentMethod(final Boolean primaryPaymentMethod) {
+ this.primaryPaymentMethod = primaryPaymentMethod;
+ }
+
+ /** Transactions from previous collection attempts for this payment method. */
+ public List getTransactions() {
+ return this.transactions;
+ }
+
+ /** @param transactions Transactions from previous collection attempts for this payment method. */
+ public void setTransactions(final List transactions) {
+ this.transactions = transactions;
+ }
+}
diff --git a/src/main/java/com/recurly/v3/requests/RecoveryInvoiceCreate.java b/src/main/java/com/recurly/v3/requests/RecoveryInvoiceCreate.java
new file mode 100644
index 0000000..df7f6ab
--- /dev/null
+++ b/src/main/java/com/recurly/v3/requests/RecoveryInvoiceCreate.java
@@ -0,0 +1,123 @@
+/**
+ * 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;
+import org.joda.time.DateTime;
+
+public class RecoveryInvoiceCreate extends Request {
+
+ @SerializedName("account")
+ @Expose
+ private RecoveryAccountCreate account;
+
+ /** 3-letter ISO 4217 currency code. */
+ @SerializedName("currency")
+ @Expose
+ private String currency;
+
+ /** Date invoice was originally due. Must be in the past. */
+ @SerializedName("due_at")
+ @Expose
+ private DateTime dueAt;
+
+ /**
+ * Must be set to `true` to acknowledge that the invoice is eligible for external recovery.
+ * Requests with `false`, omitted, or non-boolean values will be rejected.
+ */
+ @SerializedName("external_recovery_eligible")
+ @Expose
+ private Boolean externalRecoveryEligible;
+
+ /**
+ * Line items to include on the invoice. Currency is specified at the root level and must not be
+ * included in individual line items.
+ */
+ @SerializedName("line_items")
+ @Expose
+ private List lineItems;
+
+ /** This identifies the PO number associated with the subscription. */
+ @SerializedName("po_number")
+ @Expose
+ private String poNumber;
+
+ public RecoveryAccountCreate getAccount() {
+ return this.account;
+ }
+
+ /** @param account */
+ public void setAccount(final RecoveryAccountCreate account) {
+ this.account = account;
+ }
+
+ /** 3-letter ISO 4217 currency code. */
+ public String getCurrency() {
+ return this.currency;
+ }
+
+ /** @param currency 3-letter ISO 4217 currency code. */
+ public void setCurrency(final String currency) {
+ this.currency = currency;
+ }
+
+ /** Date invoice was originally due. Must be in the past. */
+ public DateTime getDueAt() {
+ return this.dueAt;
+ }
+
+ /** @param dueAt Date invoice was originally due. Must be in the past. */
+ public void setDueAt(final DateTime dueAt) {
+ this.dueAt = dueAt;
+ }
+
+ /**
+ * Must be set to `true` to acknowledge that the invoice is eligible for external recovery.
+ * Requests with `false`, omitted, or non-boolean values will be rejected.
+ */
+ public Boolean getExternalRecoveryEligible() {
+ return this.externalRecoveryEligible;
+ }
+
+ /**
+ * @param externalRecoveryEligible Must be set to `true` to acknowledge that the invoice is
+ * eligible for external recovery. Requests with `false`, omitted, or non-boolean values will
+ * be rejected.
+ */
+ public void setExternalRecoveryEligible(final Boolean externalRecoveryEligible) {
+ this.externalRecoveryEligible = externalRecoveryEligible;
+ }
+
+ /**
+ * Line items to include on the invoice. Currency is specified at the root level and must not be
+ * included in individual line items.
+ */
+ public List getLineItems() {
+ return this.lineItems;
+ }
+
+ /**
+ * @param lineItems Line items to include on the invoice. Currency is specified at the root level
+ * and must not be included in individual line items.
+ */
+ public void setLineItems(final List lineItems) {
+ this.lineItems = lineItems;
+ }
+
+ /** This identifies the PO number associated with the subscription. */
+ public String getPoNumber() {
+ return this.poNumber;
+ }
+
+ /** @param poNumber This identifies the PO number associated with the subscription. */
+ public void setPoNumber(final String poNumber) {
+ this.poNumber = poNumber;
+ }
+}
diff --git a/src/main/java/com/recurly/v3/requests/RecoveryLineItemCreate.java b/src/main/java/com/recurly/v3/requests/RecoveryLineItemCreate.java
new file mode 100644
index 0000000..0101dbf
--- /dev/null
+++ b/src/main/java/com/recurly/v3/requests/RecoveryLineItemCreate.java
@@ -0,0 +1,169 @@
+/**
+ * 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.math.BigDecimal;
+import java.util.List;
+
+public class RecoveryLineItemCreate extends Request {
+
+ /**
+ * 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 customFields;
+
+ /** Description that appears on the invoice. */
+ @SerializedName("description")
+ @Expose
+ private String description;
+
+ /**
+ * The Harmonized System (HS) code is an internationally standardized system of names and numbers
+ * to classify traded products. The HS code, sometimes called Commodity Code, is used by customs
+ * authorities around the world to identify products when assessing duties and taxes. The HS code
+ * may also be referred to as the tariff code or customs code. Values should contain only digits
+ * and decimals.
+ */
+ @SerializedName("harmonized_system_code")
+ @Expose
+ private String harmonizedSystemCode;
+
+ /**
+ * Optional field to track a product code or SKU for the line item. This can be used to later
+ * reporting on product purchases.
+ */
+ @SerializedName("product_code")
+ @Expose
+ private String productCode;
+
+ /**
+ * This number will be multiplied by the unit amount to compute the subtotal before any discounts
+ * or taxes.
+ */
+ @SerializedName("quantity")
+ @Expose
+ private Integer quantity;
+
+ /** The tax amount for the line item. */
+ @SerializedName("tax")
+ @Expose
+ private BigDecimal tax;
+
+ /** A positive or negative amount will result in a positive `unit_amount`. */
+ @SerializedName("unit_amount")
+ @Expose
+ private BigDecimal unitAmount;
+
+ /**
+ * 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 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 customFields) {
+ this.customFields = customFields;
+ }
+
+ /** Description that appears on the invoice. */
+ public String getDescription() {
+ return this.description;
+ }
+
+ /** @param description Description that appears on the invoice. */
+ public void setDescription(final String description) {
+ this.description = description;
+ }
+
+ /**
+ * The Harmonized System (HS) code is an internationally standardized system of names and numbers
+ * to classify traded products. The HS code, sometimes called Commodity Code, is used by customs
+ * authorities around the world to identify products when assessing duties and taxes. The HS code
+ * may also be referred to as the tariff code or customs code. Values should contain only digits
+ * and decimals.
+ */
+ public String getHarmonizedSystemCode() {
+ return this.harmonizedSystemCode;
+ }
+
+ /**
+ * @param harmonizedSystemCode The Harmonized System (HS) code is an internationally standardized
+ * system of names and numbers to classify traded products. The HS code, sometimes called
+ * Commodity Code, is used by customs authorities around the world to identify products when
+ * assessing duties and taxes. The HS code may also be referred to as the tariff code or
+ * customs code. Values should contain only digits and decimals.
+ */
+ public void setHarmonizedSystemCode(final String harmonizedSystemCode) {
+ this.harmonizedSystemCode = harmonizedSystemCode;
+ }
+
+ /**
+ * Optional field to track a product code or SKU for the line item. This can be used to later
+ * reporting on product purchases.
+ */
+ public String getProductCode() {
+ return this.productCode;
+ }
+
+ /**
+ * @param productCode Optional field to track a product code or SKU for the line item. This can be
+ * used to later reporting on product purchases.
+ */
+ public void setProductCode(final String productCode) {
+ this.productCode = productCode;
+ }
+
+ /**
+ * This number will be multiplied by the unit amount to compute the subtotal before any discounts
+ * or taxes.
+ */
+ public Integer getQuantity() {
+ return this.quantity;
+ }
+
+ /**
+ * @param quantity This number will be multiplied by the unit amount to compute the subtotal
+ * before any discounts or taxes.
+ */
+ public void setQuantity(final Integer quantity) {
+ this.quantity = quantity;
+ }
+
+ /** The tax amount for the line item. */
+ public BigDecimal getTax() {
+ return this.tax;
+ }
+
+ /** @param tax The tax amount for the line item. */
+ public void setTax(final BigDecimal tax) {
+ this.tax = tax;
+ }
+
+ /** A positive or negative amount will result in a positive `unit_amount`. */
+ public BigDecimal getUnitAmount() {
+ return this.unitAmount;
+ }
+
+ /** @param unitAmount A positive or negative amount will result in a positive `unit_amount`. */
+ public void setUnitAmount(final BigDecimal unitAmount) {
+ this.unitAmount = unitAmount;
+ }
+}
diff --git a/src/main/java/com/recurly/v3/requests/RecoveryTransactionCreate.java b/src/main/java/com/recurly/v3/requests/RecoveryTransactionCreate.java
new file mode 100644
index 0000000..6f78f33
--- /dev/null
+++ b/src/main/java/com/recurly/v3/requests/RecoveryTransactionCreate.java
@@ -0,0 +1,72 @@
+/**
+ * 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 org.joda.time.DateTime;
+
+public class RecoveryTransactionCreate extends Request {
+
+ /** The date the original payment collection was attempted. */
+ @SerializedName("attempted_collection_date")
+ @Expose
+ private DateTime attemptedCollectionDate;
+
+ /** The error code returned by the payment gateway for the original payment collection attempt. */
+ @SerializedName("gateway_error_code")
+ @Expose
+ private String gatewayErrorCode;
+
+ /**
+ * The advice code returned by the payment gateway for the original payment collection attempt.
+ * This field is only applicable for certain gateways.
+ */
+ @SerializedName("merchant_advice_code")
+ @Expose
+ private String merchantAdviceCode;
+
+ /** The date the original payment collection was attempted. */
+ public DateTime getAttemptedCollectionDate() {
+ return this.attemptedCollectionDate;
+ }
+
+ /** @param attemptedCollectionDate The date the original payment collection was attempted. */
+ public void setAttemptedCollectionDate(final DateTime attemptedCollectionDate) {
+ this.attemptedCollectionDate = attemptedCollectionDate;
+ }
+
+ /** The error code returned by the payment gateway for the original payment collection attempt. */
+ public String getGatewayErrorCode() {
+ return this.gatewayErrorCode;
+ }
+
+ /**
+ * @param gatewayErrorCode The error code returned by the payment gateway for the original payment
+ * collection attempt.
+ */
+ public void setGatewayErrorCode(final String gatewayErrorCode) {
+ this.gatewayErrorCode = gatewayErrorCode;
+ }
+
+ /**
+ * The advice code returned by the payment gateway for the original payment collection attempt.
+ * This field is only applicable for certain gateways.
+ */
+ public String getMerchantAdviceCode() {
+ return this.merchantAdviceCode;
+ }
+
+ /**
+ * @param merchantAdviceCode The advice code returned by the payment gateway for the original
+ * payment collection attempt. This field is only applicable for certain gateways.
+ */
+ public void setMerchantAdviceCode(final String merchantAdviceCode) {
+ this.merchantAdviceCode = merchantAdviceCode;
+ }
+}
diff --git a/src/main/java/com/recurly/v3/resources/CouponDiscountTrial.java b/src/main/java/com/recurly/v3/resources/CouponDiscountTrial.java
index 9091587..3346030 100644
--- a/src/main/java/com/recurly/v3/resources/CouponDiscountTrial.java
+++ b/src/main/java/com/recurly/v3/resources/CouponDiscountTrial.java
@@ -17,7 +17,10 @@ public class CouponDiscountTrial extends Resource {
@Expose
private Integer length;
- /** Temporal unit of the free trial */
+ /**
+ * Temporal unit of the free trial. When `billing_period`, `length` represents the number of
+ * billing cycles.
+ */
@SerializedName("unit")
@Expose
private Constants.FreeTrialUnit unit;
@@ -32,12 +35,18 @@ public void setLength(final Integer length) {
this.length = length;
}
- /** Temporal unit of the free trial */
+ /**
+ * Temporal unit of the free trial. When `billing_period`, `length` represents the number of
+ * billing cycles.
+ */
public Constants.FreeTrialUnit getUnit() {
return this.unit;
}
- /** @param unit Temporal unit of the free trial */
+ /**
+ * @param unit Temporal unit of the free trial. When `billing_period`, `length` represents the
+ * number of billing cycles.
+ */
public void setUnit(final Constants.FreeTrialUnit unit) {
this.unit = unit;
}
diff --git a/src/main/java/com/recurly/v3/resources/CouponRedemption.java b/src/main/java/com/recurly/v3/resources/CouponRedemption.java
index 5fcba8d..176dcef 100644
--- a/src/main/java/com/recurly/v3/resources/CouponRedemption.java
+++ b/src/main/java/com/recurly/v3/resources/CouponRedemption.java
@@ -50,6 +50,10 @@ public class CouponRedemption extends Resource {
@Expose
private String object;
+ @SerializedName("remaining_duration")
+ @Expose
+ private CouponRedemptionRemainingDuration remainingDuration;
+
/** The date and time the redemption was removed from the account (un-redeemed). */
@SerializedName("removed_at")
@Expose
@@ -151,6 +155,15 @@ public void setObject(final String object) {
this.object = object;
}
+ public CouponRedemptionRemainingDuration getRemainingDuration() {
+ return this.remainingDuration;
+ }
+
+ /** @param remainingDuration */
+ public void setRemainingDuration(final CouponRedemptionRemainingDuration remainingDuration) {
+ this.remainingDuration = remainingDuration;
+ }
+
/** The date and time the redemption was removed from the account (un-redeemed). */
public DateTime getRemovedAt() {
return this.removedAt;
diff --git a/src/main/java/com/recurly/v3/resources/CouponRedemptionMini.java b/src/main/java/com/recurly/v3/resources/CouponRedemptionMini.java
index 7e765d9..29f1ce2 100644
--- a/src/main/java/com/recurly/v3/resources/CouponRedemptionMini.java
+++ b/src/main/java/com/recurly/v3/resources/CouponRedemptionMini.java
@@ -40,7 +40,11 @@ public class CouponRedemptionMini extends Resource {
@Expose
private String object;
- /** Invoice state */
+ @SerializedName("remaining_duration")
+ @Expose
+ private CouponRedemptionRemainingDuration remainingDuration;
+
+ /** Coupon Redemption state */
@SerializedName("state")
@Expose
private Constants.ActiveState state;
@@ -99,12 +103,21 @@ public void setObject(final String object) {
this.object = object;
}
- /** Invoice state */
+ public CouponRedemptionRemainingDuration getRemainingDuration() {
+ return this.remainingDuration;
+ }
+
+ /** @param remainingDuration */
+ public void setRemainingDuration(final CouponRedemptionRemainingDuration remainingDuration) {
+ this.remainingDuration = remainingDuration;
+ }
+
+ /** Coupon Redemption state */
public Constants.ActiveState getState() {
return this.state;
}
- /** @param state Invoice state */
+ /** @param state Coupon Redemption state */
public void setState(final Constants.ActiveState state) {
this.state = state;
}
diff --git a/src/main/java/com/recurly/v3/resources/CouponRedemptionRemainingDuration.java b/src/main/java/com/recurly/v3/resources/CouponRedemptionRemainingDuration.java
new file mode 100644
index 0000000..52f78de
--- /dev/null
+++ b/src/main/java/com/recurly/v3/resources/CouponRedemptionRemainingDuration.java
@@ -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.resources;
+
+import com.google.gson.annotations.Expose;
+import com.google.gson.annotations.SerializedName;
+import com.recurly.v3.Constants;
+import com.recurly.v3.Resource;
+import org.joda.time.DateTime;
+
+public class CouponRedemptionRemainingDuration extends Resource {
+
+ /**
+ * Present when `type` is `temporal`. The datetime after which this redemption will no longer
+ * apply.
+ */
+ @SerializedName("expires_at")
+ @Expose
+ private DateTime expiresAt;
+
+ /**
+ * The coupon's duration type. `temporal` includes an `expires_at` timestamp. `forever` and
+ * `single_use` have no additional fields.
+ */
+ @SerializedName("type")
+ @Expose
+ private Constants.CouponDuration type;
+
+ /**
+ * Present when `type` is `temporal`. The datetime after which this redemption will no longer
+ * apply.
+ */
+ public DateTime getExpiresAt() {
+ return this.expiresAt;
+ }
+
+ /**
+ * @param expiresAt Present when `type` is `temporal`. The datetime after which this redemption
+ * will no longer apply.
+ */
+ public void setExpiresAt(final DateTime expiresAt) {
+ this.expiresAt = expiresAt;
+ }
+
+ /**
+ * The coupon's duration type. `temporal` includes an `expires_at` timestamp. `forever` and
+ * `single_use` have no additional fields.
+ */
+ public Constants.CouponDuration getType() {
+ return this.type;
+ }
+
+ /**
+ * @param type The coupon's duration type. `temporal` includes an `expires_at` timestamp.
+ * `forever` and `single_use` have no additional fields.
+ */
+ public void setType(final Constants.CouponDuration type) {
+ this.type = type;
+ }
+}
diff --git a/src/main/java/com/recurly/v3/resources/Invoice.java b/src/main/java/com/recurly/v3/resources/Invoice.java
index 9723e57..8bab434 100644
--- a/src/main/java/com/recurly/v3/resources/Invoice.java
+++ b/src/main/java/com/recurly/v3/resources/Invoice.java
@@ -63,6 +63,11 @@ public class Invoice extends Resource {
@Expose
private Constants.CollectionMethod collectionMethod;
+ /** The coupon redemptions applied to this invoice. */
+ @SerializedName("coupon_redemptions")
+ @Expose
+ private List couponRedemptions;
+
/** Created at */
@SerializedName("created_at")
@Expose
@@ -423,6 +428,16 @@ public void setCollectionMethod(final Constants.CollectionMethod collectionMetho
this.collectionMethod = collectionMethod;
}
+ /** The coupon redemptions applied to this invoice. */
+ public List getCouponRedemptions() {
+ return this.couponRedemptions;
+ }
+
+ /** @param couponRedemptions The coupon redemptions applied to this invoice. */
+ public void setCouponRedemptions(final List couponRedemptions) {
+ this.couponRedemptions = couponRedemptions;
+ }
+
/** Created at */
public DateTime getCreatedAt() {
return this.createdAt;
diff --git a/src/main/java/com/recurly/v3/resources/LineItem.java b/src/main/java/com/recurly/v3/resources/LineItem.java
index 6c71d11..f243c08 100644
--- a/src/main/java/com/recurly/v3/resources/LineItem.java
+++ b/src/main/java/com/recurly/v3/resources/LineItem.java
@@ -116,11 +116,16 @@ public class LineItem extends Resource {
@Expose
private Constants.DestinationTaxAddressSource destinationTaxAddressSource;
- /** The discount applied to the line item. */
+ /** The sum of all discounts applied to the line item. */
@SerializedName("discount")
@Expose
private BigDecimal discount;
+ /** The breakdown of discounts applied to the line item by coupon redemption. */
+ @SerializedName("discounts")
+ @Expose
+ private List discounts;
+
/** If this date is provided, it indicates the end of a time range. */
@SerializedName("end_date")
@Expose
@@ -634,16 +639,26 @@ public void setDestinationTaxAddressSource(
this.destinationTaxAddressSource = destinationTaxAddressSource;
}
- /** The discount applied to the line item. */
+ /** The sum of all discounts applied to the line item. */
public BigDecimal getDiscount() {
return this.discount;
}
- /** @param discount The discount applied to the line item. */
+ /** @param discount The sum of all discounts applied to the line item. */
public void setDiscount(final BigDecimal discount) {
this.discount = discount;
}
+ /** The breakdown of discounts applied to the line item by coupon redemption. */
+ public List getDiscounts() {
+ return this.discounts;
+ }
+
+ /** @param discounts The breakdown of discounts applied to the line item by coupon redemption. */
+ public void setDiscounts(final List discounts) {
+ this.discounts = discounts;
+ }
+
/** If this date is provided, it indicates the end of a time range. */
public DateTime getEndDate() {
return this.endDate;
diff --git a/src/main/java/com/recurly/v3/resources/LineItemDiscount.java b/src/main/java/com/recurly/v3/resources/LineItemDiscount.java
new file mode 100644
index 0000000..876fb6a
--- /dev/null
+++ b/src/main/java/com/recurly/v3/resources/LineItemDiscount.java
@@ -0,0 +1,107 @@
+/**
+ * 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.resources;
+
+import com.google.gson.annotations.Expose;
+import com.google.gson.annotations.SerializedName;
+import com.recurly.v3.Resource;
+import java.math.BigDecimal;
+
+public class LineItemDiscount extends Resource {
+
+ /** The ID of the coupon that generated this discount. */
+ @SerializedName("coupon_id")
+ @Expose
+ private String couponId;
+
+ /** The ID of the coupon redemption that generated this discount. */
+ @SerializedName("coupon_redemption_id")
+ @Expose
+ private String couponRedemptionId;
+
+ /** 3-letter ISO 4217 currency code. */
+ @SerializedName("currency")
+ @Expose
+ private String currency;
+
+ /** The amount discounted on this line item by this coupon redemption. */
+ @SerializedName("discount_amount")
+ @Expose
+ private BigDecimal discountAmount;
+
+ /** Will always be `line_item_discount`. */
+ @SerializedName("object")
+ @Expose
+ private String object;
+
+ /** The order in which this discount was applied when multiple coupons were redeemed. */
+ @SerializedName("order_applied")
+ @Expose
+ private Integer orderApplied;
+
+ /** The ID of the coupon that generated this discount. */
+ public String getCouponId() {
+ return this.couponId;
+ }
+
+ /** @param couponId The ID of the coupon that generated this discount. */
+ public void setCouponId(final String couponId) {
+ this.couponId = couponId;
+ }
+
+ /** The ID of the coupon redemption that generated this discount. */
+ public String getCouponRedemptionId() {
+ return this.couponRedemptionId;
+ }
+
+ /** @param couponRedemptionId The ID of the coupon redemption that generated this discount. */
+ public void setCouponRedemptionId(final String couponRedemptionId) {
+ this.couponRedemptionId = couponRedemptionId;
+ }
+
+ /** 3-letter ISO 4217 currency code. */
+ public String getCurrency() {
+ return this.currency;
+ }
+
+ /** @param currency 3-letter ISO 4217 currency code. */
+ public void setCurrency(final String currency) {
+ this.currency = currency;
+ }
+
+ /** The amount discounted on this line item by this coupon redemption. */
+ public BigDecimal getDiscountAmount() {
+ return this.discountAmount;
+ }
+
+ /** @param discountAmount The amount discounted on this line item by this coupon redemption. */
+ public void setDiscountAmount(final BigDecimal discountAmount) {
+ this.discountAmount = discountAmount;
+ }
+
+ /** Will always be `line_item_discount`. */
+ public String getObject() {
+ return this.object;
+ }
+
+ /** @param object Will always be `line_item_discount`. */
+ public void setObject(final String object) {
+ this.object = object;
+ }
+
+ /** The order in which this discount was applied when multiple coupons were redeemed. */
+ public Integer getOrderApplied() {
+ return this.orderApplied;
+ }
+
+ /**
+ * @param orderApplied The order in which this discount was applied when multiple coupons were
+ * redeemed.
+ */
+ public void setOrderApplied(final Integer orderApplied) {
+ this.orderApplied = orderApplied;
+ }
+}