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
47 changes: 47 additions & 0 deletions openapi/api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20911,6 +20911,8 @@ components:
default: 0
net_terms_type:
"$ref": "#/components/schemas/NetTermsTypeEnum"
credit_application_policy:
"$ref": "#/components/schemas/CreditApplicationPolicy"
po_number:
type: string
title: Purchase order number
Expand Down Expand Up @@ -22507,6 +22509,19 @@ components:
format: float
title: Tax In Cents
description: The tax converted to the currency.
rate:
type: string
title: Rate
description: The conversion rate to the currency.
source:
type: string
title: Source
description: The source of the conversion rate.
date:
type: string
title: Date
format: date
description: The date of the conversion rate.
ShippingAddressCreate:
type: object
properties:
Expand Down Expand Up @@ -23125,6 +23140,8 @@ components:
default: 0
net_terms_type:
"$ref": "#/components/schemas/NetTermsTypeEnum"
credit_application_policy:
"$ref": "#/components/schemas/CreditApplicationPolicy"
terms_and_conditions:
type: string
title: Terms and conditions
Expand Down Expand Up @@ -23976,6 +23993,8 @@ components:
default: 0
net_terms_type:
"$ref": "#/components/schemas/NetTermsTypeEnum"
credit_application_policy:
"$ref": "#/components/schemas/CreditApplicationPolicy"
gateway_code:
type: string
title: Gateway Code
Expand Down Expand Up @@ -24107,6 +24126,8 @@ components:
description: The new set of ramp intervals for the subscription.
items:
"$ref": "#/components/schemas/SubscriptionRampInterval"
credit_application_policy:
"$ref": "#/components/schemas/CreditApplicationPolicy"
bulk:
type: boolean
description: Optional field to be used only when needing to bypass the 60
Expand Down Expand Up @@ -24195,6 +24216,8 @@ components:
default: 0
net_terms_type:
"$ref": "#/components/schemas/NetTermsTypeEnum"
credit_application_policy:
"$ref": "#/components/schemas/CreditApplicationPolicy"
gateway_code:
type: string
title: Gateway Code
Expand Down Expand Up @@ -25033,6 +25056,8 @@ components:
default: 0
net_terms_type:
"$ref": "#/components/schemas/NetTermsTypeEnum"
credit_application_policy_override:
"$ref": "#/components/schemas/CreditApplicationPolicy"
terms_and_conditions:
type: string
title: Terms and conditions
Expand Down Expand Up @@ -27038,6 +27063,28 @@ components:
enum:
- automatic
- manual
CreditApplicationPolicy:
type: object
title: Credit Application Policy
description: |
Controls whether credit invoices are automatically applied to new invoices.
The `mode` field determines the application behavior.
properties:
mode:
"$ref": "#/components/schemas/CreditApplicationModeEnum"
required:
- mode
CreditApplicationModeEnum:
type: string
title: Credit Application Mode
description: |
Determines which credit invoices are applied to invoices:
- `all`: All available credit invoices are applied (default)
- `none`: No credit invoices are applied automatically
enum:
- all
- none
default: all
InvoiceRefundTypeEnum:
type: string
enum:
Expand Down
11 changes: 11 additions & 0 deletions src/main/java/com/recurly/v3/Constants.java
Original file line number Diff line number Diff line change
Expand Up @@ -862,6 +862,17 @@ public enum CollectionMethod {

};

public enum CreditApplicationMode {
UNDEFINED,

@SerializedName("all")
ALL,

@SerializedName("none")
NONE,

};

public enum InvoiceRefundType {
UNDEFINED,

Expand Down
40 changes: 40 additions & 0 deletions src/main/java/com/recurly/v3/requests/CreditApplicationPolicy.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
/**
* 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.Constants;
import com.recurly.v3.Request;
import com.recurly.v3.resources.*;

public class CreditApplicationPolicy extends Request {

/**
* Determines which credit invoices are applied to invoices: - `all`: All available credit
* invoices are applied (default) - `none`: No credit invoices are applied automatically
*/
@SerializedName("mode")
@Expose
private Constants.CreditApplicationMode mode;

/**
* Determines which credit invoices are applied to invoices: - `all`: All available credit
* invoices are applied (default) - `none`: No credit invoices are applied automatically
*/
public Constants.CreditApplicationMode getMode() {
return this.mode;
}

/**
* @param mode Determines which credit invoices are applied to invoices: - `all`: All available
* credit invoices are applied (default) - `none`: No credit invoices are applied
* automatically
*/
public void setMode(final Constants.CreditApplicationMode mode) {
this.mode = mode;
}
}
24 changes: 24 additions & 0 deletions src/main/java/com/recurly/v3/requests/InvoiceCreate.java
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,14 @@ public class InvoiceCreate extends Request {
@Expose
private Constants.CollectionMethod collectionMethod;

/**
* Controls whether credit invoices are automatically applied to new invoices. The `mode` field
* determines the application behavior.
*/
@SerializedName("credit_application_policy")
@Expose
private CreditApplicationPolicy creditApplicationPolicy;

/**
* This will default to the Customer Notes text specified on the Invoice Settings for credit
* invoices. Specify customer notes to add or override Customer Notes on credit invoices.
Expand Down Expand Up @@ -204,6 +212,22 @@ public void setCollectionMethod(final Constants.CollectionMethod collectionMetho
this.collectionMethod = collectionMethod;
}

/**
* Controls whether credit invoices are automatically applied to new invoices. The `mode` field
* determines the application behavior.
*/
public CreditApplicationPolicy getCreditApplicationPolicy() {
return this.creditApplicationPolicy;
}

/**
* @param creditApplicationPolicy Controls whether credit invoices are automatically applied to
* new invoices. The `mode` field determines the application behavior.
*/
public void setCreditApplicationPolicy(final CreditApplicationPolicy creditApplicationPolicy) {
this.creditApplicationPolicy = creditApplicationPolicy;
}

/**
* This will default to the Customer Notes text specified on the Invoice Settings for credit
* invoices. Specify customer notes to add or override Customer Notes on credit invoices.
Expand Down
25 changes: 25 additions & 0 deletions src/main/java/com/recurly/v3/requests/PurchaseCreate.java
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,14 @@ public class PurchaseCreate extends Request {
@Expose
private List<String> couponCodes;

/**
* Controls whether credit invoices are automatically applied to new invoices. The `mode` field
* determines the application behavior.
*/
@SerializedName("credit_application_policy_override")
@Expose
private CreditApplicationPolicy creditApplicationPolicyOverride;

/** Notes to be put on the credit invoice resulting from credits in the purchase, if any. */
@SerializedName("credit_customer_notes")
@Expose
Expand Down Expand Up @@ -277,6 +285,23 @@ public void setCouponCodes(final List<String> couponCodes) {
this.couponCodes = couponCodes;
}

/**
* Controls whether credit invoices are automatically applied to new invoices. The `mode` field
* determines the application behavior.
*/
public CreditApplicationPolicy getCreditApplicationPolicyOverride() {
return this.creditApplicationPolicyOverride;
}

/**
* @param creditApplicationPolicyOverride Controls whether credit invoices are automatically
* applied to new invoices. The `mode` field determines the application behavior.
*/
public void setCreditApplicationPolicyOverride(
final CreditApplicationPolicy creditApplicationPolicyOverride) {
this.creditApplicationPolicyOverride = creditApplicationPolicyOverride;
}

/** Notes to be put on the credit invoice resulting from credits in the purchase, if any. */
public String getCreditCustomerNotes() {
return this.creditCustomerNotes;
Expand Down
24 changes: 24 additions & 0 deletions src/main/java/com/recurly/v3/requests/SubscriptionCreate.java
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,14 @@ public class SubscriptionCreate extends Request {
@Expose
private List<String> couponCodes;

/**
* Controls whether credit invoices are automatically applied to new invoices. The `mode` field
* determines the application behavior.
*/
@SerializedName("credit_application_policy")
@Expose
private CreditApplicationPolicy creditApplicationPolicy;

/**
* If there are pending credits on the account that will be invoiced during the subscription
* creation, these will be used as the Customer Notes on the credit invoice.
Expand Down Expand Up @@ -428,6 +436,22 @@ public void setCouponCodes(final List<String> couponCodes) {
this.couponCodes = couponCodes;
}

/**
* Controls whether credit invoices are automatically applied to new invoices. The `mode` field
* determines the application behavior.
*/
public CreditApplicationPolicy getCreditApplicationPolicy() {
return this.creditApplicationPolicy;
}

/**
* @param creditApplicationPolicy Controls whether credit invoices are automatically applied to
* new invoices. The `mode` field determines the application behavior.
*/
public void setCreditApplicationPolicy(final CreditApplicationPolicy creditApplicationPolicy) {
this.creditApplicationPolicy = creditApplicationPolicy;
}

/**
* If there are pending credits on the account that will be invoiced during the subscription
* creation, these will be used as the Customer Notes on the credit invoice.
Expand Down
24 changes: 24 additions & 0 deletions src/main/java/com/recurly/v3/requests/SubscriptionPurchase.java
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,14 @@ public class SubscriptionPurchase extends Request {
@Expose
private Boolean bulk;

/**
* Controls whether credit invoices are automatically applied to new invoices. The `mode` field
* determines the application behavior.
*/
@SerializedName("credit_application_policy")
@Expose
private CreditApplicationPolicy creditApplicationPolicy;

/**
* 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
Expand Down Expand Up @@ -187,6 +195,22 @@ public void setBulk(final Boolean bulk) {
this.bulk = bulk;
}

/**
* Controls whether credit invoices are automatically applied to new invoices. The `mode` field
* determines the application behavior.
*/
public CreditApplicationPolicy getCreditApplicationPolicy() {
return this.creditApplicationPolicy;
}

/**
* @param creditApplicationPolicy Controls whether credit invoices are automatically applied to
* new invoices. The `mode` field determines the application behavior.
*/
public void setCreditApplicationPolicy(final CreditApplicationPolicy creditApplicationPolicy) {
this.creditApplicationPolicy = creditApplicationPolicy;
}

/**
* 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
Expand Down
24 changes: 24 additions & 0 deletions src/main/java/com/recurly/v3/requests/SubscriptionUpdate.java
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,14 @@ public class SubscriptionUpdate extends Request {
@Expose
private Constants.CollectionMethod collectionMethod;

/**
* Controls whether credit invoices are automatically applied to new invoices. The `mode` field
* determines the application behavior.
*/
@SerializedName("credit_application_policy")
@Expose
private CreditApplicationPolicy creditApplicationPolicy;

/**
* 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
Expand Down Expand Up @@ -190,6 +198,22 @@ public void setCollectionMethod(final Constants.CollectionMethod collectionMetho
this.collectionMethod = collectionMethod;
}

/**
* Controls whether credit invoices are automatically applied to new invoices. The `mode` field
* determines the application behavior.
*/
public CreditApplicationPolicy getCreditApplicationPolicy() {
return this.creditApplicationPolicy;
}

/**
* @param creditApplicationPolicy Controls whether credit invoices are automatically applied to
* new invoices. The `mode` field determines the application behavior.
*/
public void setCreditApplicationPolicy(final CreditApplicationPolicy creditApplicationPolicy) {
this.creditApplicationPolicy = creditApplicationPolicy;
}

/**
* 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
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
/**
* 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;

public class CreditApplicationPolicy extends Resource {

/**
* Determines which credit invoices are applied to invoices: - `all`: All available credit
* invoices are applied (default) - `none`: No credit invoices are applied automatically
*/
@SerializedName("mode")
@Expose
private Constants.CreditApplicationMode mode;

/**
* Determines which credit invoices are applied to invoices: - `all`: All available credit
* invoices are applied (default) - `none`: No credit invoices are applied automatically
*/
public Constants.CreditApplicationMode getMode() {
return this.mode;
}

/**
* @param mode Determines which credit invoices are applied to invoices: - `all`: All available
* credit invoices are applied (default) - `none`: No credit invoices are applied
* automatically
*/
public void setMode(final Constants.CreditApplicationMode mode) {
this.mode = mode;
}
}
Loading
Loading