diff --git a/README.md b/README.md
index c0b114da..ba8bcdf1 100644
--- a/README.md
+++ b/README.md
@@ -32,16 +32,16 @@ Install the SDK by adding the following dependency in your project's pom.xml fil
com.maxio
advanced-billing-sdk
- 7.0.1
+ 8.0.0
```
You can also view the package at:
-https://central.sonatype.com/artifact/com.maxio/advanced-billing-sdk/7.0.1
+https://central.sonatype.com/artifact/com.maxio/advanced-billing-sdk/8.0.0
## Initialize the API Client
-**_Note:_** Documentation for the client can be found [here.](https://www.github.com/maxio-com/ab-java-sdk/tree/7.0.1/doc/client.md)
+**_Note:_** Documentation for the client can be found [here.](https://www.github.com/maxio-com/ab-java-sdk/tree/8.0.0/doc/client.md)
The following parameters are configurable for the API Client:
@@ -49,8 +49,8 @@ The following parameters are configurable for the API Client:
| --- | --- | --- |
| site | `String` | The subdomain for your Advanced Billing site.
*Default*: `"subdomain"` |
| environment | `Environment` | The API environment.
**Default: `Environment.US`** |
-| httpClientConfig | [`Consumer`](https://www.github.com/maxio-com/ab-java-sdk/tree/7.0.1/doc/http-client-configuration-builder.md) | Set up Http Client Configuration instance. |
-| basicAuthCredentials | [`BasicAuthCredentials`](https://www.github.com/maxio-com/ab-java-sdk/tree/7.0.1/doc/auth/basic-authentication.md) | The Credentials Setter for Basic Authentication |
+| httpClientConfig | [`Consumer`](https://www.github.com/maxio-com/ab-java-sdk/tree/8.0.0/doc/http-client-configuration-builder.md) | Set up Http Client Configuration instance. |
+| basicAuthCredentials | [`BasicAuthCredentials`](https://www.github.com/maxio-com/ab-java-sdk/tree/8.0.0/doc/auth/basic-authentication.md) | The Credentials Setter for Basic Authentication |
The API client can be initialized as follows:
@@ -94,67 +94,67 @@ The SDK can be configured to use a different environment for making API calls. A
This API uses the following authentication schemes.
-* [`BasicAuth (Basic Authentication)`](https://www.github.com/maxio-com/ab-java-sdk/tree/7.0.1/doc/auth/basic-authentication.md)
+* [`BasicAuth (Basic Authentication)`](https://www.github.com/maxio-com/ab-java-sdk/tree/8.0.0/doc/auth/basic-authentication.md)
## List of APIs
-* [API Exports](https://www.github.com/maxio-com/ab-java-sdk/tree/7.0.1/doc/controllers/api-exports.md)
-* [Advance Invoice](https://www.github.com/maxio-com/ab-java-sdk/tree/7.0.1/doc/controllers/advance-invoice.md)
-* [Billing Portal](https://www.github.com/maxio-com/ab-java-sdk/tree/7.0.1/doc/controllers/billing-portal.md)
-* [Component Price Points](https://www.github.com/maxio-com/ab-java-sdk/tree/7.0.1/doc/controllers/component-price-points.md)
-* [Custom Fields](https://www.github.com/maxio-com/ab-java-sdk/tree/7.0.1/doc/controllers/custom-fields.md)
-* [Events-Based Billing Segments](https://www.github.com/maxio-com/ab-java-sdk/tree/7.0.1/doc/controllers/events-based-billing-segments.md)
-* [Payment Profiles](https://www.github.com/maxio-com/ab-java-sdk/tree/7.0.1/doc/controllers/payment-profiles.md)
-* [Product Families](https://www.github.com/maxio-com/ab-java-sdk/tree/7.0.1/doc/controllers/product-families.md)
-* [Product Price Points](https://www.github.com/maxio-com/ab-java-sdk/tree/7.0.1/doc/controllers/product-price-points.md)
-* [Proforma Invoices](https://www.github.com/maxio-com/ab-java-sdk/tree/7.0.1/doc/controllers/proforma-invoices.md)
-* [Reason Codes](https://www.github.com/maxio-com/ab-java-sdk/tree/7.0.1/doc/controllers/reason-codes.md)
-* [Referral Codes](https://www.github.com/maxio-com/ab-java-sdk/tree/7.0.1/doc/controllers/referral-codes.md)
-* [Sales Commissions](https://www.github.com/maxio-com/ab-java-sdk/tree/7.0.1/doc/controllers/sales-commissions.md)
-* [Subscription Components](https://www.github.com/maxio-com/ab-java-sdk/tree/7.0.1/doc/controllers/subscription-components.md)
-* [Subscription Groups](https://www.github.com/maxio-com/ab-java-sdk/tree/7.0.1/doc/controllers/subscription-groups.md)
-* [Subscription Group Invoice Account](https://www.github.com/maxio-com/ab-java-sdk/tree/7.0.1/doc/controllers/subscription-group-invoice-account.md)
-* [Subscription Group Status](https://www.github.com/maxio-com/ab-java-sdk/tree/7.0.1/doc/controllers/subscription-group-status.md)
-* [Subscription Invoice Account](https://www.github.com/maxio-com/ab-java-sdk/tree/7.0.1/doc/controllers/subscription-invoice-account.md)
-* [Subscription Notes](https://www.github.com/maxio-com/ab-java-sdk/tree/7.0.1/doc/controllers/subscription-notes.md)
-* [Subscription Products](https://www.github.com/maxio-com/ab-java-sdk/tree/7.0.1/doc/controllers/subscription-products.md)
-* [Subscription Status](https://www.github.com/maxio-com/ab-java-sdk/tree/7.0.1/doc/controllers/subscription-status.md)
-* [Coupons](https://www.github.com/maxio-com/ab-java-sdk/tree/7.0.1/doc/controllers/coupons.md)
-* [Components](https://www.github.com/maxio-com/ab-java-sdk/tree/7.0.1/doc/controllers/components.md)
-* [Customers](https://www.github.com/maxio-com/ab-java-sdk/tree/7.0.1/doc/controllers/customers.md)
-* [Events](https://www.github.com/maxio-com/ab-java-sdk/tree/7.0.1/doc/controllers/events.md)
-* [Insights](https://www.github.com/maxio-com/ab-java-sdk/tree/7.0.1/doc/controllers/insights.md)
-* [Invoices](https://www.github.com/maxio-com/ab-java-sdk/tree/7.0.1/doc/controllers/invoices.md)
-* [Offers](https://www.github.com/maxio-com/ab-java-sdk/tree/7.0.1/doc/controllers/offers.md)
-* [Products](https://www.github.com/maxio-com/ab-java-sdk/tree/7.0.1/doc/controllers/products.md)
-* [Sites](https://www.github.com/maxio-com/ab-java-sdk/tree/7.0.1/doc/controllers/sites.md)
-* [Subscriptions](https://www.github.com/maxio-com/ab-java-sdk/tree/7.0.1/doc/controllers/subscriptions.md)
-* [Webhooks](https://www.github.com/maxio-com/ab-java-sdk/tree/7.0.1/doc/controllers/webhooks.md)
+* [API Exports](https://www.github.com/maxio-com/ab-java-sdk/tree/8.0.0/doc/controllers/api-exports.md)
+* [Advance Invoice](https://www.github.com/maxio-com/ab-java-sdk/tree/8.0.0/doc/controllers/advance-invoice.md)
+* [Billing Portal](https://www.github.com/maxio-com/ab-java-sdk/tree/8.0.0/doc/controllers/billing-portal.md)
+* [Component Price Points](https://www.github.com/maxio-com/ab-java-sdk/tree/8.0.0/doc/controllers/component-price-points.md)
+* [Custom Fields](https://www.github.com/maxio-com/ab-java-sdk/tree/8.0.0/doc/controllers/custom-fields.md)
+* [Events-Based Billing Segments](https://www.github.com/maxio-com/ab-java-sdk/tree/8.0.0/doc/controllers/events-based-billing-segments.md)
+* [Payment Profiles](https://www.github.com/maxio-com/ab-java-sdk/tree/8.0.0/doc/controllers/payment-profiles.md)
+* [Product Families](https://www.github.com/maxio-com/ab-java-sdk/tree/8.0.0/doc/controllers/product-families.md)
+* [Product Price Points](https://www.github.com/maxio-com/ab-java-sdk/tree/8.0.0/doc/controllers/product-price-points.md)
+* [Proforma Invoices](https://www.github.com/maxio-com/ab-java-sdk/tree/8.0.0/doc/controllers/proforma-invoices.md)
+* [Reason Codes](https://www.github.com/maxio-com/ab-java-sdk/tree/8.0.0/doc/controllers/reason-codes.md)
+* [Referral Codes](https://www.github.com/maxio-com/ab-java-sdk/tree/8.0.0/doc/controllers/referral-codes.md)
+* [Sales Commissions](https://www.github.com/maxio-com/ab-java-sdk/tree/8.0.0/doc/controllers/sales-commissions.md)
+* [Subscription Components](https://www.github.com/maxio-com/ab-java-sdk/tree/8.0.0/doc/controllers/subscription-components.md)
+* [Subscription Groups](https://www.github.com/maxio-com/ab-java-sdk/tree/8.0.0/doc/controllers/subscription-groups.md)
+* [Subscription Group Invoice Account](https://www.github.com/maxio-com/ab-java-sdk/tree/8.0.0/doc/controllers/subscription-group-invoice-account.md)
+* [Subscription Group Status](https://www.github.com/maxio-com/ab-java-sdk/tree/8.0.0/doc/controllers/subscription-group-status.md)
+* [Subscription Invoice Account](https://www.github.com/maxio-com/ab-java-sdk/tree/8.0.0/doc/controllers/subscription-invoice-account.md)
+* [Subscription Notes](https://www.github.com/maxio-com/ab-java-sdk/tree/8.0.0/doc/controllers/subscription-notes.md)
+* [Subscription Products](https://www.github.com/maxio-com/ab-java-sdk/tree/8.0.0/doc/controllers/subscription-products.md)
+* [Subscription Status](https://www.github.com/maxio-com/ab-java-sdk/tree/8.0.0/doc/controllers/subscription-status.md)
+* [Coupons](https://www.github.com/maxio-com/ab-java-sdk/tree/8.0.0/doc/controllers/coupons.md)
+* [Components](https://www.github.com/maxio-com/ab-java-sdk/tree/8.0.0/doc/controllers/components.md)
+* [Customers](https://www.github.com/maxio-com/ab-java-sdk/tree/8.0.0/doc/controllers/customers.md)
+* [Events](https://www.github.com/maxio-com/ab-java-sdk/tree/8.0.0/doc/controllers/events.md)
+* [Insights](https://www.github.com/maxio-com/ab-java-sdk/tree/8.0.0/doc/controllers/insights.md)
+* [Invoices](https://www.github.com/maxio-com/ab-java-sdk/tree/8.0.0/doc/controllers/invoices.md)
+* [Offers](https://www.github.com/maxio-com/ab-java-sdk/tree/8.0.0/doc/controllers/offers.md)
+* [Products](https://www.github.com/maxio-com/ab-java-sdk/tree/8.0.0/doc/controllers/products.md)
+* [Sites](https://www.github.com/maxio-com/ab-java-sdk/tree/8.0.0/doc/controllers/sites.md)
+* [Subscriptions](https://www.github.com/maxio-com/ab-java-sdk/tree/8.0.0/doc/controllers/subscriptions.md)
+* [Webhooks](https://www.github.com/maxio-com/ab-java-sdk/tree/8.0.0/doc/controllers/webhooks.md)
## SDK Infrastructure
### Configuration
-* [Configuration Interface](https://www.github.com/maxio-com/ab-java-sdk/tree/7.0.1/doc/configuration-interface.md)
-* [HttpClientConfiguration](https://www.github.com/maxio-com/ab-java-sdk/tree/7.0.1/doc/http-client-configuration.md)
-* [HttpClientConfiguration.Builder](https://www.github.com/maxio-com/ab-java-sdk/tree/7.0.1/doc/http-client-configuration-builder.md)
-* [HttpProxyConfiguration](https://www.github.com/maxio-com/ab-java-sdk/tree/7.0.1/doc/http-proxy-configuration.md)
-* [HttpProxyConfiguration.Builder](https://www.github.com/maxio-com/ab-java-sdk/tree/7.0.1/doc/http-proxy-configuration-builder.md)
+* [Configuration Interface](https://www.github.com/maxio-com/ab-java-sdk/tree/8.0.0/doc/configuration-interface.md)
+* [HttpClientConfiguration](https://www.github.com/maxio-com/ab-java-sdk/tree/8.0.0/doc/http-client-configuration.md)
+* [HttpClientConfiguration.Builder](https://www.github.com/maxio-com/ab-java-sdk/tree/8.0.0/doc/http-client-configuration-builder.md)
+* [HttpProxyConfiguration](https://www.github.com/maxio-com/ab-java-sdk/tree/8.0.0/doc/http-proxy-configuration.md)
+* [HttpProxyConfiguration.Builder](https://www.github.com/maxio-com/ab-java-sdk/tree/8.0.0/doc/http-proxy-configuration-builder.md)
### HTTP
-* [Headers](https://www.github.com/maxio-com/ab-java-sdk/tree/7.0.1/doc/headers.md)
-* [HttpCallback Interface](https://www.github.com/maxio-com/ab-java-sdk/tree/7.0.1/doc/http-callback-interface.md)
-* [HttpContext](https://www.github.com/maxio-com/ab-java-sdk/tree/7.0.1/doc/http-context.md)
-* [HttpBodyRequest](https://www.github.com/maxio-com/ab-java-sdk/tree/7.0.1/doc/http-body-request.md)
-* [HttpRequest](https://www.github.com/maxio-com/ab-java-sdk/tree/7.0.1/doc/http-request.md)
-* [HttpResponse](https://www.github.com/maxio-com/ab-java-sdk/tree/7.0.1/doc/http-response.md)
-* [HttpStringResponse](https://www.github.com/maxio-com/ab-java-sdk/tree/7.0.1/doc/http-string-response.md)
+* [Headers](https://www.github.com/maxio-com/ab-java-sdk/tree/8.0.0/doc/headers.md)
+* [HttpCallback Interface](https://www.github.com/maxio-com/ab-java-sdk/tree/8.0.0/doc/http-callback-interface.md)
+* [HttpContext](https://www.github.com/maxio-com/ab-java-sdk/tree/8.0.0/doc/http-context.md)
+* [HttpBodyRequest](https://www.github.com/maxio-com/ab-java-sdk/tree/8.0.0/doc/http-body-request.md)
+* [HttpRequest](https://www.github.com/maxio-com/ab-java-sdk/tree/8.0.0/doc/http-request.md)
+* [HttpResponse](https://www.github.com/maxio-com/ab-java-sdk/tree/8.0.0/doc/http-response.md)
+* [HttpStringResponse](https://www.github.com/maxio-com/ab-java-sdk/tree/8.0.0/doc/http-string-response.md)
### Utilities
-* [ApiException](https://www.github.com/maxio-com/ab-java-sdk/tree/7.0.1/doc/api-exception.md)
-* [ApiHelper](https://www.github.com/maxio-com/ab-java-sdk/tree/7.0.1/doc/api-helper.md)
-* [FileWrapper](https://www.github.com/maxio-com/ab-java-sdk/tree/7.0.1/doc/file-wrapper.md)
-* [DateTimeHelper](https://www.github.com/maxio-com/ab-java-sdk/tree/7.0.1/doc/date-time-helper.md)
+* [ApiException](https://www.github.com/maxio-com/ab-java-sdk/tree/8.0.0/doc/api-exception.md)
+* [ApiHelper](https://www.github.com/maxio-com/ab-java-sdk/tree/8.0.0/doc/api-helper.md)
+* [FileWrapper](https://www.github.com/maxio-com/ab-java-sdk/tree/8.0.0/doc/file-wrapper.md)
+* [DateTimeHelper](https://www.github.com/maxio-com/ab-java-sdk/tree/8.0.0/doc/date-time-helper.md)
diff --git a/doc/controllers/advance-invoice.md b/doc/controllers/advance-invoice.md
index a8fa2df1..94d19678 100644
--- a/doc/controllers/advance-invoice.md
+++ b/doc/controllers/advance-invoice.md
@@ -17,7 +17,7 @@ AdvanceInvoiceController advanceInvoiceController = client.getAdvanceInvoiceCont
# Issue Advance Invoice
-Generate an invoice in advance for a subscription's next renewal date. [Please see our docs](https://maxio.zendesk.com/hc/en-us/articles/24252026404749-Issue-Invoice-In-Advance) for more information on advance invoices, including eligibility on generating one; for the most part, they function like any other invoice, except they are issued early and have special behavior upon being voided.
+Generate an invoice in advance for a subscription's next renewal date. [See our docs](https://maxio.zendesk.com/hc/en-us/articles/24252026404749-Issue-Invoice-In-Advance) for more information on advance invoices, including eligibility on generating one; for the most part, they function like any other invoice, except they are issued early and have special behavior upon being voided.
A subscription may only have one advance invoice per billing period. Attempting to issue an advance invoice when one already exists will return an error.
That said, regeneration of the invoice may be forced with the params `force: true`, which will void an advance invoice if one exists and generate a new one. If no advance invoice exists, a new one will be generated.
We recommend using either the create or preview endpoints for proforma invoices to preview this advance invoice before using this endpoint to generate it.
@@ -109,7 +109,7 @@ try {
# Void Advance Invoice
Void a subscription's existing advance invoice. Once voided, it can later be regenerated if desired.
-A `reason` is required in order to void, and the invoice must have an open status. Voiding will cause any prepayments and credits that were applied to the invoice to be returned to the subscription. For a full overview of the impact of voiding, please [see our help docs](../../doc/models/invoice.md).
+A `reason` is required in order to void, and the invoice must have an open status. Voiding will cause any prepayments and credits that were applied to the invoice to be returned to the subscription. For a full overview of the impact of voiding, [see our help docs](../../doc/models/invoice.md).
```java
Invoice voidAdvanceInvoice(
diff --git a/doc/controllers/api-exports.md b/doc/controllers/api-exports.md
index 53c40dec..07411777 100644
--- a/doc/controllers/api-exports.md
+++ b/doc/controllers/api-exports.md
@@ -51,7 +51,7 @@ ListExportedProformaInvoicesInput listExportedProformaInvoicesInput = new ListEx
"batch_id8"
)
.perPage(100)
-.page(2)
+.page(1)
.build();
try {
@@ -101,7 +101,7 @@ ListExportedInvoicesInput listExportedInvoicesInput = new ListExportedInvoicesIn
"batch_id8"
)
.perPage(100)
-.page(2)
+.page(1)
.build();
try {
@@ -151,7 +151,7 @@ ListExportedSubscriptionsInput listExportedSubscriptionsInput = new ListExported
"batch_id8"
)
.perPage(100)
-.page(2)
+.page(1)
.build();
try {
diff --git a/doc/controllers/billing-portal.md b/doc/controllers/billing-portal.md
index 6e6cb46d..aa6173cc 100644
--- a/doc/controllers/billing-portal.md
+++ b/doc/controllers/billing-portal.md
@@ -32,7 +32,7 @@ If your customer has been invited to the Billing Portal, then they will receive
If you need to provide your customer their Management URL through other means, you can retrieve it via the API. Because the URL is cryptographically signed with a timestamp, it is not possible for merchants to generate the URL without requesting it from Advanced Billing.
-In order to prevent abuse & overuse, we ask that you request a new URL only when absolutely necessary. Management URLs are good for 65 days, so you should re-use a previously generated one as much as possible. If you use the URL frequently (such as to display on your website), please **do not** make an API request to Advanced Billing every time.
+In order to prevent abuse & overuse, we ask that you request a new URL only when absolutely necessary. Management URLs are good for 65 days, so you should re-use a previously generated one as much as possible. If you use the URL frequently (such as to display on your website), **do not** make an API request to Advanced Billing every time.
```java
CustomerResponse enableBillingPortalForCustomer(
diff --git a/doc/controllers/component-price-points.md b/doc/controllers/component-price-points.md
index d3696eb7..36abadc0 100644
--- a/doc/controllers/component-price-points.md
+++ b/doc/controllers/component-price-points.md
@@ -214,7 +214,7 @@ ComponentPricePointsResponse listComponentPricePoints(
ListComponentPricePointsInput listComponentPricePointsInput = new ListComponentPricePointsInput.Builder(
222
)
-.page(2)
+.page(1)
.perPage(50)
.filterType(Liquid error: Value cannot be null. (Parameter 'key'))
.build();
@@ -435,7 +435,7 @@ try {
# Update Component Price Point
-When updating a price point, it's prices can be updated as well by creating new prices or editing / removing existing ones.
+When updating a price point, prices can be updated as well by creating new prices or editing / removing existing ones.
Passing in a price bracket without an `id` will attempt to create a new price.
@@ -899,7 +899,7 @@ ListComponentsPricePointsResponse listAllComponentPricePoints(
```java
ListAllComponentPricePointsInput listAllComponentPricePointsInput = new ListAllComponentPricePointsInput.Builder()
.include(ListComponentsPricePointsInclude.CURRENCY_PRICES)
- .page(2)
+ .page(1)
.perPage(50)
.filter(new ListPricePointsFilter.Builder()
.startDate(DateTimeHelper.fromSimpleDate("2011-12-17"))
diff --git a/doc/controllers/components.md b/doc/controllers/components.md
index 87cdf14c..14e0a5d4 100644
--- a/doc/controllers/components.md
+++ b/doc/controllers/components.md
@@ -32,7 +32,7 @@ Metered components are used to bill for any type of unit that resets to 0 at the
Note that this is different from recurring quantity-based components, which DO NOT reset to zero at the start of every billing period. If you want to bill for a quantity of something that does not change unless you change it, then you want quantity components, instead.
-For more information on components, please see our documentation [here](https://maxio.zendesk.com/hc/en-us/articles/24261141522189-Components-Overview).
+For more information on components, see our documentation [here](https://maxio.zendesk.com/hc/en-us/articles/24261141522189-Components-Overview).
```java
ComponentResponse createMeteredComponent(
@@ -161,7 +161,7 @@ One-time quantity-based components are used to create ad hoc usage charges that
The allocated quantity for one-time quantity-based components immediately gets reset back to zero after the allocation is made.
-For more information on components, please see our documentation [here](https://maxio.zendesk.com/hc/en-us/articles/24261141522189-Components-Overview).
+For more information on components, see our documentation [here](https://maxio.zendesk.com/hc/en-us/articles/24261141522189-Components-Overview).
```java
ComponentResponse createQuantityBasedComponent(
@@ -278,7 +278,7 @@ This request will create a component definition of kind **on_off_component** und
On/off components are used for any flat fee, recurring add on (think $99/month for tech support or a flat add on shipping fee).
-For more information on components, please see our documentation [here](https://maxio.zendesk.com/hc/en-us/articles/24261141522189-Components-Overview).
+For more information on components, see our documentation [here](https://maxio.zendesk.com/hc/en-us/articles/24261141522189-Components-Overview).
```java
ComponentResponse createOnOffComponent(
@@ -380,7 +380,7 @@ This request will create a component definition of kind **prepaid_usage_componen
Prepaid components allow customers to pre-purchase units that can be used up over time on their subscription. In a sense, they are the mirror image of metered components; while metered components charge at the end of the period for the amount of units used, prepaid components are charged for at the time of purchase, and we subsequently keep track of the usage against the amount purchased.
-For more information on components, please see our documentation [here](https://maxio.zendesk.com/hc/en-us/articles/24261141522189-Components-Overview).
+For more information on components, see our documentation [here](https://maxio.zendesk.com/hc/en-us/articles/24261141522189-Components-Overview).
```java
ComponentResponse createPrepaidUsageComponent(
@@ -535,7 +535,7 @@ Event-based components are similar to other component types, in that you define
So, instead of reporting usage directly for each component (as you would with metered components), the usage is derived from analysis of your events.
-For more information on components, please see our documentation [here](https://maxio.zendesk.com/hc/en-us/articles/24261141522189-Components-Overview).
+For more information on components, see our documentation [here](https://maxio.zendesk.com/hc/en-us/articles/24261141522189-Components-Overview).
```java
ComponentResponse createEventBasedComponent(
@@ -962,7 +962,7 @@ List listComponents(
```java
ListComponentsInput listComponentsInput = new ListComponentsInput.Builder()
.dateField(BasicDateField.UPDATED_AT)
- .page(2)
+ .page(1)
.perPage(50)
.filter(new ListComponentsFilter.Builder()
.ids(Arrays.asList(
@@ -1198,7 +1198,7 @@ List listComponentsForProductFamily(
ListComponentsForProductFamilyInput listComponentsForProductFamilyInput = new ListComponentsForProductFamilyInput.Builder(
140
)
-.page(2)
+.page(1)
.perPage(50)
.filter(new ListComponentsFilter.Builder()
.ids(Arrays.asList(
diff --git a/doc/controllers/coupons.md b/doc/controllers/coupons.md
index 23fe333d..86bffbf9 100644
--- a/doc/controllers/coupons.md
+++ b/doc/controllers/coupons.md
@@ -30,9 +30,9 @@ CouponsController couponsController = client.getCouponsController();
## Coupons Documentation
-Coupons can be administered in the Advanced Billing application or created via API. Please view our section on [creating coupons](https://maxio.zendesk.com/hc/en-us/articles/24261212433165-Creating-Editing-Deleting-Coupons) for more information.
+Coupons can be administered in the Advanced Billing application or created via API. View our section on [creating coupons](https://maxio.zendesk.com/hc/en-us/articles/24261212433165-Creating-Editing-Deleting-Coupons) for more information.
-Additionally, for documentation on how to apply a coupon to a subscription within the Advanced Billing UI, please see our documentation [here](https://maxio.zendesk.com/hc/en-us/articles/24261259337101-Coupons-and-Subscriptions).
+Additionally, for documentation on how to apply a coupon to a subscription within the Advanced Billing UI, see our documentation [here](https://maxio.zendesk.com/hc/en-us/articles/24261259337101-Coupons-and-Subscriptions).
## Create Coupon
@@ -111,8 +111,6 @@ try {
List coupons for a specific Product Family in a Site.
-If the coupon is set to `use_site_exchange_rate: true`, it will return pricing based on the current exchange rate. If the flag is set to false, it will return all of the defined prices for each currency.
-
```java
List listCouponsForProductFamily(
final ListCouponsForProductFamilyInput input)
@@ -138,7 +136,7 @@ List listCouponsForProductFamily(
ListCouponsForProductFamilyInput listCouponsForProductFamilyInput = new ListCouponsForProductFamilyInput.Builder(
140
)
-.page(2)
+.page(1)
.perPage(50)
.filter(new ListCouponsFilter.Builder()
.startDate(DateTimeHelper.fromSimpleDate("2011-12-17"))
@@ -552,8 +550,6 @@ try {
You can retrieve a list of coupons.
-If the coupon is set to `use_site_exchange_rate: true`, it will return pricing based on the current exchange rate. If the flag is set to false, it will return all of the defined prices for each currency.
-
```java
List listCoupons(
final ListCouponsInput input)
@@ -576,7 +572,7 @@ List listCoupons(
```java
ListCouponsInput listCouponsInput = new ListCouponsInput.Builder()
- .page(2)
+ .page(1)
.perPage(50)
.filter(new ListCouponsFilter.Builder()
.startDate(DateTimeHelper.fromSimpleDate("2011-12-17"))
@@ -669,8 +665,8 @@ List readCouponUsage(
| Parameter | Type | Tags | Description |
| --- | --- | --- | --- |
-| `productFamilyId` | `int` | Template, Required | The Advanced Billing id of the product family to which the coupon belongs |
-| `couponId` | `int` | Template, Required | The Advanced Billing id of the coupon |
+| `productFamilyId` | `int` | Template, Required | The Advanced Billing id of the product family to which the coupon belongs. |
+| `couponId` | `int` | Template, Required | The Advanced Billing id of the coupon. |
## Response Type
@@ -905,7 +901,7 @@ When creating a coupon subcode, you must specify a coupon to attach it to using
Full documentation on how to create coupon subcodes in the Advanced Billing UI can be located [here](https://maxio.zendesk.com/hc/en-us/articles/24261208729229-Coupon-Codes).
-Additionally, for documentation on how to apply a coupon to a Subscription within the Advanced Billing UI, please see our documentation [here](https://maxio.zendesk.com/hc/en-us/articles/24261259337101-Coupons-and-Subscriptions).
+Additionally, for documentation on how to apply a coupon to a Subscription within the Advanced Billing UI, see our documentation [here](https://maxio.zendesk.com/hc/en-us/articles/24261259337101-Coupons-and-Subscriptions).
## Create Coupon Subcode
@@ -1001,7 +997,7 @@ CouponSubcodes listCouponSubcodes(
ListCouponSubcodesInput listCouponSubcodesInput = new ListCouponSubcodesInput.Builder(
162
)
-.page(2)
+.page(1)
.perPage(50)
.build();
diff --git a/doc/controllers/custom-fields.md b/doc/controllers/custom-fields.md
index f33d00e7..1c691018 100644
--- a/doc/controllers/custom-fields.md
+++ b/doc/controllers/custom-fields.md
@@ -23,30 +23,20 @@ CustomFieldsController customFieldsController = client.getCustomFieldsController
# Create Metafields
-## Custom Fields: Metafield Intro
+Creates metafields on a Site for either the Subscriptions or Customers resource.
-**Advanced Billing refers to Custom Fields in the API documentation as metafields and metadata.** Within the Advanced Billing UI, metadata and metafields are grouped together under the umbrella of "Custom Fields." All of our UI-based documentation that references custom fields will not cite the terminology metafields or metadata.
+Metafields and their metadata are created in the Custom Fields configuration page on your Site. Metafields can be populated with metadata when you create them or later with the [Update Metafield](../../doc/controllers/custom-fields.md#update-metafield), [Create Metadata](../../doc/controllers/custom-fields.md#create-metadata), or [Update Metadata](../../doc/controllers/custom-fields.md#update-metadata) endpoints. The Create Metadata and Update Metadata endpoints allow you to add metafields and metadata values to a specific subscription or customer.
-+ **Metafield is the custom field**
-+ **Metadata is the data populating the custom field.**
+Each site is limited to 100 unique metafields per resource. This means you can have 100 metafields for Subscriptions and another 100 for Customers.
-Advanced Billing Metafields are used to add meaningful attributes to subscription and customer resources. Full documentation on how to create Custom Fields in the Advanced Billing UI can be located [here](https://maxio.zendesk.com/hc/en-us/sections/24266118312589-Custom-Fields). For additional documentation on how to record data within custom fields, please see our subscription-based documentation [here](https://maxio.zendesk.com/hc/en-us/articles/24251701302925-Subscription-Summary-Custom-Fields-Tab).
+> Note: After creating a metafield, the resource type cannot be modified.
-Metafield are the place where you will set up your resource to accept additional data. It is scoped to the site instead of a specific customer or subscription. Think of it as the key, and Metadata as the value on every record.
+In the UI and product documentation, metafields and metadata are called Custom Fields.
-## Create Metafields
+- Metafield is the custom field
+- Metadata is the data populating the custom field.
-Use this endpoint to create metafields for your Site. Metafields can be populated with metadata after the fact.
-
-Each site is limited to 100 unique Metafields (i.e. keys, or names) per resource. This means you can have 100 Metafields for Subscription and another 100 for Customer.
-
-### Metafields "On-the-Fly"
-
-It is possible to create Metafields “on the fly” when you create your Metadata – if a non-existent name is passed when creating Metadata, a Metafield for that key will be automatically created. The Metafield API, however, gives you more control over your “keys”.
-
-### Metafield Scope Warning
-
-If configuring metafields in the Admin UI or via the API, be careful sending updates to metafields with the scope attribute – **if a partial update is sent it will overwrite the current configuration**.
+See [Custom Fields Reference](https://docs.maxio.com/hc/en-us/articles/24266140850573-Custom-Fields-Reference) and [Custom Fields Tab](https://maxio.zendesk.com/hc/en-us/articles/24251701302925-Subscription-Summary-Custom-Fields-Tab) for information on using Custom Fields in the Advanced Billing UI.
```java
List createMetafields(
@@ -58,7 +48,7 @@ List createMetafields(
| Parameter | Type | Tags | Description |
| --- | --- | --- | --- |
-| `resourceType` | [`ResourceType`](../../doc/models/resource-type.md) | Template, Required | the resource type to which the metafields belong |
+| `resourceType` | [`ResourceType`](../../doc/models/resource-type.md) | Template, Required | The resource type to which the metafields belong. |
| `body` | [`CreateMetafieldsRequest`](../../doc/models/create-metafields-request.md) | Body, Optional | - |
## Response Type
@@ -74,8 +64,10 @@ CreateMetafieldsRequest body = new CreateMetafieldsRequest.Builder(
new CreateMetafield.Builder()
.name("Dropdown field")
.scope(new MetafieldScope.Builder()
- .publicShow(IncludeOption.INCLUDE)
- .publicEdit(IncludeOption.INCLUDE)
+ .csv(IncludeOption.EXCLUDE)
+ .invoices(IncludeOption.EXCLUDE)
+ .statements(IncludeOption.EXCLUDE)
+ .portal(IncludeOption.INCLUDE)
.build())
.inputType(MetafieldInput.DROPDOWN)
.mEnum(Arrays.asList(
@@ -137,7 +129,7 @@ try {
# List Metafields
-This endpoint lists metafields associated with a site. The metafield description and usage is contained in the response.
+Lists the metafields and their associated details for a Site and resource type. You can filter the request to a specific metafield.
```java
ListMetafieldsResponse listMetafields(
@@ -148,8 +140,8 @@ ListMetafieldsResponse listMetafields(
| Parameter | Type | Tags | Description |
| --- | --- | --- | --- |
-| `resourceType` | [`ResourceType`](../../doc/models/resource-type.md) | Template, Required | the resource type to which the metafields belong |
-| `name` | `String` | Query, Optional | filter by the name of the metafield |
+| `resourceType` | [`ResourceType`](../../doc/models/resource-type.md) | Template, Required | The resource type to which the metafields belong. |
+| `name` | `String` | Query, Optional | Filter by the name of the metafield. |
| `page` | `Integer` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.
**Default**: `1`
**Constraints**: `>= 1` |
| `perPage` | `Integer` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`.
**Default**: `20`
**Constraints**: `<= 200` |
| `direction` | [`SortingDirection`](../../doc/models/sorting-direction.md) | Query, Optional | Controls the order in which results are returned.
Use in query `direction=asc`. |
@@ -164,7 +156,7 @@ ListMetafieldsResponse listMetafields(
ListMetafieldsInput listMetafieldsInput = new ListMetafieldsInput.Builder(
ResourceType.SUBSCRIPTIONS
)
-.page(2)
+.page(1)
.perPage(50)
.build();
@@ -182,10 +174,10 @@ try {
```json
{
- "total_count": 0,
- "current_page": 0,
+ "total_count": 1,
+ "current_page": 1,
"total_pages": 0,
- "per_page": 0,
+ "per_page": 50,
"metafields": [
{
"id": 0,
@@ -209,7 +201,33 @@ try {
# Update Metafield
-Use the following method to update metafields for your Site. Metafields can be populated with metadata after the fact.
+Updates metafields on your Site for a resource type. Depending on the request structure, you can update or add metafields and metadata to the Subscriptions or Customers resource.
+
+With this endpoint, you can:
+
+- Add metafields. If the metafield specified in current_name does not exist, a new metafield is added.
+
+ > Note: Each site is limited to 100 unique metafields per resource. This means you can have 100 metafields for Subscriptions and another 100 for Customers.
+
+- Change the name of a metafield.
+
+ > Note: To keep the metafield name the same and only update the metadata for the metafield, you must use the current metafield name in both the `current_name` and `name` parameters.
+
+- Change the input type for the metafield. For example, you can change a metafield input type from text to a dropdown. If you change the input type from text to a dropdown or radio, you must update the specific subscriptions or customers where the metafield was used to reflect the updated metafield and metadata.
+
+- Add metadata values to the existing metadata for a dropdown or radio metafield.
+
+ > Note: Updates to metadata overwrite. To add one or more values, you must specify all metadata values including the new value you want to add.
+
+- Add new metadata to a dropdown or radio for a metafield that was created without metadata.
+
+- Remove metadata for a dropdown or radio for a metafield.
+
+ > Note: Updates to metadata overwrite existing values. To remove one or more values, specify all metadata values except those you want to remove.
+
+- Add or update scope settings for a metafield.
+
+ > Note: Scope changes overwrite existing settings. You must specify the complete scope, including the changes you want to make.
```java
List updateMetafield(
@@ -221,7 +239,7 @@ List updateMetafield(
| Parameter | Type | Tags | Description |
| --- | --- | --- | --- |
-| `resourceType` | [`ResourceType`](../../doc/models/resource-type.md) | Template, Required | the resource type to which the metafields belong |
+| `resourceType` | [`ResourceType`](../../doc/models/resource-type.md) | Template, Required | The resource type to which the metafields belong. |
| `body` | [`UpdateMetafieldsRequest`](../../doc/models/update-metafields-request.md) | Body, Optional | - |
## Response Type
@@ -251,9 +269,7 @@ try {
# Delete Metafield
-Use the following method to delete a metafield. This will remove the metafield from the Site.
-
-Additionally, this will remove the metafield and associated metadata with all Subscriptions on the Site.
+Deletes a metafield from your Site. Removes the metafield and associated metadata from all Subscriptions or Customers resources on the Site.
```java
Void deleteMetafield(
@@ -265,7 +281,7 @@ Void deleteMetafield(
| Parameter | Type | Tags | Description |
| --- | --- | --- | --- |
-| `resourceType` | [`ResourceType`](../../doc/models/resource-type.md) | Template, Required | the resource type to which the metafields belong |
+| `resourceType` | [`ResourceType`](../../doc/models/resource-type.md) | Template, Required | The resource type to which the metafields belong. |
| `name` | `String` | Query, Optional | The name of the metafield to be deleted |
## Response Type
@@ -295,28 +311,11 @@ try {
# Create Metadata
-## Custom Fields: Metadata Intro
+Creates metadata and metafields for a specific subscription or customer, or updates metadata values of existing metafields for a subscription or customer. Metadata values are limited to 2 KB in size.
-**Advanced Billing refers to Custom Fields in the API documentation as metafields and metadata.** Within the Advanced Billing UI, metadata and metafields are grouped together under the umbrella of "Custom Fields." All of our UI-based documentation that references custom fields will not cite the terminology metafields or metadata.
+If you create metadata on a subscription or customer with a metafield that does not already exist, the metafield is created with the metadata you specify and it is always added as a text field. You can update the input_type for the metafield with the [Update Metafield](../../doc/controllers/custom-fields.md#update-metafield) endpoint.
-+ **Metafield is the custom field**
-+ **Metadata is the data populating the custom field.**
-
-Advanced Billing Metafields are used to add meaningful attributes to subscription and customer resources. Full documentation on how to create Custom Fields in the Advanced Billing UI can be located [here](https://maxio.zendesk.com/hc/en-us/articles/24266164865677-Custom-Fields-Overview). For additional documentation on how to record data within custom fields, please see our subscription-based documentation [here.](https://maxio.zendesk.com/hc/en-us/articles/24251701302925-Subscription-Summary-Custom-Fields-Tab)
-
-Metadata is associated to a customer or subscription, and corresponds to a Metafield. When creating a new metadata object for a given record, **if the metafield is not present it will be created**.
-
-## Metadata limits
-
-Metadata values are limited to 2kB in size. Additonally, there are limits on the number of unique metafields available per resource.
-
-## Create Metadata
-
-This method will create a metafield for the site on the fly if it does not already exist, and populate the metadata value.
-
-### Subscription or Customer Resource
-
-Please pay special attention to the resource you use when creating metadata.
+> Note: Each site is limited to 100 unique metafields per resource. This means you can have 100 metafields for Subscriptions and another 100 for Customers.
```java
List createMetadata(
@@ -329,7 +328,7 @@ List createMetadata(
| Parameter | Type | Tags | Description |
| --- | --- | --- | --- |
-| `resourceType` | [`ResourceType`](../../doc/models/resource-type.md) | Template, Required | the resource type to which the metafields belong |
+| `resourceType` | [`ResourceType`](../../doc/models/resource-type.md) | Template, Required | The resource type to which the metafields belong. |
| `resourceId` | `int` | Template, Required | The Advanced Billing id of the customer or the subscription for which the metadata applies |
| `body` | [`CreateMetadataRequest`](../../doc/models/create-metadata-request.md) | Body, Optional | - |
@@ -375,11 +374,7 @@ try {
# List Metadata
-This request will list all of the metadata belonging to a particular resource (ie. subscription, customer) that is specified.
-
-## Metadata Data
-
-This endpoint will also display the current stats of your metadata to use as a tool for pagination.
+Lists metadata and metafields for a specific customer or subscription.
```java
PaginatedMetadata listMetadata(
@@ -390,7 +385,7 @@ PaginatedMetadata listMetadata(
| Parameter | Type | Tags | Description |
| --- | --- | --- | --- |
-| `resourceType` | [`ResourceType`](../../doc/models/resource-type.md) | Template, Required | the resource type to which the metafields belong |
+| `resourceType` | [`ResourceType`](../../doc/models/resource-type.md) | Template, Required | The resource type to which the metafields belong. |
| `resourceId` | `int` | Template, Required | The Advanced Billing id of the customer or the subscription for which the metadata applies |
| `page` | `Integer` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.
**Default**: `1`
**Constraints**: `>= 1` |
| `perPage` | `Integer` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`.
**Default**: `20`
**Constraints**: `<= 200` |
@@ -406,7 +401,7 @@ ListMetadataInput listMetadataInput = new ListMetadataInput.Builder(
ResourceType.SUBSCRIPTIONS,
60
)
-.page(2)
+.page(1)
.perPage(50)
.build();
@@ -420,10 +415,35 @@ try {
}
```
+## Example Response *(as JSON)*
+
+```json
+{
+ "total_count": 1,
+ "current_page": 1,
+ "total_pages": 1,
+ "per_page": 50,
+ "metadata": [
+ {
+ "id": 77889911,
+ "value": "green",
+ "resource_id": 1234567,
+ "metafield_id": 112233,
+ "deleted_at": null,
+ "name": "Color"
+ }
+ ]
+}
+```
+
# Update Metadata
-This method allows you to update the existing metadata associated with a subscription or customer.
+Updates metadata and metafields on the Site and the customer or subscription specified, and updates the metadata value on a subscription or customer.
+
+If you update metadata on a subscription or customer with a metafield that does not already exist, the metafield is created with the metadata you specify and it is always added as a text field to the Site and to the subscription or customer you specify. You can update the input_type for the metafield with the Update Metafield endpoint.
+
+Each site is limited to 100 unique metafields per resource. This means you can have 100 metafields for Subscription and another 100 for Customer.
```java
List updateMetadata(
@@ -436,7 +456,7 @@ List updateMetadata(
| Parameter | Type | Tags | Description |
| --- | --- | --- | --- |
-| `resourceType` | [`ResourceType`](../../doc/models/resource-type.md) | Template, Required | the resource type to which the metafields belong |
+| `resourceType` | [`ResourceType`](../../doc/models/resource-type.md) | Template, Required | The resource type to which the metafields belong. |
| `resourceId` | `int` | Template, Required | The Advanced Billing id of the customer or the subscription for which the metadata applies |
| `body` | [`UpdateMetadataRequest`](../../doc/models/update-metadata-request.md) | Body, Optional | - |
@@ -468,29 +488,7 @@ try {
# Delete Metadata
-This method removes the metadata from the subscriber/customer cited.
-
-## Query String Usage
-
-For instance if you wanted to delete the metadata for customer 99 named weight you would request:
-
-```
-https://acme.chargify.com/customers/99/metadata.json?name=weight
-```
-
-If you want to delete multiple metadata fields for a customer 99 named: `weight` and `age` you wrould request:
-
-```
-https://acme.chargify.com/customers/99/metadata.json?names[]=weight&names[]=age
-```
-
-## Successful Response
-
-For a success, there will be a code `200` and the plain text response `true`.
-
-## Unsuccessful Response
-
-When a failed response is encountered, you will receive a `404` response and the plain text response of `true`.
+Deletes one or more metafields (and associated metadata) from the specified subscription or customer.
```java
Void deleteMetadata(
@@ -504,7 +502,7 @@ Void deleteMetadata(
| Parameter | Type | Tags | Description |
| --- | --- | --- | --- |
-| `resourceType` | [`ResourceType`](../../doc/models/resource-type.md) | Template, Required | the resource type to which the metafields belong |
+| `resourceType` | [`ResourceType`](../../doc/models/resource-type.md) | Template, Required | The resource type to which the metafields belong. |
| `resourceId` | `int` | Template, Required | The Advanced Billing id of the customer or the subscription for which the metadata applies |
| `name` | `String` | Query, Optional | Name of field to be removed. |
| `names` | `List` | Query, Optional | Names of fields to be removed. Use in query: `names[]=field1&names[]=my-field&names[]=another-field`. |
@@ -536,19 +534,7 @@ try {
# List Metadata for Resource Type
-This method will provide you information on usage of metadata across your selected resource (ie. subscriptions, customers)
-
-## Metadata Data
-
-This endpoint will also display the current stats of your metadata to use as a tool for pagination.
-
-### Metadata for multiple records
-
-`https://acme.chargify.com/subscriptions/metadata.json?resource_ids[]=1&resource_ids[]=2`
-
-## Read Metadata for a Site
-
-This endpoint will list the number of pages of metadata information that are contained within a site.
+Lists metadata for a specified array of subscriptions or customers.
```java
PaginatedMetadata listMetadataForResourceType(
@@ -559,7 +545,7 @@ PaginatedMetadata listMetadataForResourceType(
| Parameter | Type | Tags | Description |
| --- | --- | --- | --- |
-| `resourceType` | [`ResourceType`](../../doc/models/resource-type.md) | Template, Required | the resource type to which the metafields belong |
+| `resourceType` | [`ResourceType`](../../doc/models/resource-type.md) | Template, Required | The resource type to which the metafields belong. |
| `page` | `Integer` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.
**Default**: `1`
**Constraints**: `>= 1` |
| `perPage` | `Integer` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`.
**Default**: `20`
**Constraints**: `<= 200` |
| `dateField` | [`BasicDateField`](../../doc/models/basic-date-field.md) | Query, Optional | The type of filter you would like to apply to your search. |
@@ -581,7 +567,7 @@ PaginatedMetadata listMetadataForResourceType(
ListMetadataForResourceTypeInput listMetadataForResourceTypeInput = new ListMetadataForResourceTypeInput.Builder(
ResourceType.SUBSCRIPTIONS
)
-.page(2)
+.page(1)
.perPage(50)
.dateField(BasicDateField.UPDATED_AT)
.build();
diff --git a/doc/controllers/customers.md b/doc/controllers/customers.md
index 4e216d75..2096d39b 100644
--- a/doc/controllers/customers.md
+++ b/doc/controllers/customers.md
@@ -31,7 +31,7 @@ Full documentation on how to locate, create and edit Customers in the Advanced B
Advanced Billing requires that you use the ISO Standard Country codes when formatting country attribute of the customer.
-Countries should be formatted as 2 characters. For more information, please see the following wikipedia article on [ISO_3166-1.](http://en.wikipedia.org/wiki/ISO_3166-1#Current_codes)
+Countries should be formatted as 2 characters. For more information, see the following wikipedia article on [ISO_3166-1.](http://en.wikipedia.org/wiki/ISO_3166-1#Current_codes)
## Required State Format
@@ -39,7 +39,7 @@ Advanced Billing requires that you use the ISO Standard State codes when formatt
+ US States (2 characters): [ISO_3166-2](https://en.wikipedia.org/wiki/ISO_3166-2:US)
-+ States Outside the US (2-3 characters): To find the correct state codes outside of the US, please go to [ISO_3166-1](http://en.wikipedia.org/wiki/ISO_3166-1#Current_codes) and click on the link in the “ISO 3166-2 codes” column next to country you wish to populate.
++ States Outside the US (2-3 characters): To find the correct state codes outside of the US, go to [ISO_3166-1](http://en.wikipedia.org/wiki/ISO_3166-1#Current_codes) and click on the link in the “ISO 3166-2 codes” column next to country you wish to populate.
## Locale
@@ -153,7 +153,7 @@ Common use cases are:
+ Search by a reference value from your application
+ Search by a first or last name
-To retrieve a single, exact match by reference, please use the [lookup endpoint](https://developers.chargify.com/docs/api-docs/b710d8fbef104-read-customer-by-reference).
+To retrieve a single, exact match by reference, use the [lookup endpoint](https://developers.chargify.com/docs/api-docs/b710d8fbef104-read-customer-by-reference).
```java
List listCustomers(
@@ -182,7 +182,7 @@ List listCustomers(
```java
ListCustomersInput listCustomersInput = new ListCustomersInput.Builder()
- .page(2)
+ .page(1)
.perPage(30)
.dateField(BasicDateField.UPDATED_AT)
.build();
diff --git a/doc/controllers/events-based-billing-segments.md b/doc/controllers/events-based-billing-segments.md
index 17b841f8..dcaf4699 100644
--- a/doc/controllers/events-based-billing-segments.md
+++ b/doc/controllers/events-based-billing-segments.md
@@ -131,7 +131,7 @@ ListSegmentsForPricePointInput listSegmentsForPricePointInput = new ListSegments
"component_id8",
"price_point_id8"
)
-.page(2)
+.page(1)
.perPage(50)
.filter(new ListSegmentsFilter.Builder()
.segmentProperty1Value("EU")
diff --git a/doc/controllers/events.md b/doc/controllers/events.md
index d9431561..6c77156e 100644
--- a/doc/controllers/events.md
+++ b/doc/controllers/events.md
@@ -115,7 +115,7 @@ List listEvents(
```java
ListEventsInput listEventsInput = new ListEventsInput.Builder()
- .page(2)
+ .page(1)
.perPage(50)
.direction(Direction.DESC)
.filter(Arrays.asList(
@@ -239,7 +239,7 @@ List listSubscriptionEvents(
ListSubscriptionEventsInput listSubscriptionEventsInput = new ListSubscriptionEventsInput.Builder(
222
)
-.page(2)
+.page(1)
.perPage(50)
.direction(Direction.DESC)
.filter(Arrays.asList(
@@ -330,7 +330,7 @@ CountResponse readEventsCount(
```java
ReadEventsCountInput readEventsCountInput = new ReadEventsCountInput.Builder()
- .page(2)
+ .page(1)
.perPage(50)
.direction(Direction.DESC)
.filter(Arrays.asList(
diff --git a/doc/controllers/insights.md b/doc/controllers/insights.md
index 4d7b96d2..0d3d6e84 100644
--- a/doc/controllers/insights.md
+++ b/doc/controllers/insights.md
@@ -177,7 +177,7 @@ ListMRRResponse listMrrMovements(
```java
ListMrrMovementsInput listMrrMovementsInput = new ListMrrMovementsInput.Builder()
- .page(2)
+ .page(1)
.perPage(20)
.build();
@@ -281,7 +281,7 @@ ListMrrPerSubscriptionInput listMrrPerSubscriptionInput = new ListMrrPerSubscrip
))
.build())
.atTime("at_time=2022-01-10T10:00:00-05:00")
- .page(2)
+ .page(1)
.perPage(50)
.direction(Direction.DESC)
.build();
diff --git a/doc/controllers/invoices.md b/doc/controllers/invoices.md
index 619ce854..ee59294c 100644
--- a/doc/controllers/invoices.md
+++ b/doc/controllers/invoices.md
@@ -137,7 +137,7 @@ ListInvoicesResponse listInvoices(
```java
ListInvoicesInput listInvoicesInput = new ListInvoicesInput.Builder()
- .page(2)
+ .page(1)
.perPage(50)
.direction(Direction.DESC)
.lineItems(false)
@@ -218,7 +218,7 @@ try {
"organization": "",
"email": "meg@example.com"
},
- "memo": "Please pay within 15 days.",
+ "memo": "Payment due within 15 days of receipt.",
"billing_address": {
"street": "123 I Love Cats Way",
"line2": "",
@@ -284,7 +284,7 @@ try {
"organization": "",
"email": "food@example.com"
},
- "memo": "Please pay within 15 days.",
+ "memo": "Payment due within 15 days of receipt.",
"billing_address": {
"street": "",
"line2": "",
@@ -350,7 +350,7 @@ try {
"organization": "123",
"email": "example@example.com"
},
- "memo": "Please pay within 15 days.",
+ "memo": "Payment due within 15 days of receipt.",
"billing_address": {
"street": "123 Anywhere Street",
"line2": "",
@@ -416,7 +416,7 @@ try {
"organization": "",
"email": "example@example.com"
},
- "memo": "Please pay within 15 days.",
+ "memo": "Payment due within 15 days of receipt.",
"billing_address": {
"street": "123 I Love Cats Way",
"line2": "",
@@ -537,7 +537,7 @@ try {
"organization": null,
"email": "joe@example.com"
},
- "memo": "Please pay within 15 days.",
+ "memo": "Payment due within 15 days of receipt.",
"billing_address": {
"street": null,
"line2": null,
@@ -657,7 +657,7 @@ ListInvoiceEventsResponse listInvoiceEvents(
```java
ListInvoiceEventsInput listInvoiceEventsInput = new ListInvoiceEventsInput.Builder()
- .page(2)
+ .page(1)
.perPage(100)
.build();
@@ -1254,7 +1254,7 @@ ListCreditNotesResponse listCreditNotes(
```java
ListCreditNotesInput listCreditNotesInput = new ListCreditNotesInput.Builder()
- .page(2)
+ .page(1)
.perPage(50)
.lineItems(false)
.discounts(false)
@@ -2132,7 +2132,7 @@ ConsolidatedInvoice listConsolidatedInvoiceSegments(
ListConsolidatedInvoiceSegmentsInput listConsolidatedInvoiceSegmentsInput = new ListConsolidatedInvoiceSegmentsInput.Builder(
"invoice_uid0"
)
-.page(2)
+.page(1)
.perPage(50)
.direction(Direction.ASC)
.build();
@@ -2191,7 +2191,7 @@ try {
"organization": "",
"email": "meg@example.com"
},
- "memo": "Please pay within 15 days.",
+ "memo": "Payment due within 15 days of receipt.",
"billing_address": {
"street": "123 I Love Cats Way",
"line2": "",
@@ -2257,7 +2257,7 @@ try {
"organization": "",
"email": "food@example.com"
},
- "memo": "Please pay within 15 days.",
+ "memo": "Payment due within 15 days of receipt.",
"billing_address": {
"street": "",
"line2": "",
@@ -2323,7 +2323,7 @@ try {
"organization": "123",
"email": "example@example.com"
},
- "memo": "Please pay within 15 days.",
+ "memo": "Payment due within 15 days of receipt.",
"billing_address": {
"street": "123 Anywhere Street",
"line2": "",
@@ -2389,7 +2389,7 @@ try {
"organization": "",
"email": "example@example.com"
},
- "memo": "Please pay within 15 days.",
+ "memo": "Payment due within 15 days of receipt.",
"billing_address": {
"street": "123 I Love Cats Way",
"line2": "",
@@ -2514,6 +2514,42 @@ If You want to use existing coupon for discount creation, only `code` and option
...
```
+#### Using Coupon Subcodes
+
+You can also use coupon subcodes to apply existing coupons with specific subcodes:
+
+```json
+...
+ "coupons": [
+ {
+ "subcode": "SUB1",
+ "product_family_id": 1
+ }
+ ]
+...
+```
+
+**Important:** You cannot specify both `code` and `subcode` for the same coupon. Use either:
+
+- `code` to apply a main coupon
+- `subcode` to apply a specific coupon subcode
+
+The API response will include both the main coupon code and the subcode used:
+
+```json
+...
+ "coupons": [
+ {
+ "code": "MAIN123",
+ "subcode": "SUB1",
+ "product_family_id": 1,
+ "percentage": 10,
+ "description": "Special discount"
+ }
+ ]
+...
+```
+
### Coupon options
#### Code
@@ -2522,6 +2558,10 @@ Coupon `code` will be displayed on invoice discount section.
Coupon code can only contain uppercase letters, numbers, and allowed special characters.
Lowercase letters will be converted to uppercase. It can be used to select an existing coupon from the catalog, or as an ad hoc coupon when passed with `percentage` or `amount`.
+#### Subcode
+
+Coupon `subcode` allows you to apply existing coupons using their subcodes. When a subcode is used, the API response will include both the main coupon code and the specific subcode that was applied. Subcodes are case-insensitive and will be converted to uppercase automatically.
+
#### Percentage
Coupon `percentage` can take values from 0 to 100 and up to 4 decimal places. It cannot be used with `amount`. Only for ad hoc coupons, will be ignored if `code` is used to select an existing coupon from the catalog.
@@ -2581,7 +2621,7 @@ By default, invoices will be created with a due date matching the date of invoic
#### Addresses
-The seller, shipping and billing addresses can be sent to override the site's defaults. Each address requires to send a `first_name` at a minimum in order to work. Please see below for the details on which parameters can be sent for each address object.
+The seller, shipping and billing addresses can be sent to override the site's defaults. Each address requires to send a `first_name` at a minimum in order to work. See below for the details on which parameters can be sent for each address object.
#### Memo and Payment Instructions
@@ -2747,9 +2787,9 @@ try {
This endpoint allows for invoices to be programmatically delivered via email. This endpoint supports the delivery of both ad-hoc and automatically generated invoices. Additionally, this endpoint supports email delivery to direct recipients, carbon-copy (cc) recipients, and blind carbon-copy (bcc) recipients.
-Please note that if no recipient email addresses are specified in the request, then the subscription's default email configuration will be used. For example, if `recipient_emails` is left blank, then the invoice will be delivered to the subscription's customer email address.
+If no recipient email addresses are specified in the request, then the subscription's default email configuration will be used. For example, if `recipient_emails` is left blank, then the invoice will be delivered to the subscription's customer email address.
-On success, a 204 no-content response will be returned. Please note that this does not indicate that email(s) have been delivered, but instead indicates that emails have been successfully queued for delivery. If _any_ invalid or malformed email address is found in the request body, the entire request will be rejected and a 422 response will be returned.
+On success, a 204 no-content response will be returned. The response does not indicate that email(s) have been delivered, but instead indicates that emails have been successfully queued for delivery. If _any_ invalid or malformed email address is found in the request body, the entire request will be rejected and a 422 response will be returned.
```java
Void sendInvoice(
diff --git a/doc/controllers/offers.md b/doc/controllers/offers.md
index 9c7cf3bc..a08a0cc2 100644
--- a/doc/controllers/offers.md
+++ b/doc/controllers/offers.md
@@ -156,7 +156,7 @@ ListOffersResponse listOffers(
```java
ListOffersInput listOffersInput = new ListOffersInput.Builder()
- .page(2)
+ .page(1)
.perPage(50)
.includeArchived(true)
.build();
diff --git a/doc/controllers/payment-profiles.md b/doc/controllers/payment-profiles.md
index cc948917..4395df63 100644
--- a/doc/controllers/payment-profiles.md
+++ b/doc/controllers/payment-profiles.md
@@ -26,236 +26,37 @@ PaymentProfilesController paymentProfilesController = client.getPaymentProfilesC
# Create Payment Profile
-Use this endpoint to create a payment profile for a customer.
+Creates a payment profile for a customer.
-Payment Profiles house the credit card, ACH (Authorize.Net or Stripe only,) or PayPal (Braintree only,) data for a customer. The payment information is attached to the customer within Advanced Billing, as opposed to the Subscription itself.
+When you create a new payment profile for a customer via the API, it does not automatically make the profile current for any of the customer’s subscriptions. To use the payment profile as the default, you must set it explicitly for the subscription or subscription group.
-You must include a customer_id so that Advanced Billing will attach it to the customer entry. If no customer_id is included the API will return a 404.
+Select an option from the **Request Examples** drop-down on the right side of the portal to see examples of common scenarios for creating payment profiles.
-## Create a Payment Profile for ACH usage
+Do not use real card information for testing. See the Sites articles that cover [testing your site setup](https://docs.maxio.com/hc/en-us/articles/24250712113165-Testing-Overview#testing-overview-0-0) for more details on testing in your sandbox.
-If you would like to create a payment method that is a Bank Account applicable for ACH payments use the following:
+Note that collecting and sending raw card details in production requires [PCI compliance](https://docs.maxio.com/hc/en-us/articles/24183956938381-PCI-Compliance#pci-compliance-0-0) on your end. If your business is not PCI compliant, use [Chargify.js](https://docs.maxio.com/hc/en-us/articles/38163190843789-Chargify-js-Overview#chargify-js-overview-0-0) to collect credit card or bank account information.
-```json
-{
-"payment_profile": {
- "customer_id": [Valid-Customer-ID],
- "bank_name": "Best Bank",
- "bank_routing_number": "021000089",
- "bank_account_number": "111111111111",
- "bank_account_type": "checking",
- "bank_account_holder_type": "business",
- "payment_type": "bank_account"
- }
-}
-```
-
-## Taxable Subscriptions
-
-If your subscriber pays taxes on their purchased product, and you are attempting to create or update the `payment_profile`, complete address information is required. For information on required address formatting to allow your subscriber to be taxed, please see our documentation [here](https://developers.chargify.com/docs/developer-docs/d2e9e34db740e-signups#taxes)
-
-## Payment Profile Documentation
-
-Full documentation on how Payment Profiles operate within Advanced Billing can be located under the following links:
+See the following articles to learn more about subscriptions and payments:
+ [Subscriber Payment Details](https://maxio.zendesk.com/hc/en-us/articles/24251599929613-Subscription-Summary-Payment-Details-Tab)
+ [Self Service Pages](https://maxio.zendesk.com/hc/en-us/articles/24261425318541-Self-Service-Pages) (Allows credit card updates by Subscriber)
+ [Public Signup Pages payment settings](https://maxio.zendesk.com/hc/en-us/articles/24261368332557-Individual-Page-Settings)
-
-## Create a Payment Profile with a Chargify.js token
-
-```json
-{
- "payment_profile": {
- "customer_id": 1036,
- "chargify_token": "tok_w68qcpnftyv53jk33jv6wk3w"
- }
-}
-```
-
-## Active Payment Methods
-
-Creating a new payment profile for a Customer via the API will not make that Payment Profile current for any of the Customer’s Subscriptions. In order to utilize the payment profile as the default, it must be set as the default payment profile for the subscription or subscription group.
-
-## Requirements
-
-Either the full_number, expiration_month, and expiration_year or if you have an existing vault_token from your gateway, that vault_token and the current_vault are required.
-Passing in the vault_token and current_vault are only allowed when creating a new payment profile.
-
-### Taxable Subscriptions
-
-If your subscriber pays taxes on their purchased product, and you are attempting to create or update the `payment_profile`, complete address information is required. For information on required address formatting to allow your subscriber to be taxed, please see our documentation [here](https://developers.chargify.com/docs/developer-docs/d2e9e34db740e-signups#taxes)
-
-## BraintreeBlue
-
-Some merchants use Braintree JavaScript libraries directly and then pass `payment_method_nonce` and/or `paypal_email` to create a payment profile. This implementation is deprecated and does not handle 3D Secure. Instead, we have provided [Chargify.js](https://developers.chargify.com/docs/developer-docs/ZG9jOjE0NjAzNDI0-overview) which is continuously improved and supports Credit Cards (along with 3D Secure), PayPal and ApplePay payment types.
-
-## GoCardless
-
-For more information on GoCardless, please view the following resources:
-
++ [Taxes](https://developers.chargify.com/docs/developer-docs/d2e9e34db740e-signups#taxes)
++ [Chargify.js](https://docs.maxio.com/hc/en-us/articles/38163190843789-Chargify-js-Overview)
+ + [Chargify.js with GoCardless - minimal example](https://docs.maxio.com/hc/en-us/articles/38206331271693-Examples#h_01K0PJ15QQZKCER8CFK40MR6XJ)
+ + [Chargify.js with GoCardless - full example](https://docs.maxio.com/hc/en-us/articles/38206331271693-Examples#h_01K0PJ15QR09JVHWW0MCA7HVJV)
+ + [Chargify.js with Stripe Direct Debit - minimal example](https://docs.maxio.com/hc/en-us/articles/38206331271693-Examples#h_01K0PJ15QQFKKN8Z7B7DZ9AJS5)
+ + [Chargify.js with Stripe Direct Debit - full example](https://docs.maxio.com/hc/en-us/articles/38206331271693-Examples#h_01K0PJ15QRECQQ4ECS3ZA55GY7)
+ + [Chargify.js with Stripe BECS Direct Debit - minimal example](https://developers.chargify.com/docs/developer-docs/ZG9jOjE0NjAzNDIy-examples#minimal-example-with-sepa-or-becs-direct-debit-stripe-gateway)
+ + [Chargify.js with Stripe BECS Direct Debit - full example](https://developers.chargify.com/docs/developer-docs/ZG9jOjE0NjAzNDIy-examples#full-example-with-sepa-direct-debit-stripe-gateway)
+ [Full documentation on GoCardless](https://maxio.zendesk.com/hc/en-us/articles/24176159136909-GoCardless)
-
-+ [Using Chargify.js with GoCardless - minimal example](https://docs.maxio.com/hc/en-us/articles/38206331271693-Examples#h_01K0PJ15QQZKCER8CFK40MR6XJ)
-
-+ [Using Chargify.js with GoCardless - full example](https://docs.maxio.com/hc/en-us/articles/38206331271693-Examples#h_01K0PJ15QR09JVHWW0MCA7HVJV)
-
-### GoCardless with Local Bank Details
-
-Following examples create customer, bank account and mandate in GoCardless:
-
-```json
-{
- "payment_profile": {
- "customer_id": "Valid-Customer-ID",
- "bank_name": "Royal Bank of France",
- "bank_account_number": "0000000",
- "bank_routing_number": "0003",
- "bank_branch_code": "00006",
- "payment_type": "bank_account",
- "billing_address": "20 Place de la Gare",
- "billing_city": "Colombes",
- "billing_state": "Île-de-France",
- "billing_zip": "92700",
- "billing_country": "FR"
- }
-}
-```
-
-### GoCardless with IBAN
-
-```json
-{
- "payment_profile": {
- "customer_id": "24907598",
- "bank_name": "French Bank",
- "bank_iban": "FR1420041010050500013M02606",
- "payment_type": "bank_account",
- "billing_address": "20 Place de la Gare",
- "billing_city": "Colombes",
- "billing_state": "Île-de-France",
- "billing_zip": "92700",
- "billing_country": "FR"
- }
-}
-```
-
-### Importing GoCardless
-
-If the customer, bank account, and mandate already exist in GoCardless, a payment profile can be created by using the IDs. In order to create masked versions of `bank_account_number` and `bank_routing_number` that are used to display within Advanced Billing Admin UI, you can pass the last four digits for this fields which then will be saved in this form `XXXX[four-provided-digits]`.
-
-```json
-{
- "payment_profile": {
- "customer_id": "24907598",
- "customer_vault_token": [Existing GoCardless Customer ID]
- "vault_token": [Existing GoCardless Mandate ID],
- "current_vault": "gocardless",
- "bank_name": "French Bank",
- "bank_account_number": [Last Four Of The Existing Account Number or IBAN if applicable],
- "bank_routing_number": [Last Four Of The Existing Routing Number],
- "payment_type": "bank_account",
- "billing_address": "20 Place de la Gare",
- "billing_city": "Colombes",
- "billing_state": "Île-de-France",
- "billing_zip": "92700",
- "billing_country": "FR"
- }
-}
-```
-
-## SEPA Direct Debit
-
-For more information on Stripe SEPA Direct Debit, please view the following resources:
-
+ [Full documentation on Stripe SEPA Direct Debit](https://maxio.zendesk.com/hc/en-us/articles/24176170430093-Stripe-SEPA-and-BECS-Direct-Debit)
-
-+ [Using Chargify.js with Stripe Direct Debit - minimal example](https://docs.maxio.com/hc/en-us/articles/38206331271693-Examples#h_01K0PJ15QQFKKN8Z7B7DZ9AJS5)
-
-+ [Using Chargify.js with Stripe Direct Debit - full example](https://docs.maxio.com/hc/en-us/articles/38206331271693-Examples#h_01K0PJ15QRECQQ4ECS3ZA55GY7)
-
-### Stripe SEPA Direct Debit Payment Profiles
-
-The following example creates a customer, bank account and mandate in Stripe:
-
-```json
-{
- "payment_profile": {
- "customer_id": "24907598",
- "bank_name": "Deutsche bank",
- "bank_iban": "DE89370400440532013000",
- "payment_type": "bank_account",
- "billing_address": "Test",
- "billing_city": "Berlin",
- "billing_state": "Brandenburg",
- "billing_zip": "12345",
- "billing_country": "DE"
- }
-}
-```
-
-## Stripe BECS Direct Debit
-
-For more information on Stripe BECS Direct Debit, please view the following resources:
-
+ [Full documentation on Stripe BECS Direct Debit](https://maxio.zendesk.com/hc/en-us/articles/24176170430093-Stripe-SEPA-and-BECS-Direct-Debit)
-
-+ [Using Chargify.js with Stripe BECS Direct Debit - minimal example](https://developers.chargify.com/docs/developer-docs/ZG9jOjE0NjAzNDIy-examples#minimal-example-with-sepa-or-becs-direct-debit-stripe-gateway)
-
-+ [Using Chargify.js with Stripe BECS Direct Debit - full example](https://developers.chargify.com/docs/developer-docs/ZG9jOjE0NjAzNDIy-examples#full-example-with-sepa-direct-debit-stripe-gateway)
-
-### Stripe BECS Direct Debit Payment Profiles
-
-The following example creates a customer, bank account and mandate in Stripe:
-
-```json
-{
- "payment_profile": {
- "customer_id": "24907598",
- "bank_name": "Australian bank",
- "bank_branch_code": "000000",
- "bank_account_number": "000123456"
- "payment_type": "bank_account",
- "billing_address": "Test",
- "billing_city": "Stony Rise",
- "billing_state": "Tasmania",
- "billing_zip": "12345",
- "billing_country": "AU"
- }
-}
-```
-
-## Stripe BACS Direct Debit
-
-Contact the support team to enable this payment method.
-For more information on Stripe BACS Direct Debit, please view the following resources:
-
+ [Full documentation on Stripe BACS Direct Debit](https://maxio.zendesk.com/hc/en-us/articles/24176170430093-Stripe-SEPA-and-BECS-Direct-Debit)
-### Stripe BACS Direct Debit Payment Profiles
+## 3D Secure Authentication during payment profile creation.
-The following example creates a customer, bank account and mandate in Stripe:
-
-```json
-{
- "payment_profile": {
- "customer_id": "24907598",
- "bank_name": "British bank",
- "bank_branch_code": "108800",
- "bank_account_number": "00012345"
- "payment_type": "bank_account",
- "billing_address": "Test",
- "billing_city": "London",
- "billing_state": "LND",
- "billing_zip": "12345",
- "billing_country": "GB"
- }
-}
-```
-
-## 3D Secure - Checkout
-
-It may happen that a payment needs 3D Secure Authentication when the payment profile is created; this is referred to in our help docs as a [post-authentication flow](https://maxio.zendesk.com/hc/en-us/articles/24176278996493-Testing-Implementing-3D-Secure#psd2-flows-pre-authentication-and-post-authentication). The server returns `422 Unprocessable Entity` in this case with the following response:
+When a payment requires 3D Secure Authentication to adhear to Strong Customer Authentication (SCA) during payment profile creation, the request enters a [post-authentication flow](https://maxio.zendesk.com/hc/en-us/articles/24176278996493-Testing-Implementing-3D-Secure#psd2-flows-pre-authentication-and-post-authentication). In this case, a 422 Unprocessable Entity status is returned with the following response:
```json
{
@@ -275,29 +76,34 @@ It may happen that a payment needs 3D Secure Authentication when the payment pro
```
To let the customer go through 3D Secure Authentication, they need to be redirected to the URL specified in `action_link`.
-Optionally, you can specify `callback_url` parameter in the `action_link` URL if you’d like to be notified about the result of 3D Secure Authentication. The `callback_url` will return the following information:
+
+Optionally, you can specify the `callback_url` parameter in the `action_link` URL to receive notification about the result of 3D Secure Authentication.
+
+The `callback_url` will return the following information:
- whether the authentication was successful (`success`)
- the payment profile ID (`payment_profile_id`)
-Lastly, you can also specify a `redirect_url` parameter within the `action_link` URL if you’d like to redirect a customer back to your site.
+You can also specify a `redirect_url` parameter in the `action_link` URL to redirect the customer back to your site.
+
+You cannot use action_link in an iframe inside a custom application. You must redirect the customer directly to the `action_link` and use the `redirect_url` or `callback_url` to be notified of the result.
-It is not possible to use `action_link` in an iframe inside a custom application. You have to redirect the customer directly to the `action_link`, then, to be notified about the result, use `redirect_url` or `callback_url`.
+The final URL that you send a customer to complete 3D Secure may resemble the following, where the first half is the `action_link` and the second half contains a `redirect_url` and `callback_url`:
-The final URL that you send a customer to complete 3D Secure may resemble the following, where the first half is the `action_link` and the second half contains a `redirect_url` and `callback_url`: `https://checkout-test.chargifypay.test/3d-secure/checkout/pay_uerzhsxd5uhkbodx5jhvkg6yeu?one_time_token_id=93&callback_url=http://localhost:4000&redirect_url=https://yourpage.com`
+`https://checkout-test.chargifypay.test/3d-secure/checkout/pay_uerzhsxd5uhkbodx5jhvkg6yeu?one_time_token_id=93&callback_url=http://localhost:4000&redirect_url=https://yourpage.com`
### Example Redirect Flow
-You may wish to redirect customers to different pages depending on whether their SCA was performed successfully. Here's an example flow to use as a reference:
+Here's an example flow to redirect customers to different pages depending on whether SCA was performed successfully:
-1. Create a payment profile via API; it requires 3DS
-2. You receive a `action_link` in the response.
-3. Use this `action_link` to, for example, connect with your internal resources or generate a session_id
-4. Include 1 of those attributes inside the `callback_url` and `redirect_url` to be aware which “session” this applies to
+1. Create a payment profile via the API; it requires 3DS.
+2. You receive an `action_link` in the response.
+3. Use this `action_link` to, for example, connect with your internal resources or generate a `session_id`.
+4. Include one of those attributes inside the `callback_url` and `redirect_url` to be aware which “session” this applies to.
5. Redirect the customer to the `action_link` with `callback_url` and `redirect_url` applied
-6. After the customer finishes 3DS authentication, we let you know the result by making a request to applied `callback_url`.
-7. After that, we redirect the customer to the `redirect_url`; at this point the result of authentication is known
-8. Optionally, you can use the applied "msg" param in the `redirect_url` to determine whether it was successful or not
+6. After the customer completes 3DS authentication, we notify you of the result via the applied `callback_url`.
+7. After that, we redirect the customer to the `redirect_url`; at this point the result of authentication is known.
+8. Optionally, you can use the applied "msg" param in the `redirect_url` to determine if the redirect was successful.
```java
PaymentProfileResponse createPaymentProfile(
@@ -319,13 +125,8 @@ PaymentProfileResponse createPaymentProfile(
```java
CreatePaymentProfileRequest body = new CreatePaymentProfileRequest.Builder(
new CreatePaymentProfile.Builder()
- .paymentType(PaymentType.BANK_ACCOUNT)
- .customerId(123)
- .bankName("Best Bank")
- .bankRoutingNumber("021000089")
- .bankAccountNumber("111111111111")
- .bankAccountType(BankAccountType.CHECKING)
- .bankAccountHolderType(BankAccountHolderType.BUSINESS)
+ .chargifyToken("tok_w68qcpnftyv53jk33jv6wk3w")
+ .customerId(1036)
.build()
)
.build();
@@ -402,7 +203,7 @@ List listPaymentProfiles(
```java
ListPaymentProfilesInput listPaymentProfilesInput = new ListPaymentProfilesInput.Builder()
- .page(2)
+ .page(1)
.perPage(50)
.build();
@@ -484,7 +285,7 @@ try {
Using the GET method you can retrieve a Payment Profile identified by its unique ID.
-Please note that a different JSON object will be returned if the card method on file is a bank account.
+Note that a different JSON object will be returned if the card method on file is a bank account.
### Response for Bank Account
@@ -650,11 +451,6 @@ UpdatePaymentProfileRequest body = new UpdatePaymentProfileRequest.Builder(
new UpdatePaymentProfile.Builder()
.firstName("Graham")
.lastName("Test")
- .fullNumber("4111111111111111")
- .cardType(CardType.MASTER)
- .expirationMonth("04")
- .expirationYear("2030")
- .currentVault(AllVaults.BOGUS)
.billingAddress("456 Juniper Court")
.billingCity("Boulder")
.billingState("CO")
@@ -683,23 +479,13 @@ try {
"id": 10088716,
"first_name": "Test",
"last_name": "Subscription",
- "masked_card_number": "XXXX-XXXX-XXXX-1",
- "card_type": "bogus",
- "expiration_month": 1,
- "expiration_year": 2022,
- "customer_id": 14543792,
- "current_vault": "bogus",
- "vault_token": "1",
"billing_address": "123 Montana Way",
"billing_city": "Billings",
"billing_state": "MT",
"billing_zip": "59101",
"billing_country": "US",
- "customer_vault_token": null,
"billing_address_2": "",
- "payment_type": "credit_card",
- "site_gateway_setting_id": 1,
- "gateway_handle": null
+ "payment_type": "bank_account"
}
}
```
@@ -845,8 +631,8 @@ try {
{
"payment_profile": {
"id": 10089892,
- "first_name": "Chester",
- "last_name": "Tester",
+ "first_name": "John",
+ "last_name": "Doe",
"customer_id": 14543792,
"current_vault": "stripe_connect",
"vault_token": "cus_0123abc456def",
diff --git a/doc/controllers/product-families.md b/doc/controllers/product-families.md
index 14414516..26495f47 100644
--- a/doc/controllers/product-families.md
+++ b/doc/controllers/product-families.md
@@ -18,7 +18,7 @@ ProductFamiliesController productFamiliesController = client.getProductFamiliesC
# List Products for Product Family
-This method allows to retrieve a list of Products belonging to a Product Family.
+Retrieves a list of Products belonging to a Product Family.
```java
List listProductsForProductFamily(
@@ -51,7 +51,7 @@ List listProductsForProductFamily(
ListProductsForProductFamilyInput listProductsForProductFamilyInput = new ListProductsForProductFamilyInput.Builder(
"product_family_id4"
)
-.page(2)
+.page(1)
.perPage(50)
.dateField(BasicDateField.UPDATED_AT)
.filter(new ListProductsFilter.Builder()
@@ -182,7 +182,7 @@ try {
# Create Product Family
-This method will create a Product Family within your Advanced Billing site. Create a Product Family to act as a container for your products, components and coupons.
+Creates a Product Family within your Advanced Billing site. Create a Product Family to act as a container for your products, components and coupons.
Full documentation on how Product Families operate within the Advanced Billing UI can be located [here](https://maxio.zendesk.com/hc/en-us/articles/24261098936205-Product-Families).
@@ -246,7 +246,7 @@ try {
# List Product Families
-This method allows to retrieve a list of Product Families for a site.
+Retrieve a list of Product Families for a site.
```java
List listProductFamilies(
@@ -316,7 +316,7 @@ try {
# Read Product Family
-This method allows to retrieve a Product Family via the `product_family_id`. The response will contain a Product Family object.
+Retrieves a Product Family via the `product_family_id`. The response will contain a Product Family object.
The product family can be specified either with the id number, or with the `handle:my-family` format.
diff --git a/doc/controllers/product-price-points.md b/doc/controllers/product-price-points.md
index 24761332..79bcec9d 100644
--- a/doc/controllers/product-price-points.md
+++ b/doc/controllers/product-price-points.md
@@ -25,7 +25,7 @@ ProductPricePointsController productPricePointsController = client.getProductPri
# Create Product Price Point
-[Product Price Point Documentation](https://maxio.zendesk.com/hc/en-us/articles/24261111947789-Product-Price-Points)
+Creates a Product Price Point. See the [Product Price Point](https://maxio.zendesk.com/hc/en-us/articles/24261111947789-Product-Price-Points) documentation for details.
```java
ProductPricePointResponse createProductPricePoint(
@@ -61,7 +61,7 @@ CreateProductPricePointRequest body = new CreateProductPricePointRequest.Builder
.trialPriceInCents(4900L)
.trialInterval(1)
.trialIntervalUnit(IntervalUnit.MONTH)
- .trialType("payment_expected")
+ .trialType(TrialType.PAYMENT_EXPECTED)
.initialChargeInCents(120000L)
.initialChargeAfterTrial(false)
.expirationInterval(12)
@@ -116,7 +116,7 @@ try {
# List Product Price Points
-Use this endpoint to retrieve a list of product price points.
+Retrieves a list of product price points.
```java
ListProductPricePointsResponse listProductPricePoints(
@@ -146,7 +146,7 @@ ListProductPricePointsInput listProductPricePointsInput = new ListProductPricePo
124
)
)
-.page(2)
+.page(1)
.perPage(10)
.filterType(Liquid error: Value cannot be null. (Parameter 'key'))
.build();
@@ -193,9 +193,9 @@ try {
# Update Product Price Point
-Use this endpoint to update a product price point.
+Updates a product price point.
-Note: Custom product price points are not able to be updated.
+Note: Custom product price points cannot be updated.
```java
ProductPricePointResponse updateProductPricePoint(
@@ -344,7 +344,7 @@ try {
# Archive Product Price Point
-Use this endpoint to archive a product price point.
+Archives a product price point.
```java
ProductPricePointResponse archiveProductPricePoint(
@@ -484,9 +484,9 @@ try {
# Promote Product Price Point to Default
-Use this endpoint to make a product price point the default for the product.
+Sets a product price point as the default for the product.
-Note: Custom product price points are not able to be set as the default for a product.
+Note: Custom product price points cannot be set as the default for a product.
```java
ProductResponse promoteProductPricePointToDefault(
@@ -577,7 +577,7 @@ try {
# Bulk Create Product Price Points
-Use this endpoint to create multiple product price points in one request.
+Creates multiple product price points in one request.
```java
BulkCreateProductPricePointsResponse bulkCreateProductPricePoints(
@@ -612,7 +612,7 @@ BulkCreateProductPricePointsRequest body = new BulkCreateProductPricePointsReque
.trialPriceInCents(4900L)
.trialInterval(1)
.trialIntervalUnit(IntervalUnit.MONTH)
- .trialType("payment_expected")
+ .trialType(TrialType.PAYMENT_EXPECTED)
.initialChargeInCents(120000L)
.initialChargeAfterTrial(false)
.expirationInterval(12)
@@ -628,7 +628,7 @@ BulkCreateProductPricePointsRequest body = new BulkCreateProductPricePointsReque
.trialPriceInCents(4900L)
.trialInterval(1)
.trialIntervalUnit(IntervalUnit.MONTH)
- .trialType("payment_expected")
+ .trialType(TrialType.PAYMENT_EXPECTED)
.initialChargeInCents(120000L)
.initialChargeAfterTrial(false)
.expirationInterval(12)
@@ -686,7 +686,7 @@ try {
# Create Product Currency Prices
-This endpoint allows you to create currency prices for a given currency that has been defined on the site level in your settings.
+Creates currency prices for a given currency that has been defined on the site level in your settings.
When creating currency prices, they need to mirror the structure of your primary pricing. If the product price point defines a trial and/or setup fee, each currency must also define a trial and/or setup fee.
@@ -773,11 +773,11 @@ try {
# Update Product Currency Prices
-This endpoint allows you to update the `price`s of currency prices for a given currency that exists on the product price point.
+Updates the `price`s of currency prices for a given currency that exists on the product price point.
When updating the pricing, it needs to mirror the structure of your primary pricing. If the product price point defines a trial and/or setup fee, each currency must also define a trial and/or setup fee.
-Note: Currency Prices are not able to be updated for custom product price points.
+Note: Currency Prices cannot be updated for custom product price points.
```java
CurrencyPricesResponse updateProductCurrencyPrices(
@@ -894,7 +894,7 @@ ListAllProductPricePointsInput listAllProductPricePointsInput = new ListAllProdu
))
.build())
.include(ListProductsPricePointsInclude.CURRENCY_PRICES)
- .page(2)
+ .page(1)
.perPage(50)
.build();
diff --git a/doc/controllers/products.md b/doc/controllers/products.md
index 78141bb6..759984a0 100644
--- a/doc/controllers/products.md
+++ b/doc/controllers/products.md
@@ -20,7 +20,9 @@ ProductsController productsController = client.getProductsController();
# Create Product
-Use this method to create a product within your Advanced Billing site.
+Creates a product in your Advanced Billing site.
+
+See the following product docuemation for more information:
+ [Products Documentation](https://maxio.zendesk.com/hc/en-us/articles/24261090117645-Products-Overview)
+ [Changing a Subscription's Product](https://maxio.zendesk.com/hc/en-us/articles/24252069837581-Product-Changes-and-Migrations)
@@ -131,7 +133,7 @@ try {
# Read Product
-This endpoint allows you to read the current details of a product that you've created in Advanced Billing.
+Reads the current details of a product.
```java
ProductResponse readProduct(
@@ -209,7 +211,7 @@ try {
# Update Product
-Use this method to change aspects of an existing product.
+Updates aspects of an existing product.
### Input Attributes Update Notes
@@ -307,7 +309,7 @@ try {
# Archive Product
-Sending a DELETE request to this endpoint will archive the product. All current subscribers will be unffected; their subscription/purchase will continue to be charged monthly.
+Archives the product. All current subscribers will be unffected; their subscription/purchase will continue to be charged monthly.
This will restrict the option to chose the product for purchase via the Billing Portal, as well as disable Public Signup Pages for the product.
@@ -393,7 +395,7 @@ try {
# Read Product by Handle
-This method allows to retrieve a Product object by its `api_handle`.
+Retrieves a Product object by its `api_handle`.
```java
ProductResponse readProductByHandle(
@@ -534,7 +536,7 @@ ListProductsInput listProductsInput = new ListProductsInput.Builder()
3
))
.build())
- .page(2)
+ .page(1)
.perPage(50)
.includeArchived(true)
.include(ListProductsInclude.PREPAID_PRODUCT_PRICE_POINT)
diff --git a/doc/controllers/proforma-invoices.md b/doc/controllers/proforma-invoices.md
index 23397633..069768ae 100644
--- a/doc/controllers/proforma-invoices.md
+++ b/doc/controllers/proforma-invoices.md
@@ -174,7 +174,7 @@ try {
This endpoint will create a proforma invoice and return it as a response. If the information becomes outdated, simply void the old proforma invoice and generate a new one.
-If you would like to preview the next billing amounts without generating a full proforma invoice, please use the renewal preview endpoint.
+If you would like to preview the next billing amounts without generating a full proforma invoice, use the renewal preview endpoint.
## Restrictions
@@ -254,7 +254,7 @@ ListProformaInvoicesResponse listProformaInvoices(
ListProformaInvoicesInput listProformaInvoicesInput = new ListProformaInvoicesInput.Builder(
222
)
-.page(2)
+.page(1)
.perPage(50)
.direction(Direction.DESC)
.lineItems(false)
diff --git a/doc/controllers/reason-codes.md b/doc/controllers/reason-codes.md
index d4f7830b..b4f50e22 100644
--- a/doc/controllers/reason-codes.md
+++ b/doc/controllers/reason-codes.md
@@ -104,7 +104,7 @@ List listReasonCodes(
```java
ListReasonCodesInput listReasonCodesInput = new ListReasonCodesInput.Builder()
- .page(2)
+ .page(1)
.perPage(50)
.build();
diff --git a/doc/controllers/sales-commissions.md b/doc/controllers/sales-commissions.md
index 41bd3465..c2d7cd5d 100644
--- a/doc/controllers/sales-commissions.md
+++ b/doc/controllers/sales-commissions.md
@@ -23,7 +23,7 @@ Endpoint returns subscriptions with associated sales reps
The Sales Commission API differs from other Chargify API endpoints. This resource is associated with the seller itself. Up to now all available resources were at the level of the site, therefore creating the API Key per site was a sufficient solution. To share resources at the seller level, a new authentication method was introduced, which is user authentication. Creating an API Key for a user is a required step to correctly use the Sales Commission API, more details [here](https://developers.chargify.com/docs/developer-docs/ZG9jOjMyNzk5NTg0-2020-04-20-new-api-authentication).
-Access to the Sales Commission API endpoints is available to users with financial access, where the seller has the Advanced Analytics component enabled. For further information on getting access to Advanced Analytics please contact Maxio support.
+Access to the Sales Commission API endpoints is available to users with financial access, where the seller has the Advanced Analytics component enabled. For further information on getting access to Advanced Analytics contact Maxio support.
> Note: The request is at seller level, it means `<>` variable will be replaced by `app`
@@ -53,7 +53,7 @@ ListSalesCommissionSettingsInput listSalesCommissionSettingsInput = new ListSale
"seller_id8"
)
.authorization("Bearer <>")
-.page(2)
+.page(1)
.perPage(100)
.build();
@@ -110,7 +110,7 @@ Endpoint returns sales rep list with details
The Sales Commission API differs from other Chargify API endpoints. This resource is associated with the seller itself. Up to now all available resources were at the level of the site, therefore creating the API Key per site was a sufficient solution. To share resources at the seller level, a new authentication method was introduced, which is user authentication. Creating an API Key for a user is a required step to correctly use the Sales Commission API, more details [here](https://developers.chargify.com/docs/developer-docs/ZG9jOjMyNzk5NTg0-2020-04-20-new-api-authentication).
-Access to the Sales Commission API endpoints is available to users with financial access, where the seller has the Advanced Analytics component enabled. For further information on getting access to Advanced Analytics please contact Maxio support.
+Access to the Sales Commission API endpoints is available to users with financial access, where the seller has the Advanced Analytics component enabled. For further information on getting access to Advanced Analytics contact Maxio support.
> Note: The request is at seller level, it means `<>` variable will be replaced by `app`
@@ -140,7 +140,7 @@ ListSalesRepsInput listSalesRepsInput = new ListSalesRepsInput.Builder(
"seller_id8"
)
.authorization("Bearer <>")
-.page(2)
+.page(1)
.perPage(100)
.build();
@@ -246,7 +246,7 @@ Endpoint returns sales rep and attached subscriptions details.
The Sales Commission API differs from other Chargify API endpoints. This resource is associated with the seller itself. Up to now all available resources were at the level of the site, therefore creating the API Key per site was a sufficient solution. To share resources at the seller level, a new authentication method was introduced, which is user authentication. Creating an API Key for a user is a required step to correctly use the Sales Commission API, more details [here](https://developers.chargify.com/docs/developer-docs/ZG9jOjMyNzk5NTg0-2020-04-20-new-api-authentication).
-Access to the Sales Commission API endpoints is available to users with financial access, where the seller has the Advanced Analytics component enabled. For further information on getting access to Advanced Analytics please contact Maxio support.
+Access to the Sales Commission API endpoints is available to users with financial access, where the seller has the Advanced Analytics component enabled. For further information on getting access to Advanced Analytics contact Maxio support.
> Note: The request is at seller level, it means `<>` variable will be replaced by `app`
@@ -281,7 +281,7 @@ SaleRep readSalesRep(
String sellerId = "seller_id8";
String salesRepId = "sales_rep_id4";
String authorization = "Bearer <>";
-Integer page = 2;
+Integer page = 1;
Integer perPage = 100;
try {
diff --git a/doc/controllers/sites.md b/doc/controllers/sites.md
index 4186fd40..26267d81 100644
--- a/doc/controllers/sites.md
+++ b/doc/controllers/sites.md
@@ -167,7 +167,7 @@ ListPublicKeysResponse listChargifyJsPublicKeys(
```java
ListChargifyJsPublicKeysInput listChargifyJsPublicKeysInput = new ListChargifyJsPublicKeysInput.Builder()
- .page(2)
+ .page(1)
.perPage(50)
.build();
diff --git a/doc/controllers/subscription-components.md b/doc/controllers/subscription-components.md
index 721fc2fe..e07599b9 100644
--- a/doc/controllers/subscription-components.md
+++ b/doc/controllers/subscription-components.md
@@ -596,7 +596,7 @@ List listAllocations(
```java
int subscriptionId = 222;
int componentId = 222;
-Integer page = 2;
+Integer page = 1;
try {
List result = subscriptionComponentsController.listAllocations(subscriptionId, componentId, page);
@@ -1066,34 +1066,35 @@ try {
# Create Usage
-## Documentation
+Records an instance of metered or prepaid usage for a subscription.
+
+You can report metered or prepaid usage to Advanced Billing as often as you wish. You can report usage as it happens or periodically, such as each night or once per billing period.
-Full documentation on how to create Components in the Advanced Billing UI can be located [here](https://maxio.zendesk.com/hc/en-us/articles/24261149711501-Create-Edit-and-Archive-Components). Additionally, for information on how to record component usage against a subscription, please see the following resources:
+Full documentation on how to create Components in the Advanced Billing UI can be located [here](https://maxio.zendesk.com/hc/en-us/articles/24261149711501-Create-Edit-and-Archive-Components). Additionally, for information on how to record component usage against a subscription, see the following resources:
-+ [Recording Metered Component Usage](https://maxio.zendesk.com/hc/en-us/articles/24251890500109-Reporting-Component-Allocations#reporting-metered-component-usage)
-+ [Reporting Prepaid Component Status](https://maxio.zendesk.com/hc/en-us/articles/24251890500109-Reporting-Component-Allocations#reporting-prepaid-component-status)
+It is not possible to record metered usage for more than one component at a time Usage should be reported as one API call per component on a single subscription. For example, to record that a subscriber has sent both an SMS Message and an Email, send an API call for each.
-You may choose to report metered or prepaid usage to Advanced Billing as often as you wish. You may report usage as it happens. You may also report usage periodically, such as each night or once per billing period. If usage events occur in your system very frequently (on the order of thousands of times an hour), it is best to accumulate usage into batches on your side, and then report those batches less frequently, such as daily. This will ensure you remain below any API throttling limits. If your use case requires higher rates of usage reporting, we recommend utilizing Events Based Components.
+See the following product documention articles for more information:
-## Create Usage for Subscription
+- [Create and Manage Components](https://maxio.zendesk.com/hc/en-us/articles/24261149711501-Create-Edit-and-Archive-Components). A
+- [Recording Metered Component Usage](https://maxio.zendesk.com/hc/en-us/articles/24251890500109-Reporting-Component-Allocations#reporting-metered-component-usage)
+- [Reporting Prepaid Component Status](https://maxio.zendesk.com/hc/en-us/articles/24251890500109-Reporting-Component-Allocations#reporting-prepaid-component-status)
-This endpoint allows you to record an instance of metered or prepaid usage for a subscription. The `quantity` from usage for each component is accumulated to the `unit_balance` on the [Component Line Item](./b3A6MTQxMDgzNzQ-read-subscription-component) for the subscription.
+The `quantity` from usage for each component is accumulated to the `unit_balance` on the [Component Line Item](../../doc/controllers/subscription-components.md#read-subscription-component) for the subscription.
## Price Point ID usage
-If you are using price points, for metered and prepaid usage components, Advanced Billing gives you the option to specify a price point in your request.
+If you are using price points, for metered and prepaid usage components Advanced Billing gives you the option to specify a price point in your request.
You do not need to specify a price point ID. If a price point is not included, the default price point for the component will be used when the usage is recorded.
-If an invalid `price_point_id` is submitted, the endpoint will return an error.
-
## Deducting Usage
-In the event that you need to reverse a previous usage report or otherwise deduct from the current usage balance, you may provide a negative quantity.
+If you need to reverse a previous usage report or otherwise deduct from the current usage balance, you can provide a negative quantity.
Example:
-Previously recorded:
+Previously recorded quantity was 5000:
```json
{
@@ -1104,7 +1105,7 @@ Previously recorded:
}
```
-At this point, `unit_balance` would be `5000`. To reduce the balance to `0`, POST the following payload:
+To reduce the quantity to `0`, POST the following payload:
```json
{
@@ -1117,12 +1118,6 @@ At this point, `unit_balance` would be `5000`. To reduce the balance to `0`, POS
The `unit_balance` has a floor of `0`; negative unit balances are never allowed. For example, if the usage balance is 100 and you deduct 200 units, the unit balance would then be `0`, not `-100`.
-## FAQ
-
-Q. Is it possible to record metered usage for more than one component at a time?
-
-A. No. Usage should be reported as one API call per component on a single subscription. For example, to record that a subscriber has sent both an SMS Message and an Email, send an API call for each.
-
```java
UsageResponse createUsage(
final CreateUsageSubscriptionIdOrReference subscriptionIdOrReference,
@@ -1245,7 +1240,7 @@ ListUsagesInput listUsagesInput = new ListUsagesInput.Builder(
144
)
)
-.page(2)
+.page(1)
.perPage(50)
.build();
@@ -1554,7 +1549,7 @@ ListSubscriptionComponentsResponse listSubscriptionComponentsForSite(
```java
ListSubscriptionComponentsForSiteInput listSubscriptionComponentsForSiteInput = new ListSubscriptionComponentsForSiteInput.Builder()
- .page(2)
+ .page(1)
.perPage(50)
.sort(ListSubscriptionComponentsSort.UPDATED_AT)
.filter(new ListSubscriptionComponentsForSiteFilter.Builder()
diff --git a/doc/controllers/subscription-group-invoice-account.md b/doc/controllers/subscription-group-invoice-account.md
index 3965fd47..81df3f63 100644
--- a/doc/controllers/subscription-group-invoice-account.md
+++ b/doc/controllers/subscription-group-invoice-account.md
@@ -98,7 +98,7 @@ ListSubscriptionGroupPrepaymentResponse listPrepaymentsForSubscriptionGroup(
ListPrepaymentsForSubscriptionGroupInput listPrepaymentsForSubscriptionGroupInput = new ListPrepaymentsForSubscriptionGroupInput.Builder(
"uid0"
)
-.page(2)
+.page(1)
.perPage(50)
.filter(new ListPrepaymentsFilter.Builder()
.dateField(ListPrepaymentDateField.CREATED_AT)
diff --git a/doc/controllers/subscription-group-status.md b/doc/controllers/subscription-group-status.md
index 2706bcd0..60f7aeaa 100644
--- a/doc/controllers/subscription-group-status.md
+++ b/doc/controllers/subscription-group-status.md
@@ -18,9 +18,9 @@ SubscriptionGroupStatusController subscriptionGroupStatusController = client.get
# Cancel Subscriptions in Group
-This endpoint will immediately cancel all subscriptions within the specified group. The group is identified by it's `uid` passed in the URL. To successfully cancel the group, the primary subscription must be on automatic billing. The group members as well must be on automatic billing or they must be prepaid.
+Cancels all subscriptions within the specified group immediately. The group is identified by the `uid` that is passed in the URL. To successfully cancel the group, the primary subscription must be on automatic billing. The group members must be on automatic billing or prepaid.
-In order to cancel a subscription group while also charging for any unbilled usage on metered or prepaid components, the `charge_unbilled_usage=true` parameter must be included in the request.
+To cancel a subscription group while also charging for any unbilled usage on metered or prepaid components, the `charge_unbilled_usage=true` parameter must be included in the request.
```java
Void cancelSubscriptionsInGroup(
@@ -65,7 +65,7 @@ try {
# Initiate Delayed Cancellation for Group
-This endpoint will schedule all subscriptions within the specified group to be canceled at the end of their billing period. The group is identified by it's uid passed in the URL.
+This endpoint will schedule all subscriptions within the specified group to be canceled at the end of their billing period. The group is identified by its uid passed in the URL.
All subscriptions in the group must be on automatic billing in order to successfully cancel them, and the group must not be in a "past_due" state.
diff --git a/doc/controllers/subscription-groups.md b/doc/controllers/subscription-groups.md
index f42eeec3..db2f1893 100644
--- a/doc/controllers/subscription-groups.md
+++ b/doc/controllers/subscription-groups.md
@@ -32,6 +32,8 @@ You must provide one and only one of the `payment_profile_id`/`credit_card_attri
Only one of the `subscriptions` can have `"primary": true` attribute set.
When passing product to a subscription you can use either `product_id` or `product_handle` or `offer_id`. You can also use `custom_price` instead.
+The subscription request examples below will be split into two sections.
+The first section, "Subscription Customization", will focus on passing different information with a subscription, such as components, calendar billing, and custom fields. These examples will presume you are using a secure chargify_token generated by Chargify.js.
```java
SubscriptionGroupSignupResponse signupWithSubscriptionGroup(
@@ -192,7 +194,7 @@ ListSubscriptionGroupsResponse listSubscriptionGroups(
```java
ListSubscriptionGroupsInput listSubscriptionGroupsInput = new ListSubscriptionGroupsInput.Builder()
- .page(2)
+ .page(1)
.perPage(50)
.include(Arrays.asList(
SubscriptionGroupsListInclude.ACCOUNT_BALANCES
@@ -550,7 +552,7 @@ For sites making use of the [Relationship Billing](https://maxio.zendesk.com/hc/
Passing `group` parameters with a `target` containing a `type` and optional `id` is all that's needed. When the `target` parameter specifies a `"customer"` or `"subscription"` that is already part of a hierarchy, the subscription will become a member of the customer's subscription group. If the target customer or subscription is not part of a subscription group, a new group will be created and the subscription will become part of the group with the specified target customer set as the responsible payer for the group's subscriptions.
-**Please Note:** In order to add an existing subscription to a subscription group, it must belong to either the same customer record as the target, or be within the same customer hierarchy.
+**Note:** In order to add an existing subscription to a subscription group, it must belong to either the same customer record as the target, or be within the same customer hierarchy.
Rather than specifying a customer, the `target` parameter could instead simply have a value of
@@ -558,7 +560,7 @@ Rather than specifying a customer, the `target` parameter could instead simply h
* `"parent"` which indicates the subscription will be paid for by the subscribing customer's parent within a customer hierarchy, or
* `"eldest"` which indicates the subscription will be paid for by the root-level customer in the subscribing customer's hierarchy.
-To create a new subscription into a subscription group, please reference the following:
+To create a new subscription into a subscription group, reference the following:
[Create Subscription in a Subscription Group](https://developers.chargify.com/docs/api-docs/d571659cf0f24-create-subscription#subscription-in-a-subscription-group)
```java
diff --git a/doc/controllers/subscription-invoice-account.md b/doc/controllers/subscription-invoice-account.md
index 1d7a220b..87548805 100644
--- a/doc/controllers/subscription-invoice-account.md
+++ b/doc/controllers/subscription-invoice-account.md
@@ -62,7 +62,7 @@ In order to specify a prepayment made against a subscription, specify the `amoun
When the `method` specified is `"credit_card_on_file"`, the prepayment amount will be collected using the default credit card payment profile and applied to the prepayment account balance. This is especially useful for manual replenishment of prepaid subscriptions.
-Please note that you **can't** pass `amount_in_cents`.
+Note that passing `amount_in_cents` is now allowed.
```java
CreatePrepaymentResponse createPrepayment(
@@ -157,7 +157,7 @@ PrepaymentsResponse listPrepayments(
ListPrepaymentsInput listPrepaymentsInput = new ListPrepaymentsInput.Builder(
222
)
-.page(2)
+.page(1)
.perPage(50)
.filter(new ListPrepaymentsFilter.Builder()
.dateField(ListPrepaymentDateField.CREATED_AT)
@@ -349,7 +349,7 @@ ListServiceCreditsResponse listServiceCredits(
```java
int subscriptionId = 222;
-Integer page = 2;
+Integer page = 1;
Integer perPage = 50;
try {
diff --git a/doc/controllers/subscription-notes.md b/doc/controllers/subscription-notes.md
index 2e84b5e5..4613338f 100644
--- a/doc/controllers/subscription-notes.md
+++ b/doc/controllers/subscription-notes.md
@@ -103,7 +103,7 @@ List listSubscriptionNotes(
ListSubscriptionNotesInput listSubscriptionNotesInput = new ListSubscriptionNotesInput.Builder(
222
)
-.page(2)
+.page(1)
.perPage(50)
.build();
diff --git a/doc/controllers/subscription-products.md b/doc/controllers/subscription-products.md
index 028c49ce..3d4291a8 100644
--- a/doc/controllers/subscription-products.md
+++ b/doc/controllers/subscription-products.md
@@ -30,11 +30,11 @@ Full documentation on how to record Migrations in the Advanced Billing UI can be
## Failed Migrations
-One of the most common ways that a migration can fail is when the attempt is made to migrate a subscription to it's current product. Please be aware of this issue!
+Importaint note: One of the most common ways that a migration can fail is when the attempt is made to migrate a subscription to its current product.
## Migration 3D Secure - Stripe
-It may happen that a payment needs 3D Secure Authentication when the subscription is migrated to a new product; this is referred to in our help docs as a [post-authentication flow](https://maxio.zendesk.com/hc/en-us/articles/24176278996493-Testing-Implementing-3D-Secure#psd2-flows-pre-authentication-and-post-authentication). The server returns `422 Unprocessable Entity` in this case with the following response:
+When a payment requires 3D Secure Authentication to adhear to Strong Customer Authentication (SCA) when the subscription is migrated to a new product, the request enters a [post-authentication flow](https://maxio.zendesk.com/hc/en-us/articles/24176278996493-Testing-Implementing-3D-Secure#psd2-flows-pre-authentication-and-post-authentication). The server returns `422 Unprocessable Entity` in this case with the following response:
```json
{
@@ -62,7 +62,7 @@ The final URL that you send a customer to to complete 3D Secure may resemble the
### Example Redirect Flow
-You may wish to redirect customers to different pages depending on whether their SCA was performed successfully. Here's an example flow to use as a reference:
+You may wish to redirect customers to different pages depending on whether SCA was performed successfully. Here's an example flow to use as a reference:
1. Create a migration via API; it requires 3DS
2. You receive a `gateway_payment_id` in the `action_link` along other params in the response.
diff --git a/doc/controllers/subscription-status.md b/doc/controllers/subscription-status.md
index 2ade2c38..78c0932a 100644
--- a/doc/controllers/subscription-status.md
+++ b/doc/controllers/subscription-status.md
@@ -544,7 +544,7 @@ This will place the subscription in the on_hold state and it will not renew.
## Limitations
-You may not place a subscription on hold if the `next_billing` date is within 24 hours.
+You may not place a subscription on hold if the `next_billing_at` date is within 24 hours.
```java
SubscriptionResponse pauseSubscription(
@@ -877,8 +877,7 @@ try {
Advanced Billing offers the ability to reactivate a previously canceled subscription. For details on how the reactivation works, and how to reactivate subscriptions through the application, see [reactivation](https://maxio.zendesk.com/hc/en-us/articles/24252109503629-Reactivating-and-Resuming).
-**Please note: The term
-"resume" is used also during another process in Advanced Billing. This occurs when an on-hold subscription is "resumed". This returns the subscription to an active state.**
+**Note: The term "resume" is used also during another process in Advanced Billing. This occurs when an on-hold subscription is "resumed". This returns the subscription to an active state.**
+ The response returns the subscription object in the `active` or `trialing` state.
+ The `canceled_at` and `cancellation_message` fields do not have values.
@@ -1339,7 +1338,7 @@ try {
The Chargify API allows you to preview a renewal by posting to the renewals endpoint. Renewal Preview is an object representing a subscription’s next assessment. You can retrieve it to see a snapshot of how much your customer will be charged on their next renewal.
-The "Next Billing" amount and "Next Billing" date are already represented in the UI on each Subscriber's Summary. For more information, please see our documentation [here](https://maxio.zendesk.com/hc/en-us/articles/24252493695757-Subscriber-Interface-Overview).
+The "Next Billing" amount and "Next Billing" date are already represented in the UI on each Subscriber's Summary. For more information, see our documentation [here](https://maxio.zendesk.com/hc/en-us/articles/24252493695757-Subscriber-Interface-Overview).
## Optional Component Fields
diff --git a/doc/controllers/subscriptions.md b/doc/controllers/subscriptions.md
index 98e33868..2a5f284b 100644
--- a/doc/controllers/subscriptions.md
+++ b/doc/controllers/subscriptions.md
@@ -26,624 +26,21 @@ SubscriptionsController subscriptionsController = client.getSubscriptionsControl
# Create Subscription
-Full documentation on how subscriptions operate within Advanced Billing can be located under the following topics:
+Creates a Subscription for a customer and product
-+ [Subscriptions Reference](https://maxio.zendesk.com/hc/en-us/articles/24251526991757-Subscription-Overview)
-+ [Subscriptions Actions](https://maxio.zendesk.com/hc/en-us/articles/24251983024653-Subscription-Actions-Overview)
-+ [Subscription Cancellation](https://maxio.zendesk.com/hc/en-us/articles/24251957778829-Cancel-Subscriptions)
-+ [Subscription Reactivation](https://maxio.zendesk.com/hc/en-us/articles/24252109503629-Reactivating-and-Resuming)
-+ [Subscription Import](https://maxio.zendesk.com/hc/en-us/articles/24251489107213-Imports)
+Specify the product with `product_id` or `product_handle`. To set a specific product pricepPoint, use `product_price_point_handle` or `product_price_point_id`.
-When creating a subscription, you must specify a product and a customer. Credit card details may be required, depending on the options for the Product being subscribed ([see Product Options](https://maxio.zendesk.com/hc/en-us/articles/24261076617869-Product-Editing)).
+Identify an existing customer with `customer_id` or `customer_reference`. Optionally, include an existing payment profile using `payment_profile_id`. To create a new customer, pass customer_attributes.
-The product may be specified by `product_id` or by `product_handle` (API Handle). In similar fashion, to pass a particular product price point, you may either use `product_price_point_handle` or `product_price_point_id`.
+Select an option from the **Request Examples** drop-down on the right side of the portal to see examples of common scenarios for creating subscriptions.
-An existing customer may be specified by a `customer_id` (ID within Advanced Billing) or a `customer_reference` (unique value within your app that you have shared with Advanced Billing via the reference attribute on a customer). You may also pass in an existing payment profile for that customer with `payment_profile_id`. A new customer may be created by providing `customer_attributes`.
+Payment information may be required to create a subscription, depending on the options for the Product being subscribed. See [product options](https://docs.maxio.com/hc/en-us/articles/24261076617869-Edit-Products) for more information. See the [Payments Profile](../../doc/controllers/payment-profiles.md#create-payment-profile) endpoint for details on payment parameters.
-Credit card details may be required, depending on the options for the product being subscribed. The product can be specified by `product_id` or by `product_handle` (API Handle).
+Do not use real card information for testing. See the Sites articles that cover [testing your site setup](https://docs.maxio.com/hc/en-us/articles/24250712113165-Testing-Overview#testing-overview-0-0) for more details on testing in your sandbox.
-If you are creating a subscription with a payment profile, the attribute to send will be `credit_card_attributes` or `bank_account_attributes` for ACH and Direct Debit. That said, when you read the subscription after creation, we return the profile details under `credit_card` or `bank_account`.
+Note that collecting and sending raw card details in production requires [PCI compliance](https://docs.maxio.com/hc/en-us/articles/24183956938381-PCI-Compliance#pci-compliance-0-0) on your end. If your business is not PCI compliant, use [Chargify.js](https://docs.maxio.com/hc/en-us/articles/38163190843789-Chargify-js-Overview#chargify-js-overview-0-0) to collect credit card or bank account information.
-## Bulk creation of subscriptions
-
-Bulk creation of subscriptions is currently not supported. For scenarios where multiple subscriptions must be added, particularly when assigning to the same subscription group, it is essential to switch to a single-threaded approach.
-
-To avoid data conflicts or inaccuracies, incorporate a sleep interval between requests.
-
-While this single-threaded approach may impact performance, it ensures data consistency and accuracy in cases where concurrent creation attempts could otherwise lead to issues with subscription alignment and integrity.
-
-## Taxable Subscriptions
-
-If your intent is to charge your subscribers tax via [Avalara Taxes](https://maxio.zendesk.com/hc/en-us/articles/24287043035661-Avalara-VAT-Tax) or [Custom Taxes](https://maxio.zendesk.com/hc/en-us/articles/24287044212749-Custom-Taxes), there are a few considerations to be made regarding collecting subscription data.
-For subscribers to be eligible to be taxed, the following information for the `customer` object or `payment_profile` object must by supplied:
-
-+ A subscription to a [taxable product](https://maxio.zendesk.com/hc/en-us/articles/24261076617869-Product-Editing#tax-settings)
-+ [Full valid billing or shipping address](https://maxio.zendesk.com/hc/en-us/articles/24287008131853-Advanced-Billing-Managed-Sales-Tax#full-address-required-for-taxable-subscriptions) to identify the tax locale
-+ The portion of the address that houses the [state information](https://maxio.zendesk.com/hc/en-us/articles/24287008131853-Advanced-Billing-Managed-Sales-Tax#required-state-format-for-taxable-subscriptions) of either adddress must adhere to the ISO standard of a 2-3 character limit/format.
-+ The portion of the address that houses the [country information](https://maxio.zendesk.com/hc/en-us/articles/24287008131853-Advanced-Billing-Managed-Sales-Tax#required-country-format-for-taxable-subscriptions) must adhere to the ISO standard of a 2 character limit/format.
-
-## Subscription Request Examples
-
-The subscription examples below will be split into two sections.
-
-The first section, "Subscription Customization", will focus on passing different information with a subscription, such as components, calendar billing, and custom fields. These examples will presume you are using a secure `chargify_token` generated by Chargify.js.
-
-The second section, "Passing Payment Information", will focus on passing payment information into Advanced Billing. Please be aware that collecting and sending Advanced Billing raw card details requires PCI compliance on your end; these examples are provided as guidance. If your business is not PCI compliant, we recommend using Chargify.js to collect credit cards or bank accounts.
-
-# Subscription Customization
-
-## With Components
-
-Different components require slightly different data. For example, quantity-based and on/off components accept `allocated_quantity`, while metered components accept `unit_balance`.
-
-When creating a subscription with a component, a `price_point_id` can be passed in along with the `component_id` to specify which price point to use. If not passed in, the default price point will be used.
-
-Note: if an invalid `price_point_id` is used, the subscription will still proceed but will use the component's default price point.
-
-Components and their price points may be added by ID or by handle. See the example request body labeled "Components By Handle (Quantity-Based)"; the format will be the same for other component types.
-
-## With Coupon(s)
-
-Pass an array of `coupon_codes`. See the example request body "With Coupon".
-
-## With Manual Invoice Collection
-
-The `invoice` collection method works only on legacy Statement Architecture.
-
-On Relationship Invoicing Architecture use the `remittance` collection method.
-
-## Prepaid Subscription
-
-A prepaid subscription can be created with the usual subscription creation parameters, specifying `prepaid` as the `payment_collection_method` and including a nested `prepaid_configuration`.
-
-After a prepaid subscription has been created, additional funds can be manually added to the prepayment account through the [Create Prepayment Endpoint](https://developers.chargify.com/docs/api-docs/7ec482de77ba7-create-prepayment).
-
-Prepaid subscriptions do not work on legacy Statement Architecture.
-
-## With Metafields
-
-Metafields can either attach to subscriptions or customers. Metafields are popuplated with the supplied metadata to the resource specified.
-
-If the metafield doesn't exist yet, it will be created on-the-fly.
-
-## With Custom Pricing
-
-Custom pricing is pricing specific to the subscription in question.
-Create a subscription with custom pricing by passing pricing information instead of a price point.
-For a custom priced product, pass the custom_price object in place of `product_price_point_id`. For a custom priced component, pass the `custom_price` object within the component object.
-Custom prices and price points can exist in harmony on a subscription.
-
-# Passing Payment Information
-
-## Subscription with Chargify.js token
-
-The `chargify_token` can be obtained using [Chargify.js](https://docs.maxio.com/hc/en-us/articles/38163190843789-Chargify-js-Overview#chargify-js-overview-0-0). The token represents payment profile attributes that were provided by the customer in their browser and stored at the payment gateway.
-
-The `payment_type` attribute may either be `credit_card` or `bank_account`, depending on the type of payment method being added. If a bank account is being passed, the payment attributes should be changed to `bank_account_attributes`.
-
-```json
-{
- "subscription": {
- "product_handle": "pro-plan",
- "customer_attributes": {
- "first_name": "Joe",
- "last_name": "Smith",
- "email": "j.smith@example.com"
- },
- "credit_card_attributes": {
- "chargify_token": "tok_cwhvpfcnbtgkd8nfkzf9dnjn",
- "payment_type": "credit_card"
- }
- }
-}
-```
-
-## Subscription with vault token
-
-If you already have a customer and card stored in your payment gateway, you may create a subscription with a `vault_token`. Providing the last_four, card type and expiration date will allow the card to be displayed properly in the Advanced Billing UI.
-
-```json
-{
- "subscription": {
- "product_handle": "pro-plan",
- "customer_attributes": {
- "first_name": "Joe",
- "last_name": "Smith",
- "email": "j.smith@example.com"
- },
- "credit_card_attributes": {
- first_name: "Joe,
- last_name: "Smith",
- card_type: "visa",
- expiration_month: "05",
- expiration_year: "2025",
- last_four: "1234",
- vault_token: "12345abc",
- current_vault: "braintree_blue"
- }
-}
-```
-
-## Subscription with ACH as Payment Profile
-
-```json
-{
- "subscription": {
- "product_handle": "gold-product",
- "customer_attributes": {
- "first_name": "Joe",
- "last_name": "Blow",
- "email": "joe@example.com",
- "zip": "02120",
- "state": "MA",
- "reference": "XYZ",
- "phone": "(617) 111 - 0000",
- "organization": "Acme",
- "country": "US",
- "city": "Boston",
- "address_2": null,
- "address": "123 Mass Ave."
- },
- "bank_account_attributes": {
- "bank_name": "Best Bank",
- "bank_routing_number": "021000089",
- "bank_account_number": "111111111111",
- "bank_account_type": "checking",
- "bank_account_holder_type": "business",
- "payment_type": "bank_account"
- }
- }
-}
-```
-
-## Subscription with PayPal payment profile
-
-### With the nonce from Braintree JS
-
-```json
-{ "subscription": {
- "product_handle":"test-product-b",
- "customer_attributes": {
- "first_name":"Amelia",
- "last_name":"Johnson",
- "email":"amelia@example.com",
- "organization":"My Awesome Company"
- },
- "payment_profile_attributes":{
- "paypal_email": "amelia@example.com",
- "current_vault": "braintree_blue",
- "payment_method_nonce":"abc123",
- "payment_type":"paypal_account"
- }
- }
-```
-
-### With the Braintree Customer ID as the vault token:
-
-```json
-{ "subscription": {
- "product_handle":"test-product-b",
- "customer_attributes": {
- "first_name":"Amelia",
- "last_name":"Johnson",
- "email":"amelia@example.com",
- "organization":"My Awesome Company"
- },
- "payment_profile_attributes":{
- "paypal_email": "amelia@example.com",
- "current_vault": "braintree_blue",
- "vault_token":"58271347",
- "payment_type":"paypal_account"
- }
- }
-```
-
-## Subscription using GoCardless Bank Number
-
-These examples creates a customer, bank account and mandate in GoCardless.
-
-For more information on GoCardless, please view the following two resources:
-
-+ [Payment Profiles via API for GoCardless](https://developers.chargify.com/docs/api-docs/1f10a4f170405-create-payment-profile#gocardless)
-
-+ [Full documentation on GoCardless](https://maxio.zendesk.com/hc/en-us/articles/24176159136909-GoCardless)
-
-+ [Using Chargify.js with GoCardless - minimal example](https://docs.maxio.com/hc/en-us/articles/38206331271693-Examples#h_01K0PJ15QQZKCER8CFK40MR6XJ)
-
-+ [Using Chargify.js with GoCardless - full example](https://docs.maxio.com/hc/en-us/articles/38206331271693-Examples#h_01K0PJ15QR09JVHWW0MCA7HVJV)
-
-```json
-{
- "subscription": {
- "product_handle": "gold-product",
- "customer_attributes": {
- "first_name": "Jane",
- "last_name": "Doe",
- "email": "jd@chargify.test"
- },
- "bank_account_attributes": {
- "bank_name": "Royal Bank of France",
- "bank_account_number": "0000000",
- "bank_routing_number": "0003",
- "bank_branch_code": "00006",
- "payment_type": "bank_account",
- "billing_address": "20 Place de la Gare",
- "billing_city": "Colombes",
- "billing_state": "Île-de-France",
- "billing_zip": "92700",
- "billing_country": "FR"
- }
- }
-}
-```
-
-## Subscription using GoCardless IBAN Number
-
-```json
-{
- "subscription": {
- "product_handle": "gold-product",
- "customer_attributes": {
- "first_name": "Jane",
- "last_name": "Doe",
- "email": "jd@chargify.test"
- },
- "bank_account_attributes": {
- "bank_name": "French Bank",
- "bank_iban": "FR1420041010050500013M02606",
- "payment_type": "bank_account",
- "billing_address": "20 Place de la Gare",
- "billing_city": "Colombes",
- "billing_state": "Île-de-France",
- "billing_zip": "92700",
- "billing_country": "FR"
- }
- }
-}
-```
-
-## Subscription using Stripe SEPA Direct Debit
-
-For more information on Stripe Direct Debit, please view the following two resources:
-
-+ [Payment Profiles via API for Stripe SEPA Direct Debit](https://developers.chargify.com/docs/api-docs/1f10a4f170405-create-payment-profile#sepa-direct-debit)
-
-+ [Full documentation on Stripe Direct Debit](https://maxio.zendesk.com/hc/en-us/articles/24176170430093-Stripe-SEPA-and-BECS-Direct-Debit)
-
-+ [Using Chargify.js with Stripe SEPA or BECS Direct Debit - minimal example](https://docs.maxio.com/hc/en-us/articles/38206331271693-Examples#h_01K0PJ15QQFKKN8Z7B7DZ9AJS5)
-
-+ [Using Chargify.js with Stripe SEPA Direct Debit - full example](https://docs.maxio.com/hc/en-us/articles/38206331271693-Examples#h_01K0PJ15QR09JVHWW0MCA7HVJV)
-
-```json
-{
- "subscription": {
- "product_handle": "gold-product",
- "customer_attributes": {
- "first_name": "Jane",
- "last_name": "Doe",
- "email": "jd@chargify.test"
- },
- "bank_account_attributes": {
- "bank_name": "Test Bank",
- "bank_iban": "DE89370400440532013000",
- "payment_type": "bank_account"
- }
- }
-}
-```
-
-## Subscription using Stripe BECS Direct Debit
-
-For more information on Stripe Direct Debit, please view the following two resources:
-
-+ [Payment Profiles via API for Stripe BECS Direct Debit](../../doc/controllers/payment-profiles.md#create-payment-profile)
-
-+ [Full documentation on Stripe Direct Debit](https://maxio.zendesk.com/hc/en-us/articles/24176170430093-Stripe-SEPA-and-BECS-Direct-Debit)
-
-+ [Using Chargify.js with Stripe SEPA, BECS or BACS Direct Debit - minimal example](https://docs.maxio.com/hc/en-us/articles/38206331271693-Examples#h_01K0PJ15QQFKKN8Z7B7DZ9AJS5)
-
-+ [Using Chargify.js with Stripe BECS Direct Debit - full example](https://docs.maxio.com/hc/en-us/articles/38206331271693-Examples#h_01K0PJ15QRX4B1TYZKZD8ZND6D)
-
-```json
-{
- "subscription": {
- "product_handle": "gold-product",
- "customer_attributes": {
- "first_name": "Jane",
- "last_name": "Doe",
- "email": "jd@chargify.test"
- },
- "bank_account_attributes": {
- "bank_name": "Test Bank",
- "bank_branch_code": "000000",
- "bank_account_number": "000123456",
- "payment_type": "bank_account"
- }
- }
-}
-```
-
-## Subscription using Stripe BACS Direct Debit
-
-For more information on Stripe Direct Debit, please view the following two resources:
-
-+ [Payment Profiles via API for Stripe BACS Direct Debit](../../doc/controllers/payment-profiles.md#create-payment-profile)
-
-+ [Full documentation on Stripe Direct Debit](https://maxio.zendesk.com/hc/en-us/articles/24176170430093-Stripe-SEPA-and-BECS-Direct-Debit)
-
-+ [Using Chargify.js with Stripe SEPA, BECS or BACS Direct Debit - minimal example](https://docs.maxio.com/hc/en-us/articles/38206331271693-Examples#h_01K0PJ15QQFKKN8Z7B7DZ9AJS5)
-
-+ [Using Chargify.js with Stripe BACS Direct Debit - full example](https://docs.maxio.com/hc/en-us/articles/38206331271693-Examples#h_01K0PJ15QR7PA1DJ3XE9MD05FM)
-
-```json
-{
- "subscription": {
- "product_handle": "gold-product",
- "customer_attributes": {
- "first_name": "Jane",
- "last_name": "Doe",
- "email": "jd@chargify.test"
- },
- "bank_account_attributes": {
- "bank_name": "Test Bank",
- "bank_branch_code": "108800",
- "bank_account_number": "00012345",
- "payment_type": "bank_account",
- "billing_address": "123 Main St.",
- "billing_city": "London",
- "billing_state": "LND",
- "billing_zip": "W1A 1AA",
- "billing_country": "GB"
- }
- }
-}
-```
-
-## 3D Secure - Stripe
-
-It may happen that a payment needs 3D Secure Authentication when the subscription is created; this is referred to in our help docs as a [post-authentication flow](https://maxio.zendesk.com/hc/en-us/articles/24176278996493-Testing-Implementing-3D-Secure#psd2-flows-pre-authentication-and-post-authentication). The server returns `422 Unprocessable Entity` in this case with the following response:
-
-```json
-{
- "errors": [
- "Your card was declined. This transaction requires 3D secure authentication."
- ],
- "gateway_payment_id": "pi_1F0aGoJ2UDb3Q4av7zU3sHPh",
- "description": "This card requires 3D secure authentication. Redirect the customer to the URL from the action_link attribute to authenticate. Attach callback_url param to this URL if you want to be notified about the result of 3D Secure authentication. Attach redirect_url param to this URL if you want to redirect a customer back to your page after 3D Secure authentication. Example: https://mysite.chargify.com/3d-secure/pi_1FCm4RKDeye4C0XfbqquXRYm?one_time_token_id=128&callback_url=https://localhost:4000&redirect_url=https://yourpage.com will do a POST request to https://localhost:4000 after payment is authenticated and will redirect a customer to https://yourpage.com after 3DS authentication.",
- "action_link": "http://acme.chargify.com/3d-secure/pi_1F0aGoJ2UDb3Q4av7zU3sHPh?one_time_token_id=242"
-}
-```
-
-To let the customer go through 3D Secure Authentication, they need to be redirected to the URL specified in `action_link`.
-Optionally, you can specify `callback_url` parameter in the `action_link` URL if you’d like to be notified about the result of 3D Secure Authentication. The `callback_url` will return the following information:
-
-- whether the authentication was successful (`success`)
-- the gateway ID for the payment (`gateway_payment_id`)
-- the subscription ID (`subscription_id`)
-
-Lastly, you can also specify a `redirect_url` within the `action_link` URL if you’d like to redirect a customer back to your site.
-
-It is not possible to use `action_link` in an iframe inside a custom application. You have to redirect the customer directly to the `action_link`, then, to be notified about the result, use `redirect_url` or `callback_url`.
-
-The final URL that you send a customer to to complete 3D Secure may resemble the following, where the first half is the `action_link` and the second half contains a `redirect_url` and `callback_url`: `https://mysite.chargify.com/3d-secure/pi_1FCm4RKDeye4C0XfbqquXRYm?one_time_token_id=128&callback_url=https://localhost:4000&redirect_url=https://yourpage.com`
-
-## 3D Secure - Checkout
-
-It may happen that a payment needs 3D Secure Authentication when the subscription is created; this is referred to in our help docs as a [post-authentication flow](https://maxio.zendesk.com/hc/en-us/articles/24176278996493-Testing-Implementing-3D-Secure#psd2-flows-pre-authentication-and-post-authentication). The server returns `422 Unprocessable Entity` in this case with the following response:
-
-```json
-{
- "errors": [
- "Your card was declined. This transaction requires 3D secure authentication."
- ],
- "gateway_payment_id": "pay_6gjofv7dlyrkpizlolsuspvtiu",
- "description": "This card requires 3D secure authentication. Redirect the customer to the URL from the action_link attribute to authenticate. Attach callback_url param to this URL if you want to be notified about the result of 3D Secure authentication. Attach redirect_url param to this URL if you want to redirect a customer back to your page after 3D Secure authentication. Example: https://mysite.chargify.com/3d-secure/pay_6gjofv7dlyrkpizlolsuspvtiu?one_time_token_id=123&callback_url=https://localhost:4000&redirect_url=https://yourpage.com will do a POST request to https://localhost:4000 after payment is authenticated and will redirect a customer to https://yourpage.com after 3DS authentication.",
- "action_link": "http://mysite.chargify.com/3d-secure/pay_6gjofv7dlyrkpizlolsuspvtiu?one_time_token_id=123"
-}
-```
-
-To let the customer go through 3D Secure Authentication, they need to be redirected to the URL specified in `action_link`.
-Optionally, you can specify `callback_url` parameter in the `action_link` URL if you’d like to be notified about the result of 3D Secure Authentication. The `callback_url` will return the following information:
-
-- whether the authentication was successful (`success`)
-- the gateway ID for the payment (`gateway_payment_id`)
-- the subscription ID (`subscription_id`)
-
-Lastly, you can also specify a `redirect_url` parameter within the `action_link` URL if you’d like to redirect a customer back to your site.
-
-It is not possible to use `action_link` in an iframe inside a custom application. You have to redirect the customer directly to the `action_link`, then, to be notified about the result, use `redirect_url` or `callback_url`.
-
-The final URL that you send a customer to complete 3D Secure may resemble the following, where the first half is the `action_link` and the second half contains a `redirect_url` and `callback_url`: `https://mysite.chargify.com/3d-secure/pay_6gjofv7dlyrkpizlolsuspvtiu?one_time_token_id=123&callback_url=https://localhost:4000&redirect_url=https://yourpage.com`
-
-### Example Redirect Flow
-
-You may wish to redirect customers to different pages depending on whether their SCA was performed successfully. Here's an example flow to use as a reference:
-
-1. Create a subscription via API; it requires 3DS
-2. You receive a `gateway_payment_id` in the `action_link` along other params in the response.
-3. Use this `gateway_payment_id` to, for example, connect with your internal resources or generate a session_id
-4. Include 1 of those attributes inside the `callback_url` and `redirect_url` to be aware which “session” this applies to
-5. Redirect the customer to the `action_link` with `callback_url` and `redirect_url` applied
-6. After the customer finishes 3DS authentication, we let you know the result by making a request to applied `callback_url`.
-7. After that, we redirect the customer to the `redirect_url`; at this point the result of authentication is known
-8. Optionally, you can use the applied "msg" param in the `redirect_url` to determine whether it was successful or not
-
-## Subscriptions Import
-
-Subscriptions can be “imported” via the API to handle the following scenarios:
-
-+ You already have existing subscriptions with specific start and renewal dates that you would like to import to Advanced Billing
-+ You already have credit cards stored in your provider’s vault and you would like to create subscriptions using those tokens
-
-Before importing, you should have already set up your products to match your offerings. Then, you can create Subscriptions via the API just like you normally would, but using a few special attributes.
-
-Full documentation on how import Subscriptions using the **import tool** in the Advanced Billing UI can be located [here](https://maxio.zendesk.com/hc/en-us/articles/24251489107213-Imports).
-
-### Important Notices and Disclaimers regarding Imports
-
-Before performing a bulk import of subscriptions via the API, we suggest reading the [Subscriptions Import](https://maxio.zendesk.com/hc/en-us/articles/24251489107213-Imports) instructions to understand the repurcussions of a large import.
-
-### Subscription Input Attributes
-
-The following _additional_ attributes to the subscription input attributes make imports possible: `next_billing_at`, `previous_billing_at`, and `import_mrr`.
-
-### Current Vault
-
-If you are using a Legacy gateway such as "eWAY Rapid (Legacy)" or "Stripe (Legacy)" then please contact Support for further instructions on subscription imports.
-
-### Braintree Blue (Braintree v2) Imports
-
-Braintree Blue is Braintree’s newer (version 2) API. For this gateway, please provide the `vault_token` parameter with the value from Braintree’s “Customer ID” rather than the “Payment Profile Token”. At this time we do not use `current_vault_token` with the Braintree Blue gateway, and we only support a single payment profile per Braintree Customer.
-
-When importing PayPal type payment profiles, please set `payment_type` to `paypal_account`.
-
-### Stripe ACH Imports
-
-If the bank account has already been verified, currently you will need to create the customer, create the payment profile in Advanced Billing - setting verified=true, then create a subscription using the customer_id and payment_profile_id.
-
-### Webhooks During Import
-
-If no `next_billing_at` is provided, webhooks will be fired as normal. If you do set a future `next_billing_at`, only a subset of the webhooks are fired when the subscription is created. Keep reading for more information as to what webhooks will be fired under which scenarios.
-
-#### Successful creation with Billing Date
-
-Scenario: If `next_billing_at` provided
-
-+ `signup_success`
-+ `billing_date_change`
-
-#### Successful creation without Billing Date
-
-Scenario: If no `next_billing_at` provided
-
-+ `signup_success`
-+ `payment_success`
-
-#### Unsuccessful creation
-
-Scenario: If card can’t be charged, and no `next_billing_at` provided
-
-+ signup_failure
-
-#### Webhooks fired when next_billing_at is reached:
-
-+ `renewal_success or renewal_failure`
-+ `payment_success or payment_failure`
-
-### Date and Time Formats
-
-We will attempt to parse any string you send as the value of next_billing_at in to a date or time. For best results, use a known format like described in “Date and Time Specification” of RFC 2822 or ISO 8601 .
-
-The following are all equivalent and will work as input to `next_billing_at`:
-
-```
-Aug 06 2030 11:34:00 -0400
-Aug 06 2030 11:34 -0400
-2030-08-06T11:34:00-04:00
-8/6/2030 11:34:00 EDT
-8/6/2030 8:34:00 PDT
-2030-08-06T15:34:00Z
-```
-
-You may also pass just a date, in which case we will assume the time to be noon
-
-```
-2010-08-06
-```
-
-## Subscription Hierarchies & WhoPays
-
-When subscription groups were first added to our Relationship Invoicing architecture, to group together invoices for related subscriptions and allow for complex customer hierarchies and WhoPays scenarios, they were designed to consist of a primary and a collection of group members. The primary would control many aspects of the group, such as when the consolidated invoice is generated. As of today, groups still function this way.
-
-In the future, the concept of a "primary" will be removed in order to offer more flexibility into group management and reduce confusion concerning what actions must be done on a primary level, rather than a member level.
-
-We have introduced a two scheme system as a bridge between these two group organizations. Scheme 1, which is relevant to all subscription groups today, marks the group as being "ruled" by a primary.
-
-When reading a subscription via API, they will return a top-level attribute called `group`, which will denote which scheme is being used. At this time, the `scheme` attribute will always be 1.
-
-### Subscription in a Customer Hierarchy
-
-For sites making use of the [Relationship Billing](https://maxio.zendesk.com/hc/en-us/articles/24252287829645-Advanced-Billing-Invoices-Overview) and [Customer Hierarchy](https://maxio.zendesk.com/hc/en-us/articles/24252185211533-Customer-Hierarchies-WhoPays) features, it is possible to create subscriptions within a customer hierarchy. This can be achieved through the API by passing group parameters in the **Create Subscription** request.
-
-+ The `group` parameters are optional and consist of the required `target` and optional `billing` parameters.
-
-When the `target` parameter specifies a customer that is already part of a hierarchy, the new subscription will become a member of the customer hierarchy as well. If the target customer is not part of a hierarchy, a new customer hierarchy will be created and both the target customer and the new subscription will become part of the hierarchy with the specified target customer set as the responsible payer for the hierarchy's subscriptions.
-
-Rather than specifying a customer, the `target` parameter could instead simply have a value of `self` which indicates the subscription will be paid for not by some other customer, but by the subscribing customer. This will be true whether the customer is being created new, is already part of a hierarchy, or already exists outside a hierarchy. A valid payment method must also be specified in the subscription parameters.
-
-Note that when creating subscriptions in a customer hierarchy, if the customer hierarchy does not already have a payment method, passing valid credit card attributes in the subscription parameters will also result in the payment method being established as the default payment method for the customer hierarchy irrespective of the responsible payer.
-
-The optional `billing` parameters specify how some aspects of the billing for the new subscription should be handled. Rather than capturing payment immediately, the `accrue` parameter can be included so that the new subscription charges accrue until the next assessment date. Regarding the date, the `align_date` parameter can be included so that the billing date of the new subscription matches up with the default subscription group in the customer hierarchy. When choosing to align the dates, the `prorate` parameter can also be specified so that the new subscription charges are prorated based on the billing period of the default subscription group in the customer hierarchy also.
-
-### Subscription in a Subscription Group
-
-For sites making use of [Relationship Billing](https://maxio.zendesk.com/hc/en-us/articles/24252287829645-Advanced-Billing-Invoices-Overview) it may be desireable to create a subscription as part of a [subscription group](https://maxio.zendesk.com/hc/en-us/articles/24252172565005-Subscription-Groups-Overview) in order to rely on [invoice consolidation](https://maxio.zendesk.com/hc/en-us/articles/24252269909389-Invoice-Consolidation). This can be achieved through the API by passing group parameters in the Create Subscription request. The `group` parameters are optional and consist of the required `target` and optional `billing` parameters.
-
-The `target` parameters specify an existing subscription with which the newly created subscription should be grouped. If the target subscription is already part of a group, the new subscription will become a member of the group as well. If the target subscription is not part of a group, a new group will be created and both the target and the new subscription will become part of the group with the target as the group's primary subscription.
-
-The optional `billing` parameters specify how some aspects of the billing for the new subscription should be handled. Rather than capturing payment immediately, the `accrue` parameter can be included so that the new subscription charges accrue until the next assessment date. Regarding the date, the `align_date` parameter can be included so that the billing date of the new subscription matches up with the target subscription. When choosing to align the dates, the `prorate` parameter can also be specified so that the new subscription charges are prorated based on the billing period of the target subscription also.
-
-## Providing Agreement Acceptance Params
-
-It is possible to provide a proof of customer's acceptance of terms and policies.
-We will be storing this proof in case it might be required (i.e. chargeback).
-Currently, we already keep it for subscriptions created via Public Signup Pages.
-In order to create a subscription with the proof of agreement acceptance, you must provide additional parameters `agreement acceptance` with `ip_address` and at least one url to the policy that was accepted: `terms_url` or `privacy_policy_url`. Additional urls that can be provided: `return_refund_policy_url`, `delivery_policy_url` and
-`secure_checkout_policy_url`.
-
-```json
- "subscription": {
- "product_handle": "gold-product",
- "customer_attributes": {
- "first_name": "Jane",
- "last_name": "Doe",
- "email": "jd@chargify.test"
- },
- "agreement_acceptance": {
- "ip_address": "1.2.3.4",
- "terms_url": "https://terms.url",
- "privacy_policy_url": "https://privacy_policy.url",
- "return_refund_policy_url": "https://return_refund_policy.url",
- "delivery_policy_url": "https://delivery_policy.url",
- "secure_checkout_policy_url": "https://secure_checkout_policy.url"
- }
- }
-}
-```
-
-**For Maxio Payments subscriptions, the agreement acceptance params are required, with at least terms_url provided.**
-
-## Providing ACH Agreement params
-
-It is also possible to provide a proof that a customer authorized ACH agreement terms.
-The proof will be stored and the email will be sent to the customer with a copy of the terms (if enabled).
-In order to create a subscription with the proof of authorized ACH agreement terms, you must provide the additional parameter `ach_agreement` with the following nested parameters: `agreement_terms`, `authorizer_first_name`, `authorizer_last_name` and `ip_address`.
-Each of them is required.
-
-```json
- "subscription": {
- "product_handle": "gold-product",
- "customer_attributes": {
- "first_name": "Jane",
- "last_name": "Doe",
- "email": "jd@chargify.test"
- },
- "bank_account_attributes": {
- "bank_name": "Test Bank",
- "bank_routing_number": "021000089",
- "bank_account_number": "111111111111",
- "bank_account_type": "checking",
- "bank_account_holder_type": "business",
- "payment_type": "bank_account"
- },
- "ach_agreement": {
- "agreement_terms": "ACH agreement terms",
- "authorizer_first_name": "Jane",
- "authorizer_last_name": "Doe",
- "ip_address": "1.2.3.4"
- }
- }
-```
+See the [Subscription Signups](page:introduction/basic-concepts/subscription-signup) article for more information on working with subscriptions in Advanced Billing.
```java
SubscriptionResponse createSubscription(
@@ -669,7 +66,7 @@ CreateSubscriptionRequest body = new CreateSubscriptionRequest.Builder(
.paymentCollectionMethod(CollectionMethod.REMITTANCE)
.customerAttributes(new CustomerAttributes.Builder()
.firstName("Joe")
- .lastName("Blow")
+ .lastName("Smith")
.email("joe@example.com")
.organization("Acme")
.reference("XYZ")
@@ -887,7 +284,7 @@ List listSubscriptions(
```java
ListSubscriptionsInput listSubscriptionsInput = new ListSubscriptionsInput.Builder()
- .page(2)
+ .page(1)
.perPage(50)
.startDate(DateTimeHelper.fromSimpleDate("2022-07-01"))
.endDate(DateTimeHelper.fromSimpleDate("2022-08-01"))
@@ -912,47 +309,55 @@ try {
# Update Subscription
-The subscription endpoint allows you to instantly update one or many attributes about a subscription in a single call.
+Updates one or more attributes of a subscription.
## Update Subscription Payment Method
-Change the card that your Subscriber uses for their subscription. You can also use this method to simply change the expiration date of the card **if your gateway allows**.
+Change the card that your subscriber uses for their subscription. You can also use this method to change the expiration date of the card **if your gateway allows**.
-Note that partial card updates for **Authorize.Net** are not allowed via this endpoint. The existing Payment Profile must be directly updated instead.
+Do not use real card information for testing. See the Sites articles that cover [testing your site setup](https://docs.maxio.com/hc/en-us/articles/24250712113165-Testing-Overview#testing-overview-0-0) for more details on testing in your sandbox.
+
+Note that collecting and sending raw card details in production requires [PCI compliance](https://docs.maxio.com/hc/en-us/articles/24183956938381-PCI-Compliance#pci-compliance-0-0) on your end. If your business is not PCI compliant, use [Chargify.js](https://docs.maxio.com/hc/en-us/articles/38163190843789-Chargify-js-Overview#chargify-js-overview-0-0) to collect credit card or bank account information.
+
+> Note: Partial card updates for **Authorize.Net** are not allowed via this endpoint. The existing Payment Profile must be directly updated instead.
+
+## Update Product
You also use this method to change the subscription to a different product by setting a new value for product_handle. A product change can be done in two different ways, **product change** or **delayed product change**.
-## Product Change
+### Product Change
-This endpoint may be used to change a subscription's product. The new payment amount is calculated and charged at the normal start of the next period. If you desire complex product changes or prorated upgrades and downgrades instead, please see the documentation on Migrating Subscription Products.
+You can change a subscription's product. The new payment amount is calculated and charged at the normal start of the next period. If you require complex product changes or prorated upgrades and downgrades instead, please see the documentation on [Migrating Subscription Products](https://docs.maxio.com/hc/en-us/articles/24252069837581-Product-Changes-and-Migrations#product-changes-and-migrations-0-0).
-To perform a product change, simply set either the `product_handle` or `product_id` attribute to that of a different product from the same site as the subscription. You can also change the price point by passing in either `product_price_point_id` or `product_price_point_handle` - otherwise the new product's default price point will be used.
+To perform a product change, set either the `product_handle` or `product_id` attribute to that of a different product from the same site as the subscription. You can also change the price point by passing in either `product_price_point_id` or `product_price_point_handle` - otherwise the new product's default price point is used.
### Delayed Product Change
This method also changes the product and/or price point, and the new payment amount is calculated and charged at the normal start of the next period.
-This method schedules the product change to happen automatically at the subscription’s next renewal date. To perform a Delayed Product Change, set the `product_handle` attribute as you would in a regular product change, but also set the `product_change_delayed` attribute to `true`. No proration applies in this case.
+This method schedules the product change to happen automatically at the subscription’s next renewal date. To perform a delayed product change, set the `product_handle` attribute as you would in a regular product change, but also set the `product_change_delayed` attribute to `true`. No proration applies in this case.
You can also perform a delayed change to the price point by passing in either `product_price_point_id` or `product_price_point_handle`
-**Note: To cancel a delayed product change, set `next_product_id` to an empty string.**
+> **Note:** To cancel a delayed product change, set `next_product_id` to an empty string.
## Billing Date Changes
+You can update dates for a subscrption.
+
### Regular Billing Date Changes
Send the `next_billing_at` to set the next billing date for the subscription. After that date passes and the subscription is processed, the following billing date will be set according to the subscription's product period.
-Note that if you pass an invalid date, we will automatically interpret and set the correct date. For example, when February 30 is entered, the next billing will be set to March 2nd in a non-leap year.
+> Note: If you pass an invalid date, the correct date is automatically set to he correct date. For example, if February 30 is passed, the next billing would be set to March 2nd in a non-leap year.
-The server response will not return data under the key/value pair of `next_billing`. Please view the key/value pair of `current_period_ends_at` to verify that the `next_billing` date has been changed successfully.
+The server response will not return data under the key/value pair of `next_billing_at`. View the key/value pair of `current_period_ends_at` to verify that the `next_billing_at` date has been changed successfully.
-### Snap Day Changes
+### Calendar Billing and Snap Day Changes
For a subscription using Calendar Billing, setting the next billing date is a bit different. Send the `snap_day` attribute to change the calendar billing date for **a subscription using a product eligible for calendar billing**.
-Note: If you change the product associated with a subscription that contains a `snap_date` and immediately `READ/GET` the subscription data, it will still contain evidence of the existing `snap_date`. This is due to the fact that a product change is instantanous and only affects the product associated with a subscription. After the `next_billing` date arrives, the `snap_day` associated with the subscription will return to `null.` Another way of looking at this is that you willl have to wait for the next billing cycle to arrive before the `snap_date` will reset to `null`.
+> Note: If you change the product associated with a subscription that contains a `snap_day` and immediately `READ/GET` the subscription data, it will still contain original `snap_day`. The `snap_day`will will reset to 'null on the next billing cycle. This is because a product change is instantanous and only affects the product associated with a subscription.
```java
SubscriptionResponse updateSubscription(
@@ -1408,7 +813,7 @@ For sites in test mode, you may purge individual subscriptions.
Provide the subscription ID in the url. To confirm, supply the customer ID in the query string `ack` parameter. You may also delete the customer record and/or payment profiles by passing `cascade` parameters. For example, to delete just the customer record, the query params would be: `?ack={customer_id}&cascade[]=customer`
-If you need to remove subscriptions from a live site, please contact support to discuss your use case.
+If you need to remove subscriptions from a live site, contact support to discuss your use case.
### Delete customer and payment profile
@@ -1534,7 +939,7 @@ The "Next Billing" amount and "Next Billing" date are represented in each Subscr
A subscription will not be created by utilizing this endpoint; it is meant to serve as a prediction.
-For more information, please see our documentation [here](https://maxio.zendesk.com/hc/en-us/articles/24252493695757-Subscriber-Interface-Overview).
+For more information, see our documentation [here](https://maxio.zendesk.com/hc/en-us/articles/24252493695757-Subscriber-Interface-Overview).
## Taxable Subscriptions
@@ -1544,15 +949,15 @@ This endpoint will preview taxes applicable to a purchase. In order for taxes to
+ The preview must be for the purchase of a taxable product or component, or combination of the two.
+ The subscription payload must contain a full billing or shipping address in order to calculate tax
-For more information about creating taxable previews, please see our documentation guide on how to create [taxable subscriptions.](https://maxio.zendesk.com/hc/en-us/sections/24287012349325-Taxes)
+For more information about creating taxable previews, see our documentation guide on how to create [taxable subscriptions.](https://maxio.zendesk.com/hc/en-us/sections/24287012349325-Taxes)
-You do **not** need to include a card number to generate tax information when you are previewing a subscription. However, please note that when you actually want to create the subscription, you must include the credit card information if you want the billing address to be stored in Advanced Billing. The billing address and the credit card information are stored together within the payment profile object. Also, you may not send a billing address to Advanced Billing without payment profile information, as the address is stored on the card.
+You do **not** need to include a card number to generate tax information when you are previewing a subscription. However, when you actually want to create the subscription, you must include the credit card information if you want the billing address to be stored in Advanced Billing. The billing address and the credit card information are stored together within the payment profile object. Also, you may not send a billing address to Advanced Billing without payment profile information, as the address is stored on the card.
You can pass shipping and billing addresses and still decide not to calculate taxes. To do that, pass `skip_billing_manifest_taxes: true` attribute.
## Non-taxable Subscriptions
-If you'd like to calculate subscriptions that do not include tax, please feel free to leave off the billing information.
+If you'd like to calculate subscriptions that do not include tax you may leave off the billing information.
```java
SubscriptionPreviewResponse previewSubscription(
@@ -1921,7 +1326,7 @@ try {
Use this endpoint to remove a coupon from an existing subscription.
-For more information on the expected behaviour of removing a coupon from a subscription, please see our documentation [here.](https://maxio.zendesk.com/hc/en-us/articles/24261259337101-Coupons-and-Subscriptions#removing-a-coupon)
+For more information on the expected behaviour of removing a coupon from a subscription, See our documentation [here.](https://maxio.zendesk.com/hc/en-us/articles/24261259337101-Coupons-and-Subscriptions#removing-a-coupon)
```java
String removeCouponFromSubscription(
diff --git a/doc/controllers/webhooks.md b/doc/controllers/webhooks.md
index 00e87421..fd23ed0c 100644
--- a/doc/controllers/webhooks.md
+++ b/doc/controllers/webhooks.md
@@ -47,7 +47,7 @@ List listWebhooks(
```java
ListWebhooksInput listWebhooksInput = new ListWebhooksInput.Builder()
- .page(2)
+ .page(1)
.perPage(50)
.build();
diff --git a/doc/models/activate-event-based-component.md b/doc/models/activate-event-based-component.md
index 217007f6..793ef918 100644
--- a/doc/models/activate-event-based-component.md
+++ b/doc/models/activate-event-based-component.md
@@ -10,7 +10,7 @@
| Name | Type | Tags | Description | Getter | Setter |
| --- | --- | --- | --- | --- | --- |
| `PricePointId` | `Integer` | Optional | The Chargify id of the price point | Integer getPricePointId() | setPricePointId(Integer pricePointId) |
-| `BillingSchedule` | [`BillingSchedule`](../../doc/models/billing-schedule.md) | Optional | This attribute is particularly useful when you need to align billing events for different components on distinct schedules within a subscription. Please note this only works for site with Multifrequency enabled | BillingSchedule getBillingSchedule() | setBillingSchedule(BillingSchedule billingSchedule) |
+| `BillingSchedule` | [`BillingSchedule`](../../doc/models/billing-schedule.md) | Optional | This attribute is particularly useful when you need to align billing events for different components on distinct schedules within a subscription. This only works for site with Multifrequency enabled. | BillingSchedule getBillingSchedule() | setBillingSchedule(BillingSchedule billingSchedule) |
| `CustomPrice` | [`ComponentCustomPrice`](../../doc/models/component-custom-price.md) | Optional | Create or update custom pricing unique to the subscription. Used in place of `price_point_id`. | ComponentCustomPrice getCustomPrice() | setCustomPrice(ComponentCustomPrice customPrice) |
## Example (as JSON)
@@ -37,7 +37,8 @@
"ending_quantity": 40,
"unit_price": 23.26
}
- ]
+ ],
+ "renew_prepaid_allocation": false
}
}
```
diff --git a/doc/models/billing-schedule.md b/doc/models/billing-schedule.md
index 897d03d4..6993916a 100644
--- a/doc/models/billing-schedule.md
+++ b/doc/models/billing-schedule.md
@@ -1,7 +1,7 @@
# Billing Schedule
-This attribute is particularly useful when you need to align billing events for different components on distinct schedules within a subscription. Please note this only works for site with Multifrequency enabled
+This attribute is particularly useful when you need to align billing events for different components on distinct schedules within a subscription. This only works for site with Multifrequency enabled.
## Structure
diff --git a/doc/models/bulk-create-product-price-points-request.md b/doc/models/bulk-create-product-price-points-request.md
index 4cdafd6e..e47daa99 100644
--- a/doc/models/bulk-create-product-price-points-request.md
+++ b/doc/models/bulk-create-product-price-points-request.md
@@ -26,7 +26,7 @@
"trial_price_in_cents": 196,
"trial_interval": 250,
"trial_interval_unit": "day",
- "trial_type": "trial_type6"
+ "trial_type": "no_obligation"
}
]
}
diff --git a/doc/models/calendar-billing.md b/doc/models/calendar-billing.md
index d810e9bc..0fa7c7fa 100644
--- a/doc/models/calendar-billing.md
+++ b/doc/models/calendar-billing.md
@@ -18,7 +18,7 @@
```json
{
- "snap_day": 210,
+ "snap_day": 28,
"calendar_billing_first_charge": "prorated"
}
```
diff --git a/doc/models/chargify-ebb.md b/doc/models/chargify-ebb.md
index 2e8cc348..0d42ad95 100644
--- a/doc/models/chargify-ebb.md
+++ b/doc/models/chargify-ebb.md
@@ -10,8 +10,8 @@
| Name | Type | Tags | Description | Getter | Setter |
| --- | --- | --- | --- | --- | --- |
| `Timestamp` | `ZonedDateTime` | Optional | This timestamp determines what billing period the event will be billed in. If your request payload does not include it, Chargify will add `chargify.timestamp` to the event payload and set the value to `now`. | ZonedDateTime getTimestamp() | setTimestamp(ZonedDateTime timestamp) |
-| `Id` | `String` | Optional | A unique ID set by Chargify. Please note that this field is reserved. If `chargify.id` is present in the request payload, it will be overwritten. | String getId() | setId(String id) |
-| `CreatedAt` | `ZonedDateTime` | Optional | An ISO-8601 timestamp, set by Chargify at the time each event is recorded. Please note that this field is reserved. If `chargify.created_at` is present in the request payload, it will be overwritten. | ZonedDateTime getCreatedAt() | setCreatedAt(ZonedDateTime createdAt) |
+| `Id` | `String` | Optional | A unique ID set by Chargify. This field is reserved. If `chargify.id` is present in the request payload, it will be overwritten. | String getId() | setId(String id) |
+| `CreatedAt` | `ZonedDateTime` | Optional | An ISO-8601 timestamp, set by Chargify at the time each event is recorded. This field is reserved. If `chargify.created_at` is present in the request payload, it will be overwritten. | ZonedDateTime getCreatedAt() | setCreatedAt(ZonedDateTime createdAt) |
| `UniquenessToken` | `String` | Optional | User-defined string scoped per-stream. Duplicate events within a stream will be silently ignored. Tokens expire after 31 days.
**Constraints**: *Maximum Length*: `64` | String getUniquenessToken() | setUniquenessToken(String uniquenessToken) |
| `SubscriptionId` | `Integer` | Optional | Id of Maxio Advanced Billing Subscription which is connected to this event.
Provide `subscription_id` if you configured `chargify.subscription_id` as Subscription Identifier in your Event Stream. | Integer getSubscriptionId() | setSubscriptionId(Integer subscriptionId) |
| `SubscriptionReference` | `String` | Optional | Reference of Maxio Advanced Billing Subscription which is connected to this event.
Provide `subscription_reference` if you configured `chargify.subscription_reference` as Subscription Identifier in your Event Stream. | String getSubscriptionReference() | setSubscriptionReference(String subscriptionReference) |
diff --git a/doc/models/component-custom-price.md b/doc/models/component-custom-price.md
index b0988a58..2f59b543 100644
--- a/doc/models/component-custom-price.md
+++ b/doc/models/component-custom-price.md
@@ -16,6 +16,10 @@ Create or update custom pricing unique to the subscription. Used in place of `pr
| `Interval` | `Integer` | Optional | The numerical interval. i.e. an interval of ‘30’ coupled with an interval_unit of day would mean this component price point would renew every 30 days. This property is only available for sites with Multifrequency enabled. | Integer getInterval() | setInterval(Integer interval) |
| `IntervalUnit` | [`IntervalUnit`](../../doc/models/interval-unit.md) | Optional | A string representing the interval unit for this component price point, either month or day. This property is only available for sites with Multifrequency enabled. | IntervalUnit getIntervalUnit() | setIntervalUnit(IntervalUnit intervalUnit) |
| `Prices` | [`List`](../../doc/models/price.md) | Required | On/off components only need one price bracket starting at 1 | List getPrices() | setPrices(List prices) |
+| `RenewPrepaidAllocation` | `Boolean` | Optional | Applicable only to prepaid usage components. Controls whether the allocated quantity renews each period. | Boolean getRenewPrepaidAllocation() | setRenewPrepaidAllocation(Boolean renewPrepaidAllocation) |
+| `RolloverPrepaidRemainder` | `Boolean` | Optional | Applicable only to prepaid usage components. Controls whether remaining units roll over to the next period. | Boolean getRolloverPrepaidRemainder() | setRolloverPrepaidRemainder(Boolean rolloverPrepaidRemainder) |
+| `ExpirationInterval` | `Integer` | Optional | Applicable only when rollover is enabled. Number of `expiration_interval_unit`s after which rollover amounts expire. | Integer getExpirationInterval() | setExpirationInterval(Integer expirationInterval) |
+| `ExpirationIntervalUnit` | [`ExpirationIntervalUnit`](../../doc/models/expiration-interval-unit.md) | Optional | Applicable only when rollover is enabled. Interval unit for rollover expiration (month or day). | ExpirationIntervalUnit getExpirationIntervalUnit() | setExpirationIntervalUnit(ExpirationIntervalUnit expirationIntervalUnit) |
## Example (as JSON)
@@ -31,7 +35,8 @@ Create or update custom pricing unique to the subscription. Used in place of `pr
"tax_included": false,
"pricing_scheme": "stairstep",
"interval": 162,
- "interval_unit": "day"
+ "interval_unit": "day",
+ "renew_prepaid_allocation": false
}
```
diff --git a/doc/models/component.md b/doc/models/component.md
index 2aa3d366..b022baee 100644
--- a/doc/models/component.md
+++ b/doc/models/component.md
@@ -21,7 +21,6 @@
| `PricePerUnitInCents` | `Long` | Optional | deprecated - use unit_price instead | Long getPricePerUnitInCents() | setPricePerUnitInCents(Long pricePerUnitInCents) |
| `Kind` | [`ComponentKind`](../../doc/models/component-kind.md) | Optional | A handle for the component type | ComponentKind getKind() | setKind(ComponentKind kind) |
| `Archived` | `Boolean` | Optional | Boolean flag describing whether a component is archived or not. | Boolean getArchived() | setArchived(Boolean archived) |
-| `Taxable` | `Boolean` | Optional | Boolean flag describing whether a component is taxable or not. | Boolean getTaxable() | setTaxable(Boolean taxable) |
| `Description` | `String` | Optional | The description of the component. | String getDescription() | setDescription(String description) |
| `DefaultPricePointId` | `Integer` | Optional | - | Integer getDefaultPricePointId() | setDefaultPricePointId(Integer defaultPricePointId) |
| `OveragePrices` | [`List`](../../doc/models/component-price.md) | Optional | Applicable only to prepaid usage components. An array of overage price brackets. | List getOveragePrices() | setOveragePrices(List overagePrices) |
@@ -29,7 +28,8 @@
| `PricePointCount` | `Integer` | Optional | Count for the number of price points associated with the component | Integer getPricePointCount() | setPricePointCount(Integer pricePointCount) |
| `PricePointsUrl` | `String` | Optional | URL that points to the location to read the existing price points via GET request | String getPricePointsUrl() | setPricePointsUrl(String pricePointsUrl) |
| `DefaultPricePointName` | `String` | Optional | - | String getDefaultPricePointName() | setDefaultPricePointName(String defaultPricePointName) |
-| `TaxCode` | `String` | Optional | A string representing the tax code related to the component type. This is especially important when using the Avalara service to tax based on locale. This attribute has a max length of 10 characters. | String getTaxCode() | setTaxCode(String taxCode) |
+| `Taxable` | `Boolean` | Optional | Boolean flag describing whether a component is taxable or not. | Boolean getTaxable() | setTaxable(Boolean taxable) |
+| `TaxCode` | `String` | Optional | A string representing the tax code related to the component type. This is especially important when using AvaTax to tax based on locale. This attribute has a max length of 25 characters. | String getTaxCode() | setTaxCode(String taxCode) |
| `Recurring` | `Boolean` | Optional | - | Boolean getRecurring() | setRecurring(Boolean recurring) |
| `UpgradeCharge` | [`CreditType`](../../doc/models/credit-type.md) | Optional | The type of credit to be created when upgrading/downgrading. Defaults to the component and then site setting if one is not provided.
Available values: `full`, `prorated`, `none`. | CreditType getUpgradeCharge() | setUpgradeCharge(CreditType upgradeCharge) |
| `DowngradeCredit` | [`CreditType`](../../doc/models/credit-type.md) | Optional | The type of credit to be created when upgrading/downgrading. Defaults to the component and then site setting if one is not provided.
Available values: `full`, `prorated`, `none`. | CreditType getDowngradeCredit() | setDowngradeCredit(CreditType downgradeCredit) |
diff --git a/doc/models/containers/calendar-billing-snap-day.md b/doc/models/containers/calendar-billing-snap-day.md
index 77931080..69036d4a 100644
--- a/doc/models/containers/calendar-billing-snap-day.md
+++ b/doc/models/containers/calendar-billing-snap-day.md
@@ -10,5 +10,5 @@
| Type | Factory Method |
| --- | --- |
| `int` | CalendarBillingSnapDay.fromNumber(int number) |
-| `String` | CalendarBillingSnapDay.fromString(String string) |
+| [`SnapDay`](../../../doc/models/snap-day.md) | CalendarBillingSnapDay.fromSnapDay(SnapDay snapDay) |
diff --git a/doc/models/containers/subscription-snap-day.md b/doc/models/containers/subscription-snap-day.md
new file mode 100644
index 00000000..8a1642b6
--- /dev/null
+++ b/doc/models/containers/subscription-snap-day.md
@@ -0,0 +1,14 @@
+
+# Subscription Snap Day
+
+## Class Name
+
+`SubscriptionSnapDay`
+
+## Cases
+
+| Type | Factory Method |
+| --- | --- |
+| `int` | SubscriptionSnapDay.fromNumber(int number) |
+| [`SnapDay`](../../../doc/models/snap-day.md) | SubscriptionSnapDay.fromSnapDay(SnapDay snapDay) |
+
diff --git a/doc/models/containers/update-subscription-snap-day.md b/doc/models/containers/update-subscription-snap-day.md
index 1396c62a..5afc8b91 100644
--- a/doc/models/containers/update-subscription-snap-day.md
+++ b/doc/models/containers/update-subscription-snap-day.md
@@ -9,6 +9,6 @@
| Type | Factory Method |
| --- | --- |
-| [`SnapDay`](../../../doc/models/snap-day.md) | UpdateSubscriptionSnapDay.fromSnapDay(SnapDay snapDay) |
| `int` | UpdateSubscriptionSnapDay.fromNumber(int number) |
+| [`SnapDay`](../../../doc/models/snap-day.md) | UpdateSubscriptionSnapDay.fromSnapDay(SnapDay snapDay) |
diff --git a/doc/models/create-allocation.md b/doc/models/create-allocation.md
index 53154125..2b63157f 100644
--- a/doc/models/create-allocation.md
+++ b/doc/models/create-allocation.md
@@ -19,7 +19,7 @@
| `UpgradeCharge` | [`CreditType`](../../doc/models/credit-type.md) | Optional | The type of credit to be created when upgrading/downgrading. Defaults to the component and then site setting if one is not provided.
Available values: `full`, `prorated`, `none`. | CreditType getUpgradeCharge() | setUpgradeCharge(CreditType upgradeCharge) |
| `InitiateDunning` | `Boolean` | Optional | If set to true, if the immediate component payment fails, initiate dunning for the subscription.
Otherwise, leave the charges on the subscription to pay for at renewal. Defaults to false. | Boolean getInitiateDunning() | setInitiateDunning(Boolean initiateDunning) |
| `PricePointId` | [`CreateAllocationPricePointId`](../../doc/models/containers/create-allocation-price-point-id.md) | Optional | This is a container for one-of cases. | CreateAllocationPricePointId getPricePointId() | setPricePointId(CreateAllocationPricePointId pricePointId) |
-| `BillingSchedule` | [`BillingSchedule`](../../doc/models/billing-schedule.md) | Optional | This attribute is particularly useful when you need to align billing events for different components on distinct schedules within a subscription. Please note this only works for site with Multifrequency enabled | BillingSchedule getBillingSchedule() | setBillingSchedule(BillingSchedule billingSchedule) |
+| `BillingSchedule` | [`BillingSchedule`](../../doc/models/billing-schedule.md) | Optional | This attribute is particularly useful when you need to align billing events for different components on distinct schedules within a subscription. This only works for site with Multifrequency enabled. | BillingSchedule getBillingSchedule() | setBillingSchedule(BillingSchedule billingSchedule) |
## Example (as JSON)
diff --git a/doc/models/create-invoice-coupon.md b/doc/models/create-invoice-coupon.md
index eae357fc..5474b9bf 100644
--- a/doc/models/create-invoice-coupon.md
+++ b/doc/models/create-invoice-coupon.md
@@ -10,6 +10,7 @@
| Name | Type | Tags | Description | Getter | Setter |
| --- | --- | --- | --- | --- | --- |
| `Code` | `String` | Optional | - | String getCode() | setCode(String code) |
+| `Subcode` | `String` | Optional | - | String getSubcode() | setSubcode(String subcode) |
| `Percentage` | [`CreateInvoiceCouponPercentage`](../../doc/models/containers/create-invoice-coupon-percentage.md) | Optional | This is a container for one-of cases. | CreateInvoiceCouponPercentage getPercentage() | setPercentage(CreateInvoiceCouponPercentage percentage) |
| `Amount` | [`CreateInvoiceCouponAmount`](../../doc/models/containers/create-invoice-coupon-amount.md) | Optional | This is a container for one-of cases. | CreateInvoiceCouponAmount getAmount() | setAmount(CreateInvoiceCouponAmount amount) |
| `Description` | `String` | Optional | **Constraints**: *Maximum Length*: `255` | String getDescription() | setDescription(String description) |
@@ -22,9 +23,9 @@
{
"percentage": 50.0,
"code": "code4",
+ "subcode": "subcode8",
"amount": "String9",
- "description": "description4",
- "product_family_id": "String3"
+ "description": "description4"
}
```
diff --git a/doc/models/create-invoice-item.md b/doc/models/create-invoice-item.md
index de34e47e..6b1836eb 100644
--- a/doc/models/create-invoice-item.md
+++ b/doc/models/create-invoice-item.md
@@ -12,8 +12,8 @@
| `Title` | `String` | Optional | - | String getTitle() | setTitle(String title) |
| `Quantity` | [`CreateInvoiceItemQuantity`](../../doc/models/containers/create-invoice-item-quantity.md) | Optional | This is a container for one-of cases. | CreateInvoiceItemQuantity getQuantity() | setQuantity(CreateInvoiceItemQuantity quantity) |
| `UnitPrice` | [`CreateInvoiceItemUnitPrice`](../../doc/models/containers/create-invoice-item-unit-price.md) | Optional | This is a container for one-of cases. | CreateInvoiceItemUnitPrice getUnitPrice() | setUnitPrice(CreateInvoiceItemUnitPrice unitPrice) |
-| `Taxable` | `Boolean` | Optional | Set to true to automatically calculate taxes. Site must be configured to use and calculate taxes.
If using Avalara, a tax_code parameter must also be sent. | Boolean getTaxable() | setTaxable(Boolean taxable) |
-| `TaxCode` | `String` | Optional | - | String getTaxCode() | setTaxCode(String taxCode) |
+| `Taxable` | `Boolean` | Optional | Set to true to automatically calculate taxes. Site must be configured to use and calculate taxes. If using AvaTax, a tax_code parameter must also be sent. | Boolean getTaxable() | setTaxable(Boolean taxable) |
+| `TaxCode` | `String` | Optional | A string representing the tax code related to the product type. This is especially important when using AvaTax to tax based on locale. This attribute has a max length of 25 characters. | String getTaxCode() | setTaxCode(String taxCode) |
| `PeriodRangeStart` | `String` | Optional | YYYY-MM-DD | String getPeriodRangeStart() | setPeriodRangeStart(String periodRangeStart) |
| `PeriodRangeEnd` | `String` | Optional | YYYY-MM-DD | String getPeriodRangeEnd() | setPeriodRangeEnd(String periodRangeEnd) |
| `ProductId` | [`CreateInvoiceItemProductId`](../../doc/models/containers/create-invoice-item-product-id.md) | Optional | This is a container for one-of cases. | CreateInvoiceItemProductId getProductId() | setProductId(CreateInvoiceItemProductId productId) |
diff --git a/doc/models/create-metafield.md b/doc/models/create-metafield.md
index 248d7599..995f35d7 100644
--- a/doc/models/create-metafield.md
+++ b/doc/models/create-metafield.md
@@ -11,7 +11,7 @@
| --- | --- | --- | --- | --- | --- |
| `Name` | `String` | Optional | - | String getName() | setName(String name) |
| `Scope` | [`MetafieldScope`](../../doc/models/metafield-scope.md) | Optional | Warning: When updating a metafield's scope attribute, all scope attributes must be passed. Partially complete scope attributes will override the existing settings. | MetafieldScope getScope() | setScope(MetafieldScope scope) |
-| `InputType` | [`MetafieldInput`](../../doc/models/metafield-input.md) | Optional | Indicates how data should be added to the metafield. For example, a text type is just a string, so a given metafield of this type can have any value attached. On the other hand, dropdown and radio have a set of allowed values that can be input, and appear differently on a Public Signup Page. Defaults to 'text' | MetafieldInput getInputType() | setInputType(MetafieldInput inputType) |
+| `InputType` | [`MetafieldInput`](../../doc/models/metafield-input.md) | Optional | Indicates the type of metafield. A text metafield allows any string value. Dropdown and radio metafields have a set of values that can be selected. Defaults to 'text'. | MetafieldInput getInputType() | setInputType(MetafieldInput inputType) |
| `Enum` | `List` | Optional | Only applicable when input_type is radio or dropdown. Empty strings will not be submitted. | List getEnum() | setEnum(List mEnum) |
## Example (as JSON)
diff --git a/doc/models/create-or-update-product.md b/doc/models/create-or-update-product.md
index 20c2219b..38de720a 100644
--- a/doc/models/create-or-update-product.md
+++ b/doc/models/create-or-update-product.md
@@ -13,18 +13,18 @@
| `Handle` | `String` | Optional | The product API handle | String getHandle() | setHandle(String handle) |
| `Description` | `String` | Required | The product description | String getDescription() | setDescription(String description) |
| `AccountingCode` | `String` | Optional | E.g. Internal ID or SKU Number | String getAccountingCode() | setAccountingCode(String accountingCode) |
-| `RequireCreditCard` | `Boolean` | Optional | Deprecated value that can be ignored unless you have legacy hosted pages. For Public Signup Page users, please read this attribute from under the signup page. | Boolean getRequireCreditCard() | setRequireCreditCard(Boolean requireCreditCard) |
+| `RequireCreditCard` | `Boolean` | Optional | Deprecated value that can be ignored unless you have legacy hosted pages. For Public Signup Page users, read this attribute from under the signup page. | Boolean getRequireCreditCard() | setRequireCreditCard(Boolean requireCreditCard) |
| `PriceInCents` | `long` | Required | The product price, in integer cents | long getPriceInCents() | setPriceInCents(long priceInCents) |
| `Interval` | `int` | Required | The numerical interval. i.e. an interval of ‘30’ coupled with an interval_unit of day would mean this product would renew every 30 days | int getInterval() | setInterval(int interval) |
| `IntervalUnit` | [`IntervalUnit`](../../doc/models/interval-unit.md) | Required | A string representing the interval unit for this product, either month or day | IntervalUnit getIntervalUnit() | setIntervalUnit(IntervalUnit intervalUnit) |
| `TrialPriceInCents` | `Long` | Optional | The product trial price, in integer cents | Long getTrialPriceInCents() | setTrialPriceInCents(Long trialPriceInCents) |
| `TrialInterval` | `Integer` | Optional | The numerical trial interval. i.e. an interval of ‘30’ coupled with a trial_interval_unit of day would mean this product trial would last 30 days. | Integer getTrialInterval() | setTrialInterval(Integer trialInterval) |
| `TrialIntervalUnit` | [`IntervalUnit`](../../doc/models/interval-unit.md) | Optional | A string representing the trial interval unit for this product, either month or day | IntervalUnit getTrialIntervalUnit() | setTrialIntervalUnit(IntervalUnit trialIntervalUnit) |
-| `TrialType` | `String` | Optional | - | String getTrialType() | setTrialType(String trialType) |
+| `TrialType` | [`TrialType`](../../doc/models/trial-type.md) | Optional | Indicates how a trial is handled when the trail period ends and there is no credit card on file. For `no_obligation`, the subscription transitions to a Trial Ended state. Maxio will not send any emails or statements. For `payment_expected`, the subscription transitions to a Past Due state. Maxio will send normal dunning emails and statements according to your other settings. | TrialType getTrialType() | setTrialType(TrialType trialType) |
| `ExpirationInterval` | `Integer` | Optional | The numerical expiration interval. i.e. an expiration_interval of ‘30’ coupled with an expiration_interval_unit of day would mean this product would expire after 30 days. | Integer getExpirationInterval() | setExpirationInterval(Integer expirationInterval) |
| `ExpirationIntervalUnit` | [`ExpirationIntervalUnit`](../../doc/models/expiration-interval-unit.md) | Optional | A string representing the expiration interval unit for this product, either month, day or never | ExpirationIntervalUnit getExpirationIntervalUnit() | setExpirationIntervalUnit(ExpirationIntervalUnit expirationIntervalUnit) |
| `AutoCreateSignupPage` | `Boolean` | Optional | - | Boolean getAutoCreateSignupPage() | setAutoCreateSignupPage(Boolean autoCreateSignupPage) |
-| `TaxCode` | `String` | Optional | A string representing the tax code related to the product type. This is especially important when using the Avalara service to tax based on locale. This attribute has a max length of 10 characters.
**Constraints**: *Maximum Length*: `10` | String getTaxCode() | setTaxCode(String taxCode) |
+| `TaxCode` | `String` | Optional | A string representing the tax code related to the product type. This is especially important when using AvaTax to tax based on locale. This attribute has a max length of 25 characters. | String getTaxCode() | setTaxCode(String taxCode) |
## Example (as JSON)
diff --git a/doc/models/create-payment-profile.md b/doc/models/create-payment-profile.md
index 1e297754..9259cdea 100644
--- a/doc/models/create-payment-profile.md
+++ b/doc/models/create-payment-profile.md
@@ -9,7 +9,7 @@
| Name | Type | Tags | Description | Getter | Setter |
| --- | --- | --- | --- | --- | --- |
-| `ChargifyToken` | `String` | Optional | Token received after sending billing informations using chargify.js. | String getChargifyToken() | setChargifyToken(String chargifyToken) |
+| `ChargifyToken` | `String` | Optional | Token received after sending billing information using chargify.js. | String getChargifyToken() | setChargifyToken(String chargifyToken) |
| `Id` | `Integer` | Optional | - | Integer getId() | setId(Integer id) |
| `PaymentType` | [`PaymentType`](../../doc/models/payment-type.md) | Optional | - | PaymentType getPaymentType() | setPaymentType(PaymentType paymentType) |
| `FirstName` | `String` | Optional | First name on card or bank account. If omitted, the first_name from customer attributes will be used. | String getFirstName() | setFirstName(String firstName) |
@@ -23,7 +23,7 @@
| `BillingAddress2` | `String` | Optional | Second line of the customer’s billing address i.e. Apt. 100 | String getBillingAddress2() | setBillingAddress2(String billingAddress2) |
| `BillingCity` | `String` | Optional | The credit card or bank account billing address city (i.e. “Boston”). This value is merely passed through to the payment gateway. | String getBillingCity() | setBillingCity(String billingCity) |
| `BillingState` | `String` | Optional | The credit card or bank account billing address state (i.e. MA). This value is merely passed through to the payment gateway. This must conform to the [ISO_3166-1](https://en.wikipedia.org/wiki/ISO_3166-1#Current_codes) in order to be valid for tax locale purposes. | String getBillingState() | setBillingState(String billingState) |
-| `BillingCountry` | `String` | Optional | The credit card or bank account billing address country, required in [ISO_3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format (i.e. “US”). This value is merely passed through to the payment gateway. Some gateways require country codes in a specific format. Please check your gateway’s documentation. If creating an ACH subscription, only US is supported at this time. | String getBillingCountry() | setBillingCountry(String billingCountry) |
+| `BillingCountry` | `String` | Optional | The credit card or bank account billing address country, required in [ISO_3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format (i.e. “US”). This value is merely passed through to the payment gateway. Some gateways require country codes in a specific format. Check your gateway’s documentation. If creating an ACH subscription, only US is supported at this time. | String getBillingCountry() | setBillingCountry(String billingCountry) |
| `BillingZip` | `String` | Optional | The credit card or bank account billing address zip code (i.e. 12345). This value is merely passed through to the payment gateway. | String getBillingZip() | setBillingZip(String billingZip) |
| `CurrentVault` | [`AllVaults`](../../doc/models/all-vaults.md) | Optional | The vault that stores the payment profile with the provided `vault_token`. Use `bogus` for testing. | AllVaults getCurrentVault() | setCurrentVault(AllVaults currentVault) |
| `VaultToken` | `String` | Optional | The “token” provided by your vault storage for an already stored payment profile | String getVaultToken() | setVaultToken(String vaultToken) |
diff --git a/doc/models/create-product-price-point-request.md b/doc/models/create-product-price-point-request.md
index c71ee4c3..fc40ac36 100644
--- a/doc/models/create-product-price-point-request.md
+++ b/doc/models/create-product-price-point-request.md
@@ -25,7 +25,7 @@
"trial_price_in_cents": 108,
"trial_interval": 202,
"trial_interval_unit": "day",
- "trial_type": "trial_type4"
+ "trial_type": "no_obligation"
}
}
```
diff --git a/doc/models/create-product-price-point.md b/doc/models/create-product-price-point.md
index 4ba908ac..1d6c2c71 100644
--- a/doc/models/create-product-price-point.md
+++ b/doc/models/create-product-price-point.md
@@ -17,7 +17,7 @@
| `TrialPriceInCents` | `Long` | Optional | The product price point trial price, in integer cents | Long getTrialPriceInCents() | setTrialPriceInCents(Long trialPriceInCents) |
| `TrialInterval` | `Integer` | Optional | The numerical trial interval. i.e. an interval of ‘30’ coupled with a trial_interval_unit of day would mean this product price point trial would last 30 days. | Integer getTrialInterval() | setTrialInterval(Integer trialInterval) |
| `TrialIntervalUnit` | [`IntervalUnit`](../../doc/models/interval-unit.md) | Optional | A string representing the trial interval unit for this product price point, either month or day | IntervalUnit getTrialIntervalUnit() | setTrialIntervalUnit(IntervalUnit trialIntervalUnit) |
-| `TrialType` | `String` | Optional | - | String getTrialType() | setTrialType(String trialType) |
+| `TrialType` | [`TrialType`](../../doc/models/trial-type.md) | Optional | Indicates how a trial is handled when the trail period ends and there is no credit card on file. For `no_obligation`, the subscription transitions to a Trial Ended state. Maxio will not send any emails or statements. For `payment_expected`, the subscription transitions to a Past Due state. Maxio will send normal dunning emails and statements according to your other settings. | TrialType getTrialType() | setTrialType(TrialType trialType) |
| `InitialChargeInCents` | `Long` | Optional | The product price point initial charge, in integer cents | Long getInitialChargeInCents() | setInitialChargeInCents(Long initialChargeInCents) |
| `InitialChargeAfterTrial` | `Boolean` | Optional | - | Boolean getInitialChargeAfterTrial() | setInitialChargeAfterTrial(Boolean initialChargeAfterTrial) |
| `ExpirationInterval` | `Integer` | Optional | The numerical expiration interval. i.e. an expiration_interval of ‘30’ coupled with an expiration_interval_unit of day would mean this product price point would expire after 30 days. | Integer getExpirationInterval() | setExpirationInterval(Integer expirationInterval) |
@@ -37,7 +37,7 @@
"trial_price_in_cents": 48,
"trial_interval": 102,
"trial_interval_unit": "day",
- "trial_type": "trial_type0"
+ "trial_type": "no_obligation"
}
```
diff --git a/doc/models/create-usage-request.md b/doc/models/create-usage-request.md
index d3f79b9e..e1e59538 100644
--- a/doc/models/create-usage-request.md
+++ b/doc/models/create-usage-request.md
@@ -21,6 +21,25 @@
"memo": "memo2",
"billing_schedule": {
"initial_billing_at": "2016-03-13"
+ },
+ "custom_price": {
+ "tax_included": false,
+ "pricing_scheme": "stairstep",
+ "interval": 66,
+ "interval_unit": "day",
+ "prices": [
+ {
+ "starting_quantity": 242,
+ "ending_quantity": 40,
+ "unit_price": 23.26
+ },
+ {
+ "starting_quantity": 242,
+ "ending_quantity": 40,
+ "unit_price": 23.26
+ }
+ ],
+ "renew_prepaid_allocation": false
}
}
}
diff --git a/doc/models/create-usage.md b/doc/models/create-usage.md
index 1a5775de..055e44df 100644
--- a/doc/models/create-usage.md
+++ b/doc/models/create-usage.md
@@ -12,7 +12,8 @@
| `Quantity` | `Double` | Optional | integer by default or decimal number if fractional quantities are enabled for the component | Double getQuantity() | setQuantity(Double quantity) |
| `PricePointId` | `String` | Optional | - | String getPricePointId() | setPricePointId(String pricePointId) |
| `Memo` | `String` | Optional | - | String getMemo() | setMemo(String memo) |
-| `BillingSchedule` | [`BillingSchedule`](../../doc/models/billing-schedule.md) | Optional | This attribute is particularly useful when you need to align billing events for different components on distinct schedules within a subscription. Please note this only works for site with Multifrequency enabled | BillingSchedule getBillingSchedule() | setBillingSchedule(BillingSchedule billingSchedule) |
+| `BillingSchedule` | [`BillingSchedule`](../../doc/models/billing-schedule.md) | Optional | This attribute is particularly useful when you need to align billing events for different components on distinct schedules within a subscription. This only works for site with Multifrequency enabled. | BillingSchedule getBillingSchedule() | setBillingSchedule(BillingSchedule billingSchedule) |
+| `CustomPrice` | [`ComponentCustomPrice`](../../doc/models/component-custom-price.md) | Optional | Create or update custom pricing unique to the subscription. Used in place of `price_point_id`. | ComponentCustomPrice getCustomPrice() | setCustomPrice(ComponentCustomPrice customPrice) |
## Example (as JSON)
@@ -23,6 +24,25 @@
"memo": "memo2",
"billing_schedule": {
"initial_billing_at": "2016-03-13"
+ },
+ "custom_price": {
+ "tax_included": false,
+ "pricing_scheme": "stairstep",
+ "interval": 66,
+ "interval_unit": "day",
+ "prices": [
+ {
+ "starting_quantity": 242,
+ "ending_quantity": 40,
+ "unit_price": 23.26
+ },
+ {
+ "starting_quantity": 242,
+ "ending_quantity": 40,
+ "unit_price": 23.26
+ }
+ ],
+ "renew_prepaid_allocation": false
}
}
```
diff --git a/doc/models/ebb-component.md b/doc/models/ebb-component.md
index 406769a2..cf96b422 100644
--- a/doc/models/ebb-component.md
+++ b/doc/models/ebb-component.md
@@ -18,7 +18,7 @@
| `Prices` | [`List`](../../doc/models/price.md) | Optional | (Not required for ‘per_unit’ pricing schemes) One or more price brackets. See [Price Bracket Rules](https://maxio.zendesk.com/hc/en-us/articles/24261149166733-Component-Pricing-Schemes#price-bracket-rules) for an overview of how price brackets work for different pricing schemes. | List getPrices() | setPrices(List prices) |
| `PricePoints` | [`List`](../../doc/models/component-price-point-item.md) | Optional | - | List getPricePoints() | setPricePoints(List pricePoints) |
| `UnitPrice` | [`EBBComponentUnitPrice`](../../doc/models/containers/ebb-component-unit-price.md) | Optional | This is a container for one-of cases. | EBBComponentUnitPrice getUnitPrice() | setUnitPrice(EBBComponentUnitPrice unitPrice) |
-| `TaxCode` | `String` | Optional | A string representing the tax code related to the component type. This is especially important when using the Avalara service to tax based on locale. This attribute has a max length of 10 characters. | String getTaxCode() | setTaxCode(String taxCode) |
+| `TaxCode` | `String` | Optional | A string representing the tax code related to the component type. This is especially important when using AvaTax to tax based on locale. This attribute has a max length of 25 characters. | String getTaxCode() | setTaxCode(String taxCode) |
| `HideDateRangeOnInvoice` | `Boolean` | Optional | (Only available on Relationship Invoicing sites) Boolean flag describing if the service date range should show for the component on generated invoices. | Boolean getHideDateRangeOnInvoice() | setHideDateRangeOnInvoice(Boolean hideDateRangeOnInvoice) |
| `EventBasedBillingMetricId` | `int` | Required | The ID of an event based billing metric that will be attached to this component. | int getEventBasedBillingMetricId() | setEventBasedBillingMetricId(int eventBasedBillingMetricId) |
| `Interval` | `Integer` | Optional | The numerical interval. i.e. an interval of ‘30’ coupled with an interval_unit of day would mean this component's default price point would renew every 30 days. This property is only available for sites with Multifrequency enabled. | Integer getInterval() | setInterval(Integer interval) |
diff --git a/doc/models/list-coupons-filter.md b/doc/models/list-coupons-filter.md
index f58b54d9..9d0e7089 100644
--- a/doc/models/list-coupons-filter.md
+++ b/doc/models/list-coupons-filter.md
@@ -16,7 +16,8 @@
| `EndDatetime` | `ZonedDateTime` | Optional | The end date and time (format YYYY-MM-DD HH:MM:SS) with which to filter the date_field. Returns coupons with a timestamp at or before exact time provided in query. You can specify timezone in query - otherwise your site's time zone will be used. If provided, this parameter will be used instead of end_date. Use in query `filter[end_datetime]=2011-12-1T10:15:30+01:00`. | ZonedDateTime getEndDatetime() | setEndDatetime(ZonedDateTime endDatetime) |
| `Ids` | `List` | Optional | Allows fetching coupons with matching id based on provided values. Use in query `filter[ids]=1,2,3`.
**Constraints**: *Minimum Items*: `1` | List getIds() | setIds(List ids) |
| `Codes` | `List` | Optional | Allows fetching coupons with matching codes based on provided values. Use in query `filter[codes]=free,free_trial`. | List getCodes() | setCodes(List codes) |
-| `UseSiteExchangeRate` | `Boolean` | Optional | Allows fetching coupons with matching use_site_exchange_rate based on provided value. Use in query `filter[use_site_exchange_rate]=true`. | Boolean getUseSiteExchangeRate() | setUseSiteExchangeRate(Boolean useSiteExchangeRate) |
+| `UseSiteExchangeRate` | `Boolean` | Optional | If true, restricts the list to coupons whose pricing is recalculated from the site’s current exchange rates, so their currency_prices array contains on-the-fly conversions rather than stored price records. If false, restricts the list to coupons that have manually defined amounts for each currency, ensuring the response includes the saved currency_prices entries instead of exchange-rate-derived values. Use in query `filter[use_site_exchange_rate]=true`. | Boolean getUseSiteExchangeRate() | setUseSiteExchangeRate(Boolean useSiteExchangeRate) |
+| `IncludeArchived` | `Boolean` | Optional | Controls returning archived coupons. | Boolean getIncludeArchived() | setIncludeArchived(Boolean includeArchived) |
## Example (as JSON)
diff --git a/doc/models/metafield-input.md b/doc/models/metafield-input.md
index 6bf74038..74bf0d5b 100644
--- a/doc/models/metafield-input.md
+++ b/doc/models/metafield-input.md
@@ -1,7 +1,7 @@
# Metafield Input
-Indicates how data should be added to the metafield. For example, a text type is just a string, so a given metafield of this type can have any value attached. On the other hand, dropdown and radio have a set of allowed values that can be input, and appear differently on a Public Signup Page. Defaults to 'text'
+Indicates the type of metafield. A text metafield allows any string value. Dropdown and radio metafields have a set of values that can be selected. Defaults to 'text'.
## Enumeration
diff --git a/doc/models/metafield-scope.md b/doc/models/metafield-scope.md
index 8d64faa9..8c6472fb 100644
--- a/doc/models/metafield-scope.md
+++ b/doc/models/metafield-scope.md
@@ -15,8 +15,8 @@ Warning: When updating a metafield's scope attribute, all scope attributes must
| `Invoices` | [`IncludeOption`](../../doc/models/include-option.md) | Optional | Include (1) or exclude (0) metafields from invoices. | IncludeOption getInvoices() | setInvoices(IncludeOption invoices) |
| `Statements` | [`IncludeOption`](../../doc/models/include-option.md) | Optional | Include (1) or exclude (0) metafields from statements. | IncludeOption getStatements() | setStatements(IncludeOption statements) |
| `Portal` | [`IncludeOption`](../../doc/models/include-option.md) | Optional | Include (1) or exclude (0) metafields from the portal. | IncludeOption getPortal() | setPortal(IncludeOption portal) |
-| `PublicShow` | [`IncludeOption`](../../doc/models/include-option.md) | Optional | Include (1) or exclude (0) metafields from being viewable by your ecosystem. | IncludeOption getPublicShow() | setPublicShow(IncludeOption publicShow) |
-| `PublicEdit` | [`IncludeOption`](../../doc/models/include-option.md) | Optional | Include (1) or exclude (0) metafields from being edited by your ecosystem. | IncludeOption getPublicEdit() | setPublicEdit(IncludeOption publicEdit) |
+| `PublicShow` | [`IncludeOption`](../../doc/models/include-option.md) | Optional | Include (1) or exclude (0) metafields used in [Embeddable Components](page:development-tools/embeddable-components/overview) from being viewable by your ecosystem. | IncludeOption getPublicShow() | setPublicShow(IncludeOption publicShow) |
+| `PublicEdit` | [`IncludeOption`](../../doc/models/include-option.md) | Optional | Include (1) or exclude (0) metafields used in [Embeddable Components](page:development-tools/embeddable-components/overview) from being editable by your ecosystem. | IncludeOption getPublicEdit() | setPublicEdit(IncludeOption publicEdit) |
| `Hosted` | `List` | Optional | - | List getHosted() | setHosted(List hosted) |
## Example (as JSON)
diff --git a/doc/models/metafield.md b/doc/models/metafield.md
index a7a219bf..07fb4f3f 100644
--- a/doc/models/metafield.md
+++ b/doc/models/metafield.md
@@ -12,8 +12,8 @@
| `Id` | `Integer` | Optional | - | Integer getId() | setId(Integer id) |
| `Name` | `String` | Optional | - | String getName() | setName(String name) |
| `Scope` | [`MetafieldScope`](../../doc/models/metafield-scope.md) | Optional | Warning: When updating a metafield's scope attribute, all scope attributes must be passed. Partially complete scope attributes will override the existing settings. | MetafieldScope getScope() | setScope(MetafieldScope scope) |
-| `DataCount` | `Integer` | Optional | the amount of subscriptions this metafield has been applied to in Chargify | Integer getDataCount() | setDataCount(Integer dataCount) |
-| `InputType` | [`MetafieldInput`](../../doc/models/metafield-input.md) | Optional | Indicates how data should be added to the metafield. For example, a text type is just a string, so a given metafield of this type can have any value attached. On the other hand, dropdown and radio have a set of allowed values that can be input, and appear differently on a Public Signup Page. Defaults to 'text' | MetafieldInput getInputType() | setInputType(MetafieldInput inputType) |
+| `DataCount` | `Integer` | Optional | The amount of subscriptions this metafield has been applied to in Advanced Billing. | Integer getDataCount() | setDataCount(Integer dataCount) |
+| `InputType` | [`MetafieldInput`](../../doc/models/metafield-input.md) | Optional | Indicates the type of metafield. A text metafield allows any string value. Dropdown and radio metafields have a set of values that can be selected. Defaults to 'text'. | MetafieldInput getInputType() | setInputType(MetafieldInput inputType) |
| `Enum` | [`MetafieldEnum`](../../doc/models/containers/metafield-enum.md) | Optional | This is a container for one-of cases. | MetafieldEnum getEnum() | setEnum(MetafieldEnum mEnum) |
## Example (as JSON)
diff --git a/doc/models/metered-component.md b/doc/models/metered-component.md
index a1fd26b4..6ee6178a 100644
--- a/doc/models/metered-component.md
+++ b/doc/models/metered-component.md
@@ -18,7 +18,7 @@
| `Prices` | [`List`](../../doc/models/price.md) | Optional | (Not required for ‘per_unit’ pricing schemes) One or more price brackets. See [Price Bracket Rules](https://maxio.zendesk.com/hc/en-us/articles/24261149166733-Component-Pricing-Schemes#price-bracket-rules) for an overview of how price brackets work for different pricing schemes. | List getPrices() | setPrices(List prices) |
| `PricePoints` | [`List`](../../doc/models/component-price-point-item.md) | Optional | - | List getPricePoints() | setPricePoints(List pricePoints) |
| `UnitPrice` | [`MeteredComponentUnitPrice`](../../doc/models/containers/metered-component-unit-price.md) | Optional | This is a container for one-of cases. | MeteredComponentUnitPrice getUnitPrice() | setUnitPrice(MeteredComponentUnitPrice unitPrice) |
-| `TaxCode` | `String` | Optional | A string representing the tax code related to the component type. This is especially important when using the Avalara service to tax based on locale. This attribute has a max length of 10 characters. | String getTaxCode() | setTaxCode(String taxCode) |
+| `TaxCode` | `String` | Optional | A string representing the tax code related to the component type. This is especially important when using AvaTax to tax based on locale. This attribute has a max length of 25 characters. | String getTaxCode() | setTaxCode(String taxCode) |
| `HideDateRangeOnInvoice` | `Boolean` | Optional | (Only available on Relationship Invoicing sites) Boolean flag describing if the service date range should show for the component on generated invoices. | Boolean getHideDateRangeOnInvoice() | setHideDateRangeOnInvoice(Boolean hideDateRangeOnInvoice) |
| `DisplayOnHostedPage` | `Boolean` | Optional | - | Boolean getDisplayOnHostedPage() | setDisplayOnHostedPage(Boolean displayOnHostedPage) |
| `AllowFractionalQuantities` | `Boolean` | Optional | - | Boolean getAllowFractionalQuantities() | setAllowFractionalQuantities(Boolean allowFractionalQuantities) |
diff --git a/doc/models/on-off-component.md b/doc/models/on-off-component.md
index 2ed8c725..9431839e 100644
--- a/doc/models/on-off-component.md
+++ b/doc/models/on-off-component.md
@@ -17,7 +17,7 @@
| `DowngradeCredit` | [`CreditType`](../../doc/models/credit-type.md) | Optional | The type of credit to be created when upgrading/downgrading. Defaults to the component and then site setting if one is not provided.
Available values: `full`, `prorated`, `none`. | CreditType getDowngradeCredit() | setDowngradeCredit(CreditType downgradeCredit) |
| `PricePoints` | [`List`](../../doc/models/component-price-point-item.md) | Optional | - | List getPricePoints() | setPricePoints(List pricePoints) |
| `UnitPrice` | [`OnOffComponentUnitPrice`](../../doc/models/containers/on-off-component-unit-price.md) | Required | This is a container for one-of cases. | OnOffComponentUnitPrice getUnitPrice() | setUnitPrice(OnOffComponentUnitPrice unitPrice) |
-| `TaxCode` | `String` | Optional | A string representing the tax code related to the component type. This is especially important when using the Avalara service to tax based on locale. This attribute has a max length of 10 characters. | String getTaxCode() | setTaxCode(String taxCode) |
+| `TaxCode` | `String` | Optional | A string representing the tax code related to the component type. This is especially important when using AvaTax to tax based on locale. This attribute has a max length of 25 characters. | String getTaxCode() | setTaxCode(String taxCode) |
| `HideDateRangeOnInvoice` | `Boolean` | Optional | (Only available on Relationship Invoicing sites) Boolean flag describing if the service date range should show for the component on generated invoices. | Boolean getHideDateRangeOnInvoice() | setHideDateRangeOnInvoice(Boolean hideDateRangeOnInvoice) |
| `DisplayOnHostedPage` | `Boolean` | Optional | - | Boolean getDisplayOnHostedPage() | setDisplayOnHostedPage(Boolean displayOnHostedPage) |
| `AllowFractionalQuantities` | `Boolean` | Optional | - | Boolean getAllowFractionalQuantities() | setAllowFractionalQuantities(Boolean allowFractionalQuantities) |
diff --git a/doc/models/payment-profile-attributes.md b/doc/models/payment-profile-attributes.md
index 87dc193d..2aaca4be 100644
--- a/doc/models/payment-profile-attributes.md
+++ b/doc/models/payment-profile-attributes.md
@@ -25,7 +25,7 @@ alias to credit_card_attributes
| `BillingAddress2` | `String` | Optional | (Optional) Second line of the customer’s billing address i.e. Apt. 100 | String getBillingAddress2() | setBillingAddress2(String billingAddress2) |
| `BillingCity` | `String` | Optional | (Optional, may be required by your product configuration or gateway settings) The credit card or bank account billing address city (i.e. “Boston”). This value is merely passed through to the payment gateway. | String getBillingCity() | setBillingCity(String billingCity) |
| `BillingState` | `String` | Optional | (Optional, may be required by your product configuration or gateway settings) The credit card or bank account billing address state (i.e. MA). This value is merely passed through to the payment gateway. This must conform to the [ISO_3166-1](https://en.wikipedia.org/wiki/ISO_3166-1#Current_codes) in order to be valid for tax locale purposes. | String getBillingState() | setBillingState(String billingState) |
-| `BillingCountry` | `String` | Optional | (Optional, may be required by your product configuration or gateway settings) The credit card or bank account billing address country, required in [ISO_3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format (i.e. “US”). This value is merely passed through to the payment gateway. Some gateways require country codes in a specific format. Please check your gateway’s documentation. If creating an ACH subscription, only US is supported at this time. | String getBillingCountry() | setBillingCountry(String billingCountry) |
+| `BillingCountry` | `String` | Optional | (Optional, may be required by your product configuration or gateway settings) The credit card or bank account billing address country, required in [ISO_3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format (i.e. “US”). This value is merely passed through to the payment gateway. Some gateways require country codes in a specific format. Check your gateway’s documentation. If creating an ACH subscription, only US is supported at this time. | String getBillingCountry() | setBillingCountry(String billingCountry) |
| `BillingZip` | `String` | Optional | (Optional, may be required by your product configuration or gateway settings) The credit card or bank account billing address zip code (i.e. 12345). This value is merely passed through to the payment gateway. | String getBillingZip() | setBillingZip(String billingZip) |
| `CurrentVault` | [`AllVaults`](../../doc/models/all-vaults.md) | Optional | (Optional, used only for Subscription Import) The vault that stores the payment profile with the provided vault_token. | AllVaults getCurrentVault() | setCurrentVault(AllVaults currentVault) |
| `VaultToken` | `String` | Optional | (Optional, used only for Subscription Import) The “token” provided by your vault storage for an already stored payment profile | String getVaultToken() | setVaultToken(String vaultToken) |
diff --git a/doc/models/prepaid-usage-component.md b/doc/models/prepaid-usage-component.md
index 410c6255..cadc22a7 100644
--- a/doc/models/prepaid-usage-component.md
+++ b/doc/models/prepaid-usage-component.md
@@ -20,7 +20,7 @@
| `DowngradeCredit` | [`CreditType`](../../doc/models/credit-type.md) | Optional | The type of credit to be created when upgrading/downgrading. Defaults to the component and then site setting if one is not provided.
Available values: `full`, `prorated`, `none`. | CreditType getDowngradeCredit() | setDowngradeCredit(CreditType downgradeCredit) |
| `PricePoints` | [`List`](../../doc/models/create-prepaid-usage-component-price-point.md) | Optional | - | List getPricePoints() | setPricePoints(List pricePoints) |
| `UnitPrice` | [`PrepaidUsageComponentUnitPrice`](../../doc/models/containers/prepaid-usage-component-unit-price.md) | Optional | This is a container for one-of cases. | PrepaidUsageComponentUnitPrice getUnitPrice() | setUnitPrice(PrepaidUsageComponentUnitPrice unitPrice) |
-| `TaxCode` | `String` | Optional | A string representing the tax code related to the component type. This is especially important when using the Avalara service to tax based on locale. This attribute has a max length of 10 characters. | String getTaxCode() | setTaxCode(String taxCode) |
+| `TaxCode` | `String` | Optional | A string representing the tax code related to the component type. This is especially important when using AvaTax to tax based on locale. This attribute has a max length of 25 characters. | String getTaxCode() | setTaxCode(String taxCode) |
| `HideDateRangeOnInvoice` | `Boolean` | Optional | (Only available on Relationship Invoicing sites) Boolean flag describing if the service date range should show for the component on generated invoices. | Boolean getHideDateRangeOnInvoice() | setHideDateRangeOnInvoice(Boolean hideDateRangeOnInvoice) |
| `OveragePricing` | [`OveragePricing`](../../doc/models/overage-pricing.md) | Required | - | OveragePricing getOveragePricing() | setOveragePricing(OveragePricing overagePricing) |
| `RolloverPrepaidRemainder` | `Boolean` | Optional | Boolean which controls whether or not remaining units should be rolled over to the next period | Boolean getRolloverPrepaidRemainder() | setRolloverPrepaidRemainder(Boolean rolloverPrepaidRemainder) |
diff --git a/doc/models/product-price-point.md b/doc/models/product-price-point.md
index b0ebacb4..4f4b3e50 100644
--- a/doc/models/product-price-point.md
+++ b/doc/models/product-price-point.md
@@ -18,7 +18,7 @@
| `TrialPriceInCents` | `Long` | Optional | The product price point trial price, in integer cents | Long getTrialPriceInCents() | setTrialPriceInCents(Long trialPriceInCents) |
| `TrialInterval` | `Integer` | Optional | The numerical trial interval. i.e. an interval of ‘30’ coupled with a trial_interval_unit of day would mean this product price point trial would last 30 days | Integer getTrialInterval() | setTrialInterval(Integer trialInterval) |
| `TrialIntervalUnit` | [`IntervalUnit`](../../doc/models/interval-unit.md) | Optional | A string representing the trial interval unit for this product price point, either month or day | IntervalUnit getTrialIntervalUnit() | setTrialIntervalUnit(IntervalUnit trialIntervalUnit) |
-| `TrialType` | `String` | Optional | - | String getTrialType() | setTrialType(String trialType) |
+| `TrialType` | [`TrialType`](../../doc/models/trial-type.md) | Optional | Indicates how a trial is handled when the trail period ends and there is no credit card on file. For `no_obligation`, the subscription transitions to a Trial Ended state. Maxio will not send any emails or statements. For `payment_expected`, the subscription transitions to a Past Due state. Maxio will send normal dunning emails and statements according to your other settings. | TrialType getTrialType() | setTrialType(TrialType trialType) |
| `IntroductoryOffer` | `Boolean` | Optional | reserved for future use | Boolean getIntroductoryOffer() | setIntroductoryOffer(Boolean introductoryOffer) |
| `InitialChargeInCents` | `Long` | Optional | The product price point initial charge, in integer cents | Long getInitialChargeInCents() | setInitialChargeInCents(Long initialChargeInCents) |
| `InitialChargeAfterTrial` | `Boolean` | Optional | - | Boolean getInitialChargeAfterTrial() | setInitialChargeAfterTrial(Boolean initialChargeAfterTrial) |
diff --git a/doc/models/product.md b/doc/models/product.md
index 25714f5e..85ed023f 100644
--- a/doc/models/product.md
+++ b/doc/models/product.md
@@ -14,7 +14,7 @@
| `Handle` | `String` | Optional | The product API handle | String getHandle() | setHandle(String handle) |
| `Description` | `String` | Optional | The product description | String getDescription() | setDescription(String description) |
| `AccountingCode` | `String` | Optional | E.g. Internal ID or SKU Number | String getAccountingCode() | setAccountingCode(String accountingCode) |
-| `RequestCreditCard` | `Boolean` | Optional | Deprecated value that can be ignored unless you have legacy hosted pages. For Public Signup Page users, please read this attribute from under the signup page. | Boolean getRequestCreditCard() | setRequestCreditCard(Boolean requestCreditCard) |
+| `RequestCreditCard` | `Boolean` | Optional | Deprecated value that can be ignored unless you have legacy hosted pages. For Public Signup Page users, read this attribute from under the signup page. | Boolean getRequestCreditCard() | setRequestCreditCard(Boolean requestCreditCard) |
| `ExpirationInterval` | `Integer` | Optional | A numerical interval for the length a subscription to this product will run before it expires. See the description of interval for a description of how this value is coupled with an interval unit to calculate the full interval | Integer getExpirationInterval() | setExpirationInterval(Integer expirationInterval) |
| `ExpirationIntervalUnit` | [`ExpirationIntervalUnit`](../../doc/models/expiration-interval-unit.md) | Optional | A string representing the expiration interval unit for this product, either month, day or never | ExpirationIntervalUnit getExpirationIntervalUnit() | setExpirationIntervalUnit(ExpirationIntervalUnit expirationIntervalUnit) |
| `CreatedAt` | `ZonedDateTime` | Optional | Timestamp indicating when this product was created | ZonedDateTime getCreatedAt() | setCreatedAt(ZonedDateTime createdAt) |
@@ -40,7 +40,7 @@
| `RequestBillingAddress` | `Boolean` | Optional | A boolean indicating whether to request a billing address on any Self-Service Pages that are used by subscribers of this product. | Boolean getRequestBillingAddress() | setRequestBillingAddress(Boolean requestBillingAddress) |
| `RequireBillingAddress` | `Boolean` | Optional | A boolean indicating whether a billing address is required to add a payment profile, especially at signup. | Boolean getRequireBillingAddress() | setRequireBillingAddress(Boolean requireBillingAddress) |
| `RequireShippingAddress` | `Boolean` | Optional | A boolean indicating whether a shipping address is required for the customer, especially at signup. | Boolean getRequireShippingAddress() | setRequireShippingAddress(Boolean requireShippingAddress) |
-| `TaxCode` | `String` | Optional | A string representing the tax code related to the product type. This is especially important when using the Avalara service to tax based on locale. This attribute has a max length of 10 characters. | String getTaxCode() | setTaxCode(String taxCode) |
+| `TaxCode` | `String` | Optional | A string representing the tax code related to the product type. This is especially important when using AvaTax to tax based on locale. This attribute has a max length of 25 characters. | String getTaxCode() | setTaxCode(String taxCode) |
| `DefaultProductPricePointId` | `Integer` | Optional | - | Integer getDefaultProductPricePointId() | setDefaultProductPricePointId(Integer defaultProductPricePointId) |
| `UseSiteExchangeRate` | `Boolean` | Optional | - | Boolean getUseSiteExchangeRate() | setUseSiteExchangeRate(Boolean useSiteExchangeRate) |
| `ItemCategory` | `String` | Optional | One of the following: Business Software, Consumer Software, Digital Services, Physical Goods, Other | String getItemCategory() | setItemCategory(String itemCategory) |
diff --git a/doc/models/quantity-based-component.md b/doc/models/quantity-based-component.md
index dc6de8c4..d462f670 100644
--- a/doc/models/quantity-based-component.md
+++ b/doc/models/quantity-based-component.md
@@ -20,7 +20,7 @@
| `DowngradeCredit` | [`CreditType`](../../doc/models/credit-type.md) | Optional | The type of credit to be created when upgrading/downgrading. Defaults to the component and then site setting if one is not provided.
Available values: `full`, `prorated`, `none`. | CreditType getDowngradeCredit() | setDowngradeCredit(CreditType downgradeCredit) |
| `PricePoints` | [`List`](../../doc/models/component-price-point-item.md) | Optional | - | List getPricePoints() | setPricePoints(List pricePoints) |
| `UnitPrice` | [`QuantityBasedComponentUnitPrice`](../../doc/models/containers/quantity-based-component-unit-price.md) | Optional | This is a container for one-of cases. | QuantityBasedComponentUnitPrice getUnitPrice() | setUnitPrice(QuantityBasedComponentUnitPrice unitPrice) |
-| `TaxCode` | `String` | Optional | A string representing the tax code related to the component type. This is especially important when using the Avalara service to tax based on locale. This attribute has a max length of 10 characters. | String getTaxCode() | setTaxCode(String taxCode) |
+| `TaxCode` | `String` | Optional | A string representing the tax code related to the component type. This is especially important when using AvaTax to tax based on locale. This attribute has a max length of 25 characters. | String getTaxCode() | setTaxCode(String taxCode) |
| `HideDateRangeOnInvoice` | `Boolean` | Optional | (Only available on Relationship Invoicing sites) Boolean flag describing if the service date range should show for the component on generated invoices. | Boolean getHideDateRangeOnInvoice() | setHideDateRangeOnInvoice(Boolean hideDateRangeOnInvoice) |
| `Recurring` | `Boolean` | Optional | - | Boolean getRecurring() | setRecurring(Boolean recurring) |
| `DisplayOnHostedPage` | `Boolean` | Optional | - | Boolean getDisplayOnHostedPage() | setDisplayOnHostedPage(Boolean displayOnHostedPage) |
diff --git a/doc/models/resume-options.md b/doc/models/resume-options.md
index 30c259ff..4c7e1fc0 100644
--- a/doc/models/resume-options.md
+++ b/doc/models/resume-options.md
@@ -9,7 +9,7 @@
| Name | Type | Tags | Description | Getter | Setter |
| --- | --- | --- | --- | --- | --- |
-| `RequireResume` | `Boolean` | Optional | Chargify will only attempt to resume the subscription's billing period. If not resumable, the subscription will be left in it's current state. | Boolean getRequireResume() | setRequireResume(Boolean requireResume) |
+| `RequireResume` | `Boolean` | Optional | Chargify will only attempt to resume the subscription's billing period. If not resumable, the subscription will be left in its current state. | Boolean getRequireResume() | setRequireResume(Boolean requireResume) |
| `ForgiveBalance` | `Boolean` | Optional | Indicates whether or not Chargify should clear the subscription's existing balance before attempting to resume the subscription. If subscription cannot be resumed, the balance will remain as it was before the attempt to resume was made. | Boolean getForgiveBalance() | setForgiveBalance(Boolean forgiveBalance) |
## Example (as JSON)
diff --git a/doc/models/snap-day.md b/doc/models/snap-day.md
index 4015f173..92da90e2 100644
--- a/doc/models/snap-day.md
+++ b/doc/models/snap-day.md
@@ -1,8 +1,6 @@
# Snap Day
-Use for subscriptions with product eligible for calendar billing only. Value can be 1-28 or 'end'.
-
## Enumeration
`SnapDay`
diff --git a/doc/models/subscription-custom-price.md b/doc/models/subscription-custom-price.md
index 2c71a431..5020f8a5 100644
--- a/doc/models/subscription-custom-price.md
+++ b/doc/models/subscription-custom-price.md
@@ -19,6 +19,7 @@
| `TrialPriceInCents` | [`SubscriptionCustomPriceTrialPriceInCents`](../../doc/models/containers/subscription-custom-price-trial-price-in-cents.md) | Optional | This is a container for one-of cases. | SubscriptionCustomPriceTrialPriceInCents getTrialPriceInCents() | setTrialPriceInCents(SubscriptionCustomPriceTrialPriceInCents trialPriceInCents) |
| `TrialInterval` | [`SubscriptionCustomPriceTrialInterval`](../../doc/models/containers/subscription-custom-price-trial-interval.md) | Optional | This is a container for one-of cases. | SubscriptionCustomPriceTrialInterval getTrialInterval() | setTrialInterval(SubscriptionCustomPriceTrialInterval trialInterval) |
| `TrialIntervalUnit` | [`IntervalUnit`](../../doc/models/interval-unit.md) | Optional | (Optional) | IntervalUnit getTrialIntervalUnit() | setTrialIntervalUnit(IntervalUnit trialIntervalUnit) |
+| `TrialType` | [`TrialType`](../../doc/models/trial-type.md) | Optional | Indicates how a trial is handled when the trail period ends and there is no credit card on file. For `no_obligation`, the subscription transitions to a Trial Ended state. Maxio will not send any emails or statements. For `payment_expected`, the subscription transitions to a Past Due state. Maxio will send normal dunning emails and statements according to your other settings. | TrialType getTrialType() | setTrialType(TrialType trialType) |
| `InitialChargeInCents` | [`SubscriptionCustomPriceInitialChargeInCents`](../../doc/models/containers/subscription-custom-price-initial-charge-in-cents.md) | Optional | This is a container for one-of cases. | SubscriptionCustomPriceInitialChargeInCents getInitialChargeInCents() | setInitialChargeInCents(SubscriptionCustomPriceInitialChargeInCents initialChargeInCents) |
| `InitialChargeAfterTrial` | `Boolean` | Optional | (Optional) | Boolean getInitialChargeAfterTrial() | setInitialChargeAfterTrial(Boolean initialChargeAfterTrial) |
| `ExpirationInterval` | [`SubscriptionCustomPriceExpirationInterval`](../../doc/models/containers/subscription-custom-price-expiration-interval.md) | Optional | This is a container for one-of cases. | SubscriptionCustomPriceExpirationInterval getExpirationInterval() | setExpirationInterval(SubscriptionCustomPriceExpirationInterval expirationInterval) |
diff --git a/doc/models/subscription-group-component-custom-price.md b/doc/models/subscription-group-component-custom-price.md
index e89210bf..f5ce5e42 100644
--- a/doc/models/subscription-group-component-custom-price.md
+++ b/doc/models/subscription-group-component-custom-price.md
@@ -39,7 +39,8 @@ Used in place of `price_point_id` to define a custom price point unique to the s
"ending_quantity": 40,
"unit_price": 23.26
}
- ]
+ ],
+ "renew_prepaid_allocation": false
}
]
}
diff --git a/doc/models/subscription-group-signup-component.md b/doc/models/subscription-group-signup-component.md
index 6497dd62..6593f51c 100644
--- a/doc/models/subscription-group-signup-component.md
+++ b/doc/models/subscription-group-signup-component.md
@@ -49,7 +49,8 @@
"ending_quantity": 40,
"unit_price": 23.26
}
- ]
+ ],
+ "renew_prepaid_allocation": false
},
{
"tax_included": false,
@@ -62,7 +63,8 @@
"ending_quantity": 40,
"unit_price": 23.26
}
- ]
+ ],
+ "renew_prepaid_allocation": false
},
{
"tax_included": false,
@@ -75,7 +77,8 @@
"ending_quantity": 40,
"unit_price": 23.26
}
- ]
+ ],
+ "renew_prepaid_allocation": false
}
]
}
diff --git a/doc/models/subscription.md b/doc/models/subscription.md
index 3c1fa61f..ef7db3a7 100644
--- a/doc/models/subscription.md
+++ b/doc/models/subscription.md
@@ -33,7 +33,7 @@
| `SignupRevenue` | `String` | Optional | The revenue, formatted as a string of decimal separated dollars and,cents, from the subscription signup ($50.00 would be formatted as,50.00) | String getSignupRevenue() | setSignupRevenue(String signupRevenue) |
| `DelayedCancelAt` | `ZonedDateTime` | Optional | Timestamp for when the subscription is currently set to cancel. | ZonedDateTime getDelayedCancelAt() | setDelayedCancelAt(ZonedDateTime delayedCancelAt) |
| `CouponCode` | `String` | Optional | (deprecated) The coupon code of the single coupon currently applied to the subscription. See coupon_codes instead as subscriptions can now have more than one coupon. | String getCouponCode() | setCouponCode(String couponCode) |
-| `SnapDay` | `String` | Optional | The day of the month that the subscription will charge according to calendar billing rules, if used. | String getSnapDay() | setSnapDay(String snapDay) |
+| `SnapDay` | [`SubscriptionSnapDay`](../../doc/models/containers/subscription-snap-day.md) | Optional | This is a container for one-of cases. | SubscriptionSnapDay getSnapDay() | setSnapDay(SubscriptionSnapDay snapDay) |
| `PaymentCollectionMethod` | [`CollectionMethod`](../../doc/models/collection-method.md) | Optional | The type of payment collection to be used in the subscription. For legacy Statements Architecture valid options are - `invoice`, `automatic`. For current Relationship Invoicing Architecture valid options are - `remittance`, `automatic`, `prepaid`. | CollectionMethod getPaymentCollectionMethod() | setPaymentCollectionMethod(CollectionMethod paymentCollectionMethod) |
| `Customer` | [`Customer`](../../doc/models/customer.md) | Optional | - | Customer getCustomer() | setCustomer(Customer customer) |
| `Product` | [`Product`](../../doc/models/product.md) | Optional | - | Product getProduct() | setProduct(Product product) |
@@ -51,7 +51,7 @@
| `CouponCodes` | `List` | Optional | An array for all the coupons attached to the subscription. | List getCouponCodes() | setCouponCodes(List couponCodes) |
| `OfferId` | `Integer` | Optional | The ID of the offer associated with the subscription. | Integer getOfferId() | setOfferId(Integer offerId) |
| `PayerId` | `Integer` | Optional | On Relationship Invoicing, the ID of the individual paying for the subscription. Defaults to the Customer ID unless the 'Customer Hierarchies & WhoPays' feature is enabled. | Integer getPayerId() | setPayerId(Integer payerId) |
-| `CurrentBillingAmountInCents` | `Long` | Optional | The balance in cents plus the estimated renewal amount in cents. Returned ONLY for readSubscription operation as it's compute intensive operation. | Long getCurrentBillingAmountInCents() | setCurrentBillingAmountInCents(Long currentBillingAmountInCents) |
+| `CurrentBillingAmountInCents` | `Long` | Optional | The balance in cents plus the estimated renewal amount in cents. Returned ONLY for the readSubscription operation as it's a compute intensive operation. | Long getCurrentBillingAmountInCents() | setCurrentBillingAmountInCents(Long currentBillingAmountInCents) |
| `ProductPricePointId` | `Integer` | Optional | The product price point currently subscribed to. | Integer getProductPricePointId() | setProductPricePointId(Integer productPricePointId) |
| `ProductPricePointType` | [`PricePointType`](../../doc/models/price-point-type.md) | Optional | Price point type. We expose the following types:
1. **default**: a price point that is marked as a default price for a certain product.
2. **custom**: a custom price point.
3. **catalog**: a price point that is **not** marked as a default price for a certain product and is **not** a custom one. | PricePointType getProductPricePointType() | setProductPricePointType(PricePointType productPricePointType) |
| `NextProductPricePointId` | `Integer` | Optional | If a delayed product change is scheduled, the ID of the product price point that the subscription will be changed to at the next renewal. | Integer getNextProductPricePointId() | setNextProductPricePointId(Integer nextProductPricePointId) |
diff --git a/doc/models/trial-type.md b/doc/models/trial-type.md
new file mode 100644
index 00000000..4807ad00
--- /dev/null
+++ b/doc/models/trial-type.md
@@ -0,0 +1,16 @@
+
+# Trial Type
+
+Indicates how a trial is handled when the trail period ends and there is no credit card on file. For `no_obligation`, the subscription transitions to a Trial Ended state. Maxio will not send any emails or statements. For `payment_expected`, the subscription transitions to a Past Due state. Maxio will send normal dunning emails and statements according to your other settings.
+
+## Enumeration
+
+`TrialType`
+
+## Fields
+
+| Name |
+| --- |
+| `NoObligation` |
+| `PaymentExpected` |
+
diff --git a/doc/models/update-component.md b/doc/models/update-component.md
index dfad42ec..e4bfcc63 100644
--- a/doc/models/update-component.md
+++ b/doc/models/update-component.md
@@ -14,7 +14,7 @@
| `Description` | `String` | Optional | The description of the component. | String getDescription() | setDescription(String description) |
| `AccountingCode` | `String` | Optional | - | String getAccountingCode() | setAccountingCode(String accountingCode) |
| `Taxable` | `Boolean` | Optional | Boolean flag describing whether a component is taxable or not. | Boolean getTaxable() | setTaxable(Boolean taxable) |
-| `TaxCode` | `String` | Optional | A string representing the tax code related to the component type. This is especially important when using the Avalara service to tax based on locale. This attribute has a max length of 10 characters. | String getTaxCode() | setTaxCode(String taxCode) |
+| `TaxCode` | `String` | Optional | A string representing the tax code related to the component type. This is especially important when using AvaTax to tax based on locale. This attribute has a max length of 25 characters. | String getTaxCode() | setTaxCode(String taxCode) |
| `ItemCategory` | [`ItemCategory`](../../doc/models/item-category.md) | Optional | One of the following: Business Software, Consumer Software, Digital Services, Physical Goods, Other | ItemCategory getItemCategory() | setItemCategory(ItemCategory itemCategory) |
| `DisplayOnHostedPage` | `Boolean` | Optional | - | Boolean getDisplayOnHostedPage() | setDisplayOnHostedPage(Boolean displayOnHostedPage) |
| `UpgradeCharge` | [`CreditType`](../../doc/models/credit-type.md) | Optional | The type of credit to be created when upgrading/downgrading. Defaults to the component and then site setting if one is not provided.
Available values: `full`, `prorated`, `none`. | CreditType getUpgradeCharge() | setUpgradeCharge(CreditType upgradeCharge) |
diff --git a/doc/models/update-metafield.md b/doc/models/update-metafield.md
index 647317bf..e41a2c3d 100644
--- a/doc/models/update-metafield.md
+++ b/doc/models/update-metafield.md
@@ -12,8 +12,8 @@
| `CurrentName` | `String` | Optional | - | String getCurrentName() | setCurrentName(String currentName) |
| `Name` | `String` | Optional | - | String getName() | setName(String name) |
| `Scope` | [`MetafieldScope`](../../doc/models/metafield-scope.md) | Optional | Warning: When updating a metafield's scope attribute, all scope attributes must be passed. Partially complete scope attributes will override the existing settings. | MetafieldScope getScope() | setScope(MetafieldScope scope) |
-| `InputType` | [`MetafieldInput`](../../doc/models/metafield-input.md) | Optional | Indicates how data should be added to the metafield. For example, a text type is just a string, so a given metafield of this type can have any value attached. On the other hand, dropdown and radio have a set of allowed values that can be input, and appear differently on a Public Signup Page. Defaults to 'text' | MetafieldInput getInputType() | setInputType(MetafieldInput inputType) |
-| `Enum` | `List` | Optional | Only applicable when input_type is radio or dropdown | List getEnum() | setEnum(List mEnum) |
+| `InputType` | [`MetafieldInput`](../../doc/models/metafield-input.md) | Optional | Indicates the type of metafield. A text metafield allows any string value. Dropdown and radio metafields have a set of values that can be selected. Defaults to 'text'. | MetafieldInput getInputType() | setInputType(MetafieldInput inputType) |
+| `Enum` | `List` | Optional | Only applicable when input_type is radio or dropdown. | List getEnum() | setEnum(List mEnum) |
## Example (as JSON)
diff --git a/doc/models/update-payment-profile.md b/doc/models/update-payment-profile.md
index 20324279..92cc7ddf 100644
--- a/doc/models/update-payment-profile.md
+++ b/doc/models/update-payment-profile.md
@@ -20,7 +20,7 @@
| `BillingCity` | `String` | Optional | The credit card or bank account billing address city (i.e. “Boston”). This value is merely passed through to the payment gateway. | String getBillingCity() | setBillingCity(String billingCity) |
| `BillingState` | `String` | Optional | The credit card or bank account billing address state (i.e. MA). This value is merely passed through to the payment gateway. This must conform to the [ISO_3166-1](https://en.wikipedia.org/wiki/ISO_3166-1#Current_codes) in order to be valid for tax locale purposes. | String getBillingState() | setBillingState(String billingState) |
| `BillingZip` | `String` | Optional | The credit card or bank account billing address zip code (i.e. 12345). This value is merely passed through to the payment gateway. | String getBillingZip() | setBillingZip(String billingZip) |
-| `BillingCountry` | `String` | Optional | The credit card or bank account billing address country, required in [ISO_3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format (i.e. “US”). This value is merely passed through to the payment gateway. Some gateways require country codes in a specific format. Please check your gateway’s documentation. If creating an ACH subscription, only US is supported at this time. | String getBillingCountry() | setBillingCountry(String billingCountry) |
+| `BillingCountry` | `String` | Optional | The credit card or bank account billing address country, required in [ISO_3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format (i.e. “US”). This value is merely passed through to the payment gateway. Some gateways require country codes in a specific format. Check your gateway’s documentation. If creating an ACH subscription, only US is supported at this time. | String getBillingCountry() | setBillingCountry(String billingCountry) |
| `BillingAddress2` | `String` | Optional | Second line of the customer’s billing address i.e. Apt. 100 | String getBillingAddress2() | setBillingAddress2(String billingAddress2) |
## Example (as JSON)
diff --git a/doc/models/update-subscription-component.md b/doc/models/update-subscription-component.md
index 95813a61..176f8fb6 100644
--- a/doc/models/update-subscription-component.md
+++ b/doc/models/update-subscription-component.md
@@ -33,7 +33,8 @@
"ending_quantity": 40,
"unit_price": 23.26
}
- ]
+ ],
+ "renew_prepaid_allocation": false
}
}
```
diff --git a/pom.xml b/pom.xml
index 6aceff1d..5c50d2c9 100644
--- a/pom.xml
+++ b/pom.xml
@@ -8,7 +8,7 @@
4.0.0
com.maxio
advanced-billing-sdk
- 7.0.1
+ 8.0.0
jar
Advanced Billing SDK
Ultimate billing and pricing flexibility for B2B SaaS.
@@ -43,12 +43,12 @@ Maxio integrates directly into your product, so you can seamlessly manage your p
io.apimatic
core-interfaces
- [0.3.3, 0.4)
+ [0.3.4, 0.4)
io.apimatic
core
- [0.6.13, 0.7)
+ [0.6.15, 0.7)
io.apimatic
diff --git a/src/main/java/com/maxio/advancedbilling/AdvancedBillingClient.java b/src/main/java/com/maxio/advancedbilling/AdvancedBillingClient.java
index bd5393e7..08233534 100644
--- a/src/main/java/com/maxio/advancedbilling/AdvancedBillingClient.java
+++ b/src/main/java/com/maxio/advancedbilling/AdvancedBillingClient.java
@@ -99,7 +99,7 @@ public final class AdvancedBillingClient implements Configuration {
private static final CompatibilityFactory compatibilityFactory = new CompatibilityFactoryImpl();
- private static String userAgent = "AB SDK Java:7.0.1 on OS {os-info}";
+ private static String userAgent = "AB SDK Java:8.0.0 on OS {os-info}";
/**
* Current API environment.
diff --git a/src/main/java/com/maxio/advancedbilling/controllers/AdvanceInvoiceController.java b/src/main/java/com/maxio/advancedbilling/controllers/AdvanceInvoiceController.java
index dbc60c72..03ec10ac 100644
--- a/src/main/java/com/maxio/advancedbilling/controllers/AdvanceInvoiceController.java
+++ b/src/main/java/com/maxio/advancedbilling/controllers/AdvanceInvoiceController.java
@@ -34,7 +34,7 @@ public AdvanceInvoiceController(GlobalConfiguration globalConfig) {
}
/**
- * Generate an invoice in advance for a subscription's next renewal date. [Please see our
+ * Generate an invoice in advance for a subscription's next renewal date. [See our
* docs](https://maxio.zendesk.com/hc/en-us/articles/24252026404749-Issue-Invoice-In-Advance)
* for more information on advance invoices, including eligibility on generating one; for the
* most part, they function like any other invoice, except they are issued early and have
@@ -139,8 +139,8 @@ private ApiCall prepareReadAdvanceInvoiceRequest(
* Void a subscription's existing advance invoice. Once voided, it can later be regenerated if
* desired. A `reason` is required in order to void, and the invoice must have an open status.
* Voiding will cause any prepayments and credits that were applied to the invoice to be
- * returned to the subscription. For a full overview of the impact of voiding, please [see our
- * help docs]($m/Invoice).
+ * returned to the subscription. For a full overview of the impact of voiding, [see our help
+ * docs]($m/Invoice).
* @param subscriptionId Required parameter: The Chargify id of the subscription
* @param body Optional parameter:
* @return Returns the Invoice response from the API call
diff --git a/src/main/java/com/maxio/advancedbilling/controllers/BillingPortalController.java b/src/main/java/com/maxio/advancedbilling/controllers/BillingPortalController.java
index 4dc5dcf3..a743c61e 100644
--- a/src/main/java/com/maxio/advancedbilling/controllers/BillingPortalController.java
+++ b/src/main/java/com/maxio/advancedbilling/controllers/BillingPortalController.java
@@ -53,7 +53,7 @@ public BillingPortalController(GlobalConfiguration globalConfig) {
* Billing. In order to prevent abuse & overuse, we ask that you request a new URL only when
* absolutely necessary. Management URLs are good for 65 days, so you should re-use a previously
* generated one as much as possible. If you use the URL frequently (such as to display on your
- * website), please **do not** make an API request to Advanced Billing every time.
+ * website), **do not** make an API request to Advanced Billing every time.
* @param customerId Required parameter: The Chargify id of the customer
* @param autoInvite Optional parameter: When set to 1, an Invitation email will be sent to
* the Customer. When set to 0, or not sent, an email will not be sent. Use in query:
diff --git a/src/main/java/com/maxio/advancedbilling/controllers/ComponentPricePointsController.java b/src/main/java/com/maxio/advancedbilling/controllers/ComponentPricePointsController.java
index e1c54496..0d6bee2e 100644
--- a/src/main/java/com/maxio/advancedbilling/controllers/ComponentPricePointsController.java
+++ b/src/main/java/com/maxio/advancedbilling/controllers/ComponentPricePointsController.java
@@ -246,9 +246,9 @@ private ApiCall prepareBulkCreateCom
}
/**
- * When updating a price point, it's prices can be updated as well by creating new prices or
- * editing / removing existing ones. Passing in a price bracket without an `id` will attempt to
- * create a new price. Including an `id` will update the corresponding price, and including the
+ * When updating a price point, prices can be updated as well by creating new prices or editing
+ * / removing existing ones. Passing in a price bracket without an `id` will attempt to create a
+ * new price. Including an `id` will update the corresponding price, and including the
* `_destroy` flag set to true along with the `id` will remove that price. Note: Custom price
* points cannot be updated directly. They must be edited through the Subscription.
* @param componentId Required parameter: The id or handle of the component. When using the
diff --git a/src/main/java/com/maxio/advancedbilling/controllers/ComponentsController.java b/src/main/java/com/maxio/advancedbilling/controllers/ComponentsController.java
index 17799b35..f5045f3b 100644
--- a/src/main/java/com/maxio/advancedbilling/controllers/ComponentsController.java
+++ b/src/main/java/com/maxio/advancedbilling/controllers/ComponentsController.java
@@ -50,7 +50,7 @@ public ComponentsController(GlobalConfiguration globalConfig) {
* schemes. Note that this is different from recurring quantity-based components, which DO NOT
* reset to zero at the start of every billing period. If you want to bill for a quantity of
* something that does not change unless you change it, then you want quantity components,
- * instead. For more information on components, please see our documentation
+ * instead. For more information on components, see our documentation
* [here](https://maxio.zendesk.com/hc/en-us/articles/24261141522189-Components-Overview).
* @param productFamilyId Required parameter: Either the product family's id or its handle
* prefixed with `handle:`
@@ -112,7 +112,7 @@ private ApiCall prepareCreateMeteredComponentRe
* usage charges that do not recur. For example, at the time of signup, you might want to charge
* your customer a one-time fee for onboarding or other services. The allocated quantity for
* one-time quantity-based components immediately gets reset back to zero after the allocation
- * is made. For more information on components, please see our documentation
+ * is made. For more information on components, see our documentation
* [here](https://maxio.zendesk.com/hc/en-us/articles/24261141522189-Components-Overview).
* @param productFamilyId Required parameter: Either the product family's id or its handle
* prefixed with `handle:`
@@ -167,8 +167,8 @@ private ApiCall prepareCreateQuantityBasedCompo
* This request will create a component definition of kind **on_off_component** under the
* specified product family. On/Off component can then be added and “allocated” for a
* subscription. On/off components are used for any flat fee, recurring add on (think $99/month
- * for tech support or a flat add on shipping fee). For more information on components, please
- * see our documentation
+ * for tech support or a flat add on shipping fee). For more information on components, see our
+ * documentation
* [here](https://maxio.zendesk.com/hc/en-us/articles/24261141522189-Components-Overview).
* @param productFamilyId Required parameter: Either the product family's id or its handle
* prefixed with `handle:`
@@ -226,7 +226,7 @@ private ApiCall prepareCreateOnOffComponentRequ
* over time on their subscription. In a sense, they are the mirror image of metered components;
* while metered components charge at the end of the period for the amount of units used,
* prepaid components are charged for at the time of purchase, and we subsequently keep track of
- * the usage against the amount purchased. For more information on components, please see our
+ * the usage against the amount purchased. For more information on components, see our
* documentation
* [here](https://maxio.zendesk.com/hc/en-us/articles/24261141522189-Components-Overview).
* @param productFamilyId Required parameter: Either the product family's id or its handle
@@ -287,7 +287,7 @@ private ApiCall prepareCreatePrepaidUsageCompon
* provides the component with the actual quantity used in computing what and how much will be
* billed each period for each subscription. So, instead of reporting usage directly for each
* component (as you would with metered components), the usage is derived from analysis of your
- * events. For more information on components, please see our documentation
+ * events. For more information on components, see our documentation
* [here](https://maxio.zendesk.com/hc/en-us/articles/24261141522189-Components-Overview).
* @param productFamilyId Required parameter: Either the product family's id or its handle
* prefixed with `handle:`
diff --git a/src/main/java/com/maxio/advancedbilling/controllers/CouponsController.java b/src/main/java/com/maxio/advancedbilling/controllers/CouponsController.java
index d1085bb7..aa49ad98 100644
--- a/src/main/java/com/maxio/advancedbilling/controllers/CouponsController.java
+++ b/src/main/java/com/maxio/advancedbilling/controllers/CouponsController.java
@@ -45,10 +45,10 @@ public CouponsController(GlobalConfiguration globalConfig) {
/**
* ## Coupons Documentation Coupons can be administered in the Advanced Billing application or
- * created via API. Please view our section on [creating
+ * created via API. View our section on [creating
* coupons](https://maxio.zendesk.com/hc/en-us/articles/24261212433165-Creating-Editing-Deleting-Coupons)
* for more information. Additionally, for documentation on how to apply a coupon to a
- * subscription within the Advanced Billing UI, please see our documentation
+ * subscription within the Advanced Billing UI, see our documentation
* [here](https://maxio.zendesk.com/hc/en-us/articles/24261259337101-Coupons-and-Subscriptions).
* ## Create Coupon This request will create a coupon, based on the provided information. You
* can create either a flat amount coupon, by specyfing `amount_in_cents`, or percentage coupon
@@ -102,9 +102,7 @@ private ApiCall prepareCreateCouponRequest(
}
/**
- * List coupons for a specific Product Family in a Site. If the coupon is set to
- * `use_site_exchange_rate: true`, it will return pricing based on the current exchange rate. If
- * the flag is set to false, it will return all of the defined prices for each currency.
+ * List coupons for a specific Product Family in a Site.
* @param input ListCouponsForProductFamilyInput object containing request parameters
* @return Returns the List of CouponResponse response from the API call
* @throws ApiException Represents error response from the server.
@@ -364,9 +362,7 @@ private ApiCall prepareArchiveCouponRequest(
}
/**
- * You can retrieve a list of coupons. If the coupon is set to `use_site_exchange_rate: true`,
- * it will return pricing based on the current exchange rate. If the flag is set to false, it
- * will return all of the defined prices for each currency.
+ * You can retrieve a list of coupons.
* @param input ListCouponsInput object containing request parameters
* @return Returns the List of CouponResponse response from the API call
* @throws ApiException Represents error response from the server.
@@ -413,8 +409,8 @@ private ApiCall, ApiException> prepareListCouponsRequest(
* This request will provide details about the coupon usage as an array of data hashes, one per
* product.
* @param productFamilyId Required parameter: The Advanced Billing id of the product family to
- * which the coupon belongs
- * @param couponId Required parameter: The Advanced Billing id of the coupon
+ * which the coupon belongs.
+ * @param couponId Required parameter: The Advanced Billing id of the coupon.
* @return Returns the List of CouponUsage response from the API call
* @throws ApiException Represents error response from the server.
* @throws IOException Signals that an I/O exception of some sort has occurred.
@@ -576,7 +572,7 @@ private ApiCall prepareCreateOrUpdateCoupo
* create coupon subcodes in the Advanced Billing UI can be located
* [here](https://maxio.zendesk.com/hc/en-us/articles/24261208729229-Coupon-Codes).
* Additionally, for documentation on how to apply a coupon to a Subscription within the
- * Advanced Billing UI, please see our documentation
+ * Advanced Billing UI, see our documentation
* [here](https://maxio.zendesk.com/hc/en-us/articles/24261259337101-Coupons-and-Subscriptions).
* ## Create Coupon Subcode This request allows you to create specific subcodes underneath an
* existing coupon code. *Note*: If you are using any of the allowed special characters ("%",
diff --git a/src/main/java/com/maxio/advancedbilling/controllers/CustomFieldsController.java b/src/main/java/com/maxio/advancedbilling/controllers/CustomFieldsController.java
index 65a576a7..b072cc8c 100644
--- a/src/main/java/com/maxio/advancedbilling/controllers/CustomFieldsController.java
+++ b/src/main/java/com/maxio/advancedbilling/controllers/CustomFieldsController.java
@@ -45,31 +45,23 @@ public CustomFieldsController(GlobalConfiguration globalConfig) {
}
/**
- * ## Custom Fields: Metafield Intro **Advanced Billing refers to Custom Fields in the API
- * documentation as metafields and metadata.** Within the Advanced Billing UI, metadata and
- * metafields are grouped together under the umbrella of "Custom Fields." All of our UI-based
- * documentation that references custom fields will not cite the terminology metafields or
- * metadata. + **Metafield is the custom field** + **Metadata is the data populating the custom
- * field.** Advanced Billing Metafields are used to add meaningful attributes to subscription
- * and customer resources. Full documentation on how to create Custom Fields in the Advanced
- * Billing UI can be located
- * [here](https://maxio.zendesk.com/hc/en-us/sections/24266118312589-Custom-Fields). For
- * additional documentation on how to record data within custom fields, please see our
- * subscription-based documentation
- * [here](https://maxio.zendesk.com/hc/en-us/articles/24251701302925-Subscription-Summary-Custom-Fields-Tab).
- * Metafield are the place where you will set up your resource to accept additional data. It is
- * scoped to the site instead of a specific customer or subscription. Think of it as the key,
- * and Metadata as the value on every record. ## Create Metafields Use this endpoint to create
- * metafields for your Site. Metafields can be populated with metadata after the fact. Each site
- * is limited to 100 unique Metafields (i.e. keys, or names) per resource. This means you can
- * have 100 Metafields for Subscription and another 100 for Customer. ### Metafields
- * "On-the-Fly" It is possible to create Metafields “on the fly” when you create your Metadata –
- * if a non-existent name is passed when creating Metadata, a Metafield for that key will be
- * automatically created. The Metafield API, however, gives you more control over your “keys”.
- * ### Metafield Scope Warning If configuring metafields in the Admin UI or via the API, be
- * careful sending updates to metafields with the scope attribute – **if a partial update is
- * sent it will overwrite the current configuration**.
- * @param resourceType Required parameter: the resource type to which the metafields belong
+ * Creates metafields on a Site for either the Subscriptions or Customers resource. Metafields
+ * and their metadata are created in the Custom Fields configuration page on your Site.
+ * Metafields can be populated with metadata when you create them or later with the [Update
+ * Metafield]($e/Custom%20Fields/updateMetafield), [Create
+ * Metadata]($e/Custom%20Fields/createMetadata), or [Update
+ * Metadata]($e/Custom%20Fields/updateMetadata) endpoints. The Create Metadata and Update
+ * Metadata endpoints allow you to add metafields and metadata values to a specific subscription
+ * or customer. Each site is limited to 100 unique metafields per resource. This means you can
+ * have 100 metafields for Subscriptions and another 100 for Customers. > Note: After creating a
+ * metafield, the resource type cannot be modified. In the UI and product documentation,
+ * metafields and metadata are called Custom Fields. - Metafield is the custom field - Metadata
+ * is the data populating the custom field. See [Custom Fields
+ * Reference](https://docs.maxio.com/hc/en-us/articles/24266140850573-Custom-Fields-Reference)
+ * and [Custom Fields
+ * Tab](https://maxio.zendesk.com/hc/en-us/articles/24251701302925-Subscription-Summary-Custom-Fields-Tab)
+ * for information on using Custom Fields in the Advanced Billing UI.
+ * @param resourceType Required parameter: The resource type to which the metafields belong.
* @param body Optional parameter:
* @return Returns the List of Metafield response from the API call
* @throws ApiException Represents error response from the server.
@@ -116,8 +108,8 @@ private ApiCall, ApiException> prepareCreateMetafieldsRequest(
}
/**
- * This endpoint lists metafields associated with a site. The metafield description and usage is
- * contained in the response.
+ * Lists the metafields and their associated details for a Site and resource type. You can
+ * filter the request to a specific metafield.
* @param input ListMetafieldsInput object containing request parameters
* @return Returns the ListMetafieldsResponse response from the API call
* @throws ApiException Represents error response from the server.
@@ -162,9 +154,26 @@ private ApiCall prepareListMetafieldsReque
}
/**
- * Use the following method to update metafields for your Site. Metafields can be populated with
- * metadata after the fact.
- * @param resourceType Required parameter: the resource type to which the metafields belong
+ * Updates metafields on your Site for a resource type. Depending on the request structure, you
+ * can update or add metafields and metadata to the Subscriptions or Customers resource. With
+ * this endpoint, you can: - Add metafields. If the metafield specified in current_name does not
+ * exist, a new metafield is added. >Note: Each site is limited to 100 unique metafields per
+ * resource. This means you can have 100 metafields for Subscriptions and another 100 for
+ * Customers. - Change the name of a metafield. >Note: To keep the metafield name the same and
+ * only update the metadata for the metafield, you must use the current metafield name in both
+ * the `current_name` and `name` parameters. - Change the input type for the metafield. For
+ * example, you can change a metafield input type from text to a dropdown. If you change the
+ * input type from text to a dropdown or radio, you must update the specific subscriptions or
+ * customers where the metafield was used to reflect the updated metafield and metadata. - Add
+ * metadata values to the existing metadata for a dropdown or radio metafield. >Note: Updates to
+ * metadata overwrite. To add one or more values, you must specify all metadata values including
+ * the new value you want to add. - Add new metadata to a dropdown or radio for a metafield that
+ * was created without metadata. - Remove metadata for a dropdown or radio for a metafield.
+ * >Note: Updates to metadata overwrite existing values. To remove one or more values, specify
+ * all metadata values except those you want to remove. - Add or update scope settings for a
+ * metafield. >Note: Scope changes overwrite existing settings. You must specify the complete
+ * scope, including the changes you want to make.
+ * @param resourceType Required parameter: The resource type to which the metafields belong.
* @param body Optional parameter:
* @return Returns the List of Metafield response from the API call
* @throws ApiException Represents error response from the server.
@@ -211,10 +220,9 @@ private ApiCall, ApiException> prepareUpdateMetafieldRequest(
}
/**
- * Use the following method to delete a metafield. This will remove the metafield from the Site.
- * Additionally, this will remove the metafield and associated metadata with all Subscriptions
- * on the Site.
- * @param resourceType Required parameter: the resource type to which the metafields belong
+ * Deletes a metafield from your Site. Removes the metafield and associated metadata from all
+ * Subscriptions or Customers resources on the Site.
+ * @param resourceType Required parameter: The resource type to which the metafields belong.
* @param name Optional parameter: The name of the metafield to be deleted
* @throws ApiException Represents error response from the server.
* @throws IOException Signals that an I/O exception of some sort has occurred.
@@ -254,26 +262,15 @@ private ApiCall prepareDeleteMetafieldRequest(
}
/**
- * ## Custom Fields: Metadata Intro **Advanced Billing refers to Custom Fields in the API
- * documentation as metafields and metadata.** Within the Advanced Billing UI, metadata and
- * metafields are grouped together under the umbrella of "Custom Fields." All of our UI-based
- * documentation that references custom fields will not cite the terminology metafields or
- * metadata. + **Metafield is the custom field** + **Metadata is the data populating the custom
- * field.** Advanced Billing Metafields are used to add meaningful attributes to subscription
- * and customer resources. Full documentation on how to create Custom Fields in the Advanced
- * Billing UI can be located
- * [here](https://maxio.zendesk.com/hc/en-us/articles/24266164865677-Custom-Fields-Overview).
- * For additional documentation on how to record data within custom fields, please see our
- * subscription-based documentation
- * [here.](https://maxio.zendesk.com/hc/en-us/articles/24251701302925-Subscription-Summary-Custom-Fields-Tab)
- * Metadata is associated to a customer or subscription, and corresponds to a Metafield. When
- * creating a new metadata object for a given record, **if the metafield is not present it will
- * be created**. ## Metadata limits Metadata values are limited to 2kB in size. Additonally,
- * there are limits on the number of unique metafields available per resource. ## Create
- * Metadata This method will create a metafield for the site on the fly if it does not already
- * exist, and populate the metadata value. ### Subscription or Customer Resource Please pay
- * special attention to the resource you use when creating metadata.
- * @param resourceType Required parameter: the resource type to which the metafields belong
+ * Creates metadata and metafields for a specific subscription or customer, or updates metadata
+ * values of existing metafields for a subscription or customer. Metadata values are limited to
+ * 2 KB in size. If you create metadata on a subscription or customer with a metafield that does
+ * not already exist, the metafield is created with the metadata you specify and it is always
+ * added as a text field. You can update the input_type for the metafield with the [Update
+ * Metafield]($e/Custom%20Fields/updateMetafield) endpoint. >Note: Each site is limited to 100
+ * unique metafields per resource. This means you can have 100 metafields for Subscriptions and
+ * another 100 for Customers.
+ * @param resourceType Required parameter: The resource type to which the metafields belong.
* @param resourceId Required parameter: The Advanced Billing id of the customer or the
* subscription for which the metadata applies
* @param body Optional parameter:
@@ -326,9 +323,7 @@ private ApiCall, ApiException> prepareCreateMetadataRequest(
}
/**
- * This request will list all of the metadata belonging to a particular resource (ie.
- * subscription, customer) that is specified. ## Metadata Data This endpoint will also display
- * the current stats of your metadata to use as a tool for pagination.
+ * Lists metadata and metafields for a specific customer or subscription.
* @param input ListMetadataInput object containing request parameters
* @return Returns the PaginatedMetadata response from the API call
* @throws ApiException Represents error response from the server.
@@ -371,9 +366,15 @@ private ApiCall prepareListMetadataRequest(
}
/**
- * This method allows you to update the existing metadata associated with a subscription or
- * customer.
- * @param resourceType Required parameter: the resource type to which the metafields belong
+ * Updates metadata and metafields on the Site and the customer or subscription specified, and
+ * updates the metadata value on a subscription or customer. If you update metadata on a
+ * subscription or customer with a metafield that does not already exist, the metafield is
+ * created with the metadata you specify and it is always added as a text field to the Site and
+ * to the subscription or customer you specify. You can update the input_type for the metafield
+ * with the Update Metafield endpoint. Each site is limited to 100 unique metafields per
+ * resource. This means you can have 100 metafields for Subscription and another 100 for
+ * Customer.
+ * @param resourceType Required parameter: The resource type to which the metafields belong.
* @param resourceId Required parameter: The Advanced Billing id of the customer or the
* subscription for which the metadata applies
* @param body Optional parameter:
@@ -426,15 +427,9 @@ private ApiCall, ApiException> prepareUpdateMetadataRequest(
}
/**
- * This method removes the metadata from the subscriber/customer cited. ## Query String Usage
- * For instance if you wanted to delete the metadata for customer 99 named weight you would
- * request: ``` https://acme.chargify.com/customers/99/metadata.json?name=weight ``` If you want
- * to delete multiple metadata fields for a customer 99 named: `weight` and `age` you wrould
- * request: ``` https://acme.chargify.com/customers/99/metadata.json?names[]=weight&names[]=age
- * ``` ## Successful Response For a success, there will be a code `200` and the plain text
- * response `true`. ## Unsuccessful Response When a failed response is encountered, you will
- * receive a `404` response and the plain text response of `true`.
- * @param resourceType Required parameter: the resource type to which the metafields belong
+ * Deletes one or more metafields (and associated metadata) from the specified subscription or
+ * customer.
+ * @param resourceType Required parameter: The resource type to which the metafields belong.
* @param resourceId Required parameter: The Advanced Billing id of the customer or the
* subscription for which the metadata applies
* @param name Optional parameter: Name of field to be removed.
@@ -486,12 +481,7 @@ private ApiCall prepareDeleteMetadataRequest(
}
/**
- * This method will provide you information on usage of metadata across your selected resource
- * (ie. subscriptions, customers) ## Metadata Data This endpoint will also display the current
- * stats of your metadata to use as a tool for pagination. ### Metadata for multiple records
- * `https://acme.chargify.com/subscriptions/metadata.json?resource_ids[]=1&resource_ids[]=2` ##
- * Read Metadata for a Site This endpoint will list the number of pages of metadata information
- * that are contained within a site.
+ * Lists metadata for a specified array of subscriptions or customers.
* @param input ListMetadataForResourceTypeInput object containing request parameters
* @return Returns the PaginatedMetadata response from the API call
* @throws ApiException Represents error response from the server.
diff --git a/src/main/java/com/maxio/advancedbilling/controllers/CustomersController.java b/src/main/java/com/maxio/advancedbilling/controllers/CustomersController.java
index c05b33b5..a99a62bf 100644
--- a/src/main/java/com/maxio/advancedbilling/controllers/CustomersController.java
+++ b/src/main/java/com/maxio/advancedbilling/controllers/CustomersController.java
@@ -48,12 +48,12 @@ public CustomersController(GlobalConfiguration globalConfig) {
* [here](https://maxio.zendesk.com/hc/en-us/articles/24252190590093-Customer-Details). ##
* Required Country Format Advanced Billing requires that you use the ISO Standard Country codes
* when formatting country attribute of the customer. Countries should be formatted as 2
- * characters. For more information, please see the following wikipedia article on
+ * characters. For more information, see the following wikipedia article on
* [ISO_3166-1.](http://en.wikipedia.org/wiki/ISO_3166-1#Current_codes) ## Required State Format
* Advanced Billing requires that you use the ISO Standard State codes when formatting state
* attribute of the customer. + US States (2 characters):
* [ISO_3166-2](https://en.wikipedia.org/wiki/ISO_3166-2:US) + States Outside the US (2-3
- * characters): To find the correct state codes outside of the US, please go to
+ * characters): To find the correct state codes outside of the US, go to
* [ISO_3166-1](http://en.wikipedia.org/wiki/ISO_3166-1#Current_codes) and click on the link in
* the “ISO 3166-2 codes” column next to country you wish to populate. ## Locale Advanced
* Billing allows you to attribute a language/region to your customer to deliver invoices in any
@@ -104,7 +104,7 @@ private ApiCall prepareCreateCustomerRequest(
* Use the search feature with the `q` query parameter to retrieve an array of customers that
* matches the search query. Common use cases are: + Search by an email + Search by an Advanced
* Billing ID + Search by an organization + Search by a reference value from your application +
- * Search by a first or last name To retrieve a single, exact match by reference, please use the
+ * Search by a first or last name To retrieve a single, exact match by reference, use the
* [lookup
* endpoint](https://developers.chargify.com/docs/api-docs/b710d8fbef104-read-customer-by-reference).
* @param input ListCustomersInput object containing request parameters
diff --git a/src/main/java/com/maxio/advancedbilling/controllers/InvoicesController.java b/src/main/java/com/maxio/advancedbilling/controllers/InvoicesController.java
index 6aa1d7ba..a20bfb1e 100644
--- a/src/main/java/com/maxio/advancedbilling/controllers/InvoicesController.java
+++ b/src/main/java/com/maxio/advancedbilling/controllers/InvoicesController.java
@@ -707,18 +707,28 @@ private ApiCall prepareListConsolidatedInvoic
* "handle:gold-product", "quantity": 1 } ], "coupons": [ { "code": "COUPONCODE", "percentage":
* 50.0 } ] } } ``` If You want to use existing coupon for discount creation, only `code` and
* optional `product_family_id` is needed ```json ... "coupons": [ { "code": "FREESETUP",
- * "product_family_id": 1 } ] ... ``` ### Coupon options #### Code Coupon `code` will be
- * displayed on invoice discount section. Coupon code can only contain uppercase letters,
- * numbers, and allowed special characters. Lowercase letters will be converted to uppercase. It
- * can be used to select an existing coupon from the catalog, or as an ad hoc coupon when passed
- * with `percentage` or `amount`. #### Percentage Coupon `percentage` can take values from 0 to
- * 100 and up to 4 decimal places. It cannot be used with `amount`. Only for ad hoc coupons,
- * will be ignored if `code` is used to select an existing coupon from the catalog. #### Amount
- * Coupon `amount` takes number value. It cannot be used with `percentage`. Used only when not
- * matching existing coupon by `code`. #### Description Optional `description` will be displayed
- * with coupon `code`. Used only when not matching existing coupon by `code`. #### Product
- * Family id Optional `product_family_id` handle (with handle: prefix) or id is used to match
- * existing coupon within site, when codes are not unique. #### Compounding Strategy Optional
+ * "product_family_id": 1 } ] ... ``` #### Using Coupon Subcodes You can also use coupon
+ * subcodes to apply existing coupons with specific subcodes: ```json ... "coupons": [ {
+ * "subcode": "SUB1", "product_family_id": 1 } ] ... ``` **Important:** You cannot specify both
+ * `code` and `subcode` for the same coupon. Use either: - `code` to apply a main coupon -
+ * `subcode` to apply a specific coupon subcode The API response will include both the main
+ * coupon code and the subcode used: ```json ... "coupons": [ { "code": "MAIN123", "subcode":
+ * "SUB1", "product_family_id": 1, "percentage": 10, "description": "Special discount" } ] ...
+ * ``` ### Coupon options #### Code Coupon `code` will be displayed on invoice discount section.
+ * Coupon code can only contain uppercase letters, numbers, and allowed special characters.
+ * Lowercase letters will be converted to uppercase. It can be used to select an existing coupon
+ * from the catalog, or as an ad hoc coupon when passed with `percentage` or `amount`. ####
+ * Subcode Coupon `subcode` allows you to apply existing coupons using their subcodes. When a
+ * subcode is used, the API response will include both the main coupon code and the specific
+ * subcode that was applied. Subcodes are case-insensitive and will be converted to uppercase
+ * automatically. #### Percentage Coupon `percentage` can take values from 0 to 100 and up to 4
+ * decimal places. It cannot be used with `amount`. Only for ad hoc coupons, will be ignored if
+ * `code` is used to select an existing coupon from the catalog. #### Amount Coupon `amount`
+ * takes number value. It cannot be used with `percentage`. Used only when not matching existing
+ * coupon by `code`. #### Description Optional `description` will be displayed with coupon
+ * `code`. Used only when not matching existing coupon by `code`. #### Product Family id
+ * Optional `product_family_id` handle (with handle: prefix) or id is used to match existing
+ * coupon within site, when codes are not unique. #### Compounding Strategy Optional
* `compounding_strategy` for percentage coupons, can take values `compound` or `full-price`.
* For amount coupons, discounts will be always calculated against the original item price,
* before other discounts are applied. `compound` strategy: Percentage-based discounts will be
@@ -744,12 +754,11 @@ private ApiCall prepareListConsolidatedInvoic
* invoice creation. If a different due date is desired, the `net_terms` parameter can be sent
* indicating the number of days in advance the due date should be. #### Addresses The seller,
* shipping and billing addresses can be sent to override the site's defaults. Each address
- * requires to send a `first_name` at a minimum in order to work. Please see below for the
- * details on which parameters can be sent for each address object. #### Memo and Payment
- * Instructions A custom memo can be sent with the `memo` parameter to override the site's
- * default. Likewise, custom payment instructions can be sent with the `payment_instrucions`
- * parameter. #### Status By default, invoices will be created with open status. Possible
- * alternative is `draft`.
+ * requires to send a `first_name` at a minimum in order to work. See below for the details on
+ * which parameters can be sent for each address object. #### Memo and Payment Instructions A
+ * custom memo can be sent with the `memo` parameter to override the site's default. Likewise,
+ * custom payment instructions can be sent with the `payment_instrucions` parameter. #### Status
+ * By default, invoices will be created with open status. Possible alternative is `draft`.
* @param subscriptionId Required parameter: The Chargify id of the subscription
* @param body Optional parameter:
* @return Returns the InvoiceResponse response from the API call
@@ -799,14 +808,13 @@ private ApiCall prepareCreateInvoiceRequest(
* This endpoint allows for invoices to be programmatically delivered via email. This endpoint
* supports the delivery of both ad-hoc and automatically generated invoices. Additionally, this
* endpoint supports email delivery to direct recipients, carbon-copy (cc) recipients, and blind
- * carbon-copy (bcc) recipients. Please note that if no recipient email addresses are specified
- * in the request, then the subscription's default email configuration will be used. For
- * example, if `recipient_emails` is left blank, then the invoice will be delivered to the
- * subscription's customer email address. On success, a 204 no-content response will be
- * returned. Please note that this does not indicate that email(s) have been delivered, but
- * instead indicates that emails have been successfully queued for delivery. If _any_ invalid or
- * malformed email address is found in the request body, the entire request will be rejected and
- * a 422 response will be returned.
+ * carbon-copy (bcc) recipients. If no recipient email addresses are specified in the request,
+ * then the subscription's default email configuration will be used. For example, if
+ * `recipient_emails` is left blank, then the invoice will be delivered to the subscription's
+ * customer email address. On success, a 204 no-content response will be returned. The response
+ * does not indicate that email(s) have been delivered, but instead indicates that emails have
+ * been successfully queued for delivery. If _any_ invalid or malformed email address is found
+ * in the request body, the entire request will be rejected and a 422 response will be returned.
* @param uid Required parameter: The unique identifier for the invoice, this does not refer
* to the public facing invoice number.
* @param body Optional parameter:
diff --git a/src/main/java/com/maxio/advancedbilling/controllers/PaymentProfilesController.java b/src/main/java/com/maxio/advancedbilling/controllers/PaymentProfilesController.java
index 615c826b..f92437d2 100644
--- a/src/main/java/com/maxio/advancedbilling/controllers/PaymentProfilesController.java
+++ b/src/main/java/com/maxio/advancedbilling/controllers/PaymentProfilesController.java
@@ -40,111 +40,53 @@ public PaymentProfilesController(GlobalConfiguration globalConfig) {
}
/**
- * Use this endpoint to create a payment profile for a customer. Payment Profiles house the
- * credit card, ACH (Authorize.Net or Stripe only,) or PayPal (Braintree only,) data for a
- * customer. The payment information is attached to the customer within Advanced Billing, as
- * opposed to the Subscription itself. You must include a customer_id so that Advanced Billing
- * will attach it to the customer entry. If no customer_id is included the API will return a
- * 404. ## Create a Payment Profile for ACH usage If you would like to create a payment method
- * that is a Bank Account applicable for ACH payments use the following: ```json {
- * "payment_profile": { "customer_id": [Valid-Customer-ID], "bank_name": "Best Bank",
- * "bank_routing_number": "021000089", "bank_account_number": "111111111111",
- * "bank_account_type": "checking", "bank_account_holder_type": "business", "payment_type":
- * "bank_account" } } ``` ## Taxable Subscriptions If your subscriber pays taxes on their
- * purchased product, and you are attempting to create or update the `payment_profile`, complete
- * address information is required. For information on required address formatting to allow your
- * subscriber to be taxed, please see our documentation
- * [here](https://developers.chargify.com/docs/developer-docs/d2e9e34db740e-signups#taxes) ##
- * Payment Profile Documentation Full documentation on how Payment Profiles operate within
- * Advanced Billing can be located under the following links: + [Subscriber Payment
+ * Creates a payment profile for a customer. When you create a new payment profile for a
+ * customer via the API, it does not automatically make the profile current for any of the
+ * customer’s subscriptions. To use the payment profile as the default, you must set it
+ * explicitly for the subscription or subscription group. Select an option from the **Request
+ * Examples** drop-down on the right side of the portal to see examples of common scenarios for
+ * creating payment profiles. Do not use real card information for testing. See the Sites
+ * articles that cover [testing your site
+ * setup](https://docs.maxio.com/hc/en-us/articles/24250712113165-Testing-Overview#testing-overview-0-0)
+ * for more details on testing in your sandbox. Note that collecting and sending raw card
+ * details in production requires [PCI
+ * compliance](https://docs.maxio.com/hc/en-us/articles/24183956938381-PCI-Compliance#pci-compliance-0-0)
+ * on your end. If your business is not PCI compliant, use
+ * [Chargify.js](https://docs.maxio.com/hc/en-us/articles/38163190843789-Chargify-js-Overview#chargify-js-overview-0-0)
+ * to collect credit card or bank account information. See the following articles to learn more
+ * about subscriptions and payments: + [Subscriber Payment
* Details](https://maxio.zendesk.com/hc/en-us/articles/24251599929613-Subscription-Summary-Payment-Details-Tab)
* + [Self Service
* Pages](https://maxio.zendesk.com/hc/en-us/articles/24261425318541-Self-Service-Pages) (Allows
* credit card updates by Subscriber) + [Public Signup Pages payment
* settings](https://maxio.zendesk.com/hc/en-us/articles/24261368332557-Individual-Page-Settings)
- * ## Create a Payment Profile with a Chargify.js token ```json { "payment_profile": {
- * "customer_id": 1036, "chargify_token": "tok_w68qcpnftyv53jk33jv6wk3w" } } ``` ## Active
- * Payment Methods Creating a new payment profile for a Customer via the API will not make that
- * Payment Profile current for any of the Customer’s Subscriptions. In order to utilize the
- * payment profile as the default, it must be set as the default payment profile for the
- * subscription or subscription group. ## Requirements Either the full_number, expiration_month,
- * and expiration_year or if you have an existing vault_token from your gateway, that
- * vault_token and the current_vault are required. Passing in the vault_token and current_vault
- * are only allowed when creating a new payment profile. ### Taxable Subscriptions If your
- * subscriber pays taxes on their purchased product, and you are attempting to create or update
- * the `payment_profile`, complete address information is required. For information on required
- * address formatting to allow your subscriber to be taxed, please see our documentation
- * [here](https://developers.chargify.com/docs/developer-docs/d2e9e34db740e-signups#taxes) ##
- * BraintreeBlue Some merchants use Braintree JavaScript libraries directly and then pass
- * `payment_method_nonce` and/or `paypal_email` to create a payment profile. This implementation
- * is deprecated and does not handle 3D Secure. Instead, we have provided
- * [Chargify.js](https://developers.chargify.com/docs/developer-docs/ZG9jOjE0NjAzNDI0-overview)
- * which is continuously improved and supports Credit Cards (along with 3D Secure), PayPal and
- * ApplePay payment types. ## GoCardless For more information on GoCardless, please view the
- * following resources: + [Full documentation on
- * GoCardless](https://maxio.zendesk.com/hc/en-us/articles/24176159136909-GoCardless) + [Using
- * Chargify.js with GoCardless - minimal
+ * + [Taxes](https://developers.chargify.com/docs/developer-docs/d2e9e34db740e-signups#taxes) +
+ * [Chargify.js](https://docs.maxio.com/hc/en-us/articles/38163190843789-Chargify-js-Overview) +
+ * [Chargify.js with GoCardless - minimal
* example](https://docs.maxio.com/hc/en-us/articles/38206331271693-Examples#h_01K0PJ15QQZKCER8CFK40MR6XJ)
- * + [Using Chargify.js with GoCardless - full
+ * + [Chargify.js with GoCardless - full
* example](https://docs.maxio.com/hc/en-us/articles/38206331271693-Examples#h_01K0PJ15QR09JVHWW0MCA7HVJV)
- * ### GoCardless with Local Bank Details Following examples create customer, bank account and
- * mandate in GoCardless: ```json { "payment_profile": { "customer_id": "Valid-Customer-ID",
- * "bank_name": "Royal Bank of France", "bank_account_number": "0000000", "bank_routing_number":
- * "0003", "bank_branch_code": "00006", "payment_type": "bank_account", "billing_address": "20
- * Place de la Gare", "billing_city": "Colombes", "billing_state": "Île-de-France",
- * "billing_zip": "92700", "billing_country": "FR" } } ``` ### GoCardless with IBAN ```json {
- * "payment_profile": { "customer_id": "24907598", "bank_name": "French Bank", "bank_iban":
- * "FR1420041010050500013M02606", "payment_type": "bank_account", "billing_address": "20 Place
- * de la Gare", "billing_city": "Colombes", "billing_state": "Île-de-France", "billing_zip":
- * "92700", "billing_country": "FR" } } ``` ### Importing GoCardless If the customer, bank
- * account, and mandate already exist in GoCardless, a payment profile can be created by using
- * the IDs. In order to create masked versions of `bank_account_number` and
- * `bank_routing_number` that are used to display within Advanced Billing Admin UI, you can pass
- * the last four digits for this fields which then will be saved in this form
- * `XXXX[four-provided-digits]`. ```json { "payment_profile": { "customer_id": "24907598",
- * "customer_vault_token": [Existing GoCardless Customer ID] "vault_token": [Existing GoCardless
- * Mandate ID], "current_vault": "gocardless", "bank_name": "French Bank",
- * "bank_account_number": [Last Four Of The Existing Account Number or IBAN if applicable],
- * "bank_routing_number": [Last Four Of The Existing Routing Number], "payment_type":
- * "bank_account", "billing_address": "20 Place de la Gare", "billing_city": "Colombes",
- * "billing_state": "Île-de-France", "billing_zip": "92700", "billing_country": "FR" } } ``` ##
- * SEPA Direct Debit For more information on Stripe SEPA Direct Debit, please view the following
- * resources: + [Full documentation on Stripe SEPA Direct
- * Debit](https://maxio.zendesk.com/hc/en-us/articles/24176170430093-Stripe-SEPA-and-BECS-Direct-Debit)
- * + [Using Chargify.js with Stripe Direct Debit - minimal
+ * + [Chargify.js with Stripe Direct Debit - minimal
* example](https://docs.maxio.com/hc/en-us/articles/38206331271693-Examples#h_01K0PJ15QQFKKN8Z7B7DZ9AJS5)
- * + [Using Chargify.js with Stripe Direct Debit - full
+ * + [Chargify.js with Stripe Direct Debit - full
* example](https://docs.maxio.com/hc/en-us/articles/38206331271693-Examples#h_01K0PJ15QRECQQ4ECS3ZA55GY7)
- * ### Stripe SEPA Direct Debit Payment Profiles The following example creates a customer, bank
- * account and mandate in Stripe: ```json { "payment_profile": { "customer_id": "24907598",
- * "bank_name": "Deutsche bank", "bank_iban": "DE89370400440532013000", "payment_type":
- * "bank_account", "billing_address": "Test", "billing_city": "Berlin", "billing_state":
- * "Brandenburg", "billing_zip": "12345", "billing_country": "DE" } } ``` ## Stripe BECS Direct
- * Debit For more information on Stripe BECS Direct Debit, please view the following resources:
- * + [Full documentation on Stripe BECS Direct
- * Debit](https://maxio.zendesk.com/hc/en-us/articles/24176170430093-Stripe-SEPA-and-BECS-Direct-Debit)
- * + [Using Chargify.js with Stripe BECS Direct Debit - minimal
+ * + [Chargify.js with Stripe BECS Direct Debit - minimal
* example](https://developers.chargify.com/docs/developer-docs/ZG9jOjE0NjAzNDIy-examples#minimal-example-with-sepa-or-becs-direct-debit-stripe-gateway)
- * + [Using Chargify.js with Stripe BECS Direct Debit - full
+ * + [Chargify.js with Stripe BECS Direct Debit - full
* example](https://developers.chargify.com/docs/developer-docs/ZG9jOjE0NjAzNDIy-examples#full-example-with-sepa-direct-debit-stripe-gateway)
- * ### Stripe BECS Direct Debit Payment Profiles The following example creates a customer, bank
- * account and mandate in Stripe: ```json { "payment_profile": { "customer_id": "24907598",
- * "bank_name": "Australian bank", "bank_branch_code": "000000", "bank_account_number":
- * "000123456" "payment_type": "bank_account", "billing_address": "Test", "billing_city": "Stony
- * Rise", "billing_state": "Tasmania", "billing_zip": "12345", "billing_country": "AU" } } ```
- * ## Stripe BACS Direct Debit Contact the support team to enable this payment method. For more
- * information on Stripe BACS Direct Debit, please view the following resources: + [Full
- * documentation on Stripe BACS Direct
+ * + [Full documentation on
+ * GoCardless](https://maxio.zendesk.com/hc/en-us/articles/24176159136909-GoCardless) + [Full
+ * documentation on Stripe SEPA Direct
+ * Debit](https://maxio.zendesk.com/hc/en-us/articles/24176170430093-Stripe-SEPA-and-BECS-Direct-Debit)
+ * + [Full documentation on Stripe BECS Direct
+ * Debit](https://maxio.zendesk.com/hc/en-us/articles/24176170430093-Stripe-SEPA-and-BECS-Direct-Debit)
+ * + [Full documentation on Stripe BACS Direct
* Debit](https://maxio.zendesk.com/hc/en-us/articles/24176170430093-Stripe-SEPA-and-BECS-Direct-Debit)
- * ### Stripe BACS Direct Debit Payment Profiles The following example creates a customer, bank
- * account and mandate in Stripe: ```json { "payment_profile": { "customer_id": "24907598",
- * "bank_name": "British bank", "bank_branch_code": "108800", "bank_account_number": "00012345"
- * "payment_type": "bank_account", "billing_address": "Test", "billing_city": "London",
- * "billing_state": "LND", "billing_zip": "12345", "billing_country": "GB" } } ``` ## 3D Secure
- * - Checkout It may happen that a payment needs 3D Secure Authentication when the payment
- * profile is created; this is referred to in our help docs as a [post-authentication
+ * ## 3D Secure Authentication during payment profile creation. When a payment requires 3D
+ * Secure Authentication to adhear to Strong Customer Authentication (SCA) during payment
+ * profile creation, the request enters a [post-authentication
* flow](https://maxio.zendesk.com/hc/en-us/articles/24176278996493-Testing-Implementing-3D-Secure#psd2-flows-pre-authentication-and-post-authentication).
- * The server returns `422 Unprocessable Entity` in this case with the following response:
+ * In this case, a 422 Unprocessable Entity status is returned with the following response:
* ```json { "jsonapi": { "version": "1.0" }, "errors": [ { "title": "This card requires
* 3DSecure verification.", "detail": "This card requires 3D secure authentication. Redirect the
* customer to the URL from the action_link attribute to authenticate. Attach callback_url param
@@ -157,29 +99,28 @@ public PaymentProfilesController(GlobalConfiguration globalConfig) {
* "action_link":
* "https://checkout-test.chargifypay.test/3d-secure/checkout/pay_uerzhsxd5uhkbodx5jhvkg6yeu?one_time_token_id=93"
* } } ] } ``` To let the customer go through 3D Secure Authentication, they need to be
- * redirected to the URL specified in `action_link`. Optionally, you can specify `callback_url`
- * parameter in the `action_link` URL if you’d like to be notified about the result of 3D Secure
- * Authentication. The `callback_url` will return the following information: - whether the
- * authentication was successful (`success`) - the payment profile ID (`payment_profile_id`)
- * Lastly, you can also specify a `redirect_url` parameter within the `action_link` URL if you’d
- * like to redirect a customer back to your site. It is not possible to use `action_link` in an
- * iframe inside a custom application. You have to redirect the customer directly to the
- * `action_link`, then, to be notified about the result, use `redirect_url` or `callback_url`.
- * The final URL that you send a customer to complete 3D Secure may resemble the following,
- * where the first half is the `action_link` and the second half contains a `redirect_url` and
- * `callback_url`:
+ * redirected to the URL specified in `action_link`. Optionally, you can specify the
+ * `callback_url` parameter in the `action_link` URL to receive notification about the result of
+ * 3D Secure Authentication. The `callback_url` will return the following information: - whether
+ * the authentication was successful (`success`) - the payment profile ID (`payment_profile_id`)
+ * You can also specify a `redirect_url` parameter in the `action_link` URL to redirect the
+ * customer back to your site. You cannot use action_link in an iframe inside a custom
+ * application. You must redirect the customer directly to the `action_link` and use the
+ * `redirect_url` or `callback_url` to be notified of the result. The final URL that you send a
+ * customer to complete 3D Secure may resemble the following, where the first half is the
+ * `action_link` and the second half contains a `redirect_url` and `callback_url`:
* `https://checkout-test.chargifypay.test/3d-secure/checkout/pay_uerzhsxd5uhkbodx5jhvkg6yeu?one_time_token_id=93&callback_url=http://localhost:4000&redirect_url=https://yourpage.com`
- * ### Example Redirect Flow You may wish to redirect customers to different pages depending on
- * whether their SCA was performed successfully. Here's an example flow to use as a reference:
- * 1. Create a payment profile via API; it requires 3DS 2. You receive a `action_link` in the
- * response. 3. Use this `action_link` to, for example, connect with your internal resources or
- * generate a session_id 4. Include 1 of those attributes inside the `callback_url` and
- * `redirect_url` to be aware which “session” this applies to 5. Redirect the customer to the
- * `action_link` with `callback_url` and `redirect_url` applied 6. After the customer finishes
- * 3DS authentication, we let you know the result by making a request to applied `callback_url`.
- * 7. After that, we redirect the customer to the `redirect_url`; at this point the result of
- * authentication is known 8. Optionally, you can use the applied "msg" param in the
- * `redirect_url` to determine whether it was successful or not.
+ * ### Example Redirect Flow Here's an example flow to redirect customers to different pages
+ * depending on whether SCA was performed successfully: 1. Create a payment profile via the API;
+ * it requires 3DS. 2. You receive an `action_link` in the response. 3. Use this `action_link`
+ * to, for example, connect with your internal resources or generate a `session_id`. 4. Include
+ * one of those attributes inside the `callback_url` and `redirect_url` to be aware which
+ * “session” this applies to. 5. Redirect the customer to the `action_link` with `callback_url`
+ * and `redirect_url` applied 6. After the customer completes 3DS authentication, we notify you
+ * of the result via the applied `callback_url`. 7. After that, we redirect the customer to the
+ * `redirect_url`; at this point the result of authentication is known. 8. Optionally, you can
+ * use the applied "msg" param in the `redirect_url` to determine if the redirect was
+ * successful.
* @param body Optional parameter: When following the IBAN or the Local Bank details examples,
* a customer, bank account and mandate will be created in your current vault. If the
* customer, bank account, and mandate already exist in your vault, follow the Import
@@ -271,16 +212,16 @@ private ApiCall, ApiException> prepareListPaymentPr
}
/**
- * Using the GET method you can retrieve a Payment Profile identified by its unique ID. Please
- * note that a different JSON object will be returned if the card method on file is a bank
- * account. ### Response for Bank Account Example response for Bank Account: ``` {
- * "payment_profile": { "id": 10089892, "first_name": "Chester", "last_name": "Tester",
- * "created_at": "2025-01-01T00:00:00-05:00", "updated_at": "2025-01-01T00:00:00-05:00",
- * "customer_id": 14543792, "current_vault": "bogus", "vault_token": "0011223344",
- * "billing_address": "456 Juniper Court", "billing_city": "Boulder", "billing_state": "CO",
- * "billing_zip": "80302", "billing_country": "US", "customer_vault_token": null,
- * "billing_address_2": "", "bank_name": "Bank of Kansas City", "masked_bank_routing_number":
- * "XXXX6789", "masked_bank_account_number": "XXXX3344", "bank_account_type": "checking",
+ * Using the GET method you can retrieve a Payment Profile identified by its unique ID. Note
+ * that a different JSON object will be returned if the card method on file is a bank account.
+ * ### Response for Bank Account Example response for Bank Account: ``` { "payment_profile": {
+ * "id": 10089892, "first_name": "Chester", "last_name": "Tester", "created_at":
+ * "2025-01-01T00:00:00-05:00", "updated_at": "2025-01-01T00:00:00-05:00", "customer_id":
+ * 14543792, "current_vault": "bogus", "vault_token": "0011223344", "billing_address": "456
+ * Juniper Court", "billing_city": "Boulder", "billing_state": "CO", "billing_zip": "80302",
+ * "billing_country": "US", "customer_vault_token": null, "billing_address_2": "", "bank_name":
+ * "Bank of Kansas City", "masked_bank_routing_number": "XXXX6789",
+ * "masked_bank_account_number": "XXXX3344", "bank_account_type": "checking",
* "bank_account_holder_type": "personal", "payment_type": "bank_account",
* "site_gateway_setting_id": 1, "gateway_handle": null } } ```.
* @param paymentProfileId Required parameter: The Chargify id of the payment profile
diff --git a/src/main/java/com/maxio/advancedbilling/controllers/ProductFamiliesController.java b/src/main/java/com/maxio/advancedbilling/controllers/ProductFamiliesController.java
index 51d93b2e..f8ea3b53 100644
--- a/src/main/java/com/maxio/advancedbilling/controllers/ProductFamiliesController.java
+++ b/src/main/java/com/maxio/advancedbilling/controllers/ProductFamiliesController.java
@@ -38,7 +38,7 @@ public ProductFamiliesController(GlobalConfiguration globalConfig) {
}
/**
- * This method allows to retrieve a list of Products belonging to a Product Family.
+ * Retrieves a list of Products belonging to a Product Family.
* @param input ListProductsForProductFamilyInput object containing request parameters
* @return Returns the List of ProductResponse response from the API call
* @throws ApiException Represents error response from the server.
@@ -99,9 +99,9 @@ private ApiCall, ApiException> prepareListProductsForProdu
}
/**
- * This method will create a Product Family within your Advanced Billing site. Create a Product
- * Family to act as a container for your products, components and coupons. Full documentation on
- * how Product Families operate within the Advanced Billing UI can be located
+ * Creates a Product Family within your Advanced Billing site. Create a Product Family to act as
+ * a container for your products, components and coupons. Full documentation on how Product
+ * Families operate within the Advanced Billing UI can be located
* [here](https://maxio.zendesk.com/hc/en-us/articles/24261098936205-Product-Families).
* @param body Optional parameter:
* @return Returns the ProductFamilyResponse response from the API call
@@ -144,7 +144,7 @@ private ApiCall prepareCreateProductFamilyR
}
/**
- * This method allows to retrieve a list of Product Families for a site.
+ * Retrieve a list of Product Families for a site.
* @param input ListProductFamiliesInput object containing request parameters
* @return Returns the List of ProductFamilyResponse response from the API call
* @throws ApiException Represents error response from the server.
@@ -190,9 +190,9 @@ private ApiCall, ApiException> prepareListProductFam
}
/**
- * This method allows to retrieve a Product Family via the `product_family_id`. The response
- * will contain a Product Family object. The product family can be specified either with the id
- * number, or with the `handle:my-family` format.
+ * Retrieves a Product Family via the `product_family_id`. The response will contain a Product
+ * Family object. The product family can be specified either with the id number, or with the
+ * `handle:my-family` format.
* @param id Required parameter: The Advanced Billing id of the product family
* @return Returns the ProductFamilyResponse response from the API call
* @throws ApiException Represents error response from the server.
diff --git a/src/main/java/com/maxio/advancedbilling/controllers/ProductPricePointsController.java b/src/main/java/com/maxio/advancedbilling/controllers/ProductPricePointsController.java
index 56ae4d0b..c2602ddc 100644
--- a/src/main/java/com/maxio/advancedbilling/controllers/ProductPricePointsController.java
+++ b/src/main/java/com/maxio/advancedbilling/controllers/ProductPricePointsController.java
@@ -53,8 +53,9 @@ public ProductPricePointsController(GlobalConfiguration globalConfig) {
}
/**
- * [Product Price Point
- * Documentation](https://maxio.zendesk.com/hc/en-us/articles/24261111947789-Product-Price-Points).
+ * Creates a Product Price Point. See the [Product Price
+ * Point](https://maxio.zendesk.com/hc/en-us/articles/24261111947789-Product-Price-Points)
+ * documentation for details.
* @param productId Required parameter: The id or handle of the product. When using the
* handle, it must be prefixed with `handle:`
* @param body Optional parameter:
@@ -102,7 +103,7 @@ private ApiCall prepareCreateProductPri
}
/**
- * Use this endpoint to retrieve a list of product price points.
+ * Retrieves a list of product price points.
* @param input ListProductPricePointsInput object containing request parameters
* @return Returns the ListProductPricePointsResponse response from the API call
* @throws ApiException Represents error response from the server.
@@ -149,8 +150,7 @@ private ApiCall prepareListProduct
}
/**
- * Use this endpoint to update a product price point. Note: Custom product price points are not
- * able to be updated.
+ * Updates a product price point. Note: Custom product price points cannot be updated.
* @param productId Required parameter: The id or handle of the product. When using the
* handle, it must be prefixed with `handle:`. Example: `123` for an integer ID, or
* `handle:example-product-handle` for a string handle.
@@ -261,7 +261,7 @@ private ApiCall prepareReadProductPrice
}
/**
- * Use this endpoint to archive a product price point.
+ * Archives a product price point.
* @param productId Required parameter: The id or handle of the product. When using the
* handle, it must be prefixed with `handle:`. Example: `123` for an integer ID, or
* `handle:example-product-handle` for a string handle.
@@ -353,8 +353,8 @@ private ApiCall prepareUnarchiveProduct
}
/**
- * Use this endpoint to make a product price point the default for the product. Note: Custom
- * product price points are not able to be set as the default for a product.
+ * Sets a product price point as the default for the product. Note: Custom product price points
+ * cannot be set as the default for a product.
* @param productId Required parameter: The Advanced Billing id of the product to which the
* price point belongs
* @param pricePointId Required parameter: The Advanced Billing id of the product price point
@@ -397,7 +397,7 @@ private ApiCall preparePromoteProductPricePointTo
}
/**
- * Use this endpoint to create multiple product price points in one request.
+ * Creates multiple product price points in one request.
* @param productId Required parameter: The Advanced Billing id of the product to which the
* price points belong
* @param body Optional parameter:
@@ -445,11 +445,11 @@ private ApiCall prepareBulkC
}
/**
- * This endpoint allows you to create currency prices for a given currency that has been defined
- * on the site level in your settings. When creating currency prices, they need to mirror the
- * structure of your primary pricing. If the product price point defines a trial and/or setup
- * fee, each currency must also define a trial and/or setup fee. Note: Currency Prices are not
- * able to be created for custom product price points.
+ * Creates currency prices for a given currency that has been defined on the site level in your
+ * settings. When creating currency prices, they need to mirror the structure of your primary
+ * pricing. If the product price point defines a trial and/or setup fee, each currency must also
+ * define a trial and/or setup fee. Note: Currency Prices are not able to be created for custom
+ * product price points.
* @param productPricePointId Required parameter: The Advanced Billing id of the product price
* point
* @param body Optional parameter:
@@ -497,11 +497,11 @@ private ApiCall prepareCreateProductCurren
}
/**
- * This endpoint allows you to update the `price`s of currency prices for a given currency that
- * exists on the product price point. When updating the pricing, it needs to mirror the
- * structure of your primary pricing. If the product price point defines a trial and/or setup
- * fee, each currency must also define a trial and/or setup fee. Note: Currency Prices are not
- * able to be updated for custom product price points.
+ * Updates the `price`s of currency prices for a given currency that exists on the product price
+ * point. When updating the pricing, it needs to mirror the structure of your primary pricing.
+ * If the product price point defines a trial and/or setup fee, each currency must also define a
+ * trial and/or setup fee. Note: Currency Prices cannot be updated for custom product price
+ * points.
* @param productPricePointId Required parameter: The Advanced Billing id of the product price
* point
* @param body Optional parameter:
diff --git a/src/main/java/com/maxio/advancedbilling/controllers/ProductsController.java b/src/main/java/com/maxio/advancedbilling/controllers/ProductsController.java
index 30f0bcc2..69592ec1 100644
--- a/src/main/java/com/maxio/advancedbilling/controllers/ProductsController.java
+++ b/src/main/java/com/maxio/advancedbilling/controllers/ProductsController.java
@@ -36,7 +36,8 @@ public ProductsController(GlobalConfiguration globalConfig) {
}
/**
- * Use this method to create a product within your Advanced Billing site. + [Products
+ * Creates a product in your Advanced Billing site. See the following product docuemation for
+ * more information: + [Products
* Documentation](https://maxio.zendesk.com/hc/en-us/articles/24261090117645-Products-Overview)
* + [Changing a Subscription's
* Product](https://maxio.zendesk.com/hc/en-us/articles/24252069837581-Product-Changes-and-Migrations).
@@ -87,8 +88,7 @@ private ApiCall prepareCreateProductRequest(
}
/**
- * This endpoint allows you to read the current details of a product that you've created in
- * Advanced Billing.
+ * Reads the current details of a product.
* @param productId Required parameter: The Advanced Billing id of the product
* @return Returns the ProductResponse response from the API call
* @throws ApiException Represents error response from the server.
@@ -125,7 +125,7 @@ private ApiCall prepareReadProductRequest(
}
/**
- * Use this method to change aspects of an existing product. ### Input Attributes Update Notes +
+ * Updates aspects of an existing product. ### Input Attributes Update Notes +
* `update_return_params` The parameters we will append to your `update_return_url`. See Return
* URLs and Parameters ### Product Price Point Updating a product using this endpoint will
* create a new price point and set it as the default price point for this product. If you
@@ -176,10 +176,9 @@ private ApiCall prepareUpdateProductRequest(
}
/**
- * Sending a DELETE request to this endpoint will archive the product. All current subscribers
- * will be unffected; their subscription/purchase will continue to be charged monthly. This will
- * restrict the option to chose the product for purchase via the Billing Portal, as well as
- * disable Public Signup Pages for the product.
+ * Archives the product. All current subscribers will be unffected; their subscription/purchase
+ * will continue to be charged monthly. This will restrict the option to chose the product for
+ * purchase via the Billing Portal, as well as disable Public Signup Pages for the product.
* @param productId Required parameter: The Advanced Billing id of the product
* @return Returns the ProductResponse response from the API call
* @throws ApiException Represents error response from the server.
@@ -219,7 +218,7 @@ private ApiCall prepareArchiveProductRequest(
}
/**
- * This method allows to retrieve a Product object by its `api_handle`.
+ * Retrieves a Product object by its `api_handle`.
* @param apiHandle Required parameter: The handle of the product
* @return Returns the ProductResponse response from the API call
* @throws ApiException Represents error response from the server.
diff --git a/src/main/java/com/maxio/advancedbilling/controllers/ProformaInvoicesController.java b/src/main/java/com/maxio/advancedbilling/controllers/ProformaInvoicesController.java
index 650907bf..0af70e4e 100644
--- a/src/main/java/com/maxio/advancedbilling/controllers/ProformaInvoicesController.java
+++ b/src/main/java/com/maxio/advancedbilling/controllers/ProformaInvoicesController.java
@@ -182,8 +182,8 @@ private ApiCall prepareReadProformaInvoiceRequest
/**
* This endpoint will create a proforma invoice and return it as a response. If the information
* becomes outdated, simply void the old proforma invoice and generate a new one. If you would
- * like to preview the next billing amounts without generating a full proforma invoice, please
- * use the renewal preview endpoint. ## Restrictions Proforma invoices are only available on
+ * like to preview the next billing amounts without generating a full proforma invoice, use the
+ * renewal preview endpoint. ## Restrictions Proforma invoices are only available on
* Relationship Invoicing sites. To create a proforma invoice, the subscription must not be in a
* group, must not be prepaid, and must be in a live state.
* @param subscriptionId Required parameter: The Chargify id of the subscription
diff --git a/src/main/java/com/maxio/advancedbilling/controllers/SalesCommissionsController.java b/src/main/java/com/maxio/advancedbilling/controllers/SalesCommissionsController.java
index 09cc2951..23160763 100644
--- a/src/main/java/com/maxio/advancedbilling/controllers/SalesCommissionsController.java
+++ b/src/main/java/com/maxio/advancedbilling/controllers/SalesCommissionsController.java
@@ -45,8 +45,8 @@ public SalesCommissionsController(GlobalConfiguration globalConfig) {
* [here](https://developers.chargify.com/docs/developer-docs/ZG9jOjMyNzk5NTg0-2020-04-20-new-api-authentication).
* Access to the Sales Commission API endpoints is available to users with financial access,
* where the seller has the Advanced Analytics component enabled. For further information on
- * getting access to Advanced Analytics please contact Maxio support. > Note: The request is at
- * seller level, it means `<<subdomain>>` variable will be replaced by `app`.
+ * getting access to Advanced Analytics contact Maxio support. > Note: The request is at seller
+ * level, it means `<<subdomain>>` variable will be replaced by `app`.
* @param input ListSalesCommissionSettingsInput object containing request parameters
* @return Returns the List of SaleRepSettings response from the API call
* @throws ApiException Represents error response from the server.
@@ -101,8 +101,8 @@ private ApiCall, ApiException> prepareListSalesCommissionS
* [here](https://developers.chargify.com/docs/developer-docs/ZG9jOjMyNzk5NTg0-2020-04-20-new-api-authentication).
* Access to the Sales Commission API endpoints is available to users with financial access,
* where the seller has the Advanced Analytics component enabled. For further information on
- * getting access to Advanced Analytics please contact Maxio support. > Note: The request is at
- * seller level, it means `<<subdomain>>` variable will be replaced by `app`.
+ * getting access to Advanced Analytics contact Maxio support. > Note: The request is at seller
+ * level, it means `<<subdomain>>` variable will be replaced by `app`.
* @param input ListSalesRepsInput object containing request parameters
* @return Returns the List of ListSaleRepItem response from the API call
* @throws ApiException Represents error response from the server.
@@ -158,8 +158,8 @@ private ApiCall, ApiException> prepareListSalesRepsRequest
* [here](https://developers.chargify.com/docs/developer-docs/ZG9jOjMyNzk5NTg0-2020-04-20-new-api-authentication).
* Access to the Sales Commission API endpoints is available to users with financial access,
* where the seller has the Advanced Analytics component enabled. For further information on
- * getting access to Advanced Analytics please contact Maxio support. > Note: The request is at
- * seller level, it means `<<subdomain>>` variable will be replaced by `app`.
+ * getting access to Advanced Analytics contact Maxio support. > Note: The request is at seller
+ * level, it means `<<subdomain>>` variable will be replaced by `app`.
* @param sellerId Required parameter: The Chargify id of your seller account
* @param salesRepId Required parameter: The Advanced Billing id of sales rep.
* @param authorization Optional parameter: For authorization use user API key. See details
diff --git a/src/main/java/com/maxio/advancedbilling/controllers/SubscriptionComponentsController.java b/src/main/java/com/maxio/advancedbilling/controllers/SubscriptionComponentsController.java
index d9d4ab27..843ceef3 100644
--- a/src/main/java/com/maxio/advancedbilling/controllers/SubscriptionComponentsController.java
+++ b/src/main/java/com/maxio/advancedbilling/controllers/SubscriptionComponentsController.java
@@ -659,40 +659,35 @@ private ApiCall prepareDeletePrepaidUsageAllocationRequest(
}
/**
- * ## Documentation Full documentation on how to create Components in the Advanced Billing UI
- * can be located
+ * Records an instance of metered or prepaid usage for a subscription. You can report metered or
+ * prepaid usage to Advanced Billing as often as you wish. You can report usage as it happens or
+ * periodically, such as each night or once per billing period. Full documentation on how to
+ * create Components in the Advanced Billing UI can be located
* [here](https://maxio.zendesk.com/hc/en-us/articles/24261149711501-Create-Edit-and-Archive-Components).
- * Additionally, for information on how to record component usage against a subscription, please
- * see the following resources: + [Recording Metered Component
+ * Additionally, for information on how to record component usage against a subscription, see
+ * the following resources: It is not possible to record metered usage for more than one
+ * component at a time Usage should be reported as one API call per component on a single
+ * subscription. For example, to record that a subscriber has sent both an SMS Message and an
+ * Email, send an API call for each. See the following product documention articles for more
+ * information: - [Create and Manage
+ * Components](https://maxio.zendesk.com/hc/en-us/articles/24261149711501-Create-Edit-and-Archive-Components).
+ * A - [Recording Metered Component
* Usage](https://maxio.zendesk.com/hc/en-us/articles/24251890500109-Reporting-Component-Allocations#reporting-metered-component-usage)
- * + [Reporting Prepaid Component
+ * - [Reporting Prepaid Component
* Status](https://maxio.zendesk.com/hc/en-us/articles/24251890500109-Reporting-Component-Allocations#reporting-prepaid-component-status)
- * You may choose to report metered or prepaid usage to Advanced Billing as often as you wish.
- * You may report usage as it happens. You may also report usage periodically, such as each
- * night or once per billing period. If usage events occur in your system very frequently (on
- * the order of thousands of times an hour), it is best to accumulate usage into batches on your
- * side, and then report those batches less frequently, such as daily. This will ensure you
- * remain below any API throttling limits. If your use case requires higher rates of usage
- * reporting, we recommend utilizing Events Based Components. ## Create Usage for Subscription
- * This endpoint allows you to record an instance of metered or prepaid usage for a
- * subscription. The `quantity` from usage for each component is accumulated to the
- * `unit_balance` on the [Component Line Item](./b3A6MTQxMDgzNzQ-read-subscription-component)
- * for the subscription. ## Price Point ID usage If you are using price points, for metered and
- * prepaid usage components, Advanced Billing gives you the option to specify a price point in
- * your request. You do not need to specify a price point ID. If a price point is not included,
- * the default price point for the component will be used when the usage is recorded. If an
- * invalid `price_point_id` is submitted, the endpoint will return an error. ## Deducting Usage
- * In the event that you need to reverse a previous usage report or otherwise deduct from the
- * current usage balance, you may provide a negative quantity. Example: Previously recorded:
- * ```json { "usage": { "quantity": 5000, "memo": "Recording 5000 units" } } ``` At this point,
- * `unit_balance` would be `5000`. To reduce the balance to `0`, POST the following payload:
- * ```json { "usage": { "quantity": -5000, "memo": "Deducting 5000 units" } } ``` The
- * `unit_balance` has a floor of `0`; negative unit balances are never allowed. For example, if
- * the usage balance is 100 and you deduct 200 units, the unit balance would then be `0`, not
- * `-100`. ## FAQ Q. Is it possible to record metered usage for more than one component at a
- * time? A. No. Usage should be reported as one API call per component on a single subscription.
- * For example, to record that a subscriber has sent both an SMS Message and an Email, send an
- * API call for each.
+ * The `quantity` from usage for each component is accumulated to the `unit_balance` on the
+ * [Component Line Item]($e/Subscription%20Components/readSubscriptionComponent) for the
+ * subscription. ## Price Point ID usage If you are using price points, for metered and prepaid
+ * usage components Advanced Billing gives you the option to specify a price point in your
+ * request. You do not need to specify a price point ID. If a price point is not included, the
+ * default price point for the component will be used when the usage is recorded. ## Deducting
+ * Usage If you need to reverse a previous usage report or otherwise deduct from the current
+ * usage balance, you can provide a negative quantity. Example: Previously recorded quantity was
+ * 5000: ```json { "usage": { "quantity": 5000, "memo": "Recording 5000 units" } } ``` To reduce
+ * the quantity to `0`, POST the following payload: ```json { "usage": { "quantity": -5000,
+ * "memo": "Deducting 5000 units" } } ``` The `unit_balance` has a floor of `0`; negative unit
+ * balances are never allowed. For example, if the usage balance is 100 and you deduct 200
+ * units, the unit balance would then be `0`, not `-100`.
* @param subscriptionIdOrReference Required parameter: Either the Advanced Billing
* subscription ID (integer) or the subscription reference (string). Important: In cases
* where a numeric string value matches both an existing subscription ID and an existing
diff --git a/src/main/java/com/maxio/advancedbilling/controllers/SubscriptionGroupStatusController.java b/src/main/java/com/maxio/advancedbilling/controllers/SubscriptionGroupStatusController.java
index 374bd97f..a9aafda2 100644
--- a/src/main/java/com/maxio/advancedbilling/controllers/SubscriptionGroupStatusController.java
+++ b/src/main/java/com/maxio/advancedbilling/controllers/SubscriptionGroupStatusController.java
@@ -34,12 +34,12 @@ public SubscriptionGroupStatusController(GlobalConfiguration globalConfig) {
}
/**
- * This endpoint will immediately cancel all subscriptions within the specified group. The group
- * is identified by it's `uid` passed in the URL. To successfully cancel the group, the primary
- * subscription must be on automatic billing. The group members as well must be on automatic
- * billing or they must be prepaid. In order to cancel a subscription group while also charging
- * for any unbilled usage on metered or prepaid components, the `charge_unbilled_usage=true`
- * parameter must be included in the request.
+ * Cancels all subscriptions within the specified group immediately. The group is identified by
+ * the `uid` that is passed in the URL. To successfully cancel the group, the primary
+ * subscription must be on automatic billing. The group members must be on automatic billing or
+ * prepaid. To cancel a subscription group while also charging for any unbilled usage on metered
+ * or prepaid components, the `charge_unbilled_usage=true` parameter must be included in the
+ * request.
* @param uid Required parameter: The uid of the subscription group
* @param body Optional parameter:
* @throws ApiException Represents error response from the server.
@@ -83,7 +83,7 @@ private ApiCall prepareCancelSubscriptionsInGroupRequest(
/**
* This endpoint will schedule all subscriptions within the specified group to be canceled at
- * the end of their billing period. The group is identified by it's uid passed in the URL. All
+ * the end of their billing period. The group is identified by its uid passed in the URL. All
* subscriptions in the group must be on automatic billing in order to successfully cancel them,
* and the group must not be in a "past_due" state.
* @param uid Required parameter: The uid of the subscription group
diff --git a/src/main/java/com/maxio/advancedbilling/controllers/SubscriptionGroupsController.java b/src/main/java/com/maxio/advancedbilling/controllers/SubscriptionGroupsController.java
index 309128ce..6607e3b5 100644
--- a/src/main/java/com/maxio/advancedbilling/controllers/SubscriptionGroupsController.java
+++ b/src/main/java/com/maxio/advancedbilling/controllers/SubscriptionGroupsController.java
@@ -54,7 +54,11 @@ public SubscriptionGroupsController(GlobalConfiguration globalConfig) {
* `payment_profile_id`/`credit_card_attributes`/`bank_account_attributes` for the payment
* profile attached to the group. Only one of the `subscriptions` can have `"primary": true`
* attribute set. When passing product to a subscription you can use either `product_id` or
- * `product_handle` or `offer_id`. You can also use `custom_price` instead.
+ * `product_handle` or `offer_id`. You can also use `custom_price` instead. The subscription
+ * request examples below will be split into two sections. The first section, "Subscription
+ * Customization", will focus on passing different information with a subscription, such as
+ * components, calendar billing, and custom fields. These examples will presume you are using a
+ * secure chargify_token generated by Chargify.js.
* @param body Optional parameter:
* @return Returns the SubscriptionGroupSignupResponse response from the API call
* @throws ApiException Represents error response from the server.
@@ -372,16 +376,15 @@ private ApiCall prepareFindSubscrip
* subscription group. If the target customer or subscription is not part of a subscription
* group, a new group will be created and the subscription will become part of the group with
* the specified target customer set as the responsible payer for the group's subscriptions.
- * **Please Note:** In order to add an existing subscription to a subscription group, it must
- * belong to either the same customer record as the target, or be within the same customer
- * hierarchy. Rather than specifying a customer, the `target` parameter could instead simply
- * have a value of * `"self"` which indicates the subscription will be paid for not by some
- * other customer, but by the subscribing customer, * `"parent"` which indicates the
- * subscription will be paid for by the subscribing customer's parent within a customer
- * hierarchy, or * `"eldest"` which indicates the subscription will be paid for by the
- * root-level customer in the subscribing customer's hierarchy. To create a new subscription
- * into a subscription group, please reference the following: [Create Subscription in a
- * Subscription
+ * **Note:** In order to add an existing subscription to a subscription group, it must belong to
+ * either the same customer record as the target, or be within the same customer hierarchy.
+ * Rather than specifying a customer, the `target` parameter could instead simply have a value
+ * of * `"self"` which indicates the subscription will be paid for not by some other customer,
+ * but by the subscribing customer, * `"parent"` which indicates the subscription will be paid
+ * for by the subscribing customer's parent within a customer hierarchy, or * `"eldest"` which
+ * indicates the subscription will be paid for by the root-level customer in the subscribing
+ * customer's hierarchy. To create a new subscription into a subscription group, reference the
+ * following: [Create Subscription in a Subscription
* Group](https://developers.chargify.com/docs/api-docs/d571659cf0f24-create-subscription#subscription-in-a-subscription-group).
* @param subscriptionId Required parameter: The Chargify id of the subscription
* @param body Optional parameter:
diff --git a/src/main/java/com/maxio/advancedbilling/controllers/SubscriptionInvoiceAccountController.java b/src/main/java/com/maxio/advancedbilling/controllers/SubscriptionInvoiceAccountController.java
index 043a44a8..3d04011b 100644
--- a/src/main/java/com/maxio/advancedbilling/controllers/SubscriptionInvoiceAccountController.java
+++ b/src/main/java/com/maxio/advancedbilling/controllers/SubscriptionInvoiceAccountController.java
@@ -86,7 +86,7 @@ private ApiCall prepareReadAccountBalancesRequest
* the `amount, memo, details, method`. When the `method` specified is `"credit_card_on_file"`,
* the prepayment amount will be collected using the default credit card payment profile and
* applied to the prepayment account balance. This is especially useful for manual replenishment
- * of prepaid subscriptions. Please note that you **can't** pass `amount_in_cents`.
+ * of prepaid subscriptions. Note that passing `amount_in_cents` is now allowed.
* @param subscriptionId Required parameter: The Chargify id of the subscription
* @param body Optional parameter:
* @return Returns the CreatePrepaymentResponse response from the API call
diff --git a/src/main/java/com/maxio/advancedbilling/controllers/SubscriptionProductsController.java b/src/main/java/com/maxio/advancedbilling/controllers/SubscriptionProductsController.java
index 26fd45c9..4d7c1c2c 100644
--- a/src/main/java/com/maxio/advancedbilling/controllers/SubscriptionProductsController.java
+++ b/src/main/java/com/maxio/advancedbilling/controllers/SubscriptionProductsController.java
@@ -47,11 +47,11 @@ public SubscriptionProductsController(GlobalConfiguration globalConfig) {
* can be reactivated.) ## Migrations Documentation Full documentation on how to record
* Migrations in the Advanced Billing UI can be located
* [here](https://maxio.zendesk.com/hc/en-us/articles/24181589372429-Data-Migration-to-Advanced-Billing).
- * ## Failed Migrations One of the most common ways that a migration can fail is when the
- * attempt is made to migrate a subscription to it's current product. Please be aware of this
- * issue! ## Migration 3D Secure - Stripe It may happen that a payment needs 3D Secure
- * Authentication when the subscription is migrated to a new product; this is referred to in our
- * help docs as a [post-authentication
+ * ## Failed Migrations Importaint note: One of the most common ways that a migration can fail
+ * is when the attempt is made to migrate a subscription to its current product. ## Migration 3D
+ * Secure - Stripe When a payment requires 3D Secure Authentication to adhear to Strong Customer
+ * Authentication (SCA) when the subscription is migrated to a new product, the request enters a
+ * [post-authentication
* flow](https://maxio.zendesk.com/hc/en-us/articles/24176278996493-Testing-Implementing-3D-Secure#psd2-flows-pre-authentication-and-post-authentication).
* The server returns `422 Unprocessable Entity` in this case with the following response:
* ```json { "errors": [ "Your card was declined. This transaction requires 3D secure
@@ -78,8 +78,8 @@ public SubscriptionProductsController(GlobalConfiguration globalConfig) {
* half contains a `redirect_url` and `callback_url`:
* `https://mysite.chargify.com/3d-secure/pi_1FCm4RKDeye4C0XfbqquXRYm?one_time_token_id=128&callback_url=https://localhost:4000&redirect_url=https://yourpage.com`
* ### Example Redirect Flow You may wish to redirect customers to different pages depending on
- * whether their SCA was performed successfully. Here's an example flow to use as a reference:
- * 1. Create a migration via API; it requires 3DS 2. You receive a `gateway_payment_id` in the
+ * whether SCA was performed successfully. Here's an example flow to use as a reference: 1.
+ * Create a migration via API; it requires 3DS 2. You receive a `gateway_payment_id` in the
* `action_link` along other params in the response. 3. Use this `gateway_payment_id` to, for
* example, connect with your internal resources or generate a session_id 4. Include 1 of those
* attributes inside the `callback_url` and `redirect_url` to be aware which “session” this
diff --git a/src/main/java/com/maxio/advancedbilling/controllers/SubscriptionStatusController.java b/src/main/java/com/maxio/advancedbilling/controllers/SubscriptionStatusController.java
index 59a17069..b3bf360e 100644
--- a/src/main/java/com/maxio/advancedbilling/controllers/SubscriptionStatusController.java
+++ b/src/main/java/com/maxio/advancedbilling/controllers/SubscriptionStatusController.java
@@ -183,7 +183,7 @@ private ApiCall prepareResumeSubscriptionReq
/**
* This will place the subscription in the on_hold state and it will not renew. ## Limitations
- * You may not place a subscription on hold if the `next_billing` date is within 24 hours.
+ * You may not place a subscription on hold if the `next_billing_at` date is within 24 hours.
* @param subscriptionId Required parameter: The Chargify id of the subscription
* @param body Optional parameter:
* @return Returns the SubscriptionResponse response from the API call
@@ -285,12 +285,12 @@ private ApiCall prepareUpdateAutomaticSubscr
* details on how the reactivation works, and how to reactivate subscriptions through the
* application, see
* [reactivation](https://maxio.zendesk.com/hc/en-us/articles/24252109503629-Reactivating-and-Resuming).
- * **Please note: The term "resume" is used also during another process in Advanced Billing.
- * This occurs when an on-hold subscription is "resumed". This returns the subscription to an
- * active state.** + The response returns the subscription object in the `active` or `trialing`
- * state. + The `canceled_at` and `cancellation_message` fields do not have values. + The method
- * works for "Canceled" or "Trial Ended" subscriptions. + It will not work for items not marked
- * as "Canceled", "Unpaid", or "Trial Ended". ## Resume the current billing period for a
+ * **Note: The term "resume" is used also during another process in Advanced Billing. This
+ * occurs when an on-hold subscription is "resumed". This returns the subscription to an active
+ * state.** + The response returns the subscription object in the `active` or `trialing` state.
+ * + The `canceled_at` and `cancellation_message` fields do not have values. + The method works
+ * for "Canceled" or "Trial Ended" subscriptions. + It will not work for items not marked as
+ * "Canceled", "Unpaid", or "Trial Ended". ## Resume the current billing period for a
* subscription A subscription is considered "resumable" if you are attempting to reactivate
* within the billing period the subscription was canceled in. A resumed subscription's billing
* date remains the same as before it was canceled. In other words, it does not start a new
@@ -539,7 +539,7 @@ private ApiCall prepareCancelDunningRequest(
* Preview is an object representing a subscription’s next assessment. You can retrieve it to
* see a snapshot of how much your customer will be charged on their next renewal. The "Next
* Billing" amount and "Next Billing" date are already represented in the UI on each
- * Subscriber's Summary. For more information, please see our documentation
+ * Subscriber's Summary. For more information, see our documentation
* [here](https://maxio.zendesk.com/hc/en-us/articles/24252493695757-Subscriber-Interface-Overview).
* ## Optional Component Fields This endpoint is particularly useful due to the fact that it
* will return the computed billing amount for the base product and the components which are in
diff --git a/src/main/java/com/maxio/advancedbilling/controllers/SubscriptionsController.java b/src/main/java/com/maxio/advancedbilling/controllers/SubscriptionsController.java
index 43704145..edfb57d8 100644
--- a/src/main/java/com/maxio/advancedbilling/controllers/SubscriptionsController.java
+++ b/src/main/java/com/maxio/advancedbilling/controllers/SubscriptionsController.java
@@ -51,377 +51,27 @@ public SubscriptionsController(GlobalConfiguration globalConfig) {
}
/**
- * Full documentation on how subscriptions operate within Advanced Billing can be located under
- * the following topics: + [Subscriptions
- * Reference](https://maxio.zendesk.com/hc/en-us/articles/24251526991757-Subscription-Overview)
- * + [Subscriptions
- * Actions](https://maxio.zendesk.com/hc/en-us/articles/24251983024653-Subscription-Actions-Overview)
- * + [Subscription
- * Cancellation](https://maxio.zendesk.com/hc/en-us/articles/24251957778829-Cancel-Subscriptions)
- * + [Subscription
- * Reactivation](https://maxio.zendesk.com/hc/en-us/articles/24252109503629-Reactivating-and-Resuming)
- * + [Subscription Import](https://maxio.zendesk.com/hc/en-us/articles/24251489107213-Imports)
- * When creating a subscription, you must specify a product and a customer. Credit card details
- * may be required, depending on the options for the Product being subscribed ([see Product
- * Options](https://maxio.zendesk.com/hc/en-us/articles/24261076617869-Product-Editing)). The
- * product may be specified by `product_id` or by `product_handle` (API Handle). In similar
- * fashion, to pass a particular product price point, you may either use
- * `product_price_point_handle` or `product_price_point_id`. An existing customer may be
- * specified by a `customer_id` (ID within Advanced Billing) or a `customer_reference` (unique
- * value within your app that you have shared with Advanced Billing via the reference attribute
- * on a customer). You may also pass in an existing payment profile for that customer with
- * `payment_profile_id`. A new customer may be created by providing `customer_attributes`.
- * Credit card details may be required, depending on the options for the product being
- * subscribed. The product can be specified by `product_id` or by `product_handle` (API Handle).
- * If you are creating a subscription with a payment profile, the attribute to send will be
- * `credit_card_attributes` or `bank_account_attributes` for ACH and Direct Debit. That said,
- * when you read the subscription after creation, we return the profile details under
- * `credit_card` or `bank_account`. ## Bulk creation of subscriptions Bulk creation of
- * subscriptions is currently not supported. For scenarios where multiple subscriptions must be
- * added, particularly when assigning to the same subscription group, it is essential to switch
- * to a single-threaded approach. To avoid data conflicts or inaccuracies, incorporate a sleep
- * interval between requests. While this single-threaded approach may impact performance, it
- * ensures data consistency and accuracy in cases where concurrent creation attempts could
- * otherwise lead to issues with subscription alignment and integrity. ## Taxable Subscriptions
- * If your intent is to charge your subscribers tax via [Avalara
- * Taxes](https://maxio.zendesk.com/hc/en-us/articles/24287043035661-Avalara-VAT-Tax) or [Custom
- * Taxes](https://maxio.zendesk.com/hc/en-us/articles/24287044212749-Custom-Taxes), there are a
- * few considerations to be made regarding collecting subscription data. For subscribers to be
- * eligible to be taxed, the following information for the `customer` object or
- * `payment_profile` object must by supplied: + A subscription to a [taxable
- * product](https://maxio.zendesk.com/hc/en-us/articles/24261076617869-Product-Editing#tax-settings)
- * + [Full valid billing or shipping
- * address](https://maxio.zendesk.com/hc/en-us/articles/24287008131853-Advanced-Billing-Managed-Sales-Tax#full-address-required-for-taxable-subscriptions)
- * to identify the tax locale + The portion of the address that houses the [state
- * information](https://maxio.zendesk.com/hc/en-us/articles/24287008131853-Advanced-Billing-Managed-Sales-Tax#required-state-format-for-taxable-subscriptions)
- * of either adddress must adhere to the ISO standard of a 2-3 character limit/format. + The
- * portion of the address that houses the [country
- * information](https://maxio.zendesk.com/hc/en-us/articles/24287008131853-Advanced-Billing-Managed-Sales-Tax#required-country-format-for-taxable-subscriptions)
- * must adhere to the ISO standard of a 2 character limit/format. ## Subscription Request
- * Examples The subscription examples below will be split into two sections. The first section,
- * "Subscription Customization", will focus on passing different information with a
- * subscription, such as components, calendar billing, and custom fields. These examples will
- * presume you are using a secure `chargify_token` generated by Chargify.js. The second section,
- * "Passing Payment Information", will focus on passing payment information into Advanced
- * Billing. Please be aware that <b>collecting and sending Advanced Billing raw card details
- * requires PCI compliance on your end</b>; these examples are provided as guidance. If your
- * business is not PCI compliant, we recommend using Chargify.js to collect credit cards or bank
- * accounts. # Subscription Customization ## With Components Different components require
- * slightly different data. For example, quantity-based and on/off components accept
- * `allocated_quantity`, while metered components accept `unit_balance`. When creating a
- * subscription with a component, a `price_point_id` can be passed in along with the
- * `component_id` to specify which price point to use. If not passed in, the default price point
- * will be used. Note: if an invalid `price_point_id` is used, the subscription will still
- * proceed but will use the component's default price point. Components and their price points
- * may be added by ID or by handle. See the example request body labeled "Components By Handle
- * (Quantity-Based)"; the format will be the same for other component types. ## With Coupon(s)
- * Pass an array of `coupon_codes`. See the example request body "With Coupon". ## With Manual
- * Invoice Collection The `invoice` collection method works only on legacy Statement
- * Architecture. On Relationship Invoicing Architecture use the `remittance` collection method.
- * ## Prepaid Subscription A prepaid subscription can be created with the usual subscription
- * creation parameters, specifying `prepaid` as the `payment_collection_method` and including a
- * nested `prepaid_configuration`. After a prepaid subscription has been created, additional
- * funds can be manually added to the prepayment account through the [Create Prepayment
- * Endpoint](https://developers.chargify.com/docs/api-docs/7ec482de77ba7-create-prepayment).
- * Prepaid subscriptions do not work on legacy Statement Architecture. ## With Metafields
- * Metafields can either attach to subscriptions or customers. Metafields are popuplated with
- * the supplied metadata to the resource specified. If the metafield doesn't exist yet, it will
- * be created on-the-fly. ## With Custom Pricing Custom pricing is pricing specific to the
- * subscription in question. Create a subscription with custom pricing by passing pricing
- * information instead of a price point. For a custom priced product, pass the custom_price
- * object in place of `product_price_point_id`. For a custom priced component, pass the
- * `custom_price` object within the component object. Custom prices and price points can exist
- * in harmony on a subscription. # Passing Payment Information ## Subscription with Chargify.js
- * token The `chargify_token` can be obtained using
- * [Chargify.js](https://docs.maxio.com/hc/en-us/articles/38163190843789-Chargify-js-Overview#chargify-js-overview-0-0).
- * The token represents payment profile attributes that were provided by the customer in their
- * browser and stored at the payment gateway. The `payment_type` attribute may either be
- * `credit_card` or `bank_account`, depending on the type of payment method being added. If a
- * bank account is being passed, the payment attributes should be changed to
- * `bank_account_attributes`. ```json { "subscription": { "product_handle": "pro-plan",
- * "customer_attributes": { "first_name": "Joe", "last_name": "Smith", "email":
- * "j.smith{@literal @}example.com" }, "credit_card_attributes": { "chargify_token":
- * "tok_cwhvpfcnbtgkd8nfkzf9dnjn", "payment_type": "credit_card" } } } ``` ## Subscription with
- * vault token If you already have a customer and card stored in your payment gateway, you may
- * create a subscription with a `vault_token`. Providing the last_four, card type and expiration
- * date will allow the card to be displayed properly in the Advanced Billing UI. ```json {
- * "subscription": { "product_handle": "pro-plan", "customer_attributes": { "first_name": "Joe",
- * "last_name": "Smith", "email": "j.smith{@literal @}example.com" }, "credit_card_attributes": {
- * first_name: "Joe, last_name: "Smith", card_type: "visa", expiration_month: "05",
- * expiration_year: "2025", last_four: "1234", vault_token: "12345abc", current_vault:
- * "braintree_blue" } } ``` ## Subscription with ACH as Payment Profile ```json {
- * "subscription": { "product_handle": "gold-product", "customer_attributes": { "first_name":
- * "Joe", "last_name": "Blow", "email": "joe{@literal @}example.com", "zip": "02120", "state": "MA",
- * "reference": "XYZ", "phone": "(617) 111 - 0000", "organization": "Acme", "country": "US",
- * "city": "Boston", "address_2": null, "address": "123 Mass Ave." }, "bank_account_attributes":
- * { "bank_name": "Best Bank", "bank_routing_number": "021000089", "bank_account_number":
- * "111111111111", "bank_account_type": "checking", "bank_account_holder_type": "business",
- * "payment_type": "bank_account" } } } ``` ## Subscription with PayPal payment profile ### With
- * the nonce from Braintree JS ```json { "subscription": { "product_handle":"test-product-b",
- * "customer_attributes": { "first_name":"Amelia", "last_name":"Johnson",
- * "email":"amelia{@literal @}example.com", "organization":"My Awesome Company" },
- * "payment_profile_attributes":{ "paypal_email": "amelia{@literal @}example.com", "current_vault":
- * "braintree_blue", "payment_method_nonce":"abc123", "payment_type":"paypal_account" } } ```
- * ### With the Braintree Customer ID as the vault token: ```json { "subscription": {
- * "product_handle":"test-product-b", "customer_attributes": { "first_name":"Amelia",
- * "last_name":"Johnson", "email":"amelia{@literal @}example.com", "organization":"My Awesome Company" },
- * "payment_profile_attributes":{ "paypal_email": "amelia{@literal @}example.com", "current_vault":
- * "braintree_blue", "vault_token":"58271347", "payment_type":"paypal_account" } } ``` ##
- * Subscription using GoCardless Bank Number These examples creates a customer, bank account and
- * mandate in GoCardless. For more information on GoCardless, please view the following two
- * resources: + [Payment Profiles via API for
- * GoCardless](https://developers.chargify.com/docs/api-docs/1f10a4f170405-create-payment-profile#gocardless)
- * + [Full documentation on
- * GoCardless](https://maxio.zendesk.com/hc/en-us/articles/24176159136909-GoCardless) + [Using
- * Chargify.js with GoCardless - minimal
- * example](https://docs.maxio.com/hc/en-us/articles/38206331271693-Examples#h_01K0PJ15QQZKCER8CFK40MR6XJ)
- * + [Using Chargify.js with GoCardless - full
- * example](https://docs.maxio.com/hc/en-us/articles/38206331271693-Examples#h_01K0PJ15QR09JVHWW0MCA7HVJV)
- * ```json { "subscription": { "product_handle": "gold-product", "customer_attributes": {
- * "first_name": "Jane", "last_name": "Doe", "email": "jd{@literal @}chargify.test" },
- * "bank_account_attributes": { "bank_name": "Royal Bank of France", "bank_account_number":
- * "0000000", "bank_routing_number": "0003", "bank_branch_code": "00006", "payment_type":
- * "bank_account", "billing_address": "20 Place de la Gare", "billing_city": "Colombes",
- * "billing_state": "Île-de-France", "billing_zip": "92700", "billing_country": "FR" } } } ```
- * ## Subscription using GoCardless IBAN Number ```json { "subscription": { "product_handle":
- * "gold-product", "customer_attributes": { "first_name": "Jane", "last_name": "Doe", "email":
- * "jd{@literal @}chargify.test" }, "bank_account_attributes": { "bank_name": "French Bank", "bank_iban":
- * "FR1420041010050500013M02606", "payment_type": "bank_account", "billing_address": "20 Place
- * de la Gare", "billing_city": "Colombes", "billing_state": "Île-de-France", "billing_zip":
- * "92700", "billing_country": "FR" } } } ``` ## Subscription using Stripe SEPA Direct Debit For
- * more information on Stripe Direct Debit, please view the following two resources: + [Payment
- * Profiles via API for Stripe SEPA Direct
- * Debit](https://developers.chargify.com/docs/api-docs/1f10a4f170405-create-payment-profile#sepa-direct-debit)
- * + [Full documentation on Stripe Direct
- * Debit](https://maxio.zendesk.com/hc/en-us/articles/24176170430093-Stripe-SEPA-and-BECS-Direct-Debit)
- * + [Using Chargify.js with Stripe SEPA or BECS Direct Debit - minimal
- * example](https://docs.maxio.com/hc/en-us/articles/38206331271693-Examples#h_01K0PJ15QQFKKN8Z7B7DZ9AJS5)
- * + [Using Chargify.js with Stripe SEPA Direct Debit - full
- * example](https://docs.maxio.com/hc/en-us/articles/38206331271693-Examples#h_01K0PJ15QR09JVHWW0MCA7HVJV)
- * ```json { "subscription": { "product_handle": "gold-product", "customer_attributes": {
- * "first_name": "Jane", "last_name": "Doe", "email": "jd{@literal @}chargify.test" },
- * "bank_account_attributes": { "bank_name": "Test Bank", "bank_iban": "DE89370400440532013000",
- * "payment_type": "bank_account" } } } ``` ## Subscription using Stripe BECS Direct Debit For
- * more information on Stripe Direct Debit, please view the following two resources: + [Payment
- * Profiles via API for Stripe BECS Direct Debit]($e/Payment%20Profiles/createPaymentProfile) +
- * [Full documentation on Stripe Direct
- * Debit](https://maxio.zendesk.com/hc/en-us/articles/24176170430093-Stripe-SEPA-and-BECS-Direct-Debit)
- * + [Using Chargify.js with Stripe SEPA, BECS or BACS Direct Debit - minimal
- * example](https://docs.maxio.com/hc/en-us/articles/38206331271693-Examples#h_01K0PJ15QQFKKN8Z7B7DZ9AJS5)
- * + [Using Chargify.js with Stripe BECS Direct Debit - full
- * example](https://docs.maxio.com/hc/en-us/articles/38206331271693-Examples#h_01K0PJ15QRX4B1TYZKZD8ZND6D)
- * ```json { "subscription": { "product_handle": "gold-product", "customer_attributes": {
- * "first_name": "Jane", "last_name": "Doe", "email": "jd{@literal @}chargify.test" },
- * "bank_account_attributes": { "bank_name": "Test Bank", "bank_branch_code": "000000",
- * "bank_account_number": "000123456", "payment_type": "bank_account" } } } ``` ## Subscription
- * using Stripe BACS Direct Debit For more information on Stripe Direct Debit, please view the
- * following two resources: + [Payment Profiles via API for Stripe BACS Direct
- * Debit]($e/Payment%20Profiles/createPaymentProfile) + [Full documentation on Stripe Direct
- * Debit](https://maxio.zendesk.com/hc/en-us/articles/24176170430093-Stripe-SEPA-and-BECS-Direct-Debit)
- * + [Using Chargify.js with Stripe SEPA, BECS or BACS Direct Debit - minimal
- * example](https://docs.maxio.com/hc/en-us/articles/38206331271693-Examples#h_01K0PJ15QQFKKN8Z7B7DZ9AJS5)
- * + [Using Chargify.js with Stripe BACS Direct Debit - full
- * example](https://docs.maxio.com/hc/en-us/articles/38206331271693-Examples#h_01K0PJ15QR7PA1DJ3XE9MD05FM)
- * ```json { "subscription": { "product_handle": "gold-product", "customer_attributes": {
- * "first_name": "Jane", "last_name": "Doe", "email": "jd{@literal @}chargify.test" },
- * "bank_account_attributes": { "bank_name": "Test Bank", "bank_branch_code": "108800",
- * "bank_account_number": "00012345", "payment_type": "bank_account", "billing_address": "123
- * Main St.", "billing_city": "London", "billing_state": "LND", "billing_zip": "W1A 1AA",
- * "billing_country": "GB" } } } ``` ## 3D Secure - Stripe It may happen that a payment needs 3D
- * Secure Authentication when the subscription is created; this is referred to in our help docs
- * as a [post-authentication
- * flow](https://maxio.zendesk.com/hc/en-us/articles/24176278996493-Testing-Implementing-3D-Secure#psd2-flows-pre-authentication-and-post-authentication).
- * The server returns `422 Unprocessable Entity` in this case with the following response:
- * ```json { "errors": [ "Your card was declined. This transaction requires 3D secure
- * authentication." ], "gateway_payment_id": "pi_1F0aGoJ2UDb3Q4av7zU3sHPh", "description": "This
- * card requires 3D secure authentication. Redirect the customer to the URL from the action_link
- * attribute to authenticate. Attach callback_url param to this URL if you want to be notified
- * about the result of 3D Secure authentication. Attach redirect_url param to this URL if you
- * want to redirect a customer back to your page after 3D Secure authentication. Example:
- * https://mysite.chargify.com/3d-secure/pi_1FCm4RKDeye4C0XfbqquXRYm?one_time_token_id=128&callback_url=https://localhost:4000&redirect_url=https://yourpage.com
- * will do a POST request to https://localhost:4000 after payment is authenticated and will
- * redirect a customer to https://yourpage.com after 3DS authentication.", "action_link":
- * "http://acme.chargify.com/3d-secure/pi_1F0aGoJ2UDb3Q4av7zU3sHPh?one_time_token_id=242" } ```
- * To let the customer go through 3D Secure Authentication, they need to be redirected to the
- * URL specified in `action_link`. Optionally, you can specify `callback_url` parameter in the
- * `action_link` URL if you’d like to be notified about the result of 3D Secure Authentication.
- * The `callback_url` will return the following information: - whether the authentication was
- * successful (`success`) - the gateway ID for the payment (`gateway_payment_id`) - the
- * subscription ID (`subscription_id`) Lastly, you can also specify a `redirect_url` within the
- * `action_link` URL if you’d like to redirect a customer back to your site. It is not possible
- * to use `action_link` in an iframe inside a custom application. You have to redirect the
- * customer directly to the `action_link`, then, to be notified about the result, use
- * `redirect_url` or `callback_url`. The final URL that you send a customer to to complete 3D
- * Secure may resemble the following, where the first half is the `action_link` and the second
- * half contains a `redirect_url` and `callback_url`:
- * `https://mysite.chargify.com/3d-secure/pi_1FCm4RKDeye4C0XfbqquXRYm?one_time_token_id=128&callback_url=https://localhost:4000&redirect_url=https://yourpage.com`
- * ## 3D Secure - Checkout It may happen that a payment needs 3D Secure Authentication when the
- * subscription is created; this is referred to in our help docs as a [post-authentication
- * flow](https://maxio.zendesk.com/hc/en-us/articles/24176278996493-Testing-Implementing-3D-Secure#psd2-flows-pre-authentication-and-post-authentication).
- * The server returns `422 Unprocessable Entity` in this case with the following response:
- * ```json { "errors": [ "Your card was declined. This transaction requires 3D secure
- * authentication." ], "gateway_payment_id": "pay_6gjofv7dlyrkpizlolsuspvtiu", "description":
- * "This card requires 3D secure authentication. Redirect the customer to the URL from the
- * action_link attribute to authenticate. Attach callback_url param to this URL if you want to
- * be notified about the result of 3D Secure authentication. Attach redirect_url param to this
- * URL if you want to redirect a customer back to your page after 3D Secure authentication.
- * Example:
- * https://mysite.chargify.com/3d-secure/pay_6gjofv7dlyrkpizlolsuspvtiu?one_time_token_id=123&callback_url=https://localhost:4000&redirect_url=https://yourpage.com
- * will do a POST request to https://localhost:4000 after payment is authenticated and will
- * redirect a customer to https://yourpage.com after 3DS authentication.", "action_link":
- * "http://mysite.chargify.com/3d-secure/pay_6gjofv7dlyrkpizlolsuspvtiu?one_time_token_id=123" }
- * ``` To let the customer go through 3D Secure Authentication, they need to be redirected to
- * the URL specified in `action_link`. Optionally, you can specify `callback_url` parameter in
- * the `action_link` URL if you’d like to be notified about the result of 3D Secure
- * Authentication. The `callback_url` will return the following information: - whether the
- * authentication was successful (`success`) - the gateway ID for the payment
- * (`gateway_payment_id`) - the subscription ID (`subscription_id`) Lastly, you can also specify
- * a `redirect_url` parameter within the `action_link` URL if you’d like to redirect a customer
- * back to your site. It is not possible to use `action_link` in an iframe inside a custom
- * application. You have to redirect the customer directly to the `action_link`, then, to be
- * notified about the result, use `redirect_url` or `callback_url`. The final URL that you send
- * a customer to complete 3D Secure may resemble the following, where the first half is the
- * `action_link` and the second half contains a `redirect_url` and `callback_url`:
- * `https://mysite.chargify.com/3d-secure/pay_6gjofv7dlyrkpizlolsuspvtiu?one_time_token_id=123&callback_url=https://localhost:4000&redirect_url=https://yourpage.com`
- * ### Example Redirect Flow You may wish to redirect customers to different pages depending on
- * whether their SCA was performed successfully. Here's an example flow to use as a reference:
- * 1. Create a subscription via API; it requires 3DS 2. You receive a `gateway_payment_id` in
- * the `action_link` along other params in the response. 3. Use this `gateway_payment_id` to,
- * for example, connect with your internal resources or generate a session_id 4. Include 1 of
- * those attributes inside the `callback_url` and `redirect_url` to be aware which “session”
- * this applies to 5. Redirect the customer to the `action_link` with `callback_url` and
- * `redirect_url` applied 6. After the customer finishes 3DS authentication, we let you know the
- * result by making a request to applied `callback_url`. 7. After that, we redirect the customer
- * to the `redirect_url`; at this point the result of authentication is known 8. Optionally, you
- * can use the applied "msg" param in the `redirect_url` to determine whether it was successful
- * or not ## Subscriptions Import Subscriptions can be “imported” via the API to handle the
- * following scenarios: + You already have existing subscriptions with specific start and
- * renewal dates that you would like to import to Advanced Billing + You already have credit
- * cards stored in your provider’s vault and you would like to create subscriptions using those
- * tokens Before importing, you should have already set up your products to match your
- * offerings. Then, you can create Subscriptions via the API just like you normally would, but
- * using a few special attributes. Full documentation on how import Subscriptions using the
- * **import tool** in the Advanced Billing UI can be located
- * [here](https://maxio.zendesk.com/hc/en-us/articles/24251489107213-Imports). ### Important
- * Notices and Disclaimers regarding Imports Before performing a bulk import of subscriptions
- * via the API, we suggest reading the [Subscriptions
- * Import](https://maxio.zendesk.com/hc/en-us/articles/24251489107213-Imports) instructions to
- * understand the repurcussions of a large import. ### Subscription Input Attributes The
- * following _additional_ attributes to the subscription input attributes make imports possible:
- * `next_billing_at`, `previous_billing_at`, and `import_mrr`. ### Current Vault If you are
- * using a Legacy gateway such as "eWAY Rapid (Legacy)" or "Stripe (Legacy)" then please contact
- * Support for further instructions on subscription imports. ### Braintree Blue (Braintree v2)
- * Imports Braintree Blue is Braintree’s newer (version 2) API. For this gateway, please provide
- * the `vault_token` parameter with the value from Braintree’s “Customer ID” rather than the
- * “Payment Profile Token”. At this time we do not use `current_vault_token` with the Braintree
- * Blue gateway, and we only support a single payment profile per Braintree Customer. When
- * importing PayPal type payment profiles, please set `payment_type` to `paypal_account`. ###
- * Stripe ACH Imports If the bank account has already been verified, currently you will need to
- * create the customer, create the payment profile in Advanced Billing - setting verified=true,
- * then create a subscription using the customer_id and payment_profile_id. ### Webhooks During
- * Import If no `next_billing_at` is provided, webhooks will be fired as normal. If you do set a
- * future `next_billing_at`, only a subset of the webhooks are fired when the subscription is
- * created. Keep reading for more information as to what webhooks will be fired under which
- * scenarios. #### Successful creation with Billing Date Scenario: If `next_billing_at` provided
- * + `signup_success` + `billing_date_change` #### Successful creation without Billing Date
- * Scenario: If no `next_billing_at` provided + `signup_success` + `payment_success` ####
- * Unsuccessful creation Scenario: If card can’t be charged, and no `next_billing_at` provided +
- * signup_failure #### Webhooks fired when next_billing_at is reached: + `renewal_success or
- * renewal_failure` + `payment_success or payment_failure` ### Date and Time Formats We will
- * attempt to parse any string you send as the value of next_billing_at in to a date or time.
- * For best results, use a known format like described in “Date and Time Specification” of RFC
- * 2822 or ISO 8601 . The following are all equivalent and will work as input to
- * `next_billing_at`: ``` Aug 06 2030 11:34:00 -0400 Aug 06 2030 11:34 -0400
- * 2030-08-06T11:34:00-04:00 8/6/2030 11:34:00 EDT 8/6/2030 8:34:00 PDT 2030-08-06T15:34:00Z ```
- * You may also pass just a date, in which case we will assume the time to be noon ```
- * 2010-08-06 ``` ## Subscription Hierarchies & WhoPays When subscription groups were first
- * added to our Relationship Invoicing architecture, to group together invoices for related
- * subscriptions and allow for complex customer hierarchies and WhoPays scenarios, they were
- * designed to consist of a primary and a collection of group members. The primary would control
- * many aspects of the group, such as when the consolidated invoice is generated. As of today,
- * groups still function this way. In the future, the concept of a "primary" will be removed in
- * order to offer more flexibility into group management and reduce confusion concerning what
- * actions must be done on a primary level, rather than a member level. We have introduced a two
- * scheme system as a bridge between these two group organizations. Scheme 1, which is relevant
- * to all subscription groups today, marks the group as being "ruled" by a primary. When reading
- * a subscription via API, they will return a top-level attribute called `group`, which will
- * denote which scheme is being used. At this time, the `scheme` attribute will always be 1. ###
- * Subscription in a Customer Hierarchy For sites making use of the [Relationship
- * Billing](https://maxio.zendesk.com/hc/en-us/articles/24252287829645-Advanced-Billing-Invoices-Overview)
- * and [Customer
- * Hierarchy](https://maxio.zendesk.com/hc/en-us/articles/24252185211533-Customer-Hierarchies-WhoPays)
- * features, it is possible to create subscriptions within a customer hierarchy. This can be
- * achieved through the API by passing group parameters in the **Create Subscription** request.
- * + The `group` parameters are optional and consist of the required `target` and optional
- * `billing` parameters. When the `target` parameter specifies a customer that is already part
- * of a hierarchy, the new subscription will become a member of the customer hierarchy as well.
- * If the target customer is not part of a hierarchy, a new customer hierarchy will be created
- * and both the target customer and the new subscription will become part of the hierarchy with
- * the specified target customer set as the responsible payer for the hierarchy's subscriptions.
- * Rather than specifying a customer, the `target` parameter could instead simply have a value
- * of `self` which indicates the subscription will be paid for not by some other customer, but
- * by the subscribing customer. This will be true whether the customer is being created new, is
- * already part of a hierarchy, or already exists outside a hierarchy. A valid payment method
- * must also be specified in the subscription parameters. Note that when creating subscriptions
- * in a customer hierarchy, if the customer hierarchy does not already have a payment method,
- * passing valid credit card attributes in the subscription parameters will also result in the
- * payment method being established as the default payment method for the customer hierarchy
- * irrespective of the responsible payer. The optional `billing` parameters specify how some
- * aspects of the billing for the new subscription should be handled. Rather than capturing
- * payment immediately, the `accrue` parameter can be included so that the new subscription
- * charges accrue until the next assessment date. Regarding the date, the `align_date` parameter
- * can be included so that the billing date of the new subscription matches up with the default
- * subscription group in the customer hierarchy. When choosing to align the dates, the `prorate`
- * parameter can also be specified so that the new subscription charges are prorated based on
- * the billing period of the default subscription group in the customer hierarchy also. ###
- * Subscription in a Subscription Group For sites making use of [Relationship
- * Billing](https://maxio.zendesk.com/hc/en-us/articles/24252287829645-Advanced-Billing-Invoices-Overview)
- * it may be desireable to create a subscription as part of a [subscription
- * group](https://maxio.zendesk.com/hc/en-us/articles/24252172565005-Subscription-Groups-Overview)
- * in order to rely on [invoice
- * consolidation](https://maxio.zendesk.com/hc/en-us/articles/24252269909389-Invoice-Consolidation).
- * This can be achieved through the API by passing group parameters in the Create Subscription
- * request. The `group` parameters are optional and consist of the required `target` and
- * optional `billing` parameters. The `target` parameters specify an existing subscription with
- * which the newly created subscription should be grouped. If the target subscription is already
- * part of a group, the new subscription will become a member of the group as well. If the
- * target subscription is not part of a group, a new group will be created and both the target
- * and the new subscription will become part of the group with the target as the group's primary
- * subscription. The optional `billing` parameters specify how some aspects of the billing for
- * the new subscription should be handled. Rather than capturing payment immediately, the
- * `accrue` parameter can be included so that the new subscription charges accrue until the next
- * assessment date. Regarding the date, the `align_date` parameter can be included so that the
- * billing date of the new subscription matches up with the target subscription. When choosing
- * to align the dates, the `prorate` parameter can also be specified so that the new
- * subscription charges are prorated based on the billing period of the target subscription
- * also. ## Providing Agreement Acceptance Params It is possible to provide a proof of
- * customer's acceptance of terms and policies. We will be storing this proof in case it might
- * be required (i.e. chargeback). Currently, we already keep it for subscriptions created via
- * Public Signup Pages. In order to create a subscription with the proof of agreement
- * acceptance, you must provide additional parameters `agreement acceptance` with `ip_address`
- * and at least one url to the policy that was accepted: `terms_url` or `privacy_policy_url`.
- * Additional urls that can be provided: `return_refund_policy_url`, `delivery_policy_url` and
- * `secure_checkout_policy_url`. ```json "subscription": { "product_handle": "gold-product",
- * "customer_attributes": { "first_name": "Jane", "last_name": "Doe", "email":
- * "jd{@literal @}chargify.test" }, "agreement_acceptance": { "ip_address": "1.2.3.4", "terms_url":
- * "https://terms.url", "privacy_policy_url": "https://privacy_policy.url",
- * "return_refund_policy_url": "https://return_refund_policy.url", "delivery_policy_url":
- * "https://delivery_policy.url", "secure_checkout_policy_url":
- * "https://secure_checkout_policy.url" } } } ``` **For Maxio Payments subscriptions, the
- * agreement acceptance params are required, with at least terms_url provided.** ## Providing
- * ACH Agreement params It is also possible to provide a proof that a customer authorized ACH
- * agreement terms. The proof will be stored and the email will be sent to the customer with a
- * copy of the terms (if enabled). In order to create a subscription with the proof of
- * authorized ACH agreement terms, you must provide the additional parameter `ach_agreement`
- * with the following nested parameters: `agreement_terms`, `authorizer_first_name`,
- * `authorizer_last_name` and `ip_address`. Each of them is required. ```json "subscription": {
- * "product_handle": "gold-product", "customer_attributes": { "first_name": "Jane", "last_name":
- * "Doe", "email": "jd{@literal @}chargify.test" }, "bank_account_attributes": { "bank_name": "Test Bank",
- * "bank_routing_number": "021000089", "bank_account_number": "111111111111",
- * "bank_account_type": "checking", "bank_account_holder_type": "business", "payment_type":
- * "bank_account" }, "ach_agreement": { "agreement_terms": "ACH agreement terms",
- * "authorizer_first_name": "Jane", "authorizer_last_name": "Doe", "ip_address": "1.2.3.4" } }
- * ```.
+ * Creates a Subscription for a customer and product Specify the product with `product_id` or
+ * `product_handle`. To set a specific product pricepPoint, use `product_price_point_handle` or
+ * `product_price_point_id`. Identify an existing customer with `customer_id` or
+ * `customer_reference`. Optionally, include an existing payment profile using
+ * `payment_profile_id`. To create a new customer, pass customer_attributes. Select an option
+ * from the **Request Examples** drop-down on the right side of the portal to see examples of
+ * common scenarios for creating subscriptions. Payment information may be required to create a
+ * subscription, depending on the options for the Product being subscribed. See [product
+ * options](https://docs.maxio.com/hc/en-us/articles/24261076617869-Edit-Products) for more
+ * information. See the [Payments Profile]($e/Payment%20Profiles/createPaymentProfile) endpoint
+ * for details on payment parameters. Do not use real card information for testing. See the
+ * Sites articles that cover [testing your site
+ * setup](https://docs.maxio.com/hc/en-us/articles/24250712113165-Testing-Overview#testing-overview-0-0)
+ * for more details on testing in your sandbox. Note that collecting and sending raw card
+ * details in production requires [PCI
+ * compliance](https://docs.maxio.com/hc/en-us/articles/24183956938381-PCI-Compliance#pci-compliance-0-0)
+ * on your end. If your business is not PCI compliant, use
+ * [Chargify.js](https://docs.maxio.com/hc/en-us/articles/38163190843789-Chargify-js-Overview#chargify-js-overview-0-0)
+ * to collect credit card or bank account information. See the [Subscription
+ * Signups](page:introduction/basic-concepts/subscription-signup) article for more information
+ * on working with subscriptions in Advanced Billing.
* @param body Optional parameter:
* @return Returns the SubscriptionResponse response from the API call
* @throws ApiException Represents error response from the server.
@@ -536,46 +186,53 @@ private ApiCall, ApiException> prepareListSubscriptio
}
/**
- * The subscription endpoint allows you to instantly update one or many attributes about a
- * subscription in a single call. ## Update Subscription Payment Method Change the card that
- * your Subscriber uses for their subscription. You can also use this method to simply change
- * the expiration date of the card **if your gateway allows**. Note that partial card updates
- * for **Authorize.Net** are not allowed via this endpoint. The existing Payment Profile must be
- * directly updated instead. You also use this method to change the subscription to a different
- * product by setting a new value for product_handle. A product change can be done in two
- * different ways, **product change** or **delayed product change**. ## Product Change This
- * endpoint may be used to change a subscription's product. The new payment amount is calculated
- * and charged at the normal start of the next period. If you desire complex product changes or
- * prorated upgrades and downgrades instead, please see the documentation on Migrating
- * Subscription Products. To perform a product change, simply set either the `product_handle` or
- * `product_id` attribute to that of a different product from the same site as the subscription.
- * You can also change the price point by passing in either `product_price_point_id` or
- * `product_price_point_handle` - otherwise the new product's default price point will be used.
- * ### Delayed Product Change This method also changes the product and/or price point, and the
- * new payment amount is calculated and charged at the normal start of the next period. This
- * method schedules the product change to happen automatically at the subscription’s next
- * renewal date. To perform a Delayed Product Change, set the `product_handle` attribute as you
- * would in a regular product change, but also set the `product_change_delayed` attribute to
- * `true`. No proration applies in this case. You can also perform a delayed change to the price
- * point by passing in either `product_price_point_id` or `product_price_point_handle` **Note:
- * To cancel a delayed product change, set `next_product_id` to an empty string.** ## Billing
- * Date Changes ### Regular Billing Date Changes Send the `next_billing_at` to set the next
- * billing date for the subscription. After that date passes and the subscription is processed,
- * the following billing date will be set according to the subscription's product period. Note
- * that if you pass an invalid date, we will automatically interpret and set the correct date.
- * For example, when February 30 is entered, the next billing will be set to March 2nd in a
- * non-leap year. The server response will not return data under the key/value pair of
- * `next_billing`. Please view the key/value pair of `current_period_ends_at` to verify that the
- * `next_billing` date has been changed successfully. ### Snap Day Changes For a subscription
- * using Calendar Billing, setting the next billing date is a bit different. Send the `snap_day`
- * attribute to change the calendar billing date for **a subscription using a product eligible
- * for calendar billing**. Note: If you change the product associated with a subscription that
- * contains a `snap_date` and immediately `READ/GET` the subscription data, it will still
- * contain evidence of the existing `snap_date`. This is due to the fact that a product change
- * is instantanous and only affects the product associated with a subscription. After the
- * `next_billing` date arrives, the `snap_day` associated with the subscription will return to
- * `null.` Another way of looking at this is that you willl have to wait for the next billing
- * cycle to arrive before the `snap_date` will reset to `null`.
+ * Updates one or more attributes of a subscription. ## Update Subscription Payment Method
+ * Change the card that your subscriber uses for their subscription. You can also use this
+ * method to change the expiration date of the card **if your gateway allows**. Do not use real
+ * card information for testing. See the Sites articles that cover [testing your site
+ * setup](https://docs.maxio.com/hc/en-us/articles/24250712113165-Testing-Overview#testing-overview-0-0)
+ * for more details on testing in your sandbox. Note that collecting and sending raw card
+ * details in production requires [PCI
+ * compliance](https://docs.maxio.com/hc/en-us/articles/24183956938381-PCI-Compliance#pci-compliance-0-0)
+ * on your end. If your business is not PCI compliant, use
+ * [Chargify.js](https://docs.maxio.com/hc/en-us/articles/38163190843789-Chargify-js-Overview#chargify-js-overview-0-0)
+ * to collect credit card or bank account information. > Note: Partial card updates for
+ * **Authorize.Net** are not allowed via this endpoint. The existing Payment Profile must be
+ * directly updated instead. ## Update Product You also use this method to change the
+ * subscription to a different product by setting a new value for product_handle. A product
+ * change can be done in two different ways, **product change** or **delayed product change**.
+ * ### Product Change You can change a subscription's product. The new payment amount is
+ * calculated and charged at the normal start of the next period. If you require complex product
+ * changes or prorated upgrades and downgrades instead, please see the documentation on
+ * [Migrating Subscription
+ * Products](https://docs.maxio.com/hc/en-us/articles/24252069837581-Product-Changes-and-Migrations#product-changes-and-migrations-0-0).
+ * To perform a product change, set either the `product_handle` or `product_id` attribute to
+ * that of a different product from the same site as the subscription. You can also change the
+ * price point by passing in either `product_price_point_id` or `product_price_point_handle` -
+ * otherwise the new product's default price point is used. ### Delayed Product Change This
+ * method also changes the product and/or price point, and the new payment amount is calculated
+ * and charged at the normal start of the next period. This method schedules the product change
+ * to happen automatically at the subscription’s next renewal date. To perform a delayed product
+ * change, set the `product_handle` attribute as you would in a regular product change, but also
+ * set the `product_change_delayed` attribute to `true`. No proration applies in this case. You
+ * can also perform a delayed change to the price point by passing in either
+ * `product_price_point_id` or `product_price_point_handle` > **Note:** To cancel a delayed
+ * product change, set `next_product_id` to an empty string. ## Billing Date Changes You can
+ * update dates for a subscrption. ### Regular Billing Date Changes Send the `next_billing_at`
+ * to set the next billing date for the subscription. After that date passes and the
+ * subscription is processed, the following billing date will be set according to the
+ * subscription's product period. > Note: If you pass an invalid date, the correct date is
+ * automatically set to he correct date. For example, if February 30 is passed, the next billing
+ * would be set to March 2nd in a non-leap year. The server response will not return data under
+ * the key/value pair of `next_billing_at`. View the key/value pair of `current_period_ends_at`
+ * to verify that the `next_billing_at` date has been changed successfully. ### Calendar Billing
+ * and Snap Day Changes For a subscription using Calendar Billing, setting the next billing date
+ * is a bit different. Send the `snap_day` attribute to change the calendar billing date for **a
+ * subscription using a product eligible for calendar billing**. > Note: If you change the
+ * product associated with a subscription that contains a `snap_day` and immediately `READ/GET`
+ * the subscription data, it will still contain original `snap_day`. The `snap_day`will will
+ * reset to 'null on the next billing cycle. This is because a product change is instantanous
+ * and only affects the product associated with a subscription.
* @param subscriptionId Required parameter: The Chargify id of the subscription
* @param body Optional parameter:
* @return Returns the SubscriptionResponse response from the API call
@@ -776,8 +433,8 @@ private ApiCall prepareFindSubscriptionReque
* also delete the customer record and/or payment profiles by passing `cascade` parameters. For
* example, to delete just the customer record, the query params would be:
* `?ack={customer_id}&cascade[]=customer` If you need to remove subscriptions from a live site,
- * please contact support to discuss your use case. ### Delete customer and payment profile The
- * query params will be: `?ack={customer_id}&cascade[]=customer&cascade[]=payment_profile`.
+ * contact support to discuss your use case. ### Delete customer and payment profile The query
+ * params will be: `?ack={customer_id}&cascade[]=customer&cascade[]=payment_profile`.
* @param subscriptionId Required parameter: The Chargify id of the subscription
* @param ack Required parameter: id of the customer.
* @param cascade Optional parameter: Options are "customer" or "payment_profile". Use in
@@ -878,25 +535,24 @@ private ApiCall prepareUpdatePrepaid
* The Chargify API allows you to preview a subscription by POSTing the same JSON or XML as for
* a subscription creation. The "Next Billing" amount and "Next Billing" date are represented in
* each Subscriber's Summary. A subscription will not be created by utilizing this endpoint; it
- * is meant to serve as a prediction. For more information, please see our documentation
+ * is meant to serve as a prediction. For more information, see our documentation
* [here](https://maxio.zendesk.com/hc/en-us/articles/24252493695757-Subscriber-Interface-Overview).
* ## Taxable Subscriptions This endpoint will preview taxes applicable to a purchase. In order
* for taxes to be previewed, the following conditions must be met: + Taxes must be configured
* on the subscription + The preview must be for the purchase of a taxable product or component,
* or combination of the two. + The subscription payload must contain a full billing or shipping
- * address in order to calculate tax For more information about creating taxable previews,
- * please see our documentation guide on how to create [taxable
+ * address in order to calculate tax For more information about creating taxable previews, see
+ * our documentation guide on how to create [taxable
* subscriptions.](https://maxio.zendesk.com/hc/en-us/sections/24287012349325-Taxes) You do
* **not** need to include a card number to generate tax information when you are previewing a
- * subscription. However, please note that when you actually want to create the subscription,
- * you must include the credit card information if you want the billing address to be stored in
- * Advanced Billing. The billing address and the credit card information are stored together
- * within the payment profile object. Also, you may not send a billing address to Advanced
- * Billing without payment profile information, as the address is stored on the card. You can
- * pass shipping and billing addresses and still decide not to calculate taxes. To do that, pass
+ * subscription. However, when you actually want to create the subscription, you must include
+ * the credit card information if you want the billing address to be stored in Advanced Billing.
+ * The billing address and the credit card information are stored together within the payment
+ * profile object. Also, you may not send a billing address to Advanced Billing without payment
+ * profile information, as the address is stored on the card. You can pass shipping and billing
+ * addresses and still decide not to calculate taxes. To do that, pass
* `skip_billing_manifest_taxes: true` attribute. ## Non-taxable Subscriptions If you'd like to
- * calculate subscriptions that do not include tax, please feel free to leave off the billing
- * information.
+ * calculate subscriptions that do not include tax you may leave off the billing information.
* @param body Optional parameter:
* @return Returns the SubscriptionPreviewResponse response from the API call
* @throws ApiException Represents error response from the server.
@@ -998,7 +654,7 @@ private ApiCall prepareApplyCouponsToSubscri
/**
* Use this endpoint to remove a coupon from an existing subscription. For more information on
- * the expected behaviour of removing a coupon from a subscription, please see our documentation
+ * the expected behaviour of removing a coupon from a subscription, See our documentation
* [here.](https://maxio.zendesk.com/hc/en-us/articles/24261259337101-Coupons-and-Subscriptions#removing-a-coupon).
* @param subscriptionId Required parameter: The Chargify id of the subscription
* @param couponCode Optional parameter: The coupon code
diff --git a/src/main/java/com/maxio/advancedbilling/models/ActivateEventBasedComponent.java b/src/main/java/com/maxio/advancedbilling/models/ActivateEventBasedComponent.java
index ae3e88c6..814d78fd 100644
--- a/src/main/java/com/maxio/advancedbilling/models/ActivateEventBasedComponent.java
+++ b/src/main/java/com/maxio/advancedbilling/models/ActivateEventBasedComponent.java
@@ -65,8 +65,8 @@ public void setPricePointId(Integer pricePointId) {
/**
* Getter for BillingSchedule.
* This attribute is particularly useful when you need to align billing events for different
- * components on distinct schedules within a subscription. Please note this only works for site
- * with Multifrequency enabled
+ * components on distinct schedules within a subscription. This only works for site with
+ * Multifrequency enabled.
* @return Returns the BillingSchedule
*/
@JsonGetter("billing_schedule")
@@ -78,8 +78,8 @@ public BillingSchedule getBillingSchedule() {
/**
* Setter for BillingSchedule.
* This attribute is particularly useful when you need to align billing events for different
- * components on distinct schedules within a subscription. Please note this only works for site
- * with Multifrequency enabled
+ * components on distinct schedules within a subscription. This only works for site with
+ * Multifrequency enabled.
* @param billingSchedule Value for BillingSchedule
*/
@JsonSetter("billing_schedule")
diff --git a/src/main/java/com/maxio/advancedbilling/models/CalendarBilling.java b/src/main/java/com/maxio/advancedbilling/models/CalendarBilling.java
index bd6790ef..6cfdaee7 100644
--- a/src/main/java/com/maxio/advancedbilling/models/CalendarBilling.java
+++ b/src/main/java/com/maxio/advancedbilling/models/CalendarBilling.java
@@ -9,15 +9,17 @@
import com.fasterxml.jackson.annotation.JsonGetter;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonSetter;
+import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.maxio.advancedbilling.models.containers.CalendarBillingSnapDay;
import io.apimatic.core.types.BaseModel;
+import io.apimatic.core.types.OptionalNullable;
/**
* This is a model class for CalendarBilling type.
*/
public class CalendarBilling
extends BaseModel {
- private CalendarBillingSnapDay snapDay;
+ private OptionalNullable snapDay;
private FirstChargeType calendarBillingFirstCharge;
/**
@@ -34,19 +36,41 @@ public CalendarBilling() {
public CalendarBilling(
CalendarBillingSnapDay snapDay,
FirstChargeType calendarBillingFirstCharge) {
+ this.snapDay = OptionalNullable.of(snapDay);
+ this.calendarBillingFirstCharge = calendarBillingFirstCharge;
+ }
+
+ /**
+ * Initialization constructor.
+ * @param snapDay CalendarBillingSnapDay value for snapDay.
+ * @param calendarBillingFirstCharge FirstChargeType value for calendarBillingFirstCharge.
+ */
+
+ protected CalendarBilling(OptionalNullable snapDay,
+ FirstChargeType calendarBillingFirstCharge) {
this.snapDay = snapDay;
this.calendarBillingFirstCharge = calendarBillingFirstCharge;
}
/**
- * Getter for SnapDay.
+ * Internal Getter for SnapDay.
* A day of month that subscription will be processed on. Can be 1 up to 28 or 'end'.
- * @return Returns the CalendarBillingSnapDay
+ * @return Returns the Internal CalendarBillingSnapDay
*/
@JsonGetter("snap_day")
@JsonInclude(JsonInclude.Include.NON_NULL)
+ @JsonSerialize(using = OptionalNullable.Serializer.class)
+ protected OptionalNullable internalGetSnapDay() {
+ return this.snapDay;
+ }
+
+ /**
+ * Getter for SnapDay.
+ * A day of month that subscription will be processed on. Can be 1 up to 28 or 'end'.
+ * @return Returns the CalendarBillingSnapDay
+ */
public CalendarBillingSnapDay getSnapDay() {
- return snapDay;
+ return OptionalNullable.getFrom(snapDay);
}
/**
@@ -56,7 +80,15 @@ public CalendarBillingSnapDay getSnapDay() {
*/
@JsonSetter("snap_day")
public void setSnapDay(CalendarBillingSnapDay snapDay) {
- this.snapDay = snapDay;
+ this.snapDay = OptionalNullable.of(snapDay);
+ }
+
+ /**
+ * UnSetter for SnapDay.
+ * A day of month that subscription will be processed on. Can be 1 up to 28 or 'end'.
+ */
+ public void unsetSnapDay() {
+ snapDay = null;
}
/**
@@ -96,8 +128,8 @@ public String toString() {
*/
public Builder toBuilder() {
Builder builder = new Builder()
- .snapDay(getSnapDay())
.calendarBillingFirstCharge(getCalendarBillingFirstCharge());
+ builder.snapDay = internalGetSnapDay();
return builder;
}
@@ -105,7 +137,7 @@ public Builder toBuilder() {
* Class to build instances of {@link CalendarBilling}.
*/
public static class Builder {
- private CalendarBillingSnapDay snapDay;
+ private OptionalNullable snapDay;
private FirstChargeType calendarBillingFirstCharge;
@@ -116,7 +148,16 @@ public static class Builder {
* @return Builder
*/
public Builder snapDay(CalendarBillingSnapDay snapDay) {
- this.snapDay = snapDay;
+ this.snapDay = OptionalNullable.of(snapDay);
+ return this;
+ }
+
+ /**
+ * UnSetter for snapDay.
+ * @return Builder
+ */
+ public Builder unsetSnapDay() {
+ snapDay = null;
return this;
}
diff --git a/src/main/java/com/maxio/advancedbilling/models/ChargifyEBB.java b/src/main/java/com/maxio/advancedbilling/models/ChargifyEBB.java
index be44c08d..1177bb1d 100644
--- a/src/main/java/com/maxio/advancedbilling/models/ChargifyEBB.java
+++ b/src/main/java/com/maxio/advancedbilling/models/ChargifyEBB.java
@@ -86,8 +86,8 @@ public void setTimestamp(ZonedDateTime timestamp) {
/**
* Getter for Id.
- * A unique ID set by Chargify. Please note that this field is reserved. If `chargify.id` is
- * present in the request payload, it will be overwritten.
+ * A unique ID set by Chargify. This field is reserved. If `chargify.id` is present in the
+ * request payload, it will be overwritten.
* @return Returns the String
*/
@JsonGetter("id")
@@ -98,8 +98,8 @@ public String getId() {
/**
* Setter for Id.
- * A unique ID set by Chargify. Please note that this field is reserved. If `chargify.id` is
- * present in the request payload, it will be overwritten.
+ * A unique ID set by Chargify. This field is reserved. If `chargify.id` is present in the
+ * request payload, it will be overwritten.
* @param id Value for String
*/
@JsonSetter("id")
@@ -109,9 +109,8 @@ public void setId(String id) {
/**
* Getter for CreatedAt.
- * An ISO-8601 timestamp, set by Chargify at the time each event is recorded. Please note that
- * this field is reserved. If `chargify.created_at` is present in the request payload, it will
- * be overwritten.
+ * An ISO-8601 timestamp, set by Chargify at the time each event is recorded. This field is
+ * reserved. If `chargify.created_at` is present in the request payload, it will be overwritten.
* @return Returns the ZonedDateTime
*/
@JsonGetter("created_at")
@@ -123,9 +122,8 @@ public ZonedDateTime getCreatedAt() {
/**
* Setter for CreatedAt.
- * An ISO-8601 timestamp, set by Chargify at the time each event is recorded. Please note that
- * this field is reserved. If `chargify.created_at` is present in the request payload, it will
- * be overwritten.
+ * An ISO-8601 timestamp, set by Chargify at the time each event is recorded. This field is
+ * reserved. If `chargify.created_at` is present in the request payload, it will be overwritten.
* @param createdAt Value for ZonedDateTime
*/
@JsonSetter("created_at")
diff --git a/src/main/java/com/maxio/advancedbilling/models/Component.java b/src/main/java/com/maxio/advancedbilling/models/Component.java
index 72105b64..69e1e047 100644
--- a/src/main/java/com/maxio/advancedbilling/models/Component.java
+++ b/src/main/java/com/maxio/advancedbilling/models/Component.java
@@ -34,7 +34,6 @@ public class Component
private OptionalNullable pricePerUnitInCents;
private ComponentKind kind;
private Boolean archived;
- private Boolean taxable;
private OptionalNullable description;
private OptionalNullable defaultPricePointId;
private OptionalNullable> overagePrices;
@@ -42,6 +41,7 @@ public class Component
private Integer pricePointCount;
private OptionalNullable pricePointsUrl;
private String defaultPricePointName;
+ private Boolean taxable;
private OptionalNullable taxCode;
private Boolean recurring;
private OptionalNullable upgradeCharge;
@@ -78,7 +78,6 @@ public Component() {
* @param pricePerUnitInCents Long value for pricePerUnitInCents.
* @param kind ComponentKind value for kind.
* @param archived Boolean value for archived.
- * @param taxable Boolean value for taxable.
* @param description String value for description.
* @param defaultPricePointId Integer value for defaultPricePointId.
* @param overagePrices List of ComponentPrice value for overagePrices.
@@ -86,6 +85,7 @@ public Component() {
* @param pricePointCount Integer value for pricePointCount.
* @param pricePointsUrl String value for pricePointsUrl.
* @param defaultPricePointName String value for defaultPricePointName.
+ * @param taxable Boolean value for taxable.
* @param taxCode String value for taxCode.
* @param recurring Boolean value for recurring.
* @param upgradeCharge CreditType value for upgradeCharge.
@@ -115,7 +115,6 @@ public Component(
Long pricePerUnitInCents,
ComponentKind kind,
Boolean archived,
- Boolean taxable,
String description,
Integer defaultPricePointId,
List overagePrices,
@@ -123,6 +122,7 @@ public Component(
Integer pricePointCount,
String pricePointsUrl,
String defaultPricePointName,
+ Boolean taxable,
String taxCode,
Boolean recurring,
CreditType upgradeCharge,
@@ -150,7 +150,6 @@ public Component(
this.pricePerUnitInCents = OptionalNullable.of(pricePerUnitInCents);
this.kind = kind;
this.archived = archived;
- this.taxable = taxable;
this.description = OptionalNullable.of(description);
this.defaultPricePointId = OptionalNullable.of(defaultPricePointId);
this.overagePrices = OptionalNullable.of(overagePrices);
@@ -158,6 +157,7 @@ public Component(
this.pricePointCount = pricePointCount;
this.pricePointsUrl = OptionalNullable.of(pricePointsUrl);
this.defaultPricePointName = defaultPricePointName;
+ this.taxable = taxable;
this.taxCode = OptionalNullable.of(taxCode);
this.recurring = recurring;
this.upgradeCharge = OptionalNullable.of(upgradeCharge);
@@ -189,7 +189,6 @@ public Component(
* @param pricePerUnitInCents Long value for pricePerUnitInCents.
* @param kind ComponentKind value for kind.
* @param archived Boolean value for archived.
- * @param taxable Boolean value for taxable.
* @param description String value for description.
* @param defaultPricePointId Integer value for defaultPricePointId.
* @param overagePrices List of ComponentPrice value for overagePrices.
@@ -197,6 +196,7 @@ public Component(
* @param pricePointCount Integer value for pricePointCount.
* @param pricePointsUrl String value for pricePointsUrl.
* @param defaultPricePointName String value for defaultPricePointName.
+ * @param taxable Boolean value for taxable.
* @param taxCode String value for taxCode.
* @param recurring Boolean value for recurring.
* @param upgradeCharge CreditType value for upgradeCharge.
@@ -218,11 +218,11 @@ protected Component(Integer id, String name, OptionalNullable handle,
OptionalNullable pricingScheme, String unitName,
OptionalNullable unitPrice, Integer productFamilyId, String productFamilyName,
String productFamilyHandle, OptionalNullable pricePerUnitInCents,
- ComponentKind kind, Boolean archived, Boolean taxable,
- OptionalNullable description, OptionalNullable defaultPricePointId,
+ ComponentKind kind, Boolean archived, OptionalNullable description,
+ OptionalNullable defaultPricePointId,
OptionalNullable> overagePrices,
OptionalNullable> prices, Integer pricePointCount,
- OptionalNullable pricePointsUrl, String defaultPricePointName,
+ OptionalNullable pricePointsUrl, String defaultPricePointName, Boolean taxable,
OptionalNullable taxCode, Boolean recurring,
OptionalNullable upgradeCharge,
OptionalNullable downgradeCredit, ZonedDateTime createdAt,
@@ -244,7 +244,6 @@ protected Component(Integer id, String name, OptionalNullable handle,
this.pricePerUnitInCents = pricePerUnitInCents;
this.kind = kind;
this.archived = archived;
- this.taxable = taxable;
this.description = description;
this.defaultPricePointId = defaultPricePointId;
this.overagePrices = overagePrices;
@@ -252,6 +251,7 @@ protected Component(Integer id, String name, OptionalNullable handle,
this.pricePointCount = pricePointCount;
this.pricePointsUrl = pricePointsUrl;
this.defaultPricePointName = defaultPricePointName;
+ this.taxable = taxable;
this.taxCode = taxCode;
this.recurring = recurring;
this.upgradeCharge = upgradeCharge;
@@ -595,27 +595,6 @@ public void setArchived(Boolean archived) {
this.archived = archived;
}
- /**
- * Getter for Taxable.
- * Boolean flag describing whether a component is taxable or not.
- * @return Returns the Boolean
- */
- @JsonGetter("taxable")
- @JsonInclude(JsonInclude.Include.NON_NULL)
- public Boolean getTaxable() {
- return taxable;
- }
-
- /**
- * Setter for Taxable.
- * Boolean flag describing whether a component is taxable or not.
- * @param taxable Value for Boolean
- */
- @JsonSetter("taxable")
- public void setTaxable(Boolean taxable) {
- this.taxable = taxable;
- }
-
/**
* Internal Getter for Description.
* The description of the component.
@@ -851,11 +830,32 @@ public void setDefaultPricePointName(String defaultPricePointName) {
this.defaultPricePointName = defaultPricePointName;
}
+ /**
+ * Getter for Taxable.
+ * Boolean flag describing whether a component is taxable or not.
+ * @return Returns the Boolean
+ */
+ @JsonGetter("taxable")
+ @JsonInclude(JsonInclude.Include.NON_NULL)
+ public Boolean getTaxable() {
+ return taxable;
+ }
+
+ /**
+ * Setter for Taxable.
+ * Boolean flag describing whether a component is taxable or not.
+ * @param taxable Value for Boolean
+ */
+ @JsonSetter("taxable")
+ public void setTaxable(Boolean taxable) {
+ this.taxable = taxable;
+ }
+
/**
* Internal Getter for TaxCode.
* A string representing the tax code related to the component type. This is especially
- * important when using the Avalara service to tax based on locale. This attribute has a max
- * length of 10 characters.
+ * important when using AvaTax to tax based on locale. This attribute has a max length of 25
+ * characters.
* @return Returns the Internal String
*/
@JsonGetter("tax_code")
@@ -868,8 +868,8 @@ protected OptionalNullable internalGetTaxCode() {
/**
* Getter for TaxCode.
* A string representing the tax code related to the component type. This is especially
- * important when using the Avalara service to tax based on locale. This attribute has a max
- * length of 10 characters.
+ * important when using AvaTax to tax based on locale. This attribute has a max length of 25
+ * characters.
* @return Returns the String
*/
public String getTaxCode() {
@@ -879,8 +879,8 @@ public String getTaxCode() {
/**
* Setter for TaxCode.
* A string representing the tax code related to the component type. This is especially
- * important when using the Avalara service to tax based on locale. This attribute has a max
- * length of 10 characters.
+ * important when using AvaTax to tax based on locale. This attribute has a max length of 25
+ * characters.
* @param taxCode Value for String
*/
@JsonSetter("tax_code")
@@ -891,8 +891,8 @@ public void setTaxCode(String taxCode) {
/**
* UnSetter for TaxCode.
* A string representing the tax code related to the component type. This is especially
- * important when using the Avalara service to tax based on locale. This attribute has a max
- * length of 10 characters.
+ * important when using AvaTax to tax based on locale. This attribute has a max length of 25
+ * characters.
*/
public void unsetTaxCode() {
taxCode = null;
@@ -1350,14 +1350,14 @@ public String toString() {
+ unitPrice + ", productFamilyId=" + productFamilyId + ", productFamilyName="
+ productFamilyName + ", productFamilyHandle=" + productFamilyHandle
+ ", pricePerUnitInCents=" + pricePerUnitInCents + ", kind=" + kind + ", archived="
- + archived + ", taxable=" + taxable + ", description=" + description
- + ", defaultPricePointId=" + defaultPricePointId + ", overagePrices="
- + overagePrices + ", prices=" + prices + ", pricePointCount=" + pricePointCount
- + ", pricePointsUrl=" + pricePointsUrl + ", defaultPricePointName="
- + defaultPricePointName + ", taxCode=" + taxCode + ", recurring=" + recurring
- + ", upgradeCharge=" + upgradeCharge + ", downgradeCredit=" + downgradeCredit
- + ", createdAt=" + createdAt + ", updatedAt=" + updatedAt + ", archivedAt="
- + archivedAt + ", hideDateRangeOnInvoice=" + hideDateRangeOnInvoice
+ + archived + ", description=" + description + ", defaultPricePointId="
+ + defaultPricePointId + ", overagePrices=" + overagePrices + ", prices=" + prices
+ + ", pricePointCount=" + pricePointCount + ", pricePointsUrl=" + pricePointsUrl
+ + ", defaultPricePointName=" + defaultPricePointName + ", taxable=" + taxable
+ + ", taxCode=" + taxCode + ", recurring=" + recurring + ", upgradeCharge="
+ + upgradeCharge + ", downgradeCredit=" + downgradeCredit + ", createdAt="
+ + createdAt + ", updatedAt=" + updatedAt + ", archivedAt=" + archivedAt
+ + ", hideDateRangeOnInvoice=" + hideDateRangeOnInvoice
+ ", allowFractionalQuantities=" + allowFractionalQuantities + ", itemCategory="
+ itemCategory + ", useSiteExchangeRate=" + useSiteExchangeRate
+ ", accountingCode=" + accountingCode + ", eventBasedBillingMetricId="
@@ -1380,9 +1380,9 @@ public Builder toBuilder() {
.productFamilyHandle(getProductFamilyHandle())
.kind(getKind())
.archived(getArchived())
- .taxable(getTaxable())
.pricePointCount(getPricePointCount())
.defaultPricePointName(getDefaultPricePointName())
+ .taxable(getTaxable())
.recurring(getRecurring())
.createdAt(getCreatedAt())
.updatedAt(getUpdatedAt())
@@ -1426,7 +1426,6 @@ public static class Builder {
private OptionalNullable pricePerUnitInCents;
private ComponentKind kind;
private Boolean archived;
- private Boolean taxable;
private OptionalNullable description;
private OptionalNullable defaultPricePointId;
private OptionalNullable> overagePrices;
@@ -1434,6 +1433,7 @@ public static class Builder {
private Integer pricePointCount;
private OptionalNullable pricePointsUrl;
private String defaultPricePointName;
+ private Boolean taxable;
private OptionalNullable taxCode;
private Boolean recurring;
private OptionalNullable upgradeCharge;
@@ -1608,16 +1608,6 @@ public Builder archived(Boolean archived) {
return this;
}
- /**
- * Setter for taxable.
- * @param taxable Boolean value for taxable.
- * @return Builder
- */
- public Builder taxable(Boolean taxable) {
- this.taxable = taxable;
- return this;
- }
-
/**
* Setter for description.
* @param description String value for description.
@@ -1733,6 +1723,16 @@ public Builder defaultPricePointName(String defaultPricePointName) {
return this;
}
+ /**
+ * Setter for taxable.
+ * @param taxable Boolean value for taxable.
+ * @return Builder
+ */
+ public Builder taxable(Boolean taxable) {
+ this.taxable = taxable;
+ return this;
+ }
+
/**
* Setter for taxCode.
* @param taxCode String value for taxCode.
@@ -1962,8 +1962,8 @@ public Builder unsetIntervalUnit() {
public Component build() {
return new Component(id, name, handle, pricingScheme, unitName, unitPrice,
productFamilyId, productFamilyName, productFamilyHandle, pricePerUnitInCents,
- kind, archived, taxable, description, defaultPricePointId, overagePrices,
- prices, pricePointCount, pricePointsUrl, defaultPricePointName, taxCode,
+ kind, archived, description, defaultPricePointId, overagePrices, prices,
+ pricePointCount, pricePointsUrl, defaultPricePointName, taxable, taxCode,
recurring, upgradeCharge, downgradeCredit, createdAt, updatedAt, archivedAt,
hideDateRangeOnInvoice, allowFractionalQuantities, itemCategory,
useSiteExchangeRate, accountingCode, eventBasedBillingMetricId, interval,
diff --git a/src/main/java/com/maxio/advancedbilling/models/ComponentCustomPrice.java b/src/main/java/com/maxio/advancedbilling/models/ComponentCustomPrice.java
index 103d74eb..be653453 100644
--- a/src/main/java/com/maxio/advancedbilling/models/ComponentCustomPrice.java
+++ b/src/main/java/com/maxio/advancedbilling/models/ComponentCustomPrice.java
@@ -24,6 +24,10 @@ public class ComponentCustomPrice
private Integer interval;
private OptionalNullable intervalUnit;
private List prices;
+ private Boolean renewPrepaidAllocation;
+ private Boolean rolloverPrepaidRemainder;
+ private OptionalNullable expirationInterval;
+ private OptionalNullable expirationIntervalUnit;
/**
* Default constructor.
@@ -38,18 +42,30 @@ public ComponentCustomPrice() {
* @param pricingScheme PricingScheme value for pricingScheme.
* @param interval Integer value for interval.
* @param intervalUnit IntervalUnit value for intervalUnit.
+ * @param renewPrepaidAllocation Boolean value for renewPrepaidAllocation.
+ * @param rolloverPrepaidRemainder Boolean value for rolloverPrepaidRemainder.
+ * @param expirationInterval Integer value for expirationInterval.
+ * @param expirationIntervalUnit ExpirationIntervalUnit value for expirationIntervalUnit.
*/
public ComponentCustomPrice(
List prices,
Boolean taxIncluded,
PricingScheme pricingScheme,
Integer interval,
- IntervalUnit intervalUnit) {
+ IntervalUnit intervalUnit,
+ Boolean renewPrepaidAllocation,
+ Boolean rolloverPrepaidRemainder,
+ Integer expirationInterval,
+ ExpirationIntervalUnit expirationIntervalUnit) {
this.taxIncluded = taxIncluded;
this.pricingScheme = pricingScheme;
this.interval = interval;
this.intervalUnit = OptionalNullable.of(intervalUnit);
this.prices = prices;
+ this.renewPrepaidAllocation = renewPrepaidAllocation;
+ this.rolloverPrepaidRemainder = rolloverPrepaidRemainder;
+ this.expirationInterval = OptionalNullable.of(expirationInterval);
+ this.expirationIntervalUnit = OptionalNullable.of(expirationIntervalUnit);
}
/**
@@ -59,16 +75,26 @@ public ComponentCustomPrice(
* @param pricingScheme PricingScheme value for pricingScheme.
* @param interval Integer value for interval.
* @param intervalUnit IntervalUnit value for intervalUnit.
+ * @param renewPrepaidAllocation Boolean value for renewPrepaidAllocation.
+ * @param rolloverPrepaidRemainder Boolean value for rolloverPrepaidRemainder.
+ * @param expirationInterval Integer value for expirationInterval.
+ * @param expirationIntervalUnit ExpirationIntervalUnit value for expirationIntervalUnit.
*/
protected ComponentCustomPrice(List prices, Boolean taxIncluded,
PricingScheme pricingScheme, Integer interval,
- OptionalNullable intervalUnit) {
+ OptionalNullable intervalUnit, Boolean renewPrepaidAllocation,
+ Boolean rolloverPrepaidRemainder, OptionalNullable expirationInterval,
+ OptionalNullable expirationIntervalUnit) {
this.taxIncluded = taxIncluded;
this.pricingScheme = pricingScheme;
this.interval = interval;
this.intervalUnit = intervalUnit;
this.prices = prices;
+ this.renewPrepaidAllocation = renewPrepaidAllocation;
+ this.rolloverPrepaidRemainder = rolloverPrepaidRemainder;
+ this.expirationInterval = expirationInterval;
+ this.expirationIntervalUnit = expirationIntervalUnit;
}
/**
@@ -201,6 +227,138 @@ public void setPrices(List prices) {
this.prices = prices;
}
+ /**
+ * Getter for RenewPrepaidAllocation.
+ * Applicable only to prepaid usage components. Controls whether the allocated quantity renews
+ * each period.
+ * @return Returns the Boolean
+ */
+ @JsonGetter("renew_prepaid_allocation")
+ @JsonInclude(JsonInclude.Include.NON_NULL)
+ public Boolean getRenewPrepaidAllocation() {
+ return renewPrepaidAllocation;
+ }
+
+ /**
+ * Setter for RenewPrepaidAllocation.
+ * Applicable only to prepaid usage components. Controls whether the allocated quantity renews
+ * each period.
+ * @param renewPrepaidAllocation Value for Boolean
+ */
+ @JsonSetter("renew_prepaid_allocation")
+ public void setRenewPrepaidAllocation(Boolean renewPrepaidAllocation) {
+ this.renewPrepaidAllocation = renewPrepaidAllocation;
+ }
+
+ /**
+ * Getter for RolloverPrepaidRemainder.
+ * Applicable only to prepaid usage components. Controls whether remaining units roll over to
+ * the next period.
+ * @return Returns the Boolean
+ */
+ @JsonGetter("rollover_prepaid_remainder")
+ @JsonInclude(JsonInclude.Include.NON_NULL)
+ public Boolean getRolloverPrepaidRemainder() {
+ return rolloverPrepaidRemainder;
+ }
+
+ /**
+ * Setter for RolloverPrepaidRemainder.
+ * Applicable only to prepaid usage components. Controls whether remaining units roll over to
+ * the next period.
+ * @param rolloverPrepaidRemainder Value for Boolean
+ */
+ @JsonSetter("rollover_prepaid_remainder")
+ public void setRolloverPrepaidRemainder(Boolean rolloverPrepaidRemainder) {
+ this.rolloverPrepaidRemainder = rolloverPrepaidRemainder;
+ }
+
+ /**
+ * Internal Getter for ExpirationInterval.
+ * Applicable only when rollover is enabled. Number of `expiration_interval_unit`s after which
+ * rollover amounts expire.
+ * @return Returns the Internal Integer
+ */
+ @JsonGetter("expiration_interval")
+ @JsonInclude(JsonInclude.Include.NON_NULL)
+ @JsonSerialize(using = OptionalNullable.Serializer.class)
+ protected OptionalNullable internalGetExpirationInterval() {
+ return this.expirationInterval;
+ }
+
+ /**
+ * Getter for ExpirationInterval.
+ * Applicable only when rollover is enabled. Number of `expiration_interval_unit`s after which
+ * rollover amounts expire.
+ * @return Returns the Integer
+ */
+ public Integer getExpirationInterval() {
+ return OptionalNullable.getFrom(expirationInterval);
+ }
+
+ /**
+ * Setter for ExpirationInterval.
+ * Applicable only when rollover is enabled. Number of `expiration_interval_unit`s after which
+ * rollover amounts expire.
+ * @param expirationInterval Value for Integer
+ */
+ @JsonSetter("expiration_interval")
+ public void setExpirationInterval(Integer expirationInterval) {
+ this.expirationInterval = OptionalNullable.of(expirationInterval);
+ }
+
+ /**
+ * UnSetter for ExpirationInterval.
+ * Applicable only when rollover is enabled. Number of `expiration_interval_unit`s after which
+ * rollover amounts expire.
+ */
+ public void unsetExpirationInterval() {
+ expirationInterval = null;
+ }
+
+ /**
+ * Internal Getter for ExpirationIntervalUnit.
+ * Applicable only when rollover is enabled. Interval unit for rollover expiration (month or
+ * day).
+ * @return Returns the Internal ExpirationIntervalUnit
+ */
+ @JsonGetter("expiration_interval_unit")
+ @JsonInclude(JsonInclude.Include.NON_NULL)
+ @JsonSerialize(using = OptionalNullable.Serializer.class)
+ protected OptionalNullable internalGetExpirationIntervalUnit() {
+ return this.expirationIntervalUnit;
+ }
+
+ /**
+ * Getter for ExpirationIntervalUnit.
+ * Applicable only when rollover is enabled. Interval unit for rollover expiration (month or
+ * day).
+ * @return Returns the ExpirationIntervalUnit
+ */
+ public ExpirationIntervalUnit getExpirationIntervalUnit() {
+ return OptionalNullable.getFrom(expirationIntervalUnit);
+ }
+
+ /**
+ * Setter for ExpirationIntervalUnit.
+ * Applicable only when rollover is enabled. Interval unit for rollover expiration (month or
+ * day).
+ * @param expirationIntervalUnit Value for ExpirationIntervalUnit
+ */
+ @JsonSetter("expiration_interval_unit")
+ public void setExpirationIntervalUnit(ExpirationIntervalUnit expirationIntervalUnit) {
+ this.expirationIntervalUnit = OptionalNullable.of(expirationIntervalUnit);
+ }
+
+ /**
+ * UnSetter for ExpirationIntervalUnit.
+ * Applicable only when rollover is enabled. Interval unit for rollover expiration (month or
+ * day).
+ */
+ public void unsetExpirationIntervalUnit() {
+ expirationIntervalUnit = null;
+ }
+
/**
* Converts this ComponentCustomPrice into string format.
* @return String representation of this class
@@ -209,7 +367,10 @@ public void setPrices(List prices) {
public String toString() {
return "ComponentCustomPrice [" + "prices=" + prices + ", taxIncluded=" + taxIncluded
+ ", pricingScheme=" + pricingScheme + ", interval=" + interval + ", intervalUnit="
- + intervalUnit + ", additionalProperties=" + getAdditionalProperties() + "]";
+ + intervalUnit + ", renewPrepaidAllocation=" + renewPrepaidAllocation
+ + ", rolloverPrepaidRemainder=" + rolloverPrepaidRemainder + ", expirationInterval="
+ + expirationInterval + ", expirationIntervalUnit=" + expirationIntervalUnit
+ + ", additionalProperties=" + getAdditionalProperties() + "]";
}
/**
@@ -221,8 +382,12 @@ public Builder toBuilder() {
Builder builder = new Builder(prices)
.taxIncluded(getTaxIncluded())
.pricingScheme(getPricingScheme())
- .interval(getInterval());
+ .interval(getInterval())
+ .renewPrepaidAllocation(getRenewPrepaidAllocation())
+ .rolloverPrepaidRemainder(getRolloverPrepaidRemainder());
builder.intervalUnit = internalGetIntervalUnit();
+ builder.expirationInterval = internalGetExpirationInterval();
+ builder.expirationIntervalUnit = internalGetExpirationIntervalUnit();
return builder;
}
@@ -235,6 +400,10 @@ public static class Builder {
private PricingScheme pricingScheme;
private Integer interval;
private OptionalNullable intervalUnit;
+ private Boolean renewPrepaidAllocation;
+ private Boolean rolloverPrepaidRemainder;
+ private OptionalNullable expirationInterval;
+ private OptionalNullable expirationIntervalUnit;
/**
* Initialization constructor.
@@ -309,13 +478,72 @@ public Builder unsetIntervalUnit() {
return this;
}
+ /**
+ * Setter for renewPrepaidAllocation.
+ * @param renewPrepaidAllocation Boolean value for renewPrepaidAllocation.
+ * @return Builder
+ */
+ public Builder renewPrepaidAllocation(Boolean renewPrepaidAllocation) {
+ this.renewPrepaidAllocation = renewPrepaidAllocation;
+ return this;
+ }
+
+ /**
+ * Setter for rolloverPrepaidRemainder.
+ * @param rolloverPrepaidRemainder Boolean value for rolloverPrepaidRemainder.
+ * @return Builder
+ */
+ public Builder rolloverPrepaidRemainder(Boolean rolloverPrepaidRemainder) {
+ this.rolloverPrepaidRemainder = rolloverPrepaidRemainder;
+ return this;
+ }
+
+ /**
+ * Setter for expirationInterval.
+ * @param expirationInterval Integer value for expirationInterval.
+ * @return Builder
+ */
+ public Builder expirationInterval(Integer expirationInterval) {
+ this.expirationInterval = OptionalNullable.of(expirationInterval);
+ return this;
+ }
+
+ /**
+ * UnSetter for expirationInterval.
+ * @return Builder
+ */
+ public Builder unsetExpirationInterval() {
+ expirationInterval = null;
+ return this;
+ }
+
+ /**
+ * Setter for expirationIntervalUnit.
+ * @param expirationIntervalUnit ExpirationIntervalUnit value for expirationIntervalUnit.
+ * @return Builder
+ */
+ public Builder expirationIntervalUnit(ExpirationIntervalUnit expirationIntervalUnit) {
+ this.expirationIntervalUnit = OptionalNullable.of(expirationIntervalUnit);
+ return this;
+ }
+
+ /**
+ * UnSetter for expirationIntervalUnit.
+ * @return Builder
+ */
+ public Builder unsetExpirationIntervalUnit() {
+ expirationIntervalUnit = null;
+ return this;
+ }
+
/**
* Builds a new {@link ComponentCustomPrice} object using the set fields.
* @return {@link ComponentCustomPrice}
*/
public ComponentCustomPrice build() {
return new ComponentCustomPrice(prices, taxIncluded, pricingScheme, interval,
- intervalUnit);
+ intervalUnit, renewPrepaidAllocation, rolloverPrepaidRemainder,
+ expirationInterval, expirationIntervalUnit);
}
}
}
diff --git a/src/main/java/com/maxio/advancedbilling/models/CreateAllocation.java b/src/main/java/com/maxio/advancedbilling/models/CreateAllocation.java
index 54c6891e..62fa1d6b 100644
--- a/src/main/java/com/maxio/advancedbilling/models/CreateAllocation.java
+++ b/src/main/java/com/maxio/advancedbilling/models/CreateAllocation.java
@@ -406,8 +406,8 @@ public void unsetPricePointId() {
/**
* Getter for BillingSchedule.
* This attribute is particularly useful when you need to align billing events for different
- * components on distinct schedules within a subscription. Please note this only works for site
- * with Multifrequency enabled
+ * components on distinct schedules within a subscription. This only works for site with
+ * Multifrequency enabled.
* @return Returns the BillingSchedule
*/
@JsonGetter("billing_schedule")
@@ -419,8 +419,8 @@ public BillingSchedule getBillingSchedule() {
/**
* Setter for BillingSchedule.
* This attribute is particularly useful when you need to align billing events for different
- * components on distinct schedules within a subscription. Please note this only works for site
- * with Multifrequency enabled
+ * components on distinct schedules within a subscription. This only works for site with
+ * Multifrequency enabled.
* @param billingSchedule Value for BillingSchedule
*/
@JsonSetter("billing_schedule")
diff --git a/src/main/java/com/maxio/advancedbilling/models/CreateInvoiceCoupon.java b/src/main/java/com/maxio/advancedbilling/models/CreateInvoiceCoupon.java
index bd075b72..3ea72f16 100644
--- a/src/main/java/com/maxio/advancedbilling/models/CreateInvoiceCoupon.java
+++ b/src/main/java/com/maxio/advancedbilling/models/CreateInvoiceCoupon.java
@@ -20,6 +20,7 @@
public class CreateInvoiceCoupon
extends BaseModel {
private String code;
+ private String subcode;
private CreateInvoiceCouponPercentage percentage;
private CreateInvoiceCouponAmount amount;
private String description;
@@ -35,6 +36,7 @@ public CreateInvoiceCoupon() {
/**
* Initialization constructor.
* @param code String value for code.
+ * @param subcode String value for subcode.
* @param percentage CreateInvoiceCouponPercentage value for percentage.
* @param amount CreateInvoiceCouponAmount value for amount.
* @param description String value for description.
@@ -43,12 +45,14 @@ public CreateInvoiceCoupon() {
*/
public CreateInvoiceCoupon(
String code,
+ String subcode,
CreateInvoiceCouponPercentage percentage,
CreateInvoiceCouponAmount amount,
String description,
CreateInvoiceCouponProductFamilyId productFamilyId,
CompoundingStrategy compoundingStrategy) {
this.code = code;
+ this.subcode = subcode;
this.percentage = percentage;
this.amount = amount;
this.description = description;
@@ -75,6 +79,25 @@ public void setCode(String code) {
this.code = code;
}
+ /**
+ * Getter for Subcode.
+ * @return Returns the String
+ */
+ @JsonGetter("subcode")
+ @JsonInclude(JsonInclude.Include.NON_NULL)
+ public String getSubcode() {
+ return subcode;
+ }
+
+ /**
+ * Setter for Subcode.
+ * @param subcode Value for String
+ */
+ @JsonSetter("subcode")
+ public void setSubcode(String subcode) {
+ this.subcode = subcode;
+ }
+
/**
* Getter for Percentage.
* @return Returns the CreateInvoiceCouponPercentage
@@ -184,10 +207,10 @@ public void setCompoundingStrategy(CompoundingStrategy compoundingStrategy) {
*/
@Override
public String toString() {
- return "CreateInvoiceCoupon [" + "code=" + code + ", percentage=" + percentage + ", amount="
- + amount + ", description=" + description + ", productFamilyId=" + productFamilyId
- + ", compoundingStrategy=" + compoundingStrategy + ", additionalProperties="
- + getAdditionalProperties() + "]";
+ return "CreateInvoiceCoupon [" + "code=" + code + ", subcode=" + subcode + ", percentage="
+ + percentage + ", amount=" + amount + ", description=" + description
+ + ", productFamilyId=" + productFamilyId + ", compoundingStrategy="
+ + compoundingStrategy + ", additionalProperties=" + getAdditionalProperties() + "]";
}
/**
@@ -198,6 +221,7 @@ public String toString() {
public Builder toBuilder() {
Builder builder = new Builder()
.code(getCode())
+ .subcode(getSubcode())
.percentage(getPercentage())
.amount(getAmount())
.description(getDescription())
@@ -211,6 +235,7 @@ public Builder toBuilder() {
*/
public static class Builder {
private String code;
+ private String subcode;
private CreateInvoiceCouponPercentage percentage;
private CreateInvoiceCouponAmount amount;
private String description;
@@ -229,6 +254,16 @@ public Builder code(String code) {
return this;
}
+ /**
+ * Setter for subcode.
+ * @param subcode String value for subcode.
+ * @return Builder
+ */
+ public Builder subcode(String subcode) {
+ this.subcode = subcode;
+ return this;
+ }
+
/**
* Setter for percentage.
* @param percentage CreateInvoiceCouponPercentage value for percentage.
@@ -284,8 +319,8 @@ public Builder compoundingStrategy(CompoundingStrategy compoundingStrategy) {
* @return {@link CreateInvoiceCoupon}
*/
public CreateInvoiceCoupon build() {
- return new CreateInvoiceCoupon(code, percentage, amount, description, productFamilyId,
- compoundingStrategy);
+ return new CreateInvoiceCoupon(code, subcode, percentage, amount, description,
+ productFamilyId, compoundingStrategy);
}
}
}
diff --git a/src/main/java/com/maxio/advancedbilling/models/CreateInvoiceItem.java b/src/main/java/com/maxio/advancedbilling/models/CreateInvoiceItem.java
index b74cac34..c546fb24 100644
--- a/src/main/java/com/maxio/advancedbilling/models/CreateInvoiceItem.java
+++ b/src/main/java/com/maxio/advancedbilling/models/CreateInvoiceItem.java
@@ -156,7 +156,7 @@ public void setUnitPrice(CreateInvoiceItemUnitPrice unitPrice) {
/**
* Getter for Taxable.
* Set to true to automatically calculate taxes. Site must be configured to use and calculate
- * taxes. If using Avalara, a tax_code parameter must also be sent.
+ * taxes. If using AvaTax, a tax_code parameter must also be sent.
* @return Returns the Boolean
*/
@JsonGetter("taxable")
@@ -168,7 +168,7 @@ public Boolean getTaxable() {
/**
* Setter for Taxable.
* Set to true to automatically calculate taxes. Site must be configured to use and calculate
- * taxes. If using Avalara, a tax_code parameter must also be sent.
+ * taxes. If using AvaTax, a tax_code parameter must also be sent.
* @param taxable Value for Boolean
*/
@JsonSetter("taxable")
@@ -178,6 +178,8 @@ public void setTaxable(Boolean taxable) {
/**
* Getter for TaxCode.
+ * A string representing the tax code related to the product type. This is especially important
+ * when using AvaTax to tax based on locale. This attribute has a max length of 25 characters.
* @return Returns the String
*/
@JsonGetter("tax_code")
@@ -188,6 +190,8 @@ public String getTaxCode() {
/**
* Setter for TaxCode.
+ * A string representing the tax code related to the product type. This is especially important
+ * when using AvaTax to tax based on locale. This attribute has a max length of 25 characters.
* @param taxCode Value for String
*/
@JsonSetter("tax_code")
diff --git a/src/main/java/com/maxio/advancedbilling/models/CreateMetafield.java b/src/main/java/com/maxio/advancedbilling/models/CreateMetafield.java
index df43661e..46ed981b 100644
--- a/src/main/java/com/maxio/advancedbilling/models/CreateMetafield.java
+++ b/src/main/java/com/maxio/advancedbilling/models/CreateMetafield.java
@@ -90,10 +90,8 @@ public void setScope(MetafieldScope scope) {
/**
* Getter for InputType.
- * Indicates how data should be added to the metafield. For example, a text type is just a
- * string, so a given metafield of this type can have any value attached. On the other hand,
- * dropdown and radio have a set of allowed values that can be input, and appear differently on
- * a Public Signup Page. Defaults to 'text'
+ * Indicates the type of metafield. A text metafield allows any string value. Dropdown and radio
+ * metafields have a set of values that can be selected. Defaults to 'text'.
* @return Returns the MetafieldInput
*/
@JsonGetter("input_type")
@@ -104,10 +102,8 @@ public MetafieldInput getInputType() {
/**
* Setter for InputType.
- * Indicates how data should be added to the metafield. For example, a text type is just a
- * string, so a given metafield of this type can have any value attached. On the other hand,
- * dropdown and radio have a set of allowed values that can be input, and appear differently on
- * a Public Signup Page. Defaults to 'text'
+ * Indicates the type of metafield. A text metafield allows any string value. Dropdown and radio
+ * metafields have a set of values that can be selected. Defaults to 'text'.
* @param inputType Value for MetafieldInput
*/
@JsonSetter("input_type")
diff --git a/src/main/java/com/maxio/advancedbilling/models/CreateOrUpdateProduct.java b/src/main/java/com/maxio/advancedbilling/models/CreateOrUpdateProduct.java
index 357cdad4..479b069b 100644
--- a/src/main/java/com/maxio/advancedbilling/models/CreateOrUpdateProduct.java
+++ b/src/main/java/com/maxio/advancedbilling/models/CreateOrUpdateProduct.java
@@ -29,7 +29,7 @@ public class CreateOrUpdateProduct
private Long trialPriceInCents;
private Integer trialInterval;
private OptionalNullable trialIntervalUnit;
- private String trialType;
+ private OptionalNullable trialType;
private Integer expirationInterval;
private OptionalNullable expirationIntervalUnit;
private Boolean autoCreateSignupPage;
@@ -54,7 +54,7 @@ public CreateOrUpdateProduct() {
* @param trialPriceInCents Long value for trialPriceInCents.
* @param trialInterval Integer value for trialInterval.
* @param trialIntervalUnit IntervalUnit value for trialIntervalUnit.
- * @param trialType String value for trialType.
+ * @param trialType TrialType value for trialType.
* @param expirationInterval Integer value for expirationInterval.
* @param expirationIntervalUnit ExpirationIntervalUnit value for expirationIntervalUnit.
* @param autoCreateSignupPage Boolean value for autoCreateSignupPage.
@@ -72,7 +72,7 @@ public CreateOrUpdateProduct(
Long trialPriceInCents,
Integer trialInterval,
IntervalUnit trialIntervalUnit,
- String trialType,
+ TrialType trialType,
Integer expirationInterval,
ExpirationIntervalUnit expirationIntervalUnit,
Boolean autoCreateSignupPage,
@@ -88,7 +88,7 @@ public CreateOrUpdateProduct(
this.trialPriceInCents = trialPriceInCents;
this.trialInterval = trialInterval;
this.trialIntervalUnit = OptionalNullable.of(trialIntervalUnit);
- this.trialType = trialType;
+ this.trialType = OptionalNullable.of(trialType);
this.expirationInterval = expirationInterval;
this.expirationIntervalUnit = OptionalNullable.of(expirationIntervalUnit);
this.autoCreateSignupPage = autoCreateSignupPage;
@@ -108,7 +108,7 @@ public CreateOrUpdateProduct(
* @param trialPriceInCents Long value for trialPriceInCents.
* @param trialInterval Integer value for trialInterval.
* @param trialIntervalUnit IntervalUnit value for trialIntervalUnit.
- * @param trialType String value for trialType.
+ * @param trialType TrialType value for trialType.
* @param expirationInterval Integer value for expirationInterval.
* @param expirationIntervalUnit ExpirationIntervalUnit value for expirationIntervalUnit.
* @param autoCreateSignupPage Boolean value for autoCreateSignupPage.
@@ -118,7 +118,7 @@ public CreateOrUpdateProduct(
protected CreateOrUpdateProduct(String name, String description, long priceInCents,
int interval, IntervalUnit intervalUnit, String handle, String accountingCode,
Boolean requireCreditCard, Long trialPriceInCents, Integer trialInterval,
- OptionalNullable trialIntervalUnit, String trialType,
+ OptionalNullable trialIntervalUnit, OptionalNullable trialType,
Integer expirationInterval,
OptionalNullable expirationIntervalUnit,
Boolean autoCreateSignupPage, String taxCode) {
@@ -225,7 +225,7 @@ public void setAccountingCode(String accountingCode) {
/**
* Getter for RequireCreditCard.
* Deprecated value that can be ignored unless you have legacy hosted pages. For Public Signup
- * Page users, please read this attribute from under the signup page.
+ * Page users, read this attribute from under the signup page.
* @return Returns the Boolean
*/
@JsonGetter("require_credit_card")
@@ -237,7 +237,7 @@ public Boolean getRequireCreditCard() {
/**
* Setter for RequireCreditCard.
* Deprecated value that can be ignored unless you have legacy hosted pages. For Public Signup
- * Page users, please read this attribute from under the signup page.
+ * Page users, read this attribute from under the signup page.
* @param requireCreditCard Value for Boolean
*/
@JsonSetter("require_credit_card")
@@ -391,22 +391,58 @@ public void unsetTrialIntervalUnit() {
}
/**
- * Getter for TrialType.
- * @return Returns the String
+ * Internal Getter for TrialType.
+ * Indicates how a trial is handled when the trail period ends and there is no credit card on
+ * file. For `no_obligation`, the subscription transitions to a Trial Ended state. Maxio will
+ * not send any emails or statements. For `payment_expected`, the subscription transitions to a
+ * Past Due state. Maxio will send normal dunning emails and statements according to your other
+ * settings.
+ * @return Returns the Internal TrialType
*/
@JsonGetter("trial_type")
@JsonInclude(JsonInclude.Include.NON_NULL)
- public String getTrialType() {
- return trialType;
+ @JsonSerialize(using = OptionalNullable.Serializer.class)
+ protected OptionalNullable internalGetTrialType() {
+ return this.trialType;
+ }
+
+ /**
+ * Getter for TrialType.
+ * Indicates how a trial is handled when the trail period ends and there is no credit card on
+ * file. For `no_obligation`, the subscription transitions to a Trial Ended state. Maxio will
+ * not send any emails or statements. For `payment_expected`, the subscription transitions to a
+ * Past Due state. Maxio will send normal dunning emails and statements according to your other
+ * settings.
+ * @return Returns the TrialType
+ */
+ public TrialType getTrialType() {
+ return OptionalNullable.getFrom(trialType);
}
/**
* Setter for TrialType.
- * @param trialType Value for String
+ * Indicates how a trial is handled when the trail period ends and there is no credit card on
+ * file. For `no_obligation`, the subscription transitions to a Trial Ended state. Maxio will
+ * not send any emails or statements. For `payment_expected`, the subscription transitions to a
+ * Past Due state. Maxio will send normal dunning emails and statements according to your other
+ * settings.
+ * @param trialType Value for TrialType
*/
@JsonSetter("trial_type")
- public void setTrialType(String trialType) {
- this.trialType = trialType;
+ public void setTrialType(TrialType trialType) {
+ this.trialType = OptionalNullable.of(trialType);
+ }
+
+ /**
+ * UnSetter for TrialType.
+ * Indicates how a trial is handled when the trail period ends and there is no credit card on
+ * file. For `no_obligation`, the subscription transitions to a Trial Ended state. Maxio will
+ * not send any emails or statements. For `payment_expected`, the subscription transitions to a
+ * Past Due state. Maxio will send normal dunning emails and statements according to your other
+ * settings.
+ */
+ public void unsetTrialType() {
+ trialType = null;
}
/**
@@ -497,8 +533,7 @@ public void setAutoCreateSignupPage(Boolean autoCreateSignupPage) {
/**
* Getter for TaxCode.
* A string representing the tax code related to the product type. This is especially important
- * when using the Avalara service to tax based on locale. This attribute has a max length of 10
- * characters.
+ * when using AvaTax to tax based on locale. This attribute has a max length of 25 characters.
* @return Returns the String
*/
@JsonGetter("tax_code")
@@ -510,8 +545,7 @@ public String getTaxCode() {
/**
* Setter for TaxCode.
* A string representing the tax code related to the product type. This is especially important
- * when using the Avalara service to tax based on locale. This attribute has a max length of 10
- * characters.
+ * when using AvaTax to tax based on locale. This attribute has a max length of 25 characters.
* @param taxCode Value for String
*/
@JsonSetter("tax_code")
@@ -548,11 +582,11 @@ public Builder toBuilder() {
.requireCreditCard(getRequireCreditCard())
.trialPriceInCents(getTrialPriceInCents())
.trialInterval(getTrialInterval())
- .trialType(getTrialType())
.expirationInterval(getExpirationInterval())
.autoCreateSignupPage(getAutoCreateSignupPage())
.taxCode(getTaxCode());
builder.trialIntervalUnit = internalGetTrialIntervalUnit();
+ builder.trialType = internalGetTrialType();
builder.expirationIntervalUnit = internalGetExpirationIntervalUnit();
return builder;
}
@@ -572,7 +606,7 @@ public static class Builder {
private Long trialPriceInCents;
private Integer trialInterval;
private OptionalNullable trialIntervalUnit;
- private String trialType;
+ private OptionalNullable trialType;
private Integer expirationInterval;
private OptionalNullable expirationIntervalUnit;
private Boolean autoCreateSignupPage;
@@ -722,11 +756,20 @@ public Builder unsetTrialIntervalUnit() {
/**
* Setter for trialType.
- * @param trialType String value for trialType.
+ * @param trialType TrialType value for trialType.
+ * @return Builder
+ */
+ public Builder trialType(TrialType trialType) {
+ this.trialType = OptionalNullable.of(trialType);
+ return this;
+ }
+
+ /**
+ * UnSetter for trialType.
* @return Builder
*/
- public Builder trialType(String trialType) {
- this.trialType = trialType;
+ public Builder unsetTrialType() {
+ trialType = null;
return this;
}
diff --git a/src/main/java/com/maxio/advancedbilling/models/CreatePaymentProfile.java b/src/main/java/com/maxio/advancedbilling/models/CreatePaymentProfile.java
index 0fd279bb..0e7b098b 100644
--- a/src/main/java/com/maxio/advancedbilling/models/CreatePaymentProfile.java
+++ b/src/main/java/com/maxio/advancedbilling/models/CreatePaymentProfile.java
@@ -244,7 +244,7 @@ protected CreatePaymentProfile(String chargifyToken, Integer id, PaymentType pay
/**
* Getter for ChargifyToken.
- * Token received after sending billing informations using chargify.js.
+ * Token received after sending billing information using chargify.js.
* @return Returns the String
*/
@JsonGetter("chargify_token")
@@ -255,7 +255,7 @@ public String getChargifyToken() {
/**
* Setter for ChargifyToken.
- * Token received after sending billing informations using chargify.js.
+ * Token received after sending billing information using chargify.js.
* @param chargifyToken Value for String
*/
@JsonSetter("chargify_token")
@@ -571,8 +571,8 @@ public void setBillingState(String billingState) {
* The credit card or bank account billing address country, required in [ISO_3166-1
* alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format (i.e. “US”). This value is
* merely passed through to the payment gateway. Some gateways require country codes in a
- * specific format. Please check your gateway’s documentation. If creating an ACH subscription,
- * only US is supported at this time.
+ * specific format. Check your gateway’s documentation. If creating an ACH subscription, only US
+ * is supported at this time.
* @return Returns the String
*/
@JsonGetter("billing_country")
@@ -586,8 +586,8 @@ public String getBillingCountry() {
* The credit card or bank account billing address country, required in [ISO_3166-1
* alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format (i.e. “US”). This value is
* merely passed through to the payment gateway. Some gateways require country codes in a
- * specific format. Please check your gateway’s documentation. If creating an ACH subscription,
- * only US is supported at this time.
+ * specific format. Check your gateway’s documentation. If creating an ACH subscription, only US
+ * is supported at this time.
* @param billingCountry Value for String
*/
@JsonSetter("billing_country")
diff --git a/src/main/java/com/maxio/advancedbilling/models/CreateProductPricePoint.java b/src/main/java/com/maxio/advancedbilling/models/CreateProductPricePoint.java
index 8b523829..68fe60bd 100644
--- a/src/main/java/com/maxio/advancedbilling/models/CreateProductPricePoint.java
+++ b/src/main/java/com/maxio/advancedbilling/models/CreateProductPricePoint.java
@@ -26,7 +26,7 @@ public class CreateProductPricePoint
private Long trialPriceInCents;
private Integer trialInterval;
private IntervalUnit trialIntervalUnit;
- private String trialType;
+ private OptionalNullable trialType;
private Long initialChargeInCents;
private Boolean initialChargeAfterTrial;
private Integer expirationInterval;
@@ -50,7 +50,7 @@ public CreateProductPricePoint() {
* @param trialPriceInCents Long value for trialPriceInCents.
* @param trialInterval Integer value for trialInterval.
* @param trialIntervalUnit IntervalUnit value for trialIntervalUnit.
- * @param trialType String value for trialType.
+ * @param trialType TrialType value for trialType.
* @param initialChargeInCents Long value for initialChargeInCents.
* @param initialChargeAfterTrial Boolean value for initialChargeAfterTrial.
* @param expirationInterval Integer value for expirationInterval.
@@ -66,7 +66,7 @@ public CreateProductPricePoint(
Long trialPriceInCents,
Integer trialInterval,
IntervalUnit trialIntervalUnit,
- String trialType,
+ TrialType trialType,
Long initialChargeInCents,
Boolean initialChargeAfterTrial,
Integer expirationInterval,
@@ -80,7 +80,7 @@ public CreateProductPricePoint(
this.trialPriceInCents = trialPriceInCents;
this.trialInterval = trialInterval;
this.trialIntervalUnit = trialIntervalUnit;
- this.trialType = trialType;
+ this.trialType = OptionalNullable.of(trialType);
this.initialChargeInCents = initialChargeInCents;
this.initialChargeAfterTrial = initialChargeAfterTrial;
this.expirationInterval = expirationInterval;
@@ -98,7 +98,7 @@ public CreateProductPricePoint(
* @param trialPriceInCents Long value for trialPriceInCents.
* @param trialInterval Integer value for trialInterval.
* @param trialIntervalUnit IntervalUnit value for trialIntervalUnit.
- * @param trialType String value for trialType.
+ * @param trialType TrialType value for trialType.
* @param initialChargeInCents Long value for initialChargeInCents.
* @param initialChargeAfterTrial Boolean value for initialChargeAfterTrial.
* @param expirationInterval Integer value for expirationInterval.
@@ -108,8 +108,8 @@ public CreateProductPricePoint(
protected CreateProductPricePoint(String name, long priceInCents, int interval,
IntervalUnit intervalUnit, String handle, Long trialPriceInCents, Integer trialInterval,
- IntervalUnit trialIntervalUnit, String trialType, Long initialChargeInCents,
- Boolean initialChargeAfterTrial, Integer expirationInterval,
+ IntervalUnit trialIntervalUnit, OptionalNullable trialType,
+ Long initialChargeInCents, Boolean initialChargeAfterTrial, Integer expirationInterval,
OptionalNullable expirationIntervalUnit,
Boolean useSiteExchangeRate) {
this.name = name;
@@ -299,22 +299,58 @@ public void setTrialIntervalUnit(IntervalUnit trialIntervalUnit) {
}
/**
- * Getter for TrialType.
- * @return Returns the String
+ * Internal Getter for TrialType.
+ * Indicates how a trial is handled when the trail period ends and there is no credit card on
+ * file. For `no_obligation`, the subscription transitions to a Trial Ended state. Maxio will
+ * not send any emails or statements. For `payment_expected`, the subscription transitions to a
+ * Past Due state. Maxio will send normal dunning emails and statements according to your other
+ * settings.
+ * @return Returns the Internal TrialType
*/
@JsonGetter("trial_type")
@JsonInclude(JsonInclude.Include.NON_NULL)
- public String getTrialType() {
- return trialType;
+ @JsonSerialize(using = OptionalNullable.Serializer.class)
+ protected OptionalNullable internalGetTrialType() {
+ return this.trialType;
+ }
+
+ /**
+ * Getter for TrialType.
+ * Indicates how a trial is handled when the trail period ends and there is no credit card on
+ * file. For `no_obligation`, the subscription transitions to a Trial Ended state. Maxio will
+ * not send any emails or statements. For `payment_expected`, the subscription transitions to a
+ * Past Due state. Maxio will send normal dunning emails and statements according to your other
+ * settings.
+ * @return Returns the TrialType
+ */
+ public TrialType getTrialType() {
+ return OptionalNullable.getFrom(trialType);
}
/**
* Setter for TrialType.
- * @param trialType Value for String
+ * Indicates how a trial is handled when the trail period ends and there is no credit card on
+ * file. For `no_obligation`, the subscription transitions to a Trial Ended state. Maxio will
+ * not send any emails or statements. For `payment_expected`, the subscription transitions to a
+ * Past Due state. Maxio will send normal dunning emails and statements according to your other
+ * settings.
+ * @param trialType Value for TrialType
*/
@JsonSetter("trial_type")
- public void setTrialType(String trialType) {
- this.trialType = trialType;
+ public void setTrialType(TrialType trialType) {
+ this.trialType = OptionalNullable.of(trialType);
+ }
+
+ /**
+ * UnSetter for TrialType.
+ * Indicates how a trial is handled when the trail period ends and there is no credit card on
+ * file. For `no_obligation`, the subscription transitions to a Trial Ended state. Maxio will
+ * not send any emails or statements. For `payment_expected`, the subscription transitions to a
+ * Past Due state. Maxio will send normal dunning emails and statements according to your other
+ * settings.
+ */
+ public void unsetTrialType() {
+ trialType = null;
}
/**
@@ -475,11 +511,11 @@ public Builder toBuilder() {
.trialPriceInCents(getTrialPriceInCents())
.trialInterval(getTrialInterval())
.trialIntervalUnit(getTrialIntervalUnit())
- .trialType(getTrialType())
.initialChargeInCents(getInitialChargeInCents())
.initialChargeAfterTrial(getInitialChargeAfterTrial())
.expirationInterval(getExpirationInterval())
.useSiteExchangeRate(getUseSiteExchangeRate());
+ builder.trialType = internalGetTrialType();
builder.expirationIntervalUnit = internalGetExpirationIntervalUnit();
return builder;
}
@@ -496,7 +532,7 @@ public static class Builder {
private Long trialPriceInCents;
private Integer trialInterval;
private IntervalUnit trialIntervalUnit;
- private String trialType;
+ private OptionalNullable trialType;
private Long initialChargeInCents;
private Boolean initialChargeAfterTrial;
private Integer expirationInterval;
@@ -605,11 +641,20 @@ public Builder trialIntervalUnit(IntervalUnit trialIntervalUnit) {
/**
* Setter for trialType.
- * @param trialType String value for trialType.
+ * @param trialType TrialType value for trialType.
+ * @return Builder
+ */
+ public Builder trialType(TrialType trialType) {
+ this.trialType = OptionalNullable.of(trialType);
+ return this;
+ }
+
+ /**
+ * UnSetter for trialType.
* @return Builder
*/
- public Builder trialType(String trialType) {
- this.trialType = trialType;
+ public Builder unsetTrialType() {
+ trialType = null;
return this;
}
diff --git a/src/main/java/com/maxio/advancedbilling/models/CreateUsage.java b/src/main/java/com/maxio/advancedbilling/models/CreateUsage.java
index 2f2b9698..f13e1ac8 100644
--- a/src/main/java/com/maxio/advancedbilling/models/CreateUsage.java
+++ b/src/main/java/com/maxio/advancedbilling/models/CreateUsage.java
@@ -20,6 +20,7 @@ public class CreateUsage
private String pricePointId;
private String memo;
private BillingSchedule billingSchedule;
+ private ComponentCustomPrice customPrice;
/**
* Default constructor.
@@ -33,16 +34,19 @@ public CreateUsage() {
* @param pricePointId String value for pricePointId.
* @param memo String value for memo.
* @param billingSchedule BillingSchedule value for billingSchedule.
+ * @param customPrice ComponentCustomPrice value for customPrice.
*/
public CreateUsage(
Double quantity,
String pricePointId,
String memo,
- BillingSchedule billingSchedule) {
+ BillingSchedule billingSchedule,
+ ComponentCustomPrice customPrice) {
this.quantity = quantity;
this.pricePointId = pricePointId;
this.memo = memo;
this.billingSchedule = billingSchedule;
+ this.customPrice = customPrice;
}
/**
@@ -107,8 +111,8 @@ public void setMemo(String memo) {
/**
* Getter for BillingSchedule.
* This attribute is particularly useful when you need to align billing events for different
- * components on distinct schedules within a subscription. Please note this only works for site
- * with Multifrequency enabled
+ * components on distinct schedules within a subscription. This only works for site with
+ * Multifrequency enabled.
* @return Returns the BillingSchedule
*/
@JsonGetter("billing_schedule")
@@ -120,8 +124,8 @@ public BillingSchedule getBillingSchedule() {
/**
* Setter for BillingSchedule.
* This attribute is particularly useful when you need to align billing events for different
- * components on distinct schedules within a subscription. Please note this only works for site
- * with Multifrequency enabled
+ * components on distinct schedules within a subscription. This only works for site with
+ * Multifrequency enabled.
* @param billingSchedule Value for BillingSchedule
*/
@JsonSetter("billing_schedule")
@@ -129,6 +133,29 @@ public void setBillingSchedule(BillingSchedule billingSchedule) {
this.billingSchedule = billingSchedule;
}
+ /**
+ * Getter for CustomPrice.
+ * Create or update custom pricing unique to the subscription. Used in place of
+ * `price_point_id`.
+ * @return Returns the ComponentCustomPrice
+ */
+ @JsonGetter("custom_price")
+ @JsonInclude(JsonInclude.Include.NON_NULL)
+ public ComponentCustomPrice getCustomPrice() {
+ return customPrice;
+ }
+
+ /**
+ * Setter for CustomPrice.
+ * Create or update custom pricing unique to the subscription. Used in place of
+ * `price_point_id`.
+ * @param customPrice Value for ComponentCustomPrice
+ */
+ @JsonSetter("custom_price")
+ public void setCustomPrice(ComponentCustomPrice customPrice) {
+ this.customPrice = customPrice;
+ }
+
/**
* Converts this CreateUsage into string format.
* @return String representation of this class
@@ -136,8 +163,8 @@ public void setBillingSchedule(BillingSchedule billingSchedule) {
@Override
public String toString() {
return "CreateUsage [" + "quantity=" + quantity + ", pricePointId=" + pricePointId
- + ", memo=" + memo + ", billingSchedule=" + billingSchedule
- + ", additionalProperties=" + getAdditionalProperties() + "]";
+ + ", memo=" + memo + ", billingSchedule=" + billingSchedule + ", customPrice="
+ + customPrice + ", additionalProperties=" + getAdditionalProperties() + "]";
}
/**
@@ -150,7 +177,8 @@ public Builder toBuilder() {
.quantity(getQuantity())
.pricePointId(getPricePointId())
.memo(getMemo())
- .billingSchedule(getBillingSchedule());
+ .billingSchedule(getBillingSchedule())
+ .customPrice(getCustomPrice());
return builder;
}
@@ -162,6 +190,7 @@ public static class Builder {
private String pricePointId;
private String memo;
private BillingSchedule billingSchedule;
+ private ComponentCustomPrice customPrice;
@@ -205,12 +234,22 @@ public Builder billingSchedule(BillingSchedule billingSchedule) {
return this;
}
+ /**
+ * Setter for customPrice.
+ * @param customPrice ComponentCustomPrice value for customPrice.
+ * @return Builder
+ */
+ public Builder customPrice(ComponentCustomPrice customPrice) {
+ this.customPrice = customPrice;
+ return this;
+ }
+
/**
* Builds a new {@link CreateUsage} object using the set fields.
* @return {@link CreateUsage}
*/
public CreateUsage build() {
- return new CreateUsage(quantity, pricePointId, memo, billingSchedule);
+ return new CreateUsage(quantity, pricePointId, memo, billingSchedule, customPrice);
}
}
}
diff --git a/src/main/java/com/maxio/advancedbilling/models/EBBComponent.java b/src/main/java/com/maxio/advancedbilling/models/EBBComponent.java
index 9a23eec5..7c175147 100644
--- a/src/main/java/com/maxio/advancedbilling/models/EBBComponent.java
+++ b/src/main/java/com/maxio/advancedbilling/models/EBBComponent.java
@@ -335,8 +335,8 @@ public void setUnitPrice(EBBComponentUnitPrice unitPrice) {
/**
* Getter for TaxCode.
* A string representing the tax code related to the component type. This is especially
- * important when using the Avalara service to tax based on locale. This attribute has a max
- * length of 10 characters.
+ * important when using AvaTax to tax based on locale. This attribute has a max length of 25
+ * characters.
* @return Returns the String
*/
@JsonGetter("tax_code")
@@ -348,8 +348,8 @@ public String getTaxCode() {
/**
* Setter for TaxCode.
* A string representing the tax code related to the component type. This is especially
- * important when using the Avalara service to tax based on locale. This attribute has a max
- * length of 10 characters.
+ * important when using AvaTax to tax based on locale. This attribute has a max length of 25
+ * characters.
* @param taxCode Value for String
*/
@JsonSetter("tax_code")
diff --git a/src/main/java/com/maxio/advancedbilling/models/ListCouponsFilter.java b/src/main/java/com/maxio/advancedbilling/models/ListCouponsFilter.java
index fbc5b756..5f5515c1 100644
--- a/src/main/java/com/maxio/advancedbilling/models/ListCouponsFilter.java
+++ b/src/main/java/com/maxio/advancedbilling/models/ListCouponsFilter.java
@@ -30,6 +30,7 @@ public class ListCouponsFilter
private List ids;
private List codes;
private Boolean useSiteExchangeRate;
+ private Boolean includeArchived;
/**
* Default constructor.
@@ -47,6 +48,7 @@ public ListCouponsFilter() {
* @param ids List of Integer value for ids.
* @param codes List of String value for codes.
* @param useSiteExchangeRate Boolean value for useSiteExchangeRate.
+ * @param includeArchived Boolean value for includeArchived.
*/
public ListCouponsFilter(
BasicDateField dateField,
@@ -56,7 +58,8 @@ public ListCouponsFilter(
ZonedDateTime endDatetime,
List ids,
List codes,
- Boolean useSiteExchangeRate) {
+ Boolean useSiteExchangeRate,
+ Boolean includeArchived) {
this.dateField = dateField;
this.startDate = startDate;
this.endDate = endDate;
@@ -65,6 +68,7 @@ public ListCouponsFilter(
this.ids = ids;
this.codes = codes;
this.useSiteExchangeRate = useSiteExchangeRate;
+ this.includeArchived = includeArchived;
}
/**
@@ -254,8 +258,11 @@ public void setCodes(List codes) {
/**
* Getter for UseSiteExchangeRate.
- * Allows fetching coupons with matching use_site_exchange_rate based on provided value. Use in
- * query `filter[use_site_exchange_rate]=true`.
+ * If true, restricts the list to coupons whose pricing is recalculated from the site’s current
+ * exchange rates, so their currency_prices array contains on-the-fly conversions rather than
+ * stored price records. If false, restricts the list to coupons that have manually defined
+ * amounts for each currency, ensuring the response includes the saved currency_prices entries
+ * instead of exchange-rate-derived values. Use in query `filter[use_site_exchange_rate]=true`.
* @return Returns the Boolean
*/
@JsonGetter("use_site_exchange_rate")
@@ -266,8 +273,11 @@ public Boolean getUseSiteExchangeRate() {
/**
* Setter for UseSiteExchangeRate.
- * Allows fetching coupons with matching use_site_exchange_rate based on provided value. Use in
- * query `filter[use_site_exchange_rate]=true`.
+ * If true, restricts the list to coupons whose pricing is recalculated from the site’s current
+ * exchange rates, so their currency_prices array contains on-the-fly conversions rather than
+ * stored price records. If false, restricts the list to coupons that have manually defined
+ * amounts for each currency, ensuring the response includes the saved currency_prices entries
+ * instead of exchange-rate-derived values. Use in query `filter[use_site_exchange_rate]=true`.
* @param useSiteExchangeRate Value for Boolean
*/
@JsonSetter("use_site_exchange_rate")
@@ -275,6 +285,27 @@ public void setUseSiteExchangeRate(Boolean useSiteExchangeRate) {
this.useSiteExchangeRate = useSiteExchangeRate;
}
+ /**
+ * Getter for IncludeArchived.
+ * Controls returning archived coupons.
+ * @return Returns the Boolean
+ */
+ @JsonGetter("include_archived")
+ @JsonInclude(JsonInclude.Include.NON_NULL)
+ public Boolean getIncludeArchived() {
+ return includeArchived;
+ }
+
+ /**
+ * Setter for IncludeArchived.
+ * Controls returning archived coupons.
+ * @param includeArchived Value for Boolean
+ */
+ @JsonSetter("include_archived")
+ public void setIncludeArchived(Boolean includeArchived) {
+ this.includeArchived = includeArchived;
+ }
+
/**
* Converts this ListCouponsFilter into string format.
* @return String representation of this class
@@ -284,7 +315,8 @@ public String toString() {
return "ListCouponsFilter [" + "dateField=" + dateField + ", startDate=" + startDate
+ ", endDate=" + endDate + ", startDatetime=" + startDatetime + ", endDatetime="
+ endDatetime + ", ids=" + ids + ", codes=" + codes + ", useSiteExchangeRate="
- + useSiteExchangeRate + ", additionalProperties=" + getAdditionalProperties() + "]";
+ + useSiteExchangeRate + ", includeArchived=" + includeArchived
+ + ", additionalProperties=" + getAdditionalProperties() + "]";
}
/**
@@ -301,7 +333,8 @@ public Builder toBuilder() {
.endDatetime(getEndDatetime())
.ids(getIds())
.codes(getCodes())
- .useSiteExchangeRate(getUseSiteExchangeRate());
+ .useSiteExchangeRate(getUseSiteExchangeRate())
+ .includeArchived(getIncludeArchived());
return builder;
}
@@ -317,6 +350,7 @@ public static class Builder {
private List ids;
private List codes;
private Boolean useSiteExchangeRate;
+ private Boolean includeArchived;
@@ -400,13 +434,23 @@ public Builder useSiteExchangeRate(Boolean useSiteExchangeRate) {
return this;
}
+ /**
+ * Setter for includeArchived.
+ * @param includeArchived Boolean value for includeArchived.
+ * @return Builder
+ */
+ public Builder includeArchived(Boolean includeArchived) {
+ this.includeArchived = includeArchived;
+ return this;
+ }
+
/**
* Builds a new {@link ListCouponsFilter} object using the set fields.
* @return {@link ListCouponsFilter}
*/
public ListCouponsFilter build() {
return new ListCouponsFilter(dateField, startDate, endDate, startDatetime, endDatetime,
- ids, codes, useSiteExchangeRate);
+ ids, codes, useSiteExchangeRate, includeArchived);
}
}
}
diff --git a/src/main/java/com/maxio/advancedbilling/models/ListMetadataForResourceTypeInput.java b/src/main/java/com/maxio/advancedbilling/models/ListMetadataForResourceTypeInput.java
index 031945f5..2b5f946e 100644
--- a/src/main/java/com/maxio/advancedbilling/models/ListMetadataForResourceTypeInput.java
+++ b/src/main/java/com/maxio/advancedbilling/models/ListMetadataForResourceTypeInput.java
@@ -81,7 +81,7 @@ public ListMetadataForResourceTypeInput(
/**
* Getter for ResourceType.
- * the resource type to which the metafields belong
+ * The resource type to which the metafields belong.
* @return Returns the ResourceType
*/
@JsonGetter("resource_type")
@@ -91,7 +91,7 @@ public ResourceType getResourceType() {
/**
* Setter for ResourceType.
- * the resource type to which the metafields belong
+ * The resource type to which the metafields belong.
* @param resourceType Value for ResourceType
*/
@JsonSetter("resource_type")
diff --git a/src/main/java/com/maxio/advancedbilling/models/ListMetadataInput.java b/src/main/java/com/maxio/advancedbilling/models/ListMetadataInput.java
index ab61da2b..75f3b2cd 100644
--- a/src/main/java/com/maxio/advancedbilling/models/ListMetadataInput.java
+++ b/src/main/java/com/maxio/advancedbilling/models/ListMetadataInput.java
@@ -47,7 +47,7 @@ public ListMetadataInput(
/**
* Getter for ResourceType.
- * the resource type to which the metafields belong
+ * The resource type to which the metafields belong.
* @return Returns the ResourceType
*/
@JsonGetter("resource_type")
@@ -57,7 +57,7 @@ public ResourceType getResourceType() {
/**
* Setter for ResourceType.
- * the resource type to which the metafields belong
+ * The resource type to which the metafields belong.
* @param resourceType Value for ResourceType
*/
@JsonSetter("resource_type")
diff --git a/src/main/java/com/maxio/advancedbilling/models/ListMetafieldsInput.java b/src/main/java/com/maxio/advancedbilling/models/ListMetafieldsInput.java
index ee605d09..7e4318ed 100644
--- a/src/main/java/com/maxio/advancedbilling/models/ListMetafieldsInput.java
+++ b/src/main/java/com/maxio/advancedbilling/models/ListMetafieldsInput.java
@@ -51,7 +51,7 @@ public ListMetafieldsInput(
/**
* Getter for ResourceType.
- * the resource type to which the metafields belong
+ * The resource type to which the metafields belong.
* @return Returns the ResourceType
*/
@JsonGetter("resource_type")
@@ -61,7 +61,7 @@ public ResourceType getResourceType() {
/**
* Setter for ResourceType.
- * the resource type to which the metafields belong
+ * The resource type to which the metafields belong.
* @param resourceType Value for ResourceType
*/
@JsonSetter("resource_type")
@@ -71,7 +71,7 @@ public void setResourceType(ResourceType resourceType) {
/**
* Getter for Name.
- * filter by the name of the metafield
+ * Filter by the name of the metafield.
* @return Returns the String
*/
@JsonGetter("name")
@@ -82,7 +82,7 @@ public String getName() {
/**
* Setter for Name.
- * filter by the name of the metafield
+ * Filter by the name of the metafield.
* @param name Value for String
*/
@JsonSetter("name")
diff --git a/src/main/java/com/maxio/advancedbilling/models/Metafield.java b/src/main/java/com/maxio/advancedbilling/models/Metafield.java
index 89cbc96d..4adc0d58 100644
--- a/src/main/java/com/maxio/advancedbilling/models/Metafield.java
+++ b/src/main/java/com/maxio/advancedbilling/models/Metafield.java
@@ -139,7 +139,7 @@ public void setScope(MetafieldScope scope) {
/**
* Getter for DataCount.
- * the amount of subscriptions this metafield has been applied to in Chargify
+ * The amount of subscriptions this metafield has been applied to in Advanced Billing.
* @return Returns the Integer
*/
@JsonGetter("data_count")
@@ -150,7 +150,7 @@ public Integer getDataCount() {
/**
* Setter for DataCount.
- * the amount of subscriptions this metafield has been applied to in Chargify
+ * The amount of subscriptions this metafield has been applied to in Advanced Billing.
* @param dataCount Value for Integer
*/
@JsonSetter("data_count")
@@ -160,10 +160,8 @@ public void setDataCount(Integer dataCount) {
/**
* Getter for InputType.
- * Indicates how data should be added to the metafield. For example, a text type is just a
- * string, so a given metafield of this type can have any value attached. On the other hand,
- * dropdown and radio have a set of allowed values that can be input, and appear differently on
- * a Public Signup Page. Defaults to 'text'
+ * Indicates the type of metafield. A text metafield allows any string value. Dropdown and radio
+ * metafields have a set of values that can be selected. Defaults to 'text'.
* @return Returns the MetafieldInput
*/
@JsonGetter("input_type")
@@ -174,10 +172,8 @@ public MetafieldInput getInputType() {
/**
* Setter for InputType.
- * Indicates how data should be added to the metafield. For example, a text type is just a
- * string, so a given metafield of this type can have any value attached. On the other hand,
- * dropdown and radio have a set of allowed values that can be input, and appear differently on
- * a Public Signup Page. Defaults to 'text'
+ * Indicates the type of metafield. A text metafield allows any string value. Dropdown and radio
+ * metafields have a set of values that can be selected. Defaults to 'text'.
* @param inputType Value for MetafieldInput
*/
@JsonSetter("input_type")
diff --git a/src/main/java/com/maxio/advancedbilling/models/MetafieldScope.java b/src/main/java/com/maxio/advancedbilling/models/MetafieldScope.java
index 5d559c55..183edc65 100644
--- a/src/main/java/com/maxio/advancedbilling/models/MetafieldScope.java
+++ b/src/main/java/com/maxio/advancedbilling/models/MetafieldScope.java
@@ -144,7 +144,9 @@ public void setPortal(IncludeOption portal) {
/**
* Getter for PublicShow.
- * Include (1) or exclude (0) metafields from being viewable by your ecosystem.
+ * Include (1) or exclude (0) metafields used in [Embeddable
+ * Components](page:development-tools/embeddable-components/overview) from being viewable by
+ * your ecosystem.
* @return Returns the IncludeOption
*/
@JsonGetter("public_show")
@@ -155,7 +157,9 @@ public IncludeOption getPublicShow() {
/**
* Setter for PublicShow.
- * Include (1) or exclude (0) metafields from being viewable by your ecosystem.
+ * Include (1) or exclude (0) metafields used in [Embeddable
+ * Components](page:development-tools/embeddable-components/overview) from being viewable by
+ * your ecosystem.
* @param publicShow Value for IncludeOption
*/
@JsonSetter("public_show")
@@ -165,7 +169,9 @@ public void setPublicShow(IncludeOption publicShow) {
/**
* Getter for PublicEdit.
- * Include (1) or exclude (0) metafields from being edited by your ecosystem.
+ * Include (1) or exclude (0) metafields used in [Embeddable
+ * Components](page:development-tools/embeddable-components/overview) from being editable by
+ * your ecosystem.
* @return Returns the IncludeOption
*/
@JsonGetter("public_edit")
@@ -176,7 +182,9 @@ public IncludeOption getPublicEdit() {
/**
* Setter for PublicEdit.
- * Include (1) or exclude (0) metafields from being edited by your ecosystem.
+ * Include (1) or exclude (0) metafields used in [Embeddable
+ * Components](page:development-tools/embeddable-components/overview) from being editable by
+ * your ecosystem.
* @param publicEdit Value for IncludeOption
*/
@JsonSetter("public_edit")
diff --git a/src/main/java/com/maxio/advancedbilling/models/MeteredComponent.java b/src/main/java/com/maxio/advancedbilling/models/MeteredComponent.java
index 16bcde4c..6a8dc557 100644
--- a/src/main/java/com/maxio/advancedbilling/models/MeteredComponent.java
+++ b/src/main/java/com/maxio/advancedbilling/models/MeteredComponent.java
@@ -352,8 +352,8 @@ public void setUnitPrice(MeteredComponentUnitPrice unitPrice) {
/**
* Getter for TaxCode.
* A string representing the tax code related to the component type. This is especially
- * important when using the Avalara service to tax based on locale. This attribute has a max
- * length of 10 characters.
+ * important when using AvaTax to tax based on locale. This attribute has a max length of 25
+ * characters.
* @return Returns the String
*/
@JsonGetter("tax_code")
@@ -365,8 +365,8 @@ public String getTaxCode() {
/**
* Setter for TaxCode.
* A string representing the tax code related to the component type. This is especially
- * important when using the Avalara service to tax based on locale. This attribute has a max
- * length of 10 characters.
+ * important when using AvaTax to tax based on locale. This attribute has a max length of 25
+ * characters.
* @param taxCode Value for String
*/
@JsonSetter("tax_code")
diff --git a/src/main/java/com/maxio/advancedbilling/models/OnOffComponent.java b/src/main/java/com/maxio/advancedbilling/models/OnOffComponent.java
index d41624be..2d8faf84 100644
--- a/src/main/java/com/maxio/advancedbilling/models/OnOffComponent.java
+++ b/src/main/java/com/maxio/advancedbilling/models/OnOffComponent.java
@@ -354,8 +354,8 @@ public void setUnitPrice(OnOffComponentUnitPrice unitPrice) {
/**
* Getter for TaxCode.
* A string representing the tax code related to the component type. This is especially
- * important when using the Avalara service to tax based on locale. This attribute has a max
- * length of 10 characters.
+ * important when using AvaTax to tax based on locale. This attribute has a max length of 25
+ * characters.
* @return Returns the String
*/
@JsonGetter("tax_code")
@@ -367,8 +367,8 @@ public String getTaxCode() {
/**
* Setter for TaxCode.
* A string representing the tax code related to the component type. This is especially
- * important when using the Avalara service to tax based on locale. This attribute has a max
- * length of 10 characters.
+ * important when using AvaTax to tax based on locale. This attribute has a max length of 25
+ * characters.
* @param taxCode Value for String
*/
@JsonSetter("tax_code")
diff --git a/src/main/java/com/maxio/advancedbilling/models/PaymentProfileAttributes.java b/src/main/java/com/maxio/advancedbilling/models/PaymentProfileAttributes.java
index a5d4a155..47c9e437 100644
--- a/src/main/java/com/maxio/advancedbilling/models/PaymentProfileAttributes.java
+++ b/src/main/java/com/maxio/advancedbilling/models/PaymentProfileAttributes.java
@@ -539,8 +539,8 @@ public void setBillingState(String billingState) {
* or bank account billing address country, required in [ISO_3166-1
* alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format (i.e. “US”). This value is
* merely passed through to the payment gateway. Some gateways require country codes in a
- * specific format. Please check your gateway’s documentation. If creating an ACH subscription,
- * only US is supported at this time.
+ * specific format. Check your gateway’s documentation. If creating an ACH subscription, only US
+ * is supported at this time.
* @return Returns the String
*/
@JsonGetter("billing_country")
@@ -555,8 +555,8 @@ public String getBillingCountry() {
* or bank account billing address country, required in [ISO_3166-1
* alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format (i.e. “US”). This value is
* merely passed through to the payment gateway. Some gateways require country codes in a
- * specific format. Please check your gateway’s documentation. If creating an ACH subscription,
- * only US is supported at this time.
+ * specific format. Check your gateway’s documentation. If creating an ACH subscription, only US
+ * is supported at this time.
* @param billingCountry Value for String
*/
@JsonSetter("billing_country")
diff --git a/src/main/java/com/maxio/advancedbilling/models/PrepaidUsageComponent.java b/src/main/java/com/maxio/advancedbilling/models/PrepaidUsageComponent.java
index f81ae4e7..eb51a572 100644
--- a/src/main/java/com/maxio/advancedbilling/models/PrepaidUsageComponent.java
+++ b/src/main/java/com/maxio/advancedbilling/models/PrepaidUsageComponent.java
@@ -473,8 +473,8 @@ public void setUnitPrice(PrepaidUsageComponentUnitPrice unitPrice) {
/**
* Getter for TaxCode.
* A string representing the tax code related to the component type. This is especially
- * important when using the Avalara service to tax based on locale. This attribute has a max
- * length of 10 characters.
+ * important when using AvaTax to tax based on locale. This attribute has a max length of 25
+ * characters.
* @return Returns the String
*/
@JsonGetter("tax_code")
@@ -486,8 +486,8 @@ public String getTaxCode() {
/**
* Setter for TaxCode.
* A string representing the tax code related to the component type. This is especially
- * important when using the Avalara service to tax based on locale. This attribute has a max
- * length of 10 characters.
+ * important when using AvaTax to tax based on locale. This attribute has a max length of 25
+ * characters.
* @param taxCode Value for String
*/
@JsonSetter("tax_code")
diff --git a/src/main/java/com/maxio/advancedbilling/models/Product.java b/src/main/java/com/maxio/advancedbilling/models/Product.java
index 16881f9d..6d1cafdf 100644
--- a/src/main/java/com/maxio/advancedbilling/models/Product.java
+++ b/src/main/java/com/maxio/advancedbilling/models/Product.java
@@ -442,7 +442,7 @@ public void unsetAccountingCode() {
/**
* Getter for RequestCreditCard.
* Deprecated value that can be ignored unless you have legacy hosted pages. For Public Signup
- * Page users, please read this attribute from under the signup page.
+ * Page users, read this attribute from under the signup page.
* @return Returns the Boolean
*/
@JsonGetter("request_credit_card")
@@ -454,7 +454,7 @@ public Boolean getRequestCreditCard() {
/**
* Setter for RequestCreditCard.
* Deprecated value that can be ignored unless you have legacy hosted pages. For Public Signup
- * Page users, please read this attribute from under the signup page.
+ * Page users, read this attribute from under the signup page.
* @param requestCreditCard Value for Boolean
*/
@JsonSetter("request_credit_card")
@@ -1211,8 +1211,7 @@ public void setRequireShippingAddress(Boolean requireShippingAddress) {
/**
* Internal Getter for TaxCode.
* A string representing the tax code related to the product type. This is especially important
- * when using the Avalara service to tax based on locale. This attribute has a max length of 10
- * characters.
+ * when using AvaTax to tax based on locale. This attribute has a max length of 25 characters.
* @return Returns the Internal String
*/
@JsonGetter("tax_code")
@@ -1225,8 +1224,7 @@ protected OptionalNullable internalGetTaxCode() {
/**
* Getter for TaxCode.
* A string representing the tax code related to the product type. This is especially important
- * when using the Avalara service to tax based on locale. This attribute has a max length of 10
- * characters.
+ * when using AvaTax to tax based on locale. This attribute has a max length of 25 characters.
* @return Returns the String
*/
public String getTaxCode() {
@@ -1236,8 +1234,7 @@ public String getTaxCode() {
/**
* Setter for TaxCode.
* A string representing the tax code related to the product type. This is especially important
- * when using the Avalara service to tax based on locale. This attribute has a max length of 10
- * characters.
+ * when using AvaTax to tax based on locale. This attribute has a max length of 25 characters.
* @param taxCode Value for String
*/
@JsonSetter("tax_code")
@@ -1248,8 +1245,7 @@ public void setTaxCode(String taxCode) {
/**
* UnSetter for TaxCode.
* A string representing the tax code related to the product type. This is especially important
- * when using the Avalara service to tax based on locale. This attribute has a max length of 10
- * characters.
+ * when using AvaTax to tax based on locale. This attribute has a max length of 25 characters.
*/
public void unsetTaxCode() {
taxCode = null;
diff --git a/src/main/java/com/maxio/advancedbilling/models/ProductPricePoint.java b/src/main/java/com/maxio/advancedbilling/models/ProductPricePoint.java
index d62ee994..1bcf7065 100644
--- a/src/main/java/com/maxio/advancedbilling/models/ProductPricePoint.java
+++ b/src/main/java/com/maxio/advancedbilling/models/ProductPricePoint.java
@@ -31,7 +31,7 @@ public class ProductPricePoint
private OptionalNullable trialPriceInCents;
private OptionalNullable trialInterval;
private OptionalNullable trialIntervalUnit;
- private String trialType;
+ private OptionalNullable trialType;
private OptionalNullable introductoryOffer;
private OptionalNullable initialChargeInCents;
private OptionalNullable initialChargeAfterTrial;
@@ -64,7 +64,7 @@ public ProductPricePoint() {
* @param trialPriceInCents Long value for trialPriceInCents.
* @param trialInterval Integer value for trialInterval.
* @param trialIntervalUnit IntervalUnit value for trialIntervalUnit.
- * @param trialType String value for trialType.
+ * @param trialType TrialType value for trialType.
* @param introductoryOffer Boolean value for introductoryOffer.
* @param initialChargeInCents Long value for initialChargeInCents.
* @param initialChargeAfterTrial Boolean value for initialChargeAfterTrial.
@@ -90,7 +90,7 @@ public ProductPricePoint(
Long trialPriceInCents,
Integer trialInterval,
IntervalUnit trialIntervalUnit,
- String trialType,
+ TrialType trialType,
Boolean introductoryOffer,
Long initialChargeInCents,
Boolean initialChargeAfterTrial,
@@ -114,7 +114,7 @@ public ProductPricePoint(
this.trialPriceInCents = OptionalNullable.of(trialPriceInCents);
this.trialInterval = OptionalNullable.of(trialInterval);
this.trialIntervalUnit = OptionalNullable.of(trialIntervalUnit);
- this.trialType = trialType;
+ this.trialType = OptionalNullable.of(trialType);
this.introductoryOffer = OptionalNullable.of(introductoryOffer);
this.initialChargeInCents = OptionalNullable.of(initialChargeInCents);
this.initialChargeAfterTrial = OptionalNullable.of(initialChargeAfterTrial);
@@ -142,7 +142,7 @@ public ProductPricePoint(
* @param trialPriceInCents Long value for trialPriceInCents.
* @param trialInterval Integer value for trialInterval.
* @param trialIntervalUnit IntervalUnit value for trialIntervalUnit.
- * @param trialType String value for trialType.
+ * @param trialType TrialType value for trialType.
* @param introductoryOffer Boolean value for introductoryOffer.
* @param initialChargeInCents Long value for initialChargeInCents.
* @param initialChargeAfterTrial Boolean value for initialChargeAfterTrial.
@@ -162,7 +162,7 @@ public ProductPricePoint(
protected ProductPricePoint(Integer id, String name, OptionalNullable handle,
Long priceInCents, Integer interval, IntervalUnit intervalUnit,
OptionalNullable trialPriceInCents, OptionalNullable trialInterval,
- OptionalNullable trialIntervalUnit, String trialType,
+ OptionalNullable trialIntervalUnit, OptionalNullable trialType,
OptionalNullable introductoryOffer,
OptionalNullable initialChargeInCents,
OptionalNullable initialChargeAfterTrial,
@@ -468,22 +468,58 @@ public void unsetTrialIntervalUnit() {
}
/**
- * Getter for TrialType.
- * @return Returns the String
+ * Internal Getter for TrialType.
+ * Indicates how a trial is handled when the trail period ends and there is no credit card on
+ * file. For `no_obligation`, the subscription transitions to a Trial Ended state. Maxio will
+ * not send any emails or statements. For `payment_expected`, the subscription transitions to a
+ * Past Due state. Maxio will send normal dunning emails and statements according to your other
+ * settings.
+ * @return Returns the Internal TrialType
*/
@JsonGetter("trial_type")
@JsonInclude(JsonInclude.Include.NON_NULL)
- public String getTrialType() {
- return trialType;
+ @JsonSerialize(using = OptionalNullable.Serializer.class)
+ protected OptionalNullable internalGetTrialType() {
+ return this.trialType;
+ }
+
+ /**
+ * Getter for TrialType.
+ * Indicates how a trial is handled when the trail period ends and there is no credit card on
+ * file. For `no_obligation`, the subscription transitions to a Trial Ended state. Maxio will
+ * not send any emails or statements. For `payment_expected`, the subscription transitions to a
+ * Past Due state. Maxio will send normal dunning emails and statements according to your other
+ * settings.
+ * @return Returns the TrialType
+ */
+ public TrialType getTrialType() {
+ return OptionalNullable.getFrom(trialType);
}
/**
* Setter for TrialType.
- * @param trialType Value for String
+ * Indicates how a trial is handled when the trail period ends and there is no credit card on
+ * file. For `no_obligation`, the subscription transitions to a Trial Ended state. Maxio will
+ * not send any emails or statements. For `payment_expected`, the subscription transitions to a
+ * Past Due state. Maxio will send normal dunning emails and statements according to your other
+ * settings.
+ * @param trialType Value for TrialType
*/
@JsonSetter("trial_type")
- public void setTrialType(String trialType) {
- this.trialType = trialType;
+ public void setTrialType(TrialType trialType) {
+ this.trialType = OptionalNullable.of(trialType);
+ }
+
+ /**
+ * UnSetter for TrialType.
+ * Indicates how a trial is handled when the trail period ends and there is no credit card on
+ * file. For `no_obligation`, the subscription transitions to a Trial Ended state. Maxio will
+ * not send any emails or statements. For `payment_expected`, the subscription transitions to a
+ * Past Due state. Maxio will send normal dunning emails and statements according to your other
+ * settings.
+ */
+ public void unsetTrialType() {
+ trialType = null;
}
/**
@@ -959,7 +995,6 @@ public Builder toBuilder() {
.priceInCents(getPriceInCents())
.interval(getInterval())
.intervalUnit(getIntervalUnit())
- .trialType(getTrialType())
.productId(getProductId())
.createdAt(getCreatedAt())
.updatedAt(getUpdatedAt())
@@ -971,6 +1006,7 @@ public Builder toBuilder() {
builder.trialPriceInCents = internalGetTrialPriceInCents();
builder.trialInterval = internalGetTrialInterval();
builder.trialIntervalUnit = internalGetTrialIntervalUnit();
+ builder.trialType = internalGetTrialType();
builder.introductoryOffer = internalGetIntroductoryOffer();
builder.initialChargeInCents = internalGetInitialChargeInCents();
builder.initialChargeAfterTrial = internalGetInitialChargeAfterTrial();
@@ -994,7 +1030,7 @@ public static class Builder {
private OptionalNullable trialPriceInCents;
private OptionalNullable trialInterval;
private OptionalNullable trialIntervalUnit;
- private String trialType;
+ private OptionalNullable trialType;
private OptionalNullable introductoryOffer;
private OptionalNullable initialChargeInCents;
private OptionalNullable initialChargeAfterTrial;
@@ -1140,11 +1176,20 @@ public Builder unsetTrialIntervalUnit() {
/**
* Setter for trialType.
- * @param trialType String value for trialType.
+ * @param trialType TrialType value for trialType.
+ * @return Builder
+ */
+ public Builder trialType(TrialType trialType) {
+ this.trialType = OptionalNullable.of(trialType);
+ return this;
+ }
+
+ /**
+ * UnSetter for trialType.
* @return Builder
*/
- public Builder trialType(String trialType) {
- this.trialType = trialType;
+ public Builder unsetTrialType() {
+ trialType = null;
return this;
}
diff --git a/src/main/java/com/maxio/advancedbilling/models/QuantityBasedComponent.java b/src/main/java/com/maxio/advancedbilling/models/QuantityBasedComponent.java
index 7f80dfcd..9f4de9fa 100644
--- a/src/main/java/com/maxio/advancedbilling/models/QuantityBasedComponent.java
+++ b/src/main/java/com/maxio/advancedbilling/models/QuantityBasedComponent.java
@@ -458,8 +458,8 @@ public void setUnitPrice(QuantityBasedComponentUnitPrice unitPrice) {
/**
* Getter for TaxCode.
* A string representing the tax code related to the component type. This is especially
- * important when using the Avalara service to tax based on locale. This attribute has a max
- * length of 10 characters.
+ * important when using AvaTax to tax based on locale. This attribute has a max length of 25
+ * characters.
* @return Returns the String
*/
@JsonGetter("tax_code")
@@ -471,8 +471,8 @@ public String getTaxCode() {
/**
* Setter for TaxCode.
* A string representing the tax code related to the component type. This is especially
- * important when using the Avalara service to tax based on locale. This attribute has a max
- * length of 10 characters.
+ * important when using AvaTax to tax based on locale. This attribute has a max length of 25
+ * characters.
* @param taxCode Value for String
*/
@JsonSetter("tax_code")
diff --git a/src/main/java/com/maxio/advancedbilling/models/ResumeOptions.java b/src/main/java/com/maxio/advancedbilling/models/ResumeOptions.java
index b7739172..532d0988 100644
--- a/src/main/java/com/maxio/advancedbilling/models/ResumeOptions.java
+++ b/src/main/java/com/maxio/advancedbilling/models/ResumeOptions.java
@@ -40,7 +40,7 @@ public ResumeOptions(
/**
* Getter for RequireResume.
* Chargify will only attempt to resume the subscription's billing period. If not resumable, the
- * subscription will be left in it's current state.
+ * subscription will be left in its current state.
* @return Returns the Boolean
*/
@JsonGetter("require_resume")
@@ -52,7 +52,7 @@ public Boolean getRequireResume() {
/**
* Setter for RequireResume.
* Chargify will only attempt to resume the subscription's billing period. If not resumable, the
- * subscription will be left in it's current state.
+ * subscription will be left in its current state.
* @param requireResume Value for Boolean
*/
@JsonSetter("require_resume")
diff --git a/src/main/java/com/maxio/advancedbilling/models/Subscription.java b/src/main/java/com/maxio/advancedbilling/models/Subscription.java
index 7246ba06..586450a5 100644
--- a/src/main/java/com/maxio/advancedbilling/models/Subscription.java
+++ b/src/main/java/com/maxio/advancedbilling/models/Subscription.java
@@ -12,6 +12,7 @@
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.maxio.advancedbilling.DateTimeHelper;
+import com.maxio.advancedbilling.models.containers.SubscriptionSnapDay;
import io.apimatic.core.types.BaseModel;
import io.apimatic.core.types.OptionalNullable;
import java.time.ZonedDateTime;
@@ -46,7 +47,7 @@ public class Subscription
private String signupRevenue;
private OptionalNullable delayedCancelAt;
private OptionalNullable couponCode;
- private OptionalNullable snapDay;
+ private OptionalNullable snapDay;
private CollectionMethod paymentCollectionMethod;
private Customer customer;
private Product product;
@@ -117,7 +118,7 @@ public Subscription() {
* @param signupRevenue String value for signupRevenue.
* @param delayedCancelAt ZonedDateTime value for delayedCancelAt.
* @param couponCode String value for couponCode.
- * @param snapDay String value for snapDay.
+ * @param snapDay SubscriptionSnapDay value for snapDay.
* @param paymentCollectionMethod CollectionMethod value for paymentCollectionMethod.
* @param customer Customer value for customer.
* @param product Product value for product.
@@ -182,7 +183,7 @@ public Subscription(
String signupRevenue,
ZonedDateTime delayedCancelAt,
String couponCode,
- String snapDay,
+ SubscriptionSnapDay snapDay,
CollectionMethod paymentCollectionMethod,
Customer customer,
Product product,
@@ -311,7 +312,7 @@ public Subscription(
* @param signupRevenue String value for signupRevenue.
* @param delayedCancelAt ZonedDateTime value for delayedCancelAt.
* @param couponCode String value for couponCode.
- * @param snapDay String value for snapDay.
+ * @param snapDay SubscriptionSnapDay value for snapDay.
* @param paymentCollectionMethod CollectionMethod value for paymentCollectionMethod.
* @param customer Customer value for customer.
* @param product Product value for product.
@@ -367,7 +368,7 @@ protected Subscription(Integer id, SubscriptionState state, Long balanceInCents,
OptionalNullable currentPeriodStartedAt, SubscriptionState previousState,
Integer signupPaymentId, String signupRevenue,
OptionalNullable delayedCancelAt, OptionalNullable couponCode,
- OptionalNullable snapDay, CollectionMethod paymentCollectionMethod,
+ OptionalNullable snapDay, CollectionMethod paymentCollectionMethod,
Customer customer, Product product, CreditCardPaymentProfile creditCard,
OptionalNullable group, BankAccountPaymentProfile bankAccount,
OptionalNullable paymentType, OptionalNullable referralCode,
@@ -1340,12 +1341,12 @@ public void unsetCouponCode() {
* Internal Getter for SnapDay.
* The day of the month that the subscription will charge according to calendar billing rules,
* if used.
- * @return Returns the Internal String
+ * @return Returns the Internal SubscriptionSnapDay
*/
@JsonGetter("snap_day")
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonSerialize(using = OptionalNullable.Serializer.class)
- protected OptionalNullable internalGetSnapDay() {
+ protected OptionalNullable